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