Skip to content

Commit 477d749

Browse files
ExaltZephyrcfriedt
authored andcommitted
drivers: sdhc: Support SDHC SDIO 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 f27168f commit 477d749

File tree

4 files changed

+820
-0
lines changed

4 files changed

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

0 commit comments

Comments
 (0)