rockchip,rk3399-cru.txt 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. * Rockchip RK3399 Clock and Reset Unit
  2. The RK3399 clock controller generates and supplies clock to various
  3. controllers within the SoC and also implements a reset controller for SoC
  4. peripherals.
  5. Required Properties:
  6. - compatible: PMU for CRU should be "rockchip,rk3399-pmucru"
  7. - compatible: CRU should be "rockchip,rk3399-cru"
  8. - reg: physical base address of the controller and length of memory mapped
  9. region.
  10. - #clock-cells: should be 1.
  11. - #reset-cells: should be 1.
  12. Optional Properties:
  13. - rockchip,grf: phandle to the syscon managing the "general register files".
  14. It is used for GRF muxes, if missing any muxes present in the GRF will not
  15. be available.
  16. Each clock is assigned an identifier and client nodes can use this identifier
  17. to specify the clock which they consume. All available clocks are defined as
  18. preprocessor macros in the dt-bindings/clock/rk3399-cru.h headers and can be
  19. used in device tree sources. Similar macros exist for the reset sources in
  20. these files.
  21. External clocks:
  22. There are several clocks that are generated outside the SoC. It is expected
  23. that they are defined using standard clock bindings with following
  24. clock-output-names:
  25. - "xin24m" - crystal input - required,
  26. - "xin32k" - rtc clock - optional,
  27. - "clkin_gmac" - external GMAC clock - optional,
  28. - "clkin_i2s" - external I2S clock - optional,
  29. - "pclkin_cif" - external ISP clock - optional,
  30. - "clk_usbphy0_480m" - output clock of the pll in the usbphy0
  31. - "clk_usbphy1_480m" - output clock of the pll in the usbphy1
  32. Example: Clock controller node:
  33. pmucru: pmu-clock-controller@ff750000 {
  34. compatible = "rockchip,rk3399-pmucru";
  35. reg = <0x0 0xff750000 0x0 0x1000>;
  36. #clock-cells = <1>;
  37. #reset-cells = <1>;
  38. };
  39. cru: clock-controller@ff760000 {
  40. compatible = "rockchip,rk3399-cru";
  41. reg = <0x0 0xff760000 0x0 0x1000>;
  42. #clock-cells = <1>;
  43. #reset-cells = <1>;
  44. };
  45. Example: UART controller node that consumes the clock generated by the clock
  46. controller:
  47. uart0: serial@ff1a0000 {
  48. compatible = "rockchip,rk3399-uart", "snps,dw-apb-uart";
  49. reg = <0x0 0xff180000 0x0 0x100>;
  50. clocks = <&cru SCLK_UART0>, <&cru PCLK_UART0>;
  51. clock-names = "baudclk", "apb_pclk";
  52. interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
  53. reg-shift = <2>;
  54. reg-io-width = <4>;
  55. };