xgene.txt 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. Device Tree Clock bindings for APM X-Gene
  2. This binding uses the common clock binding[1].
  3. [1] Documentation/devicetree/bindings/clock/clock-bindings.txt
  4. Required properties:
  5. - compatible : shall be one of the following:
  6. "apm,xgene-socpll-clock" - for a X-Gene SoC PLL clock
  7. "apm,xgene-pcppll-clock" - for a X-Gene PCP PLL clock
  8. "apm,xgene-pmd-clock" - for a X-Gene PMD clock
  9. "apm,xgene-device-clock" - for a X-Gene device clock
  10. "apm,xgene-socpll-v2-clock" - for a X-Gene SoC PLL v2 clock
  11. "apm,xgene-pcppll-v2-clock" - for a X-Gene PCP PLL v2 clock
  12. Required properties for SoC or PCP PLL clocks:
  13. - reg : shall be the physical PLL register address for the pll clock.
  14. - clocks : shall be the input parent clock phandle for the clock. This should
  15. be the reference clock.
  16. - #clock-cells : shall be set to 1.
  17. - clock-output-names : shall be the name of the PLL referenced by derive
  18. clock.
  19. Optional properties for PLL clocks:
  20. - clock-names : shall be the name of the PLL. If missing, use the device name.
  21. Required properties for PMD clocks:
  22. - reg : shall be the physical register address for the pmd clock.
  23. - clocks : shall be the input parent clock phandle for the clock.
  24. - #clock-cells : shall be set to 1.
  25. - clock-output-names : shall be the name of the clock referenced by derive
  26. clock.
  27. Optional properties for PLL clocks:
  28. - clock-names : shall be the name of the clock. If missing, use the device name.
  29. Required properties for device clocks:
  30. - reg : shall be a list of address and length pairs describing the CSR
  31. reset and/or the divider. Either may be omitted, but at least
  32. one must be present.
  33. - reg-names : shall be a string list describing the reg resource. This
  34. may include "csr-reg" and/or "div-reg". If this property
  35. is not present, the reg property is assumed to describe
  36. only "csr-reg".
  37. - clocks : shall be the input parent clock phandle for the clock.
  38. - #clock-cells : shall be set to 1.
  39. - clock-output-names : shall be the name of the device referenced.
  40. Optional properties for device clocks:
  41. - clock-names : shall be the name of the device clock. If missing, use the
  42. device name.
  43. - csr-offset : Offset to the CSR reset register from the reset address base.
  44. Default is 0.
  45. - csr-mask : CSR reset mask bit. Default is 0xF.
  46. - enable-offset : Offset to the enable register from the reset address base.
  47. Default is 0x8.
  48. - enable-mask : CSR enable mask bit. Default is 0xF.
  49. - divider-offset : Offset to the divider CSR register from the divider base.
  50. Default is 0x0.
  51. - divider-width : Width of the divider register. Default is 0.
  52. - divider-shift : Bit shift of the divider register. Default is 0.
  53. For example:
  54. pcppll: pcppll@17000100 {
  55. compatible = "apm,xgene-pcppll-clock";
  56. #clock-cells = <1>;
  57. clocks = <&refclk 0>;
  58. clock-names = "pcppll";
  59. reg = <0x0 0x17000100 0x0 0x1000>;
  60. clock-output-names = "pcppll";
  61. type = <0>;
  62. };
  63. pmd0clk: pmd0clk@7e200200 {
  64. compatible = "apm,xgene-pmd-clock";
  65. #clock-cells = <1>;
  66. clocks = <&pmdpll 0>;
  67. reg = <0x0 0x7e200200 0x0 0x10>;
  68. clock-output-names = "pmd0clk";
  69. };
  70. socpll: socpll@17000120 {
  71. compatible = "apm,xgene-socpll-clock";
  72. #clock-cells = <1>;
  73. clocks = <&refclk 0>;
  74. clock-names = "socpll";
  75. reg = <0x0 0x17000120 0x0 0x1000>;
  76. clock-output-names = "socpll";
  77. type = <1>;
  78. };
  79. qmlclk: qmlclk {
  80. compatible = "apm,xgene-device-clock";
  81. #clock-cells = <1>;
  82. clocks = <&socplldiv2 0>;
  83. clock-names = "qmlclk";
  84. reg = <0x0 0x1703C000 0x0 0x1000>;
  85. reg-name = "csr-reg";
  86. clock-output-names = "qmlclk";
  87. };
  88. ethclk: ethclk {
  89. compatible = "apm,xgene-device-clock";
  90. #clock-cells = <1>;
  91. clocks = <&socplldiv2 0>;
  92. clock-names = "ethclk";
  93. reg = <0x0 0x17000000 0x0 0x1000>;
  94. reg-names = "div-reg";
  95. divider-offset = <0x238>;
  96. divider-width = <0x9>;
  97. divider-shift = <0x0>;
  98. clock-output-names = "ethclk";
  99. };
  100. apbclk: apbclk {
  101. compatible = "apm,xgene-device-clock";
  102. #clock-cells = <1>;
  103. clocks = <&ahbclk 0>;
  104. clock-names = "apbclk";
  105. reg = <0x0 0x1F2AC000 0x0 0x1000
  106. 0x0 0x1F2AC000 0x0 0x1000>;
  107. reg-names = "csr-reg", "div-reg";
  108. csr-offset = <0x0>;
  109. csr-mask = <0x200>;
  110. enable-offset = <0x8>;
  111. enable-mask = <0x200>;
  112. divider-offset = <0x10>;
  113. divider-width = <0x2>;
  114. divider-shift = <0x0>;
  115. flags = <0x8>;
  116. clock-output-names = "apbclk";
  117. };