ath79: nec,wX1200cr: use nvmem
authorRosen Penev <rosenp@gmail.com>
Fri, 14 Jun 2024 19:19:15 +0000 (12:19 -0700)
committerHauke Mehrtens <hauke@hauke-m.de>
Thu, 29 Aug 2024 19:05:59 +0000 (21:05 +0200)
Userspace handling is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16245
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ath79/dts/qca9561_nec_wf1200cr.dts
target/linux/ath79/dts/qca9563_nec_wg1200cr.dts
target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac

index c4671bf57f2fb6b36fceb94e0f6e1e75c1040aa4..4e66f45ebe6366dc27693385579acc9aa62ed7b0 100644 (file)
                                        #address-cells = <1>;
                                        #size-cells = <1>;
 
+                                       cal_art_1000: calibration@1000 {
+                                               reg = <0x1000 0x440>;
+                                       };
+
                                        precal_art_5000: pre-calibration@5000 {
                                                reg = <0x5000 0x2f20>;
                                        };
 &wmac {
        status = "okay";
 
-       qca,no-eeprom;
+       nvmem-cells = <&cal_art_1000>;
+       nvmem-cell-names = "calibration";
 };
index 7f8866bd36a66ed801817ea69252ef0c1bdbbe52..c9e47938d3c4fbf0d9d812108330cf95e178bb8f 100644 (file)
                                        #address-cells = <1>;
                                        #size-cells = <1>;
 
+                                       cal_art_1000: calibration@1000 {
+                                               reg = <0x1000 0x440>;
+                                       };
+
                                        precal_art_5000: pre-calibration@5000 {
                                                reg = <0x5000 0x2f20>;
                                        };
 &wmac {
        status = "okay";
 
-       qca,no-eeprom;
+       nvmem-cells = <&cal_art_1000>;
+       nvmem-cell-names = "calibration";
 };
index ddcef7b685ebf5883fb0351118d964bb35770449..1f20250a2b06a327264b54a43346fa3bc16c5730 100644 (file)
@@ -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
index 2a1f230eb4f3275d39e007e8bb8330a21349b1c0..15cd2adda38056ecab45c84fd90668fa2ee1a6bd 100644 (file)
@@ -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 ] && \