[openwrt/openwrt] ath79: convert pcie gpios to led-sources

LEDE Commits lede-commits at lists.infradead.org
Sun Nov 30 10:06:49 PST 2025


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2f30e14c494c2d40e4e8c248fa8bd81e67a28478

commit 2f30e14c494c2d40e4e8c248fa8bd81e67a28478
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Thu Nov 27 18:31:52 2025 -0800

    ath79: convert pcie gpios to led-sources
    
    Simpler dts.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19860
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/ath79/dts/ar7161_aruba_ap-105.dts     | 38 ++++++++--------------
 target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts | 30 ++++++-----------
 target/linux/ath79/dts/ar7161_netgear_wndap360.dts | 34 +++++++------------
 target/linux/ath79/dts/ar7240_dlink_dir-615-e4.dts | 20 ++++--------
 target/linux/ath79/dts/ar7240_tplink.dtsi          | 18 +++-------
 .../linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts | 18 +++-------
 6 files changed, 52 insertions(+), 106 deletions(-)

diff --git a/target/linux/ath79/dts/ar7161_aruba_ap-105.dts b/target/linux/ath79/dts/ar7161_aruba_ap-105.dts
index 5e72759643..2d295ff3fb 100644
--- a/target/linux/ath79/dts/ar7161_aruba_ap-105.dts
+++ b/target/linux/ath79/dts/ar7161_aruba_ap-105.dts
@@ -49,22 +49,6 @@
 		};
 	};
 
-	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";
 
@@ -97,22 +81,28 @@
 &pcie0 {
 	status = "okay";
 
-	ath9k0: wifi at 11,0 { /* 2.4 GHz */
+	wifi at 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 at 12,0 { /* 5 GHz */
+	wifi at 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;
+		};
 	};
 };
 
diff --git a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
index e6d2db57c0..0363f0e49b 100644
--- a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
+++ b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
@@ -58,22 +58,6 @@
 		};
 	};
 
-	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";
 
@@ -146,8 +130,11 @@
 		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 at 12,0 {
@@ -155,8 +142,11 @@
 		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;
+		};
 	};
 };
 
diff --git a/target/linux/ath79/dts/ar7161_netgear_wndap360.dts b/target/linux/ath79/dts/ar7161_netgear_wndap360.dts
index 2acdba1c86..b0efc07e08 100644
--- a/target/linux/ath79/dts/ar7161_netgear_wndap360.dts
+++ b/target/linux/ath79/dts/ar7161_netgear_wndap360.dts
@@ -27,22 +27,6 @@
 		};
 	};
 
-	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";
 
@@ -149,21 +133,27 @@
 &pcie0 {
 	status = "okay";
 
-	ath9k0: wifi at 11,0 {
+	wifi at 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 at 12,0 {
+	wifi at 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;
+		};
 	};
 };
diff --git a/target/linux/ath79/dts/ar7240_dlink_dir-615-e4.dts b/target/linux/ath79/dts/ar7240_dlink_dir-615-e4.dts
index 18eb6f8c74..52ef729512 100644
--- a/target/linux/ath79/dts/ar7240_dlink_dir-615-e4.dts
+++ b/target/linux/ath79/dts/ar7240_dlink_dir-615-e4.dts
@@ -90,17 +90,6 @@
 			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 {
@@ -160,13 +149,16 @@
 &pcie {
 	status = "okay";
 
-	ath9k: wifi at 0,0 {
+	wifi at 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;
+		};
 	};
 };
 
diff --git a/target/linux/ath79/dts/ar7240_tplink.dtsi b/target/linux/ath79/dts/ar7240_tplink.dtsi
index 10256838b1..0d9b2a5c1b 100644
--- a/target/linux/ath79/dts/ar7240_tplink.dtsi
+++ b/target/linux/ath79/dts/ar7240_tplink.dtsi
@@ -49,17 +49,6 @@
 			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 {
@@ -128,8 +117,11 @@
 		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;
+		};
 	};
 };
 
diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts
index 8369010688..b60731224a 100644
--- a/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts
+++ b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts
@@ -57,17 +57,6 @@
 		};
 	};
 
-	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";
 
@@ -149,10 +138,13 @@
 	ath9k: wifi at 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;
+		};
 	};
 };
 




More information about the lede-commits mailing list