Skip to content

Commit 10594ce

Browse files
committed
drivers: mspi: stm32 mspi controller entity
Enable the stm32 MSPI controller based on the xspi peripheral Signed-off-by: Francois Ramu <[email protected]>
1 parent 53d7cd2 commit 10594ce

File tree

5 files changed

+2183
-0
lines changed

5 files changed

+2183
-0
lines changed

drivers/mspi/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/mspi.h)
55
zephyr_library()
66
zephyr_library_sources_ifdef(CONFIG_MSPI_AMBIQ_AP3 mspi_ambiq_ap3.c)
77
zephyr_library_sources_ifdef(CONFIG_MSPI_EMUL mspi_emul.c)
8+
zephyr_library_sources_ifdef(CONFIG_MSPI_STM32 mspi_stm32.c)

drivers/mspi/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,6 @@ source "subsys/logging/Kconfig.template.log_config"
6161

6262
source "drivers/mspi/Kconfig.ambiq"
6363
source "drivers/mspi/Kconfig.mspi_emul"
64+
source "drivers/mspi/Kconfig.stm32"
6465

6566
endif # MSPI

drivers/mspi/Kconfig.stm32

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# STM32 MSPI flash driver configuration options
2+
3+
# Copyright (c) 2024 STMicroelectronics
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
DT_STM32_MSPI_1_HAS_DMA := $(dt_nodelabel_has_prop,xspi1,dmas)
7+
DT_STM32_MSPI_2_HAS_DMA := $(dt_nodelabel_has_prop,xspi2,dmas)
8+
9+
config MSPI_STM32
10+
bool "STM32 XSPI Flash driver"
11+
default y
12+
depends on DT_HAS_ST_STM32_MSPI_CONTROLLER_ENABLED
13+
select USE_STM32_HAL_XSPI
14+
select USE_STM32_LL_DLYB
15+
select DMA if $(DT_STM32_MSPI_1_HAS_DMA) || $(DT_STM32_MSPI_2_HAS_DMA)
16+
select USE_STM32_HAL_DMA if $(DT_STM32_MSPI_1_HAS_DMA) || \
17+
$(DT_STM32_MSPI_2_HAS_DMA)
18+
select USE_STM32_HAL_DMA_EX if SOC_SERIES_STM32H5X && \
19+
($(DT_STM32_MSPI_1_HAS_DMA) || \
20+
$(DT_STM32_MSPI_2_HAS_DMA))
21+
help
22+
Enable driver for STM32 family of processors.

0 commit comments

Comments
 (0)