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