> -----Original Message----- > From: Marek Vasut <[email protected]> > Sent: Tuesday, December 30, 2025 9:37 PM > To: Luke Wang <[email protected]>; Peng Fan <[email protected]>; > [email protected]; [email protected] > Cc: [email protected]; [email protected]; > [email protected]; [email protected]; [email protected]; > [email protected]; Ye Li <[email protected]>; Bough Chen > <[email protected]>; [email protected] > 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, [email protected] wrote: > > 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. > 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. Regards, Luke > > Without useful details, this is a NAK.

