1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/sound/snps,designware-i2s.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: DesignWare I2S controller
8
9maintainers:
10  - Jose Abreu <joabreu@synopsys.com>
11
12properties:
13  compatible:
14    oneOf:
15      - items:
16          - const: canaan,k210-i2s
17          - const: snps,designware-i2s
18      - enum:
19          - snps,designware-i2s
20
21  reg:
22    maxItems: 1
23
24  interrupts:
25    description: |
26      The interrupt line number for the I2S controller. Add this
27      parameter if the I2S controller that you are using does not
28      support DMA.
29    maxItems: 1
30
31  clocks:
32    description: Sampling rate reference clock
33    maxItems: 1
34
35  clock-names:
36    const: i2sclk
37
38  resets:
39    maxItems: 1
40
41  dmas:
42    items:
43      - description: TX DMA Channel
44      - description: RX DMA Channel
45    minItems: 1
46
47  dma-names:
48    items:
49      - const: tx
50      - const: rx
51    minItems: 1
52
53if:
54  properties:
55    compatible:
56      contains:
57        const: canaan,k210-i2s
58
59then:
60  properties:
61    "#sound-dai-cells":
62      const: 1
63
64else:
65  properties:
66    "#sound-dai-cells":
67      const: 0
68
69required:
70  - compatible
71  - reg
72  - clocks
73  - clock-names
74
75oneOf:
76  - required:
77      - dmas
78      - dma-names
79  - required:
80      - interrupts
81
82unevaluatedProperties: false
83
84examples:
85  - |
86    soc_i2s: i2s@7ff90000 {
87      compatible = "snps,designware-i2s";
88      reg = <0x7ff90000 0x1000>;
89      clocks = <&scpi_i2sclk 0>;
90      clock-names = "i2sclk";
91      #sound-dai-cells = <0>;
92      dmas = <&dma0 5>;
93      dma-names = "tx";
94    };
95