xref: /freebsd/sys/contrib/device-tree/Bindings/sound/st,stm32-i2s.yaml (revision dd41de95a84d979615a2ef11df6850622bf6184e)
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@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
57required:
58  - compatible
59  - "#sound-dai-cells"
60  - reg
61  - clocks
62  - clock-names
63  - interrupts
64  - dmas
65  - dma-names
66
67additionalProperties: false
68
69examples:
70  - |
71    #include <dt-bindings/interrupt-controller/arm-gic.h>
72    #include <dt-bindings/clock/stm32mp1-clks.h>
73    i2s2: audio-controller@4000b000 {
74        compatible = "st,stm32h7-i2s";
75        #sound-dai-cells = <0>;
76        reg = <0x4000b000 0x400>;
77        clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
78        clock-names = "pclk", "i2sclk", "x8k", "x11k";
79        interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
80        dmas = <&dmamux1 39 0x400 0x01>,
81               <&dmamux1 40 0x400 0x01>;
82        dma-names = "rx", "tx";
83        pinctrl-names = "default";
84        pinctrl-0 = <&i2s2_pins_a>;
85    };
86
87...
88