2
* Sapphire device-tree requirements
6
* This documents the generated device-tree requirements, this is based on
7
* a commented device-tree dump obtained from a DT generated by Sapphire
14
* - skiboot does not require nodes to have phandle properties, but
15
* if you have them then *all* nodes must have them including the
16
* root of the device-tree (currently a HB bug !). It is recommended
17
* to have them since they are needed to represent the cache levels.
19
* NOTE: The example tree below only has phandle properties for
20
* nodes that are referenced by other nodes. This is *not* correct
21
* and is purely done for keeping this document smaller, make sure
22
* to follow the rule above.
24
* - Only the "phandle" property is required. Sapphire also generates
25
* a "linux,phandle" for backward compatibility but doesn't require
28
* - Any property not specifically documented must be put in "as is"
30
* - All ibm,chip-id properties contain a HW chip ID which correspond
31
* on P8 to the PIR value shifted right by 7 bits, ie. it's a 6-bit
32
* value made of a 3-bit node number and a 3-bit chip number.
34
* - Unit addresses (@xxxx part of node names) should if possible use
35
* lower case hexadecimal to be consistent with what skiboot does
36
* and to help some stupid parsers out there...
42
* 2013/10/08 : Version 0.1
44
* 2013/10/09 : Version 0.2
46
* - Add comment about case of unit addresses
47
* - Add missing lpc node definition
48
* - Add example UART node on LPC
49
* - Remove "status" property from PSI xsco nodes
51
* 2014/03/26 : Version 0.2.1
53
* - Fix cpus/xxx/ibm,pa-features to be a byte array
60
* Here are the reserve map entries. They should exactly match the
61
* reserved-ranges property of the root node (see documentation
65
/memreserve/ 0x00000007fe600000 0x0000000000100000;
66
/memreserve/ 0x00000007fe200000 0x0000000000100000;
67
/memreserve/ 0x0000000031e00000 0x00000000003e0000;
68
/memreserve/ 0x0000000031000000 0x0000000000e00000;
69
/memreserve/ 0x0000000030400000 0x0000000000c00000;
70
/memreserve/ 0x0000000030000000 0x0000000000400000;
71
/memreserve/ 0x0000000400000000 0x0000000000600450;
76
* "compatible" properties are string lists (ASCII strings separated by
77
* \0 characters) indicating the overall compatibility from the more
78
* specific to the least specific.
80
* The root node compatible property *must* contain "ibm,powernv" for
81
* Linux to have the powernv platform match the machine. It is recommended
82
* to add a slightly more precise property (first in order) indicating more
83
* precisely the board type. We don't currently do that in HDAT based
86
* The standard naming is "vendor,name" so in your case, something like
88
* compatible = "goog,rhesus","ibm,powernv";
90
* would work. Or even better:
92
* compatible = "goog,rhesus-v1","goog,rhesus","ibm,powernv";
94
compatible = "ibm,powernv";
97
#address-cells = <0x2>;
100
/* User visible board name (will be shown in /proc/cpuinfo) */
101
model = "Machine Name";
104
* The reserved-names and reserve-names properties work hand in hand. The first one
105
* is a list of strings providing a "name" for each entry in the second one using
106
* the traditional "vendor,name" format.
108
* The reserved-ranges property contains a list of ranges, each in the form of 2 cells
109
* of address and 2 cells of size (64-bit x2 so each entry is 4 cells) indicating
110
* regions of memory that are reserved and must not be overwritten by skiboot or
111
* subsequently by the Linux Kernel.
113
* Corresponding entries must also be created in the "reserved map" part of the flat
114
* device-tree (which is a binary list in the header of the fdt).
116
* Unless a component (skiboot or Linux) specifically knows about a region (usually
117
* based on its name) and decides to change or remove it, all these regions are
118
* passed as-is to Linux and to subsequent kernels across kexec and are kept
121
* NOTE: Do *NOT* copy the entries below, they are just an example and are actually
122
* created by skiboot itself. They represent the SLW image as "detected" by reading
123
* the PBA BARs and skiboot own memory allocations.
125
* I would recommend that you put in there the SLW and OCC (or HOMER as one block
126
* if that's how you use it) and any additional memory you want to preserve such
127
* as FW log buffers etc...
130
reserved-names = "ibm,slw-image", "ibm,slw-image", "ibm,firmware-stacks", "ibm,firmware-data", "ibm,firmware-heap", "ibm,firmware-code", "memory@400000000";
131
reserved-ranges = <0x7 0xfe600000 0x0 0x100000 0x7 0xfe200000 0x0 0x100000 0x0 0x31e00000 0x0 0x3e0000 0x0 0x31000000 0x0 0xe00000 0x0 0x30400000 0x0 0xc00000 0x0 0x30000000 0x0 0x400000 0x4 0x0 0x0 0x600450>;
135
#address-cells = <0x1>;
139
* The following node must exist for each *core* in the system. The unit
140
* address (number after the @) is the hexadecimal HW CPU number (PIR value)
141
* of thread 0 of that core.
144
/* mandatory/standard properties */
152
* The "status" property indicate whether the core is functional. It's
153
* a string containing "okay" for a good core or "bad" for a non-functional
154
* one. You can also just ommit the non-functional ones from the DT
159
* This is the same value as the PIR of thread 0 of that core
160
* (ie same as the @xx part of the node name)
167
/* chip ID of this core */
171
* interrupt server numbers (aka HW processor numbers) of all threads
172
* on that core. This should have 8 numbers and the first one should
173
* have the same value as the above ibm,pir and reg properties
175
ibm,ppc-interrupt-server#s = <0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27>;
178
* This is the "architected processor version" as defined in PAPR. Just
179
* stick to 0x0f000004 for P8 and things will be fine
181
cpu-version = <0x0f000004>;
184
* These are various definitions of the page sizes and segment sizes
185
* supported by the MMU, those values are fine for P8 for now
187
ibm,processor-segment-sizes = <0x1c 0x28 0xffffffff 0xffffffff>;
188
ibm,processor-page-sizes = <0xc 0x10 0x18 0x22>;
189
ibm,segment-page-sizes = <0xc 0x0 0x3 0xc 0x0 0x10 0x7 0x18 0x38 0x10 0x110 0x2 0x10 0x1 0x18 0x8 0x18 0x100 0x1 0x18 0x0 0x22 0x120 0x1 0x22 0x3>;
192
* Similarly that might need to be reviewed later but will do for now...
194
ibm,pa-features = [0x6 0x0 0xf6 0x3f 0xc7 0x0 0x80 0xc0];
196
/* SLB size, use as-is */
197
ibm,slb-size = <0x20>;
199
/* VSX support, use as-is */
202
/* DFP support, use as-is */
205
/* PURR/SPURR support, use as-is */
210
* Old-style core clock frequency. Only create this property if the frequency fits
211
* in a 32-bit number. Do not create it if it doesn't
213
clock-frequency = <0xf5552d00>;
216
* mandatory: 64-bit version of the core clock frequency, always create this
219
ibm,extended-clock-frequency = <0x0 0xf5552d00>;
221
/* Timebase freq has a fixed value, always use that */
222
timebase-frequency = <0x1e848000>;
225
ibm,extended-timebase-frequency = <0x0 0x1e848000>;
227
/* Use as-is, values might need to be adjusted but that will do for now */
228
reservation-granule-size = <0x80>;
229
d-tlb-size = <0x800>;
235
d-cache-block-size = <0x80>;
236
i-cache-block-size = <0x80>;
237
d-cache-size = <0x10000>;
238
i-cache-size = <0x8000>;
239
i-cache-sets = <0x4>;
240
d-cache-sets = <0x8>;
241
performance-monitor = <0x0 0x1>;
244
* optional: phandle of the node representing the L2 cache for this core,
245
* note: it can also be named "next-level-cache", Linux will support both
246
* and Sapphire doesn't currently use those properties, just passes them
253
* Cache nodes. Those are siblings of the processor nodes under /cpus and
254
* represent the various level of caches.
256
* The unit address (and reg property) is mostly free-for-all as long as
257
* there is no collisions. On HDAT machines we use the following encoding
258
* which I encourage you to also follow to limit surprises:
260
* L2 : (0x20 << 24) | PIR (PIR is PIR value of thread 0 of core)
261
* L3 : (0x30 << 24) | PIR
262
* L3.5 : (0x35 << 24) | PIR
264
* In addition, each cache points to the next level cache via its
265
* own "l2-cache" (or "next-level-cache") property, so the core node
266
* points to the L2, the L2 points to the L3 etc...
271
device_type = "cache";
275
d-cache-sets = <0x8>;
276
i-cache-sets = <0x8>;
277
d-cache-size = <0x80000>;
278
i-cache-size = <0x80000>;
284
device_type = "cache";
288
d-cache-sets = <0x8>;
289
i-cache-sets = <0x8>;
290
d-cache-size = <0x800000>;
291
i-cache-size = <0x800000>;
297
* Interrupt presentation controller (ICP) nodes
299
* There is some flexibility as to how many of these are presents since
300
* a given node can represent multiple ICPs. When generating from HDAT we
301
* chose to create one per core
303
interrupt-controller@3ffff80020000 {
305
compatible = "IBM,ppc-xicp", "IBM,power8-icp";
306
interrupt-controller;
307
#address-cells = <0x0>;
308
device_type = "PowerPC-External-Interrupt-Presentation";
311
* Range of HW CPU IDs represented by that node. In this example
312
* the core starting at PIR 0x20 and 8 threads, which corresponds
313
* to the CPU node of the example above. The property in theory
314
* supports multiple ranges but Linux doesn't.
316
ibm,interrupt-server-ranges = <0x20 0x8>;
319
* For each server in the above range, the physical address of the
320
* ICP register block and its size. Since the root node #address-cells
321
* and #size-cells properties are both "2", each entry is thus
322
* 2 cells address and 2 cells size (64-bit each).
324
reg = <0x3ffff 0x80020000 0x0 0x1000 0x3ffff 0x80021000 0x0 0x1000 0x3ffff 0x80022000 0x0 0x1000 0x3ffff 0x80023000 0x0 0x1000 0x3ffff 0x80024000 0x0 0x1000 0x3ffff 0x80025000 0x0 0x1000 0x3ffff 0x80026000 0x0 0x1000 0x3ffff 0x80027000 0x0 0x1000>;
328
* The "memory" nodes represent physical memory in the system. They
329
* do not represent DIMMs, memory controllers or Centaurs, thus will
330
* be expressed separately.
332
* In order to be able to handle affinity properly, we require that
333
* a memory node is created for each range of memory that has a different
334
* "affinity", which in practice means for each chip since we don't
335
* support memory interleaved across multiple chips on P8.
337
* Additionally, it is *not* required that one chip = one memory node,
338
* it is perfectly acceptable to break down the memory of one chip into
339
* multiple memory nodes (typically skiboot does that if the two MCs
340
* are not interlaved).
343
device_type = "memory";
346
* We support multiple entries in the ibm,chip-id property for
347
* memory nodes in case the memory is interleaved across multiple
348
* chips but that shouldn't happen on P8
352
/* The "reg" property is 4 cells, as usual for a child of
353
* the root node, 2 cells of address and 2 cells of size
355
reg = <0x0 0x0 0x4 0x0>;
359
* The XSCOM node. This is the closest thing to a "chip" node we have.
360
* there must be one per chip in the system (thus a DCM has two) and
361
* while it represents the "parent" of various devices on the PIB/PCB
362
* that we want to expose, it is also used to store all sort of
363
* miscellaneous per-chip information on HDAT based systems (such
366
xscom@3fc0000000000 {
367
/* standard & mandatory */
368
#address-cells = <0x1>;
371
compatible = "ibm,xscom", "ibm,power8-xscom";
373
/* The chip ID as usual ... */
376
/* The base address of xscom for that chip */
377
reg = <0x3fc00 0x0 0x8 0x0>;
380
* This comes from HDAT and I *think* is the raw content of the
381
* module VPD eeprom (and thus doesn't have a standard ASCII keyword
382
* VPD format). We don't currently use it though ...
384
ibm,module-vpd = < ... big pile of binary data ... >;
386
/* PSI host bridge XSCOM register set */
388
reg = <0x2010900 0x20>;
389
compatible = "ibm,power8-psihb-x", "ibm,psihb-x";
392
/* Chip TOD XSCOM register set */
394
reg = <0x40000 0x34>;
395
compatible = "ibm,power-chiptod", "ibm,power8-chiptod";
398
* Create that property with no value if this chip has
399
* the Primary TOD in the topology. If it has the secondary
400
* one (backup master ?) use "secondary".
405
/* NX XSCOM register set */
407
reg = <0x2010000 0x4000>;
408
compatible = "ibm,power-nx", "ibm,power8-nx";
412
* PCI "PE Master" XSCOM register set for each active PHB
414
* For now, do *not* create these if the PHB isn't connected,
415
* clocked, or the PHY/HSS not configured.
418
reg = <0x2012000 0x20 0x9012000 0x5 0x9013c00 0x15>;
419
compatible = "ibm,power8-pbcq";
421
/* Indicate the PHB index on the chip, ie, 0,1 or 2 */
422
ibm,phb-index = <0x0>;
424
/* Create that property to use the IBM-style "A/B" dual input
425
* slot presence detect mechanism.
430
* TBD: Lane equalization values. Not currently used by
431
* skiboot but will have to be sorted out
437
reg = <0x2012400 0x20 0x9012400 0x5 0x9013c40 0x15>;
438
compatible = "ibm,power8-pbcq";
439
ibm,phb-index = <0x1>;
445
* Here's the LPC bus. Ideally each chip has one but in
446
* practice it's ok to only populate the ones actually
447
* used for something. This is not an exact representation
448
* of HW, in that case we would have eccb -> opb -> lpc,
449
* but instead we just have an lpc node and the address is
450
* the base of the ECCB register set for it
452
* Devices on the LPC are represented as children nodes,
453
* see example below for a standard UART.
457
* Empty property indicating this is the primary
458
* LPC bus. It will be used for the default UART
459
* if any and this is the bus that will be used
460
* by Linux as the virtual 64k of IO ports
465
* 2 cells of address, the first one indicates the
466
* address type, see below
468
#address-cells = <0x2>;
471
compatible = "ibm,power8-lpc";
474
* Example device: a UART on IO ports.
476
* LPC address have 2 cells. The first cell is the
477
* address type as follow:
479
* 0 : LPC memory space
483
* (This corresponds to the OPAL_LPC_* arguments
484
* passed to the opal_lpc_read/write functions)
486
* The unit address follows the old ISA convention
487
* for open firmware which prefixes IO ports with "i".
489
* (This is not critical and can be 1,3f8 if that's
490
* problematic to generate)
494
compatible = "ns16550", "pnpPNP,501";
496
/* Baud rate generator base frequency */
497
clock-frequency = < 1843200 >;
499
/* Default speed to use */
500
current-speed = < 115200 >;
502
/* Historical, helps Linux */
503
device_type = "serial";
506
* Indicate which chip ID the interrupt
507
* is routed to (we assume it will always
508
* be the "host error interrupt" (aka
509
* "TPM interrupt" of that chip).
511
ibm,irq-chip-id = <0x0>;