linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Mattijs Korpershoek <mkorpershoek@baylibre.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Matthias Brugger <matthias.bgg@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
	Fabien Parent <parent.f@gmail.com>,
	devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org,
	Fabien Parent <fparent@baylibre.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v1 6/6] arm64: dts: mediatek: mt8183-pumpkin: add keypad support
Date: Wed, 20 Jul 2022 16:48:42 +0200	[thread overview]
Message-ID: <20220720-mt8183-keypad-v1-6-ef9fc29dbff4@baylibre.com> (raw)
In-Reply-To: <20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com>

From: Fabien Parent <fparent@baylibre.com>

Add device-tree bindings for the keypad driver on the MT8183 Pumpkin
board.

The MT8183 Pumpkin board has 2 buttons connected using: KPROW0,
KPROW1 and KPCOL0.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>

diff --git a/arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts b/arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts
index 530e0c9ce0c9..add697c94b05 100644
--- a/arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts
@@ -7,6 +7,7 @@
 /dts-v1/;
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 #include "mt8183.dtsi"
 #include "mt6358.dtsi"
 
@@ -122,6 +123,18 @@ &i2c6 {
 	clock-frequency = <100000>;
 };
 
+&keyboard {
+	pinctrl-names = "default";
+	pinctrl-0 = <&keyboard_pins>;
+	status = "okay";
+	linux,keymap = <MATRIX_KEY(0x00, 0x00, KEY_VOLUMEDOWN)
+			MATRIX_KEY(0x01, 0x00, KEY_VOLUMEUP)>;
+	keypad,num-rows = <2>;
+	keypad,num-columns = <1>;
+	debounce-delay-ms = <32>;
+	mediatek,double-keys;
+};
+
 &mmc0 {
 	status = "okay";
 	pinctrl-names = "default", "state_uhs";
@@ -226,6 +239,14 @@ pins_cmd_dat {
 		};
 	};
 
+	keyboard_pins: keyboard {
+		pins_keyboard {
+			pinmux = <PINMUX_GPIO91__FUNC_KPROW1>,
+				 <PINMUX_GPIO92__FUNC_KPROW0>,
+				 <PINMUX_GPIO93__FUNC_KPCOL0>;
+		};
+	};
+
 	mmc0_pins_default: mmc0-pins-default {
 		pins_cmd_dat {
 			pinmux = <PINMUX_GPIO123__FUNC_MSDC0_DAT0>,

-- 
b4 0.10.0-dev-54fef

      parent reply	other threads:[~2022-07-20 14:49 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-20 14:48 [PATCH v1 0/6] Input: mt6779-keypad - double keys support Mattijs Korpershoek
2022-07-20 14:48 ` [PATCH v1 1/6] MAINTAINERS: input: add mattijs for mt6779-keypad Mattijs Korpershoek
2022-07-20 14:48 ` [PATCH v1 2/6] dt-bindings: mediatek,mt6779-keypad: use unevaluatedProperties Mattijs Korpershoek
2022-07-20 17:14   ` Krzysztof Kozlowski
2022-07-21  9:06     ` Mattijs Korpershoek
2022-07-21  9:16       ` Krzysztof Kozlowski
2022-07-21 13:11         ` Mattijs Korpershoek
2022-07-20 14:48 ` [PATCH v1 3/6] dt-bindings: mediatek,mt6779-keypad: add mediatek,double-keys Mattijs Korpershoek
2022-07-20 17:26   ` Krzysztof Kozlowski
2022-07-21 13:32     ` Mattijs Korpershoek
2022-07-21 13:51       ` Krzysztof Kozlowski
2022-07-21 14:44         ` Mattijs Korpershoek
2022-07-21  8:40   ` AngeloGioacchino Del Regno
2022-07-21 13:34     ` Mattijs Korpershoek
2022-07-20 14:48 ` [PATCH v1 4/6] Input: mt6779-keypad - support double keys matrix Mattijs Korpershoek
2022-07-20 14:53   ` Matthias Brugger
2022-07-21  8:34   ` AngeloGioacchino Del Regno
2022-07-21 14:51     ` Mattijs Korpershoek
2022-07-21 14:55       ` AngeloGioacchino Del Regno
2022-07-26  9:52         ` Mattijs Korpershoek
2022-07-20 14:48 ` [PATCH v1 5/6] arm64: dts: mediatek: mt8183: add keyboard node Mattijs Korpershoek
2022-07-21  8:41   ` AngeloGioacchino Del Regno
2022-07-20 14:48 ` Mattijs Korpershoek [this message]

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=20220720-mt8183-keypad-v1-6-ef9fc29dbff4@baylibre.com \
    --to=mkorpershoek@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=fparent@baylibre.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=parent.f@gmail.com \
    --cc=robh+dt@kernel.org \
    /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).