Skip to contentSkip to conversation

omap3evm mmc problem

DISCUSSION dfoley 3 participants 6 messages Mar 21, 2009 – Mar 25, 2009

Subsystems (3)
lore
Share & tools
lore

dfoley

author
#0 lore raw

Does anyone else get these mmc errors or know why on the OMAP 3530 Development board ?

mmci-omap-hs mmci-omap-hs.0: Failed to get debounce clock
regulator: Unable to get requested regulator: vmmc mmci-omap-hs mmci-omap-hs.0: err -19 configuring card detect mmci-omap-hs mmci-omap-hs.0: late init error mmci-omap-hs mmci-omap-hs.0: Probe Failed

I'm using the current git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6

#1 lore raw
Quoted 1 line · dfoley

Does anyone else get these mmc errors or know why on the OMAP 3530 Development board ?

Which dev board? LDP? EVM?

Quoted 2 lines

mmci-omap-hs mmci-omap-hs.0: Failed to get debounce clock
regulator: Unable to get requested regulator: vmmc

Needs patches to setup whichever regulator is used with the MMC1 controller. Look at Beagle, Overo, or SDP for examples...

Quoted 1 line

mmci-omap-hs mmci-omap-hs.0: err -19 configuring card detect

maintainer
#2 lore raw
Quoted 6 lines · David Brownell
Quoted 1 line · dfoley

Does anyone else get these mmc errors or know why on the OMAP 3530 Development board ?

Which dev board? LDP? EVM?

Quoted 9 lines
Quoted 2 lines

mmci-omap-hs mmci-omap-hs.0: Failed to get debounce clock
regulator: Unable to get requested regulator: vmmc

Needs patches to setup whichever regulator is used with the MMC1 controller. Look at Beagle, Overo, or SDP for examples...

Quoted 1 line

mmci-omap-hs mmci-omap-hs.0: err -19 configuring card detect

Is this again the CONFIG_REGULATOR missing in .config?

Tony

#3 lore raw
Quoted 10 lines · Tony Lindgren
Quoted 9 lines · David Brownell
Quoted 1 line · dfoley

Does anyone else get these mmc errors or know why on the OMAP 3530 Development board ?

Which dev board? LDP? EVM?

Quoted 2 lines

mmci-omap-hs mmci-omap-hs.0: Failed to get debounce clock
regulator: Unable to get requested regulator: vmmc

Quoted 8 lines
Quoted 6 lines

Needs patches to setup whichever regulator is used with the MMC1 controller. Look at Beagle, Overo, or SDP for examples...

Quoted 1 line

mmci-omap-hs mmci-omap-hs.0: err -19 configuring card detect

Is this again the CONFIG_REGULATOR missing in .config?

Maybe. Do all the boards set up their regulators now?

author
#4 lore raw
Quoted 15 lines · David Brownell
Quoted 14 lines · Tony Lindgren
Quoted 13 lines · David Brownell
Quoted 1 line · dfoley

Does anyone else get these mmc errors or know why on the OMAP 3530 Development board ?

Which dev board? LDP? EVM?

Quoted 2 lines

mmci-omap-hs mmci-omap-hs.0: Failed to get debounce clock
regulator: Unable to get requested regulator: vmmc

Needs patches to setup whichever regulator is used with the MMC1 controller. Look at Beagle, Overo, or SDP for examples...

Quoted 1 line

mmci-omap-hs mmci-omap-hs.0: err -19 configuring card detect

Quoted 9 lines
Quoted 1 line

Is this again the CONFIG_REGULATOR missing in .config?

Maybe. Do all the boards set up their regulators now?

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

SD seems to work now with patch below and REGULATOR_TWL4030 [=y]. For the patch, I just copied from other boards in mach-omap2, so I really have no idea if it's correct.

git tree:
5a824e035b9ab16aa81c021c34c557b90d10c7e6 branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6

output:

root@tsi-omap3evm:~# dmesg | grep mmc
mmci-omap-hs mmci-omap-hs.0: Failed to get debounce clock
mmc0: new high speed SD card at address 0007
mmcblk0: mmc0:0007 SD01G 972 MiB
 mmcblk0: p1
VFS: Can't find a valid FAT filesystem on dev mmcblk0.
EXT3 FS on mmcblk0p1, internal journal
arch/arm/mach-omap2/board-omap3evm.c +45 -1
index 024d7c4..527d58e 100644
@@ -24,6 +24,7 @@
 #include <linux/spi/spi.h>
 #include <linux/spi/ads7846.h>
 #include <linux/i2c/twl4030.h>
+#include <linux/regulator/machine.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -99,6 +100,14 @@ static struct twl4030_hsmmc_info mmc[] = {
 	{}	/* Terminator */
 };
 
+static struct regulator_consumer_supply omap3evm_vmmc1_supply = {
+	.supply			= "vmmc",
+};
+
+static struct regulator_consumer_supply omap3evm_vsim_supply = {
+	.supply			= "vmmc_aux",
+};
+
 static struct gpio_led gpio_leds[] = {
 	{
 		.name			= "omap3evm::ledb",
@@ -122,7 +131,6 @@ static struct platform_device leds_gpio = {
 	},
 };
 
-
 static int omap3evm_twl_gpio_setup(struct device *dev,
 		unsigned gpio, unsigned ngpio)
 {
@@ -131,6 +139,9 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
 	mmc[0].gpio_cd = gpio + 0;
 	twl4030_mmc_init(mmc);
 
+	omap3evm_vmmc1_supply.dev = mmc[0].dev;
+	omap3evm_vsim_supply.dev = mmc[0].dev;
+
 	/* Most GPIOs are for USB OTG.  Some are mostly sent to
 	 * the P2 connector; notably LEDA for the LCD backlight.
 	 */
@@ -186,6 +197,37 @@ static struct twl4030_madc_platform_data omap3evm_madc_data = {
 	.irq_line	= 1,
 };
 
+/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
+static struct regulator_init_data omap3evm_vmmc1 = {
+	.constraints = {
+		.min_uV			= 1850000,
+		.max_uV			= 3150000,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+					| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask		= REGULATOR_CHANGE_VOLTAGE
+					| REGULATOR_CHANGE_MODE
+					| REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies	= 1,
+	.consumer_supplies	= &omap3evm_vmmc1_supply,
+};
+
+/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
+static struct regulator_init_data omap3evm_vsim = {
+	.constraints = {
+		.min_uV			= 1800000,
+		.max_uV			= 3000000,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+					| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask		= REGULATOR_CHANGE_VOLTAGE
+					| REGULATOR_CHANGE_MODE
+					| REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies	= 1,
+	.consumer_supplies	= &omap3evm_vsim_supply,
+};
+
+
 static struct twl4030_platform_data omap3evm_twldata = {
 	.irq_base	= TWL4030_IRQ_BASE,
 	.irq_end	= TWL4030_IRQ_END,
@@ -196,6 +238,8 @@ static struct twl4030_platform_data omap3evm_twldata = {
 	.usb		= &omap3evm_usb_data,
 	.power		= GENERIC3430_T2SCRIPTS_DATA,
 	.gpio		= &omap3evm_gpio_data,
+	.vmmc1		= &omap3evm_vmmc1,
+	.vsim		= &omap3evm_vsim,
 };
 
 static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = {
#5 lore raw
Quoted 4 lines · dfoley

SD seems to work now with patch below and REGULATOR_TWL4030 [=y]. For the patch, I just copied from other boards in mach-omap2, so I really have no idea if it's correct.

I think you don't need to set up VSIM, since that board only seems to support 4-wire SD cards (not 8-wire MMCplus). Else mmc[0].wires == 4 would be wrong...