[EXT] Re: [PATCH] mmc: Add power stabilization delay in mmc_power_on()

Tom Rini trini at konsulko.com
Wed Dec 31 15:49:21 CET 2025


On Wed, Dec 31, 2025 at 09:51:13AM +0000, Luke Wang wrote:
> 
> 
> > -----Original Message-----
> > From: Marek Vasut <marek.vasut at mailbox.org>
> > Sent: Tuesday, December 30, 2025 9:37 PM
> > To: Luke Wang <ziniu.wang_1 at nxp.com>; Peng Fan <peng.fan at nxp.com>;
> > jh80.chung at samsung.com; trini at konsulko.com
> > Cc: marek.vasut+renesas at mailbox.org; bhimeswararao.matsa at gmail.com;
> > xypron.glpk at gmx.de; kauschluss at disroot.org; andrew.goodbody at linaro.org;
> > tanmay.kathpalia at altera.com; Ye Li <ye.li at nxp.com>; Bough Chen
> > <haibo.chen at nxp.com>; u-boot at lists.denx.de
> > Subject: [EXT] Re: [PATCH] mmc: Add power stabilization delay in
> > mmc_power_on()
> > 
> > Caution: This is an external email. Please take care when clicking links or
> > opening attachments. When in doubt, report the message using the 'Report this
> > email' button
> > 
> > 
> > On 12/30/25 11:39 AM, ziniu.wang_1 at nxp.com wrote:
> > > From: Luke Wang <ziniu.wang_1 at nxp.com>
> > >
> > > 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.
> > Details please. Which exact cards ? With which controller/SoC ? Does
> > this problem happen on another SoC/controller ?
> 
> MMC initialization failed on IMX7ULP-EVK with the SanDisk Ultra
> 64GB card (CID: 035344534436344785569a5ab5018400). However,
> SanDisk Ultra 32GB and 16GB cards did not encounter this issue
> (both have CID: 035344534331364780c86726e1012700).
> 
> The root cause of this issue is that this SD card requires at
> least 74 clock cycles after power-up, otherwise CMD8 will not
> receive a response. For other SD cards that initialize normally,
> the initial clock cycles are not mandatory - they can still
> initialize successfully even without them.
> 
> On the IMX7ULP-EVK, the SD power-up time takes approximately 2ms
> to reach VDD MIN voltage. However, the current code does not wait
> for the voltage to stabilize before sending the initial clock
> cycles. This results in the VDD voltage being only around 1V when
> the initial clock cycles are sent, causing the SD card to
> completely miss these initial clock cycles.
> 
> We could add regulator-ramp-delay or startup-delay-us values in
> the dts vmmc regulator, but I have checked some dts files and
> found that many of them do not configure these two values - not
> just for the IMX series, but across different platforms. If we
> were to add them in dts, it would require modifying a very large
> number of dts files.
> 
> Alternatively, we could follow the approach in the Linux kernel's
> mmc_power_up() function and wait 10ms after power on.
> 
> This card does not encounter issues on the IMX8MM platform because
> the IMX8MM's SD power only needs about 0.5ms to stabilize. Sending
> 1ms of initial clock cycles ensures that the SD card can still
> receive at least 74 clock cycles after the voltage has stabilized.
> Even though no issue was encountered, sending initial clocks during
> the power ramp-up phase still does not comply with the description
> in Section 6.4.1 of the SD Physical Layer Specification Version
> 3.00.
> 
> Additionally, I believe the 1000us delay at the beginning of the
> mmc_go_idle() function exists for a similar reason. Without this
> 1000us delay, CMD0 would be sent even before the voltage reaches
> VDD_MIN.
> 
> This should be a common issue, not limited to the IMX platform.
> We can either add a delay in the code or add regulator-ramp-delay/
> startup-delay-us in numerous dts files.

Please condense this slightly and expand the commit message, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20251231/5a1b1524/attachment.sig>


More information about the U-Boot mailing list