diff --git a/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi b/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi index 8e7652cac7..3a235070bf 100644 --- a/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi +++ b/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi @@ -78,6 +78,13 @@ label = "u-boot-env"; reg = <0x30000 0x10000>; read-only; + + nvmem-layout { + compatible = "u-boot,env"; + + macaddr_uboot_ethaddr: ethaddr { + }; + }; }; partition@40000 { @@ -160,21 +167,33 @@ port@1 { status = "okay"; label = "lan4"; + + nvmem-cells = <&macaddr_uboot_ethaddr>; + nvmem-cell-names = "mac-address"; }; port@2 { status = "okay"; label = "lan3"; + + nvmem-cells = <&macaddr_uboot_ethaddr>; + nvmem-cell-names = "mac-address"; }; port@3 { status = "okay"; label = "lan2"; + + nvmem-cells = <&macaddr_uboot_ethaddr>; + nvmem-cell-names = "mac-address"; }; port@4 { status = "okay"; label = "lan1"; + + nvmem-cells = <&macaddr_uboot_ethaddr>; + nvmem-cell-names = "mac-address"; }; }; }; diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index c6e440b8e9..c16196e1c0 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -261,7 +261,6 @@ ramips_setup_macs() ;; edimax,ra21s|\ edimax,rg21s) - lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr) ;; elecom,wrc-2533ghbk2-t|\