summaryrefslogtreecommitdiff
path: root/board/nvidia/seaboard/flashmap-twostop-4mb.dtsi
blob: 9ff6ae42cd1f8c9116c959d78b444e5b60ebfd89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
/*
* Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/

/*
* This is the flash map (fmap) for a twostop firmware. It defines all the areas
* that Chrome OS expects to find in its firmware device. The device is split
* into a number of top-level sections, and within each are several areas.
*
* Available flags for each entry are: read-only, compresed.
* All sections will be marked static in the fmap.
*/

/include/ "flashmap-ro.dtsi"

/*
* TODO: Although we can squeeze R/O and R/W blobs into 2 MB, we do not do
* so because:
*
* - (A minor reason) Not every 4 MB flash chip can write-protect just the
*   first 1 MB.
*
* - (The main reason) We do not know how many tools or scripts implicitly
*   assume that R/O section consumes the first half 2 MB.
*
* In the long run, we should find and fix all those tools and scripts that
* have incorrect implicit assumption of R/O section, but for now, we just
* cannot squeeze the image size down to 2 MB at the risk of wrongly write-
* protecting the R/W blobs.
*/

/ {
	flash@0 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "winbond,W25Q32BVSSIG", "cfi-flash",
			"chromeos,flashmap";
		reg = <0x00000000 0x00400000>;

		/* ---- Section: Rewritable slot A ---- */
		rw-a@200000 {
			label = "rw-section-a";
			/* Alignment: 4k (for updating) */
			reg = <0x00200000 0x00078000>;
		};
		rw-a-vblock@200000 {
			label = "vblock-a";
			/* Alignment: 4k (for updating) and must be in start of
			 * each RW_SECTION. */
			reg = <0x00200000 0x00002000>;
			type = "keyblock boot";
			keyblock = "dev_firmware.keyblock";
			signprivate = "dev_firmware_data_key.vbprivk";
			version = <1>;
			kernelkey = "kernel_subkey.vbpubk";
			preamble-flags = <1>;
		};
		rw-a-boot@202000 {
			/* Alignment: no requirement (yet). */
			label = "fw-main-a";
			reg = <0x00202000 0x00075000>;
			type = "blob boot";
		};
		rw-a-firmware-id@277f00 {
			/* Alignment: no requirement. */
			label = "rw-fwid-a";
			reg = <0x00277f00 0x00000100>;
			read-only;
			type = "blobstring fwid";
		};

		/* ---- Section: Rewritable slot B ---- */
		rw-b@278000 {
			label = "rw-section-b";
			/* Alignment: 4k (for updating) */
			reg = <0x00278000 0x00078000>;
		};
		rw-b-vblock@278000 {
			label = "vblock-b";
			/* Alignment: 4k (for updating) and must be in start of
			 * each RW_SECTION. */
			reg = <0x00278000 0x00002000>;
			type = "keyblock boot";
			keyblock = "firmware.keyblock";
			signprivate = "firmware_data_key.vbprivk";
			version = <1>;
			kernelkey = "kernel_subkey.vbpubk";
			preamble-flags = <1>;
		};
		rw-b-boot@27a000 {
			label = "fw-main-b";
			/* Alignment: no requirement (yet). */
			reg = <0x0027a000 0x00075000>;
			type = "blob boot";
		};
		rw-b-firmware-id@2eff00 {
			label = "rw-fwid-b";
			/* Alignment: no requirement. */
			reg = <0x002eff00 0x00000100>;
			read-only;
			type = "blobstring fwid";
		};

		/* ---- Section: Rewritable VPD 32 KB ---- */
		rw-vpd@2f0000 {
			label = "rw-vpd";
			/* Alignment: 4k (for updating) */
			reg = <0x002f0000 0x00008000>;
			type = "wiped";
			wipe-value = [ff];
		};

		/* ---- Section: Rewritable shared 16 KB---- */
		shared-section@2f8000 {
			/* Alignment: 4k (for updating).
			 * Anything in this range may be updated in recovery. */
			label = "rw-shared";
			reg = <0x002f8000 0x00004000>;
		};
		shared-data@2f8000 {
			label = "shared-data";
			/* Alignment: 4k (for random read/write).
			 * RW firmware can put calibration data here. */
			reg = <0x002f8000 0x00004000>;
			type = "wiped";
			wipe-value = [00];
		};
		/* ---- Section: Rewritable private 16 KB---- */
		private-section@2fc000 {
			/* Anything in this range will never be updated */
			label = "rw-private";
			reg = <0x002fc000 0x00004000>;
		};
		dev-cfg@2fe000 {
			label = "dev-cfg";
			/* Alignment: 4k, and must occupy bottom of U-Boot
			 * firmware -- check CONFIG_ENV_OFFSET */
			reg = <0x002fe000 0x00002000>;

			/*
			 * We could put the dev environment here, but U-Boot has
			 * a default built in. Devs can 'saveenv' to set this
			 * up.
			 */
			type = "wiped";
			wipe-value = [00];
		};
	};
};