diff mbox series

[07/14] dt-bindings: mfd: axp20x: Add software based soft_start for AXP209 LDO3

Message ID 2cd75ee27982f3be0d86104d80eaa13efeb2c65d.1543245984.git-series.plaes@plaes.org (mailing list archive)
State Not Applicable, archived
Headers show
Series regulator: axp20x: Stop AXP209 from crashing when enabling LDO3 | expand

Commit Message

Priit Laes Nov. 26, 2018, 3:27 p.m. UTC
From: Olliver Schinagl <oliver@schinagl.nl>

In the past, there have been words on various lists that if LDO3 is
disabled in u-boot, but enabled in the DTS, the axp209 driver would
fail to continue/hang. Several enable/disable patches have been
issues to devicetree's in both the kernel and u-boot to address
this issue.

What really happened however, was that the AXP209 shuts down without
a notice and without setting an interrupt. This is caused when LDO3
gets overloaded, for example with large capacitors on the LDO3 output.

Normally, we would expect that AXP209 would source 200 mA as per
datasheet and set and trigger an interrupt when being overloaded.
For some reason however, this does not happen.

As a work-around, implement software-based 'regulator-soft-start'
property for AXP209 LDO3 regulator, which is used to first bring up
the LDO3 to the lowest possible voltage and then enable the LDO.

After that, we can set the requested voltage as usual.

Combining this setting with the regulator-ramp-delay allows LDO3 to
come up slowly and staggered, potentially reducing overall inrush current.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Priit Laes <plaes@plaes.org>
---
 Documentation/devicetree/bindings/mfd/axp20x.txt | 3 +++
 1 file changed, 3 insertions(+)

Comments

Mark Brown Nov. 26, 2018, 4:58 p.m. UTC | #1
On Mon, Nov 26, 2018 at 05:27:48PM +0200, Priit Laes wrote:

> +- regulator-soft-start:	enable the output at the lowest possible voltage and
> +			only then set the desired voltage
> +			AXP20x/LDO3

This is a generic property, there is no need to document it in each
device binding.
Lee Jones Nov. 28, 2018, 9:31 a.m. UTC | #2
On Mon, 26 Nov 2018, Mark Brown wrote:

> On Mon, Nov 26, 2018 at 05:27:48PM +0200, Priit Laes wrote:
> 
> > +- regulator-soft-start:	enable the output at the lowest possible voltage and
> > +			only then set the desired voltage
> > +			AXP20x/LDO3
> 
> This is a generic property, there is no need to document it in each
> device binding.

It's not unwelcome here though.

Particularly with such a nicely written up commit messages.

I'll leave it up to you, but it's fine by me.

For my own reference:
  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mfd/axp20x.txt b/Documentation/devicetree/bindings/mfd/axp20x.txt
index 5542212..7e97bb7 100644
--- a/Documentation/devicetree/bindings/mfd/axp20x.txt
+++ b/Documentation/devicetree/bindings/mfd/axp20x.txt
@@ -36,6 +36,9 @@  Supported common regulator properties, see regulator.txt for more information:
 - regulator-ramp-delay: sets the ramp up delay in uV/us
 			AXP20x/DCDC2: 1600, 800
 			AXP20x/LDO3:  1600, 800
+- regulator-soft-start:	enable the output at the lowest possible voltage and
+			only then set the desired voltage
+			AXP20x/LDO3
 
 Optional properties:
 - x-powers,dcdc-freq: defines the work frequency of DC-DC in KHz