arm64: dts: qcom: qrb4210-rb2: Enable on-board buttons
authorKonrad Dybcio <konrad.dybcio@linaro.org>
Tue, 13 Jun 2023 18:09:00 +0000 (20:09 +0200)
committerBjorn Andersson <andersson@kernel.org>
Wed, 14 Jun 2023 15:01:36 +0000 (08:01 -0700)
Enable the PMIC GPIO- and RESIN-connected buttons on the board.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230613-topic-rb2_-v1-1-696cd7dbda28@linaro.org
arch/arm64/boot/dts/qcom/qrb4210-rb2.dts

index 39597277343cfbf940effdc4ca56d036d8c9ad98..e23a0406eaccd58d0e82dc243ce0f63d48751e22 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <dt-bindings/leds/common.h>
 #include "sm4250.dtsi"
+#include "pm6125.dtsi"
 
 / {
        model = "Qualcomm Technologies, Inc. QRB4210 RB2";
                };
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+               label = "gpio-keys";
+
+               pinctrl-0 = <&kypd_vol_up_n>;
+               pinctrl-names = "default";
+
+               key-volume-up {
+                       label = "Volume Up";
+                       linux,code = <KEY_VOLUMEUP>;
+                       gpios = <&pm6125_gpios 5 GPIO_ACTIVE_LOW>;
+                       debounce-interval = <15>;
+                       linux,can-disable;
+                       wakeup-source;
+               };
+       };
+
        hdmi-connector {
                compatible = "hdmi-connector";
                type = "a";
        status = "okay";
 };
 
+&pm6125_gpios {
+       kypd_vol_up_n: kypd-vol-up-n-state {
+               pins = "gpio5";
+               function = "normal";
+               power-source = <0>;
+               bias-pull-up;
+               input-enable;
+       };
+};
+
+&pon_pwrkey {
+       status = "okay";
+};
+
+&pon_resin {
+       linux,code = <KEY_VOLUMEDOWN>;
+       status = "okay";
+};
+
 &qupv3_id_0 {
        status = "okay";
 };