1*4882a593SmuzhiyunImagination Technologies Pistachio SoC clock controllers 2*4882a593Smuzhiyun======================================================== 3*4882a593Smuzhiyun 4*4882a593SmuzhiyunPistachio has four clock controllers (core clock, peripheral clock, peripheral 5*4882a593Smuzhiyungeneral control, and top general control) which are instantiated individually 6*4882a593Smuzhiyunfrom the device-tree. 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunExternal clocks: 9*4882a593Smuzhiyun---------------- 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunThere are three external inputs to the clock controllers which should be 12*4882a593Smuzhiyundefined with the following clock-output-names: 13*4882a593Smuzhiyun- "xtal": External 52Mhz oscillator (required) 14*4882a593Smuzhiyun- "audio_clk_in": Alternate audio reference clock (optional) 15*4882a593Smuzhiyun- "enet_clk_in": Alternate ethernet PHY clock (optional) 16*4882a593Smuzhiyun 17*4882a593SmuzhiyunCore clock controller: 18*4882a593Smuzhiyun---------------------- 19*4882a593Smuzhiyun 20*4882a593SmuzhiyunThe core clock controller generates clocks for the CPU, RPU (WiFi + BT 21*4882a593Smuzhiyunco-processor), audio, and several peripherals. 22*4882a593Smuzhiyun 23*4882a593SmuzhiyunRequired properties: 24*4882a593Smuzhiyun- compatible: Must be "img,pistachio-clk". 25*4882a593Smuzhiyun- reg: Must contain the base address and length of the core clock controller. 26*4882a593Smuzhiyun- #clock-cells: Must be 1. The single cell is the clock identifier. 27*4882a593Smuzhiyun See dt-bindings/clock/pistachio-clk.h for the list of valid identifiers. 28*4882a593Smuzhiyun- clocks: Must contain an entry for each clock in clock-names. 29*4882a593Smuzhiyun- clock-names: Must include "xtal" (see "External clocks") and 30*4882a593Smuzhiyun "audio_clk_in_gate", "enet_clk_in_gate" which are generated by the 31*4882a593Smuzhiyun top-level general control. 32*4882a593Smuzhiyun 33*4882a593SmuzhiyunExample: 34*4882a593Smuzhiyun clk_core: clock-controller@18144000 { 35*4882a593Smuzhiyun compatible = "img,pistachio-clk"; 36*4882a593Smuzhiyun reg = <0x18144000 0x800>; 37*4882a593Smuzhiyun clocks = <&xtal>, <&cr_top EXT_CLK_AUDIO_IN>, 38*4882a593Smuzhiyun <&cr_top EXT_CLK_ENET_IN>; 39*4882a593Smuzhiyun clock-names = "xtal", "audio_clk_in_gate", "enet_clk_in_gate"; 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun #clock-cells = <1>; 42*4882a593Smuzhiyun }; 43*4882a593Smuzhiyun 44*4882a593SmuzhiyunPeripheral clock controller: 45*4882a593Smuzhiyun---------------------------- 46*4882a593Smuzhiyun 47*4882a593SmuzhiyunThe peripheral clock controller generates clocks for the DDR, ROM, and other 48*4882a593Smuzhiyunperipherals. The peripheral system clock ("periph_sys") generated by the core 49*4882a593Smuzhiyunclock controller is the input clock to the peripheral clock controller. 50*4882a593Smuzhiyun 51*4882a593SmuzhiyunRequired properties: 52*4882a593Smuzhiyun- compatible: Must be "img,pistachio-periph-clk". 53*4882a593Smuzhiyun- reg: Must contain the base address and length of the peripheral clock 54*4882a593Smuzhiyun controller. 55*4882a593Smuzhiyun- #clock-cells: Must be 1. The single cell is the clock identifier. 56*4882a593Smuzhiyun See dt-bindings/clock/pistachio-clk.h for the list of valid identifiers. 57*4882a593Smuzhiyun- clocks: Must contain an entry for each clock in clock-names. 58*4882a593Smuzhiyun- clock-names: Must include "periph_sys", the peripheral system clock generated 59*4882a593Smuzhiyun by the core clock controller. 60*4882a593Smuzhiyun 61*4882a593SmuzhiyunExample: 62*4882a593Smuzhiyun clk_periph: clock-controller@18144800 { 63*4882a593Smuzhiyun compatible = "img,pistachio-clk-periph"; 64*4882a593Smuzhiyun reg = <0x18144800 0x800>; 65*4882a593Smuzhiyun clocks = <&clk_core CLK_PERIPH_SYS>; 66*4882a593Smuzhiyun clock-names = "periph_sys"; 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun #clock-cells = <1>; 69*4882a593Smuzhiyun }; 70*4882a593Smuzhiyun 71*4882a593SmuzhiyunPeripheral general control: 72*4882a593Smuzhiyun--------------------------- 73*4882a593Smuzhiyun 74*4882a593SmuzhiyunThe peripheral general control block generates system interface clocks and 75*4882a593Smuzhiyunresets for various peripherals. It also contains miscellaneous peripheral 76*4882a593Smuzhiyuncontrol registers. The system clock ("sys") generated by the peripheral clock 77*4882a593Smuzhiyuncontroller is the input clock to the system clock controller. 78*4882a593Smuzhiyun 79*4882a593SmuzhiyunRequired properties: 80*4882a593Smuzhiyun- compatible: Must include "img,pistachio-periph-cr" and "syscon". 81*4882a593Smuzhiyun- reg: Must contain the base address and length of the peripheral general 82*4882a593Smuzhiyun control registers. 83*4882a593Smuzhiyun- #clock-cells: Must be 1. The single cell is the clock identifier. 84*4882a593Smuzhiyun See dt-bindings/clock/pistachio-clk.h for the list of valid identifiers. 85*4882a593Smuzhiyun- clocks: Must contain an entry for each clock in clock-names. 86*4882a593Smuzhiyun- clock-names: Must include "sys", the system clock generated by the peripheral 87*4882a593Smuzhiyun clock controller. 88*4882a593Smuzhiyun 89*4882a593SmuzhiyunExample: 90*4882a593Smuzhiyun cr_periph: syscon@18144800 { 91*4882a593Smuzhiyun compatible = "img,pistachio-cr-periph", "syscon"; 92*4882a593Smuzhiyun reg = <0x18148000 0x1000>; 93*4882a593Smuzhiyun clocks = <&clock_periph PERIPH_CLK_PERIPH_SYS>; 94*4882a593Smuzhiyun clock-names = "sys"; 95*4882a593Smuzhiyun 96*4882a593Smuzhiyun #clock-cells = <1>; 97*4882a593Smuzhiyun }; 98*4882a593Smuzhiyun 99*4882a593SmuzhiyunTop-level general control: 100*4882a593Smuzhiyun-------------------------- 101*4882a593Smuzhiyun 102*4882a593SmuzhiyunThe top-level general control block contains miscellaneous control registers and 103*4882a593Smuzhiyungates for the external clocks "audio_clk_in" and "enet_clk_in". 104*4882a593Smuzhiyun 105*4882a593SmuzhiyunRequired properties: 106*4882a593Smuzhiyun- compatible: Must include "img,pistachio-cr-top" and "syscon". 107*4882a593Smuzhiyun- reg: Must contain the base address and length of the top-level 108*4882a593Smuzhiyun control registers. 109*4882a593Smuzhiyun- clocks: Must contain an entry for each clock in clock-names. 110*4882a593Smuzhiyun- clock-names: Two optional clocks, "audio_clk_in" and "enet_clk_in" (see 111*4882a593Smuzhiyun "External clocks"). 112*4882a593Smuzhiyun- #clock-cells: Must be 1. The single cell is the clock identifier. 113*4882a593Smuzhiyun See dt-bindings/clock/pistachio-clk.h for the list of valid identifiers. 114*4882a593Smuzhiyun 115*4882a593SmuzhiyunExample: 116*4882a593Smuzhiyun cr_top: syscon@18144800 { 117*4882a593Smuzhiyun compatible = "img,pistachio-cr-top", "syscon"; 118*4882a593Smuzhiyun reg = <0x18149000 0x200>; 119*4882a593Smuzhiyun clocks = <&audio_refclk>, <&ext_enet_in>; 120*4882a593Smuzhiyun clock-names = "audio_clk_in", "enet_clk_in"; 121*4882a593Smuzhiyun 122*4882a593Smuzhiyun #clock-cells = <1>; 123*4882a593Smuzhiyun }; 124