Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / sound / allwinner,sun4i-a10-spdif.yaml
1 # SPDX-License-Identifier: GPL-2.0
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/sound/allwinner,sun4i-a10-spdif.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Allwinner A10 S/PDIF Controller Device Tree Bindings
8
9 maintainers:
10   - Chen-Yu Tsai <wens@csie.org>
11   - Liam Girdwood <lgirdwood@gmail.com>
12   - Mark Brown <broonie@kernel.org>
13   - Maxime Ripard <maxime.ripard@bootlin.com>
14
15 properties:
16   "#sound-dai-cells":
17     const: 0
18
19   compatible:
20     oneOf:
21       - const: allwinner,sun4i-a10-spdif
22       - const: allwinner,sun6i-a31-spdif
23       - const: allwinner,sun8i-h3-spdif
24       - const: allwinner,sun50i-h6-spdif
25       - items:
26           - const: allwinner,sun8i-a83t-spdif
27           - const: allwinner,sun8i-h3-spdif
28       - items:
29           - const: allwinner,sun50i-a64-spdif
30           - const: allwinner,sun8i-h3-spdif
31
32   reg:
33     maxItems: 1
34
35   interrupts:
36     maxItems: 1
37
38   clocks:
39     items:
40       - description: Bus Clock
41       - description: Module Clock
42
43   clock-names:
44     items:
45       - const: apb
46       - const: spdif
47
48   # Even though it only applies to subschemas under the conditionals,
49   # not listing them here will trigger a warning because of the
50   # additionalsProperties set to false.
51   dmas: true
52   dma-names: true
53   resets:
54     maxItems: 1
55
56 allOf:
57   - if:
58       properties:
59         compatible:
60           contains:
61             enum:
62               - allwinner,sun6i-a31-spdif
63               - allwinner,sun8i-h3-spdif
64
65     then:
66       required:
67         - resets
68
69   - if:
70       properties:
71         compatible:
72           contains:
73             const: allwinner,sun8i-h3-spdif
74
75     then:
76       properties:
77         dmas:
78           description: TX DMA Channel
79
80         dma-names:
81           const: tx
82
83     else:
84       properties:
85         dmas:
86           items:
87             - description: RX DMA Channel
88             - description: TX DMA Channel
89
90         dma-names:
91           items:
92             - const: rx
93             - const: tx
94
95 required:
96   - "#sound-dai-cells"
97   - compatible
98   - reg
99   - interrupts
100   - clocks
101   - clock-names
102   - dmas
103   - dma-names
104
105 additionalProperties: false
106
107 examples:
108   - |
109     spdif: spdif@1c21000 {
110         #sound-dai-cells = <0>;
111         compatible = "allwinner,sun4i-a10-spdif";
112         reg = <0x01c21000 0x40>;
113         interrupts = <13>;
114         clocks = <&apb0_gates 1>, <&spdif_clk>;
115         clock-names = "apb", "spdif";
116         dmas = <&dma 0 2>, <&dma 0 2>;
117         dma-names = "rx", "tx";
118     };
119
120 ...