drivers: dma: stm32 dma driver for a new dma version

This is the dma V2bis which is particular DMA V2 instance for
stm32F1 and STM32L1 soc series. This DMA does not use the dma slot
Otherwise it is similar to version V2.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
Francois Ramu 2021-04-28 14:37:47 +02:00 committed by Christopher Friedt
commit dcefbd67ed
3 changed files with 12 additions and 3 deletions

View file

@ -6,6 +6,7 @@
DT_COMPAT_ST_STM32_DMA_V1 := st,stm32-dma-v1
DT_COMPAT_ST_STM32_DMA_V2 := st,stm32-dma-v2
DT_COMPAT_ST_STM32_DMA_V2BIS := st,stm32-dma-v2bis
DT_COMPAT_ST_STM32_DMAMUX := st,stm32-dmamux
config DMA_STM32
@ -25,9 +26,13 @@ config DMA_STM32_V1
config DMA_STM32_V2
bool
default y if $(dt_compat_enabled,$(DT_COMPAT_ST_STM32_DMA_V2))
default y if $(dt_compat_enabled,$(DT_COMPAT_ST_STM32_DMA_V2)) \
|| $(dt_compat_enabled,$(DT_COMPAT_ST_STM32_DMA_V2BIS))
help
Enable DMA V2 support.
Enable DMA V2 or DMA V2bis support. With the versions V2 of DMA, the
peripheral request must be specified in the dma slot of the dma cell
With the versions V2 bis of DMA, the peripheral request (slot) is not
a parameter of the dma-cell.
config DMAMUX_STM32
bool

View file

@ -24,6 +24,8 @@ LOG_MODULE_REGISTER(dma_stm32, CONFIG_DMA_LOG_LEVEL);
#define DT_DRV_COMPAT st_stm32_dma_v1
#elif DT_HAS_COMPAT_STATUS_OKAY(st_stm32_dma_v2)
#define DT_DRV_COMPAT st_stm32_dma_v2
#elif DT_HAS_COMPAT_STATUS_OKAY(st_stm32_dma_v2bis)
#define DT_DRV_COMPAT st_stm32_dma_v2bis
#endif
#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay)

View file

@ -5,6 +5,7 @@
DT_COMPAT_ST_STM32_DMA_V1 := st,stm32-dma-v1
DT_COMPAT_ST_STM32_DMA_V2 := st,stm32-dma-v2
DT_COMPAT_ST_STM32_DMA_V2BIS := st,stm32-dma-v2bis
config UART_STM32
bool "STM32 MCU serial driver"
@ -13,7 +14,8 @@ config UART_STM32
# the ASYNC implementation requires a DMA controller
select SERIAL_SUPPORT_ASYNC \
if $(dt_compat_enabled,$(DT_COMPAT_ST_STM32_DMA_V1)) || \
$(dt_compat_enabled,$(DT_COMPAT_ST_STM32_DMA_V2))
$(dt_compat_enabled,$(DT_COMPAT_ST_STM32_DMA_V2)) || \
$(dt_compat_enabled,$(DT_COMPAT_ST_STM32_DMA_V2BIS))
select DMA if UART_ASYNC_API
depends on SOC_FAMILY_STM32
help