Skip to content

Commit f6d7b2a

Browse files
author
mario.paja
committed
drivers: i2s: add sai support for stm32u5xx
This PR adds initial sai support for STM32u5xx Signed-off-by: Mario Paja <[email protected]>
1 parent d3d7e18 commit f6d7b2a

18 files changed

+9753
-40
lines changed

drivers/i2s/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ zephyr_library_sources_ifdef(CONFIG_I2S_NRFX i2s_nrfx.c)
1414
zephyr_library_sources_ifdef(CONFIG_I2S_MCUX_SAI i2s_mcux_sai.c)
1515
zephyr_library_sources_ifdef(CONFIG_I2S_ESP32 i2s_esp32.c)
1616
zephyr_library_sources_ifdef(CONFIG_I2S_TEST i2s_test.c)
17+
zephyr_library_sources_ifdef(CONFIG_I2S_STM32_SAI i2s_stm32_sai.c)

drivers/i2s/Kconfig.stm32

+26
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,20 @@ menuconfig I2S_STM32
1414
Enable I2S support on the STM32 family of processors.
1515
(Tested on the STM32F4 & STM32H7 series)
1616

17+
menuconfig I2S_STM32_SAI
18+
bool "STM32 MCU I2S controller driver"
19+
default y
20+
depends on DT_HAS_ST_STM32_SAI_ENABLED
21+
depends on SOC_SERIES_STM32U5X
22+
select CACHE_MANAGEMENT if CPU_HAS_DCACHE
23+
select DMA
24+
select USE_STM32_HAL_DMA
25+
select USE_STM32_HAL_DMA_EX
26+
select USE_STM32_HAL_SAI
27+
select USE_STM32_LL_DLYB if (SOC_SERIES_STM32H5X || SOC_SERIES_STM32U5X)
28+
help
29+
Enable SAI support on the STM32U5 family of processors.
30+
1731
if I2S_STM32
1832

1933
config I2S_STM32_RX_BLOCK_COUNT
@@ -25,3 +39,15 @@ config I2S_STM32_TX_BLOCK_COUNT
2539
default 4
2640

2741
endif # I2S_STM32
42+
43+
if I2S_STM32_SAI
44+
45+
config I2S_STM32_SAI_BLOCK_COUNT
46+
int "SAI queue length"
47+
default 4
48+
49+
config I2S_STM32_SAI_USE_DMA
50+
bool "SAI DMA Transfer enable"
51+
default n
52+
53+
endif # I2S_STM32_SAI

drivers/i2s/i2s_esp32.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <esp_clk_tree.h>
2020
#include <hal/i2s_hal.h>
2121

22-
LOG_MODULE_REGISTER(i2s_esp32, CONFIG_I2S_LOG_LEVEL);
22+
2323

2424
#if !SOC_GDMA_SUPPORTED
2525
#error "Only SoCs with GDMA peripheral are supported!"

0 commit comments

Comments
 (0)