summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAndre Przywara <[email protected]>2023-07-30 01:11:01 +0100
committerAndre Przywara <[email protected]>2023-11-12 16:47:16 +0000
commitd17d051c540a97b8d0b38236dd7fef2294db4e48 (patch)
tree4ec47cf9877428d979848f2d1684a2382117fcd2 /arch
parent1f6c98c2d3e553f1b84ac75459842da5dfa4090b (diff)
power: pmic: sunxi: add AXP313 SPL driver
On boards using the AXP313 PMIC, the DRAM rail is often not setup correctly at reset time, so we have to program the PMIC very early in the SPL, before running the DRAM initialisation. Add a simple AXP313 PMIC driver that knows about DCDC2(CPU) and DCDC3(DRAM), so that we can bump up the voltage before the DRAM init. Signed-off-by: Andre Przywara <[email protected]> Acked-by: Jernej Skrabec <[email protected]>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-sunxi/pmic_bus.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-sunxi/pmic_bus.c b/arch/arm/mach-sunxi/pmic_bus.c
index c0908406370..8e7625fe057 100644
--- a/arch/arm/mach-sunxi/pmic_bus.c
+++ b/arch/arm/mach-sunxi/pmic_bus.c
@@ -22,6 +22,7 @@
#define AXP209_I2C_ADDR 0x34
#define AXP305_I2C_ADDR 0x36
+#define AXP313_I2C_ADDR 0x36
#define AXP221_CHIP_ADDR 0x68
@@ -34,6 +35,8 @@ static int pmic_i2c_address(void)
return AXP152_I2C_ADDR;
if (IS_ENABLED(CONFIG_AXP305_POWER))
return AXP305_I2C_ADDR;
+ if (IS_ENABLED(CONFIG_AXP313_POWER))
+ return AXP313_I2C_ADDR;
/* Other AXP2xx and AXP8xx variants */
return AXP209_I2C_ADDR;