Skip to contentSkip to conversation

twl4030: TWL4030 VMMC2 3.2V enable on MMC init

PATCH New Paul Kocialkowski 4 participants 6 messages Oct 28, 2014 – Oct 30, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 twl4030: TWL4030 VMMC2 3.2V enable on MMC init

---
 drivers/power/twl4030.c |    6 ++++++
 include/twl4030.h       |    2 ++
 2 files changed, 8 insertions(+)
drivers/power/twl4030.c +6 -0
index 3e50310..e578ae6 100644
@@ -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);
 }
include/twl4030.h +2 -0
index 093c61d..18795a6 100644
@@ -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 */
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 twl4030: TWL4030 VMMC2 3.2V enable on MMC init

Hi Paul,

Quoted 1 line · Paul Kocialkowski

Usually, it is a good practice to add a commit message (and not just the subject).

It will be highly appreciated if you can provide also an explanation (in the commit message) of what and why it is done.

Thanks!

Quoted 34 lines
---
 drivers/power/twl4030.c |    6 ++++++
 include/twl4030.h       |    2 ++
 2 files changed, 8 insertions(+)
drivers/power/twl4030.c +6 -0
index 3e50310..e578ae6 100644
@@ -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);
 }
include/twl4030.h +2 -0
index 093c61d..18795a6 100644
@@ -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 */
Signature · 2 lines
Regards,
Igor.
#2 lore raw

PATCH 1/1 twl4030: TWL4030 VMMC2 3.2V enable on MMC init

Quoted 5 lines

Usually, it is a good practice to add a commit message (and not just the subject).

It will be highly appreciated if you can provide also an explanation (in the commit message) of what and why it is done.

Well, to be honest, I thought it was all self explanatory, but maybe a bit more context is required. I didn't notice I wrote twl4030 twice, so I'll probably make a v2, including a description.

Thanks!

Quoted 34 lines
Quoted 34 lines
---
 drivers/power/twl4030.c |    6 ++++++
 include/twl4030.h       |    2 ++
 2 files changed, 8 insertions(+)
drivers/power/twl4030.c +6 -0
index 3e50310..e578ae6 100644
@@ -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);
 }
include/twl4030.h +2 -0
index 093c61d..18795a6 100644
@@ -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 */
Signature · 13 lines
Paul Kocialkowski, Replicant developer

Replicant is a fully free Android distribution

Website:        http://www.replicant.us/
Wiki/Tracker:   http://redmine.replicant.us/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141028/3a00d9b9/attachment.pgp>
#3 lore raw

PATCH v2 1/1 twl4030: VMMC2 3.2V enable on MMC init

In reply to Paul Kocialkowski

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.

---
 drivers/power/twl4030.c |    6 ++++++
 include/twl4030.h       |    2 ++
 2 files changed, 8 insertions(+)
drivers/power/twl4030.c +6 -0
index 3e50310..e578ae6 100644
@@ -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);
 }
include/twl4030.h +2 -0
index 093c61d..18795a6 100644
@@ -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 */
Signature · 1 line
1.7.9.5
#4 lore raw

PATCH v2 1/1 twl4030: VMMC2 3.2V enable on MMC init

Hi Paul,

Quoted 42 lines · Paul Kocialkowski

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.

---

drivers/power/twl4030.c |    6 ++++++
include/twl4030.h       |    2 ++
2 files changed, 8 insertions(+)
drivers/power/twl4030.c +6 -0
index 3e50310..e578ae6 100644
@@ -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);
 }
include/twl4030.h +2 -0
index 093c61d..18795a6 100644
@@ -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 */
Signature · 1 line
1.7.9.5

Thanks, applied.

#5 lore raw

PATCH v2 1/1 twl4030: VMMC2 3.2V enable on MMC init

In reply to Paul Kocialkowski
Quoted 9 lines · On Tue, 28 Oct 2014 18:14:23 +0100 Paul Kocialkowski <[email protected]> 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.

---
 drivers/power/twl4030.c |    6 ++++++
 include/twl4030.h       |    2 ++
 2 files changed, 8 insertions(+)

applied to u-boot-staging. Thanks!

Anatolij