]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: axp20x: add software based soft_start for AXP209 LDO3
authorOlliver Schinagl <oliver@schinagl.nl>
Tue, 11 Dec 2018 15:17:08 +0000 (17:17 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 13 Dec 2018 16:39:55 +0000 (16:39 +0000)
commit646ca48511685305a19a2c511cdfdd608ff0a554
treebde9312823e5395918e021696a2cb7a258f4f3b2
parent9cbd4eca9b232cfb311b6d50ce3f4d9e422f2e0c
regulator: axp20x: add software based soft_start for AXP209 LDO3

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, we use the soft-start constraint of the regulator
node 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
enable voltage slowly and staggered, potentially reducing overall
inrush current.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/axp20x-regulator.c