* [PATCH 1/2] arm64: dts: qcom: sm8250-xiaomi-elish: Add pm8008 PMIC
@ 2026-06-19 16:07 Xin Xu
2026-06-22 11:40 ` Konrad Dybcio
0 siblings, 1 reply; 5+ messages in thread
From: Xin Xu @ 2026-06-19 16:07 UTC (permalink / raw)
To: andersson, konradybcio; +Cc: linux-arm-msm, devicetree, linux-kernel, Xin Xu
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>
---
.../dts/qcom/sm8250-xiaomi-elish-common.dtsi | 94 +++++++++++++++++++
1 file changed, 94 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index 51b57c697a75..2687a2a8dda4 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -599,6 +599,82 @@ fuel-gauge@55 {
};
};
+&i2c15 {
+ clock-frequency = <400000>;
+ status = "okay";
+
+ pm8008: pmic@8 {
+ compatible = "qcom,pm8008";
+ reg = <0x8>;
+
+ interrupt-parent = <&tlmm>;
+ interrupts = <84 IRQ_TYPE_EDGE_RISING>;
+ reset-gpios = <&tlmm 76 GPIO_ACTIVE_LOW>;
+
+ vdd-l1-l2-supply = <&vreg_s8c_1p35>;
+ vdd-l3-l4-supply = <&vreg_bob>;
+ vdd-l5-supply = <&vreg_bob>;
+ vdd-l6-supply = <&vreg_bob>;
+ vdd-l7-supply = <&vreg_bob>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pm8008_default>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&pm8008 0 0 2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ #thermal-sensor-cells = <0>;
+
+ regulators {
+ vreg_l1p: ldo1 {
+ regulator-name = "vreg_l1p";
+ regulator-min-microvolt = <1152000>;
+ regulator-max-microvolt = <1152000>;
+ };
+
+ vreg_l2p: ldo2 {
+ regulator-name = "vreg_l2p";
+ regulator-min-microvolt = <1152000>;
+ regulator-max-microvolt = <1152000>;
+ };
+
+ vreg_l3p: ldo3 {
+ regulator-name = "vreg_l3p";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ };
+
+ vreg_l4p: ldo4 {
+ regulator-name = "vreg_l4p";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ };
+
+ vreg_l5p: ldo5 {
+ regulator-name = "vreg_l5p";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ };
+
+ vreg_l6p: ldo6 {
+ regulator-name = "vreg_l6p";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ vreg_l7p: ldo7 {
+ regulator-name = "vreg_l7p";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2900000>;
+ };
+ };
+ };
+};
+
&mdss {
status = "okay";
};
@@ -801,6 +877,24 @@ bt_en_state: bt-default-state {
bias-pull-up;
};
+ 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;
+ };
+ };
+
wlan_en_state: wlan-default-state {
pins = "gpio20";
function = "gpio";
--
2.53.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] arm64: dts: qcom: sm8250-xiaomi-elish: Add pm8008 PMIC
2026-06-19 16:07 [PATCH 1/2] arm64: dts: qcom: sm8250-xiaomi-elish: Add pm8008 PMIC Xin Xu
@ 2026-06-22 11:40 ` Konrad Dybcio
2026-06-22 18:07 ` Xin Xu
0 siblings, 1 reply; 5+ messages in thread
From: Konrad Dybcio @ 2026-06-22 11:40 UTC (permalink / raw)
To: Xin Xu, andersson, konradybcio; +Cc: linux-arm-msm, devicetree, linux-kernel
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>
> ---
> .../dts/qcom/sm8250-xiaomi-elish-common.dtsi | 94 +++++++++++++++++++
> 1 file changed, 94 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
> index 51b57c697a75..2687a2a8dda4 100644
> --- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
> @@ -599,6 +599,82 @@ fuel-gauge@55 {
> };
> };
>
> +&i2c15 {
> + clock-frequency = <400000>;
> + status = "okay";
nit: please add an \n before status
> +
> + pm8008: pmic@8 {
> + compatible = "qcom,pm8008";
> + reg = <0x8>;
> +
> + interrupt-parent = <&tlmm>;
> + interrupts = <84 IRQ_TYPE_EDGE_RISING>;
interrupts-extended = <&tlmm 84 IRQ_TYPE_EDGE_RISING>;
> + reset-gpios = <&tlmm 76 GPIO_ACTIVE_LOW>;
> +
> + vdd-l1-l2-supply = <&vreg_s8c_1p35>;
> + vdd-l3-l4-supply = <&vreg_bob>;
> + vdd-l5-supply = <&vreg_bob>;
> + vdd-l6-supply = <&vreg_bob>;
> + vdd-l7-supply = <&vreg_bob>;
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&pm8008_default>;
property-n
property-names
in this order, please
[...]
> + regulators {
> + vreg_l1p: ldo1 {
> + regulator-name = "vreg_l1p";
> + regulator-min-microvolt = <1152000>;
> + regulator-max-microvolt = <1152000>;
Make sure you verified all of the voltage ranges vs downstream,
as incorrect values may lead to hw damage
[...]
> + 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] arm64: dts: qcom: sm8250-xiaomi-elish: Add pm8008 PMIC
2026-06-22 11:40 ` Konrad Dybcio
@ 2026-06-22 18:07 ` Xin Xu
2026-06-24 11:00 ` Konrad Dybcio
0 siblings, 1 reply; 5+ messages in thread
From: Xin Xu @ 2026-06-22 18:07 UTC (permalink / raw)
To: konrad.dybcio
Cc: andersson, devicetree, konradybcio, linux-arm-msm, linux-kernel,
xxsemail
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>
> > ---
> > .../dts/qcom/sm8250-xiaomi-elish-common.dtsi | 94
> > +++++++++++++++++++
> > 1 file changed, 94 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-
> > common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-
> > common.dtsi
> > index 51b57c697a75..2687a2a8dda4 100644
> > --- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
> > @@ -599,6 +599,82 @@ fuel-gauge@55 {
> > };
> > };
> >
> > +&i2c15 {
> > + clock-frequency = <400000>;
> > + status = "okay";
>
> nit: please add an \n before status
>
> > +
> > + pm8008: pmic@8 {
> > + compatible = "qcom,pm8008";
> > + reg = <0x8>;
> > +
> > + interrupt-parent = <&tlmm>;
> > + interrupts = <84 IRQ_TYPE_EDGE_RISING>;
>
> interrupts-extended = <&tlmm 84 IRQ_TYPE_EDGE_RISING>;
>
>
> > + reset-gpios = <&tlmm 76 GPIO_ACTIVE_LOW>;
> > +
> > + vdd-l1-l2-supply = <&vreg_s8c_1p35>;
> > + vdd-l3-l4-supply = <&vreg_bob>;
> > + vdd-l5-supply = <&vreg_bob>;
> > + vdd-l6-supply = <&vreg_bob>;
> > + vdd-l7-supply = <&vreg_bob>;
> > +
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&pm8008_default>;
>
> property-n
> property-names
>
> in this order, please
>
> [...]
>
> > + regulators {
> > + vreg_l1p: ldo1 {
> > + regulator-name = "vreg_l1p";
> > + regulator-min-microvolt =
> > <1152000>;
> > + regulator-max-microvolt =
> > <1152000>;
>
> Make sure you verified all of the voltage ranges vs downstream,
> as incorrect values may lead to hw damage
>
> [...]
>
> > + 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
The voltage constraints for ldo1 and ldo2 were incorrect in my
previous patch; this will be corrected in v2.
Best regards,
Xin Xu
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] arm64: dts: qcom: sm8250-xiaomi-elish: Add pm8008 PMIC
2026-06-22 18:07 ` Xin Xu
@ 2026-06-24 11:00 ` Konrad Dybcio
2026-06-25 10:07 ` Xin Xu
0 siblings, 1 reply; 5+ messages in thread
From: Konrad Dybcio @ 2026-06-24 11:00 UTC (permalink / raw)
To: Xin Xu; +Cc: andersson, devicetree, konradybcio, linux-arm-msm, linux-kernel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] arm64: dts: qcom: sm8250-xiaomi-elish: Add pm8008 PMIC
2026-06-24 11:00 ` Konrad Dybcio
@ 2026-06-25 10:07 ` Xin Xu
0 siblings, 0 replies; 5+ messages in thread
From: Xin Xu @ 2026-06-25 10:07 UTC (permalink / raw)
To: konrad.dybcio
Cc: andersson, devicetree, konradybcio, linux-arm-msm, linux-kernel,
xxsemail
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>;
};
};
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-06-25 10:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-19 16:07 [PATCH 1/2] arm64: dts: qcom: sm8250-xiaomi-elish: Add pm8008 PMIC 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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox