diff mbox series

[V3,12/14] ARM: dts: stm32: Repair PMIC configuration on AV96

Message ID 20200331175136.205020-13-marex@denx.de
State Accepted
Commit 2f3c4b8a0f303edbea9fc112a49e546cf03776b0
Delegated to: Patrick Delaunay
Headers show
Series ARM: stm32: Fix Avenger96 | expand

Commit Message

Marek Vasut March 31, 2020, 5:51 p.m. UTC
The core and vdd PMIC buck regulators were misconfigured, which caused
instability of the board and malfunction of high-speed interfaces, like
the RGMII. Configure the PMIC correctly to repair these problems. Also,
model the missing Enpirion EP53A8LQI on the DHCOR SoM as a fixed regulator.

Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
---
V2: - Model the Enpirion EP53A8LQI on the DHCOR SoM as a fixed regulator
    - Adjust the PMIC voltages further
V3: No change
---
 arch/arm/dts/stm32mp157a-avenger96.dts | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

Comments

Patrick DELAUNAY April 1, 2020, 7:34 a.m. UTC | #1
Hi Marek and Pascal,

> From: Marek Vasut <marex@denx.de>
> Sent: mardi 31 mars 2020 19:52
> 
> The core and vdd PMIC buck regulators were misconfigured, which caused
> instability of the board and malfunction of high-speed interfaces, like the RGMII.
> Configure the PMIC correctly to repair these problems. Also, model the missing
> Enpirion EP53A8LQI on the DHCOR SoM as a fixed regulator.
> 
> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> Cc: Patrick Delaunay <patrick.delaunay@st.com>
> Cc: Patrice Chotard <patrice.chotard@st.com>
> ---
> V2: - Model the Enpirion EP53A8LQI on the DHCOR SoM as a fixed regulator
>     - Adjust the PMIC voltages further
> V3: No change
> ---
>  arch/arm/dts/stm32mp157a-avenger96.dts | 20 ++++++++++++++++----
>  1 file changed, 16 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/dts/stm32mp157a-avenger96.dts
> b/arch/arm/dts/stm32mp157a-avenger96.dts
> index 8181d1fa05..97ff40144e 100644
> --- a/arch/arm/dts/stm32mp157a-avenger96.dts
> +++ b/arch/arm/dts/stm32mp157a-avenger96.dts
> @@ -91,6 +91,17 @@
>  		states = <1800000 0x1>,
>  			 <2900000 0x0>;
>  	};
> +
> +	/* Enpirion EP3A8LQI U2 on the DHCOR */
> +	vdd_io: regulator-buck-io {
> +		compatible = "regulator-fixed";
> +		regulator-name = "buck-io";
> +		regulator-min-microvolt = <1800000>;
> +		regulator-max-microvolt = <1800000>;
> +		regulator-always-on;
> +		regulator-boot-on;
> +		vin-supply = <&vdd>;
> +	};
>  };
> 
>  &ethernet0 {
> @@ -167,7 +178,7 @@
> 
>  			vddcore: buck1 {
>  				regulator-name = "vddcore";
> -				regulator-min-microvolt = <1200000>;
> +				regulator-min-microvolt = <800000>;

I don't understood this modification, If I correctly remember, on STM32MP15x 
On ST boards, we set this value to 1200000 to protect VDDCORE on
SOC (it is not allowed to be reduce lower than 1,2V.

0.8V is the minimal supported voltage by STPMIC but not the minal expected 
VDDCORE.

>  				regulator-max-microvolt = <1350000>;
>  				regulator-always-on;
>  				regulator-initial-mode = <0>;
> @@ -185,8 +196,8 @@
> 
>  			vdd: buck3 {
>  				regulator-name = "vdd";
> -				regulator-min-microvolt = <3300000>;
> -				regulator-max-microvolt = <3300000>;
> +				regulator-min-microvolt = <2900000>;
> +				regulator-max-microvolt = <2900000>;
>  				regulator-always-on;
>  				st,mask_reset;
>  				regulator-initial-mode = <0>;
> @@ -268,6 +279,7 @@
>  				regulator-name = "vbus_otg";
>  				interrupts = <IT_OCP_OTG 0>;
>  				interrupt-parent = <&pmic>;
> +				regulator-active-discharge = <1>;

It seems this setting introduced other-consumption, it should not be used.

>  			};
> 
>  			vbus_sw: pwr_sw2 {
> @@ -304,7 +316,7 @@
>  };
> 
>  &pwr_regulators {
> -	vdd-supply = <&vdd>;
> +	vdd-supply = <&vdd_io>;
>  	vdd_3v3_usbfs-supply = <&vdd_usb>;
>  };
> 
> --
> 2.25.1

I let Pascal complete my first feedback or react on the Linux upstream.

Patrick
Patrick DELAUNAY April 1, 2020, 10:04 a.m. UTC | #2
Hi,

> From: Marek Vasut <marex@denx.de>
> Sent: mardi 31 mars 2020 19:52
> 
> The core and vdd PMIC buck regulators were misconfigured, which caused
> instability of the board and malfunction of high-speed interfaces, like the RGMII.
> Configure the PMIC correctly to repair these problems. Also, model the missing
> Enpirion EP53A8LQI on the DHCOR SoM as a fixed regulator.
> 
> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> Cc: Patrick Delaunay <patrick.delaunay@st.com>
> Cc: Patrice Chotard <patrice.chotard@st.com>
> ---

Applied to u-boot-stm/master, thanks!

Regards

Patrick
Marek Vasut April 1, 2020, 11:06 a.m. UTC | #3
On 4/1/20 9:34 AM, Patrick DELAUNAY wrote:
> Hi Marek and Pascal,

Hi,

[...]

>> @@ -167,7 +178,7 @@
>>
>>  			vddcore: buck1 {
>>  				regulator-name = "vddcore";
>> -				regulator-min-microvolt = <1200000>;
>> +				regulator-min-microvolt = <800000>;
> 
> I don't understood this modification, If I correctly remember, on STM32MP15x 
> On ST boards, we set this value to 1200000 to protect VDDCORE on
> SOC (it is not allowed to be reduce lower than 1,2V.
> 
> 0.8V is the minimal supported voltage by STPMIC but not the minal expected 
> VDDCORE.

Then we should likely drop this part.

That said, is the core voltage supposed to be 1V2 even in sleep states ?

>> @@ -185,8 +196,8 @@
>>
>>  			vdd: buck3 {
>>  				regulator-name = "vdd";
>> -				regulator-min-microvolt = <3300000>;
>> -				regulator-max-microvolt = <3300000>;
>> +				regulator-min-microvolt = <2900000>;
>> +				regulator-max-microvolt = <2900000>;
>>  				regulator-always-on;
>>  				st,mask_reset;
>>  				regulator-initial-mode = <0>;
>> @@ -268,6 +279,7 @@
>>  				regulator-name = "vbus_otg";
>>  				interrupts = <IT_OCP_OTG 0>;
>>  				interrupt-parent = <&pmic>;
>> +				regulator-active-discharge = <1>;
> 
> It seems this setting introduced other-consumption, it should not be used.

Other-consumption ? What does that mean ?
Patrice CHOTARD April 1, 2020, 12:45 p.m. UTC | #4
On 4/1/20 1:06 PM, Marek Vasut wrote:
> On 4/1/20 9:34 AM, Patrick DELAUNAY wrote:
>> Hi Marek and Pascal,
> Hi,
>
> [...]
>
>>> @@ -167,7 +178,7 @@
>>>
>>>  			vddcore: buck1 {
>>>  				regulator-name = "vddcore";
>>> -				regulator-min-microvolt = <1200000>;
>>> +				regulator-min-microvolt = <800000>;
>> I don't understood this modification, If I correctly remember, on STM32MP15x 
>> On ST boards, we set this value to 1200000 to protect VDDCORE on
>> SOC (it is not allowed to be reduce lower than 1,2V.
>>
>> 0.8V is the minimal supported voltage by STPMIC but not the minal expected 
>> VDDCORE.
> Then we should likely drop this part.
>
> That said, is the core voltage supposed to be 1V2 even in sleep states ?
>
>>> @@ -185,8 +196,8 @@
>>>
>>>  			vdd: buck3 {
>>>  				regulator-name = "vdd";
>>> -				regulator-min-microvolt = <3300000>;
>>> -				regulator-max-microvolt = <3300000>;
>>> +				regulator-min-microvolt = <2900000>;
>>> +				regulator-max-microvolt = <2900000>;
>>>  				regulator-always-on;
>>>  				st,mask_reset;
>>>  				regulator-initial-mode = <0>;
>>> @@ -268,6 +279,7 @@
>>>  				regulator-name = "vbus_otg";
>>>  				interrupts = <IT_OCP_OTG 0>;
>>>  				interrupt-parent = <&pmic>;
>>> +				regulator-active-discharge = <1>;
>> It seems this setting introduced other-consumption, it should not be used.
> Other-consumption ? What does that mean ?

It's a typo, Patrick means over-consumption.

Patrice
Marek Vasut April 1, 2020, 12:53 p.m. UTC | #5
On 4/1/20 2:45 PM, Patrice CHOTARD wrote:
> 
> On 4/1/20 1:06 PM, Marek Vasut wrote:
>> On 4/1/20 9:34 AM, Patrick DELAUNAY wrote:
>>> Hi Marek and Pascal,
>> Hi,
>>
>> [...]
>>
>>>> @@ -167,7 +178,7 @@
>>>>
>>>>  			vddcore: buck1 {
>>>>  				regulator-name = "vddcore";
>>>> -				regulator-min-microvolt = <1200000>;
>>>> +				regulator-min-microvolt = <800000>;
>>> I don't understood this modification, If I correctly remember, on STM32MP15x 
>>> On ST boards, we set this value to 1200000 to protect VDDCORE on
>>> SOC (it is not allowed to be reduce lower than 1,2V.
>>>
>>> 0.8V is the minimal supported voltage by STPMIC but not the minal expected 
>>> VDDCORE.
>> Then we should likely drop this part.
>>
>> That said, is the core voltage supposed to be 1V2 even in sleep states ?
>>
>>>> @@ -185,8 +196,8 @@
>>>>
>>>>  			vdd: buck3 {
>>>>  				regulator-name = "vdd";
>>>> -				regulator-min-microvolt = <3300000>;
>>>> -				regulator-max-microvolt = <3300000>;
>>>> +				regulator-min-microvolt = <2900000>;
>>>> +				regulator-max-microvolt = <2900000>;
>>>>  				regulator-always-on;
>>>>  				st,mask_reset;
>>>>  				regulator-initial-mode = <0>;
>>>> @@ -268,6 +279,7 @@
>>>>  				regulator-name = "vbus_otg";
>>>>  				interrupts = <IT_OCP_OTG 0>;
>>>>  				interrupt-parent = <&pmic>;
>>>> +				regulator-active-discharge = <1>;
>>> It seems this setting introduced other-consumption, it should not be used.
>> Other-consumption ? What does that mean ?
> 
> It's a typo, Patrick means over-consumption.

Ah. Do you have any details on that ?
Patrick DELAUNAY April 1, 2020, 1:52 p.m. UTC | #6
Hi,

> From: Marek Vasut <marex@denx.de>
> Sent: mercredi 1 avril 2020 14:53
> To: Patrice CHOTARD <patrice.chotard@st.com>; Patrick DELAUNAY
> <patrick.delaunay@st.com>; u-boot@lists.denx.de; Pascal PAILLET-LME
> <p.paillet@st.com>
> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>; Alexandre
> TORGUE <alexandre.torgue@st.com>
> Subject: Re: [PATCH V3 12/14] ARM: dts: stm32: Repair PMIC configuration on
> AV96
> Importance: High
> 
> On 4/1/20 2:45 PM, Patrice CHOTARD wrote:
> >
> > On 4/1/20 1:06 PM, Marek Vasut wrote:
> >> On 4/1/20 9:34 AM, Patrick DELAUNAY wrote:
> >>> Hi Marek and Pascal,
> >> Hi,
> >>
> >> [...]
[...]
> >>>>  			vdd: buck3 {
> >>>>  				regulator-name = "vdd";
> >>>> -				regulator-min-microvolt = <3300000>;
> >>>> -				regulator-max-microvolt = <3300000>;
> >>>> +				regulator-min-microvolt = <2900000>;
> >>>> +				regulator-max-microvolt = <2900000>;
> >>>>  				regulator-always-on;
> >>>>  				st,mask_reset;
> >>>>  				regulator-initial-mode = <0>;
> >>>> @@ -268,6 +279,7 @@
> >>>>  				regulator-name = "vbus_otg";
> >>>>  				interrupts = <IT_OCP_OTG 0>;
> >>>>  				interrupt-parent = <&pmic>;
> >>>> +				regulator-active-discharge = <1>;
> >>> It seems this setting introduced other-consumption, it should not be used.
> >> Other-consumption ? What does that mean ?
> >
> > It's a typo, Patrick means over-consumption.
> 
> Ah. Do you have any details on that ?

Sorry for typo.

No details on my side, it was a Pascal Paillet's direct feedback
(Maintainer of STPMIC1 driver in Linux).

Anyway he will review your patch for Linux, with more details,
and I merge this patch without modification for U-Boot.

Patrick
Marek Vasut April 1, 2020, 1:53 p.m. UTC | #7
On 4/1/20 3:52 PM, Patrick DELAUNAY wrote:
> Hi,
> 
>> From: Marek Vasut <marex@denx.de>
>> Sent: mercredi 1 avril 2020 14:53
>> To: Patrice CHOTARD <patrice.chotard@st.com>; Patrick DELAUNAY
>> <patrick.delaunay@st.com>; u-boot@lists.denx.de; Pascal PAILLET-LME
>> <p.paillet@st.com>
>> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>; Alexandre
>> TORGUE <alexandre.torgue@st.com>
>> Subject: Re: [PATCH V3 12/14] ARM: dts: stm32: Repair PMIC configuration on
>> AV96
>> Importance: High
>>
>> On 4/1/20 2:45 PM, Patrice CHOTARD wrote:
>>>
>>> On 4/1/20 1:06 PM, Marek Vasut wrote:
>>>> On 4/1/20 9:34 AM, Patrick DELAUNAY wrote:
>>>>> Hi Marek and Pascal,
>>>> Hi,
>>>>
>>>> [...]
> [...]
>>>>>>  			vdd: buck3 {
>>>>>>  				regulator-name = "vdd";
>>>>>> -				regulator-min-microvolt = <3300000>;
>>>>>> -				regulator-max-microvolt = <3300000>;
>>>>>> +				regulator-min-microvolt = <2900000>;
>>>>>> +				regulator-max-microvolt = <2900000>;
>>>>>>  				regulator-always-on;
>>>>>>  				st,mask_reset;
>>>>>>  				regulator-initial-mode = <0>;
>>>>>> @@ -268,6 +279,7 @@
>>>>>>  				regulator-name = "vbus_otg";
>>>>>>  				interrupts = <IT_OCP_OTG 0>;
>>>>>>  				interrupt-parent = <&pmic>;
>>>>>> +				regulator-active-discharge = <1>;
>>>>> It seems this setting introduced other-consumption, it should not be used.
>>>> Other-consumption ? What does that mean ?
>>>
>>> It's a typo, Patrick means over-consumption.
>>
>> Ah. Do you have any details on that ?
> 
> Sorry for typo.
> 
> No details on my side, it was a Pascal Paillet's direct feedback
> (Maintainer of STPMIC1 driver in Linux).
> 
> Anyway he will review your patch for Linux, with more details,
> and I merge this patch without modification for U-Boot.

OK
Pascal PAILLET-LME April 2, 2020, 12:53 p.m. UTC | #8
Hi Marek,


> -----Original Message-----
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: mercredi 1 avril 2020 15:52
> To: Marek Vasut <marex@denx.de>; Patrice CHOTARD
> <patrice.chotard@st.com>; u-boot@lists.denx.de; Pascal PAILLET-LME
> <p.paillet@st.com>
> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>;
> Alexandre TORGUE <alexandre.torgue@st.com>
> Subject: RE: [PATCH V3 12/14] ARM: dts: stm32: Repair PMIC configuration on
> AV96
> 
> Hi,
> 
> > From: Marek Vasut <marex@denx.de>
> > Sent: mercredi 1 avril 2020 14:53
> > To: Patrice CHOTARD <patrice.chotard@st.com>; Patrick DELAUNAY
> > <patrick.delaunay@st.com>; u-boot@lists.denx.de; Pascal PAILLET-LME
> > <p.paillet@st.com>
> > Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>;
> > Alexandre TORGUE <alexandre.torgue@st.com>
> > Subject: Re: [PATCH V3 12/14] ARM: dts: stm32: Repair PMIC
> > configuration on
> > AV96
> > Importance: High
> >
> > On 4/1/20 2:45 PM, Patrice CHOTARD wrote:
> > >
> > > On 4/1/20 1:06 PM, Marek Vasut wrote:
> > >> On 4/1/20 9:34 AM, Patrick DELAUNAY wrote:
> > >>> Hi Marek and Pascal,
> > >> Hi,
> > >>
> > >> [...]
> [...]
> > >>>>  			vdd: buck3 {
> > >>>>  				regulator-name = "vdd";
> > >>>> -				regulator-min-microvolt = <3300000>;
> > >>>> -				regulator-max-microvolt = <3300000>;
> > >>>> +				regulator-min-microvolt = <2900000>;
> > >>>> +				regulator-max-microvolt = <2900000>;
> > >>>>  				regulator-always-on;
> > >>>>  				st,mask_reset;
> > >>>>  				regulator-initial-mode = <0>; @@ -
> 268,6 +279,7 @@
> > >>>>  				regulator-name = "vbus_otg";
> > >>>>  				interrupts = <IT_OCP_OTG 0>;
> > >>>>  				interrupt-parent = <&pmic>;
> > >>>> +				regulator-active-discharge = <1>;
> > >>> It seems this setting introduced other-consumption, it should not be
> used.
> > >> Other-consumption ? What does that mean ?
> > >
> > > It's a typo, Patrick means over-consumption.
> >
> > Ah. Do you have any details on that ?
> 
> Sorry for typo.
> 
> No details on my side, it was a Pascal Paillet's direct feedback (Maintainer of
> STPMIC1 driver in Linux).
You can enable the active discharge on the STPMIC1's VBUSOTG. But, as soon as a USB host peripheral (such as laptop) will attach and provide VBUS, there will be a ~8mA continuous power consumption on VBUS through this OTG active discharge. There is no functional issue behind this 8mA; but you need to know that 8mA is not compliant with the USB suspend constraint (2.5mA max).
> 
> Anyway he will review your patch for Linux, with more details, and I merge
> this patch without modification for U-Boot.
> 
> Patrick

Pascal
Marek Vasut April 2, 2020, 1:07 p.m. UTC | #9
On 4/2/20 2:53 PM, Pascal PAILLET-LME wrote:
> Hi Marek,

Hi,
[...]
>>>>>>>  			vdd: buck3 {
>>>>>>>  				regulator-name = "vdd";
>>>>>>> -				regulator-min-microvolt = <3300000>;
>>>>>>> -				regulator-max-microvolt = <3300000>;
>>>>>>> +				regulator-min-microvolt = <2900000>;
>>>>>>> +				regulator-max-microvolt = <2900000>;
>>>>>>>  				regulator-always-on;
>>>>>>>  				st,mask_reset;
>>>>>>>  				regulator-initial-mode = <0>; @@ -
>> 268,6 +279,7 @@
>>>>>>>  				regulator-name = "vbus_otg";
>>>>>>>  				interrupts = <IT_OCP_OTG 0>;
>>>>>>>  				interrupt-parent = <&pmic>;
>>>>>>> +				regulator-active-discharge = <1>;
>>>>>> It seems this setting introduced other-consumption, it should not be
>> used.
>>>>> Other-consumption ? What does that mean ?
>>>>
>>>> It's a typo, Patrick means over-consumption.
>>>
>>> Ah. Do you have any details on that ?
>>
>> Sorry for typo.
>>
>> No details on my side, it was a Pascal Paillet's direct feedback (Maintainer of
>> STPMIC1 driver in Linux).
> You can enable the active discharge on the STPMIC1's VBUSOTG. But, as soon as a USB host peripheral (such as laptop) will attach and provide VBUS, there will be a ~8mA continuous power consumption on VBUS through this OTG active discharge. There is no functional issue behind this 8mA; but you need to know that 8mA is not compliant with the USB suspend constraint (2.5mA max).

So why is it in there ?
Pascal PAILLET-LME April 2, 2020, 1:43 p.m. UTC | #10
> -----Original Message-----
> From: Marek Vasut <marex@denx.de>
> Sent: jeudi 2 avril 2020 15:07
> To: Pascal PAILLET-LME <p.paillet@st.com>; Patrick DELAUNAY
> <patrick.delaunay@st.com>; Patrice CHOTARD <patrice.chotard@st.com>; u-
> boot@lists.denx.de
> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>;
> Alexandre TORGUE <alexandre.torgue@st.com>
> Subject: Re: [PATCH V3 12/14] ARM: dts: stm32: Repair PMIC configuration
> on AV96
> 
> On 4/2/20 2:53 PM, Pascal PAILLET-LME wrote:
> > Hi Marek,
> 
> Hi,
> [...]
> >>>>>>>  			vdd: buck3 {
> >>>>>>>  				regulator-name = "vdd";
> >>>>>>> -				regulator-min-microvolt = <3300000>;
> >>>>>>> -				regulator-max-microvolt = <3300000>;
> >>>>>>> +				regulator-min-microvolt = <2900000>;
> >>>>>>> +				regulator-max-microvolt = <2900000>;
> >>>>>>>  				regulator-always-on;
> >>>>>>>  				st,mask_reset;
> >>>>>>>  				regulator-initial-mode = <0>; @@ -
> >> 268,6 +279,7 @@
> >>>>>>>  				regulator-name = "vbus_otg";
> >>>>>>>  				interrupts = <IT_OCP_OTG 0>;
> >>>>>>>  				interrupt-parent = <&pmic>;
> >>>>>>> +				regulator-active-discharge = <1>;
> >>>>>> It seems this setting introduced other-consumption, it should not be
> >> used.
> >>>>> Other-consumption ? What does that mean ?
> >>>>
> >>>> It's a typo, Patrick means over-consumption.
> >>>
> >>> Ah. Do you have any details on that ?
> >>
> >> Sorry for typo.
> >>
> >> No details on my side, it was a Pascal Paillet's direct feedback (Maintainer
> of
> >> STPMIC1 driver in Linux).
> > You can enable the active discharge on the STPMIC1's VBUSOTG. But, as
> soon as a USB host peripheral (such as laptop) will attach and provide VBUS,
> there will be a ~8mA continuous power consumption on VBUS through this
> OTG active discharge. There is no functional issue behind this 8mA; but you
> need to know that 8mA is not compliant with the USB suspend constraint
> (2.5mA max).
> 
> So why is it in there ?
Sorry, I'm not sure to catch your point... The property is available because the stpmic1
Propose this feature (enable a pull down resistor when VBUS_OTG is disabled). We have
Found during some test that it is better to not enable active discharge on vbus_otg.
I hope it answers,
pascal
Marek Vasut April 9, 2020, 11:28 a.m. UTC | #11
On 4/2/20 3:43 PM, Pascal PAILLET-LME wrote:
Hi,

[...]

>>>> No details on my side, it was a Pascal Paillet's direct feedback (Maintainer
>> of
>>>> STPMIC1 driver in Linux).
>>> You can enable the active discharge on the STPMIC1's VBUSOTG. But, as
>> soon as a USB host peripheral (such as laptop) will attach and provide VBUS,
>> there will be a ~8mA continuous power consumption on VBUS through this
>> OTG active discharge. There is no functional issue behind this 8mA; but you
>> need to know that 8mA is not compliant with the USB suspend constraint
>> (2.5mA max).
>>
>> So why is it in there ?
> Sorry, I'm not sure to catch your point... The property is available because the stpmic1
> Propose this feature (enable a pull down resistor when VBUS_OTG is disabled). We have
> Found during some test that it is better to not enable active discharge on vbus_otg.
> I hope it answers,
> pascal

Can you go into a bit more detail on what you found during your tests
and why it was a problem ?
diff mbox series

Patch

diff --git a/arch/arm/dts/stm32mp157a-avenger96.dts b/arch/arm/dts/stm32mp157a-avenger96.dts
index 8181d1fa05..97ff40144e 100644
--- a/arch/arm/dts/stm32mp157a-avenger96.dts
+++ b/arch/arm/dts/stm32mp157a-avenger96.dts
@@ -91,6 +91,17 @@ 
 		states = <1800000 0x1>,
 			 <2900000 0x0>;
 	};
+
+	/* Enpirion EP3A8LQI U2 on the DHCOR */
+	vdd_io: regulator-buck-io {
+		compatible = "regulator-fixed";
+		regulator-name = "buck-io";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		regulator-always-on;
+		regulator-boot-on;
+		vin-supply = <&vdd>;
+	};
 };
 
 &ethernet0 {
@@ -167,7 +178,7 @@ 
 
 			vddcore: buck1 {
 				regulator-name = "vddcore";
-				regulator-min-microvolt = <1200000>;
+				regulator-min-microvolt = <800000>;
 				regulator-max-microvolt = <1350000>;
 				regulator-always-on;
 				regulator-initial-mode = <0>;
@@ -185,8 +196,8 @@ 
 
 			vdd: buck3 {
 				regulator-name = "vdd";
-				regulator-min-microvolt = <3300000>;
-				regulator-max-microvolt = <3300000>;
+				regulator-min-microvolt = <2900000>;
+				regulator-max-microvolt = <2900000>;
 				regulator-always-on;
 				st,mask_reset;
 				regulator-initial-mode = <0>;
@@ -268,6 +279,7 @@ 
 				regulator-name = "vbus_otg";
 				interrupts = <IT_OCP_OTG 0>;
 				interrupt-parent = <&pmic>;
+				regulator-active-discharge = <1>;
 			};
 
 			vbus_sw: pwr_sw2 {
@@ -304,7 +316,7 @@ 
 };
 
 &pwr_regulators {
-	vdd-supply = <&vdd>;
+	vdd-supply = <&vdd_io>;
 	vdd_3v3_usbfs-supply = <&vdd_usb>;
 };