18c2ecf20Sopenharmony_ci* Rockchip RV1108 Clock and Reset Unit 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThe RV1108 clock controller generates and supplies clock to various 48c2ecf20Sopenharmony_cicontrollers within the SoC and also implements a reset controller for SoC 58c2ecf20Sopenharmony_ciperipherals. 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ciRequired Properties: 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci- compatible: should be "rockchip,rv1108-cru" 108c2ecf20Sopenharmony_ci- reg: physical base address of the controller and length of memory mapped 118c2ecf20Sopenharmony_ci region. 128c2ecf20Sopenharmony_ci- #clock-cells: should be 1. 138c2ecf20Sopenharmony_ci- #reset-cells: should be 1. 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ciOptional Properties: 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci- rockchip,grf: phandle to the syscon managing the "general register files" 188c2ecf20Sopenharmony_ci If missing pll rates are not changeable, due to the missing pll lock status. 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ciEach clock is assigned an identifier and client nodes can use this identifier 218c2ecf20Sopenharmony_cito specify the clock which they consume. All available clocks are defined as 228c2ecf20Sopenharmony_cipreprocessor macros in the dt-bindings/clock/rv1108-cru.h headers and can be 238c2ecf20Sopenharmony_ciused in device tree sources. Similar macros exist for the reset sources in 248c2ecf20Sopenharmony_cithese files. 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ciExternal clocks: 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ciThere are several clocks that are generated outside the SoC. It is expected 298c2ecf20Sopenharmony_cithat they are defined using standard clock bindings with following 308c2ecf20Sopenharmony_ciclock-output-names: 318c2ecf20Sopenharmony_ci - "xin24m" - crystal input - required, 328c2ecf20Sopenharmony_ci - "ext_vip" - external VIP clock - optional 338c2ecf20Sopenharmony_ci - "ext_i2s" - external I2S clock - optional 348c2ecf20Sopenharmony_ci - "ext_gmac" - external GMAC clock - optional 358c2ecf20Sopenharmony_ci - "hdmiphy" - external clock input derived from HDMI PHY - optional 368c2ecf20Sopenharmony_ci - "usbphy" - external clock input derived from USB PHY - optional 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ciExample: Clock controller node: 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci cru: cru@20200000 { 418c2ecf20Sopenharmony_ci compatible = "rockchip,rv1108-cru"; 428c2ecf20Sopenharmony_ci reg = <0x20200000 0x1000>; 438c2ecf20Sopenharmony_ci rockchip,grf = <&grf>; 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci #clock-cells = <1>; 468c2ecf20Sopenharmony_ci #reset-cells = <1>; 478c2ecf20Sopenharmony_ci }; 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ciExample: UART controller node that consumes the clock generated by the clock 508c2ecf20Sopenharmony_ci controller: 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ci uart0: serial@10230000 { 538c2ecf20Sopenharmony_ci compatible = "rockchip,rv1108-uart", "snps,dw-apb-uart"; 548c2ecf20Sopenharmony_ci reg = <0x10230000 0x100>; 558c2ecf20Sopenharmony_ci interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>; 568c2ecf20Sopenharmony_ci reg-shift = <2>; 578c2ecf20Sopenharmony_ci reg-io-width = <4>; 588c2ecf20Sopenharmony_ci clocks = <&cru SCLK_UART0>; 598c2ecf20Sopenharmony_ci }; 60