linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Lokesh Vutla <lokeshvutla@ti.com>
To: Tero Kristo <t-kristo@ti.com>, Nishanth Menon <nm@ti.com>,
	<linus.walleij@linaro.org>
Cc: Device Tree Mailing List <devicetree@vger.kernel.org>,
	Lokesh Vutla <lokeshvutla@ti.com>, Keerthy <j-keerthy@ti.com>,
	linux-gpio@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
	Linux ARM Mailing List <linux-arm-kernel@lists.infradead.org>
Subject: [PATCH 6/6] arm64: dts: k3-j721e: Add gpio-keys on common processor board
Date: Fri, 9 Aug 2019 13:59:47 +0530	[thread overview]
Message-ID: <20190809082947.30590-7-lokeshvutla@ti.com> (raw)
In-Reply-To: <20190809082947.30590-1-lokeshvutla@ti.com>

From: Nikhil Devshatwar <nikhil.nd@ti.com>

Common processor board for K3 J721E platform has two push buttons
namely SW10 and SW11.
Add a gpio-keys device node to model them as input keys in Linux.
Add required pinmux nodes to set GPIO pins as input.

Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 .../dts/ti/k3-j721e-common-proc-board.dts     | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts b/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts
index 509579ca3db2..d2894d55fbbe 100644
--- a/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts
+++ b/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts
@@ -6,12 +6,49 @@
 /dts-v1/;
 
 #include "k3-j721e-som-p0.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 
 / {
 	chosen {
 		stdout-path = "serial2:115200n8";
 		bootargs = "console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000";
 	};
+
+	gpio_keys: gpio-keys {
+		compatible = "gpio-keys";
+		autorepeat;
+		pinctrl-names = "default";
+		pinctrl-0 = <&sw10_button_pins_default &sw11_button_pins_default>;
+
+		sw10: sw10 {
+			label = "GPIO Key USER1";
+			linux,code = <BTN_0>;
+			gpios = <&main_gpio0 0 GPIO_ACTIVE_LOW>;
+		};
+
+		sw11: sw11 {
+			label = "GPIO Key USER2";
+			linux,code = <BTN_1>;
+			gpios = <&wkup_gpio0 7 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&main_pmx0 {
+	sw10_button_pins_default: sw10_button_pins_default {
+		pinctrl-single,pins = <
+			J721E_IOPAD(0x0, PIN_INPUT, 7) /* (AC18) EXTINTn.GPIO0_0 */
+		>;
+	};
+};
+
+&wkup_pmx0 {
+	sw11_button_pins_default: sw11_button_pins_default {
+		pinctrl-single,pins = <
+			J721E_WKUP_IOPAD(0xcc, PIN_INPUT, 7) /* (G28) WKUP_GPIO0_7 */
+		>;
+	};
 };
 
 &wkup_uart0 {
-- 
2.22.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2019-08-09  8:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-09  8:29 [PATCH 0/6] arm64: dts: ti: k3-j721e: Add gpio nodes Lokesh Vutla
2019-08-09  8:29 ` [PATCH 1/6] dt-bindings: gpio: davinci: Add new compatible for J721E SoCs Lokesh Vutla
2019-08-09 10:55   ` Keerthy
2019-08-15  7:46   ` Linus Walleij
2019-08-09  8:29 ` [PATCH 2/6] arm64: dts: ti: k3-j721e: Add gpio nodes in main domain Lokesh Vutla
2019-08-09 14:53   ` Keerthy
2019-08-09  8:29 ` [PATCH 3/6] arm64: dts: ti: k3-j721e: Add gpio nodes in wakeup domain Lokesh Vutla
2019-08-09 14:54   ` Keerthy
2019-08-09  8:29 ` [PATCH 4/6] arm64: dts: ti: k3-j721e-common-proc-board: Disable unused gpio modules Lokesh Vutla
2019-08-09 14:55   ` Keerthy
2019-08-09  8:29 ` [PATCH 5/6] dt-bindings: pinctrl: k3: Introduce pinmux definitions for J721E Lokesh Vutla
2019-08-21 21:02   ` Rob Herring
2019-08-26 10:26     ` Lokesh Vutla
2019-08-26 11:25       ` Rob Herring
2019-08-09  8:29 ` Lokesh Vutla [this message]
2019-08-09 14:56   ` [PATCH 6/6] arm64: dts: k3-j721e: Add gpio-keys on common processor board Keerthy
2019-08-20 12:49 ` [PATCH 0/6] arm64: dts: ti: k3-j721e: Add gpio nodes Lokesh Vutla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190809082947.30590-7-lokeshvutla@ti.com \
    --to=lokeshvutla@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=j-keerthy@ti.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=robh+dt@kernel.org \
    --cc=t-kristo@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).