ramips: replace "mac-address-ascii" with "mac-base"
authorRafał Miłecki <rafal@milecki.pl>
Fri, 14 Jul 2023 13:11:14 +0000 (15:11 +0200)
committerRafał Miłecki <rafal@milecki.pl>
Fri, 21 Jul 2023 05:29:40 +0000 (07:29 +0200)
With upstream accepted "mac-base" binding there is no need for a
downstream "mac-address-ascii" workaround anymore.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
[TP-Link EC330-G5u v1 - OK]
Tested-by: Mikhail Zhilkin <csharper2005@gmail.com>
target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts
target/linux/ramips/dts/mt7621_tplink_ec330-g5u-v1.dts

index 5d713c00987fb27099c43581be2a002820ccf62e..07297df08330b7731998a44994a5945f43362f33 100644 (file)
                        read-only;
 
                        compatible = "nvmem-cells";
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-
-                       macaddr_config_8014: macaddr@8014 {
-                               reg = <0x8014 0x11>;
-                       };
 
-                       macaddr_config_8036: macaddr@8036 {
-                               reg = <0x8036 0x11>;
+                       nvmem-layout {
+                               compatible = "fixed-layout";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               macaddr_config_8014: macaddr@8014 {
+                                       compatible = "mac-base";
+                                       reg = <0x8014 0x11>;
+                                       #nvmem-cell-cells = <1>;
+                               };
+
+                               macaddr_config_8036: macaddr@8036 {
+                                       compatible = "mac-base";
+                                       reg = <0x8036 0x11>;
+                                       #nvmem-cell-cells = <1>;
+                               };
                        };
                };
 
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_config_8014>;
-       nvmem-cell-names = "mac-address-ascii";
+       nvmem-cells = <&macaddr_config_8014 0>;
+       nvmem-cell-names = "mac-address";
 };
 
 &gmac1 {
        label = "wan";
        phy-handle = <&ethphy4>;
 
-       nvmem-cells = <&macaddr_config_8036>;
-       nvmem-cell-names = "mac-address-ascii";
+       nvmem-cells = <&macaddr_config_8036 0>;
+       nvmem-cell-names = "mac-address";
 };
 
 &mdio {
index 6c9cc407015b3840908f8555ee7220ca66d03db7..537b6f70a73d27d6b4b3fbdbe0896a9fd6f00b57 100644 (file)
                        read-only;
 
                        compatible = "nvmem-cells";
-                       #address-cells = <1>;
-                       #size-cells = <1>;
 
-                       macaddr_factory_165: macaddr@165 {
-                               reg = <0x165 0x11>;
+                       nvmem-layout {
+                               compatible = "fixed-layout";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               macaddr_factory_165: macaddr@165 {
+                                       compatible = "mac-base";
+                                       reg = <0x165 0x11>;
+                                       #nvmem-cell-cells = <1>;
+                               };
                        };
+
+
                };
 
                partition@0_wholeflash {
                mediatek,mtd-eeprom = <&factory 0x8000>;
                ieee80211-freq-limit = <2400000 2500000>;
 
-               nvmem-cells = <&macaddr_factory_165>;
-               nvmem-cell-names = "mac-address-ascii";
+               nvmem-cells = <&macaddr_factory_165 0>;
+               nvmem-cell-names = "mac-address";
        };
 };
 
                mediatek,mtd-eeprom = <&factory 0x14000>;
                ieee80211-freq-limit = <5000000 6000000>;
 
-               nvmem-cells = <&macaddr_factory_165>;
-               nvmem-cell-names = "mac-address-ascii";
-               mac-address-increment = <(2)>;
+               nvmem-cells = <&macaddr_factory_165 2>;
+               nvmem-cell-names = "mac-address";
        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_165>;
-       nvmem-cell-names = "mac-address-ascii";
+       nvmem-cells = <&macaddr_factory_165 0>;
+       nvmem-cell-names = "mac-address";
 };
 
 &gmac1 {
        label = "wan";
        phy-handle = <&ethphy0>;
 
-       nvmem-cells = <&macaddr_factory_165>;
-       nvmem-cell-names = "mac-address-ascii";
-       mac-address-increment = <(1)>;
+       nvmem-cells = <&macaddr_factory_165 1>;
+       nvmem-cell-names = "mac-address";
 };
 
 &mdio {