xref: /freebsd-src/sys/contrib/device-tree/Bindings/cpu/cpu-topology.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot===========================================
2*c66ec88fSEmmanuel VadotCPU topology binding description
3*c66ec88fSEmmanuel Vadot===========================================
4*c66ec88fSEmmanuel Vadot
5*c66ec88fSEmmanuel Vadot===========================================
6*c66ec88fSEmmanuel Vadot1 - Introduction
7*c66ec88fSEmmanuel Vadot===========================================
8*c66ec88fSEmmanuel Vadot
9*c66ec88fSEmmanuel VadotIn a SMP system, the hierarchy of CPUs is defined through three entities that
10*c66ec88fSEmmanuel Vadotare used to describe the layout of physical CPUs in the system:
11*c66ec88fSEmmanuel Vadot
12*c66ec88fSEmmanuel Vadot- socket
13*c66ec88fSEmmanuel Vadot- cluster
14*c66ec88fSEmmanuel Vadot- core
15*c66ec88fSEmmanuel Vadot- thread
16*c66ec88fSEmmanuel Vadot
17*c66ec88fSEmmanuel VadotThe bottom hierarchy level sits at core or thread level depending on whether
18*c66ec88fSEmmanuel Vadotsymmetric multi-threading (SMT) is supported or not.
19*c66ec88fSEmmanuel Vadot
20*c66ec88fSEmmanuel VadotFor instance in a system where CPUs support SMT, "cpu" nodes represent all
21*c66ec88fSEmmanuel Vadotthreads existing in the system and map to the hierarchy level "thread" above.
22*c66ec88fSEmmanuel VadotIn systems where SMT is not supported "cpu" nodes represent all cores present
23*c66ec88fSEmmanuel Vadotin the system and map to the hierarchy level "core" above.
24*c66ec88fSEmmanuel Vadot
25*c66ec88fSEmmanuel VadotCPU topology bindings allow one to associate cpu nodes with hierarchical groups
26*c66ec88fSEmmanuel Vadotcorresponding to the system hierarchy; syntactically they are defined as device
27*c66ec88fSEmmanuel Vadottree nodes.
28*c66ec88fSEmmanuel Vadot
29*c66ec88fSEmmanuel VadotCurrently, only ARM/RISC-V intend to use this cpu topology binding but it may be
30*c66ec88fSEmmanuel Vadotused for any other architecture as well.
31*c66ec88fSEmmanuel Vadot
32*c66ec88fSEmmanuel VadotThe cpu nodes, as per bindings defined in [4], represent the devices that
33*c66ec88fSEmmanuel Vadotcorrespond to physical CPUs and are to be mapped to the hierarchy levels.
34*c66ec88fSEmmanuel Vadot
35*c66ec88fSEmmanuel VadotA topology description containing phandles to cpu nodes that are not compliant
36*c66ec88fSEmmanuel Vadotwith bindings standardized in [4] is therefore considered invalid.
37*c66ec88fSEmmanuel Vadot
38*c66ec88fSEmmanuel Vadot===========================================
39*c66ec88fSEmmanuel Vadot2 - cpu-map node
40*c66ec88fSEmmanuel Vadot===========================================
41*c66ec88fSEmmanuel Vadot
42*c66ec88fSEmmanuel VadotThe ARM/RISC-V CPU topology is defined within the cpu-map node, which is a direct
43*c66ec88fSEmmanuel Vadotchild of the cpus node and provides a container where the actual topology
44*c66ec88fSEmmanuel Vadotnodes are listed.
45*c66ec88fSEmmanuel Vadot
46*c66ec88fSEmmanuel Vadot- cpu-map node
47*c66ec88fSEmmanuel Vadot
48*c66ec88fSEmmanuel Vadot	Usage: Optional - On SMP systems provide CPUs topology to the OS.
49*c66ec88fSEmmanuel Vadot			  Uniprocessor systems do not require a topology
50*c66ec88fSEmmanuel Vadot			  description and therefore should not define a
51*c66ec88fSEmmanuel Vadot			  cpu-map node.
52*c66ec88fSEmmanuel Vadot
53*c66ec88fSEmmanuel Vadot	Description: The cpu-map node is just a container node where its
54*c66ec88fSEmmanuel Vadot		     subnodes describe the CPU topology.
55*c66ec88fSEmmanuel Vadot
56*c66ec88fSEmmanuel Vadot	Node name must be "cpu-map".
57*c66ec88fSEmmanuel Vadot
58*c66ec88fSEmmanuel Vadot	The cpu-map node's parent node must be the cpus node.
59*c66ec88fSEmmanuel Vadot
60*c66ec88fSEmmanuel Vadot	The cpu-map node's child nodes can be:
61*c66ec88fSEmmanuel Vadot
62*c66ec88fSEmmanuel Vadot	- one or more cluster nodes or
63*c66ec88fSEmmanuel Vadot	- one or more socket nodes in a multi-socket system
64*c66ec88fSEmmanuel Vadot
65*c66ec88fSEmmanuel Vadot	Any other configuration is considered invalid.
66*c66ec88fSEmmanuel Vadot
67*c66ec88fSEmmanuel VadotThe cpu-map node can only contain 4 types of child nodes:
68*c66ec88fSEmmanuel Vadot
69*c66ec88fSEmmanuel Vadot- socket node
70*c66ec88fSEmmanuel Vadot- cluster node
71*c66ec88fSEmmanuel Vadot- core node
72*c66ec88fSEmmanuel Vadot- thread node
73*c66ec88fSEmmanuel Vadot
74*c66ec88fSEmmanuel Vadotwhose bindings are described in paragraph 3.
75*c66ec88fSEmmanuel Vadot
76*c66ec88fSEmmanuel VadotThe nodes describing the CPU topology (socket/cluster/core/thread) can
77*c66ec88fSEmmanuel Vadotonly be defined within the cpu-map node and every core/thread in the
78*c66ec88fSEmmanuel Vadotsystem must be defined within the topology.  Any other configuration is
79*c66ec88fSEmmanuel Vadotinvalid and therefore must be ignored.
80*c66ec88fSEmmanuel Vadot
81*c66ec88fSEmmanuel Vadot===========================================
82*c66ec88fSEmmanuel Vadot2.1 - cpu-map child nodes naming convention
83*c66ec88fSEmmanuel Vadot===========================================
84*c66ec88fSEmmanuel Vadot
85*c66ec88fSEmmanuel Vadotcpu-map child nodes must follow a naming convention where the node name
86*c66ec88fSEmmanuel Vadotmust be "socketN", "clusterN", "coreN", "threadN" depending on the node type
87*c66ec88fSEmmanuel Vadot(ie socket/cluster/core/thread) (where N = {0, 1, ...} is the node number; nodes
88*c66ec88fSEmmanuel Vadotwhich are siblings within a single common parent node must be given a unique and
89*c66ec88fSEmmanuel Vadotsequential N value, starting from 0).
90*c66ec88fSEmmanuel Vadotcpu-map child nodes which do not share a common parent node can have the same
91*c66ec88fSEmmanuel Vadotname (ie same number N as other cpu-map child nodes at different device tree
92*c66ec88fSEmmanuel Vadotlevels) since name uniqueness will be guaranteed by the device tree hierarchy.
93*c66ec88fSEmmanuel Vadot
94*c66ec88fSEmmanuel Vadot===========================================
95*c66ec88fSEmmanuel Vadot3 - socket/cluster/core/thread node bindings
96*c66ec88fSEmmanuel Vadot===========================================
97*c66ec88fSEmmanuel Vadot
98*c66ec88fSEmmanuel VadotBindings for socket/cluster/cpu/thread nodes are defined as follows:
99*c66ec88fSEmmanuel Vadot
100*c66ec88fSEmmanuel Vadot- socket node
101*c66ec88fSEmmanuel Vadot
102*c66ec88fSEmmanuel Vadot	 Description: must be declared within a cpu-map node, one node
103*c66ec88fSEmmanuel Vadot		      per physical socket in the system. A system can
104*c66ec88fSEmmanuel Vadot		      contain single or multiple physical socket.
105*c66ec88fSEmmanuel Vadot		      The association of sockets and NUMA nodes is beyond
106*c66ec88fSEmmanuel Vadot		      the scope of this bindings, please refer [2] for
107*c66ec88fSEmmanuel Vadot		      NUMA bindings.
108*c66ec88fSEmmanuel Vadot
109*c66ec88fSEmmanuel Vadot	This node is optional for a single socket system.
110*c66ec88fSEmmanuel Vadot
111*c66ec88fSEmmanuel Vadot	The socket node name must be "socketN" as described in 2.1 above.
112*c66ec88fSEmmanuel Vadot	A socket node can not be a leaf node.
113*c66ec88fSEmmanuel Vadot
114*c66ec88fSEmmanuel Vadot	A socket node's child nodes must be one or more cluster nodes.
115*c66ec88fSEmmanuel Vadot
116*c66ec88fSEmmanuel Vadot	Any other configuration is considered invalid.
117*c66ec88fSEmmanuel Vadot
118*c66ec88fSEmmanuel Vadot- cluster node
119*c66ec88fSEmmanuel Vadot
120*c66ec88fSEmmanuel Vadot	 Description: must be declared within a cpu-map node, one node
121*c66ec88fSEmmanuel Vadot		      per cluster. A system can contain several layers of
122*c66ec88fSEmmanuel Vadot		      clustering within a single physical socket and cluster
123*c66ec88fSEmmanuel Vadot		      nodes can be contained in parent cluster nodes.
124*c66ec88fSEmmanuel Vadot
125*c66ec88fSEmmanuel Vadot	The cluster node name must be "clusterN" as described in 2.1 above.
126*c66ec88fSEmmanuel Vadot	A cluster node can not be a leaf node.
127*c66ec88fSEmmanuel Vadot
128*c66ec88fSEmmanuel Vadot	A cluster node's child nodes must be:
129*c66ec88fSEmmanuel Vadot
130*c66ec88fSEmmanuel Vadot	- one or more cluster nodes; or
131*c66ec88fSEmmanuel Vadot	- one or more core nodes
132*c66ec88fSEmmanuel Vadot
133*c66ec88fSEmmanuel Vadot	Any other configuration is considered invalid.
134*c66ec88fSEmmanuel Vadot
135*c66ec88fSEmmanuel Vadot- core node
136*c66ec88fSEmmanuel Vadot
137*c66ec88fSEmmanuel Vadot	Description: must be declared in a cluster node, one node per core in
138*c66ec88fSEmmanuel Vadot		     the cluster. If the system does not support SMT, core
139*c66ec88fSEmmanuel Vadot		     nodes are leaf nodes, otherwise they become containers of
140*c66ec88fSEmmanuel Vadot		     thread nodes.
141*c66ec88fSEmmanuel Vadot
142*c66ec88fSEmmanuel Vadot	The core node name must be "coreN" as described in 2.1 above.
143*c66ec88fSEmmanuel Vadot
144*c66ec88fSEmmanuel Vadot	A core node must be a leaf node if SMT is not supported.
145*c66ec88fSEmmanuel Vadot
146*c66ec88fSEmmanuel Vadot	Properties for core nodes that are leaf nodes:
147*c66ec88fSEmmanuel Vadot
148*c66ec88fSEmmanuel Vadot	- cpu
149*c66ec88fSEmmanuel Vadot		Usage: required
150*c66ec88fSEmmanuel Vadot		Value type: <phandle>
151*c66ec88fSEmmanuel Vadot		Definition: a phandle to the cpu node that corresponds to the
152*c66ec88fSEmmanuel Vadot			    core node.
153*c66ec88fSEmmanuel Vadot
154*c66ec88fSEmmanuel Vadot	If a core node is not a leaf node (CPUs supporting SMT) a core node's
155*c66ec88fSEmmanuel Vadot	child nodes can be:
156*c66ec88fSEmmanuel Vadot
157*c66ec88fSEmmanuel Vadot	- one or more thread nodes
158*c66ec88fSEmmanuel Vadot
159*c66ec88fSEmmanuel Vadot	Any other configuration is considered invalid.
160*c66ec88fSEmmanuel Vadot
161*c66ec88fSEmmanuel Vadot- thread node
162*c66ec88fSEmmanuel Vadot
163*c66ec88fSEmmanuel Vadot	Description: must be declared in a core node, one node per thread
164*c66ec88fSEmmanuel Vadot		     in the core if the system supports SMT. Thread nodes are
165*c66ec88fSEmmanuel Vadot		     always leaf nodes in the device tree.
166*c66ec88fSEmmanuel Vadot
167*c66ec88fSEmmanuel Vadot	The thread node name must be "threadN" as described in 2.1 above.
168*c66ec88fSEmmanuel Vadot
169*c66ec88fSEmmanuel Vadot	A thread node must be a leaf node.
170*c66ec88fSEmmanuel Vadot
171*c66ec88fSEmmanuel Vadot	A thread node must contain the following property:
172*c66ec88fSEmmanuel Vadot
173*c66ec88fSEmmanuel Vadot	- cpu
174*c66ec88fSEmmanuel Vadot		Usage: required
175*c66ec88fSEmmanuel Vadot		Value type: <phandle>
176*c66ec88fSEmmanuel Vadot		Definition: a phandle to the cpu node that corresponds to
177*c66ec88fSEmmanuel Vadot			    the thread node.
178*c66ec88fSEmmanuel Vadot
179*c66ec88fSEmmanuel Vadot===========================================
180*c66ec88fSEmmanuel Vadot4 - Example dts
181*c66ec88fSEmmanuel Vadot===========================================
182*c66ec88fSEmmanuel Vadot
183*c66ec88fSEmmanuel VadotExample 1 (ARM 64-bit, 16-cpu system, two clusters of clusters in a single
184*c66ec88fSEmmanuel Vadotphysical socket):
185*c66ec88fSEmmanuel Vadot
186*c66ec88fSEmmanuel Vadotcpus {
187*c66ec88fSEmmanuel Vadot	#size-cells = <0>;
188*c66ec88fSEmmanuel Vadot	#address-cells = <2>;
189*c66ec88fSEmmanuel Vadot
190*c66ec88fSEmmanuel Vadot	cpu-map {
191*c66ec88fSEmmanuel Vadot		socket0 {
192*c66ec88fSEmmanuel Vadot			cluster0 {
193*c66ec88fSEmmanuel Vadot				cluster0 {
194*c66ec88fSEmmanuel Vadot					core0 {
195*c66ec88fSEmmanuel Vadot						thread0 {
196*c66ec88fSEmmanuel Vadot							cpu = <&CPU0>;
197*c66ec88fSEmmanuel Vadot						};
198*c66ec88fSEmmanuel Vadot						thread1 {
199*c66ec88fSEmmanuel Vadot							cpu = <&CPU1>;
200*c66ec88fSEmmanuel Vadot						};
201*c66ec88fSEmmanuel Vadot					};
202*c66ec88fSEmmanuel Vadot
203*c66ec88fSEmmanuel Vadot					core1 {
204*c66ec88fSEmmanuel Vadot						thread0 {
205*c66ec88fSEmmanuel Vadot							cpu = <&CPU2>;
206*c66ec88fSEmmanuel Vadot						};
207*c66ec88fSEmmanuel Vadot						thread1 {
208*c66ec88fSEmmanuel Vadot							cpu = <&CPU3>;
209*c66ec88fSEmmanuel Vadot						};
210*c66ec88fSEmmanuel Vadot					};
211*c66ec88fSEmmanuel Vadot				};
212*c66ec88fSEmmanuel Vadot
213*c66ec88fSEmmanuel Vadot				cluster1 {
214*c66ec88fSEmmanuel Vadot					core0 {
215*c66ec88fSEmmanuel Vadot						thread0 {
216*c66ec88fSEmmanuel Vadot							cpu = <&CPU4>;
217*c66ec88fSEmmanuel Vadot						};
218*c66ec88fSEmmanuel Vadot						thread1 {
219*c66ec88fSEmmanuel Vadot							cpu = <&CPU5>;
220*c66ec88fSEmmanuel Vadot						};
221*c66ec88fSEmmanuel Vadot					};
222*c66ec88fSEmmanuel Vadot
223*c66ec88fSEmmanuel Vadot					core1 {
224*c66ec88fSEmmanuel Vadot						thread0 {
225*c66ec88fSEmmanuel Vadot							cpu = <&CPU6>;
226*c66ec88fSEmmanuel Vadot						};
227*c66ec88fSEmmanuel Vadot						thread1 {
228*c66ec88fSEmmanuel Vadot							cpu = <&CPU7>;
229*c66ec88fSEmmanuel Vadot						};
230*c66ec88fSEmmanuel Vadot					};
231*c66ec88fSEmmanuel Vadot				};
232*c66ec88fSEmmanuel Vadot			};
233*c66ec88fSEmmanuel Vadot
234*c66ec88fSEmmanuel Vadot			cluster1 {
235*c66ec88fSEmmanuel Vadot				cluster0 {
236*c66ec88fSEmmanuel Vadot					core0 {
237*c66ec88fSEmmanuel Vadot						thread0 {
238*c66ec88fSEmmanuel Vadot							cpu = <&CPU8>;
239*c66ec88fSEmmanuel Vadot						};
240*c66ec88fSEmmanuel Vadot						thread1 {
241*c66ec88fSEmmanuel Vadot							cpu = <&CPU9>;
242*c66ec88fSEmmanuel Vadot						};
243*c66ec88fSEmmanuel Vadot					};
244*c66ec88fSEmmanuel Vadot					core1 {
245*c66ec88fSEmmanuel Vadot						thread0 {
246*c66ec88fSEmmanuel Vadot							cpu = <&CPU10>;
247*c66ec88fSEmmanuel Vadot						};
248*c66ec88fSEmmanuel Vadot						thread1 {
249*c66ec88fSEmmanuel Vadot							cpu = <&CPU11>;
250*c66ec88fSEmmanuel Vadot						};
251*c66ec88fSEmmanuel Vadot					};
252*c66ec88fSEmmanuel Vadot				};
253*c66ec88fSEmmanuel Vadot
254*c66ec88fSEmmanuel Vadot				cluster1 {
255*c66ec88fSEmmanuel Vadot					core0 {
256*c66ec88fSEmmanuel Vadot						thread0 {
257*c66ec88fSEmmanuel Vadot							cpu = <&CPU12>;
258*c66ec88fSEmmanuel Vadot						};
259*c66ec88fSEmmanuel Vadot						thread1 {
260*c66ec88fSEmmanuel Vadot							cpu = <&CPU13>;
261*c66ec88fSEmmanuel Vadot						};
262*c66ec88fSEmmanuel Vadot					};
263*c66ec88fSEmmanuel Vadot					core1 {
264*c66ec88fSEmmanuel Vadot						thread0 {
265*c66ec88fSEmmanuel Vadot							cpu = <&CPU14>;
266*c66ec88fSEmmanuel Vadot						};
267*c66ec88fSEmmanuel Vadot						thread1 {
268*c66ec88fSEmmanuel Vadot							cpu = <&CPU15>;
269*c66ec88fSEmmanuel Vadot						};
270*c66ec88fSEmmanuel Vadot					};
271*c66ec88fSEmmanuel Vadot				};
272*c66ec88fSEmmanuel Vadot			};
273*c66ec88fSEmmanuel Vadot		};
274*c66ec88fSEmmanuel Vadot	};
275*c66ec88fSEmmanuel Vadot
276*c66ec88fSEmmanuel Vadot	CPU0: cpu@0 {
277*c66ec88fSEmmanuel Vadot		device_type = "cpu";
278*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a57";
279*c66ec88fSEmmanuel Vadot		reg = <0x0 0x0>;
280*c66ec88fSEmmanuel Vadot		enable-method = "spin-table";
281*c66ec88fSEmmanuel Vadot		cpu-release-addr = <0 0x20000000>;
282*c66ec88fSEmmanuel Vadot	};
283*c66ec88fSEmmanuel Vadot
284*c66ec88fSEmmanuel Vadot	CPU1: cpu@1 {
285*c66ec88fSEmmanuel Vadot		device_type = "cpu";
286*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a57";
287*c66ec88fSEmmanuel Vadot		reg = <0x0 0x1>;
288*c66ec88fSEmmanuel Vadot		enable-method = "spin-table";
289*c66ec88fSEmmanuel Vadot		cpu-release-addr = <0 0x20000000>;
290*c66ec88fSEmmanuel Vadot	};
291*c66ec88fSEmmanuel Vadot
292*c66ec88fSEmmanuel Vadot	CPU2: cpu@100 {
293*c66ec88fSEmmanuel Vadot		device_type = "cpu";
294*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a57";
295*c66ec88fSEmmanuel Vadot		reg = <0x0 0x100>;
296*c66ec88fSEmmanuel Vadot		enable-method = "spin-table";
297*c66ec88fSEmmanuel Vadot		cpu-release-addr = <0 0x20000000>;
298*c66ec88fSEmmanuel Vadot	};
299*c66ec88fSEmmanuel Vadot
300*c66ec88fSEmmanuel Vadot	CPU3: cpu@101 {
301*c66ec88fSEmmanuel Vadot		device_type = "cpu";
302*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a57";
303*c66ec88fSEmmanuel Vadot		reg = <0x0 0x101>;
304*c66ec88fSEmmanuel Vadot		enable-method = "spin-table";
305*c66ec88fSEmmanuel Vadot		cpu-release-addr = <0 0x20000000>;
306*c66ec88fSEmmanuel Vadot	};
307*c66ec88fSEmmanuel Vadot
308*c66ec88fSEmmanuel Vadot	CPU4: cpu@10000 {
309*c66ec88fSEmmanuel Vadot		device_type = "cpu";
310*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a57";
311*c66ec88fSEmmanuel Vadot		reg = <0x0 0x10000>;
312*c66ec88fSEmmanuel Vadot		enable-method = "spin-table";
313*c66ec88fSEmmanuel Vadot		cpu-release-addr = <0 0x20000000>;
314*c66ec88fSEmmanuel Vadot	};
315*c66ec88fSEmmanuel Vadot
316*c66ec88fSEmmanuel Vadot	CPU5: cpu@10001 {
317*c66ec88fSEmmanuel Vadot		device_type = "cpu";
318*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a57";
319*c66ec88fSEmmanuel Vadot		reg = <0x0 0x10001>;
320*c66ec88fSEmmanuel Vadot		enable-method = "spin-table";
321*c66ec88fSEmmanuel Vadot		cpu-release-addr = <0 0x20000000>;
322*c66ec88fSEmmanuel Vadot	};
323*c66ec88fSEmmanuel Vadot
324*c66ec88fSEmmanuel Vadot	CPU6: cpu@10100 {
325*c66ec88fSEmmanuel Vadot		device_type = "cpu";
326*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a57";
327*c66ec88fSEmmanuel Vadot		reg = <0x0 0x10100>;
328*c66ec88fSEmmanuel Vadot		enable-method = "spin-table";
329*c66ec88fSEmmanuel Vadot		cpu-release-addr = <0 0x20000000>;
330*c66ec88fSEmmanuel Vadot	};
331*c66ec88fSEmmanuel Vadot
332*c66ec88fSEmmanuel Vadot	CPU7: cpu@10101 {
333*c66ec88fSEmmanuel Vadot		device_type = "cpu";
334*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a57";
335*c66ec88fSEmmanuel Vadot		reg = <0x0 0x10101>;
336*c66ec88fSEmmanuel Vadot		enable-method = "spin-table";
337*c66ec88fSEmmanuel Vadot		cpu-release-addr = <0 0x20000000>;
338*c66ec88fSEmmanuel Vadot	};
339*c66ec88fSEmmanuel Vadot
340*c66ec88fSEmmanuel Vadot	CPU8: cpu@100000000 {
341*c66ec88fSEmmanuel Vadot		device_type = "cpu";
342*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a57";
343*c66ec88fSEmmanuel Vadot		reg = <0x1 0x0>;
344*c66ec88fSEmmanuel Vadot		enable-method = "spin-table";
345*c66ec88fSEmmanuel Vadot		cpu-release-addr = <0 0x20000000>;
346*c66ec88fSEmmanuel Vadot	};
347*c66ec88fSEmmanuel Vadot
348*c66ec88fSEmmanuel Vadot	CPU9: cpu@100000001 {
349*c66ec88fSEmmanuel Vadot		device_type = "cpu";
350*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a57";
351*c66ec88fSEmmanuel Vadot		reg = <0x1 0x1>;
352*c66ec88fSEmmanuel Vadot		enable-method = "spin-table";
353*c66ec88fSEmmanuel Vadot		cpu-release-addr = <0 0x20000000>;
354*c66ec88fSEmmanuel Vadot	};
355*c66ec88fSEmmanuel Vadot
356*c66ec88fSEmmanuel Vadot	CPU10: cpu@100000100 {
357*c66ec88fSEmmanuel Vadot		device_type = "cpu";
358*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a57";
359*c66ec88fSEmmanuel Vadot		reg = <0x1 0x100>;
360*c66ec88fSEmmanuel Vadot		enable-method = "spin-table";
361*c66ec88fSEmmanuel Vadot		cpu-release-addr = <0 0x20000000>;
362*c66ec88fSEmmanuel Vadot	};
363*c66ec88fSEmmanuel Vadot
364*c66ec88fSEmmanuel Vadot	CPU11: cpu@100000101 {
365*c66ec88fSEmmanuel Vadot		device_type = "cpu";
366*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a57";
367*c66ec88fSEmmanuel Vadot		reg = <0x1 0x101>;
368*c66ec88fSEmmanuel Vadot		enable-method = "spin-table";
369*c66ec88fSEmmanuel Vadot		cpu-release-addr = <0 0x20000000>;
370*c66ec88fSEmmanuel Vadot	};
371*c66ec88fSEmmanuel Vadot
372*c66ec88fSEmmanuel Vadot	CPU12: cpu@100010000 {
373*c66ec88fSEmmanuel Vadot		device_type = "cpu";
374*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a57";
375*c66ec88fSEmmanuel Vadot		reg = <0x1 0x10000>;
376*c66ec88fSEmmanuel Vadot		enable-method = "spin-table";
377*c66ec88fSEmmanuel Vadot		cpu-release-addr = <0 0x20000000>;
378*c66ec88fSEmmanuel Vadot	};
379*c66ec88fSEmmanuel Vadot
380*c66ec88fSEmmanuel Vadot	CPU13: cpu@100010001 {
381*c66ec88fSEmmanuel Vadot		device_type = "cpu";
382*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a57";
383*c66ec88fSEmmanuel Vadot		reg = <0x1 0x10001>;
384*c66ec88fSEmmanuel Vadot		enable-method = "spin-table";
385*c66ec88fSEmmanuel Vadot		cpu-release-addr = <0 0x20000000>;
386*c66ec88fSEmmanuel Vadot	};
387*c66ec88fSEmmanuel Vadot
388*c66ec88fSEmmanuel Vadot	CPU14: cpu@100010100 {
389*c66ec88fSEmmanuel Vadot		device_type = "cpu";
390*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a57";
391*c66ec88fSEmmanuel Vadot		reg = <0x1 0x10100>;
392*c66ec88fSEmmanuel Vadot		enable-method = "spin-table";
393*c66ec88fSEmmanuel Vadot		cpu-release-addr = <0 0x20000000>;
394*c66ec88fSEmmanuel Vadot	};
395*c66ec88fSEmmanuel Vadot
396*c66ec88fSEmmanuel Vadot	CPU15: cpu@100010101 {
397*c66ec88fSEmmanuel Vadot		device_type = "cpu";
398*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a57";
399*c66ec88fSEmmanuel Vadot		reg = <0x1 0x10101>;
400*c66ec88fSEmmanuel Vadot		enable-method = "spin-table";
401*c66ec88fSEmmanuel Vadot		cpu-release-addr = <0 0x20000000>;
402*c66ec88fSEmmanuel Vadot	};
403*c66ec88fSEmmanuel Vadot};
404*c66ec88fSEmmanuel Vadot
405*c66ec88fSEmmanuel VadotExample 2 (ARM 32-bit, dual-cluster, 8-cpu system, no SMT):
406*c66ec88fSEmmanuel Vadot
407*c66ec88fSEmmanuel Vadotcpus {
408*c66ec88fSEmmanuel Vadot	#size-cells = <0>;
409*c66ec88fSEmmanuel Vadot	#address-cells = <1>;
410*c66ec88fSEmmanuel Vadot
411*c66ec88fSEmmanuel Vadot	cpu-map {
412*c66ec88fSEmmanuel Vadot		cluster0 {
413*c66ec88fSEmmanuel Vadot			core0 {
414*c66ec88fSEmmanuel Vadot				cpu = <&CPU0>;
415*c66ec88fSEmmanuel Vadot			};
416*c66ec88fSEmmanuel Vadot			core1 {
417*c66ec88fSEmmanuel Vadot				cpu = <&CPU1>;
418*c66ec88fSEmmanuel Vadot			};
419*c66ec88fSEmmanuel Vadot			core2 {
420*c66ec88fSEmmanuel Vadot				cpu = <&CPU2>;
421*c66ec88fSEmmanuel Vadot			};
422*c66ec88fSEmmanuel Vadot			core3 {
423*c66ec88fSEmmanuel Vadot				cpu = <&CPU3>;
424*c66ec88fSEmmanuel Vadot			};
425*c66ec88fSEmmanuel Vadot		};
426*c66ec88fSEmmanuel Vadot
427*c66ec88fSEmmanuel Vadot		cluster1 {
428*c66ec88fSEmmanuel Vadot			core0 {
429*c66ec88fSEmmanuel Vadot				cpu = <&CPU4>;
430*c66ec88fSEmmanuel Vadot			};
431*c66ec88fSEmmanuel Vadot			core1 {
432*c66ec88fSEmmanuel Vadot				cpu = <&CPU5>;
433*c66ec88fSEmmanuel Vadot			};
434*c66ec88fSEmmanuel Vadot			core2 {
435*c66ec88fSEmmanuel Vadot				cpu = <&CPU6>;
436*c66ec88fSEmmanuel Vadot			};
437*c66ec88fSEmmanuel Vadot			core3 {
438*c66ec88fSEmmanuel Vadot				cpu = <&CPU7>;
439*c66ec88fSEmmanuel Vadot			};
440*c66ec88fSEmmanuel Vadot		};
441*c66ec88fSEmmanuel Vadot	};
442*c66ec88fSEmmanuel Vadot
443*c66ec88fSEmmanuel Vadot	CPU0: cpu@0 {
444*c66ec88fSEmmanuel Vadot		device_type = "cpu";
445*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a15";
446*c66ec88fSEmmanuel Vadot		reg = <0x0>;
447*c66ec88fSEmmanuel Vadot	};
448*c66ec88fSEmmanuel Vadot
449*c66ec88fSEmmanuel Vadot	CPU1: cpu@1 {
450*c66ec88fSEmmanuel Vadot		device_type = "cpu";
451*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a15";
452*c66ec88fSEmmanuel Vadot		reg = <0x1>;
453*c66ec88fSEmmanuel Vadot	};
454*c66ec88fSEmmanuel Vadot
455*c66ec88fSEmmanuel Vadot	CPU2: cpu@2 {
456*c66ec88fSEmmanuel Vadot		device_type = "cpu";
457*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a15";
458*c66ec88fSEmmanuel Vadot		reg = <0x2>;
459*c66ec88fSEmmanuel Vadot	};
460*c66ec88fSEmmanuel Vadot
461*c66ec88fSEmmanuel Vadot	CPU3: cpu@3 {
462*c66ec88fSEmmanuel Vadot		device_type = "cpu";
463*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a15";
464*c66ec88fSEmmanuel Vadot		reg = <0x3>;
465*c66ec88fSEmmanuel Vadot	};
466*c66ec88fSEmmanuel Vadot
467*c66ec88fSEmmanuel Vadot	CPU4: cpu@100 {
468*c66ec88fSEmmanuel Vadot		device_type = "cpu";
469*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a7";
470*c66ec88fSEmmanuel Vadot		reg = <0x100>;
471*c66ec88fSEmmanuel Vadot	};
472*c66ec88fSEmmanuel Vadot
473*c66ec88fSEmmanuel Vadot	CPU5: cpu@101 {
474*c66ec88fSEmmanuel Vadot		device_type = "cpu";
475*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a7";
476*c66ec88fSEmmanuel Vadot		reg = <0x101>;
477*c66ec88fSEmmanuel Vadot	};
478*c66ec88fSEmmanuel Vadot
479*c66ec88fSEmmanuel Vadot	CPU6: cpu@102 {
480*c66ec88fSEmmanuel Vadot		device_type = "cpu";
481*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a7";
482*c66ec88fSEmmanuel Vadot		reg = <0x102>;
483*c66ec88fSEmmanuel Vadot	};
484*c66ec88fSEmmanuel Vadot
485*c66ec88fSEmmanuel Vadot	CPU7: cpu@103 {
486*c66ec88fSEmmanuel Vadot		device_type = "cpu";
487*c66ec88fSEmmanuel Vadot		compatible = "arm,cortex-a7";
488*c66ec88fSEmmanuel Vadot		reg = <0x103>;
489*c66ec88fSEmmanuel Vadot	};
490*c66ec88fSEmmanuel Vadot};
491*c66ec88fSEmmanuel Vadot
492*c66ec88fSEmmanuel VadotExample 3: HiFive Unleashed (RISC-V 64 bit, 4 core system)
493*c66ec88fSEmmanuel Vadot
494*c66ec88fSEmmanuel Vadot{
495*c66ec88fSEmmanuel Vadot	#address-cells = <2>;
496*c66ec88fSEmmanuel Vadot	#size-cells = <2>;
497*c66ec88fSEmmanuel Vadot	compatible = "sifive,fu540g", "sifive,fu500";
498*c66ec88fSEmmanuel Vadot	model = "sifive,hifive-unleashed-a00";
499*c66ec88fSEmmanuel Vadot
500*c66ec88fSEmmanuel Vadot	...
501*c66ec88fSEmmanuel Vadot	cpus {
502*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
503*c66ec88fSEmmanuel Vadot		#size-cells = <0>;
504*c66ec88fSEmmanuel Vadot		cpu-map {
505*c66ec88fSEmmanuel Vadot			socket0 {
506*c66ec88fSEmmanuel Vadot				cluster0 {
507*c66ec88fSEmmanuel Vadot					core0 {
508*c66ec88fSEmmanuel Vadot						cpu = <&CPU1>;
509*c66ec88fSEmmanuel Vadot					};
510*c66ec88fSEmmanuel Vadot					core1 {
511*c66ec88fSEmmanuel Vadot						cpu = <&CPU2>;
512*c66ec88fSEmmanuel Vadot					};
513*c66ec88fSEmmanuel Vadot					core2 {
514*c66ec88fSEmmanuel Vadot						cpu0 = <&CPU2>;
515*c66ec88fSEmmanuel Vadot					};
516*c66ec88fSEmmanuel Vadot					core3 {
517*c66ec88fSEmmanuel Vadot						cpu0 = <&CPU3>;
518*c66ec88fSEmmanuel Vadot					};
519*c66ec88fSEmmanuel Vadot				};
520*c66ec88fSEmmanuel Vadot			};
521*c66ec88fSEmmanuel Vadot		};
522*c66ec88fSEmmanuel Vadot
523*c66ec88fSEmmanuel Vadot		CPU1: cpu@1 {
524*c66ec88fSEmmanuel Vadot			device_type = "cpu";
525*c66ec88fSEmmanuel Vadot			compatible = "sifive,rocket0", "riscv";
526*c66ec88fSEmmanuel Vadot			reg = <0x1>;
527*c66ec88fSEmmanuel Vadot		}
528*c66ec88fSEmmanuel Vadot
529*c66ec88fSEmmanuel Vadot		CPU2: cpu@2 {
530*c66ec88fSEmmanuel Vadot			device_type = "cpu";
531*c66ec88fSEmmanuel Vadot			compatible = "sifive,rocket0", "riscv";
532*c66ec88fSEmmanuel Vadot			reg = <0x2>;
533*c66ec88fSEmmanuel Vadot		}
534*c66ec88fSEmmanuel Vadot		CPU3: cpu@3 {
535*c66ec88fSEmmanuel Vadot			device_type = "cpu";
536*c66ec88fSEmmanuel Vadot			compatible = "sifive,rocket0", "riscv";
537*c66ec88fSEmmanuel Vadot			reg = <0x3>;
538*c66ec88fSEmmanuel Vadot		}
539*c66ec88fSEmmanuel Vadot		CPU4: cpu@4 {
540*c66ec88fSEmmanuel Vadot			device_type = "cpu";
541*c66ec88fSEmmanuel Vadot			compatible = "sifive,rocket0", "riscv";
542*c66ec88fSEmmanuel Vadot			reg = <0x4>;
543*c66ec88fSEmmanuel Vadot		}
544*c66ec88fSEmmanuel Vadot	}
545*c66ec88fSEmmanuel Vadot};
546*c66ec88fSEmmanuel Vadot===============================================================================
547*c66ec88fSEmmanuel Vadot[1] ARM Linux kernel documentation
548*c66ec88fSEmmanuel Vadot    Documentation/devicetree/bindings/arm/cpus.yaml
549*c66ec88fSEmmanuel Vadot[2] Devicetree NUMA binding description
550*c66ec88fSEmmanuel Vadot    Documentation/devicetree/bindings/numa.txt
551*c66ec88fSEmmanuel Vadot[3] RISC-V Linux kernel documentation
552*c66ec88fSEmmanuel Vadot    Documentation/devicetree/bindings/riscv/cpus.yaml
553*c66ec88fSEmmanuel Vadot[4] https://www.devicetree.org/specifications/
554