ath79: convert pcie gpios to led-sources
authorRosen Penev <[email protected]>
Fri, 28 Nov 2025 02:31:52 +0000 (18:31 -0800)
committerHauke Mehrtens <[email protected]>
Sun, 30 Nov 2025 18:06:13 +0000 (19:06 +0100)
Simpler dts.

Signed-off-by: Rosen Penev <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/19860
Signed-off-by: Hauke Mehrtens <[email protected]>
target/linux/ath79/dts/ar7161_aruba_ap-105.dts
target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
target/linux/ath79/dts/ar7161_netgear_wndap360.dts
target/linux/ath79/dts/ar7240_dlink_dir-615-e4.dts
target/linux/ath79/dts/ar7240_tplink.dtsi
target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts

index 5e727596439d3fa9cdd4f091cdf6316ecd2cbff3..2d295ff3fb336a7a4d625f29067a4856742f3ab5 100644 (file)
                };
        };
 
-       ath9k-leds {
-               compatible = "gpio-leds";
-
-               wifi_2g_green {
-                       label = "green:wlan2g";
-                       gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
-               wifi_5g_green {
-                       label = "green:wlan5g";
-                       gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy1tpt";
-               };
-       };
-
        keys {
                compatible = "gpio-keys";
 
 &pcie0 {
        status = "okay";
 
-       ath9k0: wifi@11,0 { /* 2.4 GHz */
+       wifi@11,0 { /* 2.4 GHz */
                compatible = "pci168c,0029";
+               reg = <0x8800 0 0 0 0>;
                nvmem-cells = <&macaddr_hwinfo_1c 1>;
                nvmem-cell-names = "mac-address";
-               reg = <0x8800 0 0 0 0>;
-               #gpio-cells = <2>;
-               gpio-controller;
+
+               led {
+                       led-sources = <5>;
+                       led-active-low;
+               };
        };
 
-       ath9k1: wifi@12,0 { /* 5 GHz */
+       wifi@12,0 { /* 5 GHz */
                compatible = "pci168c,0029";
+               reg = <0x9000 0 0 0 0>;
                nvmem-cells = <&macaddr_hwinfo_1c 2>;
                nvmem-cell-names = "mac-address";
-               reg = <0x9000 0 0 0 0>;
-               #gpio-cells = <2>;
-               gpio-controller;
+
+               led {
+                       led-sources = <5>;
+                       led-active-low;
+               };
        };
 };
 
index e6d2db57c080b5026880ede158f0d6bfdefc6867..0363f0e49b2e3d10ac9aabb137a9c66df63bb214 100644 (file)
                };
        };
 
-       ath9k-leds {
-               compatible = "gpio-leds";
-
-               wlan2g {
-                       label = "blue:wlan2g";
-                       gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
-               wlan5g {
-                       label = "blue:wlan5g";
-                       gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy1tpt";
-               };
-       };
-
        keys {
                compatible = "gpio-keys";
 
                reg = <0x8800 0 0 0 0>;
                nvmem-cells = <&macaddr_lan 0>, <&cal_art_1000>;
                nvmem-cell-names = "mac-address", "calibration";
-               #gpio-cells = <2>;
-               gpio-controller;
+
+               led {
+                       led-sources = <5>;
+                       led-active-low;
+               };
        };
 
        ath9k1: wifi@12,0 {
                reg = <0x9000 0 0 0 0>;
                nvmem-cells = <&macaddr_wan 1>, <&cal_art_5000>;
                nvmem-cell-names = "mac-address", "calibration";
-               #gpio-cells = <2>;
-               gpio-controller;
+
+               led {
+                       led-sources = <5>;
+                       led-active-low;
+               };
        };
 };
 
index 2acdba1c86de5aa0cef1702f00186477adf8d98a..b0efc07e083db2c872f9ea65a80183e3077f2a18 100644 (file)
                };
        };
 
-       ath9k-leds {
-               compatible = "gpio-leds";
-
-               wifi_2g_green {
-                       label = "green:wlan2g";
-                       gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-
-               wifi_5g_green {
-                       label = "green:wlan5g";
-                       gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy1tpt";
-               };
-       };
-
        keys {
                compatible = "gpio-keys";
 
 &pcie0 {
        status = "okay";
 
-       ath9k0: wifi@11,0 {
+       wifi@11,0 {
                compatible = "pci168c,0029";
                reg = <0x8800 0 0 0 0>;
                nvmem-cells = <&macaddr_art_120c>, <&calibration_art_1000>;
                nvmem-cell-names = "mac-address", "calibration";
-               #gpio-cells = <2>;
-               gpio-controller;
+
+               led {
+                       led-sources = <5>;
+                       led-active-low;
+               };
        };
 
-       ath9k1: wifi@12,0 {
+       wifi@12,0 {
                compatible = "pci168c,0029";
                reg = <0x9000 0 0 0 0>;
                nvmem-cells = <&macaddr_art_520c 1>, <&calibration_art_5000>;
                nvmem-cell-names = "mac-address", "calibration";
-               #gpio-cells = <2>;
-               gpio-controller;
+
+               led {
+                       led-sources = <5>;
+                       led-active-low;
+               };
        };
 };
index 18eb6f8c745d1c3ff33e2ac781058573d6fd10ba..52ef729512aa2808661bd48dbb35c77943308e4c 100644 (file)
                        gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
                };
        };
-
-       ath9k-leds {
-               compatible = "gpio-leds";
-
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_GREEN>;
-                       gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-       };
 };
 
 &spi {
 &pcie {
        status = "okay";
 
-       ath9k: wifi@0,0 {
+       wifi@0,0 {
                compatible = "pci168c,002e";
                reg = <0x0000 0 0 0 0>;
                nvmem-cells = <&cal_art_1000>;
                nvmem-cell-names = "calibration";
-               #gpio-cells = <2>;
-               gpio-controller;
+
+               led {
+                       led-sources = <1>;
+                       led-actice-low;
+               };
        };
 };
 
index 10256838b11bd40c48dd265e298168ede2c5aee7..0d9b2a5c1be303816ce6b2701ec4e973df219851 100644 (file)
                        gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
                };
        };
-
-       ath9k-leds {
-               compatible = "gpio-leds";
-
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_GREEN>;
-                       gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-       };
 };
 
 &spi {
                reg = <0x0000 0 0 0 0>;
                nvmem-cells = <&macaddr_uboot_1fc00 0>, <&calibration_art_1000>;
                nvmem-cell-names = "mac-address", "calibration";
-               #gpio-cells = <2>;
-               gpio-controller;
+
+               led {
+                       led-sources = <1>;
+                       led-active-low;
+               };
        };
 };
 
index 836901068875ecf52a49961b930b79ca692320db..b60731224a6d8dd0b8de7c26ecf73cf71c931e62 100644 (file)
                };
        };
 
-       ath9k-leds {
-               compatible = "gpio-leds";
-
-               wlan {
-                       function = LED_FUNCTION_WLAN;
-                       color = <LED_COLOR_ID_GREEN>;
-                       gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0tpt";
-               };
-       };
-
        gpio-export {
                compatible = "gpio-export";
 
        ath9k: wifi@0,0 {
                compatible = "pci168c,002e";
                reg = <0x0000 0 0 0 0>;
-               #gpio-cells = <2>;
-               gpio-controller;
                nvmem-cells = <&macaddr_uboot_1fc00 0>, <&cal_art_1000>;
                nvmem-cell-names = "mac-address", "calibration";
+
+               led {
+                       led-sources = <0>;
+                       led-active-low;
+               };
        };
 };