Hi Peng,
Thank you for your feedback.
On 10/22/2025 8:46 AM, Peng Fan wrote:
Hi Tanmay,
On Tue, Oct 21, 2025 at 01:45:26PM -0700, Tanmay Kathpalia wrote:
Some boards have SD card connectors where the power rail cannot be switched
off by the driver. However there are various circumstances when a card
might be re-initialized, such as after system resume, warm re-boot, or
error handling. However, a UHS card will continue to use 1.8V signaling
unless it is power cycled.
If the card has not been power cycled, it may still be using 1.8V
signaling. According to the SD spec., the Bus Speed Mode (function group 1)
bits 2 to 4 are zero if the card is initialized at 3.3V signal level. Thus
they can be used to determine if the card has already switched to 1.8V
signaling. Detect that situation and try to initialize a UHS-I (1.8V)
transfer mode.
Actually a power cycle or reset is required to make sure SD card to work
correctly. Some SD cards may work in your case, some SD cards might not work,
without a power cycle or reset.
Thanks,
Peng
According to the SD specification for the Switch Function command (CMD6):
"If the card is initialized in 3.3V signal level, Default Speed and High
Speed are assigned to function 0 and 1. Then support bits of function 2
to 4 (SDR50, SDR104 and DDR50) are set to 0. If the card is initialized
in 1.8V signal level, SDR and DDR modes are assigned from function 0 to
function 4."
This allows the host to detect if the card is already operating at 1.8V
signaling and proceed accordingly.
I have tested this approach with multiple SD cards from different
vendors and capacities, including:
- Kingston Canvas Select Plus 16GB SDR104
- Samsung EVO Select 128GB SDR104
- Samsung Evo Plus 128GB SDR104
All of these cards worked reliably in my tests.
For further reference, similar discussions and solutions have been
proposed in the Linux community:
https://lore.kernel.org/linux-mmc/[email protected]/
https://lore.kernel.org/linux-mmc/[email protected]/
Thanks,
Tanmay