Merge tag 'block-6.13-20242901' of git://git.kernel.dk/linux
[drm/drm-misc.git] / Documentation / devicetree / bindings / sound / st,stm32-i2s.yaml
blobb4f44f9c7c7d0fd9c8079e8b30e5b8bf87d4323d
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/sound/st,stm32-i2s.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: STMicroelectronics STM32 SPI/I2S Controller
9 maintainers:
10   - Olivier Moysan <olivier.moysan@foss.st.com>
12 description:
13   The SPI/I2S block supports I2S/PCM protocols when configured on I2S mode.
14   Only some SPI instances support I2S.
16 properties:
17   compatible:
18     enum:
19       - st,stm32h7-i2s
20       - st,stm32mp25-i2s
22   "#sound-dai-cells":
23     const: 0
25   reg:
26     maxItems: 1
28   clocks:
29     items:
30       - description: clock feeding the peripheral bus interface.
31       - description: clock feeding the internal clock generator.
32       - description: I2S parent clock for sampling rates multiple of 8kHz.
33       - description: I2S parent clock for sampling rates multiple of 11.025kHz.
34     minItems: 2
36   clock-names:
37     items:
38       - const: pclk
39       - const: i2sclk
40       - const: x8k
41       - const: x11k
42     minItems: 2
44   interrupts:
45     maxItems: 1
47   dmas:
48     items:
49       - description: audio capture DMA.
50       - description: audio playback DMA.
52   dma-names:
53     items:
54       - const: rx
55       - const: tx
57   resets:
58     maxItems: 1
60   "#clock-cells":
61     description: Configure the I2S device as MCLK clock provider.
62     const: 0
64   port:
65     $ref: audio-graph-port.yaml#
66     unevaluatedProperties: false
68   access-controllers:
69     minItems: 1
70     maxItems: 2
72 required:
73   - compatible
74   - "#sound-dai-cells"
75   - reg
76   - clocks
77   - clock-names
78   - interrupts
79   - dmas
80   - dma-names
82 allOf:
83   - $ref: dai-common.yaml#
84   - if:
85       properties:
86         compatible:
87           contains:
88             const: st,stm32h7-i2s
90     then:
91       properties:
92         clocks:
93           minItems: 4
95         clock-names:
96           minItems: 4
98   - if:
99       properties:
100         compatible:
101           contains:
102             const: st,stm32mp25-i2s
104     then:
105       properties:
106         clocks:
107           maxItems: 2
109         clock-names:
110           maxItems: 2
112 unevaluatedProperties: false
114 examples:
115   - |
116     #include <dt-bindings/interrupt-controller/arm-gic.h>
117     #include <dt-bindings/clock/stm32mp1-clks.h>
118     i2s2: audio-controller@4000b000 {
119         compatible = "st,stm32h7-i2s";
120         #sound-dai-cells = <0>;
121         reg = <0x4000b000 0x400>;
122         clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
123         clock-names = "pclk", "i2sclk", "x8k", "x11k";
124         interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
125         dmas = <&dmamux1 39 0x400 0x01>,
126                <&dmamux1 40 0x400 0x01>;
127         dma-names = "rx", "tx";
128         pinctrl-names = "default";
129         pinctrl-0 = <&i2s2_pins_a>;
131         /* assume audio-graph */
132         port {
133             codec_endpoint: endpoint {
134                 remote-endpoint = <&codec_endpoint>;
135             };
136         };
137     };