mediatek: YunCore AX835: convert to nvmem-layout
authorChukun Pan <amadeus@jmu.edu.cn>
Tue, 9 Jan 2024 15:15:27 +0000 (23:15 +0800)
committerDaniel Golle <daniel@makrotopia.org>
Sun, 14 Jan 2024 23:11:57 +0000 (23:11 +0000)
The nvmem-cells is deprecated. Also simplify mac address settings.

Fixes: b4086f4 ("mediatek: add support for YunCore AX835")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
target/linux/mediatek/dts/mt7981b-yuncore-ax835.dts

index b3ca5bfa2cffbc494604927dc54a8d088ab28ef5..37b381d9842318115abc006bd49c1ce3c3c2ae2e 100644 (file)
@@ -84,6 +84,9 @@
                reg = <0>;
                phy-mode = "2500base-x";
 
+               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&macaddr_factory_2a>;
+
                fixed-link {
                        speed = <2500>;
                        full-duplex;
                                reg = <0x50000 0x10000>;
                                read-only;
 
-                               compatible = "nvmem-cells";
-                               #address-cells = <1>;
-                               #size-cells = <1>;
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
 
-                               eeprom_factory: eeprom@0 {
-                                       reg = <0x0 0x1000>;
-                               };
+                                       eeprom_factory: eeprom@0 {
+                                               reg = <0x0 0x1000>;
+                                       };
 
-                               macaddr_factory_4: macaddr@4 {
-                                       reg = <0x4 0x6>;
-                               };
+                                       macaddr_factory_4: macaddr@4 {
+                                               reg = <0x4 0x6>;
+                                       };
 
-                               macaddr_factory_24: macaddr@24 {
-                                       reg = <0x24 0x6>;
-                               };
+                                       macaddr_factory_24: macaddr@24 {
+                                               reg = <0x24 0x6>;
+                                       };
 
-                               macaddr_factory_2a: macaddr@2a {
-                                       reg = <0x2a 0x6>;
+                                       macaddr_factory_2a: macaddr@2a {
+                                               reg = <0x2a 0x6>;
+                                       };
                                };
                        };
 
                #address-cells = <1>;
                #size-cells = <0>;
 
-               lan: port@3 {
+               port@3 {
                        reg = <3>;
                        label = "lan";
-
-                       nvmem-cell-names = "mac-address";
-                       nvmem-cells = <&macaddr_factory_2a 0>;
                };
 
                port@4 {
                        reg = <4>;
                        label = "wan";
-
-                       nvmem-cell-names = "mac-address";
-                       nvmem-cells = <&macaddr_factory_2a 0>;
                };
 
                port@6 {