1*c66ec88fSEmmanuel Vadot* Clock bindings for Freescale i.MX7ULP 2*c66ec88fSEmmanuel Vadot 3*c66ec88fSEmmanuel Vadoti.MX7ULP Clock functions are under joint control of the System 4*c66ec88fSEmmanuel VadotClock Generation (SCG) modules, Peripheral Clock Control (PCC) 5*c66ec88fSEmmanuel Vadotmodules, and Core Mode Controller (CMC)1 blocks 6*c66ec88fSEmmanuel Vadot 7*c66ec88fSEmmanuel VadotThe clocking scheme provides clear separation between M4 domain 8*c66ec88fSEmmanuel Vadotand A7 domain. Except for a few clock sources shared between two 9*c66ec88fSEmmanuel Vadotdomains, such as the System Oscillator clock, the Slow IRC (SIRC), 10*c66ec88fSEmmanuel Vadotand and the Fast IRC clock (FIRCLK), clock sources and clock 11*c66ec88fSEmmanuel Vadotmanagement are separated and contained within each domain. 12*c66ec88fSEmmanuel Vadot 13*c66ec88fSEmmanuel VadotM4 clock management consists of SCG0, PCC0, PCC1, and CMC0 modules. 14*c66ec88fSEmmanuel VadotA7 clock management consists of SCG1, PCC2, PCC3, and CMC1 modules. 15*c66ec88fSEmmanuel Vadot 16*c66ec88fSEmmanuel VadotNote: this binding doc is only for A7 clock domain. 17*c66ec88fSEmmanuel Vadot 18*c66ec88fSEmmanuel VadotSystem Clock Generation (SCG) modules: 19*c66ec88fSEmmanuel Vadot--------------------------------------------------------------------- 20*c66ec88fSEmmanuel VadotThe System Clock Generation (SCG) is responsible for clock generation 21*c66ec88fSEmmanuel Vadotand distribution across this device. Functions performed by the SCG 22*c66ec88fSEmmanuel Vadotinclude: clock reference selection, generation of clock used to derive 23*c66ec88fSEmmanuel Vadotprocessor, system, peripheral bus and external memory interface clocks, 24*c66ec88fSEmmanuel Vadotsource selection for peripheral clocks and control of power saving 25*c66ec88fSEmmanuel Vadotclock gating mode. 26*c66ec88fSEmmanuel Vadot 27*c66ec88fSEmmanuel VadotRequired properties: 28*c66ec88fSEmmanuel Vadot 29*c66ec88fSEmmanuel Vadot- compatible: Should be "fsl,imx7ulp-scg1". 30*c66ec88fSEmmanuel Vadot- reg : Should contain registers location and length. 31*c66ec88fSEmmanuel Vadot- #clock-cells: Should be <1>. 32*c66ec88fSEmmanuel Vadot- clocks: Should contain the fixed input clocks. 33*c66ec88fSEmmanuel Vadot- clock-names: Should contain the following clock names: 34*c66ec88fSEmmanuel Vadot "rosc", "sosc", "sirc", "firc", "upll", "mpll". 35*c66ec88fSEmmanuel Vadot 36*c66ec88fSEmmanuel VadotPeripheral Clock Control (PCC) modules: 37*c66ec88fSEmmanuel Vadot--------------------------------------------------------------------- 38*c66ec88fSEmmanuel VadotThe Peripheral Clock Control (PCC) is responsible for clock selection, 39*c66ec88fSEmmanuel Vadotoptional division and clock gating mode for peripherals in their 40*c66ec88fSEmmanuel Vadotrespected power domain 41*c66ec88fSEmmanuel Vadot 42*c66ec88fSEmmanuel VadotRequired properties: 43*c66ec88fSEmmanuel Vadot- compatible: Should be one of: 44*c66ec88fSEmmanuel Vadot "fsl,imx7ulp-pcc2", 45*c66ec88fSEmmanuel Vadot "fsl,imx7ulp-pcc3". 46*c66ec88fSEmmanuel Vadot- reg : Should contain registers location and length. 47*c66ec88fSEmmanuel Vadot- #clock-cells: Should be <1>. 48*c66ec88fSEmmanuel Vadot- clocks: Should contain the fixed input clocks. 49*c66ec88fSEmmanuel Vadot- clock-names: Should contain the following clock names: 50*c66ec88fSEmmanuel Vadot "nic1_bus_clk", "nic1_clk", "ddr_clk", "apll_pfd2", 51*c66ec88fSEmmanuel Vadot "apll_pfd1", "apll_pfd0", "upll", "sosc_bus_clk", 52*c66ec88fSEmmanuel Vadot "mpll", "firc_bus_clk", "rosc", "spll_bus_clk"; 53*c66ec88fSEmmanuel Vadot 54*c66ec88fSEmmanuel VadotThe clock consumer should specify the desired clock by having the clock 55*c66ec88fSEmmanuel VadotID in its "clocks" phandle cell. 56*c66ec88fSEmmanuel VadotSee include/dt-bindings/clock/imx7ulp-clock.h 57*c66ec88fSEmmanuel Vadotfor the full list of i.MX7ULP clock IDs of each module. 58*c66ec88fSEmmanuel Vadot 59*c66ec88fSEmmanuel VadotExamples: 60*c66ec88fSEmmanuel Vadot 61*c66ec88fSEmmanuel Vadot#include <dt-bindings/clock/imx7ulp-clock.h> 62*c66ec88fSEmmanuel Vadot 63*c66ec88fSEmmanuel Vadotscg1: scg1@403e0000 { 64*c66ec88fSEmmanuel Vadot compatible = "fsl,imx7ulp-scg1; 65*c66ec88fSEmmanuel Vadot reg = <0x403e0000 0x10000>; 66*c66ec88fSEmmanuel Vadot clocks = <&rosc>, <&sosc>, <&sirc>, 67*c66ec88fSEmmanuel Vadot <&firc>, <&upll>, <&mpll>; 68*c66ec88fSEmmanuel Vadot clock-names = "rosc", "sosc", "sirc", 69*c66ec88fSEmmanuel Vadot "firc", "upll", "mpll"; 70*c66ec88fSEmmanuel Vadot #clock-cells = <1>; 71*c66ec88fSEmmanuel Vadot}; 72*c66ec88fSEmmanuel Vadot 73*c66ec88fSEmmanuel Vadotpcc2: pcc2@403f0000 { 74*c66ec88fSEmmanuel Vadot compatible = "fsl,imx7ulp-pcc2"; 75*c66ec88fSEmmanuel Vadot reg = <0x403f0000 0x10000>; 76*c66ec88fSEmmanuel Vadot #clock-cells = <1>; 77*c66ec88fSEmmanuel Vadot clocks = <&scg1 IMX7ULP_CLK_NIC1_BUS_DIV>, 78*c66ec88fSEmmanuel Vadot <&scg1 IMX7ULP_CLK_NIC1_DIV>, 79*c66ec88fSEmmanuel Vadot <&scg1 IMX7ULP_CLK_DDR_DIV>, 80*c66ec88fSEmmanuel Vadot <&scg1 IMX7ULP_CLK_APLL_PFD2>, 81*c66ec88fSEmmanuel Vadot <&scg1 IMX7ULP_CLK_APLL_PFD1>, 82*c66ec88fSEmmanuel Vadot <&scg1 IMX7ULP_CLK_APLL_PFD0>, 83*c66ec88fSEmmanuel Vadot <&scg1 IMX7ULP_CLK_UPLL>, 84*c66ec88fSEmmanuel Vadot <&scg1 IMX7ULP_CLK_SOSC_BUS_CLK>, 85*c66ec88fSEmmanuel Vadot <&scg1 IMX7ULP_CLK_FIRC_BUS_CLK>, 86*c66ec88fSEmmanuel Vadot <&scg1 IMX7ULP_CLK_ROSC>, 87*c66ec88fSEmmanuel Vadot <&scg1 IMX7ULP_CLK_SPLL_BUS_CLK>; 88*c66ec88fSEmmanuel Vadot clock-names = "nic1_bus_clk", "nic1_clk", "ddr_clk", 89*c66ec88fSEmmanuel Vadot "apll_pfd2", "apll_pfd1", "apll_pfd0", 90*c66ec88fSEmmanuel Vadot "upll", "sosc_bus_clk", "mpll", 91*c66ec88fSEmmanuel Vadot "firc_bus_clk", "rosc", "spll_bus_clk"; 92*c66ec88fSEmmanuel Vadot}; 93*c66ec88fSEmmanuel Vadot 94*c66ec88fSEmmanuel Vadotusdhc1: usdhc@40380000 { 95*c66ec88fSEmmanuel Vadot compatible = "fsl,imx7ulp-usdhc"; 96*c66ec88fSEmmanuel Vadot reg = <0x40380000 0x10000>; 97*c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>; 98*c66ec88fSEmmanuel Vadot clocks = <&scg1 IMX7ULP_CLK_NIC1_BUS_DIV>, 99*c66ec88fSEmmanuel Vadot <&scg1 IMX7ULP_CLK_NIC1_DIV>, 100*c66ec88fSEmmanuel Vadot <&pcc2 IMX7ULP_CLK_USDHC1>; 101*c66ec88fSEmmanuel Vadot clock-names ="ipg", "ahb", "per"; 102*c66ec88fSEmmanuel Vadot bus-width = <4>; 103*c66ec88fSEmmanuel Vadot}; 104