[U-Boot,09/12] board: ti: dra76-evm: Add support for powering on mmc ldo

Message ID 20170812062933.1325-10-lokeshvutla@ti.com
State Superseded
Delegated to: Tom Rini
Headers show

Commit Message

Lokesh Vutla Aug. 12, 2017, 6:29 a.m.
ldo4 is used to poweron mmc on dra76-evm. Enable it.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 board/ti/dra7xx/evm.c | 2 ++
 include/palmas.h      | 4 ++++
 2 files changed, 6 insertions(+)

Comments

Tom Rini Aug. 14, 2017, 9:28 p.m. | #1
On Sat, Aug 12, 2017 at 11:59:30AM +0530, Lokesh Vutla wrote:

> ldo4 is used to poweron mmc on dra76-evm. Enable it.
> 
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>

Reviewed-by: Tom Rini <trini@konsulko.com>

Patch

diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
index d66bbeafca..14c06f5eda 100644
--- a/board/ti/dra7xx/evm.c
+++ b/board/ti/dra7xx/evm.c
@@ -837,6 +837,8 @@  void board_mmc_poweron_ldo(uint voltage)
 		else if (voltage == LDO_VOLT_1V8)
 			voltage = 0xa;
 		lp873x_mmc1_poweron_ldo(voltage);
+	} else if (board_is_dra76x_evm()) {
+		palmas_mmc1_poweron_ldo(LDO4_VOLTAGE, LDO4_CTRL, voltage);
 	} else {
 		palmas_mmc1_poweron_ldo(LDO1_VOLTAGE, LDO1_CTRL, voltage);
 	}
diff --git a/include/palmas.h b/include/palmas.h
index 404c2b3ca7..d366c98d22 100644
--- a/include/palmas.h
+++ b/include/palmas.h
@@ -38,6 +38,10 @@ 
 #define LDO2_CTRL		0x52
 #define LDO2_VOLTAGE		0x53
 
+/* LDO2 control/voltage */
+#define LDO4_CTRL		0x5e
+#define LDO4_VOLTAGE		0x5f
+
 /* LDO9 control/voltage */
 #define LDO9_CTRL		0x60
 #define LDO9_VOLTAGE		0x61