ramips: add missing reset button for Nexx WT1520
authorINAGAKI Hiroshi <musashino.open@gmail.com>
Sat, 25 Nov 2017 16:42:50 +0000 (01:42 +0900)
committerMathias Kresin <dev@kresin.me>
Mon, 27 Nov 2017 19:36:46 +0000 (20:36 +0100)
This commit adds missing the GPIO key used as reset button.
Nexx WT1520 has a GPIO key for factory reset, but it's not defined in
WT1520.dtsi and cannot use it.

Drop the UART (full) from the device tree source file, it was never
used for this board. Adjust the kernel bootargs accordingly.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[add note about dropped UART (full) to the commit message]
Signed-off-by: Mathias Kresin <dev@kresin.me>
target/linux/ramips/dts/WT1520.dtsi

index 4c889d1d1d89b4e196a26794c2ff5c4379272907..0586c2268446d03d445185fcda9f7a469982b3d5 100644 (file)
@@ -1,5 +1,8 @@
 #include "rt5350.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
 / {
        compatible = "NEXXWT1520", "ralink,rt5350-soc";
 
                reg = <0x0 0x2000000>;
        };
 
-       chosen {
-               bootargs = "console=ttyS1,57600";
-       };
-};
+       gpio-keys-polled {
+               compatible = "gpio-keys-polled";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               poll-interval = <20>;
 
-&uart {
-       pinctrl-names = "default";
-       pinctrl-0 = <&uartf_pins>;
-       status = "okay";
+               reset {
+                       label = "reset";
+                       gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_RESTART>;
+               };
+       };
 };
 
 &pinctrl {
        state_default: pinctrl0 {
                gpio {
-                       ralink,group = "jtag";
+                       ralink,group = "jtag", "uartf";
                        ralink,function = "gpio";
                };
        };