blob: c6d5650c20b7fe45b67cdfc4dd37e9ae8846462d [file] [log] [blame]
Simon Glassdc8c91a2019-05-18 11:59:41 -06001/*
2 * This is the common sandbox device-tree nodes. This is shared between sandbox
3 * and sandbox64 builds.
4 */
5
6#define USB_CLASS_HUB 9
7
8/ {
9 chosen {
10 stdout-path = "/serial";
11 };
12
13 audio: audio-codec {
14 compatible = "sandbox,audio-codec";
15 #sound-dai-cells = <1>;
16 };
17
18 gpio_a: gpios@0 {
19 u-boot,dm-pre-reloc;
20 gpio-controller;
21 compatible = "sandbox,gpio";
22 #gpio-cells = <1>;
23 gpio-bank-name = "a";
24 sandbox,gpio-count = <20>;
25 };
26
27 gpio_b: gpios@1 {
28 u-boot,dm-pre-reloc;
29 gpio-controller;
30 compatible = "sandbox,gpio";
31 #gpio-cells = <2>;
32 gpio-bank-name = "b";
33 sandbox,gpio-count = <10>;
34 };
35
36 hexagon {
37 compatible = "demo-simple";
38 colour = "white";
39 sides = <6>;
40 };
41
42 i2c_0: i2c@0 {
43 eeprom@2c {
44 reg = <0x2c>;
45 compatible = "i2c-eeprom";
46 sandbox,emul = <&emul_eeprom>;
47 };
48
49 rtc_0: rtc@43 {
50 reg = <0x43>;
51 compatible = "sandbox-rtc";
52 sandbox,emul = <&emul0>;
53 };
54 sandbox_pmic: sandbox_pmic {
55 reg = <0x40>;
56 };
57
58 mc34708: pmic@41 {
59 reg = <0x41>;
60 };
61
62 i2c_emul: emul {
63 reg = <0xff>;
64 compatible = "sandbox,i2c-emul-parent";
65 emul_eeprom: emul-eeprom {
66 compatible = "sandbox,i2c-eeprom";
67 sandbox,filename = "i2c.bin";
68 sandbox,size = <256>;
69 };
70 emul0: emul0 {
71 compatible = "sandbox,i2c-rtc";
72 };
73 };
74 };
75
76 i2s: i2s {
77 compatible = "sandbox,i2s";
78 #sound-dai-cells = <1>;
79 };
80
81 lcd {
82 u-boot,dm-pre-reloc;
83 compatible = "sandbox,lcd-sdl";
84 xres = <1366>;
85 yres = <768>;
86 };
87
88 leds {
89 compatible = "gpio-leds";
90
91 iracibble {
92 gpios = <&gpio_a 1 0>;
93 label = "sandbox:red";
94 };
95
96 martinet {
97 gpios = <&gpio_a 2 0>;
98 label = "sandbox:green";
99 };
100 };
101
102 pci-controller {
103 pci@1f,0 {
104 compatible = "pci-generic";
105 reg = <0xf800 0 0 0 0>;
106 emul@1f,0 {
107 compatible = "sandbox,swap-case";
108 };
109 };
110 };
111
112 pinctrl {
113 compatible = "sandbox,pinctrl";
114 status = "okay";
115
116 pinctrl_i2c0: i2c0 {
117 groups = "i2c";
118 function = "i2c";
119 bias-pull-up;
120 };
121
122 pinctrl_serial0: uart0 {
123 groups = "serial_a";
124 function = "serial";
125 };
126
127 pinctrl_onewire0: onewire0 {
128 groups = "w1";
129 function = "w1";
130 bias-pull-up;
131 };
132 };
133
134 reset@1 {
135 compatible = "sandbox,reset";
136 };
137
138 sound {
139 compatible = "sandbox,sound";
140 cpu {
141 sound-dai = <&i2s 0>;
142 };
143
144 codec {
145 sound-dai = <&audio 0>;
146 };
147 };
148
149 spi@0 {
150 firmware_storage_spi: flash@0 {
151 u-boot,dm-pre-reloc;
152 reg = <0>;
Simon Glass24c27762019-05-18 11:59:49 -0600153 compatible = "spansion,m25p16", "jedec,spi-nor";
Simon Glassdc8c91a2019-05-18 11:59:41 -0600154 spi-max-frequency = <40000000>;
155 sandbox,filename = "spi.bin";
156 };
157 };
158
159 spl-test {
160 u-boot,dm-pre-reloc;
161 compatible = "sandbox,spl-test";
162 boolval;
163 intval = <1>;
164 intarray = <2 3 4>;
165 byteval = [05];
166 bytearray = [06];
167 longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
168 stringval = "message";
169 stringarray = "multi-word", "message";
170 };
171
172 spl-test2 {
173 u-boot,dm-pre-reloc;
174 compatible = "sandbox,spl-test";
175 intval = <3>;
176 intarray = <5>;
177 byteval = [08];
178 bytearray = [01 23 34];
179 longbytearray = [09 0a 0b 0c];
180 stringval = "message2";
181 stringarray = "another", "multi-word", "message";
182 };
183
184 spl-test3 {
185 u-boot,dm-pre-reloc;
186 compatible = "sandbox,spl-test";
187 stringarray = "one";
188 };
189
190 spl-test4 {
191 u-boot,dm-pre-reloc;
192 compatible = "sandbox,spl-test.2";
193 };
194
Patrick Delaunay099ed452019-05-21 19:19:11 +0200195 spl-test5 {
196 u-boot,dm-tpl;
197 compatible = "sandbox,spl-test";
198 stringarray = "tpl";
199 };
200
201 spl-test6 {
202 u-boot,dm-pre-proper;
203 compatible = "sandbox,spl-test";
204 stringarray = "pre-proper";
205 };
206
207 spl-test7 {
208 u-boot,dm-spl;
209 compatible = "sandbox,spl-test";
210 stringarray = "spl";
211 };
212
Simon Glassdc8c91a2019-05-18 11:59:41 -0600213 square {
214 compatible = "demo-shape";
215 colour = "blue";
216 sides = <4>;
217 };
218
219 timer {
220 compatible = "sandbox,timer";
221 clock-frequency = <1000000>;
222 };
223
224 tpm {
225 u-boot,dm-pre-reloc;
226 compatible = "google,sandbox-tpm";
227 };
228
229 tpm2 {
230 compatible = "sandbox,tpm2";
231 };
232
233 triangle {
234 compatible = "demo-shape";
235 colour = "cyan";
236 sides = <3>;
237 character = <83>;
238 light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
239 };
240
241 /* Needs to be available prior to relocation */
242 uart0: serial {
243 u-boot,dm-spl;
244 compatible = "sandbox,serial";
245 sandbox,text-colour = "cyan";
246 pinctrl-names = "default";
247 pinctrl-0 = <&pinctrl_serial0>;
248 };
249
250 usb@0 {
251 compatible = "sandbox,usb";
252 status = "disabled";
253 hub {
254 compatible = "sandbox,usb-hub";
255 #address-cells = <1>;
256 #size-cells = <0>;
257 flash-stick {
258 reg = <0>;
259 compatible = "sandbox,usb-flash";
260 };
261 };
262 };
263
264 usb@1 {
265 compatible = "sandbox,usb";
266 hub {
267 compatible = "usb-hub";
268 usb,device-class = <USB_CLASS_HUB>;
269 hub-emul {
270 compatible = "sandbox,usb-hub";
271 #address-cells = <1>;
272 #size-cells = <0>;
273 flash-stick {
274 reg = <0>;
275 compatible = "sandbox,usb-flash";
276 sandbox,filepath = "flash.bin";
277 };
278 };
279 };
280 };
281
282 usb@2 {
283 compatible = "sandbox,usb";
284 status = "disabled";
285 };
286
287 spmi: spmi@0 {
288 compatible = "sandbox,spmi";
289 #address-cells = <0x1>;
290 #size-cells = <0x1>;
291 pm8916@0 {
292 compatible = "qcom,spmi-pmic";
293 reg = <0x0 0x1>;
294 #address-cells = <0x1>;
295 #size-cells = <0x1>;
296
297 spmi_gpios: gpios@c000 {
298 compatible = "qcom,pm8916-gpio";
299 reg = <0xc000 0x400>;
300 gpio-controller;
301 gpio-count = <4>;
302 #gpio-cells = <2>;
303 gpio-bank-name="spmi";
304 };
305 };
306 };
307
308 axi: axi@0 {
309 compatible = "sandbox,axi";
310 #address-cells = <0x1>;
311 #size-cells = <0x1>;
312 store@0 {
313 compatible = "sandbox,sandbox_store";
314 reg = <0x0 0x400>;
315 };
316 };
317
318 onewire0: onewire {
319 compatible = "w1-gpio";
320 gpios = <&gpio_a 8>;
321 pinctrl-names = "default";
322 pinctrl-0 = <&pinctrl_onewire0>;
323 status = "okay";
324
325 sandbox_eeprom0: sandbox_eeprom@0 {
326 compatible = "sandbox,w1-eeprom";
327 status = "okay";
328 };
329 };
330
331 sandbox_tee {
332 compatible = "sandbox,tee";
333 };
334};
335
336&cros_ec {
337 /*
338 * This describes the flash memory within the EC. Note
339 * that the STM32L flash erases to 0, not 0xff.
340 */
341 flash {
342 image-pos = <0x08000000>;
343 size = <0x20000>;
344 erase-value = <0>;
345
346 /* Information for sandbox */
347 ro {
348 image-pos = <0>;
349 size = <0xf000>;
350 };
351 wp-ro {
352 image-pos = <0xf000>;
353 size = <0x1000>;
354 };
355 rw {
356 image-pos = <0x10000>;
357 size = <0x10000>;
358 };
359 };
360
361 keyboard-controller {
362 u-boot,dm-pre-reloc;
363 };
364};