xref: /freebsd/sys/contrib/device-tree/Bindings/sound/amlogic,axg-pdm.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-pdm.yaml#
5*cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*cb7aa33aSEmmanuel Vadot
7*cb7aa33aSEmmanuel Vadottitle: Amlogic Audio AXG PDM 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      - items:
16*cb7aa33aSEmmanuel Vadot          - enum:
17*cb7aa33aSEmmanuel Vadot              - amlogic,g12a-pdm
18*cb7aa33aSEmmanuel Vadot              - amlogic,sm1-pdm
19*cb7aa33aSEmmanuel Vadot          - const: amlogic,axg-pdm
20*cb7aa33aSEmmanuel Vadot      - const: amlogic,axg-pdm
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: PDM digital clock
32*cb7aa33aSEmmanuel Vadot      - description: DSP system clock
33*cb7aa33aSEmmanuel Vadot
34*cb7aa33aSEmmanuel Vadot  clock-names:
35*cb7aa33aSEmmanuel Vadot    items:
36*cb7aa33aSEmmanuel Vadot      - const: pclk
37*cb7aa33aSEmmanuel Vadot      - const: dclk
38*cb7aa33aSEmmanuel Vadot      - const: sysclk
39*cb7aa33aSEmmanuel Vadot
40*cb7aa33aSEmmanuel Vadot  resets:
41*cb7aa33aSEmmanuel Vadot    maxItems: 1
42*cb7aa33aSEmmanuel Vadot
43*cb7aa33aSEmmanuel Vadotrequired:
44*cb7aa33aSEmmanuel Vadot  - compatible
45*cb7aa33aSEmmanuel Vadot  - reg
46*cb7aa33aSEmmanuel Vadot  - "#sound-dai-cells"
47*cb7aa33aSEmmanuel Vadot  - clocks
48*cb7aa33aSEmmanuel Vadot  - clock-names
49*cb7aa33aSEmmanuel Vadot
50*cb7aa33aSEmmanuel VadotallOf:
51*cb7aa33aSEmmanuel Vadot  - $ref: dai-common.yaml#
52*cb7aa33aSEmmanuel Vadot
53*cb7aa33aSEmmanuel Vadot  - if:
54*cb7aa33aSEmmanuel Vadot      properties:
55*cb7aa33aSEmmanuel Vadot        compatible:
56*cb7aa33aSEmmanuel Vadot          contains:
57*cb7aa33aSEmmanuel Vadot            enum:
58*cb7aa33aSEmmanuel Vadot              - amlogic,g12a-pdm
59*cb7aa33aSEmmanuel Vadot              - amlogic,sm1-pdm
60*cb7aa33aSEmmanuel Vadot    then:
61*cb7aa33aSEmmanuel Vadot      required:
62*cb7aa33aSEmmanuel Vadot        - resets
63*cb7aa33aSEmmanuel Vadot
64*cb7aa33aSEmmanuel Vadot    else:
65*cb7aa33aSEmmanuel Vadot      properties:
66*cb7aa33aSEmmanuel Vadot        resets: false
67*cb7aa33aSEmmanuel Vadot
68*cb7aa33aSEmmanuel VadotunevaluatedProperties: false
69*cb7aa33aSEmmanuel Vadot
70*cb7aa33aSEmmanuel Vadotexamples:
71*cb7aa33aSEmmanuel Vadot  - |
72*cb7aa33aSEmmanuel Vadot    #include <dt-bindings/clock/axg-audio-clkc.h>
73*cb7aa33aSEmmanuel Vadot
74*cb7aa33aSEmmanuel Vadot    audio-controller@ff632000 {
75*cb7aa33aSEmmanuel Vadot        compatible = "amlogic,axg-pdm";
76*cb7aa33aSEmmanuel Vadot        reg = <0xff632000 0x34>;
77*cb7aa33aSEmmanuel Vadot        #sound-dai-cells = <0>;
78*cb7aa33aSEmmanuel Vadot        clocks = <&clkc_audio AUD_CLKID_PDM>,
79*cb7aa33aSEmmanuel Vadot                 <&clkc_audio AUD_CLKID_PDM_DCLK>,
80*cb7aa33aSEmmanuel Vadot                 <&clkc_audio AUD_CLKID_PDM_SYSCLK>;
81*cb7aa33aSEmmanuel Vadot        clock-names = "pclk", "dclk", "sysclk";
82*cb7aa33aSEmmanuel Vadot    };
83