File Index
Files and directories
Sign in
FILE

st,stm32-i2s.yaml

File preview with syntax highlighting.

linux-6.19.14/Documentation/devicetree/bindings/sound/st,stm32-i2s.yaml YAML
  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      - st,stm32mp25-i2s
 21
 22  "#sound-dai-cells":
 23    const: 0
 24
 25  reg:
 26    maxItems: 1
 27
 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
 35
 36  clock-names:
 37    items:
 38      - const: pclk
 39      - const: i2sclk
 40      - const: x8k
 41      - const: x11k
 42    minItems: 2
 43
 44  interrupts:
 45    maxItems: 1
 46
 47  dmas:
 48    items:
 49      - description: audio capture DMA.
 50      - description: audio playback DMA.
 51
 52  dma-names:
 53    items:
 54      - const: rx
 55      - const: tx
 56
 57  resets:
 58    maxItems: 1
 59
 60  "#clock-cells":
 61    description: Configure the I2S device as MCLK clock provider.
 62    const: 0
 63
 64  port:
 65    $ref: audio-graph-port.yaml#
 66    unevaluatedProperties: false
 67
 68  access-controllers:
 69    minItems: 1
 70    maxItems: 2
 71
 72required:
 73  - compatible
 74  - "#sound-dai-cells"
 75  - reg
 76  - clocks
 77  - clock-names
 78  - interrupts
 79  - dmas
 80  - dma-names
 81
 82allOf:
 83  - $ref: dai-common.yaml#
 84  - if:
 85      properties:
 86        compatible:
 87          contains:
 88            const: st,stm32h7-i2s
 89
 90    then:
 91      properties:
 92        clocks:
 93          minItems: 4
 94
 95        clock-names:
 96          minItems: 4
 97
 98  - if:
 99      properties:
100        compatible:
101          contains:
102            const: st,stm32mp25-i2s
103
104    then:
105      properties:
106        clocks:
107          maxItems: 2
108
109        clock-names:
110          maxItems: 2
111
112unevaluatedProperties: false
113
114examples:
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>;
130
131        /* assume audio-graph */
132        port {
133            codec_endpoint: endpoint {
134                remote-endpoint = <&codec_endpoint>;
135            };
136        };
137    };
138
139...
~/ Read-only file preview.