aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Documentation/devicetree/bindings/sound/snps,designware-i2s.yaml
blob: a48d040b0a4fbd6c92f2426bb7e9466db840362e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/snps,designware-i2s.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: DesignWare I2S controller

maintainers:
  - Jose Abreu <joabreu@synopsys.com>

properties:
  compatible:
    oneOf:
      - items:
          - const: canaan,k210-i2s
          - const: snps,designware-i2s
      - enum:
          - snps,designware-i2s
          - starfive,jh7110-i2stx0
          - starfive,jh7110-i2stx1
          - starfive,jh7110-i2srx

  reg:
    maxItems: 1

  interrupts:
    description: |
      The interrupt line number for the I2S controller. Add this
      parameter if the I2S controller that you are using does not
      support DMA.
    maxItems: 1

  clocks:
    items:
      - description: Sampling rate reference clock
      - description: APB clock
      - description: Audio master clock
      - description: Inner audio master clock source
      - description: External audio master clock source
      - description: Bit clock
      - description: Left/right channel clock
      - description: External bit clock
      - description: External left/right channel clock
    minItems: 1

  clock-names:
    items:
      - const: i2sclk
      - const: apb
      - const: mclk
      - const: mclk_inner
      - const: mclk_ext
      - const: bclk
      - const: lrck
      - const: bclk_ext
      - const: lrck_ext
    minItems: 1

  resets:
    items:
      - description: Optional controller resets
      - description: controller reset of Sampling rate
    minItems: 1

  dmas:
    items:
      - description: TX DMA Channel
      - description: RX DMA Channel
    minItems: 1

  dma-names:
    items:
      - const: tx
      - const: rx
    minItems: 1

  starfive,syscon:
    $ref: /schemas/types.yaml#/definitions/phandle-array
    items:
      - items:
          - description: phandle to System Register Controller sys_syscon node.
          - description: I2S-rx enabled control offset of SYS_SYSCONSAIF__SYSCFG register.
          - description: I2S-rx enabled control mask
    description:
      The phandle to System Register Controller syscon node and the I2S-rx(ADC)
      enabled control offset and mask of SYS_SYSCONSAIF__SYSCFG register.

allOf:
  - $ref: dai-common.yaml#
  - if:
      properties:
        compatible:
          contains:
            const: canaan,k210-i2s
    then:
      properties:
        "#sound-dai-cells":
          const: 1
    else:
      properties:
        "#sound-dai-cells":
          const: 0
  - if:
      properties:
        compatible:
          contains:
            const: snps,designware-i2s
    then:
      properties:
        clocks:
          maxItems: 1
        clock-names:
          maxItems: 1
        resets:
          maxItems: 1
    else:
      properties:
        resets:
          minItems: 2
          maxItems: 2
  - if:
      properties:
        compatible:
          contains:
            const: starfive,jh7110-i2stx0
    then:
      properties:
        clocks:
          minItems: 5
          maxItems: 5
        clock-names:
          minItems: 5
          maxItems: 5
      required:
        - resets
  - if:
      properties:
        compatible:
          contains:
            const: starfive,jh7110-i2stx1
    then:
      properties:
        clocks:
          minItems: 9
          maxItems: 9
        clock-names:
          minItems: 9
          maxItems: 9
      required:
        - resets
  - if:
      properties:
        compatible:
          contains:
            const: starfive,jh7110-i2srx
    then:
      properties:
        clocks:
          minItems: 9
          maxItems: 9
        clock-names:
          minItems: 9
          maxItems: 9
      required:
        - resets
        - starfive,syscon
    else:
      properties:
        starfive,syscon: false

required:
  - compatible
  - reg
  - clocks
  - clock-names

oneOf:
  - required:
      - dmas
      - dma-names
  - required:
      - interrupts

unevaluatedProperties: false

examples:
  - |
    soc_i2s: i2s@7ff90000 {
      compatible = "snps,designware-i2s";
      reg = <0x7ff90000 0x1000>;
      clocks = <&scpi_i2sclk 0>;
      clock-names = "i2sclk";
      #sound-dai-cells = <0>;
      dmas = <&dma0 5>;
      dma-names = "tx";
    };