ath79: ar9344: use led-sources for ath9k
authorRosen Penev <[email protected]>
Sun, 25 May 2025 21:20:28 +0000 (14:20 -0700)
committerHauke Mehrtens <[email protected]>
Sun, 30 Nov 2025 22:54:06 +0000 (23:54 +0100)
The ath9k driver creates an ath9k LED by default. Instead of having a
non functional LED, configure it properly and remove the extra as it's
not needed.

Signed-off-by: Rosen Penev <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/19865
Signed-off-by: Hauke Mehrtens <[email protected]>
19 files changed:
target/linux/ath79/dts/ar9344_alfa-network_n5q.dts
target/linux/ath79/dts/ar9344_comfast_cf-e120a-v3.dts
target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi
target/linux/ath79/dts/ar9344_fortinet_fap-221-b.dts
target/linux/ath79/dts/ar9344_huawei_ap6010dn.dts
target/linux/ath79/dts/ar9344_longdata_aps256.dts
target/linux/ath79/dts/ar9344_mikrotik_routerboard-2011uias-2hnd.dts
target/linux/ath79/dts/ar9344_netgear_r6100.dts
target/linux/ath79/dts/ar9344_netgear_wndr.dtsi
target/linux/ath79/dts/ar9344_ocedo_raccoon.dts
target/linux/ath79/dts/ar9344_pcs_cap324.dts
target/linux/ath79/dts/ar9344_pcs_cr5000.dts
target/linux/ath79/dts/ar9344_qxwlan_e750x.dtsi
target/linux/ath79/dts/ar9344_samsung_wam250.dts
target/linux/ath79/dts/ar9344_senao_ap-dual.dtsi
target/linux/ath79/dts/ar9344_tplink_tl-wr841hp-v2.dts
target/linux/ath79/dts/ar9344_watchguard_ap100.dts
target/linux/ath79/dts/ar9344_watchguard_ap200.dts
target/linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts

index 483be077e31d28d025d9a4ade3670fc7847512f6..31d18d80ed3fce19d410532cd8fd62d6be2419c2 100644 (file)
                        label = "green:signal3";
                        gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
                };
-
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_GREEN>;
-                       gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
        };
 
        watchdog {
 
        nvmem-cells = <&cal_art_1000>;
        nvmem-cell-names = "calibration";
+
+       led {
+               led-sources = <12>;
+               led-active-low;
+
+       };
 };
index 0db71ea76530e259b071430e220246ace896ca79..967895aa92fb68eceed52cc8832595bf90568b1e 100644 (file)
                        gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
                };
 
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_GREEN>;
-                       gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                rssilow {
                        label = "red:rssilow";
                        gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 
        nvmem-cells = <&cal_art_1000>;
        nvmem-cell-names = "calibration";
+
+       led {
+               led-sources = <0>;
+               led-active-low;
+       };
 };
index 3043155261e2dbd6e014c08608ca45b4ff582d47..a9dac29940808e98acc8a4b8c9b0973cc2af1ba4 100644 (file)
        leds {
                compatible = "gpio-leds";
 
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_WHITE>;
-                       gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy1tpt";
-               };
-
                led_dlan_white: dlan_white {
                        label = "white:dlan";
                        gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 
        nvmem-cells = <&cal_art_1000>;
        nvmem-cell-names = "calibration";
+
+       led {
+               led-sources = <12>;
+               led-active-low;
+       };
 };
 
 &pcie {
index f97ca429558a4f56ffd36ed0827d31bc5580aaa8..babe89741f4d454d02e86ccdea67a9c360a4c961 100644 (file)
                        gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
                        linux,default-trigger = "phy0tpt";
                };
-
-               wifi2g {
-                       label = "amber:wifi2g";
-                       gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy1tpt";
-               };
        };
 
        virtual_flash {
 
        nvmem-cells = <&calibration_wmac>, <&macaddr_uboot_3ff80 1>;
        nvmem-cell-names = "calibration", "mac-address";
+
+       led {
+               led-sources = <19>;
+               led-active-low;
+       };
 };
 
 &art {
index 2f2e6e2331720cff60bf149cd5acb15edba53b8e..046dcb9284dc1a9f6b9989ad1d09fe5629adcc10 100644 (file)
 &pcie {
        status = "okay";
 
-       ath9k: wifi@0,0 {
+       wifi@0,0 {
                compatible = "pci168c,0033";
                reg = <0x0000 0 0 0 0>;
                gpio-controller;
index 4d92fcaa2754dfa4eaf1ab376b4e155616cee3f2..5c0ba9bde02882ba25518a585e45f34c2b500148 100644 (file)
        leds: leds {
                compatible = "gpio-leds";
 
-               wlan2g {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_BLUE>;
-                       gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                led_system: system {
                        function = LED_FUNCTION_STATUS;
                        color = <LED_COLOR_ID_BLUE>;
 
        nvmem-cells = <&cal_art_1000>;
        nvmem-cell-names = "calibration";
+
+       led {
+               led-sources = <13>;
+               led-active-low;
+       };
 };
 
 &gpio {
index 045f1a3aa097ae3df6a676a89ae5be8e10754844..57a973eaded20b94cf69e30416a2dd8c33a16624 100644 (file)
                los-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
                maximum-power-milliwatt = <1000>;
        };
-
-       leds {
-               compatible = "gpio-leds";
-
-               led-0 {
-                       color = <LED_COLOR_ID_GREEN>;
-                       function = LED_FUNCTION_WLAN_2GHZ;
-                       gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-       };
 };
 
 &ref {
        status = "okay";
 
        qca,no-eeprom;
+
+       led {
+               led-sources = <4>;
+               led-active-low;
+       };
 };
index 10998b73fcca18737e2fa70ffcec93d78a30534b..eaf6b64ba509223a5faa242cb15f876186a2a817 100644 (file)
                        color = <LED_COLOR_ID_GREEN>;
                        gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
                };
-
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_BLUE>;
-                       gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy1tpt";
-               };
        };
 };
 
 
        nvmem-cells = <&cal_ath9k>;
        nvmem-cell-names = "calibration";
+
+       led {
+               led-sources = <0>;
+               led-active-low;
+       };
 };
index 64ceb875d07cbd337b4075839687e957f1c70a74..cf81e4c311667951a31e1560981f88937df2aa8e 100644 (file)
                        default-state = "keep";
                };
 
-               wlan2g_green {
-                       label = "green:wlan2g";
-                       gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                wlan5g_blue {
                        label = "blue:wlan5g";
                        gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 
        nvmem-cells = <&macaddr_caldata_0>, <&cal_art_1000>;
        nvmem-cell-names = "mac-address", "calibration";
+
+       led {
+               led-sources = <11>;
+               led-active-low;
+       };
 };
 
 &pcie {
index d4ab23ed43ca38178498b08a5d2fc63aa06073ce..595334ca264be7facd515afc49669620f6a77b38 100644 (file)
                        default-state = "on";
                };
 
-               wlan2g {
-                       label = "yellow:wlan24";
-                       gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                led_system: system {
                        label = "blue:sys";
                        gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
                };
        };
 
-       ath9k-leds {
-               compatible = "gpio-leds";
-
-               wlan5g {
-                       label = "red:wlan5";
-                       gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy1tpt";
-               };
-       };
-
        keys {
                compatible = "gpio-keys";
 
 &pcie {
        status = "okay";
 
-       ath9k: wifi@0,0 {
+       wifi@0,0 {
                compatible = "pci168c,0030";
                reg = <0x0000 0 0 0 0>;
                nvmem-cells = <&macaddr_art_c>, <&calibration_art_5000>;
                nvmem-cell-names = "mac-address", "calibration";
-               #gpio-cells = <2>;
-               gpio-controller;
+
+               led {
+                       led-sources = <0>;
+                       led-active-low;
+               };
        };
 };
 
 
        nvmem-cells = <&macaddr_art_6>, <&calibration_art_1000>;
        nvmem-cell-names = "mac-address", "calibration";
+
+       led {
+               led-sources = <12>;
+               led-active-low;
+       };
 };
 
 &mdio0 {
index e03d0593ba2be3dabc5e058b05465afa3738084b..e93c7aceda3cf17dc6708f5978ee9128fe5b89bd 100644 (file)
                        linux,default-trigger = "phy1tpt";
                };
 
-               wlan_green {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_GREEN>;
-                       gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                lan_amber {
                        function = LED_FUNCTION_LAN;
                        color = <LED_COLOR_ID_AMBER>;
 &pcie {
        status = "okay";
 
-       ath9k: wifi@0,0 {
-               compatible = "168c,0030";
+       wifi@0,0 {
+               compatible = "pci168c,0030";
                reg = <0x0000 0 0 0 0>;
                nvmem-cells = <&macaddr_art_0 (-2)>, <&cal_art_5000>;
                nvmem-cell-names = "mac-address", "calibration";
        ieee80211-freq-limit = <4900000 5990000>;
        nvmem-cells = <&macaddr_art_0 (-1)>, <&cal_art_1000>;
        nvmem-cell-names = "mac-address", "calibration";
+
+       led {
+               led-sources = <18>;
+               led-active-low;
+       };
 };
 
 &mdio0 {
index 972febe2fd7596a3a2245d638c956a73c3080546..01bd56c0fc18cdc40329326317645ae9e6e28ff8 100644 (file)
                        default-state = "on";
                };
 
-               wlan2g {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_BLUE>;
-                       gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                wps_white {
                        function = LED_FUNCTION_WPS;
                        color = <LED_COLOR_ID_WHITE>;
 &pcie {
        status = "okay";
 
-       ath9k: wifi@0,0 {
+       wifi@0,0 {
                compatible = "pci168c,0030";
                reg = <0x0000 0 0 0 0>;
                nvmem-cells = <&macaddr_art_5002>;
 
        nvmem-cells = <&cal_art_1000>;
        nvmem-cell-names = "calibration";
+
+       led {
+               led-sources = <14>;
+               led-active-low;
+       };
 };
index 4707b754a3a03a64d88a76e816b5abd89707c195..7f840092f1aeea5a59b02d5fd457b3a63bdd9ce4 100644 (file)
                        label = "green:sig2";
                        gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
                };
-
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_GREEN>;
-                       gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
        };
 };
 
 
        nvmem-cells = <&cal_art_1000>;
        nvmem-cell-names = "calibration";
+
+       led {
+               led-sources = <21>;
+               led-active-low;
+       };
 };
index 6b66dbe0d45533264cc4f359d2922f986c8a7a59..e0e257951817950a868a8ed4329cc22c65f772af 100644 (file)
                        label = "white:repeater";
                        gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
                };
-
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_WHITE>;
-                       gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
        };
 };
 
 
        nvmem-cells = <&cal_art_1000>;
        nvmem-cell-names = "calibration";
+
+       led {
+               led-sources = <12>;
+               led-active-low;
+       };
 };
index f1d6ffda7c5cc9fcb9bf543e11807b5839578eb2..b64a552635c0bb3ca053db5ab6d02bec3ef74d1f 100644 (file)
                        linux,code = <KEY_RESTART>;
                };
        };
-
-       ath9k-leds {
-               compatible = "gpio-leds";
-
-               wifi2g {
-                       label = "blue:wifi2g";
-                       gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy1tpt";
-               };
-       };
 };
 
 &mdio0 {
 &pcie {
        status = "okay";
 
-       ath9k: wifi@0,0 {
+       wifi@0,0 {
                compatible = "pci168c,0030";
                reg = <0x0 0 0 0 0>;
                ieee80211-freq-limit = <2402000 2482000>;
-               #gpio-cells = <2>;
-               gpio-controller;
+
+               led {
+                       led-sources = <0>;
+                       led-active-low;
+               };
        };
 };
 
index 875406a4256410f92640f5123f299f3ea1f39e56..471fa6220b17281b2a9d30b26b6fce151c2f8d75 100644 (file)
                        gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
                };
 
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_GREEN>;
-                       gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                led_system: system {
                        label = "green:system";
                        gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
 
        nvmem-cells = <&macaddr_uboot_1fc00 0>, <&cal_art_1000>;
        nvmem-cell-names = "mac-address", "calibration";
+
+       led {
+               led-sources = <21>;
+               led-active-low;
+       };
 };
 
 &eth0 {
index 6f560166965c3878962bf9cb04aaaa8e0c2b061a..09626b93c1256ff1b28350566966b28577d1612a 100644 (file)
                        gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
                };
 
-               wifi_amber {
-                       label = "amber:wifi";
-                       gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy1tpt";
-               };
-
                wifi_green {
                        label = "green:wifi";
                        gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
 
        nvmem-cells = <&macaddr_art_0 (-2)>, <&calibration_art_1000>;
        nvmem-cell-names = "mac-address", "calibration";
+
+       led {
+               led-sources = <19>;
+               led-active-low;
+       };
 };
 
 &art {
index cb69bd9da96b88d71968dd1f87b4777a1d072241..8a05da966d53801dacb60a6f13c2e2d9f8e3c34d 100644 (file)
                        gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
                };
 
-               wifi_amber {
-                       label = "amber:wifi";
-                       gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy1tpt";
-               };
-
                wifi_green {
                        label = "green:wifi";
                        gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
 &wmac {
        nvmem-cells = <&macaddr_art_0 (-2)>, <&calibration_art_1000>;
        nvmem-cell-names = "mac-address", "calibration";
+
+       led {
+               led-sources = <19>;
+               led-active-low;
+       };
 };
 
 &art {
index 8c2b2582a3441abfa2687c6161fa25c5a91b4719..e933c0a31fdc8396f56999b828e74781fbd28a63 100644 (file)
                pinctrl-names = "default";
                pinctrl-0 = <&enable_gpio20_gpio22>;
 
-               wifi {
-                       label = "green:wifi";
-                       gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                lan1 {
                        label = "orange:lan1";
                        gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
 
        nvmem-cells = <&cal_art_1000>;
        nvmem-cell-names = "calibration";
+
+       led {
+               led-sources = <12>;
+               led-active-low;
+       };
 };
 
 &pinmux {