1# STM32 Octo SPI flash driver configuration options
2
3# Copyright (c) 2022 STMicroelectronics
4# SPDX-License-Identifier: Apache-2.0
5
6DT_STM32_OCTOSPI_1_HAS_DMA := $(dt_nodelabel_has_prop,octospi1,dmas)
7DT_STM32_OCTOSPI_2_HAS_DMA := $(dt_nodelabel_has_prop,octospi2,dmas)
8
9config FLASH_STM32_OSPI
10	bool "STM32 Octo SPI Flash driver"
11	default y
12	depends on DT_HAS_ST_STM32_OSPI_NOR_ENABLED
13	select USE_STM32_HAL_OSPI if !SOC_SERIES_STM32H5X
14	select USE_STM32_HAL_XSPI if SOC_SERIES_STM32H5X
15	select USE_STM32_LL_DLYB if (SOC_SERIES_STM32H5X || SOC_SERIES_STM32U5X)
16	select USE_STM32_HAL_MDMA if SOC_SERIES_STM32H7X
17	select FLASH_HAS_DRIVER_ENABLED
18	select FLASH_JESD216
19	select FLASH_PAGE_LAYOUT
20	select FLASH_HAS_PAGE_LAYOUT
21	select DMA if $(DT_STM32_OCTOSPI_1_HAS_DMA) || $(DT_STM32_OCTOSPI_2_HAS_DMA)
22	select USE_STM32_HAL_DMA if $(DT_STM32_OCTOSPI_1_HAS_DMA) || \
23					$(DT_STM32_OCTOSPI_2_HAS_DMA)
24	select USE_STM32_HAL_DMA_EX if SOC_SERIES_STM32U5X && \
25					($(DT_STM32_OCTOSPI_1_HAS_DMA) || \
26					 $(DT_STM32_OCTOSPI_2_HAS_DMA))
27	help
28	  Enable OSPI-NOR support on the STM32 family of processors.
29