xgene.txt 3.6 KB

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