summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/sunxi/pmic_bus.c
diff options
context:
space:
mode:
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2016-03-30 18:13:33 +0200
committerKlaus Goger <klaus.goger@theobroma-systems.com>2016-09-18 13:45:15 +0200
commitb82bd880352c719144663db74003f94ad8a6439d (patch)
treec770d2b078f1ec766c3d8a9b055e10c7630e2eec /arch/arm/cpu/armv7/sunxi/pmic_bus.c
parent8996395939a1dc8d5870a185e13e4cd102d7108b (diff)
sunxi: support the AXP809 PMIC (for A80 platforms)
Implement support for the AXP809 PMIC that is used on A80 platforms as the primary PMIC and powers most peripherals and the CPUA (Cortex-A7) cluster. A AXP806 is usually the slave PMIC, which will provide the power for the CPUB (Cortex-A15) cluster. The default voltage settings have been chosen to be safe values for a Optimus, Cubieboard and A80-Q7. These changes are validated against the A80-Q7 module.
Diffstat (limited to 'arch/arm/cpu/armv7/sunxi/pmic_bus.c')
-rw-r--r--arch/arm/cpu/armv7/sunxi/pmic_bus.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/cpu/armv7/sunxi/pmic_bus.c b/arch/arm/cpu/armv7/sunxi/pmic_bus.c
index 5b81a8d8e1..d96130b6ed 100644
--- a/arch/arm/cpu/armv7/sunxi/pmic_bus.c
+++ b/arch/arm/cpu/armv7/sunxi/pmic_bus.c
@@ -4,7 +4,7 @@
* Sunxi PMIC bus access helpers
*
* The axp152 & axp209 use an i2c bus, the axp221 uses the p2wi bus and the
- * axp223 uses the rsb bus, these functions abstract this.
+ * axp223/axp809 use the rsb bus, these functions abstract this.
*
* SPDX-License-Identifier: GPL-2.0+
*/
@@ -23,7 +23,7 @@
#define AXP221_CTRL_ADDR 0x3e
#define AXP221_INIT_DATA 0x3e
-/* AXP818 device and runtime addresses are same as AXP223 */
+/* AXP809 and AXP818 device and runtime addresses are same as AXP223 */
#define AXP223_DEVICE_ADDR 0x3a3
#define AXP223_RUNTIME_ADDR 0x2d
@@ -36,7 +36,7 @@ int pmic_bus_init(void)
if (!needs_init)
return 0;
-#if defined CONFIG_AXP221_POWER || defined CONFIG_AXP818_POWER
+#if defined CONFIG_AXP221_POWER || defined CONFIG_AXP818_POWER || defined CONFIG_AXP809_POWER
# ifdef CONFIG_MACH_SUN6I
p2wi_init();
ret = p2wi_change_to_p2wi_mode(AXP221_CHIP_ADDR, AXP221_CTRL_ADDR,
@@ -62,7 +62,7 @@ int pmic_bus_read(u8 reg, u8 *data)
return i2c_read(AXP152_I2C_ADDR, reg, 1, data, 1);
#elif defined CONFIG_AXP209_POWER
return i2c_read(AXP209_I2C_ADDR, reg, 1, data, 1);
-#elif defined CONFIG_AXP221_POWER || defined CONFIG_AXP818_POWER
+#elif defined CONFIG_AXP221_POWER || defined CONFIG_AXP818_POWER || defined CONFIG_AXP809_POWER
# ifdef CONFIG_MACH_SUN6I
return p2wi_read(reg, data);
# else
@@ -77,7 +77,7 @@ int pmic_bus_write(u8 reg, u8 data)
return i2c_write(AXP152_I2C_ADDR, reg, 1, &data, 1);
#elif defined CONFIG_AXP209_POWER
return i2c_write(AXP209_I2C_ADDR, reg, 1, &data, 1);
-#elif defined CONFIG_AXP221_POWER || defined CONFIG_AXP818_POWER
+#elif defined CONFIG_AXP221_POWER || defined CONFIG_AXP818_POWER || defined CONFIG_AXP809_POWER
# ifdef CONFIG_MACH_SUN6I
return p2wi_write(reg, data);
# else