pistachio-clock.txt 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. Imagination Technologies Pistachio SoC clock controllers
  2. ========================================================
  3. Pistachio has four clock controllers (core clock, peripheral clock, peripheral
  4. general control, and top general control) which are instantiated individually
  5. from the device-tree.
  6. External clocks:
  7. ----------------
  8. There are three external inputs to the clock controllers which should be
  9. defined with the following clock-output-names:
  10. - "xtal": External 52Mhz oscillator (required)
  11. - "audio_clk_in": Alternate audio reference clock (optional)
  12. - "enet_clk_in": Alternate ethernet PHY clock (optional)
  13. Core clock controller:
  14. ----------------------
  15. The core clock controller generates clocks for the CPU, RPU (WiFi + BT
  16. co-processor), audio, and several peripherals.
  17. Required properties:
  18. - compatible: Must be "img,pistachio-clk".
  19. - reg: Must contain the base address and length of the core clock controller.
  20. - #clock-cells: Must be 1. The single cell is the clock identifier.
  21. See dt-bindings/clock/pistachio-clk.h for the list of valid identifiers.
  22. - clocks: Must contain an entry for each clock in clock-names.
  23. - clock-names: Must include "xtal" (see "External clocks") and
  24. "audio_clk_in_gate", "enet_clk_in_gate" which are generated by the
  25. top-level general control.
  26. Example:
  27. clk_core: clock-controller@18144000 {
  28. compatible = "img,pistachio-clk";
  29. reg = <0x18144000 0x800>;
  30. clocks = <&xtal>, <&cr_top EXT_CLK_AUDIO_IN>,
  31. <&cr_top EXT_CLK_ENET_IN>;
  32. clock-names = "xtal", "audio_clk_in_gate", "enet_clk_in_gate";
  33. #clock-cells = <1>;
  34. };
  35. Peripheral clock controller:
  36. ----------------------------
  37. The peripheral clock controller generates clocks for the DDR, ROM, and other
  38. peripherals. The peripheral system clock ("periph_sys") generated by the core
  39. clock controller is the input clock to the peripheral clock controller.
  40. Required properties:
  41. - compatible: Must be "img,pistachio-periph-clk".
  42. - reg: Must contain the base address and length of the peripheral clock
  43. controller.
  44. - #clock-cells: Must be 1. The single cell is the clock identifier.
  45. See dt-bindings/clock/pistachio-clk.h for the list of valid identifiers.
  46. - clocks: Must contain an entry for each clock in clock-names.
  47. - clock-names: Must include "periph_sys", the peripheral system clock generated
  48. by the core clock controller.
  49. Example:
  50. clk_periph: clock-controller@18144800 {
  51. compatible = "img,pistachio-clk-periph";
  52. reg = <0x18144800 0x800>;
  53. clocks = <&clk_core CLK_PERIPH_SYS>;
  54. clock-names = "periph_sys";
  55. #clock-cells = <1>;
  56. };
  57. Peripheral general control:
  58. ---------------------------
  59. The peripheral general control block generates system interface clocks and
  60. resets for various peripherals. It also contains miscellaneous peripheral
  61. control registers. The system clock ("sys") generated by the peripheral clock
  62. controller is the input clock to the system clock controller.
  63. Required properties:
  64. - compatible: Must include "img,pistachio-periph-cr" and "syscon".
  65. - reg: Must contain the base address and length of the peripheral general
  66. control registers.
  67. - #clock-cells: Must be 1. The single cell is the clock identifier.
  68. See dt-bindings/clock/pistachio-clk.h for the list of valid identifiers.
  69. - clocks: Must contain an entry for each clock in clock-names.
  70. - clock-names: Must include "sys", the system clock generated by the peripheral
  71. clock controller.
  72. Example:
  73. cr_periph: syscon@18144800 {
  74. compatible = "img,pistachio-cr-periph", "syscon";
  75. reg = <0x18148000 0x1000>;
  76. clocks = <&clock_periph PERIPH_CLK_PERIPH_SYS>;
  77. clock-names = "sys";
  78. #clock-cells = <1>;
  79. };
  80. Top-level general control:
  81. --------------------------
  82. The top-level general control block contains miscellaneous control registers and
  83. gates for the external clocks "audio_clk_in" and "enet_clk_in".
  84. Required properties:
  85. - compatible: Must include "img,pistachio-cr-top" and "syscon".
  86. - reg: Must contain the base address and length of the top-level
  87. control registers.
  88. - clocks: Must contain an entry for each clock in clock-names.
  89. - clock-names: Two optional clocks, "audio_clk_in" and "enet_clk_in" (see
  90. "External clocks").
  91. - #clock-cells: Must be 1. The single cell is the clock identifier.
  92. See dt-bindings/clock/pistachio-clk.h for the list of valid identifiers.
  93. Example:
  94. cr_top: syscon@18144800 {
  95. compatible = "img,pistachio-cr-top", "syscon";
  96. reg = <0x18149000 0x200>;
  97. clocks = <&audio_refclk>, <&ext_enet_in>;
  98. clock-names = "audio_clk_in", "enet_clk_in";
  99. #clock-cells = <1>;
  100. };