From 26afa07d9e3f22c42c4e1322ff1eda1e67f85d00 Mon Sep 17 00:00:00 2001 From: David Collins Date: Mon, 9 Dec 2019 11:08:23 -0800 Subject: [PATCH 1/2] ARM: dts: msm: add PMK8350 PON_PBS and PON_HLOS devices Add devices for the PMK8350 PMIC PON_PBS and PON_HLOS peripherals. These can be used to detect keypresses and to configure the type of power off to perform (i.e. shutdown vs restart). Change-Id: I0ba322df9595e609a51da36d2606f8f5eb2b397e --- qcom/pmk8350.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/qcom/pmk8350.dtsi b/qcom/pmk8350.dtsi index 355dedbd2c30..127ff74d5b85 100644 --- a/qcom/pmk8350.dtsi +++ b/qcom/pmk8350.dtsi @@ -1,4 +1,5 @@ #include +#include #include #include @@ -14,6 +15,31 @@ #address-cells = <1>; #size-cells = <0>; + pon_pbs@800 { + compatible = "qcom,qpnp-power-on"; + reg = <0x800>; + qcom,system-reset; + qcom,store-hard-reset-reason; + }; + + pon_hlos@1300 { + compatible = "qcom,qpnp-power-on"; + reg = <0x1300>; + interrupts = <0x0 0x13 0x7 IRQ_TYPE_EDGE_BOTH>, + <0x0 0x13 0x6 IRQ_TYPE_EDGE_BOTH>; + interrupt-names = "kpdpwr", "resin"; + + qcom,pon_1 { + qcom,pon-type = ; + linux,code = ; + }; + + qcom,pon_2 { + qcom,pon-type = ; + linux,code = ; + }; + }; + pmk8350_sdam_2: sdam@7100 { compatible = "qcom,spmi-sdam"; reg = <0x7100>; From 6c07bf5936e4bcddd8cf672a57c04168e177c05a Mon Sep 17 00:00:00 2001 From: David Collins Date: Mon, 9 Dec 2019 14:42:19 -0800 Subject: [PATCH 2/2] ARM: dts: msm: add volume up gpio-keys device for Lahaina boards Add a gpio-keys device for Lahaina CDP, MTP, and QRD boards tha uses PM8350 GPIO 6. Change-Id: I273c85b0a494bba5f27e1ea653a76fc495d1936c --- qcom/lahaina-cdp.dtsi | 23 +++++++++++++++++++++++ qcom/lahaina-mtp.dtsi | 23 +++++++++++++++++++++++ qcom/lahaina-pmic-overlay.dtsi | 12 ++++++++++++ qcom/lahaina-qrd.dtsi | 23 +++++++++++++++++++++++ 4 files changed, 81 insertions(+) diff --git a/qcom/lahaina-cdp.dtsi b/qcom/lahaina-cdp.dtsi index 2e3ab49ddbbe..1aac5c1d094c 100644 --- a/qcom/lahaina-cdp.dtsi +++ b/qcom/lahaina-cdp.dtsi @@ -1,5 +1,28 @@ +#include +#include + #include "lahaina-pmic-overlay.dtsi" &spmi_debug_bus { status = "ok"; }; + +&soc { + gpio_keys { + compatible = "gpio-keys"; + label = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&key_vol_up_default>; + + vol_up { + label = "volume_up"; + gpios = <&pm8350_gpios 6 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = ; + gpio-key,wakeup; + debounce-interval = <15>; + linux,can-disable; + }; + }; +}; diff --git a/qcom/lahaina-mtp.dtsi b/qcom/lahaina-mtp.dtsi index 2e3ab49ddbbe..1aac5c1d094c 100644 --- a/qcom/lahaina-mtp.dtsi +++ b/qcom/lahaina-mtp.dtsi @@ -1,5 +1,28 @@ +#include +#include + #include "lahaina-pmic-overlay.dtsi" &spmi_debug_bus { status = "ok"; }; + +&soc { + gpio_keys { + compatible = "gpio-keys"; + label = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&key_vol_up_default>; + + vol_up { + label = "volume_up"; + gpios = <&pm8350_gpios 6 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = ; + gpio-key,wakeup; + debounce-interval = <15>; + linux,can-disable; + }; + }; +}; diff --git a/qcom/lahaina-pmic-overlay.dtsi b/qcom/lahaina-pmic-overlay.dtsi index e01ee2450d01..97894d30dd64 100644 --- a/qcom/lahaina-pmic-overlay.dtsi +++ b/qcom/lahaina-pmic-overlay.dtsi @@ -6,3 +6,15 @@ #include "pm8350b.dtsi" #include "pmr735a.dtsi" #include "pmr735b.dtsi" + +&pm8350_gpios { + key_vol_up { + key_vol_up_default: key_vol_up_default { + pins = "gpio6"; + function = "normal"; + input-enable; + bias-pull-up; + power-source = <1>; + }; + }; +}; diff --git a/qcom/lahaina-qrd.dtsi b/qcom/lahaina-qrd.dtsi index 2e3ab49ddbbe..1aac5c1d094c 100644 --- a/qcom/lahaina-qrd.dtsi +++ b/qcom/lahaina-qrd.dtsi @@ -1,5 +1,28 @@ +#include +#include + #include "lahaina-pmic-overlay.dtsi" &spmi_debug_bus { status = "ok"; }; + +&soc { + gpio_keys { + compatible = "gpio-keys"; + label = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&key_vol_up_default>; + + vol_up { + label = "volume_up"; + gpios = <&pm8350_gpios 6 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = ; + gpio-key,wakeup; + debounce-interval = <15>; + linux,can-disable; + }; + }; +};