summaryrefslogtreecommitdiff
path: root/board/sunxi/board.c
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2014-11-13 10:35:13 -0500
committerTom Rini <trini@ti.com>2014-11-13 10:35:13 -0500
commit0d485b9095328cdc81b2ee94ff59b988c69b9127 (patch)
tree93406f5dfe78b0b5670272a9de3f3eb3ee419785 /board/sunxi/board.c
parent3ad207a2bf1399a689233a97978e306f71729f77 (diff)
parent64a97599b79e277600bc6f1b22cf48aa04ee9bd0 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-sunxi
Diffstat (limited to 'board/sunxi/board.c')
-rw-r--r--board/sunxi/board.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 03890c8c9c..e6ec5b8fc1 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -19,6 +19,9 @@
#ifdef CONFIG_AXP209_POWER
#include <axp209.h>
#endif
+#ifdef CONFIG_AXP221_POWER
+#include <axp221.h>
+#endif
#include <asm/arch/clock.h>
#include <asm/arch/cpu.h>
#include <asm/arch/dram.h>
@@ -169,6 +172,29 @@ void sunxi_board_init(void)
power_failed |= axp209_set_ldo3(2800);
power_failed |= axp209_set_ldo4(2800);
#endif
+#ifdef CONFIG_AXP221_POWER
+ power_failed = axp221_init();
+ power_failed |= axp221_set_dcdc1(3000);
+ power_failed |= axp221_set_dcdc2(1200);
+ power_failed |= axp221_set_dcdc3(1200);
+ power_failed |= axp221_set_dcdc4(1200);
+ power_failed |= axp221_set_dcdc5(1500);
+#if CONFIG_AXP221_DLDO1_VOLT != -1
+ power_failed |= axp221_set_dldo1(CONFIG_AXP221_DLDO1_VOLT);
+#endif
+#if CONFIG_AXP221_DLDO4_VOLT != -1
+ power_failed |= axp221_set_dldo4(CONFIG_AXP221_DLDO4_VOLT);
+#endif
+#if CONFIG_AXP221_ALDO1_VOLT != -1
+ power_failed |= axp221_set_aldo1(CONFIG_AXP221_ALDO1_VOLT);
+#endif
+#if CONFIG_AXP221_ALDO2_VOLT != -1
+ power_failed |= axp221_set_aldo2(CONFIG_AXP221_ALDO2_VOLT);
+#endif
+#if CONFIG_AXP221_ALDO3_VOLT != -1
+ power_failed |= axp221_set_aldo3(CONFIG_AXP221_ALDO3_VOLT);
+#endif
+#endif
printf("DRAM:");
ramsize = sunxi_dram_init();