qoriq-clock.txt 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. * Clock Block on Freescale CoreNet Platforms
  2. Freescale CoreNet chips take primary clocking input from the external
  3. SYSCLK signal. The SYSCLK input (frequency) is multiplied using
  4. multiple phase locked loops (PLL) to create a variety of frequencies
  5. which can then be passed to a variety of internal logic, including
  6. cores and peripheral IP blocks.
  7. Please refer to the Reference Manual for details.
  8. All references to "1.0" and "2.0" refer to the QorIQ chassis version to
  9. which the chip complies.
  10. Chassis Version Example Chips
  11. --------------- -------------
  12. 1.0 p4080, p5020, p5040
  13. 2.0 t4240, b4860, t1040
  14. 1. Clock Block Binding
  15. Required properties:
  16. - compatible: Should contain a specific clock block compatible string
  17. and a single chassis clock compatible string.
  18. Clock block strings include, but not limited to, one of the:
  19. * "fsl,p2041-clockgen"
  20. * "fsl,p3041-clockgen"
  21. * "fsl,p4080-clockgen"
  22. * "fsl,p5020-clockgen"
  23. * "fsl,p5040-clockgen"
  24. * "fsl,t4240-clockgen"
  25. * "fsl,b4420-clockgen"
  26. * "fsl,b4860-clockgen"
  27. Chassis clock strings include:
  28. * "fsl,qoriq-clockgen-1.0": for chassis 1.0 clocks
  29. * "fsl,qoriq-clockgen-2.0": for chassis 2.0 clocks
  30. - reg: Describes the address of the device's resources within the
  31. address space defined by its parent bus, and resource zero
  32. represents the clock register set
  33. - clock-frequency: Input system clock frequency
  34. Recommended properties:
  35. - ranges: Allows valid translation between child's address space and
  36. parent's. Must be present if the device has sub-nodes.
  37. - #address-cells: Specifies the number of cells used to represent
  38. physical base addresses. Must be present if the device has
  39. sub-nodes and set to 1 if present
  40. - #size-cells: Specifies the number of cells used to represent
  41. the size of an address. Must be present if the device has
  42. sub-nodes and set to 1 if present
  43. 2. Clock Provider/Consumer Binding
  44. Most of the bindings are from the common clock binding[1].
  45. [1] Documentation/devicetree/bindings/clock/clock-bindings.txt
  46. Required properties:
  47. - compatible : Should include one of the following:
  48. * "fsl,qoriq-core-pll-1.0" for core PLL clocks (v1.0)
  49. * "fsl,qoriq-core-pll-2.0" for core PLL clocks (v2.0)
  50. * "fsl,qoriq-core-mux-1.0" for core mux clocks (v1.0)
  51. * "fsl,qoriq-core-mux-2.0" for core mux clocks (v2.0)
  52. * "fsl,qoriq-sysclk-1.0": for input system clock (v1.0).
  53. It takes parent's clock-frequency as its clock.
  54. * "fsl,qoriq-sysclk-2.0": for input system clock (v2.0).
  55. It takes parent's clock-frequency as its clock.
  56. - #clock-cells: From common clock binding. The number of cells in a
  57. clock-specifier. Should be <0> for "fsl,qoriq-sysclk-[1,2].0"
  58. clocks, or <1> for "fsl,qoriq-core-pll-[1,2].0" clocks.
  59. For "fsl,qoriq-core-pll-[1,2].0" clocks, the single
  60. clock-specifier cell may take the following values:
  61. * 0 - equal to the PLL frequency
  62. * 1 - equal to the PLL frequency divided by 2
  63. * 2 - equal to the PLL frequency divided by 4
  64. Recommended properties:
  65. - clocks: Should be the phandle of input parent clock
  66. - clock-names: From common clock binding, indicates the clock name
  67. - clock-output-names: From common clock binding, indicates the names of
  68. output clocks
  69. - reg: Should be the offset and length of clock block base address.
  70. The length should be 4.
  71. Example for clock block and clock provider:
  72. / {
  73. clockgen: global-utilities@e1000 {
  74. compatible = "fsl,p5020-clockgen", "fsl,qoriq-clockgen-1.0";
  75. ranges = <0x0 0xe1000 0x1000>;
  76. clock-frequency = <133333333>;
  77. reg = <0xe1000 0x1000>;
  78. #address-cells = <1>;
  79. #size-cells = <1>;
  80. sysclk: sysclk {
  81. #clock-cells = <0>;
  82. compatible = "fsl,qoriq-sysclk-1.0";
  83. clock-output-names = "sysclk";
  84. };
  85. pll0: pll0@800 {
  86. #clock-cells = <1>;
  87. reg = <0x800 0x4>;
  88. compatible = "fsl,qoriq-core-pll-1.0";
  89. clocks = <&sysclk>;
  90. clock-output-names = "pll0", "pll0-div2";
  91. };
  92. pll1: pll1@820 {
  93. #clock-cells = <1>;
  94. reg = <0x820 0x4>;
  95. compatible = "fsl,qoriq-core-pll-1.0";
  96. clocks = <&sysclk>;
  97. clock-output-names = "pll1", "pll1-div2";
  98. };
  99. mux0: mux0@0 {
  100. #clock-cells = <0>;
  101. reg = <0x0 0x4>;
  102. compatible = "fsl,qoriq-core-mux-1.0";
  103. clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>;
  104. clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2";
  105. clock-output-names = "cmux0";
  106. };
  107. mux1: mux1@20 {
  108. #clock-cells = <0>;
  109. reg = <0x20 0x4>;
  110. compatible = "fsl,qoriq-core-mux-1.0";
  111. clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>;
  112. clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2";
  113. clock-output-names = "cmux1";
  114. };
  115. };
  116. }
  117. Example for clock consumer:
  118. / {
  119. cpu0: PowerPC,e5500@0 {
  120. ...
  121. clocks = <&mux0>;
  122. ...
  123. };
  124. }