xref: /freebsd/sys/contrib/device-tree/Bindings/sound/allwinner,sun4i-a10-spdif.yaml (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
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
25*8d13bc63SEmmanuel Vadot      - const: allwinner,sun50i-h616-spdif
26c66ec88fSEmmanuel Vadot      - items:
27c66ec88fSEmmanuel Vadot          - const: allwinner,sun8i-a83t-spdif
28c66ec88fSEmmanuel Vadot          - const: allwinner,sun8i-h3-spdif
29c66ec88fSEmmanuel Vadot      - items:
30c66ec88fSEmmanuel Vadot          - const: allwinner,sun50i-a64-spdif
31c66ec88fSEmmanuel Vadot          - const: allwinner,sun8i-h3-spdif
32c66ec88fSEmmanuel Vadot
33c66ec88fSEmmanuel Vadot  reg:
34c66ec88fSEmmanuel Vadot    maxItems: 1
35c66ec88fSEmmanuel Vadot
36c66ec88fSEmmanuel Vadot  interrupts:
37c66ec88fSEmmanuel Vadot    maxItems: 1
38c66ec88fSEmmanuel Vadot
39c66ec88fSEmmanuel Vadot  clocks:
40c66ec88fSEmmanuel Vadot    items:
41c66ec88fSEmmanuel Vadot      - description: Bus Clock
42c66ec88fSEmmanuel Vadot      - description: Module Clock
43c66ec88fSEmmanuel Vadot
44c66ec88fSEmmanuel Vadot  clock-names:
45c66ec88fSEmmanuel Vadot    items:
46c66ec88fSEmmanuel Vadot      - const: apb
47c66ec88fSEmmanuel Vadot      - const: spdif
48c66ec88fSEmmanuel Vadot
49c66ec88fSEmmanuel Vadot  # Even though it only applies to subschemas under the conditionals,
50c66ec88fSEmmanuel Vadot  # not listing them here will trigger a warning because of the
51c66ec88fSEmmanuel Vadot  # additionalsProperties set to false.
52c66ec88fSEmmanuel Vadot  dmas: true
53c66ec88fSEmmanuel Vadot  dma-names: true
54c66ec88fSEmmanuel Vadot  resets:
55c66ec88fSEmmanuel Vadot    maxItems: 1
56c66ec88fSEmmanuel Vadot
57c66ec88fSEmmanuel VadotallOf:
588bab661aSEmmanuel Vadot  - $ref: dai-common.yaml#
59c66ec88fSEmmanuel Vadot  - if:
60c66ec88fSEmmanuel Vadot      properties:
61c66ec88fSEmmanuel Vadot        compatible:
62c66ec88fSEmmanuel Vadot          contains:
63c66ec88fSEmmanuel Vadot            enum:
64c66ec88fSEmmanuel Vadot              - allwinner,sun6i-a31-spdif
65c66ec88fSEmmanuel Vadot              - allwinner,sun8i-h3-spdif
66*8d13bc63SEmmanuel Vadot              - allwinner,sun50i-h6-spdif
67*8d13bc63SEmmanuel Vadot              - allwinner,sun50i-h616-spdif
68c66ec88fSEmmanuel Vadot
69c66ec88fSEmmanuel Vadot    then:
70c66ec88fSEmmanuel Vadot      required:
71c66ec88fSEmmanuel Vadot        - resets
72c66ec88fSEmmanuel Vadot
73c66ec88fSEmmanuel Vadot  - if:
74c66ec88fSEmmanuel Vadot      properties:
75c66ec88fSEmmanuel Vadot        compatible:
76c66ec88fSEmmanuel Vadot          contains:
77c66ec88fSEmmanuel Vadot            enum:
78c66ec88fSEmmanuel Vadot              - allwinner,sun8i-h3-spdif
79*8d13bc63SEmmanuel Vadot              - allwinner,sun50i-h616-spdif
80c66ec88fSEmmanuel Vadot
81c66ec88fSEmmanuel Vadot    then:
82c66ec88fSEmmanuel Vadot      properties:
83c66ec88fSEmmanuel Vadot        dmas:
84c66ec88fSEmmanuel Vadot          description: TX DMA Channel
85c66ec88fSEmmanuel Vadot
86c66ec88fSEmmanuel Vadot        dma-names:
87c66ec88fSEmmanuel Vadot          const: tx
88c66ec88fSEmmanuel Vadot
89c66ec88fSEmmanuel Vadot    else:
90c66ec88fSEmmanuel Vadot      properties:
91c66ec88fSEmmanuel Vadot        dmas:
92c66ec88fSEmmanuel Vadot          items:
93c66ec88fSEmmanuel Vadot            - description: RX DMA Channel
94c66ec88fSEmmanuel Vadot            - description: TX DMA Channel
95c66ec88fSEmmanuel Vadot
96c66ec88fSEmmanuel Vadot        dma-names:
97c66ec88fSEmmanuel Vadot          items:
98c66ec88fSEmmanuel Vadot            - const: rx
99c66ec88fSEmmanuel Vadot            - const: tx
100c66ec88fSEmmanuel Vadot
101c66ec88fSEmmanuel Vadotrequired:
102c66ec88fSEmmanuel Vadot  - "#sound-dai-cells"
103c66ec88fSEmmanuel Vadot  - compatible
104c66ec88fSEmmanuel Vadot  - reg
105c66ec88fSEmmanuel Vadot  - interrupts
106c66ec88fSEmmanuel Vadot  - clocks
107c66ec88fSEmmanuel Vadot  - clock-names
108c66ec88fSEmmanuel Vadot  - dmas
109c66ec88fSEmmanuel Vadot  - dma-names
110c66ec88fSEmmanuel Vadot
1118bab661aSEmmanuel VadotunevaluatedProperties: false
112c66ec88fSEmmanuel Vadot
113c66ec88fSEmmanuel Vadotexamples:
114c66ec88fSEmmanuel Vadot  - |
115c66ec88fSEmmanuel Vadot    spdif: spdif@1c21000 {
116c66ec88fSEmmanuel Vadot        #sound-dai-cells = <0>;
117c66ec88fSEmmanuel Vadot        compatible = "allwinner,sun4i-a10-spdif";
118c66ec88fSEmmanuel Vadot        reg = <0x01c21000 0x40>;
119c66ec88fSEmmanuel Vadot        interrupts = <13>;
120c66ec88fSEmmanuel Vadot        clocks = <&apb0_gates 1>, <&spdif_clk>;
121c66ec88fSEmmanuel Vadot        clock-names = "apb", "spdif";
122c66ec88fSEmmanuel Vadot        dmas = <&dma 0 2>, <&dma 0 2>;
123c66ec88fSEmmanuel Vadot        dma-names = "rx", "tx";
124c66ec88fSEmmanuel Vadot    };
125c66ec88fSEmmanuel Vadot
126c66ec88fSEmmanuel Vadot...
127