diff mbox series

[1/2] arm64: dts: qcom: x1e80100-crd: add support for volume-up key

Message ID 20250307171222.7470-2-johan+linaro@kernel.org
State New
Headers show
Series arm64: dts: qcom: x1e80100-crd: add support for volume-up key | expand

Commit Message

Johan Hovold March 7, 2025, 5:12 p.m. UTC
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@kernel.org>
---
 arch/arm64/boot/dts/qcom/x1-crd.dtsi | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/x1-crd.dtsi b/arch/arm64/boot/dts/qcom/x1-crd.dtsi
index 296b41409ad1..0b62fdc85478 100644
--- a/arch/arm64/boot/dts/qcom/x1-crd.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1-crd.dtsi
@@ -52,9 +52,16 @@  chosen {
 	gpio-keys {
 		compatible = "gpio-keys";
 
-		pinctrl-0 = <&hall_int_n_default>;
+		pinctrl-0 = <&hall_int_n_default>, <&kypd_vol_up_n>;
 		pinctrl-names = "default";
 
+		key-vol-up {
+			label = "volume_up";
+			gpios = <&pm8550_gpios 6 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_VOLUMEUP>;
+			wakeup-source;
+		};
+
 		switch-lid {
 			gpios = <&tlmm 92 GPIO_ACTIVE_LOW>;
 			linux,input-type = <EV_SW>;
@@ -876,6 +883,16 @@  &pcie6a_phy {
 	status = "okay";
 };
 
+&pm8550_gpios {
+	kypd_vol_up_n: kypd-vol-up-n-state {
+		pins = "gpio6";
+		function = "normal";
+		power-source = <1>; /* 1.8 V */
+		bias-pull-up;
+		input-enable;
+	};
+};
+
 &pm8550ve_8_gpios {
 	misc_3p3_reg_en: misc-3p3-reg-en-state {
 		pins = "gpio6";