]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ath79: asus: convert to nvmem for calibration 20269/head
authorRosen Penev <rosenp@gmail.com>
Thu, 2 Oct 2025 03:07:37 +0000 (20:07 -0700)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 4 Oct 2025 18:46:19 +0000 (20:46 +0200)
Userspace handling is deprecated.

Also handle 2.4ghz LED in ath9k instead of generic.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20269
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ath79/dts/qca9531_asus_rp-ac51.dts
target/linux/ath79/dts/qca9563_asus_pl-ac56.dts
target/linux/ath79/dts/qca9563_asus_rp-ac66.dts
target/linux/ath79/generic/base-files/etc/board.d/01_leds
target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom

index b40b1406a387bd37adb9a20265a283bf20e6a3c0..a33a476407b563026ce3ff768a2445d5df2bb759 100644 (file)
                        gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
                };
 
-               wlan2g {
-                       label = "blue:wlan2g";
-                       gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
-               };
-
                wlan5g {
                        label = "blue:wlan5g";
                        gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
                                                reg = <0x0 0x6>;
                                        };
 
+                                       cal_art_1000: calibration@1000 {
+                                               reg = <0x1000 0x440>;
+                                       };
+
                                        macaddr_art_1002: macaddr@1002 {
                                                reg = <0x1002 0x6>;
                                        };
 &wmac {
        status = "okay";
 
-       qca,no-eeprom;
+       nvmem-cells = <&cal_art_1000>;
+       nvmem-cell-names = "calibration";
+
+       led {
+               led-sources = <16>;
+               led-active-low;
+       };
 };
index a48d14b1d7d966725669b774c7904c5f03175502..0d61a02ec50cc1a828913a450bfdb17ef6b9e258 100644 (file)
                        gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
                };
 
-               wlan2g {
-                       label = "green:wlan2g";
-                       gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
-               };
-
                wlan5g {
                        label = "green:wlan5g";
                        gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
                                        #address-cells = <1>;
                                        #size-cells = <1>;
 
+                                       cal_art_1000: calibration@1000 {
+                                               reg = <0x1000 0x440>;
+                                       };
+
                                        macaddr_art_1002: macaddr@1002 {
                                                reg = <0x1002 0x6>;
                                        };
 &wmac {
        status = "okay";
 
-       qca,no-eeprom;
+       nvmem-cells = <&cal_art_1000>;
+       nvmem-cell-names = "calibration";
+
+       led {
+               led-sources = <19>;
+               led-active-low;
+       };
 };
index 1b8f5acadf2e6f30441ae17a88e0275e39ddd018..4f00abf7e7dce20c2cf8aac401cbde09ece3c6a8 100644 (file)
                                        #address-cells = <1>;
                                        #size-cells = <1>;
 
+                                       cal_art_1000: calibration@1000 {
+                                               reg = <0x1000 0x440>;
+                                       };
+
                                        macaddr_art_1002: macaddr@1002 {
                                                reg = <0x1002 0x6>;
                                        };
 &wmac {
        status = "okay";
 
-       qca,no-eeprom;
+       nvmem-cells = <&cal_art_1000>;
+       nvmem-cell-names = "calibration";
 };
index 502b319bd1eb5f78a3af5fd7182183e0973992f8..870c2c322d965fa31d7fc7a086fefc6da3c09930 100644 (file)
@@ -81,12 +81,10 @@ alfa-network,tube-2hq)
        ;;
 asus,pl-ac56)
        ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x3e"
-       ucidef_set_led_netdev "wlan2g" "WLAN2G" "green:wlan2g" "wlan1" "link"
        ucidef_set_led_netdev "wlan5g" "WLAN5G" "green:wlan5g" "wlan0" "link"
        ;;
 asus,rp-ac51)
        ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0"
-       ucidef_set_led_netdev "wlan2g" "WLAN2G" "blue:wlan2G" "wlan1" "link"
        ucidef_set_led_netdev "wlan5g" "WLAN5G" "blue:wlan5G" "wlan0" "link"
        ;;
 asus,rp-ac66)
index b04c9499f3e5c4e6e00a08bc2198e7db176b2552..078fbada572029f886fa2048ae98fb4d52501cb3 100644 (file)
@@ -9,11 +9,6 @@ board=$(board_name)
 case "$FIRMWARE" in
 "ath9k-eeprom-ahb-18100000.wmac.bin")
        case $board in
-       asus,pl-ac56|\
-       asus,rp-ac51|\
-       asus,rp-ac66)
-               caldata_extract "art" 0x1000 0x440
-               ;;
        avm,fritz1750e|\
        avm,fritz4020|\
        avm,fritz450e|\