From: Rosen Penev Date: Fri, 14 Jun 2024 19:19:15 +0000 (-0700) Subject: ath79: nec,wX1200cr: use nvmem X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=51f96278ed121546fa5788d717fd8a9635a56158;p=openwrt%2Fstaging%2Fthess.git ath79: nec,wX1200cr: use nvmem Userspace handling is deprecated. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/16245 Signed-off-by: Hauke Mehrtens --- diff --git a/target/linux/ath79/dts/qca9561_nec_wf1200cr.dts b/target/linux/ath79/dts/qca9561_nec_wf1200cr.dts index c4671bf57f..4e66f45ebe 100644 --- a/target/linux/ath79/dts/qca9561_nec_wf1200cr.dts +++ b/target/linux/ath79/dts/qca9561_nec_wf1200cr.dts @@ -114,6 +114,10 @@ #address-cells = <1>; #size-cells = <1>; + cal_art_1000: calibration@1000 { + reg = <0x1000 0x440>; + }; + precal_art_5000: pre-calibration@5000 { reg = <0x5000 0x2f20>; }; @@ -177,5 +181,6 @@ &wmac { status = "okay"; - qca,no-eeprom; + nvmem-cells = <&cal_art_1000>; + nvmem-cell-names = "calibration"; }; diff --git a/target/linux/ath79/dts/qca9563_nec_wg1200cr.dts b/target/linux/ath79/dts/qca9563_nec_wg1200cr.dts index 7f8866bd36..c9e47938d3 100644 --- a/target/linux/ath79/dts/qca9563_nec_wg1200cr.dts +++ b/target/linux/ath79/dts/qca9563_nec_wg1200cr.dts @@ -129,6 +129,10 @@ #address-cells = <1>; #size-cells = <1>; + cal_art_1000: calibration@1000 { + reg = <0x1000 0x440>; + }; + precal_art_5000: pre-calibration@5000 { reg = <0x5000 0x2f20>; }; @@ -178,5 +182,6 @@ &wmac { status = "okay"; - qca,no-eeprom; + nvmem-cells = <&cal_art_1000>; + nvmem-cell-names = "calibration"; }; diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index ddcef7b685..1f20250a2b 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -30,8 +30,6 @@ case "$FIRMWARE" in dlink,dir-842-c1|\ dlink,dir-842-c2|\ dlink,dir-842-c3|\ - nec,wf1200cr|\ - nec,wg1200cr|\ wd,mynet-n600|\ wd,mynet-n750) caldata_extract "art" 0x1000 0x440 diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index 2a1f230eb4..15cd2adda3 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -88,11 +88,16 @@ case "$board" in [ "$PHYNBR" -eq 1 ] && \ macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1 > /sys${DEVPATH}/macaddress ;; + qihoo,c301) + [ "$PHYNBR" -eq 0 ] && \ + mtd_get_mac_ascii devdata wlan5mac > /sys${DEVPATH}/macaddress + ;; nec,wf1200cr|\ nec,wg1200cr|\ - qihoo,c301) [ "$PHYNBR" -eq 0 ] && \ mtd_get_mac_ascii devdata wlan5mac > /sys${DEVPATH}/macaddress + [ "$PHYNBR" -eq 1 ] && \ + mtd_get_mac_ascii devdata wlan24mac > /sys${DEVPATH}/macaddress ;; phicomm,k2t) [ "$PHYNBR" -eq 0 ] && \