18c2ecf20Sopenharmony_ci* HiSilicon Clock and Reset Generator(CRG) 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThe CRG module provides clock and reset signals to various 48c2ecf20Sopenharmony_cimodules within the SoC. 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ciThis binding uses the following bindings: 78c2ecf20Sopenharmony_ci Documentation/devicetree/bindings/clock/clock-bindings.txt 88c2ecf20Sopenharmony_ci Documentation/devicetree/bindings/reset/reset.txt 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ciRequired Properties: 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci- compatible: should be one of the following. 138c2ecf20Sopenharmony_ci - "hisilicon,hi3516cv300-crg" 148c2ecf20Sopenharmony_ci - "hisilicon,hi3516cv300-sysctrl" 158c2ecf20Sopenharmony_ci - "hisilicon,hi3519-crg" 168c2ecf20Sopenharmony_ci - "hisilicon,hi3798cv200-crg" 178c2ecf20Sopenharmony_ci - "hisilicon,hi3798cv200-sysctrl" 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci- reg: physical base address of the controller and length of memory mapped 208c2ecf20Sopenharmony_ci region. 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci- #clock-cells: should be 1. 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ciEach clock is assigned an identifier and client nodes use this identifier 258c2ecf20Sopenharmony_cito specify the clock which they consume. 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ciAll these identifier could be found in <dt-bindings/clock/hi3519-clock.h>. 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci- #reset-cells: should be 2. 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ciA reset signal can be controlled by writing a bit register in the CRG module. 328c2ecf20Sopenharmony_ciThe reset specifier consists of two cells. The first cell represents the 338c2ecf20Sopenharmony_ciregister offset relative to the base address. The second cell represents the 348c2ecf20Sopenharmony_cibit index in the register. 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ciExample: CRG nodes 378c2ecf20Sopenharmony_ciCRG: clock-reset-controller@12010000 { 388c2ecf20Sopenharmony_ci compatible = "hisilicon,hi3519-crg"; 398c2ecf20Sopenharmony_ci reg = <0x12010000 0x10000>; 408c2ecf20Sopenharmony_ci #clock-cells = <1>; 418c2ecf20Sopenharmony_ci #reset-cells = <2>; 428c2ecf20Sopenharmony_ci}; 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ciExample: consumer nodes 458c2ecf20Sopenharmony_cii2c0: i2c@12110000 { 468c2ecf20Sopenharmony_ci compatible = "hisilicon,hi3519-i2c"; 478c2ecf20Sopenharmony_ci reg = <0x12110000 0x1000>; 488c2ecf20Sopenharmony_ci clocks = <&CRG HI3519_I2C0_RST>; 498c2ecf20Sopenharmony_ci resets = <&CRG 0xe4 0>; 508c2ecf20Sopenharmony_ci}; 51