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