xref: /openbmc/u-boot/doc/device-tree-bindings/clock/rockchip,rk3188-cru.txt (revision c9feb427aba860ebc79f9851a1bb49cc456a2d48)
1*344c8376SSimon Glass* Rockchip RK3188/RK3066 Clock and Reset Unit
2*344c8376SSimon Glass
3*344c8376SSimon GlassThe RK3188/RK3066 clock controller generates and supplies clock to various
4*344c8376SSimon Glasscontrollers within the SoC and also implements a reset controller for SoC
5*344c8376SSimon Glassperipherals.
6*344c8376SSimon Glass
7*344c8376SSimon GlassRequired Properties:
8*344c8376SSimon Glass
9*344c8376SSimon Glass- compatible: should be "rockchip,rk3188-cru", "rockchip,rk3188a-cru" or
10*344c8376SSimon Glass			"rockchip,rk3066a-cru"
11*344c8376SSimon Glass- reg: physical base address of the controller and length of memory mapped
12*344c8376SSimon Glass  region.
13*344c8376SSimon Glass- #clock-cells: should be 1.
14*344c8376SSimon Glass- #reset-cells: should be 1.
15*344c8376SSimon Glass
16*344c8376SSimon GlassOptional Properties:
17*344c8376SSimon Glass
18*344c8376SSimon Glass- rockchip,grf: phandle to the syscon managing the "general register files"
19*344c8376SSimon Glass  If missing pll rates are not changable, due to the missing pll lock status.
20*344c8376SSimon Glass
21*344c8376SSimon GlassEach clock is assigned an identifier and client nodes can use this identifier
22*344c8376SSimon Glassto specify the clock which they consume. All available clocks are defined as
23*344c8376SSimon Glasspreprocessor macros in the dt-bindings/clock/rk3188-cru.h and
24*344c8376SSimon Glassdt-bindings/clock/rk3066-cru.h headers and can be used in device tree sources.
25*344c8376SSimon GlassSimilar macros exist for the reset sources in these files.
26*344c8376SSimon Glass
27*344c8376SSimon GlassExternal clocks:
28*344c8376SSimon Glass
29*344c8376SSimon GlassThere are several clocks that are generated outside the SoC. It is expected
30*344c8376SSimon Glassthat they are defined using standard clock bindings with following
31*344c8376SSimon Glassclock-output-names:
32*344c8376SSimon Glass - "xin24m" - crystal input - required,
33*344c8376SSimon Glass - "xin32k" - rtc clock - optional,
34*344c8376SSimon Glass - "xin27m" - 27mhz crystal input on rk3066 - optional,
35*344c8376SSimon Glass - "ext_hsadc" - external HSADC clock - optional,
36*344c8376SSimon Glass - "ext_cif0" - external camera clock - optional,
37*344c8376SSimon Glass - "ext_rmii" - external RMII clock - optional,
38*344c8376SSimon Glass - "ext_jtag" - externalJTAG clock - optional
39*344c8376SSimon Glass
40*344c8376SSimon GlassExample: Clock controller node:
41*344c8376SSimon Glass
42*344c8376SSimon Glass	cru: cru@20000000 {
43*344c8376SSimon Glass		compatible = "rockchip,rk3188-cru";
44*344c8376SSimon Glass		reg = <0x20000000 0x1000>;
45*344c8376SSimon Glass		rockchip,grf = <&grf>;
46*344c8376SSimon Glass
47*344c8376SSimon Glass		#clock-cells = <1>;
48*344c8376SSimon Glass		#reset-cells = <1>;
49*344c8376SSimon Glass	};
50*344c8376SSimon Glass
51*344c8376SSimon GlassExample: UART controller node that consumes the clock generated by the clock
52*344c8376SSimon Glass  controller:
53*344c8376SSimon Glass
54*344c8376SSimon Glass	uart0: serial@10124000 {
55*344c8376SSimon Glass		compatible = "snps,dw-apb-uart";
56*344c8376SSimon Glass		reg = <0x10124000 0x400>;
57*344c8376SSimon Glass		interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
58*344c8376SSimon Glass		reg-shift = <2>;
59*344c8376SSimon Glass		reg-io-width = <1>;
60*344c8376SSimon Glass		clocks = <&cru SCLK_UART0>;
61*344c8376SSimon Glass	};
62