[U-Boot] [PATCH v3 0/9] Stop AXP from crashing when enabling LDO3
Priit Laes
plaes at plaes.org
Wed Nov 21 18:05:24 UTC 2018
This is a resend/v2 of a "Stop AXP from crashing when enabling LDO3" series,
posted by Olliver Schinagl in March 2017. Unfortunately it never got past
initial discussion [1], but most Olimex Lime2 boards are still running
into this bug.
When powering up an AXP209, the default value for LDO3 output is enabled. This
works fine. However if for whatever reason, LDO3 is disabled, for example by OS
during reboot and u-boot enables LDO3 again, the PMIC shuts down (without
setting an interrupt) causing the board to hang. This behavior has been seen
from Linux as well, u-boot disables LDO3 as a default value, the kernel enables
it per its DTS, the kernel hangs as the PMIC gets shut down.
The root cause is that some boards have too high capacitance on the LDO3 output
port causing inrush currents exceeding the maximum of the AXP209.
The fix is to turn on the LDO3 at the lowest possible voltage and then set the
final voltage.
If the capacitance is really big (due to a connected device for example) the
AXP209 also features VRC, or Voltage Rate Control, allowing voltage to ramp up
even slower.
Similar changes need to be also implemented in the operating system driver
side when driver needs to toggle power for the ALDO3 regulator.
This patch series implements the above with a few tiny cleanups.
The initial discussion with some scope screenshots can be found in the
linux-sunxi mailing list [0].
And the initial series were posted to u-boot mailing list [1].
Signed-off-by: Olliver Schinagl <oliver at schinagl.nl>
Signed-off-by: Priit Laes <plaes at plaes.org>
[0] https://groups.google.com/forum/m/#!topic/linux-sunxi/EDvEsbHHqQI
[1] https://lists.denx.de/pipermail/u-boot/2017-March/282789.html
--
Changes since v2:
- Collected Acked-by tags, patches 1,3-5 are now ripe for picking.
- Olliver fixed wrong code in patch 2, thanks for Maxime for spotting
- Fixed checkpatch error in patch 5
- Expanded commit message for patch 6
Changes from initial submission:
- Rebased on top of latest master and fixed conflicts
- Added comments about datasheet errors for patch 6
- Fixed some typos and checkpatch errors
- Added patch to Olimex Lime2 eMMC board
Olliver Schinagl (8):
sunxi: board: Print error after power initialization fails
sunxi: pmic_bus: Decrease boot time by not writing duplicate data
power: axp209: Use BIT() macro
power: axp209: Define the chip version mask
power: axp209: Reduce magic values by adding defines for LDO[234]
power: axp209: Add support for voltage rate control on LDO3
power: axp209: Limit inrush current for broken boards
arm: sunxi: Reduce inrush current on Olimex OLinuXino-A20-Lime2
Priit Laes (1):
arm: sunxi: Reduce inrush current on Olimex OLinuXino-A20-Lime2-eMMC
arch/arm/mach-sunxi/pmic_bus.c | 6 ++-
board/sunxi/board.c | 18 +++---
configs/A20-OLinuXino-Lime2-eMMC_defconfig | 2 +-
configs/A20-OLinuXino-Lime2_defconfig | 2 +-
drivers/power/Kconfig | 43 ++++++++++++++-
drivers/power/axp209.c | 66 ++++++++++++++++++----
include/axp209.h | 70 +++++++++++++++++------
7 files changed, 172 insertions(+), 35 deletions(-)
base-commit: a3e1653ddeb02f39481eba572275016171e9670c
--
git-series 0.9.1
More information about the U-Boot
mailing list