1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-08-31 16:22:36 +02:00

power: axp818: Suport DCDC6 in AXP818

This commit is contained in:
Ondrej Jirman
2017-04-30 01:38:49 +02:00
parent 6657a3d114
commit 93c1c574f5
4 changed files with 36 additions and 0 deletions

View File

@@ -632,6 +632,9 @@ void sunxi_board_init(void)
defined CONFIG_AXP818_POWER
power_failed |= axp_set_dcdc5(CONFIG_AXP_DCDC5_VOLT);
#endif
#if defined CONFIG_AXP818_POWER
power_failed |= axp_set_dcdc6(CONFIG_AXP_DCDC6_VOLT);
#endif
#if defined CONFIG_AXP221_POWER || defined CONFIG_AXP809_POWER || \
defined CONFIG_AXP818_POWER

View File

@@ -149,6 +149,16 @@ config AXP_DCDC5_VOLT
On A23 / A31 / A33 / A80 / A83T / R40 boards dcdc5 is VCC-DRAM and
should be 1.5V, 1.35V if DDR3L is used.
config AXP_DCDC6_VOLT
int "axp pmic dcdc6 voltage"
depends on AXP818_POWER
default 900 if MACH_SUN8I
---help---
Set the voltage (mV) to program the axp pmic dcdc6 at, set to 0 to
disable dcdc5.
On A83T boards dcdc6 is used for SYS, USB0, HDMI and
should be 0.9V.
config AXP_ALDO1_VOLT
int "axp pmic (a)ldo1 voltage"
depends on AXP221_POWER || AXP809_POWER || AXP818_POWER

View File

@@ -109,6 +109,28 @@ int axp_set_dcdc5(unsigned int mvolt)
AXP818_OUTPUT_CTRL1_DCDC5_EN);
}
int axp_set_dcdc6(unsigned int mvolt)
{
int ret;
u8 cfg;
if (mvolt >= 1120)
cfg = 50 + axp818_mvolt_to_cfg(mvolt, 1120, 1520, 20);
else
cfg = axp818_mvolt_to_cfg(mvolt, 600, 1100, 10);
if (mvolt == 0)
return pmic_bus_clrbits(AXP818_OUTPUT_CTRL1,
AXP818_OUTPUT_CTRL1_DCDC6_EN);
ret = pmic_bus_write(AXP818_DCDC6_CTRL, cfg);
if (ret)
return ret;
return pmic_bus_setbits(AXP818_OUTPUT_CTRL1,
AXP818_OUTPUT_CTRL1_DCDC6_EN);
}
int axp_set_aldo(int aldo_num, unsigned int mvolt)
{
int ret;

View File

@@ -27,6 +27,7 @@ int axp_set_dcdc2(unsigned int mvolt);
int axp_set_dcdc3(unsigned int mvolt);
int axp_set_dcdc4(unsigned int mvolt);
int axp_set_dcdc5(unsigned int mvolt);
int axp_set_dcdc6(unsigned int mvolt);
int axp_set_aldo1(unsigned int mvolt);
int axp_set_aldo2(unsigned int mvolt);
int axp_set_aldo3(unsigned int mvolt);