diff mbox series

[2/2] ARM: dts: rza2mevb: Add input switch

Message ID 20190604200914.64896-3-chris.brandt@renesas.com (mailing list archive)
State Accepted
Commit 4592e49225cd40dcbc4c1e91772caa80da10f785
Delegated to: Simon Horman
Headers show
Series dts: rza2mevb: Add IRQ pin controller for RZ/A2 | expand

Commit Message

Chris Brandt June 4, 2019, 8:09 p.m. UTC
Add support for input switch SW3 on the Renesas RZ/A2M EVB
development board.

Note that this uses the IRQ interrupt, as the RZ/A2 GPIO controller
does not include interrupt support

Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
---
 arch/arm/boot/dts/r7s9210-rza2mevb.dts | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

Comments

Geert Uytterhoeven June 5, 2019, 1:19 p.m. UTC | #1
On Tue, Jun 4, 2019 at 10:09 PM Chris Brandt <chris.brandt@renesas.com> wrote:
> Add support for input switch SW3 on the Renesas RZ/A2M EVB
> development board.
>
> Note that this uses the IRQ interrupt, as the RZ/A2 GPIO controller
> does not include interrupt support
>
> Signed-off-by: Chris Brandt <chris.brandt@renesas.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert
Simon Horman June 6, 2019, 8:48 a.m. UTC | #2
On Tue, Jun 04, 2019 at 03:09:14PM -0500, Chris Brandt wrote:
> Add support for input switch SW3 on the Renesas RZ/A2M EVB
> development board.
> 
> Note that this uses the IRQ interrupt, as the RZ/A2 GPIO controller
> does not include interrupt support
> 
> Signed-off-by: Chris Brandt <chris.brandt@renesas.com>

Thanks Chris,

I have applied this for inclusion in v5.3.

There was a minor conflict when applying the pinctl portion
of the patch which I have resolved. The result is as follows.

From 198120684b54efe8de4309b359d1ed36fdefa68c Mon Sep 17 00:00:00 2001
From: Chris Brandt <chris.brandt@renesas.com>
Date: Tue, 4 Jun 2019 15:09:14 -0500
Subject: [PATCH] ARM: dts: rza2mevb: Add input switch

Add support for input switch SW3 on the Renesas RZ/A2M EVB
development board.

Note that this uses the IRQ interrupt, as the RZ/A2 GPIO controller
does not include interrupt support

Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
[simon: resolved minor merge conflict]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/boot/dts/r7s9210-rza2mevb.dts | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm/boot/dts/r7s9210-rza2mevb.dts b/arch/arm/boot/dts/r7s9210-rza2mevb.dts
index 991e09de1219..25dd813d966e 100644
--- a/arch/arm/boot/dts/r7s9210-rza2mevb.dts
+++ b/arch/arm/boot/dts/r7s9210-rza2mevb.dts
@@ -9,6 +9,7 @@
 /dts-v1/;
 #include "r7s9210.dtsi"
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 #include <dt-bindings/pinctrl/r7s9210-pinctrl.h>
 
 / {
@@ -29,6 +30,21 @@
 		reg = <0x40000000 0x00800000>;	 /* HyperRAM */
 	};
 
+	keyboard {
+		compatible = "gpio-keys";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&keyboard_pins>;
+
+		key-3 {
+			interrupt-parent = <&irqc>;
+			interrupts = <0 IRQ_TYPE_EDGE_BOTH>;
+			linux,code = <KEY_3>;
+			label = "SW3";
+			wakeup-source;
+		};
+	};
+
 	lbsc {
 		#address-cells = <1>;
 		#size-cells = <1>;
@@ -57,6 +73,10 @@
 };
 
 &pinctrl {
+	keyboard_pins: keyboard {
+		pinmux = <RZA2_PINMUX(PORTJ, 1, 6)>;    /* IRQ0 */
+	};
+
 	/* Serial Console */
 	scif4_pins: serial4 {
 		pinmux = <RZA2_PINMUX(PORT9, 0, 4)>,	/* TxD4 */
Simon Horman June 6, 2019, 1:42 p.m. UTC | #3
On Thu, Jun 06, 2019 at 10:48:28AM +0200, Simon Horman wrote:
> On Tue, Jun 04, 2019 at 03:09:14PM -0500, Chris Brandt wrote:
> > Add support for input switch SW3 on the Renesas RZ/A2M EVB
> > development board.
> > 
> > Note that this uses the IRQ interrupt, as the RZ/A2 GPIO controller
> > does not include interrupt support
> > 
> > Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
> 
> Thanks Chris,
> 
> I have applied this for inclusion in v5.3.
> 
> There was a minor conflict when applying the pinctl portion
> of the patch which I have resolved. The result is as follows.

Scratch that, I was working in the wrong branch.
I now have your patch cleanly applied for inclusion in v5.3.
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/r7s9210-rza2mevb.dts b/arch/arm/boot/dts/r7s9210-rza2mevb.dts
index 4baf4a965090..6049145c120c 100644
--- a/arch/arm/boot/dts/r7s9210-rza2mevb.dts
+++ b/arch/arm/boot/dts/r7s9210-rza2mevb.dts
@@ -9,6 +9,7 @@ 
 /dts-v1/;
 #include "r7s9210.dtsi"
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 #include <dt-bindings/pinctrl/r7s9210-pinctrl.h>
 
 / {
@@ -26,6 +27,21 @@ 
 		stdout-path = "serial0:115200n8";
 	};
 
+	keyboard {
+		compatible = "gpio-keys";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&keyboard_pins>;
+
+		key-3 {
+			interrupt-parent = <&irqc>;
+			interrupts = <0 IRQ_TYPE_EDGE_BOTH>;
+			linux,code = <KEY_3>;
+			label = "SW3";
+			wakeup-source;
+		};
+	};
+
 	lbsc {
 		#address-cells = <1>;
 		#size-cells = <1>;
@@ -121,6 +137,10 @@ 
 			 <RZA2_PINMUX(PORTL, 1, 5)>; /* IRQ5 */
 	};
 
+	keyboard_pins: keyboard {
+		pinmux = <RZA2_PINMUX(PORTJ, 1, 6)>;	/* IRQ0 */
+	};
+
 	/* Serial Console */
 	scif4_pins: serial4 {
 		pinmux = <RZA2_PINMUX(PORT9, 0, 4)>,	/* TxD4 */