xref: /linux/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-spdif.yaml (revision 06d07429858317ded2db7986113a9e0129cd599b)
1506c7f9bSMaxime Ripard# SPDX-License-Identifier: GPL-2.0
2506c7f9bSMaxime Ripard%YAML 1.2
3506c7f9bSMaxime Ripard---
4506c7f9bSMaxime Ripard$id: http://devicetree.org/schemas/sound/allwinner,sun4i-a10-spdif.yaml#
5506c7f9bSMaxime Ripard$schema: http://devicetree.org/meta-schemas/core.yaml#
6506c7f9bSMaxime Ripard
7dd3cb467SAndrew Lunntitle: Allwinner A10 S/PDIF Controller
8506c7f9bSMaxime Ripard
9506c7f9bSMaxime Ripardmaintainers:
10506c7f9bSMaxime Ripard  - Chen-Yu Tsai <wens@csie.org>
11506c7f9bSMaxime Ripard  - Liam Girdwood <lgirdwood@gmail.com>
12506c7f9bSMaxime Ripard  - Mark Brown <broonie@kernel.org>
135c7404bbSMaxime Ripard  - Maxime Ripard <mripard@kernel.org>
14506c7f9bSMaxime Ripard
15506c7f9bSMaxime Ripardproperties:
16506c7f9bSMaxime Ripard  "#sound-dai-cells":
17506c7f9bSMaxime Ripard    const: 0
18506c7f9bSMaxime Ripard
19506c7f9bSMaxime Ripard  compatible:
20506c7f9bSMaxime Ripard    oneOf:
21506c7f9bSMaxime Ripard      - const: allwinner,sun4i-a10-spdif
22506c7f9bSMaxime Ripard      - const: allwinner,sun6i-a31-spdif
23506c7f9bSMaxime Ripard      - const: allwinner,sun8i-h3-spdif
24b2045303SClément Péron      - const: allwinner,sun50i-h6-spdif
25*7a9dc944SChen-Yu Tsai      - const: allwinner,sun50i-h616-spdif
26506c7f9bSMaxime Ripard      - items:
27506c7f9bSMaxime Ripard          - const: allwinner,sun8i-a83t-spdif
28506c7f9bSMaxime Ripard          - const: allwinner,sun8i-h3-spdif
29506c7f9bSMaxime Ripard      - items:
30506c7f9bSMaxime Ripard          - const: allwinner,sun50i-a64-spdif
31506c7f9bSMaxime Ripard          - const: allwinner,sun8i-h3-spdif
32506c7f9bSMaxime Ripard
33506c7f9bSMaxime Ripard  reg:
34506c7f9bSMaxime Ripard    maxItems: 1
35506c7f9bSMaxime Ripard
36506c7f9bSMaxime Ripard  interrupts:
37506c7f9bSMaxime Ripard    maxItems: 1
38506c7f9bSMaxime Ripard
39506c7f9bSMaxime Ripard  clocks:
40506c7f9bSMaxime Ripard    items:
41506c7f9bSMaxime Ripard      - description: Bus Clock
42506c7f9bSMaxime Ripard      - description: Module Clock
43506c7f9bSMaxime Ripard
44506c7f9bSMaxime Ripard  clock-names:
45506c7f9bSMaxime Ripard    items:
46506c7f9bSMaxime Ripard      - const: apb
47506c7f9bSMaxime Ripard      - const: spdif
48506c7f9bSMaxime Ripard
49506c7f9bSMaxime Ripard  # Even though it only applies to subschemas under the conditionals,
50506c7f9bSMaxime Ripard  # not listing them here will trigger a warning because of the
51506c7f9bSMaxime Ripard  # additionalsProperties set to false.
52b1f35dfdSMaxime Ripard  dmas: true
53b1f35dfdSMaxime Ripard  dma-names: true
54506c7f9bSMaxime Ripard  resets:
55506c7f9bSMaxime Ripard    maxItems: 1
56506c7f9bSMaxime Ripard
57506c7f9bSMaxime RipardallOf:
5858ae9a2aSKrzysztof Kozlowski  - $ref: dai-common.yaml#
59506c7f9bSMaxime Ripard  - if:
60506c7f9bSMaxime Ripard      properties:
61506c7f9bSMaxime Ripard        compatible:
62506c7f9bSMaxime Ripard          contains:
63506c7f9bSMaxime Ripard            enum:
64506c7f9bSMaxime Ripard              - allwinner,sun6i-a31-spdif
65506c7f9bSMaxime Ripard              - allwinner,sun8i-h3-spdif
6657b3c130SChen-Yu Tsai              - allwinner,sun50i-h6-spdif
67*7a9dc944SChen-Yu Tsai              - allwinner,sun50i-h616-spdif
68506c7f9bSMaxime Ripard
69506c7f9bSMaxime Ripard    then:
70506c7f9bSMaxime Ripard      required:
71506c7f9bSMaxime Ripard        - resets
72506c7f9bSMaxime Ripard
73b1f35dfdSMaxime Ripard  - if:
74b1f35dfdSMaxime Ripard      properties:
75b1f35dfdSMaxime Ripard        compatible:
76b1f35dfdSMaxime Ripard          contains:
771a8e7cdfSMaxime Ripard            enum:
781a8e7cdfSMaxime Ripard              - allwinner,sun8i-h3-spdif
79*7a9dc944SChen-Yu Tsai              - allwinner,sun50i-h616-spdif
80b1f35dfdSMaxime Ripard
81b1f35dfdSMaxime Ripard    then:
82b1f35dfdSMaxime Ripard      properties:
83b1f35dfdSMaxime Ripard        dmas:
84b1f35dfdSMaxime Ripard          description: TX DMA Channel
85b1f35dfdSMaxime Ripard
86b1f35dfdSMaxime Ripard        dma-names:
87b1f35dfdSMaxime Ripard          const: tx
88b1f35dfdSMaxime Ripard
89b1f35dfdSMaxime Ripard    else:
90b1f35dfdSMaxime Ripard      properties:
91b1f35dfdSMaxime Ripard        dmas:
92b1f35dfdSMaxime Ripard          items:
93b1f35dfdSMaxime Ripard            - description: RX DMA Channel
94b1f35dfdSMaxime Ripard            - description: TX DMA Channel
95b1f35dfdSMaxime Ripard
96b1f35dfdSMaxime Ripard        dma-names:
97b1f35dfdSMaxime Ripard          items:
98b1f35dfdSMaxime Ripard            - const: rx
99b1f35dfdSMaxime Ripard            - const: tx
100b1f35dfdSMaxime Ripard
101506c7f9bSMaxime Ripardrequired:
102506c7f9bSMaxime Ripard  - "#sound-dai-cells"
103506c7f9bSMaxime Ripard  - compatible
104506c7f9bSMaxime Ripard  - reg
105506c7f9bSMaxime Ripard  - interrupts
106506c7f9bSMaxime Ripard  - clocks
107506c7f9bSMaxime Ripard  - clock-names
108506c7f9bSMaxime Ripard  - dmas
109506c7f9bSMaxime Ripard  - dma-names
110506c7f9bSMaxime Ripard
11158ae9a2aSKrzysztof KozlowskiunevaluatedProperties: false
112506c7f9bSMaxime Ripard
113506c7f9bSMaxime Ripardexamples:
114506c7f9bSMaxime Ripard  - |
115506c7f9bSMaxime Ripard    spdif: spdif@1c21000 {
116506c7f9bSMaxime Ripard        #sound-dai-cells = <0>;
117506c7f9bSMaxime Ripard        compatible = "allwinner,sun4i-a10-spdif";
118506c7f9bSMaxime Ripard        reg = <0x01c21000 0x40>;
119506c7f9bSMaxime Ripard        interrupts = <13>;
120506c7f9bSMaxime Ripard        clocks = <&apb0_gates 1>, <&spdif_clk>;
121506c7f9bSMaxime Ripard        clock-names = "apb", "spdif";
122506c7f9bSMaxime Ripard        dmas = <&dma 0 2>, <&dma 0 2>;
123506c7f9bSMaxime Ripard        dma-names = "rx", "tx";
124506c7f9bSMaxime Ripard    };
125506c7f9bSMaxime Ripard
126506c7f9bSMaxime Ripard...
127