1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
4 $id: http://devicetree.org/schemas/sound/st,stm32-sai.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: STMicroelectronics STM32 Serial Audio Interface (SAI)
10 - Olivier Moysan <olivier.moysan@foss.st.com>
13 The SAI interface (Serial Audio Interface) offers a wide set of audio
14 protocols as I2S standards, LSB or MSB-justified, PCM/DSP, TDM, and AC'97.
15 The SAI contains two independent audio sub-blocks. Each sub-block has
16 its own clock generator and I/O lines controller.
26 - description: Base address and size of SAI common register set.
27 - description: Base address and size of SAI identification register set.
61 "^audio-controller@[0-9a-f]+$":
64 Two subnodes corresponding to SAI sub-block instances A et B
65 can be defined. Subnode can be omitted for unsused sub-block.
69 description: Compatible for SAI sub-block A or B.
70 pattern: "st,stm32-sai-sub-[ab]"
80 - description: sai_ck clock feeding the internal clock generator.
81 - description: MCLK clock from a SAI set as master clock provider.
95 rx: SAI sub-block is configured as a capture DAI.
96 tx: SAI sub-block is configured as a playback DAI.
101 Configure the SAI sub-block as slave of another SAI sub-block.
102 By default SAI sub-block is in asynchronous mode.
103 Must contain the phandle and index of the SAI sub-block providing
105 $ref: /schemas/types.yaml#/definitions/phandle-array
108 - description: phandle of the SAI sub-block
109 - description: index of the SAI sub-block
113 If set, support S/PDIF IEC6958 protocol for playback.
114 IEC60958 protocol is not available for capture.
115 By default, custom protocol is assumed, meaning that protocol is
116 configured according to protocol defined in related DAI link node,
117 such as i2s, left justified, right justified, dsp and pdm protocols.
118 $ref: /schemas/types.yaml#/definitions/flag
121 description: Configure the SAI device as master clock provider.
138 const: st,stm32f4-sai
143 - description: x8k, SAI parent clock for sampling rates multiple of 8kHz.
144 - description: x11k, SAI parent clock for sampling rates multiple of 11.025kHz.
154 - description: pclk feeds the peripheral bus interface.
155 - description: x8k, SAI parent clock for sampling rates multiple of 8kHz.
156 - description: x11k, SAI parent clock for sampling rates multiple of 11.025kHz.
164 additionalProperties: false
168 #include <dt-bindings/interrupt-controller/arm-gic.h>
169 #include <dt-bindings/clock/stm32mp1-clks.h>
170 #include <dt-bindings/reset/stm32mp1-resets.h>
172 compatible = "st,stm32h7-sai";
173 #address-cells = <1>;
175 ranges = <0 0x4400b000 0x400>;
176 reg = <0x4400b000 0x4>, <0x4400b3f0 0x10>;
177 clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
178 clock-names = "pclk", "x8k", "x11k";
179 pinctrl-names = "default", "sleep";
180 pinctrl-0 = <&sai2a_pins_a>, <&sai2b_pins_b>;
181 pinctrl-1 = <&sai2a_sleep_pins_a>, <&sai2b_sleep_pins_b>;
183 sai2a: audio-controller@4400b004 {
184 #sound-dai-cells = <0>;
185 compatible = "st,stm32-sai-sub-a";
187 dmas = <&dmamux1 89 0x400 0x01>;
189 clocks = <&rcc SAI2_K>;
190 clock-names = "sai_ck";