Skip to content

Commit 6198772

Browse files
lumagandersson
authored andcommitted
ARM: dts: qcom: apq8074-dragonboard: add gpio keys
Add device nodes for gpio-keys (volume-up, general key) device nodes. Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20230531012627.3813060-3-dmitry.baryshkov@linaro.org
1 parent b9a0de7 commit 6198772

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

arch/arm/boot/dts/qcom-apq8074-dragonboard.dts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// SPDX-License-Identifier: GPL-2.0
22
#include <dt-bindings/gpio/gpio.h>
3+
#include <dt-bindings/input/input.h>
34
#include <dt-bindings/leds/common.h>
5+
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
46
#include "qcom-msm8974.dtsi"
57
#include "qcom-pm8841.dtsi"
68
#include "qcom-pm8941.dtsi"
@@ -21,6 +23,26 @@
2123
stdout-path = "serial0:115200n8";
2224
};
2325

26+
gpio-keys {
27+
compatible = "gpio-keys";
28+
autorepeat;
29+
30+
pinctrl-0 = <&msm_keys_default>;
31+
pinctrl-names = "default";
32+
33+
button-volup {
34+
label = "Volume Up";
35+
linux,code = <KEY_VOLUMEUP>;
36+
gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>;
37+
};
38+
39+
button-general {
40+
label = "General";
41+
linux,code = <KEY_PROG1>;
42+
gpios = <&pm8941_gpios 23 GPIO_ACTIVE_LOW>;
43+
};
44+
};
45+
2446
reserved-memory {
2547
mpss_region: mpss@ac00000 {
2648
reg = <0x0ac00000 0x2500000>;
@@ -91,6 +113,18 @@
91113
status = "okay";
92114
};
93115

116+
&pm8941_gpios {
117+
msm_keys_default: pm8941-gpio-keys-state {
118+
pins = "gpio5", "gpio23";
119+
function = "normal";
120+
input-enable;
121+
drive-push-pull;
122+
bias-pull-up;
123+
qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
124+
power-source = <PM8941_GPIO_S3>; /* 1.8V */
125+
};
126+
};
127+
94128
&pm8941_lpg {
95129
qcom,power-source = <1>;
96130
status = "okay";

0 commit comments

Comments
 (0)