]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ath79: qca953x: use led-sources for WMAC
authorRosen Penev <rosenp@gmail.com>
Sat, 24 May 2025 23:02:54 +0000 (16:02 -0700)
committerRobert Marko <robimarko@gmail.com>
Thu, 7 May 2026 16:22:00 +0000 (18:22 +0200)
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.

It's also a bit funny matching against phy0 and phy1 when both differ
between ath9k and ath10k.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23191
Signed-off-by: Robert Marko <robimarko@gmail.com>
27 files changed:
target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts
target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts
target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts
target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi
target/linux/ath79/dts/qca9531_glinet_gl-x300b.dts
target/linux/ath79/dts/qca9531_glinet_gl-xe300.dts
target/linux/ath79/dts/qca9531_qxwlan_e600g-v2-16m.dts
target/linux/ath79/dts/qca9531_qxwlan_e600g-v2-8m.dts
target/linux/ath79/dts/qca9531_telco_t1.dts
target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts
target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts
target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts
target/linux/ath79/dts/qca9533_comfast_cf-e110n-v2.dts
target/linux/ath79/dts/qca9533_kuwfi_c910.dts
target/linux/ath79/dts/qca9533_mikrotik_routerboard-lhg-hb.dtsi
target/linux/ath79/dts/qca9533_mikrotik_routerboard-mapl-2nd.dts
target/linux/ath79/dts/qca9533_mikrotik_routerboard-wap-2nd.dts
target/linux/ath79/dts/qca9533_mikrotik_routerboard-wapr-2nd.dts
target/linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi
target/linux/ath79/dts/qca9533_qca_ap143.dtsi
target/linux/ath79/dts/qca9533_tplink_tl-wa801nd.dtsi
target/linux/ath79/dts/qca9533_tplink_tl-wa850re-v2.dts
target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi
target/linux/ath79/dts/qca9533_tplink_tl-wr841hp-v3.dts
target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts
target/linux/ath79/dts/qca9533_yuncore_a930.dts
target/linux/ath79/dts/qca9533_yuncore_cpe830.dts

index ca44106ba0d19266f33e3a258b26cc1c531c6c0e..0517a455f48c0c4461c54d3911e920b4f3fee18b 100644 (file)
                        color = <LED_COLOR_ID_BLUE>;
                        gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
                };
-
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_BLUE>;
-                       gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
        };
 
        watchdog {
 
        nvmem-cells = <&macaddr_art_0 10>, <&cal_art_1000>;
        nvmem-cell-names = "mac-address", "calibration";
+
+       led {
+               led-sources = <0>;
+               led-active-low;
+       };
 };
index b5dcab0b029f41ea00116e0de995ada8d6420682..8e24c7a982f236d3087aafe7d07589fffe353ece 100644 (file)
                        color = <LED_COLOR_ID_BLUE>;
                        gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
                };
-
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_BLUE>;
-                       gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
        };
 
        keys {
 
        nvmem-cells = <&macaddr_art_0 3>, <&cal_art_1000>;
        nvmem-cell-names = "mac-address", "calibration";
+
+       led {
+               led-sources = <14>;
+               led-active-low;
+       };
 };
index f83618aface5750fdf605ff27c101f09f4aac207..fdb95dedf65f0f4fc119fa0694128667e0105cd3 100644 (file)
@@ -27,9 +27,3 @@
        function = LED_FUNCTION_STATUS;
        color = <LED_COLOR_ID_RED>;
 };
-
-&led_wlan {
-       function = LED_FUNCTION_WLAN;
-       color = <LED_COLOR_ID_GREEN>;
-};
-
index 3084baa1e6228da957297651848c9b5a886aec57..af00dc5b8db289c5e9c01d9b998d7178961d4c28 100644 (file)
                        color = <LED_COLOR_ID_GREEN>;
                        gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
                };
-
-               led_wlan: wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_RED>;
-                       gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
        };
 
        i2c: i2c {
 
        nvmem-cells = <&cal_art_1000>;
        nvmem-cell-names = "calibration";
+
+       led {
+               led-sources = <14>;
+               led-active-low;
+       };
 };
 
 &pinmux {
index 51351554724605df3970dc8dec800d5bf380e9e9..9f969a461339babfe025cf819541d95223791554 100644 (file)
        leds {
                compatible = "gpio-leds";
 
-               wlan2g {
-                       label = "green:wlan2g";
-                       gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                wan {
                        function = LED_FUNCTION_WAN;
                        color = <LED_COLOR_ID_GREEN>;
 
        nvmem-cells = <&cal_art_1000>;
        nvmem-cell-names = "calibration";
+
+       led {
+               led-sources = <4>;
+               led-active-low;
+       };
 };
index ae80e30000cc754de55d9451f041046fb911ef13..c855f70f991250e01c945ddb8295d6171b460303 100644 (file)
                        color = <LED_COLOR_ID_GREEN>;
                };
 
-               wlan {
-                       gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_GREEN>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                lte {
                        gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
                        label = "green:lte";
 
        nvmem-cells = <&cal_art_1000>;
        nvmem-cell-names = "calibration";
+
+       led {
+               led-sources = <12>;
+               led-active-low;
+       };
 };
index c3c313f3c67eda19fad5ed0a822659bd6ae93ef4..75e8a9fa807c32e719b4a59ea1eb7d0f92f88938 100644 (file)
@@ -9,15 +9,6 @@
        compatible = "qxwlan,e600g-v2-16m", "qca,qca9531";
 };
 
-&leds {
-       wlan {
-               function = LED_FUNCTION_WLAN;
-               color = <LED_COLOR_ID_BLUE>;
-               gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
-               linux,default-trigger = "phy0tpt";
-       };
-};
-
 &partitions {
        partition@70000 {
                compatible = "denx,uimage";
        };
 };
 
+&wmac {
+       led {
+               led-sources = <4>;
+               led-active-low;
+       };
+};
+
 &pcie0 {
        /delete-node/ wifi@0,0;
 };
index c417a8ff4cbb6a1ff769a66fdca7495f0ff6f682..7f2b8eed4e730b78747d472f2b527ed4e0e182ab 100644 (file)
@@ -9,15 +9,6 @@
        compatible = "qxwlan,e600g-v2-8m", "qca,qca9531";
 };
 
-&leds {
-       wlan {
-               function = LED_FUNCTION_WLAN;
-               color = <LED_COLOR_ID_BLUE>;
-               gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
-               linux,default-trigger = "phy0tpt";
-       };
-};
-
 &partitions {
        partition@70000 {
                compatible = "denx,uimage";
        };
 };
 
+&wmac {
+       led {
+               led-sources = <4>;
+               led-active-low;
+       };
+};
+
 &pcie0 {
        /delete-node/ wifi@0,0;
 };
index 1cb40b3aaea841a95b10009dad64054cb2e9610b..af41dd66a5088a56cbc203312cd8fa5a61512d00 100644 (file)
                        gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
                };
 
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_BLUE>;
-                       gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                led_rssi0: rssi0 {
                        label = "blue:rssi0";
                        gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
 
        nvmem-cells = <&cal_art_1000>;
        nvmem-cell-names = "calibration";
+
+       led {
+               led-sources = <0>;
+               led-active-low;
+       };
 };
 
 &pinmux {
index ca005d372215a1f970cb89cd3e6dde2bffa80fa8..89bd3b105d106144a626bf7a28818b053d835cf3 100644 (file)
                        gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
                };
 
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_GREEN>;
-                       gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                usb {
                        function = LED_FUNCTION_USB;
                        color = <LED_COLOR_ID_GREEN>;
 
        nvmem-cells = <&macaddr_uboot_1fc00 0>, <&cal_art_1000>;
        nvmem-cell-names = "mac-address", "calibration";
+
+       led {
+               led-sources = <6>;
+               led-active-low;
+       };
 };
 
 &usb0 {
index 0d8654b18ca8e90ca6a9f3bea9b35588b4309d52..e48eccdbcdd2d39fbc68c04373feb18d54234d62 100644 (file)
                        gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
                };
 
-               /* D3 */
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_WHITE>;
-                       gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                /* D2 */
                led_power: power {
                        function = LED_FUNCTION_POWER;
 
        nvmem-cells = <&macaddr_uboot_1fc00 0>, <&cal_art_1000>;
        nvmem-cell-names = "mac-address", "calibration";
+
+       led {
+               led-sources = <11>;
+       };
 };
 
 &usb0 {
index 5acd59595b07ea0f8340c6578435272efb355920..99bf4ead1adcfe2dc42b05e251db01a5fb4aed42 100644 (file)
                        gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
                };
 
-               wlan2g {
-                       label = "green:wlan2g";
-                       gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                usb {
                        function = LED_FUNCTION_USB;
                        color = <LED_COLOR_ID_GREEN>;
 
        nvmem-cells = <&macaddr_info_8 0>, <&cal_art_1000>;
        nvmem-cell-names = "mac-address", "calibration";
+
+       led {
+               led-sources = <11>;
+               led-active-low;
+       };
 };
 
 &pcie0 {
index 8331ec72470fc6e8027fd425de0ed244e5ef5094..51e4853c70dc8ff220994eb7a5340887e7a47274 100644 (file)
                };
        };
 
-       ath9k-leds {
-               compatible = "gpio-leds";
-
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_GREEN>;
-                       gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-       };
-
        keys {
                compatible = "gpio-keys";
 
 
        nvmem-cells = <&macaddr_art_6>, <&cal_art_1000>;
        nvmem-cell-names = "mac-address", "calibration";
+
+       led {
+               led-sources = <0>;
+               led-active-low;
+       };
 };
index b1d40ddc05b0857a71bd63dfe155804ce1591b7f..f3648f26c44f5534679b36bf77920ca44ce8eb10 100644 (file)
                        gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
                };
 
-               wifi {
-                       label = "white:wifi";
-                       gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                internet_green {
                        label = "green:internet";
                        gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
 
        nvmem-cells = <&calibration_art_1000>;
        nvmem-cell-names = "calibration";
+
+       led {
+               led-sources = <2>;
+               led-active-low;
+       };
 };
index a65c4fd8ed4c205837e11e33e061a342da3108cf..56af08cd6d8972ccb1434167e1dd4992fb255431 100644 (file)
                        gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
                };
 
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_GREEN>;
-                       gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                rssilow {
                        label = "green:rssilow";
                        gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
        status = "okay";
 
        qca,no-eeprom;
+
+       led {
+               led-sources = <11>;
+               led-active-low;
+       };
 };
 
 &eth0 {
index 8d18df8abbdcfdb863c4b053945c0033af51f713..6f495ea0dfb9c36a1d171d545a1eeb5716ae6879 100644 (file)
                        gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
                };
 
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_GREEN>;
-                       gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                led_user: user {
                        label = "green:user";
                        gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
        status = "okay";
 
        qca,no-eeprom;
+
+       led {
+               led-sources = <11>;
+       };
 };
 
 &eth0 {
index 10841591b5deea0edf249c460779252f6df8fa21..2a88324d5e1e245b53fdc86799f51fd62b98f4fe 100644 (file)
                        gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
                };
 
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_GREEN>;
-                       gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                led_user: user {
                        label = "green:user";
                        gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
        status = "okay";
 
        qca,no-eeprom;
+
+       led {
+               led-sources = <11>;
+               led-active-low;
+       };
 };
 
 &eth0 {
index 942030e4c9a6f3182366652e37c0bf27ac062600..1fa1507bb4071c31bbe45f5f9e37d30a8d5163ac 100644 (file)
                        label = "green:rssihigh";
                        gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
                };
-
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_GREEN>;
-                       gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
-                       linux,default-trigger = "phy0tpt";
-               };
        };
 
        gpio-export {
        status = "okay";
 
        qca,no-eeprom;
+
+       led {
+               led-sources = <14>;
+       };
 };
 
 &eth0 {
index 28737c9e96aa84ee343fb960b2fa7f4fad93752d..059c9de4c132b858cd2cd47e9ca4d25d36c0dfcf 100644 (file)
                        default-state = "on";
                };
 
-               wifi_green {
-                       label = "green:wifi";
-                       gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                wifi_yellow {
                        label = "yellow:wifi";
                        gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
 
        nvmem-cells = <&macaddr_art_0 2>, <&cal_art_1000>;
        nvmem-cell-names = "mac-address", "calibration";
+
+       led {
+               led-sources = <2>;
+               led-active-low;
+       };
 };
index e7cb1f605d7601131044c32707f394c3c77097f1..1b2e8982e9ab566712bd3a938664753764656fd9 100644 (file)
                        gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
                };
 
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_GREEN>;
-                       gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                lan1 {
                        label = "green:lan1";
                        gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
 
 &wmac {
        status = "okay";
+
+       led {
+               led-sources = <12>;
+               led-active-low;
+       };
 };
 
 &usb0 {
index 377c37cc20151ee4b4f3b494348cb36180a33c28..2d65bfcb1473d56c63c569a0f8c1b209f1ef8025 100644 (file)
                        gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
                };
 
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_GREEN>;
-                       gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                led_system: system {
                        label = "green:system";
                        gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 
        nvmem-cells = <&macaddr_uboot_1fc00>, <&cal_art_1000>;
        nvmem-cell-names = "mac-address", "calibration";
+
+       led {
+               led-sources = <12>;
+               led-active-low;
+       };
 };
index bec3a47aa075154d2c0e7ed340022cdb91a912b9..4410ae33f5db21ef365bb0651eefb741d9763c48 100644 (file)
                        label = "blue:signal5";
                        gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
                };
-
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_BLUE>;
-                       gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
        };
 
        keys {
 
        nvmem-cells = <&macaddr_info_8>, <&cal_art_1000>;
        nvmem-cell-names = "mac-address", "calibration";
+
+       led {
+               led-sources = <13>;
+               led-active-low;
+       };
 };
index 29633865b67bc6696ab141808bd812ff598e73fd..715c879d1d2d56a4dcaedbb2e7f05860869ac956 100644 (file)
        leds: leds {
                compatible = "gpio-leds";
 
-               wifi {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_GREEN>;
-                       gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                led_qss: qss {
                        label = "green:qss";
                        gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
 
        nvmem-cells = <&macaddr_uboot_1fc00 0>, <&cal_art_1000>;
        nvmem-cell-names = "mac-address", "calibration";
+
+       led {
+               led-sources = <13>;
+               led-active-low;
+       };
 };
index c931e626072d0b55a7deed46d72211d2fb8eb136..1314d6a12eaf3a0a5dd84b17305d69b1b6685039 100644 (file)
        leds {
                compatible = "gpio-leds";
 
-               wifi {
-                       label = "green:wifi";
-                       gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                led_power: power {
                        function = LED_FUNCTION_POWER;
                        color = <LED_COLOR_ID_GREEN>;
 
        nvmem-cells = <&macaddr_uboot_1fc00 0>, <&cal_art_1000>;
        nvmem-cell-names = "mac-address", "calibration";
+
+       led {
+               led-sources = <15>;
+               led-active-low;
+       };
 };
index 59863fd52c0a3c840886bb84a9b230010b7a2b13..f56c4e11643c2a952d7dea70a3dfc0201d85a9c0 100644 (file)
                        default-state = "on";
                };
 
-               wifi {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_GREEN>;
-                       gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                qss {
                        label = "green:qss";
                        gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
 
        nvmem-cells = <&macaddr_uboot_1fc00 0>, <&cal_art_1000>;
        nvmem-cell-names = "mac-address", "calibration";
+
+       led {
+               led-sources = <3>;
+               led-active-low;
+       };
 };
index 518d88e62c282e7c223b9d37ed126acb4f59f5c6..c20712e8cb0cecfb4830ce025206f37a6df35e69 100644 (file)
                        gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
                        default-state = "keep";
                };
-
-               wlan2g {
-                       label = "blue:wlan2g";
-                       gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
        };
 };
 
 
        nvmem-cells = <&cal_art_1000>;
        nvmem-cell-names = "calibration";
+
+       led {
+               led-sources = <13>;
+               led-active-low;
+       };
 };
index 31b0f2c6105b7b3578d9999f7d1bd84ba1eb367e..de1a9b135e7c5ce8aa57da7c26a165a590da3984 100644 (file)
                        default-state = "on";
                };
 
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_GREEN>;
-                       gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
                link1 {
                        label = "green:signal0";
                        color = <LED_COLOR_ID_GREEN>;
        status = "okay";
        nvmem-cells = <&cal_art_1000>;
        nvmem-cell-names = "calibration";
+
+       led {
+               led-sources = <12>;
+       };
 };