RE: [PATCH] mmc: core: Wait for Vdd to settle on card power off

From: Erick Shepherd
Date: Fri Mar 07 2025 - 12:52:40 EST


>> The SD spec version 6.0 section 6.4.1.5 requires that Vdd must be
>> lowered to less than 0.5V for a minimum of 1 ms when powering off a
>> card. Increase our wait to 15 ms so that voltage has time to drain down
>> to 0.5V.

> mmc_power_off() has a delay. So does mmc_power_cycle()

> Why does this need to be in sdhci? Are you experiencing an
> issue?

Thank you for taking a look at this. The initial change was made in
mmc_power_off() due to an issue we had with some of our devices
requiring more time for the Vdd to drain below 0.5V. Ulf gave us this
feedback on that change:

> No, this isn't the proper place of adding more "magic" delays.

> Instead, make sure the related ->set_ios() callback in the mmc host
> driver deals with this instead. In case it uses an external regulator,
> via the regulator API, then this is something that should be
> controlled with the definition of the regulator.

Should we take a different approach here?

Regards
Erick