Skip to content

dts: st: g4: add sai node for stm32g4xx #93480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
23 changes: 23 additions & 0 deletions dts/arm/st/g4/stm32g4.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (c) 2021 The Chromium OS Authors
* Copyright (c) 2019 Richard Osterloh <richard.osterloh@gmail.com>
* Copyright (c) 2024 STMicroelectronics
* Copyright (c) 2025 Mario Paja <mariopaja@hotmail.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -663,6 +664,28 @@
interrupts = <63 0>;
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)>;
dmas = <&dma1 1 108 (STM32_DMA_MODE_NORMAL | STM32_DMA_PRIORITY_HIGH |
STM32_DMA_16BITS)>;
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)>;
dmas = <&dma1 0 109 (STM32_DMA_MODE_NORMAL | STM32_DMA_PRIORITY_HIGH |
STM32_DMA_16BITS)>;
status = "disabled";
};
};

die_temp: dietemp {
Expand Down
1 change: 1 addition & 0 deletions samples/drivers/i2s/output/boards/nucleo_g431kb.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_HEAP_MEM_POOL_SIZE=4192
32 changes: 32 additions & 0 deletions samples/drivers/i2s/output/boards/nucleo_g431kb.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright (c) 2025 Mario Paja <mariopaja@hotmail.com>
*
* SPDX-License-Identifier: Apache-2.0
*/

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

&pll {
/* 44.1KHz (-0.03% Error) */
div-q = <8>;
};

&sai1_a {
pinctrl-0 = <&sai1_sd_a_pa10 &sai1_fs_a_pa9
&sai1_sck_a_pa8>;
pinctrl-names = "default";
status = "okay";
dma-names = "tx";
};

&dma1{
status = "okay";
};

&dmamux1{
status = "okay";
};
Loading