[source] ramips: add missing reset button for Nexx WT1520

LEDE Commits lede-commits at lists.infradead.org
Tue Nov 28 11:59:40 PST 2017


mkresin pushed a commit to source.git, branch master:
https://git.lede-project.org/18cc8d520c1807c545e8696dea15ffc66a56cdd1

commit 18cc8d520c1807c545e8696dea15ffc66a56cdd1
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Sun Nov 26 01:42:50 2017 +0900

    ramips: add missing reset button for Nexx WT1520
    
    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 at gmail.com>
    [add note about dropped UART (full) to the commit message]
    Signed-off-by: Mathias Kresin <dev at kresin.me>
---
 target/linux/ramips/dts/WT1520.dtsi | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/target/linux/ramips/dts/WT1520.dtsi b/target/linux/ramips/dts/WT1520.dtsi
index 1031e22..95886d7 100644
--- a/target/linux/ramips/dts/WT1520.dtsi
+++ b/target/linux/ramips/dts/WT1520.dtsi
@@ -1,5 +1,8 @@
 #include "rt5350.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "nexx,wt1520", "ralink,rt5350-soc";
 
@@ -8,21 +11,24 @@
 		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";
 		};
 	};



More information about the lede-commits mailing list