mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xin Xu <xxsemail@qq.com>
To: konrad.dybcio@oss.qualcomm.com
Cc: andersson@kernel.org, devicetree@vger.kernel.org,
	konradybcio@kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org, xxsemail@qq.com
Subject: Re: [PATCH 1/2] arm64: dts: qcom: sm8250-xiaomi-elish: Add pm8008 PMIC
Date: Thu, 25 Jun 2026 18:07:44 +0800	[thread overview]
Message-ID: <tencent_FDB3230286DF272D5C2BD1292C7DA434D108@qq.com> (raw)
In-Reply-To: <891015c8-68df-4654-b1e7-94d73e74267c@oss.qualcomm.com>

On Wed, 2026-06-24 at 13:00 +0200, Konrad Dybcio wrote:
> On 6/22/26 8:07 PM, Xin Xu wrote:
> > On Mon, 2026-06-22 at 13:40 +0200, Konrad Dybcio wrote:
> > > On 6/19/26 6:07 PM, Xin Xu wrote:
> > > > Add the pm8008 PMIC node on i2c15 with seven LDOs,
> > > > using GPIO84 as interrupt and GPIO76 as reset.
> > > > 
> > > > Signed-off-by: Xin Xu <xxsemail@qq.com>
> > > > ---
> 
> [...]
> 
> > > > +	pm8008_default: pm8008-default-state {
> > > > +		int-pins {
> > > > +			pins = "gpio84";
> > > > +			function = "gpio";
> > > > +			bias-disable;
> > > > +			drive-strength = <2>;
> > > > +			input-enable;
> > > > +		};
> > > > +
> > > > +		reset-pins {
> > > > +			pins = "gpio76";
> > > > +			function = "gpio";
> > > > +			bias-pull-up;
> > > > +			drive-strength = <2>;
> > > > +			output-high;
> > > 
> > > Drop output-high, the driver will take care of setting the output
> > > state
> > > 
> > > Konrad
> > 
> > Thank you for your review!
> > 
> > I will fix the coding style issues (blank line before status,
> > interrupts-extended, property order, and dropping output-high)
> > in the next version.
> > 
> > I have verified all LDO voltages against the downstream device
> > tree:
> > https://github.com/MiCode/kernel_devicetree/tree/elish-r-oss/
> > The definitions can be found around lines 209–244 in
> > qcom/elish-sm8250-camera-board.dtsi
> 
> Thanks. It's best if you grab the DTB from a running device (which
> has all the overlays applied etc.), which you can grab from
> /sys/firmware/fdt
> 
> You can then pass that to DTC directly
> 
> Konrad

For additional verification, I have extracted the device tree from
/sys/firmware/fdt on a running device. The voltage values match the
ones in my patch exactly. Below is the relevant pm8008 regulator
portion:

qcom,pm8008-regulator {
	compatible = "qcom,pm8008-regulator";
	pm8008_en-supply = <0x708>;
	qcom,enable-ocp-broadcast;
	vdd_l1_l2-supply = <0xad>;
	vdd_l3_l4-supply = <0x2cf>;
	phandle = <0x7e6>;

	qcom,pm8008-l1@4000 {
		reg = <0x4000>;
		regulator-name = "pm8008_l1";
		regulator-min-microvolt = <0x124f80>; /* 1200000 */
		regulator-max-microvolt = <0x124f80>; /* 1200000 */
		qcom,min-dropout-voltage = <0x186a0>; /* 100000 */
		qcom,hpm-min-load = <0x00>;
		phandle = <0x71c>;
	};

	qcom,pm8008-l2@4100 {
		reg = <0x4100>;
		regulator-name = "pm8008_l2";
		regulator-min-microvolt = <0x124f80>; /* 1200000 */
		regulator-max-microvolt = <0x124f80>; /* 1200000 */
		qcom,min-dropout-voltage = <0x186a0>; /* 100000 */
		qcom,hpm-min-load = <0x00>;
		phandle = <0x713>;
	};

	qcom,pm8008-l3@4200 {
		reg = <0x4200>;
		regulator-name = "pm8008_l3";
		regulator-min-microvolt = <0x2ab980>; /* 2800000 */
		regulator-max-microvolt = <0x2ab980>; /* 2800000 */
		qcom,min-dropout-voltage = <0x30d40>; /* 200000 */
		qcom,hpm-min-load = <0x00>;
		phandle = <0x714>;
	};

	qcom,pm8008-l4@4300 {
		reg = <0x4300>;
		regulator-name = "pm8008_l4";
		regulator-min-microvolt = <0x2ab980>; /* 2800000 */
		regulator-max-microvolt = <0x2ab980>; /* 2800000 */
		qcom,min-dropout-voltage = <0x30d40>; /* 200000 */
		qcom,hpm-min-load = <0x00>;
		phandle = <0x70e>;
	};

	qcom,pm8008-l5@4400 {
		reg = <0x4400>;
		regulator-name = "pm8008_l5";
		regulator-min-microvolt = <0x2ab980>; /* 2800000 */
		regulator-max-microvolt = <0x2ab980>; /* 2800000 */
		qcom,min-dropout-voltage = <0x493e0>; /* 300000 */
		qcom,hpm-min-load = <0x00>;
		phandle = <0x71b>;
	};

	qcom,pm8008-l6@4400 {
		reg = <0x4500>;
		regulator-name = "pm8008_l6";
		regulator-min-microvolt = <0x1b7740>; /* 1800000 */
		regulator-max-microvolt = <0x1b7740>; /* 1800000 */
		qcom,min-dropout-voltage = <0x493e0>; /* 300000 */
		qcom,hpm-min-load = <0x00>;
		phandle = <0x7e7>;
	};

	qcom,pm8008-l7@4400 {
		reg = <0x4600>;
		regulator-name = "pm8008_l7";
		regulator-min-microvolt = <0x2ab980>; /* 2800000 */
		regulator-max-microvolt = <0x2c4020>; /* 2900000 */
		qcom,min-dropout-voltage = <0x493e0>; /* 300000 */
		qcom,hpm-min-load = <0x00>;
		phandle = <0x712>;
	};
};


      reply	other threads:[~2026-06-25 10:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-19 16:07 Xin Xu
2026-06-22 11:40 ` Konrad Dybcio
2026-06-22 18:07   ` Xin Xu
2026-06-24 11:00     ` Konrad Dybcio
2026-06-25 10:07       ` Xin Xu [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=tencent_FDB3230286DF272D5C2BD1292C7DA434D108@qq.com \
    --to=xxsemail@qq.com \
    --cc=andersson@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®