[U-Boot] [PATCH v2 3/5] sunxi: Add axp209 pmic support

Siarhei Siamashka
2014-07-23T18:49:01Z

On Fri, 13 Jun 2014 22:55:50 +0200
Hans de Goede <hdegoede@redhat.com> wrote:

> From: Henrik Nordstrom <henrik@henriknordstrom.net>
>
> Add support for the x-powers axp209 pmic which is found on most A10, A13 and
> A20 boards.
>
> And enable AXP209 support for the Cubietruck and Cubieboard boards.
>
> While changing the boards.cfg lines for the Cubietruck, add Ian and me as board
> maintainers for the Cubietruck.
>
> Signed-off-by: Henrik Nordstrom <henrik@henriknordstrom.net>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> Acked-by: Ian Campbell <ijc@hellion.org.uk>
> ---
> board/sunxi/board.c | 22 ++++++
> boards.cfg | 6 +-
> drivers/power/Makefile | 1 +
> drivers/power/axp209.c | 167 +++++++++++++++++++++++++++++++++++++++++
> include/axp209.h | 14 ++++
> include/configs/sun4i.h | 1 +
> include/configs/sun5i.h | 1 +
> include/configs/sun7i.h | 1 +
> include/configs/sunxi-common.h | 5 ++
> 9 files changed, 215 insertions(+), 3 deletions(-)
> create mode 100644 drivers/power/axp209.c
> create mode 100644 include/axp209.h

The support for AXP209 is needed to provide sufficient dcdc3 voltage
at least for the DRAM controller. The default voltage after reset
(1.2V on the Cubietruck) is too low for operating the DRAM controller
at reasonably high clock speeds. In this sense, the initial Cubietruck
support in u-boot v2014.07 is already buggy, because of the missing
PMIC configuration code. And this explanation in the commit message
would be very nice to have (otherwise one may wonder, why do we even
need the PMIC code in u-boot in the first place?).

The addition of the AXP PMIC support should be perhaps moved to the
beginning of the patch series instead of fixing the voltage problems
after the fact.

And again, this patch is currently rather cherry-picking unfriendly.
So even if I wanted to reorder the patches to trivially address the
problem, the interdependencies via the dreaded 'boards.cfg' get in the
way.

--
Best regards,
Siarhei Siamashka