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    items:
40      - description: Optional controller resets
41
42  dmas:
43    items:
44      - description: TX DMA Channel
45      - description: RX DMA Channel
46    minItems: 1
47
48  dma-names:
49    items:
50      - const: tx
51      - const: rx
52    minItems: 1
53
54allOf:
55  - $ref: dai-common.yaml#
56  - if:
57      properties:
58        compatible:
59          contains:
60            const: canaan,k210-i2s
61    then:
62      properties:
63        "#sound-dai-cells":
64          const: 1
65    else:
66      properties:
67        "#sound-dai-cells":
68          const: 0
69
70required:
71  - compatible
72  - reg
73  - clocks
74  - clock-names
75
76oneOf:
77  - required:
78      - dmas
79      - dma-names
80  - required:
81      - interrupts
82
83unevaluatedProperties: false
84
85examples:
86  - |
87    soc_i2s: i2s@7ff90000 {
88      compatible = "snps,designware-i2s";
89      reg = <0x7ff90000 0x1000>;
90      clocks = <&scpi_i2sclk 0>;
91      clock-names = "i2sclk";
92      #sound-dai-cells = <0>;
93      dmas = <&dma0 5>;
94      dma-names = "tx";
95    };
96