realtek: add reset button for D-Link DGS-1210-28
authorLuiz Angelo Daros de Luca <luizluca@gmail.com>
Wed, 1 Jun 2022 20:20:08 +0000 (17:20 -0300)
committerSander Vanheule <sander@svanheule.net>
Tue, 7 Jun 2022 15:11:28 +0000 (17:11 +0200)
Tested in a DGS-1210-28 F3, both triggering failsafe and reboot.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-28.dts

index edd4fb140f6aa720439d122b8c7c2a1d5b778f1e..bf25140e971111f01f2b8113df3d93f7d94a78c9 100644 (file)
@@ -5,6 +5,24 @@
 / {
        compatible = "d-link,dgs-1210-28", "realtek,rtl838x-soc";
        model = "D-Link DGS-1210-28";
+
+       keys {
+               compatible = "gpio-keys-polled";
+               poll-interval = <20>;
+
+               reset {
+                       label = "reset";
+                       gpios = <&gpio1 33 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_RESTART>;
+               };
+       };
+
+       gpio1: rtl8231-gpio {
+               compatible = "realtek,rtl8231-gpio";
+               #gpio-cells = <2>;
+               gpio-controller;
+               indirect-access-bus-id = <0>;
+       };
 };
 
 &ethernet0 {