Skip to content

Commit 4009494

Browse files
ExaltZephyrpillo79
authored andcommitted
drivers: sdhc: Support SDHC driver for STM32.
This commit introduces support for the SDHC driver on STM32, enabling functionality APIs for SDHC host controllers. Signed-off-by: Sara Touqan <[email protected]> Signed-off-by: Mohammad Odeh <[email protected]>
1 parent aca9038 commit 4009494

File tree

4 files changed

+827
-0
lines changed

4 files changed

+827
-0
lines changed

drivers/sdhc/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ zephyr_library_sources_ifdef(CONFIG_SDHC_RENESAS_RA sdhc_renesas_ra.c)
1616
zephyr_library_sources_ifdef(CONFIG_SDHC_MAX32 sdhc_max32.c)
1717
zephyr_library_sources_ifdef(CONFIG_SDHC_AMBIQ sdhc_ambiq.c)
1818
zephyr_library_sources_ifdef(CONFIG_XLNX_SDHC xlnx_sdhc.c)
19+
zephyr_library_sources_ifdef(CONFIG_SDHC_STM32_SDIO sdhc_stm32.c)
1920
endif()

drivers/sdhc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ source "drivers/sdhc/Kconfig.renesas_ra"
2121
source "drivers/sdhc/Kconfig.max32"
2222
source "drivers/sdhc/Kconfig.ambiq"
2323
source "drivers/sdhc/Kconfig.xlnx"
24+
source "drivers/sdhc/Kconfig.stm32"
2425

2526
config SDHC_INIT_PRIORITY
2627
int "SDHC driver init priority"

drivers/sdhc/Kconfig.stm32

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright (c) 2025 EXALT Technologies.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
source "subsys/logging/Kconfig.template.log_config"
5+
6+
config SDHC_STM32_SDIO
7+
bool "STM32 SDMMC driver support for SDIO"
8+
depends on DT_HAS_ST_STM32_SDIO_ENABLED
9+
select USE_STM32_HAL_SDIO
10+
select USE_STM32_LL_SDMMC
11+
select SDHC_SUPPORTS_NATIVE_MODE
12+
imply CACHE_MANAGEMENT if !SDHC_STM32_POLLING_SUPPORT && DCACHE
13+
default y
14+
help
15+
Enable support for SDMMC on STM32 platforms.
16+
17+
config SDHC_BUFFER_ALIGNMENT
18+
default 32
19+
20+
config SDHC_STM32_POLLING_SUPPORT
21+
bool "STM32 SDHC Polling driver support"
22+
help
23+
Enables support for SDHC Polling mode on STM32 microcontrollers.

0 commit comments

Comments
 (0)