Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Caleb Connolly <caleb.connolly@linaro.org>
Cc: linux-arm-msm@vger.kernel.org, David Heidelberg <david@ixit.cz>,
	Joel Selvaraj <joelselvaraj.oss@gmail.com>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Dylan Van Assche <me@dylanvanassche.be>,
	Gergo Koteles <soyer@irl.hu>
Subject: Re: [RFC PATCH 1/1] arm64: dts: qcom: sdm845-oneplus-common: enable resin/volume down
Date: Wed, 20 Nov 2024 18:22:54 +0100	[thread overview]
Message-ID: <20241120172254.GB38310@pevik> (raw)
In-Reply-To: <ab1f91bd-8b6d-4825-90e3-b6a995e346f0@linaro.org>

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";

      reply	other threads:[~2024-11-20 17:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-20 14:53 [RFC PATCH 1/1] arm64: dts: qcom: sdm845-oneplus-common: enable resin/volume down Petr Vorel
2024-11-20 15:37 ` Caleb Connolly
2024-11-20 17:22   ` Petr Vorel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241120172254.GB38310@pevik \
    --to=pvorel@suse.cz \
    --cc=caleb.connolly@linaro.org \
    --cc=david@ixit.cz \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=joelselvaraj.oss@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=me@dylanvanassche.be \
    --cc=soyer@irl.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox