1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/sound/amlogic,aiu.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Amlogic AIU audio output controller
8
9maintainers:
10  - Jerome Brunet <jbrunet@baylibre.com>
11
12properties:
13  $nodename:
14    pattern: "^audio-controller@.*"
15
16  "#sound-dai-cells":
17    const: 2
18
19  compatible:
20    items:
21      - enum:
22        - amlogic,aiu-gxbb
23        - amlogic,aiu-gxl
24        - amlogic,aiu-meson8
25        - amlogic,aiu-meson8b
26      - const:
27          amlogic,aiu
28
29  clocks:
30    items:
31      - description: AIU peripheral clock
32      - description: I2S peripheral clock
33      - description: I2S output clock
34      - description: I2S master clock
35      - description: I2S mixer clock
36      - description: SPDIF peripheral clock
37      - description: SPDIF output clock
38      - description: SPDIF master clock
39      - description: SPDIF master clock multiplexer
40
41  clock-names:
42    items:
43      - const: pclk
44      - const: i2s_pclk
45      - const: i2s_aoclk
46      - const: i2s_mclk
47      - const: i2s_mixer
48      - const: spdif_pclk
49      - const: spdif_aoclk
50      - const: spdif_mclk
51      - const: spdif_mclk_sel
52
53  interrupts:
54    items:
55      - description: I2S interrupt line
56      - description: SPDIF interrupt line
57
58  interrupt-names:
59    items:
60      - const: i2s
61      - const: spdif
62
63  reg:
64    maxItems: 1
65
66  resets:
67    maxItems: 1
68
69required:
70  - "#sound-dai-cells"
71  - compatible
72  - clocks
73  - clock-names
74  - interrupts
75  - interrupt-names
76  - reg
77  - resets
78
79examples:
80  - |
81    #include <dt-bindings/clock/gxbb-clkc.h>
82    #include <dt-bindings/interrupt-controller/irq.h>
83    #include <dt-bindings/interrupt-controller/arm-gic.h>
84    #include <dt-bindings/reset/amlogic,meson-gxbb-reset.h>
85
86    aiu: audio-controller@5400 {
87        compatible = "amlogic,aiu-gxl", "amlogic,aiu";
88        #sound-dai-cells = <2>;
89        reg = <0x0 0x5400 0x0 0x2ac>;
90        interrupts = <GIC_SPI 48 IRQ_TYPE_EDGE_RISING>,
91                     <GIC_SPI 50 IRQ_TYPE_EDGE_RISING>;
92        interrupt-names = "i2s", "spdif";
93        clocks = <&clkc CLKID_AIU_GLUE>,
94                 <&clkc CLKID_I2S_OUT>,
95                 <&clkc CLKID_AOCLK_GATE>,
96                 <&clkc CLKID_CTS_AMCLK>,
97                 <&clkc CLKID_MIXER_IFACE>,
98                 <&clkc CLKID_IEC958>,
99                 <&clkc CLKID_IEC958_GATE>,
100                 <&clkc CLKID_CTS_MCLK_I958>,
101                 <&clkc CLKID_CTS_I958>;
102        clock-names = "pclk",
103                      "i2s_pclk",
104                      "i2s_aoclk",
105                      "i2s_mclk",
106                      "i2s_mixer",
107                      "spdif_pclk",
108                      "spdif_aoclk",
109                      "spdif_mclk",
110                      "spdif_mclk_sel";
111        resets = <&reset RESET_AIU>;
112    };
113
114