mmc: sd: Handle UHS-I voltage signaling without power cycle
authorTanmay Kathpalia <tanmay.kathpalia@altera.com>
Tue, 21 Oct 2025 20:45:26 +0000 (13:45 -0700)
committerPeng Fan <peng.fan@nxp.com>
Thu, 30 Oct 2025 02:11:18 +0000 (10:11 +0800)
commit906ee6785b1cb5a51375b5a613a7cc56acced8c8
tree59b278db7543ae0a6fb6727956149646be55ae86
parentbf8f1a984d66865a065634e2468f2879dfb98d96
mmc: sd: Handle UHS-I voltage signaling without power cycle

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.

Signed-off-by: Tanmay Kathpalia <tanmay.kathpalia@altera.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/mmc/mmc.c
include/mmc.h