2021-02-24 07:41:46 +08:00
|
|
|
# Copyright (c) 2016 Intel Corporation
|
|
|
|
# Copyright (c) 2021 Nordic Semiconductor ASA
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2022-06-21 21:43:46 +08:00
|
|
|
DT_STM32_SDMMC_HAS_DMA := $(dt_nodelabel_has_prop,sdmmc,dmas)
|
2021-02-24 07:41:46 +08:00
|
|
|
|
|
|
|
config DISK_DRIVER_SDMMC
|
|
|
|
bool "SDMMC card driver"
|
2023-02-08 01:26:38 +08:00
|
|
|
default y if DT_HAS_ZEPHYR_SDMMC_DISK_ENABLED || \
|
|
|
|
DT_HAS_ST_STM32_SDMMC_ENABLED
|
2021-02-24 07:41:46 +08:00
|
|
|
help
|
|
|
|
SDMMC card driver.
|
|
|
|
|
|
|
|
if DISK_DRIVER_SDMMC
|
|
|
|
|
2022-09-08 08:40:58 +08:00
|
|
|
config SD_INIT_PRIORITY
|
2021-02-24 07:41:46 +08:00
|
|
|
int "Init priority"
|
|
|
|
default 90
|
|
|
|
help
|
|
|
|
SDMMC controller driver initialization priority.
|
|
|
|
|
|
|
|
config SDMMC_VOLUME_NAME
|
|
|
|
string "SDMMC Disk mount point or drive name"
|
|
|
|
default "SD" if FAT_FILESYSTEM_ELM
|
|
|
|
default "SDMMC"
|
|
|
|
help
|
|
|
|
Disk name as per file system naming guidelines.
|
|
|
|
|
2022-02-17 06:27:33 +08:00
|
|
|
config SDMMC_SUBSYS
|
|
|
|
bool "SDMMC access via SD subsystem"
|
2022-05-25 00:35:06 +08:00
|
|
|
select SDMMC_STACK
|
2022-08-25 03:46:08 +08:00
|
|
|
default y
|
|
|
|
depends on DT_HAS_ZEPHYR_SDMMC_DISK_ENABLED
|
2022-02-17 06:27:33 +08:00
|
|
|
help
|
2022-08-30 05:43:30 +08:00
|
|
|
Enable SDMMC access via SD subsystem.
|
2022-02-17 06:27:33 +08:00
|
|
|
|
2021-02-24 07:41:46 +08:00
|
|
|
config SDMMC_STM32
|
|
|
|
bool "STM32 SDMMC driver"
|
2022-08-25 03:46:08 +08:00
|
|
|
default y
|
|
|
|
depends on DT_HAS_ST_STM32_SDMMC_ENABLED
|
2021-02-24 07:41:46 +08:00
|
|
|
select USE_STM32_HAL_SD
|
|
|
|
select USE_STM32_HAL_SD_EX if SOC_SERIES_STM32L4X
|
|
|
|
select USE_STM32_LL_SDMMC
|
2022-03-31 15:42:25 +08:00
|
|
|
select USE_STM32_HAL_DMA if (SOC_SERIES_STM32L4X || SOC_SERIES_STM32F7X || SOC_SERIES_STM32F4X)
|
2022-06-21 21:43:46 +08:00
|
|
|
select DMA if ($(DT_STM32_SDMMC_HAS_DMA) && SOC_SERIES_STM32F4X)
|
2023-01-13 23:39:10 +08:00
|
|
|
select RESET
|
2021-02-24 07:41:46 +08:00
|
|
|
help
|
|
|
|
File system on sdmmc accessed through stm32 sdmmc.
|
|
|
|
|
2021-10-12 20:20:53 +08:00
|
|
|
config SDMMC_STM32_HWFC
|
|
|
|
bool "STM32 SDMMC Hardware Flow control"
|
|
|
|
depends on SDMMC_STM32
|
2022-04-22 08:03:49 +08:00
|
|
|
depends on SOC_SERIES_STM32H7X || \
|
|
|
|
SOC_SERIES_STM32F7X || \
|
|
|
|
SOC_SERIES_STM32L4X || \
|
|
|
|
SOC_SERIES_STM32L5X
|
2021-10-12 20:20:53 +08:00
|
|
|
help
|
|
|
|
Enable SDMMC Hardware Flow Control to avoid FIFO underrun (TX mode) and
|
|
|
|
overrun (RX mode) errors.
|
|
|
|
|
2023-01-18 22:16:33 +08:00
|
|
|
config SDMMC_STM32_CLOCK_CHECK
|
|
|
|
bool "Runtime SDMMC 48MHz clock check"
|
|
|
|
depends on SDMMC_STM32
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
Enable SDMMC clock 48MHz configuration runtime check.
|
|
|
|
In specific cases, this check might provide wrong verdict and should
|
|
|
|
be disabled.
|
|
|
|
|
2021-02-24 07:41:46 +08:00
|
|
|
module = SDMMC
|
|
|
|
module-str = sdmmc
|
|
|
|
source "subsys/logging/Kconfig.template.log_config"
|
|
|
|
|
|
|
|
endif # DISK_DRIVER_SDMMC
|