[PATCH 21.02 2/2] ramips: fix GB-PC1 and GB-PC2 LEDs

Arınç ÜNAL arinc.unal at arinc9.com
Wed Sep 14 09:01:28 PDT 2022


Add the missing LEDs for GB-PC2. Some of these LEDs don't exist on the
device schematics. Tests on a GB-PC2 by me and Petr proved otherwise.

Remove ethblack-green and ethblue-green LEDs for GB-PC1. They are wired to
the switch pins and have their own function for link state and activity.

Set ethyellow-orange to display link state and activity of the ethyellow
interface for GB-PC2.

Link: https://github.com/ngiger/GnuBee_Docs/blob/master/GB-PCx/Documents/GB-PC2_V1.1_schematic.pdf
Tested-by: Petr Louda <petr.louda at outlook.cz>
Signed-off-by: Arınç ÜNAL <arinc.unal at arinc9.com>
---
 .../linux/ramips/dts/mt7621_gnubee_gb-pc1.dts  | 10 ----------
 .../linux/ramips/dts/mt7621_gnubee_gb-pc2.dts  | 18 ++++++++++++++----
 .../mt7621/base-files/etc/board.d/01_leds      |  4 +---
 3 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts
index 28601445e5..5910f112f6 100644
--- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts
+++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts
@@ -27,16 +27,6 @@
 	leds {
 		compatible = "gpio-leds";
 
-		ethblack_act {
-			label = "green:ethblack_act";
-			gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
-		};
-
-		ethblue_act {
-			label = "green:ethblue_act";
-			gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
-		};
-
 		power {
 			label = "green:power";
 			gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts
index c25ca886ae..8d0eaee1d4 100644
--- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts
+++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts
@@ -27,16 +27,26 @@
 	leds {
 		compatible = "gpio-leds";
 
-		ethblack_act {
-			label = "green:ethblack_act";
+		ethblack-green {
+			label = "green:ethblack";
 			gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
 		};
 
-		ethblue_act {
-			label = "green:ethblue_act";
+		ethblue-green {
+			label = "green:ethblue";
 			gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
 		};
 
+		ethyellow-green {
+			label = "green:ethyellow";
+			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+		};
+
+		ethyellow-orange {
+			label = "orange:ethyellow";
+			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+		};
+
 		power {
 			label = "green:power";
 			gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
index 5234a773ef..d9df98c63f 100755
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
@@ -42,10 +42,8 @@ dlink,dir-882-a1|\
 dlink,dir-882-r1)
 	ucidef_set_led_netdev "wan" "wan" "green:net" "wan"
 	;;
-gnubee,gb-pc1|\
 gnubee,gb-pc2)
-	ucidef_set_led_netdev "ethblack_act" "ethblack act" "green:ethblack_act" "ethblack" "tx rx"
-	ucidef_set_led_netdev "ethblue_act" "ethblue act" "green:ethblue_act" "ethblue" "tx rx"
+	ucidef_set_led_netdev "ethyellow" "ethyellow" "orange:ethyellow" "ethyellow" "link tx rx"
 	;;
 linksys,e5600)
 	ucidef_set_led_netdev "wan" "wan link" "blue:wan" "wan" "link"
-- 
2.34.1




More information about the openwrt-devel mailing list