diff options
author | Philipp Tomsich <philipp.tomsich@theobroma-systems.com> | 2016-08-23 00:46:19 +0200 |
---|---|---|
committer | Klaus Goger <klaus.goger@theobroma-systems.com> | 2016-09-18 13:45:16 +0200 |
commit | d98f436149fbf3dc4c0d30ba7549f53f8d8f8259 (patch) | |
tree | b06fec9aba0608205b4541871e192c5e761096da /arch | |
parent | b82bd880352c719144663db74003f94ad8a6439d (diff) |
sunxi: Add support for the AXP806 on sun9i
On A80 boards, both a AXP809 (primary) and AXP806 (secondary)
PMIC are found. The AXP806 supplies the Cortex-A15 cores with
a poly-phase supply to deliver up to 10A of total power.
When used in the slave configuration, the AXP806 needs a write
to the REGADDR_EXT register to configure it to work on the same
RSB bus as the primary PMIC.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/cpu/armv7/sunxi/pmic_bus.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/sunxi/pmic_bus.c b/arch/arm/cpu/armv7/sunxi/pmic_bus.c index d96130b6ed..8d39046e7b 100644 --- a/arch/arm/cpu/armv7/sunxi/pmic_bus.c +++ b/arch/arm/cpu/armv7/sunxi/pmic_bus.c @@ -14,6 +14,7 @@ #include <asm/arch/rsb.h> #include <i2c.h> #include <asm/arch/pmic_bus.h> +#include <power/axp806_pmic.h> #define AXP152_I2C_ADDR 0x30 @@ -27,6 +28,9 @@ #define AXP223_DEVICE_ADDR 0x3a3 #define AXP223_RUNTIME_ADDR 0x2d +#define AXP806_DEVICE_ADDR 0x745 +#define AXP806_RUNTIME_ADDR 0x3a + int pmic_bus_init(void) { /* This cannot be 0 because it is used in SPL before BSS is ready */ @@ -47,6 +51,10 @@ int pmic_bus_init(void) return ret; ret = rsb_set_device_address(AXP223_DEVICE_ADDR, AXP223_RUNTIME_ADDR); +# if defined(CONFIG_AXP806_POWER) + ret |= rsb_set_device_address(AXP806_DEVICE_ADDR, AXP806_RUNTIME_ADDR); + rsb_write(AXP806_RUNTIME_ADDR, AXP806_REGADDR_EXT, 0x10); +# endif # endif if (ret) return ret; |