Message ID | 20241120145317.31406-1-pvorel@suse.cz (mailing list archive) |
---|---|
State | Rejected |
Headers | show |
Series | [RFC,1/1] arm64: dts: qcom: sdm845-oneplus-common: enable resin/volume down | expand |
Hi Petr, On 20/11/2024 15:53, Petr Vorel wrote: > OnePlus 6T (fajita) downstream device tree contains volume down GPIO key > and resin. I suppose it is also in OnePlus 6 (enchilada). The volume down key is already enabled under the gpio-keys node in sdm845-oneplus-common.dtsi does it not work for you for some reason? I don't believe the resin node is used on this board, it's ignosed on the schematics at any rate. Kind regards, > > Signed-off-by: Petr Vorel <pvorel@suse.cz> > --- > Hi > > reason for RFC: > * Unfortunately untested on the real device. > * OnePlus 6 (enchilada) is nearly identical, but I haven't compared it's > device tree. > * Other sdm845 based devices just enable resin/volume down key the same > way. But what confuses me is "gpios = <0xe7 0x05 0x01>;", does it need > to enable gpios like sm6375-sony-xperia-murray-pdx225.dts in > 795ee50e55f4 ("arm64: dts: qcom: sm6375-pdx225: Add volume down GPIO key") ? > > Below is snipped of the OnePlus 6T (fajita) downstream device tree. > > Kind regards, > Petr > > gpio_keys { > compatible = "gpio-keys"; > label = "gpio-keys"; > pinctrl-0 = <0x2f7>; > pinctrl-names = "default"; > > vol_down { > gpios = <0xe7 0x05 0x01>; > linux,can-disable; > debounce-interval = <0x0f>; > label = "volume_down"; > linux,input-type = <0x01>; > linux,code = <0x72>; > }; > > vol_up { > gpios = <0xe7 0x06 0x01>; > linux,can-disable; > debounce-interval = <0x0f>; > label = "volume_up"; > linux,input-type = <0x01>; > gpio-key,wakeup; > linux,code = <0x73>; > }; > > cam_focus { > status = "disabled"; > }; > > hallsensor_key { > gpios = <0x34 0x7c 0x01>; > debounce-interval = <0x0f>; > interrupt-parent = <0x34>; > interrupts = <0x7c 0x00>; > label = "hallsensor_key"; > linux,input-type = <0x05>; > gpio-key,wakeup; > linux,code = <0x00>; > }; > > cam_snapshot { > status = "disabled"; > }; > }; > > ... > qcom,power-on@800 { > qcom,system-reset; > compatible = "qcom,qpnp-power-on"; > qcom,pon-dbc-delay = <0x3d09>; > interrupts = <0x00 0x08 0x00 0x00 0x00 0x08 0x01 0x00 0x00 0x08 0x04 0x00 0x00 0x08 0x05 0x00>; > qcom,kpdpwr-sw-debounce; > reg = <0x800 0x100>; > interrupt-names = "kpdpwr\0resin\0resin-bark\0kpdpwr-resin-bark"; > qcom,store-hard-reset-reason; > > qcom,pon_1 { > qcom,support-reset = <0x00>; > qcom,pull-up = <0x01>; > qcom,pon-type = <0x00>; > linux,code = <0x74>; > }; > > qcom,pon_2 { > qcom,pull-up = <0x01>; > qcom,pon-type = <0x01>; > linux,code = <0x72>; > }; > > arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi > index 46e25c53829a..6cb074de7696 100644 > --- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi > +++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi > @@ -847,6 +847,11 @@ speaker_default: speaker-default-state { > }; > }; > > +&pm8998_resin { > + linux,code = <KEY_VOLUMEDOWN>; > + status = "okay"; > +}; > + > &venus { > status = "okay"; > firmware-name = "qcom/sdm845/oneplus6/venus.mbn";
Hi Caleb, > Hi Petr, > On 20/11/2024 15:53, Petr Vorel wrote: > > OnePlus 6T (fajita) downstream device tree contains volume down GPIO key > > and resin. I suppose it is also in OnePlus 6 (enchilada). > The volume down key is already enabled under the gpio-keys node in > sdm845-oneplus-common.dtsi does it not work for you for some reason? Thanks for info. I'm sorry for the noise, obviously I was wrong. I noticed before gpio-keys but later forgot on it (staring to too many device tree files during day). That's how it endup if I dare to send patch without testing :(. > I don't believe the resin node is used on this board, it's ignosed on > the schematics at any rate. I saw resin in the downstream device tree (get from phone, not just by reading downstream source codes), but obviously if volume down is working resin is not needed anyway. Another example of how downstream device tree is messy, I would also trust schematics more. Kind regards, Petr > Kind regards, > > Signed-off-by: Petr Vorel <pvorel@suse.cz> > > --- > > Hi > > reason for RFC: > > * Unfortunately untested on the real device. > > * OnePlus 6 (enchilada) is nearly identical, but I haven't compared it's > > device tree. > > * Other sdm845 based devices just enable resin/volume down key the same > > way. But what confuses me is "gpios = <0xe7 0x05 0x01>;", does it need > > to enable gpios like sm6375-sony-xperia-murray-pdx225.dts in > > 795ee50e55f4 ("arm64: dts: qcom: sm6375-pdx225: Add volume down GPIO key") ? > > Below is snipped of the OnePlus 6T (fajita) downstream device tree. > > Kind regards, > > Petr > > gpio_keys { > > compatible = "gpio-keys"; > > label = "gpio-keys"; > > pinctrl-0 = <0x2f7>; > > pinctrl-names = "default"; > > vol_down { > > gpios = <0xe7 0x05 0x01>; > > linux,can-disable; > > debounce-interval = <0x0f>; > > label = "volume_down"; > > linux,input-type = <0x01>; > > linux,code = <0x72>; > > }; > > vol_up { > > gpios = <0xe7 0x06 0x01>; > > linux,can-disable; > > debounce-interval = <0x0f>; > > label = "volume_up"; > > linux,input-type = <0x01>; > > gpio-key,wakeup; > > linux,code = <0x73>; > > }; > > cam_focus { > > status = "disabled"; > > }; > > hallsensor_key { > > gpios = <0x34 0x7c 0x01>; > > debounce-interval = <0x0f>; > > interrupt-parent = <0x34>; > > interrupts = <0x7c 0x00>; > > label = "hallsensor_key"; > > linux,input-type = <0x05>; > > gpio-key,wakeup; > > linux,code = <0x00>; > > }; > > cam_snapshot { > > status = "disabled"; > > }; > > }; > > ... > > qcom,power-on@800 { > > qcom,system-reset; > > compatible = "qcom,qpnp-power-on"; > > qcom,pon-dbc-delay = <0x3d09>; > > interrupts = <0x00 0x08 0x00 0x00 0x00 0x08 0x01 0x00 0x00 0x08 0x04 0x00 0x00 0x08 0x05 0x00>; > > qcom,kpdpwr-sw-debounce; > > reg = <0x800 0x100>; > > interrupt-names = "kpdpwr\0resin\0resin-bark\0kpdpwr-resin-bark"; > > qcom,store-hard-reset-reason; > > qcom,pon_1 { > > qcom,support-reset = <0x00>; > > qcom,pull-up = <0x01>; > > qcom,pon-type = <0x00>; > > linux,code = <0x74>; > > }; > > qcom,pon_2 { > > qcom,pull-up = <0x01>; > > qcom,pon-type = <0x01>; > > linux,code = <0x72>; > > }; > > arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 5 +++++ > > 1 file changed, 5 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi > > index 46e25c53829a..6cb074de7696 100644 > > --- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi > > +++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi > > @@ -847,6 +847,11 @@ speaker_default: speaker-default-state { > > }; > > }; > > +&pm8998_resin { > > + linux,code = <KEY_VOLUMEDOWN>; > > + status = "okay"; > > +}; > > + > > &venus { > > status = "okay"; > > firmware-name = "qcom/sdm845/oneplus6/venus.mbn";
diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi index 46e25c53829a..6cb074de7696 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi @@ -847,6 +847,11 @@ speaker_default: speaker-default-state { }; }; +&pm8998_resin { + linux,code = <KEY_VOLUMEDOWN>; + status = "okay"; +}; + &venus { status = "okay"; firmware-name = "qcom/sdm845/oneplus6/venus.mbn";
OnePlus 6T (fajita) downstream device tree contains volume down GPIO key and resin. I suppose it is also in OnePlus 6 (enchilada). Signed-off-by: Petr Vorel <pvorel@suse.cz> --- Hi reason for RFC: * Unfortunately untested on the real device. * OnePlus 6 (enchilada) is nearly identical, but I haven't compared it's device tree. * Other sdm845 based devices just enable resin/volume down key the same way. But what confuses me is "gpios = <0xe7 0x05 0x01>;", does it need to enable gpios like sm6375-sony-xperia-murray-pdx225.dts in 795ee50e55f4 ("arm64: dts: qcom: sm6375-pdx225: Add volume down GPIO key") ? Below is snipped of the OnePlus 6T (fajita) downstream device tree. Kind regards, Petr gpio_keys { compatible = "gpio-keys"; label = "gpio-keys"; pinctrl-0 = <0x2f7>; pinctrl-names = "default"; vol_down { gpios = <0xe7 0x05 0x01>; linux,can-disable; debounce-interval = <0x0f>; label = "volume_down"; linux,input-type = <0x01>; linux,code = <0x72>; }; vol_up { gpios = <0xe7 0x06 0x01>; linux,can-disable; debounce-interval = <0x0f>; label = "volume_up"; linux,input-type = <0x01>; gpio-key,wakeup; linux,code = <0x73>; }; cam_focus { status = "disabled"; }; hallsensor_key { gpios = <0x34 0x7c 0x01>; debounce-interval = <0x0f>; interrupt-parent = <0x34>; interrupts = <0x7c 0x00>; label = "hallsensor_key"; linux,input-type = <0x05>; gpio-key,wakeup; linux,code = <0x00>; }; cam_snapshot { status = "disabled"; }; }; ... qcom,power-on@800 { qcom,system-reset; compatible = "qcom,qpnp-power-on"; qcom,pon-dbc-delay = <0x3d09>; interrupts = <0x00 0x08 0x00 0x00 0x00 0x08 0x01 0x00 0x00 0x08 0x04 0x00 0x00 0x08 0x05 0x00>; qcom,kpdpwr-sw-debounce; reg = <0x800 0x100>; interrupt-names = "kpdpwr\0resin\0resin-bark\0kpdpwr-resin-bark"; qcom,store-hard-reset-reason; qcom,pon_1 { qcom,support-reset = <0x00>; qcom,pull-up = <0x01>; qcom,pon-type = <0x00>; linux,code = <0x74>; }; qcom,pon_2 { qcom,pull-up = <0x01>; qcom,pon-type = <0x01>; linux,code = <0x72>; }; arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 5 +++++ 1 file changed, 5 insertions(+)