xref: /freebsd/sys/contrib/device-tree/Bindings/sound/amlogic,axg-spdifin.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-spdifin.yaml#
5*cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*cb7aa33aSEmmanuel Vadot
7*cb7aa33aSEmmanuel Vadottitle: Amlogic Audio AXG SPDIF Input
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      - const: amlogic,axg-spdifin
16*cb7aa33aSEmmanuel Vadot      - items:
17*cb7aa33aSEmmanuel Vadot          - enum:
18*cb7aa33aSEmmanuel Vadot              - amlogic,g12a-spdifin
19*cb7aa33aSEmmanuel Vadot              - amlogic,sm1-spdifin
20*cb7aa33aSEmmanuel Vadot          - const: amlogic,axg-spdifin
21*cb7aa33aSEmmanuel Vadot
22*cb7aa33aSEmmanuel Vadot  reg:
23*cb7aa33aSEmmanuel Vadot    maxItems: 1
24*cb7aa33aSEmmanuel Vadot
25*cb7aa33aSEmmanuel Vadot  "#sound-dai-cells":
26*cb7aa33aSEmmanuel Vadot    const: 0
27*cb7aa33aSEmmanuel Vadot
28*cb7aa33aSEmmanuel Vadot  clocks:
29*cb7aa33aSEmmanuel Vadot    items:
30*cb7aa33aSEmmanuel Vadot      - description: Peripheral clock
31*cb7aa33aSEmmanuel Vadot      - description: SPDIF input reference clock
32*cb7aa33aSEmmanuel Vadot
33*cb7aa33aSEmmanuel Vadot  clock-names:
34*cb7aa33aSEmmanuel Vadot    items:
35*cb7aa33aSEmmanuel Vadot      - const: pclk
36*cb7aa33aSEmmanuel Vadot      - const: refclk
37*cb7aa33aSEmmanuel Vadot
38*cb7aa33aSEmmanuel Vadot  interrupts:
39*cb7aa33aSEmmanuel Vadot    maxItems: 1
40*cb7aa33aSEmmanuel Vadot
41*cb7aa33aSEmmanuel Vadot  resets:
42*cb7aa33aSEmmanuel Vadot    maxItems: 1
43*cb7aa33aSEmmanuel Vadot
44*cb7aa33aSEmmanuel Vadotrequired:
45*cb7aa33aSEmmanuel Vadot  - compatible
46*cb7aa33aSEmmanuel Vadot  - reg
47*cb7aa33aSEmmanuel Vadot  - "#sound-dai-cells"
48*cb7aa33aSEmmanuel Vadot  - clocks
49*cb7aa33aSEmmanuel Vadot  - clock-names
50*cb7aa33aSEmmanuel Vadot  - interrupts
51*cb7aa33aSEmmanuel Vadot
52*cb7aa33aSEmmanuel VadotallOf:
53*cb7aa33aSEmmanuel Vadot  - $ref: dai-common.yaml#
54*cb7aa33aSEmmanuel Vadot
55*cb7aa33aSEmmanuel Vadot  - if:
56*cb7aa33aSEmmanuel Vadot      properties:
57*cb7aa33aSEmmanuel Vadot        compatible:
58*cb7aa33aSEmmanuel Vadot          contains:
59*cb7aa33aSEmmanuel Vadot            enum:
60*cb7aa33aSEmmanuel Vadot              - amlogic,g12a-spdifin
61*cb7aa33aSEmmanuel Vadot              - amlogic,sm1-spdifin
62*cb7aa33aSEmmanuel Vadot    then:
63*cb7aa33aSEmmanuel Vadot      required:
64*cb7aa33aSEmmanuel Vadot        - resets
65*cb7aa33aSEmmanuel Vadot
66*cb7aa33aSEmmanuel Vadot    else:
67*cb7aa33aSEmmanuel Vadot      properties:
68*cb7aa33aSEmmanuel Vadot        resets: false
69*cb7aa33aSEmmanuel Vadot
70*cb7aa33aSEmmanuel VadotunevaluatedProperties: false
71*cb7aa33aSEmmanuel Vadot
72*cb7aa33aSEmmanuel Vadotexamples:
73*cb7aa33aSEmmanuel Vadot  - |
74*cb7aa33aSEmmanuel Vadot    #include <dt-bindings/clock/axg-audio-clkc.h>
75*cb7aa33aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
76*cb7aa33aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
77*cb7aa33aSEmmanuel Vadot
78*cb7aa33aSEmmanuel Vadot    audio-controller@400 {
79*cb7aa33aSEmmanuel Vadot        compatible = "amlogic,axg-spdifin";
80*cb7aa33aSEmmanuel Vadot        reg = <0x400 0x30>;
81*cb7aa33aSEmmanuel Vadot        #sound-dai-cells = <0>;
82*cb7aa33aSEmmanuel Vadot        interrupts = <GIC_SPI 87 IRQ_TYPE_EDGE_RISING>;
83*cb7aa33aSEmmanuel Vadot        clocks = <&clkc_audio AUD_CLKID_SPDIFIN>,
84*cb7aa33aSEmmanuel Vadot                 <&clkc_audio AUD_CLKID_SPDIFIN_CLK>;
85*cb7aa33aSEmmanuel Vadot        clock-names = "pclk", "refclk";
86*cb7aa33aSEmmanuel Vadot    };
87