mpc85xx: tl-wdr4900: use NVMEM for WAN
authorRosen Penev <rosenp@gmail.com>
Fri, 9 Aug 2024 20:27:20 +0000 (13:27 -0700)
committerRobert Marko <robimarko@gmail.com>
Wed, 21 Aug 2024 19:39:24 +0000 (21:39 +0200)
Now that the ports are defined in DTS, this is trivial to do.

Avoids userspace handling.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16125
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/mpc85xx/base-files/etc/board.d/02_network
target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts

index e5afcf7df67d7809ff5f3f2dfc3668ce575fd50f..601bd7e9f19ea2c88ae6389860057aff185beb7f 100644 (file)
@@ -28,7 +28,6 @@ ocedo,panda)
        ;;
 tplink,tl-wdr4900-v1)
        ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
-       ucidef_set_interface_macaddr "wan" "$(macaddr_add $(mtd_get_mac_binary u-boot 0x4fc00) 1)"
        ;;
 watchguard,firebox-t10)
        ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
index 5cf3c26fc93764484f31220308eea9026ade522a..0b22360562996cd6123fb4292a5868cfdf273887 100644 (file)
@@ -63,7 +63,9 @@
                                                        #size-cells = <1>;
 
                                                        macaddr_uboot_4fc00: macaddr@4fc00 {
+                                                               compatible = "mac-base";
                                                                reg = <0x4fc00 0x6>;
+                                                               #nvmem-cell-cells = <1>;
                                                        };
                                                };
                                        };
                                                reg = <1>;
                                                label = "wan";
                                                phy-handle = <&phy_port1>;
+
+                                               nvmem-cells = <&macaddr_uboot_4fc00 1>;
+                                               nvmem-cell-names = "mac-address";
+
                                        };
 
                                        port@2 {
 
                enet0: ethernet@b0000 {
                        phy-connection-type = "rgmii-id";
-                       nvmem-cells = <&macaddr_uboot_4fc00>;
+                       nvmem-cells = <&macaddr_uboot_4fc00 0>;
                        nvmem-cell-names = "mac-address";
 
                        fixed-link {