STMicroelectronics STM32 SPI/I2S Controller
Schema identifier ($id): "http://devicetree.org/schemas/sound/st,stm32-i2s.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Olivier Moysan <olivier.moysan@foss.st.com>"
The SPI/I2S block supports I2S/PCM protocols when configured on I2S mode. Only some SPI instances support I2S.
Properties and child nodes (properties) #
compatible — required here #
Allowed values (enum): "st,stm32h7-i2s", "st,stm32mp25-i2s"
#sound-dai-cells — required here #
Exact value (const): 0
reg — required here #
Maximum number of items (maxItems): 1
clocks — required here #
Array item rules (items) #
Item 1
clock feeding the peripheral bus interface.
Item 2
clock feeding the internal clock generator.
Item 3
I2S parent clock for sampling rates multiple of 8kHz.
Item 4
I2S parent clock for sampling rates multiple of 11.025kHz.
Minimum number of items (minItems): 2
clock-names — required here #
Array item rules (items) #
Item 1
Exact value (
const):"pclk"
Item 2
Exact value (
const):"i2sclk"
Item 3
Exact value (
const):"x8k"
Item 4
Exact value (
const):"x11k"
Minimum number of items (minItems): 2
interrupts — required here #
Maximum number of items (maxItems): 1
dmas — required here #
Array item rules (items) #
Item 1
audio capture DMA.
Item 2
audio playback DMA.
dma-names — required here #
Array item rules (items) #
Item 1
Exact value (
const):"rx"
Item 2
Exact value (
const):"tx"
resets — not listed as required here #
Maximum number of items (maxItems): 1
#clock-cells — not listed as required here #
Configure the I2S device as MCLK clock provider.
Exact value (const): 0
port — not listed as required here #
Shared schema rule ($ref): audio-graph-port.yaml#
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
access-controllers — not listed as required here #
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 2
Required in this object (required): "compatible", "#sound-dai-cells", "reg", "clocks", "clock-names", "interrupts", "dmas", "dma-names"
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):dai-common.yaml#
Rule 2 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Exact value (
const):"st,stm32h7-i2s"When the condition matches (
then) #Properties and child nodes (
properties)
clocks— not listed as required hereMinimum number of items (
minItems):4
clock-names— not listed as required hereMinimum number of items (
minItems):4
Rule 3 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Exact value (
const):"st,stm32mp25-i2s"When the condition matches (
then) #Properties and child nodes (
properties)
clocks— not listed as required hereMaximum number of items (
maxItems):2
clock-names— not listed as required hereMaximum number of items (
maxItems):2
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/stm32mp1-clks.h>
i2s2: audio-controller@4000b000 {
compatible = "st,stm32h7-i2s";
#sound-dai-cells = <0>;
reg = <0x4000b000 0x400>;
clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
clock-names = "pclk", "i2sclk", "x8k", "x11k";
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
dmas = <&dmamux1 39 0x400 0x01>,
<&dmamux1 40 0x400 0x01>;
dma-names = "rx", "tx";
pinctrl-names = "default";
pinctrl-0 = <&i2s2_pins_a>;
/* assume audio-graph */
port {
codec_endpoint: endpoint {
remote-endpoint = <&codec_endpoint>;
};
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)