diff mbox

[U-Boot,v2] twl4030: VMMC2 3.2V enable on MMC init

Message ID 1414516463-1679-1-git-send-email-contact@paulk.fr
State Accepted
Delegated to: Anatolij Gustschin
Headers show

Commit Message

Paul Kocialkowski Oct. 28, 2014, 5:14 p.m. UTC
This enables the VMMC2 LDO, which powers the MMC2 device.
When the device starts from MMC2, this has already been enabled by the BootROM,
but when starting from peripheral boot (USB, UART), it is not the case.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
---
 drivers/power/twl4030.c |    6 ++++++
 include/twl4030.h       |    2 ++
 2 files changed, 8 insertions(+)

Comments

Pantelis Antoniou Oct. 30, 2014, 3:22 p.m. UTC | #1
Hi Paul,

> On Oct 28, 2014, at 19:14 , Paul Kocialkowski <contact@paulk.fr> wrote:
> 
> This enables the VMMC2 LDO, which powers the MMC2 device.
> When the device starts from MMC2, this has already been enabled by the BootROM,
> but when starting from peripheral boot (USB, UART), it is not the case.
> 
> Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
> ---
> drivers/power/twl4030.c |    6 ++++++
> include/twl4030.h       |    2 ++
> 2 files changed, 8 insertions(+)
> 
> diff --git a/drivers/power/twl4030.c b/drivers/power/twl4030.c
> index 3e50310..e578ae6 100644
> --- a/drivers/power/twl4030.c
> +++ b/drivers/power/twl4030.c
> @@ -98,4 +98,10 @@ void twl4030_power_mmc_init(void)
> 				TWL4030_PM_RECEIVER_VMMC1_VSEL_32,
> 				TWL4030_PM_RECEIVER_VMMC1_DEV_GRP,
> 				TWL4030_PM_RECEIVER_DEV_GRP_P1);
> +
> +	/* Set VMMC2 to 3.15 Volts */
> +	twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VMMC2_DEDICATED,
> +				TWL4030_PM_RECEIVER_VMMC2_VSEL_32,
> +				TWL4030_PM_RECEIVER_VMMC2_DEV_GRP,
> +				TWL4030_PM_RECEIVER_DEV_GRP_P1);
> }
> diff --git a/include/twl4030.h b/include/twl4030.h
> index 093c61d..18795a6 100644
> --- a/include/twl4030.h
> +++ b/include/twl4030.h
> @@ -395,6 +395,8 @@
> #define TWL4030_PM_RECEIVER_VDAC_VSEL_18		0x03
> #define TWL4030_PM_RECEIVER_VMMC1_VSEL_30		0x02
> #define TWL4030_PM_RECEIVER_VMMC1_VSEL_32		0x03
> +#define TWL4030_PM_RECEIVER_VMMC2_VSEL_30		0x0B
> +#define TWL4030_PM_RECEIVER_VMMC2_VSEL_32		0x0C
> #define TWL4030_PM_RECEIVER_VSIM_VSEL_18		0x03
> 
> /* Device Selection in PM Receiver Module */
> -- 
> 1.7.9.5

Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>

Thanks, applied.
Anatolij Gustschin Oct. 30, 2014, 11:35 p.m. UTC | #2
On Tue, 28 Oct 2014 18:14:23 +0100
Paul Kocialkowski <contact@paulk.fr> wrote:

> This enables the VMMC2 LDO, which powers the MMC2 device.
> When the device starts from MMC2, this has already been enabled by the BootROM,
> but when starting from peripheral boot (USB, UART), it is not the case.
> 
> Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
> ---
>  drivers/power/twl4030.c |    6 ++++++
>  include/twl4030.h       |    2 ++
>  2 files changed, 8 insertions(+)

applied to u-boot-staging. Thanks!

Anatolij
diff mbox

Patch

diff --git a/drivers/power/twl4030.c b/drivers/power/twl4030.c
index 3e50310..e578ae6 100644
--- a/drivers/power/twl4030.c
+++ b/drivers/power/twl4030.c
@@ -98,4 +98,10 @@  void twl4030_power_mmc_init(void)
 				TWL4030_PM_RECEIVER_VMMC1_VSEL_32,
 				TWL4030_PM_RECEIVER_VMMC1_DEV_GRP,
 				TWL4030_PM_RECEIVER_DEV_GRP_P1);
+
+	/* Set VMMC2 to 3.15 Volts */
+	twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VMMC2_DEDICATED,
+				TWL4030_PM_RECEIVER_VMMC2_VSEL_32,
+				TWL4030_PM_RECEIVER_VMMC2_DEV_GRP,
+				TWL4030_PM_RECEIVER_DEV_GRP_P1);
 }
diff --git a/include/twl4030.h b/include/twl4030.h
index 093c61d..18795a6 100644
--- a/include/twl4030.h
+++ b/include/twl4030.h
@@ -395,6 +395,8 @@ 
 #define TWL4030_PM_RECEIVER_VDAC_VSEL_18		0x03
 #define TWL4030_PM_RECEIVER_VMMC1_VSEL_30		0x02
 #define TWL4030_PM_RECEIVER_VMMC1_VSEL_32		0x03
+#define TWL4030_PM_RECEIVER_VMMC2_VSEL_30		0x0B
+#define TWL4030_PM_RECEIVER_VMMC2_VSEL_32		0x0C
 #define TWL4030_PM_RECEIVER_VSIM_VSEL_18		0x03
 
 /* Device Selection in PM Receiver Module */