diff options
author | Lokesh Vutla <lokeshvutla@ti.com> | 2016-11-23 13:25:28 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-12-04 13:54:51 -0500 |
commit | b4b060066f158a461780dfb06a042bb6351a2b3c (patch) | |
tree | 702244a6706fefa39a458eac01d9377217c74eb0 /drivers/power | |
parent | f56e63509985d23e8912beaf3c38b07f7a1b12c6 (diff) | |
download | u-boot-b4b060066f158a461780dfb06a042bb6351a2b3c.zip u-boot-b4b060066f158a461780dfb06a042bb6351a2b3c.tar.gz u-boot-b4b060066f158a461780dfb06a042bb6351a2b3c.tar.bz2 |
ARM: OMAP4+: Add support for getting pbias info from board
Palmas driver assumes it is always TPS659xx regulator on all DRA7xx based
boards to enable mmc regulator. This is not true always like in case of
DRA71x-evm. So get this information based on the board.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
[trini: Delete omap4_vmmc_pbias_config from omap_hsmmc.c]
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/palmas.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/power/palmas.c b/drivers/power/palmas.c index cfbc9dc..4f9a62c 100644 --- a/drivers/power/palmas.c +++ b/drivers/power/palmas.c @@ -23,7 +23,26 @@ void palmas_init_settings(void) #endif } -int palmas_mmc1_poweron_ldo(void) +#if defined(CONFIG_OMAP54XX) +int lp873x_mmc1_poweron_ldo(uint voltage) +{ + if (palmas_i2c_write_u8(LP873X_LDO1_ADDR, LP873X_LDO1_VOLTAGE, + voltage)) { + printf("lp873x: could not set LDO1 voltage.\n"); + return 1; + } + /* TURN ON LDO1 */ + if (palmas_i2c_write_u8(LP873X_LDO1_ADDR, LP873X_LDO1_CTRL, + LP873X_LDO_CTRL_EN | LP873X_LDO_CTRL_RDIS_EN)) { + printf("lp873x: could not turn on LDO1.\n"); + return 1; + } + return 0; + +} +#endif + +int palmas_mmc1_poweron_ldo(uint voltage) { u8 val = 0; |