summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTanmay Kathpalia <[email protected]>2025-10-21 13:45:26 -0700
committerPeng Fan <[email protected]>2025-10-30 10:11:18 +0800
commit906ee6785b1cb5a51375b5a613a7cc56acced8c8 (patch)
tree59b278db7543ae0a6fb6727956149646be55ae86 /include
parentbf8f1a984d66865a065634e2468f2879dfb98d96 (diff)
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 <[email protected]> Signed-off-by: Peng Fan <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/mmc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/mmc.h b/include/mmc.h
index c6b2ab4a29f..51d3f2f8dd5 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -759,6 +759,9 @@ struct mmc {
#endif
u8 *ext_csd;
u32 cardtype; /* cardtype read from the MMC */
+#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT)
+ u32 sd3_bus_mode; /* Supported UHS-I bus speed modes */
+#endif
enum mmc_voltage current_voltage;
enum bus_mode selected_mode; /* mode currently used */
enum bus_mode best_mode; /* best mode is the supported mode with the