162306a36Sopenharmony_ci* Rockchip RK3328 Clock and Reset Unit 262306a36Sopenharmony_ci 362306a36Sopenharmony_ciThe RK3328 clock controller generates and supplies clock to various 462306a36Sopenharmony_cicontrollers within the SoC and also implements a reset controller for SoC 562306a36Sopenharmony_ciperipherals. 662306a36Sopenharmony_ci 762306a36Sopenharmony_ciRequired Properties: 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci- compatible: should be "rockchip,rk3328-cru" 1062306a36Sopenharmony_ci- reg: physical base address of the controller and length of memory mapped 1162306a36Sopenharmony_ci region. 1262306a36Sopenharmony_ci- #clock-cells: should be 1. 1362306a36Sopenharmony_ci- #reset-cells: should be 1. 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ciOptional Properties: 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci- rockchip,grf: phandle to the syscon managing the "general register files" 1862306a36Sopenharmony_ci If missing pll rates are not changeable, due to the missing pll lock status. 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ciEach clock is assigned an identifier and client nodes can use this identifier 2162306a36Sopenharmony_cito specify the clock which they consume. All available clocks are defined as 2262306a36Sopenharmony_cipreprocessor macros in the dt-bindings/clock/rk3328-cru.h headers and can be 2362306a36Sopenharmony_ciused in device tree sources. Similar macros exist for the reset sources in 2462306a36Sopenharmony_cithese files. 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ciExternal clocks: 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ciThere are several clocks that are generated outside the SoC. It is expected 2962306a36Sopenharmony_cithat they are defined using standard clock bindings with following 3062306a36Sopenharmony_ciclock-output-names: 3162306a36Sopenharmony_ci - "xin24m" - crystal input - required, 3262306a36Sopenharmony_ci - "clkin_i2s" - external I2S clock - optional, 3362306a36Sopenharmony_ci - "gmac_clkin" - external GMAC clock - optional 3462306a36Sopenharmony_ci - "phy_50m_out" - output clock of the pll in the mac phy 3562306a36Sopenharmony_ci - "hdmi_phy" - output clock of the hdmi phy pll - optional 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ciExample: Clock controller node: 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ci cru: clock-controller@ff440000 { 4062306a36Sopenharmony_ci compatible = "rockchip,rk3328-cru"; 4162306a36Sopenharmony_ci reg = <0x0 0xff440000 0x0 0x1000>; 4262306a36Sopenharmony_ci rockchip,grf = <&grf>; 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci #clock-cells = <1>; 4562306a36Sopenharmony_ci #reset-cells = <1>; 4662306a36Sopenharmony_ci }; 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ciExample: UART controller node that consumes the clock generated by the clock 4962306a36Sopenharmony_ci controller: 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci uart0: serial@ff120000 { 5262306a36Sopenharmony_ci compatible = "snps,dw-apb-uart"; 5362306a36Sopenharmony_ci reg = <0xff120000 0x100>; 5462306a36Sopenharmony_ci interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>; 5562306a36Sopenharmony_ci reg-shift = <2>; 5662306a36Sopenharmony_ci reg-io-width = <4>; 5762306a36Sopenharmony_ci clocks = <&cru SCLK_UART0>; 5862306a36Sopenharmony_ci }; 59