public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Dzmitry Sankouski <dsankouski@gmail.com>
To: u-boot@lists.denx.de
Cc: Dzmitry Sankouski <dsankouski@gmail.com>,
	Peng Fan <peng.fan@nxp.com>, Ramon Fried <rfried.dev@gmail.com>,
	Simon Glass <sjg@chromium.org>,
	Sumit Garg <sumit.garg@linaro.org>
Subject: [PATCH 2/3] starqltechn: use button keyboard driver
Date: Sat,  1 Apr 2023 12:28:43 +0300	[thread overview]
Message-ID: <20230401092844.269532-3-dsankouski@gmail.com> (raw)
In-Reply-To: <20230401092844.269532-1-dsankouski@gmail.com>

Button keyboard driver used to navigate bootmenu entries.

Add gpio buttons, button keyboard driver.
Add gpio keys dts bindings.

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
---

 arch/arm/dts/starqltechn.dts  | 18 ++++++++++++++++++
 configs/starqltechn_defconfig |  3 +++
 include/configs/sdm845.h      |  2 +-
 3 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/starqltechn.dts b/arch/arm/dts/starqltechn.dts
index 34a4f59cbd..6c90447362 100644
--- a/arch/arm/dts/starqltechn.dts
+++ b/arch/arm/dts/starqltechn.dts
@@ -9,6 +9,8 @@
 /dts-v1/;
 
 #include "sdm845.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 
 / {
 	model = "Samsung S9 (SM-G9600)";
@@ -43,6 +45,22 @@
 		format = "a8r8g8b8";
 	};
 
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		key-pwr {
+			label = "Power";
+			linux,code = <KEY_ENTER>;
+			gpios = <&pm8998_pon 0 GPIO_ACTIVE_LOW>;
+		};
+
+		key-vol-down {
+			label = "Volume Down";
+			linux,code = <KEY_DOWN>;
+			gpios = <&pm8998_pon 1 GPIO_ACTIVE_LOW>;
+		};
+	};
+
 	soc: soc {
 		serial@a84000 {
 			status = "okay";
diff --git a/configs/starqltechn_defconfig b/configs/starqltechn_defconfig
index 599d926058..92e7254c73 100644
--- a/configs/starqltechn_defconfig
+++ b/configs/starqltechn_defconfig
@@ -20,9 +20,12 @@ CONFIG_SYS_PBSIZE=532
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_BMP=y
 # CONFIG_NET is not set
+CONFIG_BUTTON=y
 CONFIG_CLK=y
 CONFIG_MSM_GPIO=y
 CONFIG_QCOM_PMIC_GPIO=y
+CONFIG_DM_KEYBOARD=y
+CONFIG_BUTTON_KEYBOARD=y
 CONFIG_PINCTRL=y
 CONFIG_DM_PMIC=y
 CONFIG_PMIC_QCOM=y
diff --git a/include/configs/sdm845.h b/include/configs/sdm845.h
index 2211751b54..673268dca9 100644
--- a/include/configs/sdm845.h
+++ b/include/configs/sdm845.h
@@ -16,7 +16,7 @@
 #define CFG_EXTRA_ENV_SETTINGS \
 	"bootm_size=0x4000000\0"	\
 	"bootm_low=0x80000000\0"	\
-	"stdin=serial\0"	\
+	"stdin=serial,button-kbd\0"	\
 	"stdout=serial,vidconsole\0"	\
 	"stderr=serial,vidconsole\0"	\
 	"preboot=source $prevbl_initrd_start_addr:prebootscript\0" \
-- 
2.30.2


  parent reply	other threads:[~2023-04-01  9:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-01  9:28 [PATCH 0/3] Enable bootmenu, and button-kbd driver for menu entry navigation Dzmitry Sankouski
2023-04-01  9:28 ` [PATCH 1/3] starqltechn: use 16x32 font Dzmitry Sankouski
2023-04-02  2:39   ` Simon Glass
2023-05-03 13:26   ` Tom Rini
2023-04-01  9:28 ` Dzmitry Sankouski [this message]
2023-04-02  2:39   ` [PATCH 2/3] starqltechn: use button keyboard driver Simon Glass
2023-04-01  9:28 ` [PATCH 3/3] starqltechn: enable bootmenu Dzmitry Sankouski

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=20230401092844.269532-3-dsankouski@gmail.com \
    --to=dsankouski@gmail.com \
    --cc=peng.fan@nxp.com \
    --cc=rfried.dev@gmail.com \
    --cc=sjg@chromium.org \
    --cc=sumit.garg@linaro.org \
    --cc=u-boot@lists.denx.de \
    /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