xref: /freebsd/sys/contrib/device-tree/Bindings/clock/axis,artpec8-clock.yaml (revision 1537cf73828a2db2a67622ccfff77383c7db6f07)
1*1537cf73SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*1537cf73SEmmanuel Vadot%YAML 1.2
3*1537cf73SEmmanuel Vadot---
4*1537cf73SEmmanuel Vadot$id: http://devicetree.org/schemas/clock/axis,artpec8-clock.yaml#
5*1537cf73SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*1537cf73SEmmanuel Vadot
7*1537cf73SEmmanuel Vadottitle: Axis ARTPEC-8 SoC clock controller
8*1537cf73SEmmanuel Vadot
9*1537cf73SEmmanuel Vadotmaintainers:
10*1537cf73SEmmanuel Vadot  - Jesper Nilsson <jesper.nilsson@axis.com>
11*1537cf73SEmmanuel Vadot
12*1537cf73SEmmanuel Vadotdescription: |
13*1537cf73SEmmanuel Vadot  ARTPEC-8 clock controller is comprised of several CMU (Clock Management Unit)
14*1537cf73SEmmanuel Vadot  units, generating clocks for different domains. Those CMU units are modeled
15*1537cf73SEmmanuel Vadot  as separate device tree nodes, and might depend on each other.
16*1537cf73SEmmanuel Vadot  The root clock in that root tree is an external clock: OSCCLK (25 MHz).
17*1537cf73SEmmanuel Vadot  This external clock must be defined as a fixed-rate clock in dts.
18*1537cf73SEmmanuel Vadot
19*1537cf73SEmmanuel Vadot  CMU_CMU is a top-level CMU, where all base clocks are prepared using PLLs and
20*1537cf73SEmmanuel Vadot  dividers; all other clocks of function blocks (other CMUs) are usually
21*1537cf73SEmmanuel Vadot  derived from CMU_CMU.
22*1537cf73SEmmanuel Vadot
23*1537cf73SEmmanuel Vadot  Each clock is assigned an identifier and client nodes can use this identifier
24*1537cf73SEmmanuel Vadot  to specify the clock which they consume. All clocks available for usage
25*1537cf73SEmmanuel Vadot  in clock consumer nodes are defined as preprocessor macros in
26*1537cf73SEmmanuel Vadot  'include/dt-bindings/clock/axis,artpec8-clk.h' header.
27*1537cf73SEmmanuel Vadot
28*1537cf73SEmmanuel Vadotproperties:
29*1537cf73SEmmanuel Vadot  compatible:
30*1537cf73SEmmanuel Vadot    enum:
31*1537cf73SEmmanuel Vadot      - axis,artpec8-cmu-cmu
32*1537cf73SEmmanuel Vadot      - axis,artpec8-cmu-bus
33*1537cf73SEmmanuel Vadot      - axis,artpec8-cmu-core
34*1537cf73SEmmanuel Vadot      - axis,artpec8-cmu-cpucl
35*1537cf73SEmmanuel Vadot      - axis,artpec8-cmu-fsys
36*1537cf73SEmmanuel Vadot      - axis,artpec8-cmu-imem
37*1537cf73SEmmanuel Vadot      - axis,artpec8-cmu-peri
38*1537cf73SEmmanuel Vadot
39*1537cf73SEmmanuel Vadot  reg:
40*1537cf73SEmmanuel Vadot    maxItems: 1
41*1537cf73SEmmanuel Vadot
42*1537cf73SEmmanuel Vadot  clocks:
43*1537cf73SEmmanuel Vadot    minItems: 1
44*1537cf73SEmmanuel Vadot    maxItems: 5
45*1537cf73SEmmanuel Vadot
46*1537cf73SEmmanuel Vadot  clock-names:
47*1537cf73SEmmanuel Vadot    minItems: 1
48*1537cf73SEmmanuel Vadot    maxItems: 5
49*1537cf73SEmmanuel Vadot
50*1537cf73SEmmanuel Vadot  "#clock-cells":
51*1537cf73SEmmanuel Vadot    const: 1
52*1537cf73SEmmanuel Vadot
53*1537cf73SEmmanuel Vadotrequired:
54*1537cf73SEmmanuel Vadot  - compatible
55*1537cf73SEmmanuel Vadot  - reg
56*1537cf73SEmmanuel Vadot  - clocks
57*1537cf73SEmmanuel Vadot  - clock-names
58*1537cf73SEmmanuel Vadot  - "#clock-cells"
59*1537cf73SEmmanuel Vadot
60*1537cf73SEmmanuel VadotallOf:
61*1537cf73SEmmanuel Vadot  - if:
62*1537cf73SEmmanuel Vadot      properties:
63*1537cf73SEmmanuel Vadot        compatible:
64*1537cf73SEmmanuel Vadot          const: axis,artpec8-cmu-cmu
65*1537cf73SEmmanuel Vadot
66*1537cf73SEmmanuel Vadot    then:
67*1537cf73SEmmanuel Vadot      properties:
68*1537cf73SEmmanuel Vadot        clocks:
69*1537cf73SEmmanuel Vadot          items:
70*1537cf73SEmmanuel Vadot            - description: External reference clock (25 MHz)
71*1537cf73SEmmanuel Vadot
72*1537cf73SEmmanuel Vadot        clock-names:
73*1537cf73SEmmanuel Vadot          items:
74*1537cf73SEmmanuel Vadot            - const: fin_pll
75*1537cf73SEmmanuel Vadot
76*1537cf73SEmmanuel Vadot  - if:
77*1537cf73SEmmanuel Vadot      properties:
78*1537cf73SEmmanuel Vadot        compatible:
79*1537cf73SEmmanuel Vadot          const: axis,artpec8-cmu-bus
80*1537cf73SEmmanuel Vadot
81*1537cf73SEmmanuel Vadot    then:
82*1537cf73SEmmanuel Vadot      properties:
83*1537cf73SEmmanuel Vadot        clocks:
84*1537cf73SEmmanuel Vadot          items:
85*1537cf73SEmmanuel Vadot            - description: External reference clock (25 MHz)
86*1537cf73SEmmanuel Vadot            - description: CMU_BUS BUS clock (from CMU_CMU)
87*1537cf73SEmmanuel Vadot            - description: CMU_BUS DLP clock (from CMU_CMU)
88*1537cf73SEmmanuel Vadot
89*1537cf73SEmmanuel Vadot        clock-names:
90*1537cf73SEmmanuel Vadot          items:
91*1537cf73SEmmanuel Vadot            - const: fin_pll
92*1537cf73SEmmanuel Vadot            - const: bus
93*1537cf73SEmmanuel Vadot            - const: dlp
94*1537cf73SEmmanuel Vadot
95*1537cf73SEmmanuel Vadot  - if:
96*1537cf73SEmmanuel Vadot      properties:
97*1537cf73SEmmanuel Vadot        compatible:
98*1537cf73SEmmanuel Vadot          const: axis,artpec8-cmu-core
99*1537cf73SEmmanuel Vadot
100*1537cf73SEmmanuel Vadot    then:
101*1537cf73SEmmanuel Vadot      properties:
102*1537cf73SEmmanuel Vadot        clocks:
103*1537cf73SEmmanuel Vadot          items:
104*1537cf73SEmmanuel Vadot            - description: External reference clock (25 MHz)
105*1537cf73SEmmanuel Vadot            - description: CMU_CORE main clock (from CMU_CMU)
106*1537cf73SEmmanuel Vadot            - description: CMU_CORE DLP clock (from CMU_CMU)
107*1537cf73SEmmanuel Vadot
108*1537cf73SEmmanuel Vadot        clock-names:
109*1537cf73SEmmanuel Vadot          items:
110*1537cf73SEmmanuel Vadot            - const: fin_pll
111*1537cf73SEmmanuel Vadot            - const: main
112*1537cf73SEmmanuel Vadot            - const: dlp
113*1537cf73SEmmanuel Vadot
114*1537cf73SEmmanuel Vadot  - if:
115*1537cf73SEmmanuel Vadot      properties:
116*1537cf73SEmmanuel Vadot        compatible:
117*1537cf73SEmmanuel Vadot          const: axis,artpec8-cmu-cpucl
118*1537cf73SEmmanuel Vadot
119*1537cf73SEmmanuel Vadot    then:
120*1537cf73SEmmanuel Vadot      properties:
121*1537cf73SEmmanuel Vadot        clocks:
122*1537cf73SEmmanuel Vadot          items:
123*1537cf73SEmmanuel Vadot            - description: External reference clock (25 MHz)
124*1537cf73SEmmanuel Vadot            - description: CMU_CPUCL switch clock (from CMU_CMU)
125*1537cf73SEmmanuel Vadot
126*1537cf73SEmmanuel Vadot        clock-names:
127*1537cf73SEmmanuel Vadot          items:
128*1537cf73SEmmanuel Vadot            - const: fin_pll
129*1537cf73SEmmanuel Vadot            - const: switch
130*1537cf73SEmmanuel Vadot
131*1537cf73SEmmanuel Vadot  - if:
132*1537cf73SEmmanuel Vadot      properties:
133*1537cf73SEmmanuel Vadot        compatible:
134*1537cf73SEmmanuel Vadot          const: axis,artpec8-cmu-fsys
135*1537cf73SEmmanuel Vadot
136*1537cf73SEmmanuel Vadot    then:
137*1537cf73SEmmanuel Vadot      properties:
138*1537cf73SEmmanuel Vadot        clocks:
139*1537cf73SEmmanuel Vadot          items:
140*1537cf73SEmmanuel Vadot            - description: External reference clock (25 MHz)
141*1537cf73SEmmanuel Vadot            - description: CMU_FSYS SCAN0 clock (from CMU_CMU)
142*1537cf73SEmmanuel Vadot            - description: CMU_FSYS SCAN1 clock (from CMU_CMU)
143*1537cf73SEmmanuel Vadot            - description: CMU_FSYS BUS clock (from CMU_CMU)
144*1537cf73SEmmanuel Vadot            - description: CMU_FSYS IP clock (from CMU_CMU)
145*1537cf73SEmmanuel Vadot
146*1537cf73SEmmanuel Vadot        clock-names:
147*1537cf73SEmmanuel Vadot          items:
148*1537cf73SEmmanuel Vadot            - const: fin_pll
149*1537cf73SEmmanuel Vadot            - const: scan0
150*1537cf73SEmmanuel Vadot            - const: scan1
151*1537cf73SEmmanuel Vadot            - const: bus
152*1537cf73SEmmanuel Vadot            - const: ip
153*1537cf73SEmmanuel Vadot
154*1537cf73SEmmanuel Vadot  - if:
155*1537cf73SEmmanuel Vadot      properties:
156*1537cf73SEmmanuel Vadot        compatible:
157*1537cf73SEmmanuel Vadot          const: axis,artpec8-cmu-imem
158*1537cf73SEmmanuel Vadot
159*1537cf73SEmmanuel Vadot    then:
160*1537cf73SEmmanuel Vadot      properties:
161*1537cf73SEmmanuel Vadot        clocks:
162*1537cf73SEmmanuel Vadot          items:
163*1537cf73SEmmanuel Vadot            - description: External reference clock (25 MHz)
164*1537cf73SEmmanuel Vadot            - description: CMU_IMEM ACLK clock (from CMU_CMU)
165*1537cf73SEmmanuel Vadot            - description: CMU_IMEM JPEG clock (from CMU_CMU)
166*1537cf73SEmmanuel Vadot
167*1537cf73SEmmanuel Vadot        clock-names:
168*1537cf73SEmmanuel Vadot          items:
169*1537cf73SEmmanuel Vadot            - const: fin_pll
170*1537cf73SEmmanuel Vadot            - const: aclk
171*1537cf73SEmmanuel Vadot            - const: jpeg
172*1537cf73SEmmanuel Vadot
173*1537cf73SEmmanuel Vadot  - if:
174*1537cf73SEmmanuel Vadot      properties:
175*1537cf73SEmmanuel Vadot        compatible:
176*1537cf73SEmmanuel Vadot          const: axis,artpec8-cmu-peri
177*1537cf73SEmmanuel Vadot
178*1537cf73SEmmanuel Vadot    then:
179*1537cf73SEmmanuel Vadot      properties:
180*1537cf73SEmmanuel Vadot        clocks:
181*1537cf73SEmmanuel Vadot          items:
182*1537cf73SEmmanuel Vadot            - description: External reference clock (25 MHz)
183*1537cf73SEmmanuel Vadot            - description: CMU_PERI IP clock (from CMU_CMU)
184*1537cf73SEmmanuel Vadot            - description: CMU_PERI AUDIO clock (from CMU_CMU)
185*1537cf73SEmmanuel Vadot            - description: CMU_PERI DISP clock (from CMU_CMU)
186*1537cf73SEmmanuel Vadot
187*1537cf73SEmmanuel Vadot        clock-names:
188*1537cf73SEmmanuel Vadot          items:
189*1537cf73SEmmanuel Vadot            - const: fin_pll
190*1537cf73SEmmanuel Vadot            - const: ip
191*1537cf73SEmmanuel Vadot            - const: audio
192*1537cf73SEmmanuel Vadot            - const: disp
193*1537cf73SEmmanuel Vadot
194*1537cf73SEmmanuel VadotadditionalProperties: false
195*1537cf73SEmmanuel Vadot
196*1537cf73SEmmanuel Vadotexamples:
197*1537cf73SEmmanuel Vadot  # Clock controller node for CMU_FSYS
198*1537cf73SEmmanuel Vadot  - |
199*1537cf73SEmmanuel Vadot    #include <dt-bindings/clock/axis,artpec8-clk.h>
200*1537cf73SEmmanuel Vadot
201*1537cf73SEmmanuel Vadot    cmu_fsys: clock-controller@16c10000 {
202*1537cf73SEmmanuel Vadot        compatible = "axis,artpec8-cmu-fsys";
203*1537cf73SEmmanuel Vadot        reg = <0x16c10000 0x4000>;
204*1537cf73SEmmanuel Vadot        #clock-cells = <1>;
205*1537cf73SEmmanuel Vadot        clocks = <&fin_pll>,
206*1537cf73SEmmanuel Vadot                 <&cmu_cmu CLK_DOUT_CMU_FSYS_SCAN0>,
207*1537cf73SEmmanuel Vadot                 <&cmu_cmu CLK_DOUT_CMU_FSYS_SCAN1>,
208*1537cf73SEmmanuel Vadot                 <&cmu_cmu CLK_DOUT_CMU_FSYS_BUS>,
209*1537cf73SEmmanuel Vadot                 <&cmu_cmu CLK_DOUT_CMU_FSYS_IP>;
210*1537cf73SEmmanuel Vadot        clock-names = "fin_pll", "scan0", "scan1", "bus", "ip";
211*1537cf73SEmmanuel Vadot    };
212*1537cf73SEmmanuel Vadot
213*1537cf73SEmmanuel Vadot...
214