1*4882a593SmuzhiyunDevice Tree Clock bindings for APM X-Gene 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunThis binding uses the common clock binding[1]. 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun[1] Documentation/devicetree/bindings/clock/clock-bindings.txt 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunRequired properties: 8*4882a593Smuzhiyun- compatible : shall be one of the following: 9*4882a593Smuzhiyun "apm,xgene-socpll-clock" - for a X-Gene SoC PLL clock 10*4882a593Smuzhiyun "apm,xgene-pcppll-clock" - for a X-Gene PCP PLL clock 11*4882a593Smuzhiyun "apm,xgene-pmd-clock" - for a X-Gene PMD clock 12*4882a593Smuzhiyun "apm,xgene-device-clock" - for a X-Gene device clock 13*4882a593Smuzhiyun "apm,xgene-socpll-v2-clock" - for a X-Gene SoC PLL v2 clock 14*4882a593Smuzhiyun "apm,xgene-pcppll-v2-clock" - for a X-Gene PCP PLL v2 clock 15*4882a593Smuzhiyun 16*4882a593SmuzhiyunRequired properties for SoC or PCP PLL clocks: 17*4882a593Smuzhiyun- reg : shall be the physical PLL register address for the pll clock. 18*4882a593Smuzhiyun- clocks : shall be the input parent clock phandle for the clock. This should 19*4882a593Smuzhiyun be the reference clock. 20*4882a593Smuzhiyun- #clock-cells : shall be set to 1. 21*4882a593Smuzhiyun- clock-output-names : shall be the name of the PLL referenced by derive 22*4882a593Smuzhiyun clock. 23*4882a593SmuzhiyunOptional properties for PLL clocks: 24*4882a593Smuzhiyun- clock-names : shall be the name of the PLL. If missing, use the device name. 25*4882a593Smuzhiyun 26*4882a593SmuzhiyunRequired properties for PMD clocks: 27*4882a593Smuzhiyun- reg : shall be the physical register address for the pmd clock. 28*4882a593Smuzhiyun- clocks : shall be the input parent clock phandle for the clock. 29*4882a593Smuzhiyun- #clock-cells : shall be set to 1. 30*4882a593Smuzhiyun- clock-output-names : shall be the name of the clock referenced by derive 31*4882a593Smuzhiyun clock. 32*4882a593SmuzhiyunOptional properties for PLL clocks: 33*4882a593Smuzhiyun- clock-names : shall be the name of the clock. If missing, use the device name. 34*4882a593Smuzhiyun 35*4882a593SmuzhiyunRequired properties for device clocks: 36*4882a593Smuzhiyun- reg : shall be a list of address and length pairs describing the CSR 37*4882a593Smuzhiyun reset and/or the divider. Either may be omitted, but at least 38*4882a593Smuzhiyun one must be present. 39*4882a593Smuzhiyun - reg-names : shall be a string list describing the reg resource. This 40*4882a593Smuzhiyun may include "csr-reg" and/or "div-reg". If this property 41*4882a593Smuzhiyun is not present, the reg property is assumed to describe 42*4882a593Smuzhiyun only "csr-reg". 43*4882a593Smuzhiyun- clocks : shall be the input parent clock phandle for the clock. 44*4882a593Smuzhiyun- #clock-cells : shall be set to 1. 45*4882a593Smuzhiyun- clock-output-names : shall be the name of the device referenced. 46*4882a593SmuzhiyunOptional properties for device clocks: 47*4882a593Smuzhiyun- clock-names : shall be the name of the device clock. If missing, use the 48*4882a593Smuzhiyun device name. 49*4882a593Smuzhiyun- csr-offset : Offset to the CSR reset register from the reset address base. 50*4882a593Smuzhiyun Default is 0. 51*4882a593Smuzhiyun- csr-mask : CSR reset mask bit. Default is 0xF. 52*4882a593Smuzhiyun- enable-offset : Offset to the enable register from the reset address base. 53*4882a593Smuzhiyun Default is 0x8. 54*4882a593Smuzhiyun- enable-mask : CSR enable mask bit. Default is 0xF. 55*4882a593Smuzhiyun- divider-offset : Offset to the divider CSR register from the divider base. 56*4882a593Smuzhiyun Default is 0x0. 57*4882a593Smuzhiyun- divider-width : Width of the divider register. Default is 0. 58*4882a593Smuzhiyun- divider-shift : Bit shift of the divider register. Default is 0. 59*4882a593Smuzhiyun 60*4882a593SmuzhiyunFor example: 61*4882a593Smuzhiyun 62*4882a593Smuzhiyun pcppll: pcppll@17000100 { 63*4882a593Smuzhiyun compatible = "apm,xgene-pcppll-clock"; 64*4882a593Smuzhiyun #clock-cells = <1>; 65*4882a593Smuzhiyun clocks = <&refclk 0>; 66*4882a593Smuzhiyun clock-names = "pcppll"; 67*4882a593Smuzhiyun reg = <0x0 0x17000100 0x0 0x1000>; 68*4882a593Smuzhiyun clock-output-names = "pcppll"; 69*4882a593Smuzhiyun type = <0>; 70*4882a593Smuzhiyun }; 71*4882a593Smuzhiyun 72*4882a593Smuzhiyun pmd0clk: pmd0clk@7e200200 { 73*4882a593Smuzhiyun compatible = "apm,xgene-pmd-clock"; 74*4882a593Smuzhiyun #clock-cells = <1>; 75*4882a593Smuzhiyun clocks = <&pmdpll 0>; 76*4882a593Smuzhiyun reg = <0x0 0x7e200200 0x0 0x10>; 77*4882a593Smuzhiyun clock-output-names = "pmd0clk"; 78*4882a593Smuzhiyun }; 79*4882a593Smuzhiyun 80*4882a593Smuzhiyun socpll: socpll@17000120 { 81*4882a593Smuzhiyun compatible = "apm,xgene-socpll-clock"; 82*4882a593Smuzhiyun #clock-cells = <1>; 83*4882a593Smuzhiyun clocks = <&refclk 0>; 84*4882a593Smuzhiyun clock-names = "socpll"; 85*4882a593Smuzhiyun reg = <0x0 0x17000120 0x0 0x1000>; 86*4882a593Smuzhiyun clock-output-names = "socpll"; 87*4882a593Smuzhiyun type = <1>; 88*4882a593Smuzhiyun }; 89*4882a593Smuzhiyun 90*4882a593Smuzhiyun qmlclk: qmlclk { 91*4882a593Smuzhiyun compatible = "apm,xgene-device-clock"; 92*4882a593Smuzhiyun #clock-cells = <1>; 93*4882a593Smuzhiyun clocks = <&socplldiv2 0>; 94*4882a593Smuzhiyun clock-names = "qmlclk"; 95*4882a593Smuzhiyun reg = <0x0 0x1703C000 0x0 0x1000>; 96*4882a593Smuzhiyun reg-name = "csr-reg"; 97*4882a593Smuzhiyun clock-output-names = "qmlclk"; 98*4882a593Smuzhiyun }; 99*4882a593Smuzhiyun 100*4882a593Smuzhiyun ethclk: ethclk { 101*4882a593Smuzhiyun compatible = "apm,xgene-device-clock"; 102*4882a593Smuzhiyun #clock-cells = <1>; 103*4882a593Smuzhiyun clocks = <&socplldiv2 0>; 104*4882a593Smuzhiyun clock-names = "ethclk"; 105*4882a593Smuzhiyun reg = <0x0 0x17000000 0x0 0x1000>; 106*4882a593Smuzhiyun reg-names = "div-reg"; 107*4882a593Smuzhiyun divider-offset = <0x238>; 108*4882a593Smuzhiyun divider-width = <0x9>; 109*4882a593Smuzhiyun divider-shift = <0x0>; 110*4882a593Smuzhiyun clock-output-names = "ethclk"; 111*4882a593Smuzhiyun }; 112*4882a593Smuzhiyun 113*4882a593Smuzhiyun apbclk: apbclk { 114*4882a593Smuzhiyun compatible = "apm,xgene-device-clock"; 115*4882a593Smuzhiyun #clock-cells = <1>; 116*4882a593Smuzhiyun clocks = <&ahbclk 0>; 117*4882a593Smuzhiyun clock-names = "apbclk"; 118*4882a593Smuzhiyun reg = <0x0 0x1F2AC000 0x0 0x1000 119*4882a593Smuzhiyun 0x0 0x1F2AC000 0x0 0x1000>; 120*4882a593Smuzhiyun reg-names = "csr-reg", "div-reg"; 121*4882a593Smuzhiyun csr-offset = <0x0>; 122*4882a593Smuzhiyun csr-mask = <0x200>; 123*4882a593Smuzhiyun enable-offset = <0x8>; 124*4882a593Smuzhiyun enable-mask = <0x200>; 125*4882a593Smuzhiyun divider-offset = <0x10>; 126*4882a593Smuzhiyun divider-width = <0x2>; 127*4882a593Smuzhiyun divider-shift = <0x0>; 128*4882a593Smuzhiyun flags = <0x8>; 129*4882a593Smuzhiyun clock-output-names = "apbclk"; 130*4882a593Smuzhiyun }; 131*4882a593Smuzhiyun 132