xref: /freebsd/sys/contrib/device-tree/Bindings/sound/st,stm32-i2s.yaml (revision 7ef62cebc2f965b0f640263e179276928885e33d)
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#
6
7title: STMicroelectronics STM32 SPI/I2S Controller
8
9maintainers:
10  - Olivier Moysan <olivier.moysan@foss.st.com>
11
12description:
13  The SPI/I2S block supports I2S/PCM protocols when configured on I2S mode.
14  Only some SPI instances support I2S.
15
16properties:
17  compatible:
18    enum:
19      - st,stm32h7-i2s
20
21  "#sound-dai-cells":
22    const: 0
23
24  reg:
25    maxItems: 1
26
27  clocks:
28    items:
29      - description: clock feeding the peripheral bus interface.
30      - description: clock feeding the internal clock generator.
31      - description: I2S parent clock for sampling rates multiple of 8kHz.
32      - description: I2S parent clock for sampling rates multiple of 11.025kHz.
33
34  clock-names:
35    items:
36      - const: pclk
37      - const: i2sclk
38      - const: x8k
39      - const: x11k
40
41  interrupts:
42    maxItems: 1
43
44  dmas:
45    items:
46      - description: audio capture DMA.
47      - description: audio playback DMA.
48
49  dma-names:
50    items:
51      - const: rx
52      - const: tx
53
54  resets:
55    maxItems: 1
56
57  "#clock-cells":
58    description: Configure the I2S device as MCLK clock provider.
59    const: 0
60
61required:
62  - compatible
63  - "#sound-dai-cells"
64  - reg
65  - clocks
66  - clock-names
67  - interrupts
68  - dmas
69  - dma-names
70
71additionalProperties: false
72
73examples:
74  - |
75    #include <dt-bindings/interrupt-controller/arm-gic.h>
76    #include <dt-bindings/clock/stm32mp1-clks.h>
77    i2s2: audio-controller@4000b000 {
78        compatible = "st,stm32h7-i2s";
79        #sound-dai-cells = <0>;
80        reg = <0x4000b000 0x400>;
81        clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
82        clock-names = "pclk", "i2sclk", "x8k", "x11k";
83        interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
84        dmas = <&dmamux1 39 0x400 0x01>,
85               <&dmamux1 40 0x400 0x01>;
86        dma-names = "rx", "tx";
87        pinctrl-names = "default";
88        pinctrl-0 = <&i2s2_pins_a>;
89    };
90
91...
92