summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/sound/snps,designware-i2s.yaml
blob: a970fd264b2135c27de38825f966417e22284ec5 (plain)
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
# 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

  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:
    description: Sampling rate reference clock
    maxItems: 1

  clock-names:
    const: i2sclk

  resets:
    items:
      - description: Optional controller resets

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

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

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

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";
    };