mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-12-24 21:42:10 -05:00
mediatek: filogic: use NVMEM for wifi macaddr on NWA50AX Pro
Convert NWA50AX Pro to use NVMEM framework for wifi macaddr. Also remove the unused macaddr@a. Signed-off-by: Zhi-Jun You <hujy652@protonmail.com> Link: https://github.com/openwrt/openwrt/pull/19982 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
1f59ef64fa
commit
97fca42507
@ -71,7 +71,7 @@
|
||||
|
||||
phy-handle = <&phy0>;
|
||||
|
||||
nvmem-cells = <&macaddr_mrd_1fff8>;
|
||||
nvmem-cells = <&macaddr_mrd_1fff8 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
@ -162,10 +162,6 @@
|
||||
precal_factory_1010: precal@1010 {
|
||||
reg = <0x1010 0x6f010>;
|
||||
};
|
||||
|
||||
macaddr: macaddr@a {
|
||||
reg = <0xa 0x6>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -220,7 +216,9 @@
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_mrd_1fff8: macaddr@1fff8 {
|
||||
compatible = "mac-base";
|
||||
reg = <0x1fff8 0x6>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -247,5 +245,19 @@
|
||||
&wifi {
|
||||
nvmem-cells = <&eeprom_factory_0>, <&precal_factory_1010>;
|
||||
nvmem-cell-names = "eeprom", "precal";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
|
||||
band@0 {
|
||||
reg = <0>;
|
||||
nvmem-cells = <&macaddr_mrd_1fff8 1>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
band@1 {
|
||||
reg = <1>;
|
||||
nvmem-cells = <&macaddr_mrd_1fff8 2>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
|
||||
@ -218,9 +218,4 @@ case "$board" in
|
||||
addr=$(mtd_get_mac_binary factory 0x04)
|
||||
[ "$PHYNBR" = "1" ] && macaddr_setbit_la $(macaddr_add $addr -0x300000) > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
zyxel,nwa50ax-pro)
|
||||
hw_mac_addr="$(mtd_get_mac_binary mrd 0x1fff8)"
|
||||
[ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
esac
|
||||
|
||||
Loading…
Reference in New Issue
Block a user