[PATCH] realtek: update GPIO bindings for DGS-1210-10P

Jan-Niklas Burfeind git at aiyionpri.me
Fri Dec 2 05:55:16 PST 2022


add three missing LEDs
 - PoE-Max
 - Link/Act
 - PoE

add two missing buttons
 - mode
 - reset

The last was dropped in
commit 61a3d0075b15 ("realtek: update GPIO bindings in the dts files in dts-5.10")

Signed-off-by: Jan-Niklas Burfeind <git at aiyionpri.me>
---
Hello everyone,
I just tested the missing GPIO assignments for the DGS-12-10-10P
and verified the three LEDs as well as the reset button are working.

The mode button should work, as its adress is 481 compared to resets
484, but I haven't found a way to test it yet.

Thanks
Jan-Niklas Burfeind

 .../dts-5.10/rtl8382_d-link_dgs-1210-10p.dts  | 30 ++++++++++++++++---
 1 file changed, 26 insertions(+), 4 deletions(-)

diff --git a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-10p.dts b/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-10p.dts
index 7ab37aaa9f..16934ede3b 100644
--- a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-10p.dts
+++ b/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-10p.dts
@@ -11,12 +11,34 @@
 		compatible = "gpio-keys-polled";
 		poll-interval = <20>;
 
-		/* is this pin 30 on the external RTL8231 (&gpio1)? */
-		/*mode {
+		mode {
+			label = "mode";
+			gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_LIGHTS_TOGGLE>;
+		};
+
+		reset {
 			label = "reset";
-			gpios = <&gpio0 94 GPIO_ACTIVE_LOW>;
+			gpios = <&gpio1 33 GPIO_ACTIVE_LOW>;
 			linux,code = <KEY_RESTART>;
-		};*/
+		};
+	};
+
+	leds {
+		link_act {
+			label = "green:link_act";
+			gpios = <&gpio1 28 GPIO_ACTIVE_LOW>;
+		};
+
+		poe {
+			label = "green:poe";
+			gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;
+		};
+
+		poe_max {
+			label = "yellow:poe_max";
+			gpios = <&gpio1 27 GPIO_ACTIVE_LOW>;
+		};
 	};
 
 	gpio1: rtl8231-gpio {
-- 
2.38.1




More information about the openwrt-devel mailing list