diff options
author | Mikhail Zhilkin <csharper2005@gmail.com> | 2023-04-22 06:58:01 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2023-04-29 22:34:51 +0200 |
commit | 15e21d373b3ad6ec17be76c48d5ad32266bc4fe7 (patch) | |
tree | 5d6bb99862a6215b84fdd81a81aebc99ee097c98 /target/linux/ramips/dts | |
parent | c31319b66934f554f6c337b4cfa888b1fb74faa4 (diff) | |
download | upstream-15e21d373b3ad6ec17be76c48d5ad32266bc4fe7.tar.gz upstream-15e21d373b3ad6ec17be76c48d5ad32266bc4fe7.tar.bz2 upstream-15e21d373b3ad6ec17be76c48d5ad32266bc4fe7.zip |
ramips: TP-Link EC330-G5u v1: switch to mac-address-ascii
The TP-Link EC330-G5u v1 router has MAC address that stored in factory mtd
in ascii format. This commit makes the router use of "mac-address-ascii"
in dts.
After the change:
1. All MAC addresses are explicitly assigned in dts (the workarounds in
network scripts are no longer needed);
2. gmac0 (eth0) MAC address is no longer random.
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Diffstat (limited to 'target/linux/ramips/dts')
-rw-r--r-- | target/linux/ramips/dts/mt7621_tplink_ec330-g5u-v1.dts | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/target/linux/ramips/dts/mt7621_tplink_ec330-g5u-v1.dts b/target/linux/ramips/dts/mt7621_tplink_ec330-g5u-v1.dts index b128a7d7a8..6c9cc40701 100644 --- a/target/linux/ramips/dts/mt7621_tplink_ec330-g5u-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_ec330-g5u-v1.dts @@ -11,6 +11,8 @@ model = "TP-Link EC330-G5u v1"; aliases { + label-mac-device = &gmac0; + led-boot = &led_power; led-failsafe = &led_power; led-running = &led_power; @@ -226,6 +228,14 @@ label = "factory"; reg = <0x7800000 0x400000>; read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_165: macaddr@165 { + reg = <0x165 0x11>; + }; }; partition@0_wholeflash { @@ -246,6 +256,9 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x8000>; ieee80211-freq-limit = <2400000 2500000>; + + nvmem-cells = <&macaddr_factory_165>; + nvmem-cell-names = "mac-address-ascii"; }; }; @@ -255,13 +268,26 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x14000>; ieee80211-freq-limit = <5000000 6000000>; + + nvmem-cells = <&macaddr_factory_165>; + nvmem-cell-names = "mac-address-ascii"; + mac-address-increment = <(2)>; }; }; +&gmac0 { + nvmem-cells = <&macaddr_factory_165>; + nvmem-cell-names = "mac-address-ascii"; +}; + &gmac1 { status = "okay"; label = "wan"; phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_165>; + nvmem-cell-names = "mac-address-ascii"; + mac-address-increment = <(1)>; }; &mdio { |