[openwrt/openwrt] mpc85xx: tl-wdr4900: use NVMEM for WAN
LEDE Commits
lede-commits at lists.infradead.org
Wed Aug 21 12:39:33 PDT 2024
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e031ea8aabaef5d7a209e97b72b7b8d695fd3c37
commit e031ea8aabaef5d7a209e97b72b7b8d695fd3c37
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Fri Aug 9 13:27:20 2024 -0700
mpc85xx: tl-wdr4900: use NVMEM for WAN
Now that the ports are defined in DTS, this is trivial to do.
Avoids userspace handling.
Signed-off-by: Rosen Penev <rosenp at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16125
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
target/linux/mpc85xx/base-files/etc/board.d/02_network | 1 -
.../linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts | 8 +++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/target/linux/mpc85xx/base-files/etc/board.d/02_network b/target/linux/mpc85xx/base-files/etc/board.d/02_network
index e5afcf7df6..601bd7e9f1 100644
--- a/target/linux/mpc85xx/base-files/etc/board.d/02_network
+++ b/target/linux/mpc85xx/base-files/etc/board.d/02_network
@@ -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"
diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
index 5cf3c26fc9..0b22360562 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
+++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
@@ -63,7 +63,9 @@
#size-cells = <1>;
macaddr_uboot_4fc00: macaddr at 4fc00 {
+ compatible = "mac-base";
reg = <0x4fc00 0x6>;
+ #nvmem-cell-cells = <1>;
};
};
};
@@ -148,6 +150,10 @@
reg = <1>;
label = "wan";
phy-handle = <&phy_port1>;
+
+ nvmem-cells = <&macaddr_uboot_4fc00 1>;
+ nvmem-cell-names = "mac-address";
+
};
port at 2 {
@@ -187,7 +193,7 @@
enet0: ethernet at b0000 {
phy-connection-type = "rgmii-id";
- nvmem-cells = <&macaddr_uboot_4fc00>;
+ nvmem-cells = <&macaddr_uboot_4fc00 0>;
nvmem-cell-names = "mac-address";
fixed-link {
More information about the lede-commits
mailing list