Message ID | 20240304-gpio-keys-v4-1-03604d778c86@quicinc.com |
---|---|
State | Superseded |
Headers | show |
Series | [v4] arm64: dts: qcom: qcm6490-idp: enable PMIC Volume and Power buttons | expand |
On 3/6/2024 3:56 PM, Dmitry Baryshkov wrote: > On Wed, 6 Mar 2024 at 05:02, hui liu <quic_huliu@quicinc.com> wrote: >> >> >> >> On 3/6/2024 5:20 AM, Konrad Dybcio wrote: >>> >>> >>> On 3/4/24 08:09, Hui Liu via B4 Relay wrote: >>>> From: Hui Liu <quic_huliu@quicinc.com> >>>> >>>> The Volume Down & Power buttons are controlled by the PMIC via >>>> the PON hardware, and the Volume Up is connected to a PMIC gpio. >>>> >>>> Enable the necessary hardware and setup the GPIO state for the >>>> Volume Up gpio key. >>>> >>>> Signed-off-by: Hui Liu <quic_huliu@quicinc.com> >>>> --- >>> >>> [...] >>> >>> >>>> +&pmk8350_pon { >>>> + status = "okay"; >>>> +}; >>> >>> This device is already enabled >> Hi Konrad, >> >> The status is not set in pmk8350.dtsi, so I thought we should set it for >> "okay" manually. Do you think so? > > What is the default device status if there is no status property? The default status is okay. OK, I will update it, remove the status configuration. Thanks, Hui > >
diff --git a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts index acf145d1d97c..12e162613ed0 100644 --- a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts +++ b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts @@ -9,7 +9,9 @@ #define PM7250B_SID 8 #define PM7250B_SID1 9 +#include <dt-bindings/input/linux-event-codes.h> #include <dt-bindings/leds/common.h> +#include <dt-bindings/pinctrl/qcom,pmic-gpio.h> #include <dt-bindings/regulator/qcom,rpmh-regulator.h> #include "sc7280.dtsi" #include "pm7250b.dtsi" @@ -39,6 +41,22 @@ chosen { stdout-path = "serial0:115200n8"; }; + gpio-keys { + compatible = "gpio-keys"; + + pinctrl-0 = <&key_vol_up_default>; + pinctrl-names = "default"; + + key-volume-up { + label = "Volume_up"; + gpios = <&pm7325_gpios 6 GPIO_ACTIVE_LOW>; + linux,code = <KEY_VOLUMEUP>; + wakeup-source; + debounce-interval = <15>; + linux,can-disable; + }; + }; + reserved-memory { xbl_mem: xbl@80700000 { reg = <0x0 0x80700000 0x0 0x100000>; @@ -421,6 +439,16 @@ vreg_bob_3p296: bob { }; }; +&pm7325_gpios { + key_vol_up_default: key-vol-up-state { + pins = "gpio6"; + function = "normal"; + input-enable; + bias-pull-up; + qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>; + }; +}; + &pm8350c_pwm { status = "okay"; @@ -448,6 +476,19 @@ led@3 { }; }; +&pmk8350_pon { + status = "okay"; +}; + +&pon_pwrkey { + status = "okay"; +}; + +&pon_resin { + linux,code = <KEY_VOLUMEDOWN>; + status = "okay"; +}; + &qupv3_id_0 { status = "okay"; };