Skip to content

Commit 442465f

Browse files
mariopajaaescolar
authored andcommitted
drivers: i2s: add sai support for stm32h5xx
Define SAI nodes for STM32H5 series and enable samples/drivers/i2s/output for nucleo_h563zi board. Signed-off-by: Mario Paja <[email protected]>
1 parent a663b2b commit 442465f

File tree

4 files changed

+57
-1
lines changed

4 files changed

+57
-1
lines changed

drivers/i2s/Kconfig.stm32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ menuconfig I2S_STM32_SAI
3636
select USE_STM32_HAL_DMA_EX
3737
select USE_STM32_HAL_SAI
3838
help
39-
Enable SAI support on the STM32U5 family of processors.
39+
Enable SAI support on the STM32 family of processors.
4040

4141
if I2S_STM32_SAI
4242

dts/arm/st/h5/stm32h5.dtsi

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,28 @@
633633
status = "disabled";
634634
};
635635

636+
sai1_a: sai1@40015404 {
637+
compatible = "st,stm32-sai";
638+
#address-cells = <1>;
639+
#size-cells = <0>;
640+
reg = <0x40015404 0x20>;
641+
clocks = <&rcc STM32_CLOCK(APB2, 21)>,
642+
<&rcc STM32_SRC_PLL2_P SAI1_SEL(0)>;
643+
dmas = <&gpdma1 1 53 0>;
644+
status = "disabled";
645+
};
646+
647+
sai1_b: sai1@40015424 {
648+
compatible = "st,stm32-sai";
649+
#address-cells = <1>;
650+
#size-cells = <0>;
651+
reg = <0x40015424 0x20>;
652+
clocks = <&rcc STM32_CLOCK(APB2, 21)>,
653+
<&rcc STM32_SRC_PLL2_P SAI1_SEL(0)>;
654+
dmas = <&gpdma1 0 54 0>;
655+
status = "disabled";
656+
};
657+
636658
usb: usb@40016000 {
637659
compatible = "st,stm32-usb";
638660
reg = <0x40016000 0x400>;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_HEAP_MEM_POOL_SIZE=4192
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright (c) 2025 ZAL Zentrum für Angewandte Luftfahrtforschung GmbH
3+
* Copyright (c) 2025 Mario Paja
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
/ {
9+
aliases {
10+
i2s-tx = &sai1_a;
11+
};
12+
};
13+
14+
&pll2 {
15+
/* 44.1KHz (0.09% Error) */
16+
div-m = <2>;
17+
mul-n = <113>;
18+
div-q = <2>;
19+
div-r = <2>;
20+
div-p = <2>;
21+
clocks = <&clk_hse>;
22+
status = "okay";
23+
};
24+
25+
&sai1_a {
26+
pinctrl-0 = <&sai1_mclk_a_pe2 &sai1_sd_a_pe6
27+
&sai1_fs_a_pe4 &sai1_sck_a_pe5>;
28+
pinctrl-names = "default";
29+
status = "okay";
30+
mclk-enable;
31+
mclk-divider = "div-256";
32+
dma-names = "tx";
33+
};

0 commit comments

Comments
 (0)