[openwrt/openwrt] ramips: improve pinctrl for Youku YK-L1

LEDE Commits lede-commits at lists.infradead.org
Tue Apr 19 05:55:51 PDT 2022


ynezz pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/55f8eb84d2e4a52186a9c6fa4ec67cf60fcb2977

commit 55f8eb84d2e4a52186a9c6fa4ec67cf60fcb2977
Author: Shiji Yang <yangshiji66 at qq.com>
AuthorDate: Sun Apr 4 11:55:41 2021 +0800

    ramips: improve pinctrl for Youku YK-L1
    
    1. rename led pin "air" to a more common name "wlan" and use "phy0tpt" to trigger it.
    2. led "wan" can be triggered by ethernet pinctrl by default so just drop it.
    
    Signed-off-by: Shiji Yang <yangshiji66 at qq.com>
    (cherry picked from commit 882a6116d3d6394dd109350287067accebbf6114)
---
 target/linux/ramips/dts/mt7620a_youku_yk1.dts            | 16 ++++------------
 .../linux/ramips/mt7620/base-files/etc/board.d/01_leds   |  4 ----
 2 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/target/linux/ramips/dts/mt7620a_youku_yk1.dts b/target/linux/ramips/dts/mt7620a_youku_yk1.dts
index 721b51db75..2e59e5bf6e 100644
--- a/target/linux/ramips/dts/mt7620a_youku_yk1.dts
+++ b/target/linux/ramips/dts/mt7620a_youku_yk1.dts
@@ -18,14 +18,10 @@
 	leds {
 		compatible = "gpio-leds";
 
-		wan {
-			label = "blue:wan";
-			gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
-		};
-
-		air {
-			label = "blue:air";
+		wlan {
+			label = "blue:wlan";
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy0tpt";
 		};
 
 		usb {
@@ -56,10 +52,6 @@
 	status = "okay";
 };
 
-&gpio2 {
-	status = "okay";
-};
-
 &gpio3 {
 	status = "okay";
 };
@@ -107,7 +99,7 @@
 
 &state_default {
 	default {
-		groups = "i2c", "rgmii1", "ephy", "wled";
+		groups = "i2c", "rgmii1", "wled";
 		function = "gpio";
 	};
 };
diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds
index 292f310d51..7c18b73a9a 100755
--- a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds
@@ -195,10 +195,6 @@ tplink,archer-mr200)
 tplink,re200-v1)
 	ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0"
 	;;
-youku,yk1)
-	ucidef_set_led_switch "wan" "wan" "blue:wan" "switch0" "0x10"
-	ucidef_set_led_netdev "wifi_led" "wifi" "blue:air" "wlan0"
-	;;
 zbtlink,zbt-ape522ii)
 	ucidef_set_led_netdev "wlan2g4" "wlan1-link" "green:wlan2g4" "wlan1"
 	ucidef_set_led_netdev "sys1" "wlan1" "green:sys1" "wlan1" "tx rx"




More information about the lede-commits mailing list