mmc: omap_hsmmc: Add small delay after enabling power
Subsystems (2)
PATCH 1/1 mmc: omap_hsmmc: Add small delay after enabling power
From: Thorsten Einsbein <[email protected]>
On the TAO3530 (OMAP3530 based) we noticed that some SD cards are not detected reliably upon bootup (timeout). Especially the SanDisk Ultra 8GiB seems to be problematic here. The SanDisk Extreme also has this problem on this platform, but not that often. A Samsung 8 GiB type 6 doesn't show this problem at all.
This patch now adds a short delay after enabling the power on the slot. With this delay all cards are detected reliably.
--- drivers/mmc/host/omap_hsmmc.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/mmc/host/omap_hsmmc.c +4 -0
@@ -335,6 +335,10 @@ static int omap_hsmmc_set_power(struct device *dev, int slot, int power_on, ret =mmc_regulator_set_ocr (host->mmc, host->vcc,0 ); } + +dev_dbg (host->dev,"omap_hsmmc_set_power: wait a little (slot %d)\n" , + slot); +msleep (5 ); }else {/* Shut down the rail */ if (host->vcc_aux)
Signature · 1 line
2.1.0
Quoted 10 lines · Stefan Roese
From: Thorsten Einsbein <[email protected]>
On the TAO3530 (OMAP3530 based) we noticed that some SD cards are not detected reliably upon bootup (timeout). Especially the SanDisk Ultra 8GiB seems to be problematic here. The SanDisk Extreme also has this problem on this platform, but not that often. A Samsung 8 GiB type 6 doesn't show this problem at all.
This patch now adds a short delay after enabling the power on the slot. With this delay all cards are detected reliably.
Is this delay related to regulator ramp up/down time? Then I think it maybe should be a part of the regulator code/DT.
Kind regards
Uffe
Quoted 27 lines
Signed-off-by Thorsten Einsbein <[email protected]>Signed-off-by Stefan Roese <[email protected]>Cc Ulf Hansson <[email protected]>Cc Balaji T K <[email protected]>--- drivers/mmc/host/omap_hsmmc.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mmc/host/omap_hsmmc.c +4
-1@@ -335,6 +335,10 @@ static int omap_hsmmc_set_power(struct device *dev, int slot, int power_on, ret =mmc_regulator_set_ocr (host->mmc, host->vcc,0 ); } + +dev_dbg (host->dev,"omap_hsmmc_set_power: wait a little (slot %d)\n" , + slot); +msleep (5 ); }else {/* Shut down the rail */ if (host->vcc_aux) --2.1.0
Quoted 9 lines · Ulf Hansson
Quoted 8 lines · Stefan Roese
From: Thorsten Einsbein <[email protected]>
On the TAO3530 (OMAP3530 based) we noticed that some SD cards are not detected reliably upon bootup (timeout). Especially the SanDisk Ultra 8GiB seems to be problematic here. The SanDisk Extreme also has this problem on this platform, but not that often. A Samsung 8 GiB type 6 doesn't show this problem at all.
Quoted 5 lines
Quoted 2 lines
This patch now adds a short delay after enabling the power on the slot. With this delay all cards are detected reliably.
Is this delay related to regulator ramp up/down time? Then I think it maybe should be a part of the regulator code/DT.
Thanks for this feedback. Yes, adding "regulator-enable-ramp-delay" to the regulator(s) solves this issue too. I wasn't aware of that one.
The patch can be dropped.
Thanks,
Stefan