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