xref: /freebsd/sys/contrib/device-tree/Bindings/sound/amlogic,axg-fifo.yaml (revision cb7aa33ac6cd46a5434798e50363136e64f3ae98)
1*cb7aa33aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*cb7aa33aSEmmanuel Vadot%YAML 1.2
3*cb7aa33aSEmmanuel Vadot---
4*cb7aa33aSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/amlogic,axg-fifo.yaml#
5*cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*cb7aa33aSEmmanuel Vadot
7*cb7aa33aSEmmanuel Vadottitle: Amlogic AXG Audio FIFO controllers
8*cb7aa33aSEmmanuel Vadot
9*cb7aa33aSEmmanuel Vadotmaintainers:
10*cb7aa33aSEmmanuel Vadot  - Jerome Brunet <jbrunet@baylibre.com>
11*cb7aa33aSEmmanuel Vadot
12*cb7aa33aSEmmanuel Vadotproperties:
13*cb7aa33aSEmmanuel Vadot  compatible:
14*cb7aa33aSEmmanuel Vadot    oneOf:
15*cb7aa33aSEmmanuel Vadot      - enum:
16*cb7aa33aSEmmanuel Vadot          - amlogic,axg-toddr
17*cb7aa33aSEmmanuel Vadot          - amlogic,axg-frddr
18*cb7aa33aSEmmanuel Vadot      - items:
19*cb7aa33aSEmmanuel Vadot          - enum:
20*cb7aa33aSEmmanuel Vadot              - amlogic,g12a-toddr
21*cb7aa33aSEmmanuel Vadot              - amlogic,sm1-toddr
22*cb7aa33aSEmmanuel Vadot          - const: amlogic,axg-toddr
23*cb7aa33aSEmmanuel Vadot      - items:
24*cb7aa33aSEmmanuel Vadot          - enum:
25*cb7aa33aSEmmanuel Vadot              - amlogic,g12a-frddr
26*cb7aa33aSEmmanuel Vadot              - amlogic,sm1-frddr
27*cb7aa33aSEmmanuel Vadot          - const: amlogic,axg-frddr
28*cb7aa33aSEmmanuel Vadot
29*cb7aa33aSEmmanuel Vadot  reg:
30*cb7aa33aSEmmanuel Vadot    maxItems: 1
31*cb7aa33aSEmmanuel Vadot
32*cb7aa33aSEmmanuel Vadot  "#sound-dai-cells":
33*cb7aa33aSEmmanuel Vadot    const: 0
34*cb7aa33aSEmmanuel Vadot
35*cb7aa33aSEmmanuel Vadot  clocks:
36*cb7aa33aSEmmanuel Vadot    items:
37*cb7aa33aSEmmanuel Vadot      - description: Peripheral clock
38*cb7aa33aSEmmanuel Vadot
39*cb7aa33aSEmmanuel Vadot  interrupts:
40*cb7aa33aSEmmanuel Vadot    maxItems: 1
41*cb7aa33aSEmmanuel Vadot
42*cb7aa33aSEmmanuel Vadot  resets:
43*cb7aa33aSEmmanuel Vadot    minItems: 1
44*cb7aa33aSEmmanuel Vadot    maxItems: 2
45*cb7aa33aSEmmanuel Vadot
46*cb7aa33aSEmmanuel Vadot  reset-names:
47*cb7aa33aSEmmanuel Vadot    minItems: 1
48*cb7aa33aSEmmanuel Vadot    maxItems: 2
49*cb7aa33aSEmmanuel Vadot
50*cb7aa33aSEmmanuel Vadot  amlogic,fifo-depth:
51*cb7aa33aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
52*cb7aa33aSEmmanuel Vadot    description: Size of the controller's fifo in bytes
53*cb7aa33aSEmmanuel Vadot
54*cb7aa33aSEmmanuel Vadotrequired:
55*cb7aa33aSEmmanuel Vadot  - compatible
56*cb7aa33aSEmmanuel Vadot  - reg
57*cb7aa33aSEmmanuel Vadot  - "#sound-dai-cells"
58*cb7aa33aSEmmanuel Vadot  - clocks
59*cb7aa33aSEmmanuel Vadot  - interrupts
60*cb7aa33aSEmmanuel Vadot  - resets
61*cb7aa33aSEmmanuel Vadot  - amlogic,fifo-depth
62*cb7aa33aSEmmanuel Vadot
63*cb7aa33aSEmmanuel VadotallOf:
64*cb7aa33aSEmmanuel Vadot  - $ref: dai-common.yaml#
65*cb7aa33aSEmmanuel Vadot  - if:
66*cb7aa33aSEmmanuel Vadot      properties:
67*cb7aa33aSEmmanuel Vadot        compatible:
68*cb7aa33aSEmmanuel Vadot          contains:
69*cb7aa33aSEmmanuel Vadot            enum:
70*cb7aa33aSEmmanuel Vadot              - amlogic,g12a-toddr
71*cb7aa33aSEmmanuel Vadot              - amlogic,sm1-toddr
72*cb7aa33aSEmmanuel Vadot              - amlogic,g12a-frddr
73*cb7aa33aSEmmanuel Vadot              - amlogic,sm1-frddr
74*cb7aa33aSEmmanuel Vadot
75*cb7aa33aSEmmanuel Vadot    then:
76*cb7aa33aSEmmanuel Vadot      properties:
77*cb7aa33aSEmmanuel Vadot        resets:
78*cb7aa33aSEmmanuel Vadot          minItems: 2
79*cb7aa33aSEmmanuel Vadot        reset-names:
80*cb7aa33aSEmmanuel Vadot          items:
81*cb7aa33aSEmmanuel Vadot            - const: arb
82*cb7aa33aSEmmanuel Vadot            - const: rst
83*cb7aa33aSEmmanuel Vadot      required:
84*cb7aa33aSEmmanuel Vadot        - reset-names
85*cb7aa33aSEmmanuel Vadot
86*cb7aa33aSEmmanuel Vadot    else:
87*cb7aa33aSEmmanuel Vadot      properties:
88*cb7aa33aSEmmanuel Vadot        resets:
89*cb7aa33aSEmmanuel Vadot          maxItems: 1
90*cb7aa33aSEmmanuel Vadot        reset-names:
91*cb7aa33aSEmmanuel Vadot          const: arb
92*cb7aa33aSEmmanuel Vadot
93*cb7aa33aSEmmanuel VadotunevaluatedProperties: false
94*cb7aa33aSEmmanuel Vadot
95*cb7aa33aSEmmanuel Vadotexamples:
96*cb7aa33aSEmmanuel Vadot  - |
97*cb7aa33aSEmmanuel Vadot    #include <dt-bindings/clock/axg-audio-clkc.h>
98*cb7aa33aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
99*cb7aa33aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
100*cb7aa33aSEmmanuel Vadot    #include <dt-bindings/reset/amlogic,meson-axg-audio-arb.h>
101*cb7aa33aSEmmanuel Vadot    #include <dt-bindings/reset/amlogic,meson-g12a-audio-reset.h>
102*cb7aa33aSEmmanuel Vadot
103*cb7aa33aSEmmanuel Vadot    audio-controller@1c0 {
104*cb7aa33aSEmmanuel Vadot        compatible = "amlogic,g12a-frddr", "amlogic,axg-frddr";
105*cb7aa33aSEmmanuel Vadot        reg = <0x1c0 0x1c>;
106*cb7aa33aSEmmanuel Vadot        #sound-dai-cells = <0>;
107*cb7aa33aSEmmanuel Vadot        clocks = <&clkc_audio AUD_CLKID_FRDDR_A>;
108*cb7aa33aSEmmanuel Vadot        interrupts = <GIC_SPI 88 IRQ_TYPE_EDGE_RISING>;
109*cb7aa33aSEmmanuel Vadot        resets = <&arb>, <&clkc_audio AUD_RESET_FRDDR_A>;
110*cb7aa33aSEmmanuel Vadot        reset-names = "arb", "rst";
111*cb7aa33aSEmmanuel Vadot        amlogic,fifo-depth = <512>;
112*cb7aa33aSEmmanuel Vadot    };
113