Re: [PATCH 1/2] arm64: dts: qcom: sm8250-xiaomi-elish: Add pm8008 PMIC

From: Xin Xu

Date: Thu Jun 25 2026 - 06:08:59 EST


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@xxxxxx>
> > > > ---
>
> [...]
>
> > > > + 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>;
};
};