diff --git a/target/linux/ramips/dts/mt7621_jdcloud_re-sp-01b.dts b/target/linux/ramips/dts/mt7621_jdcloud_re-sp-01b.dts index e635cf65c9..1f2968f94c 100644 --- a/target/linux/ramips/dts/mt7621_jdcloud_re-sp-01b.dts +++ b/target/linux/ramips/dts/mt7621_jdcloud_re-sp-01b.dts @@ -124,7 +124,7 @@ #size-cells = <1>; eeprom_factory_0: eeprom@0 { - reg = <0x0 0x4da8>; + reg = <0x0 0x400>; }; eeprom_factory_8000: eeprom@8000 { @@ -182,8 +182,8 @@ &pcie1 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_factory_8000>; - nvmem-cell-names = "eeprom"; + nvmem-cells = <&eeprom_factory_8000>, <&macaddr_config_4429 0x800000>; + nvmem-cell-names = "eeprom", "mac-address"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7621_zte_e8820s.dts b/target/linux/ramips/dts/mt7621_zte_e8820s.dts index c247a1229b..6df53359b0 100644 --- a/target/linux/ramips/dts/mt7621_zte_e8820s.dts +++ b/target/linux/ramips/dts/mt7621_zte_e8820s.dts @@ -105,9 +105,28 @@ }; factory: partition@100000 { + compatible = "nvmem-cells"; label = "factory"; reg = <0x100000 0x40000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; partition@140000 { @@ -141,7 +160,8 @@ wifi@0,0 { compatible = "pci14c3,7603"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x0000>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <2400000 2500000>; }; }; @@ -150,7 +170,8 @@ wifi@0,0 { compatible = "pci14c3,7662"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index c817b8c577..96b49ff00a 100644 --- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -106,10 +106,6 @@ case "$board" in [ "$PHYNBR" = "1" ] && \ macaddr_setbit_la "$(mtd_get_mac_binary Factory 0x4)" > /sys${DEVPATH}/macaddress ;; - jdcloud,re-sp-01b) - [ "$PHYNBR" = "1" ] && \ - macaddr_add "$(get_mac_label)" 0x800000 > /sys${DEVPATH}/macaddress - ;; linksys,e5600|\ linksys,ea6350-v4|\ linksys,ea7300-v1|\