From 0d8382ae70e7559eba873b4d8b2cf9a15aeccf20 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Tue, 23 Feb 2016 18:47:19 +0100 Subject: 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 Tested-by: Siarhei Siamashka Acked-by: Siarhei Siamashka Signed-off-by: Hans de Goede --- include/configs/sunxi-common.h | 6 ++++-- include/sy8106a.h | 11 +++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 include/sy8106a.h (limited to 'include') diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index b4dfb3cc47..40850e5d99 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -206,7 +206,8 @@ #define CONFIG_SPL_STACK LOW_LEVEL_SRAM_STACK /* I2C */ -#if defined CONFIG_AXP152_POWER || defined CONFIG_AXP209_POWER +#if defined CONFIG_AXP152_POWER || defined CONFIG_AXP209_POWER || \ + defined CONFIG_SY8106A_POWER #define CONFIG_SPL_I2C_SUPPORT #endif @@ -240,7 +241,8 @@ extern int soft_i2c_gpio_scl; /* PMU */ #if defined CONFIG_AXP152_POWER || defined CONFIG_AXP209_POWER || \ - defined CONFIG_AXP221_POWER || defined CONFIG_AXP818_POWER + defined CONFIG_AXP221_POWER || defined CONFIG_AXP818_POWER || \ + defined CONFIG_SY8106A_POWER #define CONFIG_SPL_POWER_SUPPORT #endif diff --git a/include/sy8106a.h b/include/sy8106a.h new file mode 100644 index 0000000000..32e8c43dc0 --- /dev/null +++ b/include/sy8106a.h @@ -0,0 +1,11 @@ +/* + * (C) Copyright 2016 + * Jelle van der Waa + * + * SPDX-License-Identifier: GPL-2.0+ + */ +#ifndef _SY8106A_PMIC_H_ + +int sy8106a_set_vout1(unsigned int mvolt); + +#endif -- cgit From dc44fd8ae4be0a88123a90ae2b3acdec45290ecf Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Tue, 9 Feb 2016 23:59:33 +0100 Subject: sunxi: H3: Add support for the host usb-phys Add support for phy 1-3. Signed-off-by: Jelle van der Waa [hdegoede@redhat.com: use setclrbits_le32 instead of read-modify-write] Signed-off-by: Hans de Goede --- include/configs/sun8i.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/sun8i.h b/include/configs/sun8i.h index 781ff6eae2..7c0ab1eab4 100644 --- a/include/configs/sun8i.h +++ b/include/configs/sun8i.h @@ -18,7 +18,11 @@ #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 #endif -#define CONFIG_SUNXI_USB_PHYS 2 +#ifdef CONFIG_MACH_SUN8I_H3 + #define CONFIG_SUNXI_USB_PHYS 4 +#else + #define CONFIG_SUNXI_USB_PHYS 2 +#endif #ifndef CONFIG_MACH_SUN8I_A83T -- cgit