ramips: convert eeprom to nvmem format for zte 8820s

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2023-10-15 14:38:41 +08:00
parent 2bf19baf36
commit 9a94f28ad0
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
3 changed files with 26 additions and 9 deletions

View File

@ -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>;
};
};

View File

@ -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>;
};
};

View File

@ -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|\