]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
starqltechn: use button keyboard driver
authorDzmitry Sankouski <dsankouski@gmail.com>
Sat, 1 Apr 2023 09:28:43 +0000 (12:28 +0300)
committerTom Rini <trini@konsulko.com>
Wed, 3 May 2023 13:05:24 +0000 (09:05 -0400)
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>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/arm/dts/starqltechn.dts
configs/starqltechn_defconfig
include/configs/sdm845.h

index dcbc3b6d4966abc08766aee78d85ddacff8d9b01..eec51d165f98def58c192c270e2e8fc778aef8f5 100644 (file)
@@ -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)";
                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";
index 599d9260583a81678596a931020e8551ada5a84a..92e7254c73f8e2cd10488254432b1f257b15a828 100644 (file)
@@ -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
index 2211751b540f06f9c4a8a6e0cbbd84b30b30102c..673268dca9820a5bdac6d7c6ebefdbff5fbd760e 100644 (file)
@@ -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" \