blob: 321894e01d9916002867645574a514dab149da9f [file] [log] [blame]
Michael Prattfa28d142018-06-11 13:07:09 -06001* Memory binding
2
3The memory binding for U-Boot is as in the ePAPR with the following additions:
4
5Optional subnodes can be used defining the memory layout for different board
6ID masks. To match a set of board ids, a board-id node may define match-mask
7and match-value ints to define a mask to apply to the board id, and the value
8that the result should have for the match to be considered valid. The mask
9defaults to -1, meaning that the value must fully match the board id.
10
11If subnodes are present, then the /memory node must define these properties:
12
13- #address-cells: should be 1.
14- #size-cells: should be 0.
15
16Each subnode must define
17
18 reg - board ID or mask for this subnode
19 memory-banks - list of memory banks in the same format as normal
20
21Each subnode may optionally define:
22
23 match-mask - A mask to apply to the board id. This must be accompanied by
24 match-value.
25 match-value - The required resulting value of the board id mask for the given
26 node to be considered a match.
27 auto-size - Indicates that the value given for a bank is the maximum size,
28 each bank is probed to determine its actual size, which may be
29 smaller
30
31
32The board id determination is up to the vendor and is not defined by this
33binding.
34
35Example:
36
37memory {
38 #address-cells = <1>;
39 #size-cells = <1>;
40 reg = <0x20000000 0x20000000
41 0x40000000 0x20000000
42 0x60000000 0x20000000
43 0x80000000 0x20000000>;
44 auto-size;
45 board-id@0 {
46 match-value = <17>;
47 reg = <0x20000000 0x20000000
48 0x40000000 0x20000000>;
49 };
50 board-id@1 {
51 match-mask = <2>;
52 match-value = <2>;
53 reg = <0x20000000 0x20000000
54 0x40000000 0x20000000
55 0x60000000 0x20000000
56 0x80000000 0x20000000
57 0xa0000000 0x20000000
58 0xc0000000 0x20000000
59 0xe0000000 0x20000000>;
60 };
61};
62
63
64This shows a system with the following properties:
65* Default of 2GB of memory, auto-sized, so could be smaller
66* 3.5GB of memory (with no auto-size) if (board id & 2) is 2
67* 1GB of memory (with no auto-size) if board id is 17.