mediatek: use mac-base
authorRosen Penev <rosenp@gmail.com>
Sat, 25 Nov 2023 22:11:08 +0000 (14:11 -0800)
committerChristian Marangi <ansuelsmth@gmail.com>
Sat, 25 Nov 2023 22:45:26 +0000 (23:45 +0100)
mac-address-increment is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts
target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts
target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts
target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts
target/linux/mediatek/dts/mt7981b-glinet-gl-mt3000.dts
target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi
target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi
target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi

index 503e12c91be860d272ef0fc01aef547a66e3453e..c775d998181e287027e29360c9ca6b62f15c08a5 100644 (file)
                                        #size-cells = <1>;
 
                                        macaddr_factory_4: macaddr@4 {
+                                               compatible = "mac-base";
                                                reg = <0x4 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
 
                                        macaddr_factory_7fff4: macaddr@7fff4 {
                reg = <0x0000 0 0 0 0>;
                mediatek,mtd-eeprom = <&factory 0x5000>;
                ieee80211-freq-limit = <5000000 6000000>;
-               nvmem-cells = <&macaddr_factory_4>;
+               nvmem-cells = <&macaddr_factory_4 1>;
                nvmem-cell-names = "mac-address";
-               mac-address-increment = <1>;
        };
 };
 
index df571a5375139bf4fdbae3b72a00eae4a8bbd3ed..dcf851b2740a38f6a7aaec2f7844038a85cfdaf6 100644 (file)
 
                phy-connection-type = "2500base-x";
 
-               nvmem-cells = <&macaddr_factory_4>;
+               nvmem-cells = <&macaddr_factory_4 (-1)>;
                nvmem-cell-names = "mac-address";
-               mac-address-increment = <(-1)>;
 
                fixed-link {
                        speed = <2500>;
                                        #size-cells = <1>;
 
                                        macaddr_factory_4: macaddr@4 {
+                                               compatible = "mac-base";
                                                reg = <0x4 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
index 20aeac6e14185e62ac822ffb0bcfae417322adae..5b1b3083a066589e535fb507bdc6c3f113e0a33a 100644 (file)
@@ -97,9 +97,8 @@
                compatible = "mediatek,eth-mac";
                reg = <0>;
                phy-mode = "2500base-x";
-               nvmem-cells = <&macaddr_factory_4>;
+               nvmem-cells = <&macaddr_factory_4 3>;
                nvmem-cell-names = "mac-address";
-               mac-address-increment = <3>;
 
                fixed-link {
                        speed = <2500>;
                reg = <1>;
                phy-mode = "gmii";
                phy-handle = <&phy0>;
-               nvmem-cells = <&macaddr_factory_4>;
+               nvmem-cells = <&macaddr_factory_4 1>;
                nvmem-cell-names = "mac-address";
-               mac-address-increment = <1>;
        };
 
        mdio: mdio-bus {
                                        #size-cells = <1>;
 
                                        macaddr_factory_4: macaddr@4 {
+                                               compatible = "mac-base";
                                                reg = <0x4 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
index 366d35ecf8590817e843bf3ef90bee636348e801..e2fa8bf5d3fbf9d409ac2a0b9ed0db833a4783c0 100644 (file)
@@ -95,7 +95,7 @@
                phy-mode = "2500base-x";
 
                nvmem-cell-names = "mac-address";
-               nvmem-cells = <&macaddr_bdinfo_de00>;
+               nvmem-cells = <&macaddr_bdinfo_de00 0>;
 
                fixed-link {
                        speed = <2500>;
                                        #size-cells = <1>;
 
                                        macaddr_bdinfo_de00: macaddr@de00 {
+                                               compatible = "mac-base";
                                                reg = <0xde00 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
                        label = "wan";
 
                        nvmem-cell-names = "mac-address";
-                       nvmem-cells = <&macaddr_bdinfo_de00>;
-                       mac-address-increment = <1>;
+                       nvmem-cells = <&macaddr_bdinfo_de00 1>;
                };
 
                lan1: port@1 {
                        label = "lan1";
 
                        nvmem-cell-names = "mac-address";
-                       nvmem-cells = <&macaddr_bdinfo_de00>;
+                       nvmem-cells = <&macaddr_bdinfo_de00 0>;
                };
 
                port@2 {
                        label = "lan2";
 
                        nvmem-cell-names = "mac-address";
-                       nvmem-cells = <&macaddr_bdinfo_de00>;
+                       nvmem-cells = <&macaddr_bdinfo_de00 0>;
                };
 
                port@3 {
                        label = "lan3";
 
                        nvmem-cell-names = "mac-address";
-                       nvmem-cells = <&macaddr_bdinfo_de00>;
+                       nvmem-cells = <&macaddr_bdinfo_de00 0>;
                };
 
                port@6 {
index 135eb0410dd10dbb0596d4591ac45188a9fe67a5..b1ebaf4312cb81c958f76ac935f258fbfae3d37f 100644 (file)
@@ -91,7 +91,7 @@
                reg = <0>;
                phy-mode = "2500base-x";
                phy-handle = <&phy0>;
-               nvmem-cells = <&macaddr>;
+               nvmem-cells = <&macaddr 0>;
                nvmem-cell-names = "mac-address";
        };
 
                reg = <1>;
                phy-mode = "gmii";
                phy-handle = <&int_gbe_phy>;
-               nvmem-cells = <&macaddr>;
+               nvmem-cells = <&macaddr 1>;
                nvmem-cell-names = "mac-address";
-               mac-address-increment = <1>;
        };
 };
 
                                        #size-cells = <1>;
 
                                        macaddr: macaddr@a {
+                                               compatible = "mac-base";
                                                reg = <0xa 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
index 82f3d350143e66a89ef1bb877f4e75631f0b8f86..1e738a4474dc67c590b4239f6fa705e7aea30164 100644 (file)
@@ -73,9 +73,8 @@
                reg = <0>;
                phy-mode = "2500base-x";
 
-               nvmem-cells = <&macaddr_factory_4>;
+               nvmem-cells = <&macaddr_factory_4 (-1)>;
                nvmem-cell-names = "mac-address";
-               mac-address-increment = <(-1)>;
 
                fixed-link {
                        speed = <2500>;
                                        #size-cells = <1>;
 
                                        macaddr_factory_4: macaddr@4 {
+                                               compatible = "mac-base";
                                                reg = <0x4 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
index c339d0e6f35a5d6da821f774aaa05cce38e22aa3..da08bdc723b1b23dfc827eb082676c877c4ed8dd 100644 (file)
@@ -95,7 +95,7 @@
                reg = <0>;
                phy-mode = "2500base-x";
 
-               nvmem-cells = <&macaddr_config_1c>;
+               nvmem-cells = <&macaddr_config_1c 0>;
                nvmem-cell-names = "mac-address";
 
                fixed-link {
                phy-handle = <&phy7>;
                phy-mode = "2500base-x";
 
-               nvmem-cells = <&macaddr_config_1c>;
+               nvmem-cells = <&macaddr_config_1c 1>;
                nvmem-cell-names = "mac-address";
-               mac-address-increment = <1>;
        };
 
        mdio: mdio-bus {
                                        #size-cells = <1>;
 
                                        macaddr_config_1c: macaddr@1c {
+                                               compatible = "mac-base";
                                                reg = <0x1c 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 
 &wifi {
        mediatek,mtd-eeprom = <&factory 0x0>;
-       nvmem-cells = <&macaddr_config_1c>;
+       nvmem-cells = <&macaddr_config_1c 2>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <2>;
        status = "okay";
 };
index 5974802df02a8ff8e145decb8c2f176bb288be88..ffa5acb5d3694ec630e9de0e0b1e84027d6145fc 100644 (file)
@@ -54,9 +54,8 @@
                reg = <0>;
                phy-mode = "2500base-x";
 
-               nvmem-cells = <&macaddr_factory_4>;
+               nvmem-cells = <&macaddr_factory_4 (-1)>;
                nvmem-cell-names = "mac-address";
-               mac-address-increment = <(-1)>;
 
                fixed-link {
                        speed = <2500>;
                                        #size-cells = <1>;
 
                                        macaddr_factory_4: macaddr@4 {
+                                               compatible = "mac-base";
                                                reg = <0x4 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };