From a2612d7c55f00c29b937cabcb59dfcbf52ad3c65 Mon Sep 17 00:00:00 2001 From: Dzmitry Sankouski Date: Sat, 1 Apr 2023 12:28:43 +0300 Subject: [PATCH] starqltechn: use button keyboard driver Button keyboard driver used to navigate bootmenu entries. Add gpio buttons, button keyboard driver. Add gpio keys dts bindings. Signed-off-by: Dzmitry Sankouski Reviewed-by: Simon Glass --- 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 dcbc3b6d49..eec51d165f 100644 --- a/arch/arm/dts/starqltechn.dts +++ b/arch/arm/dts/starqltechn.dts @@ -9,6 +9,8 @@ /dts-v1/; #include "sdm845.dtsi" +#include +#include / { model = "Samsung S9 (SM-G9600)"; @@ -43,6 +45,22 @@ format = "a8r8g8b8"; }; + gpio-keys { + compatible = "gpio-keys"; + + key-pwr { + label = "Power"; + linux,code = ; + gpios = <&pm8998_pon 0 GPIO_ACTIVE_LOW>; + }; + + key-vol-down { + label = "Volume Down"; + linux,code = ; + 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.39.5