-
Notifications
You must be signed in to change notification settings - Fork 8k
drivers: i2s: stm32_sai: add sai support 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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
* Copyright (c) 2021 The Chromium OS Authors | ||
* Copyright (c) 2019 Richard Osterloh <[email protected]> | ||
* Copyright (c) 2024 STMicroelectronics | ||
* Copyright (c) 2025 Mario Paja | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
@@ -674,6 +675,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 | | ||
erwango marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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 2 109 (STM32_DMA_MODE_NORMAL | STM32_DMA_PRIORITY_HIGH | | ||
STM32_DMA_16BITS)>; | ||
status = "disabled"; | ||
}; | ||
}; | ||
|
||
die_temp: dietemp { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CONFIG_HEAP_MEM_POOL_SIZE=4192 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BTW, where do we use it? From what I see we should do allocations from message queue (statically defined in sai driver) and from slab (statically defined in samples/drivers/i2s/output/src/main.c). Where do we use system heap? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright (c) 2025 Mario Paja | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/ { | ||
aliases { | ||
i2s-tx = &sai1_a; | ||
}; | ||
}; | ||
|
||
&pll { | ||
/* 44.1KHz (-0.03% Error) */ | ||
div-q = <8>; | ||
}; | ||
|
||
/* MCLK is not enabled */ | ||
/* SAI1_A MCLK (PB8) is not available on the Arduino Nano header */ | ||
&sai1_a { | ||
pinctrl-0 = <&sai1_sd_a_pa10 &sai1_fs_a_pa9 &sai1_sck_a_pa8>; | ||
pinctrl-names = "default"; | ||
status = "okay"; | ||
mclk-divider = "div-256"; | ||
dma-names = "tx"; | ||
}; | ||
|
||
&dma1{ | ||
status = "okay"; | ||
}; | ||
|
||
&dmamux1{ | ||
status = "okay"; | ||
}; | ||
|
||
/* I2C2 SCL conflicts with SAI1_A FS */ | ||
/* I2C2 SDA conflicts with SAI1_A SCK */ | ||
&i2c2 { | ||
status = "disabled"; | ||
}; |
Uh oh!
There was an error while loading. Please reload this page.