diff options
author | Jelle van der Waa <jelle@vdwaa.nl> | 2016-02-23 18:47:19 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2016-02-23 20:50:07 +0100 |
commit | 0d8382ae70e7559eba873b4d8b2cf9a15aeccf20 (patch) | |
tree | 1197454051f70f8bb0de9c1b105b0f408ed43e8b /board/sunxi/board.c | |
parent | 595af9db2422fa5ae734cfe615415b17a5098f34 (diff) |
sunxi: power: add support for sy8106a driver
SY8106A is a PMIC which is used on the Allwinner
H3 Orange Pi Pc and Plus board. The VOUT1_SEL register is
implemented to set the default V-CPU voltage to 1200 mV.
This driver is required to ensure the SY8106A V-CPU
voltage is set to 1200 mV after a software reset. On cold
boot the default SY8106A output voltage is selected to be
1200 mV by a pair of resistors on the Orange Pi PC and Plus.
Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
Tested-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Acked-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'board/sunxi/board.c')
-rw-r--r-- | board/sunxi/board.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 420481a9fb..15b7af634c 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -25,6 +25,7 @@ #include <asm/io.h> #include <nand.h> #include <net.h> +#include <sy8106a.h> #if defined CONFIG_VIDEO_LCD_PANEL_I2C && !(defined CONFIG_SPL_BUILD) /* So that we can use pin names in Kconfig and sunxi_name_to_gpio() */ @@ -436,6 +437,10 @@ void sunxi_board_init(void) int power_failed = 0; unsigned long ramsize; +#ifdef CONFIG_SY8106A_POWER + power_failed = sy8106a_set_vout1(CONFIG_SY8106A_VOUT1_VOLT); +#endif + #if defined CONFIG_AXP152_POWER || defined CONFIG_AXP209_POWER || \ defined CONFIG_AXP221_POWER || defined CONFIG_AXP818_POWER power_failed = axp_init(); |