xref: /freebsd/sys/contrib/device-tree/Bindings/clock/amlogic,axg-audio-clkc.yaml (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
1*0e8011faSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2*0e8011faSEmmanuel Vadot%YAML 1.2
3*0e8011faSEmmanuel Vadot---
4*0e8011faSEmmanuel Vadot$id: http://devicetree.org/schemas/clock/amlogic,axg-audio-clkc.yaml#
5*0e8011faSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*0e8011faSEmmanuel Vadot
7*0e8011faSEmmanuel Vadottitle: Amlogic AXG Audio Clock Controller
8*0e8011faSEmmanuel Vadot
9*0e8011faSEmmanuel Vadotmaintainers:
10*0e8011faSEmmanuel Vadot  - Neil Armstrong <neil.armstrong@linaro.org>
11*0e8011faSEmmanuel Vadot  - Jerome Brunet <jbrunet@baylibre.com>
12*0e8011faSEmmanuel Vadot
13*0e8011faSEmmanuel Vadotdescription:
14*0e8011faSEmmanuel Vadot  The Amlogic AXG audio clock controller generates and supplies clock to the
15*0e8011faSEmmanuel Vadot  other elements of the audio subsystem, such as fifos, i2s, spdif and pdm
16*0e8011faSEmmanuel Vadot  devices.
17*0e8011faSEmmanuel Vadot
18*0e8011faSEmmanuel Vadotproperties:
19*0e8011faSEmmanuel Vadot  compatible:
20*0e8011faSEmmanuel Vadot    enum:
21*0e8011faSEmmanuel Vadot      - amlogic,axg-audio-clkc
22*0e8011faSEmmanuel Vadot      - amlogic,g12a-audio-clkc
23*0e8011faSEmmanuel Vadot      - amlogic,sm1-audio-clkc
24*0e8011faSEmmanuel Vadot
25*0e8011faSEmmanuel Vadot  '#clock-cells':
26*0e8011faSEmmanuel Vadot    const: 1
27*0e8011faSEmmanuel Vadot
28*0e8011faSEmmanuel Vadot  '#reset-cells':
29*0e8011faSEmmanuel Vadot    const: 1
30*0e8011faSEmmanuel Vadot
31*0e8011faSEmmanuel Vadot  reg:
32*0e8011faSEmmanuel Vadot    maxItems: 1
33*0e8011faSEmmanuel Vadot
34*0e8011faSEmmanuel Vadot  clocks:
35*0e8011faSEmmanuel Vadot    minItems: 1
36*0e8011faSEmmanuel Vadot    items:
37*0e8011faSEmmanuel Vadot      - description: main peripheral bus clock
38*0e8011faSEmmanuel Vadot      - description: input plls to generate clock signals N0
39*0e8011faSEmmanuel Vadot      - description: input plls to generate clock signals N1
40*0e8011faSEmmanuel Vadot      - description: input plls to generate clock signals N2
41*0e8011faSEmmanuel Vadot      - description: input plls to generate clock signals N3
42*0e8011faSEmmanuel Vadot      - description: input plls to generate clock signals N4
43*0e8011faSEmmanuel Vadot      - description: input plls to generate clock signals N5
44*0e8011faSEmmanuel Vadot      - description: input plls to generate clock signals N6
45*0e8011faSEmmanuel Vadot      - description: input plls to generate clock signals N7
46*0e8011faSEmmanuel Vadot      - description: slave bit clock N0 provided by external components
47*0e8011faSEmmanuel Vadot      - description: slave bit clock N1 provided by external components
48*0e8011faSEmmanuel Vadot      - description: slave bit clock N2 provided by external components
49*0e8011faSEmmanuel Vadot      - description: slave bit clock N3 provided by external components
50*0e8011faSEmmanuel Vadot      - description: slave bit clock N4 provided by external components
51*0e8011faSEmmanuel Vadot      - description: slave bit clock N5 provided by external components
52*0e8011faSEmmanuel Vadot      - description: slave bit clock N6 provided by external components
53*0e8011faSEmmanuel Vadot      - description: slave bit clock N7 provided by external components
54*0e8011faSEmmanuel Vadot      - description: slave bit clock N8 provided by external components
55*0e8011faSEmmanuel Vadot      - description: slave bit clock N9 provided by external components
56*0e8011faSEmmanuel Vadot      - description: slave sample clock N0 provided by external components
57*0e8011faSEmmanuel Vadot      - description: slave sample clock N1 provided by external components
58*0e8011faSEmmanuel Vadot      - description: slave sample clock N2 provided by external components
59*0e8011faSEmmanuel Vadot      - description: slave sample clock N3 provided by external components
60*0e8011faSEmmanuel Vadot      - description: slave sample clock N4 provided by external components
61*0e8011faSEmmanuel Vadot      - description: slave sample clock N5 provided by external components
62*0e8011faSEmmanuel Vadot      - description: slave sample clock N6 provided by external components
63*0e8011faSEmmanuel Vadot      - description: slave sample clock N7 provided by external components
64*0e8011faSEmmanuel Vadot      - description: slave sample clock N8 provided by external components
65*0e8011faSEmmanuel Vadot      - description: slave sample clock N9 provided by external components
66*0e8011faSEmmanuel Vadot
67*0e8011faSEmmanuel Vadot  clock-names:
68*0e8011faSEmmanuel Vadot    minItems: 1
69*0e8011faSEmmanuel Vadot    items:
70*0e8011faSEmmanuel Vadot      - const: pclk
71*0e8011faSEmmanuel Vadot      - const: mst_in0
72*0e8011faSEmmanuel Vadot      - const: mst_in1
73*0e8011faSEmmanuel Vadot      - const: mst_in2
74*0e8011faSEmmanuel Vadot      - const: mst_in3
75*0e8011faSEmmanuel Vadot      - const: mst_in4
76*0e8011faSEmmanuel Vadot      - const: mst_in5
77*0e8011faSEmmanuel Vadot      - const: mst_in6
78*0e8011faSEmmanuel Vadot      - const: mst_in7
79*0e8011faSEmmanuel Vadot      - const: slv_sclk0
80*0e8011faSEmmanuel Vadot      - const: slv_sclk1
81*0e8011faSEmmanuel Vadot      - const: slv_sclk2
82*0e8011faSEmmanuel Vadot      - const: slv_sclk3
83*0e8011faSEmmanuel Vadot      - const: slv_sclk4
84*0e8011faSEmmanuel Vadot      - const: slv_sclk5
85*0e8011faSEmmanuel Vadot      - const: slv_sclk6
86*0e8011faSEmmanuel Vadot      - const: slv_sclk7
87*0e8011faSEmmanuel Vadot      - const: slv_sclk8
88*0e8011faSEmmanuel Vadot      - const: slv_sclk9
89*0e8011faSEmmanuel Vadot      - const: slv_lrclk0
90*0e8011faSEmmanuel Vadot      - const: slv_lrclk1
91*0e8011faSEmmanuel Vadot      - const: slv_lrclk2
92*0e8011faSEmmanuel Vadot      - const: slv_lrclk3
93*0e8011faSEmmanuel Vadot      - const: slv_lrclk4
94*0e8011faSEmmanuel Vadot      - const: slv_lrclk5
95*0e8011faSEmmanuel Vadot      - const: slv_lrclk6
96*0e8011faSEmmanuel Vadot      - const: slv_lrclk7
97*0e8011faSEmmanuel Vadot      - const: slv_lrclk8
98*0e8011faSEmmanuel Vadot      - const: slv_lrclk9
99*0e8011faSEmmanuel Vadot
100*0e8011faSEmmanuel Vadot  resets:
101*0e8011faSEmmanuel Vadot    description: internal reset line
102*0e8011faSEmmanuel Vadot
103*0e8011faSEmmanuel Vadotrequired:
104*0e8011faSEmmanuel Vadot  - compatible
105*0e8011faSEmmanuel Vadot  - '#clock-cells'
106*0e8011faSEmmanuel Vadot  - reg
107*0e8011faSEmmanuel Vadot  - clocks
108*0e8011faSEmmanuel Vadot  - clock-names
109*0e8011faSEmmanuel Vadot  - resets
110*0e8011faSEmmanuel Vadot
111*0e8011faSEmmanuel VadotallOf:
112*0e8011faSEmmanuel Vadot  - if:
113*0e8011faSEmmanuel Vadot      properties:
114*0e8011faSEmmanuel Vadot        compatible:
115*0e8011faSEmmanuel Vadot          contains:
116*0e8011faSEmmanuel Vadot            enum:
117*0e8011faSEmmanuel Vadot              - amlogic,g12a-audio-clkc
118*0e8011faSEmmanuel Vadot              - amlogic,sm1-audio-clkc
119*0e8011faSEmmanuel Vadot    then:
120*0e8011faSEmmanuel Vadot      required:
121*0e8011faSEmmanuel Vadot        - '#reset-cells'
122*0e8011faSEmmanuel Vadot    else:
123*0e8011faSEmmanuel Vadot      properties:
124*0e8011faSEmmanuel Vadot        '#reset-cells': false
125*0e8011faSEmmanuel Vadot
126*0e8011faSEmmanuel VadotadditionalProperties: false
127*0e8011faSEmmanuel Vadot
128*0e8011faSEmmanuel Vadotexamples:
129*0e8011faSEmmanuel Vadot  - |
130*0e8011faSEmmanuel Vadot    #include <dt-bindings/clock/axg-clkc.h>
131*0e8011faSEmmanuel Vadot    #include <dt-bindings/reset/amlogic,meson-axg-reset.h>
132*0e8011faSEmmanuel Vadot    apb {
133*0e8011faSEmmanuel Vadot        #address-cells = <2>;
134*0e8011faSEmmanuel Vadot        #size-cells = <2>;
135*0e8011faSEmmanuel Vadot
136*0e8011faSEmmanuel Vadot        clkc_audio: clock-controller@0 {
137*0e8011faSEmmanuel Vadot            compatible = "amlogic,axg-audio-clkc";
138*0e8011faSEmmanuel Vadot            reg = <0x0 0x0 0x0 0xb4>;
139*0e8011faSEmmanuel Vadot            #clock-cells = <1>;
140*0e8011faSEmmanuel Vadot
141*0e8011faSEmmanuel Vadot            clocks = <&clkc CLKID_AUDIO>,
142*0e8011faSEmmanuel Vadot                     <&clkc CLKID_MPLL0>,
143*0e8011faSEmmanuel Vadot                     <&clkc CLKID_MPLL1>,
144*0e8011faSEmmanuel Vadot                     <&clkc CLKID_MPLL2>,
145*0e8011faSEmmanuel Vadot                     <&clkc CLKID_MPLL3>,
146*0e8011faSEmmanuel Vadot                     <&clkc CLKID_HIFI_PLL>,
147*0e8011faSEmmanuel Vadot                     <&clkc CLKID_FCLK_DIV3>,
148*0e8011faSEmmanuel Vadot                     <&clkc CLKID_FCLK_DIV4>,
149*0e8011faSEmmanuel Vadot                     <&clkc CLKID_GP0_PLL>,
150*0e8011faSEmmanuel Vadot                     <&slv_sclk0>,
151*0e8011faSEmmanuel Vadot                     <&slv_sclk1>,
152*0e8011faSEmmanuel Vadot                     <&slv_sclk2>,
153*0e8011faSEmmanuel Vadot                     <&slv_sclk3>,
154*0e8011faSEmmanuel Vadot                     <&slv_sclk4>,
155*0e8011faSEmmanuel Vadot                     <&slv_sclk5>,
156*0e8011faSEmmanuel Vadot                     <&slv_sclk6>,
157*0e8011faSEmmanuel Vadot                     <&slv_sclk7>,
158*0e8011faSEmmanuel Vadot                     <&slv_sclk8>,
159*0e8011faSEmmanuel Vadot                     <&slv_sclk9>,
160*0e8011faSEmmanuel Vadot                     <&slv_lrclk0>,
161*0e8011faSEmmanuel Vadot                     <&slv_lrclk1>,
162*0e8011faSEmmanuel Vadot                     <&slv_lrclk2>,
163*0e8011faSEmmanuel Vadot                     <&slv_lrclk3>,
164*0e8011faSEmmanuel Vadot                     <&slv_lrclk4>,
165*0e8011faSEmmanuel Vadot                     <&slv_lrclk5>,
166*0e8011faSEmmanuel Vadot                     <&slv_lrclk6>,
167*0e8011faSEmmanuel Vadot                     <&slv_lrclk7>,
168*0e8011faSEmmanuel Vadot                     <&slv_lrclk8>,
169*0e8011faSEmmanuel Vadot                     <&slv_lrclk9>;
170*0e8011faSEmmanuel Vadot            clock-names = "pclk",
171*0e8011faSEmmanuel Vadot                          "mst_in0",
172*0e8011faSEmmanuel Vadot                          "mst_in1",
173*0e8011faSEmmanuel Vadot                          "mst_in2",
174*0e8011faSEmmanuel Vadot                          "mst_in3",
175*0e8011faSEmmanuel Vadot                          "mst_in4",
176*0e8011faSEmmanuel Vadot                          "mst_in5",
177*0e8011faSEmmanuel Vadot                          "mst_in6",
178*0e8011faSEmmanuel Vadot                          "mst_in7",
179*0e8011faSEmmanuel Vadot                          "slv_sclk0",
180*0e8011faSEmmanuel Vadot                          "slv_sclk1",
181*0e8011faSEmmanuel Vadot                          "slv_sclk2",
182*0e8011faSEmmanuel Vadot                          "slv_sclk3",
183*0e8011faSEmmanuel Vadot                          "slv_sclk4",
184*0e8011faSEmmanuel Vadot                          "slv_sclk5",
185*0e8011faSEmmanuel Vadot                          "slv_sclk6",
186*0e8011faSEmmanuel Vadot                          "slv_sclk7",
187*0e8011faSEmmanuel Vadot                          "slv_sclk8",
188*0e8011faSEmmanuel Vadot                          "slv_sclk9",
189*0e8011faSEmmanuel Vadot                          "slv_lrclk0",
190*0e8011faSEmmanuel Vadot                          "slv_lrclk1",
191*0e8011faSEmmanuel Vadot                          "slv_lrclk2",
192*0e8011faSEmmanuel Vadot                          "slv_lrclk3",
193*0e8011faSEmmanuel Vadot                          "slv_lrclk4",
194*0e8011faSEmmanuel Vadot                          "slv_lrclk5",
195*0e8011faSEmmanuel Vadot                          "slv_lrclk6",
196*0e8011faSEmmanuel Vadot                          "slv_lrclk7",
197*0e8011faSEmmanuel Vadot                          "slv_lrclk8",
198*0e8011faSEmmanuel Vadot                          "slv_lrclk9";
199*0e8011faSEmmanuel Vadot            resets = <&reset RESET_AUDIO>;
200*0e8011faSEmmanuel Vadot        };
201*0e8011faSEmmanuel Vadot    };
202