Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drivers/i2s/Kconfig.stm32
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ menuconfig I2S_STM32_SAI
select USE_STM32_HAL_DMA_EX
select USE_STM32_HAL_SAI
help
Enable SAI support on the STM32U5 family of processors.
Enable SAI support on the STM32 family of processors.

if I2S_STM32_SAI

Expand Down
22 changes: 22 additions & 0 deletions dts/arm/st/h5/stm32h5.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,28 @@
status = "disabled";
};

sai1_a: sai1@40015404 {
compatible = "st,stm32-sai";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x40015404 0x20>;
clocks = <&rcc STM32_CLOCK(APB2, 21)>,
<&rcc STM32_SRC_PLL2_P SAI1_SEL(0)>;
dmas = <&gpdma1 1 53 0>;
status = "disabled";
};

sai1_b: sai1@40015424 {
compatible = "st,stm32-sai";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x40015424 0x20>;
clocks = <&rcc STM32_CLOCK(APB2, 21)>,
<&rcc STM32_SRC_PLL2_P SAI1_SEL(0)>;
dmas = <&gpdma1 0 54 0>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use defines instead of magic numbers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @erwango,
I have used 0 here because the DMA defines are not used at all in the driver. It will have no effect configuring the DMA.

I will open another PR after merging H5xx to address this.

status = "disabled";
};

usb: usb@40016000 {
compatible = "st,stm32-usb";
reg = <0x40016000 0x400>;
Expand Down
1 change: 1 addition & 0 deletions samples/drivers/i2s/output/boards/nucleo_h563zi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_HEAP_MEM_POOL_SIZE=4192
33 changes: 33 additions & 0 deletions samples/drivers/i2s/output/boards/nucleo_h563zi.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright (c) 2025 ZAL Zentrum für Angewandte Luftfahrtforschung GmbH
* Copyright (c) 2025 Mario Paja
*
* SPDX-License-Identifier: Apache-2.0
*/

/ {
aliases {
i2s-tx = &sai1_a;
};
};

&pll2 {
/* 44.1KHz (0.09% Error) */
div-m = <2>;
mul-n = <113>;
div-q = <2>;
div-r = <2>;
div-p = <2>;
clocks = <&clk_hse>;
status = "okay";
};

&sai1_a {
pinctrl-0 = <&sai1_mclk_a_pe2 &sai1_sd_a_pe6
&sai1_fs_a_pe4 &sai1_sck_a_pe5>;
pinctrl-names = "default";
status = "okay";
mclk-enable;
mclk-divider = "div-256";
dma-names = "tx";
};