]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ath79: wd,mynet-nxxx: use nvmem 16285/head
authorRosen Penev <rosenp@gmail.com>
Sun, 18 Feb 2024 04:53:04 +0000 (20:53 -0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 27 Sep 2025 22:41:20 +0000 (00:41 +0200)
Userspace handling is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16285
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ath79/dts/ar9344_wd_mynet-nxxx.dtsi
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 ebcf249b5dc2179aaf7075c5056cd650cd1e8747..9241a80eda55155b2d9c2ecc604867b3724083c9 100644 (file)
                                label = "art";
                                reg = <0xff0000 0x010000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       cal_art_1000: calibration@1000 {
+                                               reg = <0x1000 0x440>;
+                                       };
+
+                                       cal_art_5000: calibration@5000 {
+                                               reg = <0x5000 0x440>;
+                                       };
+                               };
                        };
                };
        };
        wifi@0,0 {
                compatible = "pci168c,0033";
                reg = <0x0000 0 0 0 0>;
-               qca,no-eeprom;
+               nvmem-cells = <&cal_art_5000>;
+               nvmem-cell-names = "calibration";
        };
 };
 
 &wmac {
        status = "okay";
 
-       qca,no-eeprom;
+       nvmem-cells = <&cal_art_1000>;
+       nvmem-cell-names = "calibration";
 };
index 49398a2cd633cf83ce4b20b911ffabb7653a6de8..0a98a8ef8cd647bf54cb4d3813f85df013da8a8b 100644 (file)
@@ -24,11 +24,6 @@ case "$FIRMWARE" in
                caldata_extract "art" 0x1000 0x440
                ath9k_patch_mac $(mtd_get_mac_text "mac" 0x4)
                ;;
-       wd,mynet-n600|\
-       wd,mynet-n750)
-               caldata_extract "art" 0x1000 0x440
-               ath9k_patch_mac $(mtd_get_mac_ascii devdata "wlan24mac")
-               ;;
        engenius,ecb1200|\
        engenius,ecb1750)
                caldata_extract "art" 0x1000 0x440
@@ -80,11 +75,6 @@ case "$FIRMWARE" in
        ubnt,rocket-m)
                caldata_extract "art" 0x1000 0x1000
                ;;
-       wd,mynet-n600|\
-       wd,mynet-n750)
-               caldata_extract "art" 0x5000 0x440
-               ath9k_patch_mac $(mtd_get_mac_ascii devdata "wlan5mac")
-               ;;
        wd,mynet-wifi-rangeextender)
                caldata_extract "art" 0x1000 0x440
                ath9k_patch_mac $(nvram get wl0_hwaddr)
index e667e1179263bc40336df0bc1c10d16eee8a3711..c4ae1c46b9534c48d54023d6235931b8f9ed67e6 100644 (file)
@@ -120,6 +120,13 @@ case "$board" in
                [ "$PHYNBR" -eq 1 ] && \
                        macaddr_add $base_mac 1 > /sys${DEVPATH}/macaddress
                ;;
+       wd,mynet-n600|\
+       wd,mynet-n750)
+               [ "$PHYNBR" -eq 0 ] && \
+                       mtd_get_mac_ascii devdata wlan24mac > /sys${DEVPATH}/macaddress
+               [ "$PHYNBR" -eq 1 ] && \
+                       mtd_get_mac_ascii devdata wlan5mac > /sys${DEVPATH}/macaddress
+               ;;
        zyxel,nwa1123-ac)
                [ "$PHYNBR" -eq 0 ] && \
                        mtd_get_mac_text mib0 0x66 > /sys${DEVPATH}/macaddress