> Subject: [PATCH] mmc: Add power stabilization delay in > mmc_power_on() > > From: Luke Wang <[email protected]> > > After enabling vmmc supply, add 10ms delay to allow voltage to > stabilize before SD initialization starts. Without this delay, some SD > cards fail to initialize because the initial clock cycles are sent while > power is still ramping up.
There was an patch to add 2ms delay that missed in my mailbox and I plan to pick it up. https://lore.kernel.org/all/[email protected]/ That patch is for 1ms delay per spec requirement. But here you added 10ms for power up ramp time, this should really be in board off-on-delay-us because this is board specific stuff. Adding 10ms here for all will enlarge boot time, I think this is not good. Thanks, Peng. > > Signed-off-by: Luke Wang <[email protected]> > --- > drivers/mmc/mmc.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index > bf82c515600..97037722fe1 100644 > --- a/drivers/mmc/mmc.c > +++ b/drivers/mmc/mmc.c > @@ -2878,6 +2878,12 @@ static int mmc_power_on(struct mmc > *mmc) > printf("Error enabling VMMC supply : %d\n", > ret); > return ret; > } > + > + /* > + * Wait for power supply to stabilize before sending > + * initial clock cycle. > + */ > + mdelay(10); > } > > if (mmc->vqmmc_supply) { > -- > 2.34.1

