[PATCH] arm64: dts: qcom: sc8280xp-crd: add support for volume-up key

From: Johan Hovold
Date: Fri Mar 07 2025 - 12:10:54 EST


Add support for the keypad volume-up key on the debug extension board.

This is useful to have when testing PMIC interrupt handling, and the key
can also be used to wake up from deep suspend states (CX shutdown).

Signed-off-by: Johan Hovold <johan+linaro@xxxxxxxxxx>
---
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
index 75adaa19d1c3..8badf7f49b95 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
@@ -37,6 +37,20 @@ chosen {
stdout-path = "serial0:115200n8";
};

+ gpio-keys {
+ compatible = "gpio-keys";
+
+ pinctrl-0 = <&kypd_vol_up_n>;
+ pinctrl-names = "default";
+
+ key-vol-up {
+ label = "volume_up";
+ gpios = <&pmc8280_1_gpios 6 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_VOLUMEUP>;
+ wakeup-source;
+ };
+ };
+
pmic-glink {
compatible = "qcom,sc8280xp-pmic-glink", "qcom,pmic-glink";

@@ -885,6 +899,14 @@ edp_bl_reg_en: edp-bl-reg-en-state {
function = "normal";
};

+ kypd_vol_up_n: kypd-vol-up-n-state {
+ pins = "gpio6";
+ function = "normal";
+ power-source = <0>; /* 3.3 V */
+ bias-pull-up;
+ input-enable;
+ };
+
misc_3p3_reg_en: misc-3p3-reg-en-state {
pins = "gpio2";
function = "normal";
--
2.45.3