summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-09-30 15:22:42 +0200
committerHans de Goede <hdegoede@redhat.com>2015-10-20 18:40:27 +0200
commit401175220d169ba2bfe7fbb50d73ccc9c1d6a635 (patch)
tree5e5d0b9eba964f19a07fada9fdcccf73338772d1 /board
parent1df44814f59ed487849bebc5dec0ad605ff226db (diff)
downloadu-boot-imx-401175220d169ba2bfe7fbb50d73ccc9c1d6a635.zip
u-boot-imx-401175220d169ba2bfe7fbb50d73ccc9c1d6a635.tar.gz
u-boot-imx-401175220d169ba2bfe7fbb50d73ccc9c1d6a635.tar.bz2
sunxi: power: Make all voltages configurable through Kconfig
On boards with axp221/223 pmic-s we already allow configuring most voltages. Make the Kconfig options for these also apply to boards with axp152 / axp209 pmic-s and extend them to configure all voltages. The Kconfig defaults are chosen so that this commit does not introduce any functional changes. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
Diffstat (limited to 'board')
-rw-r--r--board/sunxi/board.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 096d127..55a880e 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -440,36 +440,36 @@ void sunxi_board_init(void)
#ifdef CONFIG_AXP152_POWER
power_failed = axp152_init();
- power_failed |= axp152_set_dcdc2(1400);
- power_failed |= axp152_set_dcdc3(1500);
- power_failed |= axp152_set_dcdc4(1250);
- power_failed |= axp152_set_ldo2(3000);
+ power_failed |= axp152_set_dcdc2(CONFIG_AXP_DCDC2_VOLT);
+ power_failed |= axp152_set_dcdc3(CONFIG_AXP_DCDC3_VOLT);
+ power_failed |= axp152_set_dcdc4(CONFIG_AXP_DCDC4_VOLT);
+ power_failed |= axp152_set_ldo2(CONFIG_AXP_ALDO2_VOLT);
#endif
#ifdef CONFIG_AXP209_POWER
power_failed |= axp209_init();
- power_failed |= axp209_set_dcdc2(1400);
- power_failed |= axp209_set_dcdc3(1250);
- power_failed |= axp209_set_ldo2(3000);
- power_failed |= axp209_set_ldo3(2800);
- power_failed |= axp209_set_ldo4(2800);
+ power_failed |= axp209_set_dcdc2(CONFIG_AXP_DCDC2_VOLT);
+ power_failed |= axp209_set_dcdc3(CONFIG_AXP_DCDC3_VOLT);
+ power_failed |= axp209_set_ldo2(CONFIG_AXP_ALDO2_VOLT);
+ power_failed |= axp209_set_ldo3(CONFIG_AXP_ALDO3_VOLT);
+ power_failed |= axp209_set_ldo4(CONFIG_AXP_ALDO4_VOLT);
#endif
#ifdef CONFIG_AXP221_POWER
power_failed = axp221_init();
- power_failed |= axp221_set_dcdc1(CONFIG_AXP221_DCDC1_VOLT);
- power_failed |= axp221_set_dcdc2(CONFIG_AXP221_DCDC2_VOLT);
- power_failed |= axp221_set_dcdc3(1200); /* VDD-CPU */
-#ifdef CONFIG_MACH_SUN6I
- power_failed |= axp221_set_dcdc4(1200); /* A31:VDD-SYS */
-#else
- power_failed |= axp221_set_dcdc4(0); /* A23:unused */
-#endif
- power_failed |= axp221_set_dcdc5(1500); /* VCC-DRAM */
- power_failed |= axp221_set_dldo1(CONFIG_AXP221_DLDO1_VOLT);
- power_failed |= axp221_set_dldo4(CONFIG_AXP221_DLDO4_VOLT);
- power_failed |= axp221_set_aldo1(CONFIG_AXP221_ALDO1_VOLT);
- power_failed |= axp221_set_aldo2(CONFIG_AXP221_ALDO2_VOLT);
- power_failed |= axp221_set_aldo3(CONFIG_AXP221_ALDO3_VOLT);
- power_failed |= axp221_set_eldo(3, CONFIG_AXP221_ELDO3_VOLT);
+ power_failed |= axp221_set_dcdc1(CONFIG_AXP_DCDC1_VOLT);
+ power_failed |= axp221_set_dcdc2(CONFIG_AXP_DCDC2_VOLT);
+ power_failed |= axp221_set_dcdc3(CONFIG_AXP_DCDC3_VOLT);
+ power_failed |= axp221_set_dcdc4(CONFIG_AXP_DCDC4_VOLT);
+ power_failed |= axp221_set_dcdc5(CONFIG_AXP_DCDC5_VOLT);
+ power_failed |= axp221_set_aldo1(CONFIG_AXP_ALDO1_VOLT);
+ power_failed |= axp221_set_aldo2(CONFIG_AXP_ALDO2_VOLT);
+ power_failed |= axp221_set_aldo3(CONFIG_AXP_ALDO3_VOLT);
+ power_failed |= axp221_set_dldo1(CONFIG_AXP_DLDO1_VOLT);
+ power_failed |= axp221_set_dldo2(CONFIG_AXP_DLDO2_VOLT);
+ power_failed |= axp221_set_dldo3(CONFIG_AXP_DLDO3_VOLT);
+ power_failed |= axp221_set_dldo4(CONFIG_AXP_DLDO4_VOLT);
+ power_failed |= axp221_set_eldo(1, CONFIG_AXP_ELDO1_VOLT);
+ power_failed |= axp221_set_eldo(2, CONFIG_AXP_ELDO2_VOLT);
+ power_failed |= axp221_set_eldo(3, CONFIG_AXP_ELDO3_VOLT);
#endif
printf("DRAM:");