[U-Boot] [PATCH v3 0/9] Stop AXP from crashing when enabling LDO3
Priit Laes
plaes at plaes.org
Wed Nov 28 14:22:35 UTC 2018
On Wed, Nov 28, 2018 at 08:23:37PM +0800, Andy Yan wrote:
> Hi :
> Andy Yan <andyshrk at gmail.com> 于2018年11月28日周三 下午7:10写道:
>
> > Hi:
> > Priit Laes <plaes at plaes.org> 于2018年11月22日周四 上午2:06写道:
> >
> >> 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
> >>
> >
> >
> > I also play with a Lime2-eMMC board(rev K) these days, but I found this
> > board could do reboot whatevery in u-boot or kernel when it boot from
> > emmc. But it reboot well when it boot from sdcard.
> >
> >
> Sorry I mean this board couldn't do reboot from kernel or u-boot here .
This is a hw issue in rev.K. Please contact Olimex.
>
>
> > root at lime2:~#
> > root at lime2:~#
> > root at lime2:~#
> > root at lime2:~# reboot
> > [ 2089.632091] reboot: Restarting system
> >
> > Can't see any further reboot log. unless i replug the power jack.
> >
> >
> >
> >
> >
> > When I do reset from u-boot , it failed too:
> >
> > Boot SPL 2018.05-armbian (Nov 28 2018 - 14:39:04 +0800)
> > DRAM: 3/2/2
> > Trying to boot from MMC2
> >
> >
> > U-ready
> > DRAM: 1 GiB
> > MMC: SUNXI MMC: 1
> > Loading Environment from EXT4... MMC: no card present
> > ** Bad device mmc 0 **
> > In: serial
> > Out: serial
> > Err: serial
> > Allwinner mUSB OTG (Peripheral)
> > SCSI: SATA link 0 timeout.
> > A: ethernet at 01c50000
> > Warning: usb_ether using MAC address from ROM
> > , eth1: usb_ether
> > MMC: no card present
> > ** Bad device mmc 0 **
> > us 0 for devices... 1 USB Device(s) found
> > scan1 USB Device(s) found
> > scaswitch to partitions #0, OK
> > mmc1(part MMC: no card present
> > => <INTERRUPT>
> > =>
> > => reset
> > resetting ...
> >
> > I post these here hope to know if anyone meet the same situtation.
> >
> >
> > --
> >> git-series 0.9.1
> >> _______________________________________________
> >> U-Boot mailing list
> >> U-Boot at lists.denx.de
> >> https://lists.denx.de/listinfo/u-boot
> >>
> >
More information about the U-Boot
mailing list