From: Rosen Penev Date: Tue, 9 Dec 2025 00:49:32 +0000 (-0800) Subject: ath79: iodata etg3-r: set eth MAC in dts X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F21119%2Fhead;p=thirdparty%2Fopenwrt.git ath79: iodata etg3-r: set eth MAC in dts Userspace handling is deprecated. WAN stuff needs to remain as no DSA yet. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/21119 Signed-off-by: Jonas Jelonek --- diff --git a/target/linux/ath79/dts/ar9342_iodata_etg3-r.dts b/target/linux/ath79/dts/ar9342_iodata_etg3-r.dts index 21c5d6bc178..76e94e91058 100644 --- a/target/linux/ath79/dts/ar9342_iodata_etg3-r.dts +++ b/target/linux/ath79/dts/ar9342_iodata_etg3-r.dts @@ -71,6 +71,14 @@ partition@40000 { label = "u-boot-env"; reg = <0x040000 0x010000>; + + nvmem-layout { + compatible = "u-boot,env"; + + macaddr_uboot_ethaddr: ethaddr { + #nvmem-cell-cells = <1>; + }; + }; }; partition@50000 { @@ -126,6 +134,9 @@ phy-mode = "rgmii"; phy-handle = <&phy0>; + nvmem-cells = <&macaddr_uboot_ethaddr 0>; + nvmem-cell-names = "mac-address"; + gmac-config { device = <&gmac>; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index 8c5c0a0935d..7194d16f24d 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -729,8 +729,7 @@ ath79_setup_macs() label_mac=$(mtd_get_mac_binary u-boot 0x1fc00) ;; iodata,etg3-r) - lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) - wan_mac=$(macaddr_add "$lan_mac" -1) + wan_mac=$(macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" -1) label_mac=$wan_mac ;; iodata,wn-ac1167dgr|\