xref: /linux/Documentation/devicetree/bindings/clock/fsl,qoriq-clock.yaml (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
1*0d796569SFrank Li# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*0d796569SFrank Li%YAML 1.2
3*0d796569SFrank Li---
4*0d796569SFrank Li$id: http://devicetree.org/schemas/clock/fsl,qoriq-clock.yaml#
5*0d796569SFrank Li$schema: http://devicetree.org/meta-schemas/core.yaml#
6*0d796569SFrank Li
7*0d796569SFrank Lititle: Clock Block on Freescale QorIQ Platforms
8*0d796569SFrank Li
9*0d796569SFrank Limaintainers:
10*0d796569SFrank Li  - Frank Li <Frank.Li@nxp.com>
11*0d796569SFrank Li
12*0d796569SFrank Lidescription: |
13*0d796569SFrank Li  Freescale QorIQ chips take primary clocking input from the external
14*0d796569SFrank Li  SYSCLK signal. The SYSCLK input (frequency) is multiplied using
15*0d796569SFrank Li  multiple phase locked loops (PLL) to create a variety of frequencies
16*0d796569SFrank Li  which can then be passed to a variety of internal logic, including
17*0d796569SFrank Li  cores and peripheral IP blocks.
18*0d796569SFrank Li  Please refer to the Reference Manual for details.
19*0d796569SFrank Li
20*0d796569SFrank Li  All references to "1.0" and "2.0" refer to the QorIQ chassis version to
21*0d796569SFrank Li  which the chip complies.
22*0d796569SFrank Li
23*0d796569SFrank Li  Chassis Version    Example Chips
24*0d796569SFrank Li  ---------------    -------------
25*0d796569SFrank Li       1.0          p4080, p5020, p5040
26*0d796569SFrank Li       2.0          t4240
27*0d796569SFrank Li
28*0d796569SFrank Li  Clock Provider
29*0d796569SFrank Li
30*0d796569SFrank Li  The clockgen node should act as a clock provider, though in older device
31*0d796569SFrank Li  trees the children of the clockgen node are the clock providers.
32*0d796569SFrank Li
33*0d796569SFrank Liproperties:
34*0d796569SFrank Li  compatible:
35*0d796569SFrank Li    oneOf:
36*0d796569SFrank Li      - items:
37*0d796569SFrank Li          - enum:
38*0d796569SFrank Li              - fsl,p2041-clockgen
39*0d796569SFrank Li              - fsl,p3041-clockgen
40*0d796569SFrank Li              - fsl,p4080-clockgen
41*0d796569SFrank Li              - fsl,p5020-clockgen
42*0d796569SFrank Li              - fsl,p5040-clockgen
43*0d796569SFrank Li          - const: fsl,qoriq-clockgen-1.0
44*0d796569SFrank Li      - items:
45*0d796569SFrank Li          - enum:
46*0d796569SFrank Li              - fsl,t1023-clockgen
47*0d796569SFrank Li              - fsl,t1024-clockgen
48*0d796569SFrank Li              - fsl,t1040-clockgen
49*0d796569SFrank Li              - fsl,t1042-clockgen
50*0d796569SFrank Li              - fsl,t2080-clockgen
51*0d796569SFrank Li              - fsl,t2081-clockgen
52*0d796569SFrank Li              - fsl,t4240-clockgen
53*0d796569SFrank Li          - const: fsl,qoriq-clockgen-2.0
54*0d796569SFrank Li      - items:
55*0d796569SFrank Li          - enum:
56*0d796569SFrank Li              - fsl,b4420-clockgen
57*0d796569SFrank Li              - fsl,b4860-clockgen
58*0d796569SFrank Li          - const: fsl,b4-clockgen
59*0d796569SFrank Li      - items:
60*0d796569SFrank Li          - enum:
61*0d796569SFrank Li              - fsl,ls1012a-clockgen
62*0d796569SFrank Li              - fsl,ls1021a-clockgen
63*0d796569SFrank Li              - fsl,ls1028a-clockgen
64*0d796569SFrank Li              - fsl,ls1043a-clockgen
65*0d796569SFrank Li              - fsl,ls1046a-clockgen
66*0d796569SFrank Li              - fsl,ls1088a-clockgen
67*0d796569SFrank Li              - fsl,ls2080a-clockgen
68*0d796569SFrank Li              - fsl,lx2160a-clockgen
69*0d796569SFrank Li
70*0d796569SFrank Li  reg:
71*0d796569SFrank Li    maxItems: 1
72*0d796569SFrank Li
73*0d796569SFrank Li  ranges: true
74*0d796569SFrank Li
75*0d796569SFrank Li  '#address-cells':
76*0d796569SFrank Li    const: 1
77*0d796569SFrank Li
78*0d796569SFrank Li  '#size-cells':
79*0d796569SFrank Li    const: 1
80*0d796569SFrank Li
81*0d796569SFrank Li  '#clock-cells':
82*0d796569SFrank Li    const: 2
83*0d796569SFrank Li    description: |
84*0d796569SFrank Li      The first cell of the clock specifier is the clock type, and the
85*0d796569SFrank Li      second cell is the clock index for the specified type.
86*0d796569SFrank Li
87*0d796569SFrank Li        Type#  Name       Index Cell
88*0d796569SFrank Li        0  sysclk          must be 0
89*0d796569SFrank Li        1  cmux            index (n in CLKCnCSR)
90*0d796569SFrank Li        2  hwaccel         index (n in CLKCGnHWACSR)
91*0d796569SFrank Li        3  fman            0 for fm1, 1 for fm2
92*0d796569SFrank Li        4  platform pll    n=pll/(n+1). For example, when n=1,
93*0d796569SFrank Li                          that means output_freq=PLL_freq/2.
94*0d796569SFrank Li        5  coreclk         must be 0
95*0d796569SFrank Li
96*0d796569SFrank Li  clock-frequency:
97*0d796569SFrank Li    description: Input system clock frequency (SYSCLK)
98*0d796569SFrank Li
99*0d796569SFrank Li  clocks:
100*0d796569SFrank Li    items:
101*0d796569SFrank Li      - description:
102*0d796569SFrank Li          sysclk may be provided as an input clock.  Either clock-frequency
103*0d796569SFrank Li          or clocks must be provided.
104*0d796569SFrank Li      - description:
105*0d796569SFrank Li          A second input clock, called "coreclk", may be provided if
106*0d796569SFrank Li          core PLLs are based on a different input clock from the
107*0d796569SFrank Li          platform PLL.
108*0d796569SFrank Li    minItems: 1
109*0d796569SFrank Li
110*0d796569SFrank Li  clock-names:
111*0d796569SFrank Li    items:
112*0d796569SFrank Li      - const: sysclk
113*0d796569SFrank Li      - const: coreclk
114*0d796569SFrank Li
115*0d796569SFrank LipatternProperties:
116*0d796569SFrank Li  '^mux[0-9]@[a-f0-9]+$':
117*0d796569SFrank Li    deprecated: true
118*0d796569SFrank Li    $ref: fsl,qoriq-clock-legacy.yaml
119*0d796569SFrank Li
120*0d796569SFrank Li  '^sysclk(-[a-z0-9]+)?$':
121*0d796569SFrank Li    deprecated: true
122*0d796569SFrank Li    $ref: fsl,qoriq-clock-legacy.yaml
123*0d796569SFrank Li
124*0d796569SFrank Li  '^pll[0-9]@[a-f0-9]+$':
125*0d796569SFrank Li    deprecated: true
126*0d796569SFrank Li    $ref: fsl,qoriq-clock-legacy.yaml
127*0d796569SFrank Li
128*0d796569SFrank Li  '^platform\-pll@[a-f0-9]+$':
129*0d796569SFrank Li    deprecated: true
130*0d796569SFrank Li    $ref: fsl,qoriq-clock-legacy.yaml
131*0d796569SFrank Li
132*0d796569SFrank Lirequired:
133*0d796569SFrank Li  - compatible
134*0d796569SFrank Li  - reg
135*0d796569SFrank Li  - '#clock-cells'
136*0d796569SFrank Li
137*0d796569SFrank LiadditionalProperties: false
138*0d796569SFrank Li
139*0d796569SFrank Liexamples:
140*0d796569SFrank Li  - |
141*0d796569SFrank Li    /* clock provider example */
142*0d796569SFrank Li    global-utilities@e1000 {
143*0d796569SFrank Li        compatible = "fsl,p5020-clockgen", "fsl,qoriq-clockgen-1.0";
144*0d796569SFrank Li        reg = <0xe1000 0x1000>;
145*0d796569SFrank Li        clock-frequency = <133333333>;
146*0d796569SFrank Li        #clock-cells = <2>;
147*0d796569SFrank Li    };
148*0d796569SFrank Li
149*0d796569SFrank Li  - |
150*0d796569SFrank Li    /* Legacy example */
151*0d796569SFrank Li    global-utilities@e1000 {
152*0d796569SFrank Li        compatible = "fsl,p5020-clockgen", "fsl,qoriq-clockgen-1.0";
153*0d796569SFrank Li        reg = <0xe1000 0x1000>;
154*0d796569SFrank Li        ranges = <0x0 0xe1000 0x1000>;
155*0d796569SFrank Li        clock-frequency = <133333333>;
156*0d796569SFrank Li        #address-cells = <1>;
157*0d796569SFrank Li        #size-cells = <1>;
158*0d796569SFrank Li        #clock-cells = <2>;
159*0d796569SFrank Li
160*0d796569SFrank Li        sysclk: sysclk {
161*0d796569SFrank Li            compatible = "fsl,qoriq-sysclk-1.0";
162*0d796569SFrank Li            clock-output-names = "sysclk";
163*0d796569SFrank Li            #clock-cells = <0>;
164*0d796569SFrank Li        };
165*0d796569SFrank Li
166*0d796569SFrank Li        pll0: pll0@800 {
167*0d796569SFrank Li            compatible = "fsl,qoriq-core-pll-1.0";
168*0d796569SFrank Li            reg = <0x800 0x4>;
169*0d796569SFrank Li            #clock-cells = <1>;
170*0d796569SFrank Li            clocks = <&sysclk>;
171*0d796569SFrank Li            clock-output-names = "pll0", "pll0-div2";
172*0d796569SFrank Li        };
173*0d796569SFrank Li
174*0d796569SFrank Li        pll1: pll1@820 {
175*0d796569SFrank Li            compatible = "fsl,qoriq-core-pll-1.0";
176*0d796569SFrank Li            reg = <0x820 0x4>;
177*0d796569SFrank Li            #clock-cells = <1>;
178*0d796569SFrank Li            clocks = <&sysclk>;
179*0d796569SFrank Li            clock-output-names = "pll1", "pll1-div2";
180*0d796569SFrank Li        };
181*0d796569SFrank Li
182*0d796569SFrank Li        mux0: mux0@0 {
183*0d796569SFrank Li            compatible = "fsl,qoriq-core-mux-1.0";
184*0d796569SFrank Li            reg = <0x0 0x4>;
185*0d796569SFrank Li            #clock-cells = <0>;
186*0d796569SFrank Li            clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>;
187*0d796569SFrank Li            clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2";
188*0d796569SFrank Li            clock-output-names = "cmux0";
189*0d796569SFrank Li        };
190*0d796569SFrank Li
191*0d796569SFrank Li        mux1: mux1@20 {
192*0d796569SFrank Li            compatible = "fsl,qoriq-core-mux-1.0";
193*0d796569SFrank Li            reg = <0x20 0x4>;
194*0d796569SFrank Li            #clock-cells = <0>;
195*0d796569SFrank Li            clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>;
196*0d796569SFrank Li            clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2";
197*0d796569SFrank Li            clock-output-names = "cmux1";
198*0d796569SFrank Li        };
199*0d796569SFrank Li
200*0d796569SFrank Li        platform-pll@c00 {
201*0d796569SFrank Li            #clock-cells = <1>;
202*0d796569SFrank Li            reg = <0xc00 0x4>;
203*0d796569SFrank Li            compatible = "fsl,qoriq-platform-pll-1.0";
204*0d796569SFrank Li            clocks = <&sysclk>;
205*0d796569SFrank Li            clock-output-names = "platform-pll", "platform-pll-div2";
206*0d796569SFrank Li        };
207*0d796569SFrank Li    };
208