Skip to content

Commit 129ccf9

Browse files
darrenlu-ambiqkartben
authored andcommitted
drivers: sdhc: add sdhc driver for Ambiq MCU
Add SDHC/SDIO driver support for Ambiq Apollo4 MCU. Signed-off-by: Darren Lu <[email protected]>
1 parent f46fd07 commit 129ccf9

File tree

5 files changed

+889
-0
lines changed

5 files changed

+889
-0
lines changed

drivers/sdhc/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ zephyr_library_sources_ifdef(CONFIG_CDNS_SDHC sdhc_cdns_ll.c sdhc_cdns.c)
1414
zephyr_library_sources_ifdef(CONFIG_SDHC_ESP32 sdhc_esp32.c)
1515
zephyr_library_sources_ifdef(CONFIG_SDHC_RENESAS_RA sdhc_renesas_ra.c)
1616
zephyr_library_sources_ifdef(CONFIG_SDHC_MAX32 sdhc_max32.c)
17+
zephyr_library_sources_ifdef(CONFIG_SDHC_AMBIQ sdhc_ambiq.c)
1718
endif()

drivers/sdhc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ source "drivers/sdhc/Kconfig.sdhc_cdns"
1919
source "drivers/sdhc/Kconfig.esp32"
2020
source "drivers/sdhc/Kconfig.renesas_ra"
2121
source "drivers/sdhc/Kconfig.max32"
22+
source "drivers/sdhc/Kconfig.ambiq"
2223

2324
config SDHC_INIT_PRIORITY
2425
int "SDHC driver init priority"

drivers/sdhc/Kconfig.ambiq

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright (c) 2025 Ambiq Micro Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SDHC_AMBIQ
5+
bool "Ambiq SDHC driver"
6+
default y
7+
depends on DT_HAS_AMBIQ_SDIO_ENABLED
8+
select AMBIQ_HAL
9+
select AMBIQ_HAL_USE_SDIO
10+
select PINCTRL
11+
select GPIO
12+
select SDHC_SUPPORTS_NATIVE_MODE
13+
help
14+
This option enables the SDHC driver for Ambiq Apollo family.
15+
16+
if SDHC_AMBIQ
17+
18+
config AMBIQ_SDIO_ASYNC
19+
bool "Ambiq SDIO Async Mode"
20+
default y
21+
depends on DT_HAS_AMBIQ_SDIO_ENABLED
22+
help
23+
This option enables Ambiq SDIO Async Mode.
24+
25+
config SDHC_BUFFER_ALIGNMENT
26+
default 32 if DCACHE
27+
default 16
28+
help
29+
SDHC buffer should be 32bytes aligned when placed in cachable region.
30+
31+
endif

0 commit comments

Comments
 (0)