1# STM32 xSPI flash driver configuration options
2
3# Copyright (c) 2024 STMicroelectronics
4# SPDX-License-Identifier: Apache-2.0
5
6DT_STM32_XSPI_1_HAS_DMA := $(dt_nodelabel_has_prop,xspi1,dmas)
7DT_STM32_XSPI_2_HAS_DMA := $(dt_nodelabel_has_prop,xspi2,dmas)
8
9config FLASH_STM32_XSPI
10	bool "STM32 XSPI Flash driver"
11	default y
12	depends on DT_HAS_ST_STM32_XSPI_ENABLED && DT_HAS_ST_STM32_XSPI_NOR_ENABLED
13	select USE_STM32_HAL_XSPI
14	select USE_STM32_LL_DLYB
15	select FLASH_HAS_DRIVER_ENABLED
16	select FLASH_JESD216
17	select FLASH_PAGE_LAYOUT
18	select FLASH_HAS_PAGE_LAYOUT
19	select DMA if $(DT_STM32_XSPI_1_HAS_DMA) || $(DT_STM32_XSPI_2_HAS_DMA)
20	select USE_STM32_HAL_DMA if $(DT_STM32_XSPI_1_HAS_DMA) || \
21					$(DT_STM32_XSPI_2_HAS_DMA)
22	select USE_STM32_HAL_DMA_EX if SOC_SERIES_STM32H5X && \
23					($(DT_STM32_XSPI_1_HAS_DMA) || \
24					 $(DT_STM32_XSPI_2_HAS_DMA))
25	help
26	  Enable XSPI-NOR support on the STM32 family of processors.
27