ARM: dts: qcom: add volume up gpio-keys device for Sun boards

Add a gpio-keys device for Sun MTP, CDP and QRD boards that use
PM8550 GPIO 6.

Change-Id: I3b6ec4f7cb826cd482e85cdbbcbea3db485284c1
Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
This commit is contained in:
Anjelique Melendez
2023-09-18 17:26:42 -07:00
parent e6efa9e825
commit fd47ab2bae
4 changed files with 81 additions and 0 deletions

View File

@@ -3,4 +3,27 @@
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
*/ */
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "sun-pmic-overlay.dtsi" #include "sun-pmic-overlay.dtsi"
&soc {
gpio_keys {
compatible = "gpio-keys";
label = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&key_vol_up_default>;
vol_up {
label = "volume_up";
gpios = <&pm8550_gpios 6 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
linux,code = <KEY_VOLUMEUP>;
gpio-key,wakeup;
debounce,interval = <15>;
linux,can-disable;
};
};
};

View File

@@ -3,4 +3,27 @@
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
*/ */
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "sun-pmic-overlay.dtsi" #include "sun-pmic-overlay.dtsi"
&soc {
gpio_keys {
compatible = "gpio-keys";
label = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&key_vol_up_default>;
vol_up {
label = "volume_up";
gpios = <&pm8550_gpios 6 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
linux,code = <KEY_VOLUMEUP>;
gpio-key,wakeup;
debounce-interval = <15>;
linux,can-disable;
};
};
};

View File

@@ -37,3 +37,15 @@
&pm8550ve_i_temp_alarm { &pm8550ve_i_temp_alarm {
status = "ok"; status = "ok";
}; };
&pm8550_gpios {
key_vol_up {
key_vol_up_default: key_vol_up_default {
pins = "gpio6";
function = "normal";
input-enable;
bias-pull-up;
power-source = <1>;
};
};
};

View File

@@ -3,4 +3,27 @@
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
*/ */
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "sun-pmic-overlay.dtsi" #include "sun-pmic-overlay.dtsi"
&soc {
gpio_keys {
compatible = "gpio-keys";
label = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&key_vol_up_default>;
vol_up {
label = "volume_up";
gpios = <&pm8550_gpios 6 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
linux,code = <KEY_VOLUMEUP>;
gpio-key,wakeup;
debounce-interval = <15>;
linux,can-disable;
};
};
};