1# Copyright (c) 2016 Intel Corporation
2# Copyright (c) 2021 Nordic Semiconductor ASA
3# SPDX-License-Identifier: Apache-2.0
4
5DT_COMPAT_ZEPHYR_MMC_SPI_SLOT := zephyr,mmc-spi-slot
6DT_COMPAT_NXP_USDHC := nxp,imx-usdhc
7DT_COMPAT_ST_STM32_SDMMC := st,stm32-sdmmc
8
9config DISK_DRIVER_SDMMC
10	bool "SDMMC card driver"
11	help
12	  SDMMC card driver.
13
14if DISK_DRIVER_SDMMC
15
16config SDMMC_INIT_PRIORITY
17	int "Init priority"
18	default 90
19	help
20	  SDMMC controller driver initialization priority.
21
22config SDMMC_VOLUME_NAME
23	string "SDMMC Disk mount point or drive name"
24	default "SD" if FAT_FILESYSTEM_ELM
25	default "SDMMC"
26	help
27	  Disk name as per file system naming guidelines.
28
29config SDMMC_OVER_SPI
30	bool "SDHC access over SPI"
31	select SPI
32	default $(dt_compat_enabled,$(DT_COMPAT_ZEPHYR_MMC_SPI_SLOT))
33	help
34	  File system on a SDHC card accessed over SPI.
35
36config SDMMC_USDHC
37	bool "NXP i.MXRT USDHC driver"
38	depends on (HAS_MCUX_USDHC1 || HAS_MCUX_USDHC2)
39	default $(dt_compat_enabled,$(DT_COMPAT_NXP_USDHC))
40	help
41	  File system on a SDHC card accessed over
42	  NXP USDHC.
43
44config SDMMC_STM32
45	bool "STM32 SDMMC driver"
46	depends on HAS_STM32CUBE
47	select USE_STM32_HAL_SD
48	select USE_STM32_HAL_SD_EX if SOC_SERIES_STM32L4X
49	select USE_STM32_LL_SDMMC
50	default $(dt_compat_enabled,$(DT_COMPAT_ST_STM32_SDMMC))
51	help
52	  File system on sdmmc accessed through stm32 sdmmc.
53
54module = SDMMC
55module-str = sdmmc
56source "subsys/logging/Kconfig.template.log_config"
57
58endif # DISK_DRIVER_SDMMC
59