Skip to content

Commit

Permalink
drivers: i2s: add sai support for stm32u5xx
Browse files Browse the repository at this point in the history
This PR adds initial sai support for STM32u5xx

Signed-off-by: Mario Paja <[email protected]>
  • Loading branch information
mario.paja committed Feb 10, 2025
1 parent d3d7e18 commit 5a33860
Show file tree
Hide file tree
Showing 18 changed files with 9,683 additions and 22 deletions.
1 change: 1 addition & 0 deletions drivers/i2s/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ zephyr_library_sources_ifdef(CONFIG_I2S_NRFX i2s_nrfx.c)
zephyr_library_sources_ifdef(CONFIG_I2S_MCUX_SAI i2s_mcux_sai.c)
zephyr_library_sources_ifdef(CONFIG_I2S_ESP32 i2s_esp32.c)
zephyr_library_sources_ifdef(CONFIG_I2S_TEST i2s_test.c)
zephyr_library_sources_ifdef(CONFIG_I2S_STM32_SAI i2s_stm32_sai.c)
26 changes: 26 additions & 0 deletions drivers/i2s/Kconfig.stm32
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@ menuconfig I2S_STM32
Enable I2S support on the STM32 family of processors.
(Tested on the STM32F4 & STM32H7 series)

menuconfig I2S_STM32_SAI
bool "STM32 MCU I2S controller driver"
default y
depends on DT_HAS_ST_STM32_SAI_ENABLED
depends on SOC_SERIES_STM32U5X
select CACHE_MANAGEMENT if CPU_HAS_DCACHE
select DMA
select USE_STM32_HAL_DMA
select USE_STM32_HAL_DMA_EX
select USE_STM32_HAL_SAI
select USE_STM32_LL_DLYB if (SOC_SERIES_STM32H5X || SOC_SERIES_STM32U5X)
help
Enable SAI support on the STM32U5 family of processors.

if I2S_STM32

config I2S_STM32_RX_BLOCK_COUNT
Expand All @@ -25,3 +39,15 @@ config I2S_STM32_TX_BLOCK_COUNT
default 4

endif # I2S_STM32

if I2S_STM32_SAI

config I2S_STM32_SAI_BLOCK_COUNT
int "SAI queue length"
default 4

config I2S_STM32_SAI_USE_DMA
bool "SAI DMA Transfer enable"
default n

endif # I2S_STM32_SAI
2 changes: 1 addition & 1 deletion drivers/i2s/i2s_esp32.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <esp_clk_tree.h>
#include <hal/i2s_hal.h>

LOG_MODULE_REGISTER(i2s_esp32, CONFIG_I2S_LOG_LEVEL);


#if !SOC_GDMA_SUPPORTED
#error "Only SoCs with GDMA peripheral are supported!"
Expand Down
Loading

0 comments on commit 5a33860

Please sign in to comment.