xref: /linux/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.yaml (revision 9e56ff53b4115875667760445b028357848b4748)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/sound/amlogic,axg-spdifout.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Amlogic Audio AXG SPDIF Output
8
9maintainers:
10  - Jerome Brunet <jbrunet@baylibre.com>
11
12properties:
13  compatible:
14    oneOf:
15      - const: amlogic,axg-spdifout
16      - items:
17          - enum:
18              - amlogic,g12a-spdifout
19              - amlogic,sm1-spdifout
20          - const: amlogic,axg-spdifout
21
22  reg:
23    maxItems: 1
24
25  "#sound-dai-cells":
26    const: 0
27
28  clocks:
29    items:
30      - description: Peripheral clock
31      - description: SPDIF output master clock
32
33  clock-names:
34    items:
35      - const: pclk
36      - const: mclk
37
38  resets:
39    maxItems: 1
40
41required:
42  - compatible
43  - reg
44  - "#sound-dai-cells"
45  - clocks
46  - clock-names
47
48allOf:
49  - $ref: dai-common.yaml#
50
51  - if:
52      properties:
53        compatible:
54          contains:
55            enum:
56              - amlogic,g12a-spdifout
57              - amlogic,sm1-spdifout
58    then:
59      required:
60        - resets
61
62    else:
63      properties:
64        resets: false
65
66unevaluatedProperties: false
67
68examples:
69  - |
70    #include <dt-bindings/clock/axg-audio-clkc.h>
71
72    audio-controller@480 {
73        compatible = "amlogic,axg-spdifout";
74        reg = <0x480 0x50>;
75        #sound-dai-cells = <0>;
76        clocks = <&clkc_audio AUD_CLKID_SPDIFOUT>,
77                 <&clkc_audio AUD_CLKID_SPDIFOUT_CLK>;
78        clock-names = "pclk", "mclk";
79    };
80