arm64: dts: qcom: qcm6490-idp: enable pwrkey and volume-up/down function
PATCH RESEND v2 1/1 arm64: dts: qcom: qcm6490-idp: enable pwrkey and volume-up/down function
Add configurations to enable pwrkey, volume-up and volume-down function.
---
Changes in v2:
- Update the commit description.
- Link to v1: https://lore.kernel.org/r/[email protected]
--- arch/arm64/boot/dts/qcom/qcm6490-idp.dts | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+)
arch/arm64/boot/dts/qcom/qcm6490-idp.dts +43 -0
@@ -9,6 +9,7 @@ #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/regulator/qcom,rpmh-regulator.h> #include "sc7280.dtsi"
@@ -39,6 +40,24 @@ chosen { stdout-path = "serial0:115200n8"; }; + gpio-keys { + compatible = "gpio-keys"; + label = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&key_vol_up_default>; + + key-volume-up { + label = "volume_up"; + gpios = <&pm7325_gpios 6 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + 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 +440,17 @@ vreg_bob_3p296: bob { }; }; +&pm7325_gpios { + key_vol_up_default: key-vol-up-state { + pins = "gpio6"; + function = "normal"; + input-enable; + bias-pull-up; + power-source = <0>; + qcom,drive-strength = <3>; + }; +}; + &pm8350c_pwm { status = "okay";
@@ -448,6 +478,19 @@ led@3 { }; }; +&pmk8350_pon { + status = "okay"; +}; + +&pon_pwrkey { + status = "okay"; +}; + +&pon_resin { + linux,code = <KEY_VOLUMEDOWN>; + status = "okay"; +}; + &qupv3_id_0 { status = "okay"; };
---
base-commit: 23e11d0318521e8693459b0e4d23aec614b3b68b
change-id: 20240206-gpio-keys-138bbd850298
Best regards,
Signature · 1 line
Hui Liu <[email protected]>
Quoted 4 lines · On Wed, 28 Feb 2024 at 11:57, Hui Liu via B4 Relay…
From: Hui Liu <[email protected]>
Add configurations to enable pwrkey, volume-up and volume-down function.
Please take a look at how similar patches describe the changes. E.g. commit bb47bfbd5aa8 ("arm64: dts: qcom: sm8550-qrd: enable PMIC Volume and Power buttons")
Quoted 49 lines
Signed-off-by Hui Liu <[email protected]>---
Changes in v2:
- Update the commit description.
- Link to v1: https://lore.kernel.org/r/[email protected]--- arch/arm64/boot/dts/qcom/qcm6490-idp.dts | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+)arch/arm64/boot/dts/qcom/qcm6490-idp.dts +19
-0@@ -9,6 +9,7 @@ #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/regulator/qcom,rpmh-regulator.h> #include "sc7280.dtsi"@@ -39,6 +40,24 @@ chosen { stdout-path = "serial0:115200n8"; }; + gpio-keys { + compatible = "gpio-keys"; + label = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&key_vol_up_default>; + + key-volume-up { + label = "volume_up"; + gpios = <&pm7325_gpios 6 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + 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 +440,17 @@ vreg_bob_3p296: bob { };
arch/arm64/boot/dts/qcom/qcm6490-idp.dts vreg_bob_3p296: bob { · line 450
Quoted 10 lines
arch/arm64/boot/dts/qcom/qcm6490-idp.dts +8
-0}; +&pm7325_gpios { + key_vol_up_default: key-vol-up-state { + pins = "gpio6"; + function = "normal"; + input-enable; + bias-pull-up; + power-source = <0>; + qcom,drive-strength = <3>;
Why is this property required? Anyway, it should use the defined name rather than just numeric value.
Quoted 36 lines
arch/arm64/boot/dts/qcom/qcm6490-idp.dts +16
-1+ }; +}; + &pm8350c_pwm { status = "okay";@@ -448,6 +478,19 @@ led@3 { }; }; +&pmk8350_pon { + status = "okay"; +}; + +&pon_pwrkey { + status = "okay"; +}; + +&pon_resin { + linux,code = <KEY_VOLUMEDOWN>; + status = "okay"; +}; + &qupv3_id_0 { status = "okay"; }; ---base-commit:
23e11d0318521e8693459b0e4d23aec614b3b68b
change-id: 20240206-gpio-keys-138bbd850298Best regards,
--
Hui Liu <[email protected]>
Signature · 2 lines
With best wishes Dmitry
Quoted 10 lines · Dmitry Baryshkov
Quoted 4 lines · On Wed, 28 Feb 2024 at 11:57, Hui Liu via B4 Relay…
From: Hui Liu <[email protected]>
Add configurations to enable pwrkey, volume-up and volume-down function.
Please take a look at how similar patches describe the changes. E.g. commit
bb47bfbd5aa8("arm64: dts: qcom: sm8550-qrd: enable PMIC Volume and Power buttons")
Sure, I will refer to this description to update it.
Quoted 54 lines
Quoted 54 lines
Signed-off-by Hui Liu <[email protected]>---
Changes in v2:
- Update the commit description.
- Link to v1: https://lore.kernel.org/r/[email protected]--- arch/arm64/boot/dts/qcom/qcm6490-idp.dts | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+)arch/arm64/boot/dts/qcom/qcm6490-idp.dts +19
-0@@ -9,6 +9,7 @@ #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/regulator/qcom,rpmh-regulator.h> #include "sc7280.dtsi"@@ -39,6 +40,24 @@ chosen { stdout-path = "serial0:115200n8"; }; + gpio-keys { + compatible = "gpio-keys"; + label = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&key_vol_up_default>; + + key-volume-up { + label = "volume_up"; + gpios = <&pm7325_gpios 6 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + 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 +440,17 @@ vreg_bob_3p296: bob { }; };
Quoted 11 lines
arch/arm64/boot/dts/qcom/qcm6490-idp.dts vreg_bob_3p296: bob { · line 450
Quoted 8 lines
arch/arm64/boot/dts/qcom/qcm6490-idp.dts +8
-0+&pm7325_gpios { + key_vol_up_default: key-vol-up-state { + pins = "gpio6"; + function = "normal"; + input-enable; + bias-pull-up; + power-source = <0>; + qcom,drive-strength = <3>;Why is this property required? Anyway, it should use the defined name rather than just numeric value.
I will remove power-source defination, because the default value is 0.
And "qcom, driver-strength" will update to "PMIC_GPIO_STRENGTH_LOW", it's a special value for pm7325.
Quoted 39 lines
Quoted 37 lines
arch/arm64/boot/dts/qcom/qcm6490-idp.dts +16
-1+ }; +}; + &pm8350c_pwm { status = "okay";@@ -448,6 +478,19 @@ led@3 { }; }; +&pmk8350_pon { + status = "okay"; +}; + +&pon_pwrkey { + status = "okay"; +}; + +&pon_resin { + linux,code = <KEY_VOLUMEDOWN>; + status = "okay"; +}; + &qupv3_id_0 { status = "okay"; }; ---base-commit:
23e11d0318521e8693459b0e4d23aec614b3b68b
change-id: 20240206-gpio-keys-138bbd850298Best regards,
--
Hui Liu <[email protected]>