public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] sunxi: axp221: Allow specifying dcdc2 voltage via Kconfig
@ 2015-08-14 14:52 Hans de Goede
  2015-08-14 14:52 ` [U-Boot] [PATCH 2/2] sunxi: Add support for gt90h-v4 tablets Hans de Goede
  2015-08-14 17:04 ` [U-Boot] [PATCH 1/2] sunxi: axp221: Allow specifying dcdc2 voltage via Kconfig Ian Campbell
  0 siblings, 2 replies; 5+ messages in thread
From: Hans de Goede @ 2015-08-14 14:52 UTC (permalink / raw)
  To: u-boot

Allow specifying the axp221 dcdc2 voltage via Kconfig, this is necessary
because on some boards the 1.2V default does not work reliable.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 board/sunxi/board.c   | 2 +-
 drivers/power/Kconfig | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index f85e825..680523a 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -437,7 +437,7 @@ void sunxi_board_init(void)
 #ifdef CONFIG_AXP221_POWER
 	power_failed = axp221_init();
 	power_failed |= axp221_set_dcdc1(CONFIG_AXP221_DCDC1_VOLT);
-	power_failed |= axp221_set_dcdc2(1200); /* A31:VDD-GPU, A23:VDD-SYS */
+	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 */
diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index 23cdd71..df5e373 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -22,6 +22,15 @@ config AXP221_DCDC1_VOLT
 	things like GPIO-s, sdcard interfaces, etc. On most boards this is
 	undervolted to 3.0V to safe battery.
 
+config AXP221_DCDC2_VOLT
+	int "axp221 dcdc2 voltage"
+	depends on AXP221_POWER
+	default 1200
+	---help---
+	Set the voltage (mV) to program the axp221 dcdc2 at, set to 0 to
+	disable dcdc2. On A31 boards this is typically used for VDD-GPU,
+	on A23/A33 for VDD-SYS, this should normally be set to 1.2V.
+
 config AXP221_DLDO1_VOLT
 	int "axp221 dldo1 voltage"
 	depends on AXP221_POWER
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-08-14 17:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-14 14:52 [U-Boot] [PATCH 1/2] sunxi: axp221: Allow specifying dcdc2 voltage via Kconfig Hans de Goede
2015-08-14 14:52 ` [U-Boot] [PATCH 2/2] sunxi: Add support for gt90h-v4 tablets Hans de Goede
2015-08-14 14:55   ` Hans de Goede
2015-08-14 17:04     ` Ian Campbell
2015-08-14 17:04 ` [U-Boot] [PATCH 1/2] sunxi: axp221: Allow specifying dcdc2 voltage via Kconfig Ian Campbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox