xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/arm/cci.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun=======================================================
2*4882a593SmuzhiyunARM CCI cache coherent interconnect binding description
3*4882a593Smuzhiyun=======================================================
4*4882a593Smuzhiyun
5*4882a593SmuzhiyunARM multi-cluster systems maintain intra-cluster coherency through a
6*4882a593Smuzhiyuncache coherent interconnect (CCI) that is capable of monitoring bus
7*4882a593Smuzhiyuntransactions and manage coherency, TLB invalidations and memory barriers.
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunIt allows snooping and distributed virtual memory message broadcast across
10*4882a593Smuzhiyunclusters, through memory mapped interface, with a global control register
11*4882a593Smuzhiyunspace and multiple sets of interface control registers, one per slave
12*4882a593Smuzhiyuninterface.
13*4882a593Smuzhiyun
14*4882a593Smuzhiyun* CCI interconnect node
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun	Description: Describes a CCI cache coherent Interconnect component
17*4882a593Smuzhiyun
18*4882a593Smuzhiyun	Node name must be "cci".
19*4882a593Smuzhiyun	Node's parent must be the root node /, and the address space visible
20*4882a593Smuzhiyun	through the CCI interconnect is the same as the one seen from the
21*4882a593Smuzhiyun	root node (ie from CPUs perspective as per DT standard).
22*4882a593Smuzhiyun	Every CCI node has to define the following properties:
23*4882a593Smuzhiyun
24*4882a593Smuzhiyun	- compatible
25*4882a593Smuzhiyun		Usage: required
26*4882a593Smuzhiyun		Value type: <string>
27*4882a593Smuzhiyun		Definition: must contain one of the following:
28*4882a593Smuzhiyun			    "arm,cci-400"
29*4882a593Smuzhiyun			    "arm,cci-500"
30*4882a593Smuzhiyun			    "arm,cci-550"
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun	- reg
33*4882a593Smuzhiyun		Usage: required
34*4882a593Smuzhiyun		Value type: Integer cells. A register entry, expressed as a pair
35*4882a593Smuzhiyun			    of cells, containing base and size.
36*4882a593Smuzhiyun		Definition: A standard property. Specifies base physical
37*4882a593Smuzhiyun			    address of CCI control registers common to all
38*4882a593Smuzhiyun			    interfaces.
39*4882a593Smuzhiyun
40*4882a593Smuzhiyun	- ranges:
41*4882a593Smuzhiyun		Usage: required
42*4882a593Smuzhiyun		Value type: Integer cells. An array of range entries, expressed
43*4882a593Smuzhiyun			    as a tuple of cells, containing child address,
44*4882a593Smuzhiyun			    parent address and the size of the region in the
45*4882a593Smuzhiyun			    child address space.
46*4882a593Smuzhiyun		Definition: A standard property. Follow rules in the Devicetree
47*4882a593Smuzhiyun			    Specification for hierarchical bus addressing. CCI
48*4882a593Smuzhiyun			    interfaces addresses refer to the parent node
49*4882a593Smuzhiyun			    addressing scheme to declare their register bases.
50*4882a593Smuzhiyun
51*4882a593Smuzhiyun	CCI interconnect node can define the following child nodes:
52*4882a593Smuzhiyun
53*4882a593Smuzhiyun	- CCI control interface nodes
54*4882a593Smuzhiyun
55*4882a593Smuzhiyun		Node name must be "slave-if".
56*4882a593Smuzhiyun		Parent node must be CCI interconnect node.
57*4882a593Smuzhiyun
58*4882a593Smuzhiyun		A CCI control interface node must contain the following
59*4882a593Smuzhiyun		properties:
60*4882a593Smuzhiyun
61*4882a593Smuzhiyun		- compatible
62*4882a593Smuzhiyun			Usage: required
63*4882a593Smuzhiyun			Value type: <string>
64*4882a593Smuzhiyun			Definition: must be set to
65*4882a593Smuzhiyun				    "arm,cci-400-ctrl-if"
66*4882a593Smuzhiyun
67*4882a593Smuzhiyun		- interface-type:
68*4882a593Smuzhiyun			Usage: required
69*4882a593Smuzhiyun			Value type: <string>
70*4882a593Smuzhiyun			Definition: must be set to one of {"ace", "ace-lite"}
71*4882a593Smuzhiyun				    depending on the interface type the node
72*4882a593Smuzhiyun				    represents.
73*4882a593Smuzhiyun
74*4882a593Smuzhiyun		- reg:
75*4882a593Smuzhiyun			Usage: required
76*4882a593Smuzhiyun			Value type: Integer cells. A register entry, expressed
77*4882a593Smuzhiyun				    as a pair of cells, containing base and
78*4882a593Smuzhiyun				    size.
79*4882a593Smuzhiyun			Definition: the base address and size of the
80*4882a593Smuzhiyun				    corresponding interface programming
81*4882a593Smuzhiyun				    registers.
82*4882a593Smuzhiyun
83*4882a593Smuzhiyun	- CCI PMU node
84*4882a593Smuzhiyun
85*4882a593Smuzhiyun		Parent node must be CCI interconnect node.
86*4882a593Smuzhiyun
87*4882a593Smuzhiyun		A CCI pmu node must contain the following properties:
88*4882a593Smuzhiyun
89*4882a593Smuzhiyun		- compatible
90*4882a593Smuzhiyun			Usage: required
91*4882a593Smuzhiyun			Value type: <string>
92*4882a593Smuzhiyun			Definition: Must contain one of:
93*4882a593Smuzhiyun				 "arm,cci-400-pmu,r0"
94*4882a593Smuzhiyun				 "arm,cci-400-pmu,r1"
95*4882a593Smuzhiyun				 "arm,cci-400-pmu"  - DEPRECATED, permitted only where OS has
96*4882a593Smuzhiyun						      secure access to CCI registers
97*4882a593Smuzhiyun				 "arm,cci-500-pmu,r0"
98*4882a593Smuzhiyun				 "arm,cci-550-pmu,r0"
99*4882a593Smuzhiyun		- reg:
100*4882a593Smuzhiyun			Usage: required
101*4882a593Smuzhiyun			Value type: Integer cells. A register entry, expressed
102*4882a593Smuzhiyun				    as a pair of cells, containing base and
103*4882a593Smuzhiyun				    size.
104*4882a593Smuzhiyun			Definition: the base address and size of the
105*4882a593Smuzhiyun				    corresponding interface programming
106*4882a593Smuzhiyun				    registers.
107*4882a593Smuzhiyun
108*4882a593Smuzhiyun		- interrupts:
109*4882a593Smuzhiyun			Usage: required
110*4882a593Smuzhiyun			Value type: Integer cells. Array of interrupt specifier
111*4882a593Smuzhiyun				    entries, as defined in
112*4882a593Smuzhiyun				    ../interrupt-controller/interrupts.txt.
113*4882a593Smuzhiyun			Definition: list of counter overflow interrupts, one per
114*4882a593Smuzhiyun				    counter. The interrupts must be specified
115*4882a593Smuzhiyun				    starting with the cycle counter overflow
116*4882a593Smuzhiyun				    interrupt, followed by counter0 overflow
117*4882a593Smuzhiyun				    interrupt, counter1 overflow interrupt,...
118*4882a593Smuzhiyun				    ,counterN overflow interrupt.
119*4882a593Smuzhiyun
120*4882a593Smuzhiyun				    The CCI PMU has an interrupt signal for each
121*4882a593Smuzhiyun				    counter. The number of interrupts must be
122*4882a593Smuzhiyun				    equal to the number of counters.
123*4882a593Smuzhiyun
124*4882a593Smuzhiyun* CCI interconnect bus masters
125*4882a593Smuzhiyun
126*4882a593Smuzhiyun	Description: masters in the device tree connected to a CCI port
127*4882a593Smuzhiyun		     (inclusive of CPUs and their cpu nodes).
128*4882a593Smuzhiyun
129*4882a593Smuzhiyun	A CCI interconnect bus master node must contain the following
130*4882a593Smuzhiyun	properties:
131*4882a593Smuzhiyun
132*4882a593Smuzhiyun	- cci-control-port:
133*4882a593Smuzhiyun		Usage: required
134*4882a593Smuzhiyun		Value type: <phandle>
135*4882a593Smuzhiyun		Definition: a phandle containing the CCI control interface node
136*4882a593Smuzhiyun			    the master is connected to.
137*4882a593Smuzhiyun
138*4882a593SmuzhiyunExample:
139*4882a593Smuzhiyun
140*4882a593Smuzhiyun	cpus {
141*4882a593Smuzhiyun		#size-cells = <0>;
142*4882a593Smuzhiyun		#address-cells = <1>;
143*4882a593Smuzhiyun
144*4882a593Smuzhiyun		CPU0: cpu@0 {
145*4882a593Smuzhiyun			device_type = "cpu";
146*4882a593Smuzhiyun			compatible = "arm,cortex-a15";
147*4882a593Smuzhiyun			cci-control-port = <&cci_control1>;
148*4882a593Smuzhiyun			reg = <0x0>;
149*4882a593Smuzhiyun		};
150*4882a593Smuzhiyun
151*4882a593Smuzhiyun		CPU1: cpu@1 {
152*4882a593Smuzhiyun			device_type = "cpu";
153*4882a593Smuzhiyun			compatible = "arm,cortex-a15";
154*4882a593Smuzhiyun			cci-control-port = <&cci_control1>;
155*4882a593Smuzhiyun			reg = <0x1>;
156*4882a593Smuzhiyun		};
157*4882a593Smuzhiyun
158*4882a593Smuzhiyun		CPU2: cpu@100 {
159*4882a593Smuzhiyun			device_type = "cpu";
160*4882a593Smuzhiyun			compatible = "arm,cortex-a7";
161*4882a593Smuzhiyun			cci-control-port = <&cci_control2>;
162*4882a593Smuzhiyun			reg = <0x100>;
163*4882a593Smuzhiyun		};
164*4882a593Smuzhiyun
165*4882a593Smuzhiyun		CPU3: cpu@101 {
166*4882a593Smuzhiyun			device_type = "cpu";
167*4882a593Smuzhiyun			compatible = "arm,cortex-a7";
168*4882a593Smuzhiyun			cci-control-port = <&cci_control2>;
169*4882a593Smuzhiyun			reg = <0x101>;
170*4882a593Smuzhiyun		};
171*4882a593Smuzhiyun
172*4882a593Smuzhiyun	};
173*4882a593Smuzhiyun
174*4882a593Smuzhiyun	dma0: dma@3000000 {
175*4882a593Smuzhiyun		compatible = "arm,pl330", "arm,primecell";
176*4882a593Smuzhiyun		cci-control-port = <&cci_control0>;
177*4882a593Smuzhiyun		reg = <0x0 0x3000000 0x0 0x1000>;
178*4882a593Smuzhiyun		interrupts = <10>;
179*4882a593Smuzhiyun		#dma-cells = <1>;
180*4882a593Smuzhiyun		#dma-channels = <8>;
181*4882a593Smuzhiyun		#dma-requests = <32>;
182*4882a593Smuzhiyun	};
183*4882a593Smuzhiyun
184*4882a593Smuzhiyun	cci@2c090000 {
185*4882a593Smuzhiyun		compatible = "arm,cci-400";
186*4882a593Smuzhiyun		#address-cells = <1>;
187*4882a593Smuzhiyun		#size-cells = <1>;
188*4882a593Smuzhiyun		reg = <0x0 0x2c090000 0 0x1000>;
189*4882a593Smuzhiyun		ranges = <0x0 0x0 0x2c090000 0x10000>;
190*4882a593Smuzhiyun
191*4882a593Smuzhiyun		cci_control0: slave-if@1000 {
192*4882a593Smuzhiyun			compatible = "arm,cci-400-ctrl-if";
193*4882a593Smuzhiyun			interface-type = "ace-lite";
194*4882a593Smuzhiyun			reg = <0x1000 0x1000>;
195*4882a593Smuzhiyun		};
196*4882a593Smuzhiyun
197*4882a593Smuzhiyun		cci_control1: slave-if@4000 {
198*4882a593Smuzhiyun			compatible = "arm,cci-400-ctrl-if";
199*4882a593Smuzhiyun			interface-type = "ace";
200*4882a593Smuzhiyun			reg = <0x4000 0x1000>;
201*4882a593Smuzhiyun		};
202*4882a593Smuzhiyun
203*4882a593Smuzhiyun		cci_control2: slave-if@5000 {
204*4882a593Smuzhiyun			compatible = "arm,cci-400-ctrl-if";
205*4882a593Smuzhiyun			interface-type = "ace";
206*4882a593Smuzhiyun			reg = <0x5000 0x1000>;
207*4882a593Smuzhiyun		};
208*4882a593Smuzhiyun
209*4882a593Smuzhiyun		pmu@9000 {
210*4882a593Smuzhiyun			 compatible = "arm,cci-400-pmu";
211*4882a593Smuzhiyun			 reg = <0x9000 0x5000>;
212*4882a593Smuzhiyun			 interrupts = <0 101 4>,
213*4882a593Smuzhiyun				      <0 102 4>,
214*4882a593Smuzhiyun				      <0 103 4>,
215*4882a593Smuzhiyun				      <0 104 4>,
216*4882a593Smuzhiyun				      <0 105 4>;
217*4882a593Smuzhiyun		};
218*4882a593Smuzhiyun	};
219*4882a593Smuzhiyun
220*4882a593SmuzhiyunThis CCI node corresponds to a CCI component whose control registers sits
221*4882a593Smuzhiyunat address 0x000000002c090000.
222*4882a593SmuzhiyunCCI slave interface @0x000000002c091000 is connected to dma controller dma0.
223*4882a593SmuzhiyunCCI slave interface @0x000000002c094000 is connected to CPUs {CPU0, CPU1};
224*4882a593SmuzhiyunCCI slave interface @0x000000002c095000 is connected to CPUs {CPU2, CPU3};
225