From 84ff47d524d8e5006916a0189e0358928d22347e Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Fri, 12 Dec 2025 16:07:42 -0800 Subject: [PATCH] ath79: convert phy0tpt to led-sources Makes it a lot clearer what phy1tpt is, especially since it differs between ath10k and ath9k. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/21004 Signed-off-by: Hauke Mehrtens --- .../linux/ath79/dts/ar7240_dlink_dir-615-e4.dts | 2 +- target/linux/ath79/dts/qca9556_avm_fritz450e.dts | 14 +++++++------- .../linux/ath79/dts/qca9558_dlink_dir-629-a1.dts | 16 +++++++--------- .../linux/ath79/dts/qca9563_rosinson_wr818.dts | 11 +++++------ .../ath79/dts/tp9343_tplink_tl-wa901nd.dtsi | 14 +++++++------- .../ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi | 14 +++++++------- .../ath79/dts/tp9343_tplink_tl-wr940n-v4.dts | 14 +++++++------- .../ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts | 11 +++++------ 8 files changed, 46 insertions(+), 50 deletions(-) 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 52ef729512..a38cbbacd9 100644 --- a/target/linux/ath79/dts/ar7240_dlink_dir-615-e4.dts +++ b/target/linux/ath79/dts/ar7240_dlink_dir-615-e4.dts @@ -157,7 +157,7 @@ led { led-sources = <1>; - led-actice-low; + led-active-low; }; }; }; diff --git a/target/linux/ath79/dts/qca9556_avm_fritz450e.dts b/target/linux/ath79/dts/qca9556_avm_fritz450e.dts index 9123ae34b2..5932aacb9b 100644 --- a/target/linux/ath79/dts/qca9556_avm_fritz450e.dts +++ b/target/linux/ath79/dts/qca9556_avm_fritz450e.dts @@ -26,13 +26,6 @@ gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; }; - wlan { - function = LED_FUNCTION_WLAN; - color = ; - gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - linux,default-trigger = "phy0tpt"; - }; - lan { function = LED_FUNCTION_LAN; color = ; @@ -79,3 +72,10 @@ line-name = "phy-reset"; }; }; + +&wmac { + led { + led-sources = <15>; + led-active-low; + }; +}; diff --git a/target/linux/ath79/dts/qca9558_dlink_dir-629-a1.dts b/target/linux/ath79/dts/qca9558_dlink_dir-629-a1.dts index 2d490dcf48..dc65700d6e 100644 --- a/target/linux/ath79/dts/qca9558_dlink_dir-629-a1.dts +++ b/target/linux/ath79/dts/qca9558_dlink_dir-629-a1.dts @@ -37,20 +37,13 @@ leds { compatible = "gpio-leds"; - led-0 { - color = ; - function = LED_FUNCTION_WLAN; - gpios = <&gpio 13 GPIO_ACTIVE_LOW>; - linux,default-trigger = "phy0tpt"; - }; - - led_power: led-1 { + led_power: led-0 { color = ; function = LED_FUNCTION_POWER; gpios = <&gpio 21 GPIO_ACTIVE_LOW>; }; - led-2 { + led-1 { color = ; function = LED_FUNCTION_WPS; gpios = <&gpio 23 GPIO_ACTIVE_LOW>; @@ -173,4 +166,9 @@ nvmem-cells = <&cal_art_1000>, <&macaddr_mfcdata_51 0>; nvmem-cell-names = "calibration", "mac-address"; + + led { + led-sources = <13>; + led-active-low; + }; }; diff --git a/target/linux/ath79/dts/qca9563_rosinson_wr818.dts b/target/linux/ath79/dts/qca9563_rosinson_wr818.dts index 0f07613d1f..522f9f956f 100644 --- a/target/linux/ath79/dts/qca9563_rosinson_wr818.dts +++ b/target/linux/ath79/dts/qca9563_rosinson_wr818.dts @@ -23,12 +23,6 @@ label = "red:system"; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; }; - - wifi_2g { - label = "red:wifi2g"; - gpios = <&gpio 19 GPIO_ACTIVE_LOW>; - linux,default-trigger = "phy0tpt"; - }; }; keys { @@ -137,6 +131,11 @@ nvmem-cells = <&cal_art_1000>; nvmem-cell-names = "calibration"; + + led { + led-sources = <19>; + led-active-low; + }; }; &usb_phy0 { diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wa901nd.dtsi b/target/linux/ath79/dts/tp9343_tplink_tl-wa901nd.dtsi index 1cf7461926..a1733a4f08 100644 --- a/target/linux/ath79/dts/tp9343_tplink_tl-wa901nd.dtsi +++ b/target/linux/ath79/dts/tp9343_tplink_tl-wa901nd.dtsi @@ -41,16 +41,16 @@ color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; - - wlan { - function = LED_FUNCTION_WLAN; - color = ; - gpios = <&gpio 8 GPIO_ACTIVE_LOW>; - linux,default-trigger = "phy0tpt"; - }; }; }; ð1 { compatible = "syscon", "simple-mfd"; }; + +&wmac { + led { + led-sources = <8>; + led-active-low; + }; +}; diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi index 7780e0172c..ac1ebd375d 100644 --- a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi +++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi @@ -26,13 +26,6 @@ gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; - wlan { - function = LED_FUNCTION_WLAN; - color = ; - gpios = <&gpio 8 GPIO_ACTIVE_LOW>; - linux,default-trigger = "phy0tpt"; - }; - wan_blue { function = LED_FUNCTION_WAN; color = ; @@ -71,3 +64,10 @@ nvmem-cells = <&macaddr_uboot_1fc00 (-1)>; nvmem-cell-names = "mac-address"; }; + +&wmac { + led { + led-sources = <8>; + led-active-low; + }; +}; diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v4.dts b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v4.dts index 549bf4fea4..54b398a212 100644 --- a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v4.dts +++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v4.dts @@ -29,13 +29,6 @@ gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; - wlan { - function = LED_FUNCTION_WLAN; - color = ; - gpios = <&gpio 7 GPIO_ACTIVE_LOW>; - linux,default-trigger = "phy0tpt"; - }; - wan_blue { function = LED_FUNCTION_WAN; color = ; @@ -74,3 +67,10 @@ nvmem-cells = <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "mac-address"; }; + +&wmac { + led { + led-sources = <7>; + led-active-low; + }; +}; diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts b/target/linux/ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts index 04aa4bc5f9..408ca0f380 100644 --- a/target/linux/ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts +++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts @@ -26,12 +26,6 @@ gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; - wifi { - label = "blue:wifi"; - gpios = <&gpio 8 GPIO_ACTIVE_LOW>; - linux,default-trigger = "phy0tpt"; - }; - led_power: power { function = LED_FUNCTION_POWER; color = ; @@ -180,4 +174,9 @@ nvmem-cells = <&macaddr_config_8 0>, <&cal_art_1000>; nvmem-cell-names = "mac-address", "calibration"; + + led { + led-sources = <8>; + led-active-low; + }; };