zephyr/drivers/flash/Kconfig.stm32_qspi
Federico Di Gregorio 3d720bcb73 drivers: flash: stm32: add "generic read/write" ex op to QSPI driver
Some external flash modules have extra commands to support, for example,
reading/writing an OTP zone. Given that the commands are highly specific
and difficult to generalize, we add two ex ops that can be used to
transmit a custom command (in the form of a full QSPI_CommandTypeDef) and
then read or write a user-provided buffer.

Signed-off-by: Federico Di Gregorio <fog@dndg.it>
2025-06-18 07:37:00 +02:00

42 lines
1.3 KiB
Text

# STM32 Quad SPI flash driver configuration options
# Copyright (c) 2020 Piotr Mienkowski
# Copyright (c) 2020 Linaro Limited
# SPDX-License-Identifier: Apache-2.0
DT_STM32_QUADSPI_HAS_DMA := $(dt_compat_any_has_prop,$(DT_COMPAT_ST_STM32_QSPI),dmas)
menuconfig FLASH_STM32_QSPI
bool "STM32 Quad SPI Flash driver"
default y
depends on DT_HAS_ST_STM32_QSPI_NOR_ENABLED
select USE_STM32_HAL_QSPI
select USE_STM32_HAL_MDMA if SOC_SERIES_STM32H7X
select FLASH_HAS_DRIVER_ENABLED
select FLASH_JESD216
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_EXPLICIT_ERASE
select PINCTRL
select DMA if $(DT_STM32_QUADSPI_HAS_DMA)
select USE_STM32_HAL_DMA if $(DT_STM32_QUADSPI_HAS_DMA)
help
Enable QSPI-NOR support on the STM32 family of processors.
if FLASH_STM32_QSPI
config FLASH_STM32_QSPI_GENERIC_READ
bool "Generic read command extended operation"
select FLASH_HAS_EX_OP
help
Enables flash extended operation that can be used to transmit
a custom command and read the result to a user-provided buffer.
config FLASH_STM32_QSPI_GENERIC_WRITE
bool "Generic write command extended operation"
select FLASH_HAS_EX_OP
help
Enables flash extended operation that can be used to transmit
a custom command and write data taken from a user-provided
buffer.
endif # FLASH_STM32_QSPI