ath79: dir-842: use nvmem

Userspace handling is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2024-06-14 12:40:13 -07:00
parent cfba4728cf
commit 19826c3a7b
4 changed files with 15 additions and 8 deletions

View File

@ -111,6 +111,16 @@
label = "art";
reg = <0xfd0000 0x010000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
cal_art_1000: calibration@1000 {
reg = <0x1000 0x440>;
};
};
};
partition@fe0000 {
@ -154,5 +164,6 @@
&wmac {
status = "okay";
qca,no-eeprom;
nvmem-cells = <&cal_art_1000>;
nvmem-cell-names = "calibration";
};

View File

@ -24,12 +24,6 @@ case "$FIRMWARE" in
caldata_extract "art" 0x1000 0x440
ath9k_patch_mac $(mtd_get_mac_text "mac" 0x4)
;;
dlink,dir-842-c1|\
dlink,dir-842-c2|\
dlink,dir-842-c3)
caldata_extract "art" 0x1000 0x440
ath9k_patch_mac $(mtd_get_mac_ascii devdata "wlan24mac")
;;
engenius,ecb1200|\
engenius,ecb1750)
caldata_extract "art" 0x1000 0x440

View File

@ -14,7 +14,6 @@ case "$FIRMWARE" in
dlink,dir-842-c3)
caldata_extract "art" 0x5000 0x2f20
caldata_valid "202f" || caldata_extract "reserved" 0x15000 0x2f20
ath10k_patch_mac $(mtd_get_mac_ascii devdata wlan5mac)
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
;;

View File

@ -87,6 +87,9 @@ case "$board" in
[ "$PHYNBR" -eq 1 ] && \
macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1 > /sys${DEVPATH}/macaddress
;;
dlink,dir-842-c1|\
dlink,dir-842-c2|\
dlink,dir-842-c3|\
nec,wf1200cr|\
nec,wg1200cr|\
qihoo,c301)