]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
sunxi: axp221: Make dcdc1 voltage configurable
authorHans de Goede <hdegoede@redhat.com>
Sat, 13 Dec 2014 13:12:06 +0000 (14:12 +0100)
committerHans de Goede <hdegoede@redhat.com>
Wed, 14 Jan 2015 13:56:36 +0000 (14:56 +0100)
The dcdc1 voltage is typically used as generic 3.3V IO voltage for things like
GPIO-s, sdcard interfaces, etc. On most boards this is undervolted to 3.0V to
safe battery, but not on all, make it configurable so that we can use the
same settings as the original firmware on all boards.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
board/sunxi/board.c
configs/Mele_M9_defconfig
drivers/power/Kconfig

index b5dfe958ad82b3461944abb9c59db66ef3273d4c..e2ebf8368810bab904f27f669ac1bdee952287c6 100644 (file)
@@ -175,7 +175,7 @@ void sunxi_board_init(void)
 #endif
 #ifdef CONFIG_AXP221_POWER
        power_failed = axp221_init();
-       power_failed |= axp221_set_dcdc1(3000);
+       power_failed |= axp221_set_dcdc1(CONFIG_AXP221_DCDC1_VOLT);
        power_failed |= axp221_set_dcdc2(1200);
        power_failed |= axp221_set_dcdc3(1200);
        power_failed |= axp221_set_dcdc4(1200);
index 445cc574d8ec62f6ff9b48b20488de46118aa787..e5ab0ec3029c62b478f06c76556feb969988c674 100644 (file)
@@ -7,6 +7,8 @@ CONFIG_FDTFILE="sun6i-a31-m9.dtb"
 +S:CONFIG_TARGET_MELE_M9=y
 +S:CONFIG_DRAM_CLK=312
 +S:CONFIG_DRAM_ZQ=120
+# The Mele M9 uses 3.3V for general IO
++S:CONFIG_AXP221_DCDC1_VOLT=3300
 # Ethernet phy power
 +S:CONFIG_AXP221_DLDO1_VOLT=3300
 # USB hub power
index af668871291ce924e69cf8529247ecc21bdc0a03..e132759c411b6f8082495f2444c9646cea96de99 100644 (file)
@@ -6,6 +6,16 @@ config AXP221_POWER
        Say y here to enable support for the axp221 / axp223 pmic found on most
        sun6i (A31) / sun8i (A23) boards.
 
+config AXP221_DCDC1_VOLT
+       int "axp221 dcdc1 voltage"
+       depends on AXP221_POWER
+       default 3000
+       ---help---
+       Set the voltage (mV) to program the axp221 dcdc1 at, set to 0 to
+       disable dcdc1. This is typically used as generic 3.3V IO voltage for
+       things like GPIO-s, sdcard interfaces, etc. On most boards this is
+       undervolted to 3.0V to safe battery.
+
 config AXP221_DLDO1_VOLT
        int "axp221 dldo1 voltage"
        depends on AXP221_POWER