blob: 241f397ba6e711f6dd9c8c0d58f9bc66127caf04 [file] [log] [blame]
Simon Glass7dcc2f72021-08-18 21:40:25 -06001// SPDX-License-Identifier: GPL-2.0+
Simon Glassdc8c91a2019-05-18 11:59:41 -06002/*
3 * This is the common sandbox device-tree nodes. This is shared between sandbox
4 * and sandbox64 builds.
5 */
6
Eddie James5999ea22023-10-24 10:43:51 -05007#include <config.h>
Dzmitry Sankouski2ea06222023-01-22 18:21:22 +03008#include <dt-bindings/input/input.h>
9
Simon Glassdc8c91a2019-05-18 11:59:41 -060010#define USB_CLASS_HUB 9
11
12/ {
Eddie James5999ea22023-10-24 10:43:51 -050013 reserved-memory {
14 #address-cells = <1>;
15 #size-cells = <1>;
16 ranges;
17
18 event_log: tcg_event_log {
19 no-map;
20 reg = <(CFG_SYS_SDRAM_SIZE - 0x2000) 0x2000>;
21 };
22 };
23
Philippe Reynes059df562022-03-28 22:56:53 +020024 binman {
25 };
26
Simon Glassdc8c91a2019-05-18 11:59:41 -060027 chosen {
28 stdout-path = "/serial";
29 };
30
Rasmus Villemoes374d5d92022-09-27 11:54:05 +020031 alarm_wdt: alarm-wdt {
32 compatible = "sandbox,alarm-wdt";
33 timeout-sec = <5>;
34 u-boot,autostart;
35 };
36
Simon Glassdc8c91a2019-05-18 11:59:41 -060037 audio: audio-codec {
38 compatible = "sandbox,audio-codec";
39 #sound-dai-cells = <1>;
40 };
41
Simon Glass7d0478d2022-04-24 23:31:21 -060042 bootstd {
43 compatible = "u-boot,boot-std";
44 filename-prefixes = "./";
Simon Glass2045ca52023-08-14 16:40:30 -060045
46 cedit-theme {
47 font-size = <30>;
48 menu-inset = <3>;
49 menuitem-gap-y = <1>;
50 };
Simon Glass7d0478d2022-04-24 23:31:21 -060051 };
52
Philippe Reynesbd3e4882020-07-24 18:19:48 +020053 buttons {
54 compatible = "gpio-keys";
55
Heinrich Schuchardt39916bb2020-09-14 12:50:54 +020056 btn1 {
Philippe Reynesbd3e4882020-07-24 18:19:48 +020057 gpios = <&gpio_a 3 0>;
Heinrich Schuchardt39916bb2020-09-14 12:50:54 +020058 label = "button1";
Dzmitry Sankouski2ea06222023-01-22 18:21:22 +030059 linux,code = <BTN_1>;
Philippe Reynesbd3e4882020-07-24 18:19:48 +020060 };
61
Heinrich Schuchardt39916bb2020-09-14 12:50:54 +020062 btn2 {
Philippe Reynesbd3e4882020-07-24 18:19:48 +020063 gpios = <&gpio_a 4 0>;
Heinrich Schuchardt39916bb2020-09-14 12:50:54 +020064 label = "button2";
Dzmitry Sankouski2ea06222023-01-22 18:21:22 +030065 linux,code = <BTN_2>;
Philippe Reynesbd3e4882020-07-24 18:19:48 +020066 };
67 };
68
Simon Glass88280522020-10-03 11:31:32 -060069 clk_fixed: clk-fixed {
Simon Glass8c103c32023-02-13 08:56:33 -070070 bootph-all;
Simon Glass88139862021-03-15 17:25:24 +130071 compatible = "sandbox,fixed-clock";
Simon Glass88280522020-10-03 11:31:32 -060072 #clock-cells = <0>;
73 clock-frequency = <1234>;
74 };
75
76 clk_sandbox: clk-sbox {
Simon Glass8c103c32023-02-13 08:56:33 -070077 bootph-all;
Simon Glass88280522020-10-03 11:31:32 -060078 compatible = "sandbox,clk";
79 #clock-cells = <1>;
80 assigned-clocks = <&clk_sandbox 3>;
81 assigned-clock-rates = <321>;
82 };
83
84 clk-test {
Simon Glass8c103c32023-02-13 08:56:33 -070085 bootph-all;
Simon Glass88280522020-10-03 11:31:32 -060086 compatible = "sandbox,clk-test";
87 clocks = <&clk_fixed>,
88 <&clk_sandbox 1>,
89 <&clk_sandbox 0>,
90 <&clk_sandbox 3>,
91 <&clk_sandbox 2>;
92 clock-names = "fixed", "i2c", "spi", "uart2", "uart1";
93 };
94
Simon Glassdc8c91a2019-05-18 11:59:41 -060095 gpio_a: gpios@0 {
Simon Glass8c103c32023-02-13 08:56:33 -070096 bootph-some-ram;
Simon Glassdc8c91a2019-05-18 11:59:41 -060097 gpio-controller;
98 compatible = "sandbox,gpio";
99 #gpio-cells = <1>;
100 gpio-bank-name = "a";
101 sandbox,gpio-count = <20>;
102 };
103
104 gpio_b: gpios@1 {
Simon Glass8c103c32023-02-13 08:56:33 -0700105 bootph-pre-ram;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600106 gpio-controller;
107 compatible = "sandbox,gpio";
108 #gpio-cells = <2>;
109 gpio-bank-name = "b";
110 sandbox,gpio-count = <10>;
111 };
112
Simon Glass48609d02021-08-07 07:24:12 -0600113 gpio-test {
Simon Glass8c103c32023-02-13 08:56:33 -0700114 bootph-pre-ram;
Simon Glass48609d02021-08-07 07:24:12 -0600115 compatible = "sandbox,gpio-test";
116 test-gpios = <&gpio_b 3 0>;
117 };
118
Simon Glassdc8c91a2019-05-18 11:59:41 -0600119 hexagon {
120 compatible = "demo-simple";
121 colour = "white";
122 sides = <6>;
123 };
124
125 i2c_0: i2c@0 {
126 eeprom@2c {
127 reg = <0x2c>;
128 compatible = "i2c-eeprom";
129 sandbox,emul = <&emul_eeprom>;
130 };
131
132 rtc_0: rtc@43 {
133 reg = <0x43>;
134 compatible = "sandbox-rtc";
135 sandbox,emul = <&emul0>;
Simon Glassdd8a2902023-02-22 09:34:04 -0700136 bootph-pre-ram;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600137 };
138 sandbox_pmic: sandbox_pmic {
139 reg = <0x40>;
140 };
141
142 mc34708: pmic@41 {
143 reg = <0x41>;
144 };
145
146 i2c_emul: emul {
Simon Glassdd8a2902023-02-22 09:34:04 -0700147 bootph-pre-ram;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600148 reg = <0xff>;
149 compatible = "sandbox,i2c-emul-parent";
150 emul_eeprom: emul-eeprom {
151 compatible = "sandbox,i2c-eeprom";
152 sandbox,filename = "i2c.bin";
153 sandbox,size = <256>;
Simon Glass23f40a32021-02-03 06:01:16 -0700154 #emul-cells = <0>;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600155 };
156 emul0: emul0 {
Simon Glassdd8a2902023-02-22 09:34:04 -0700157 bootph-pre-ram;
Simon Glass23f40a32021-02-03 06:01:16 -0700158 compatible = "sandbox,i2c-rtc-emul";
159 #emul-cells = <0>;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600160 };
161 };
162 };
163
164 i2s: i2s {
165 compatible = "sandbox,i2s";
166 #sound-dai-cells = <1>;
167 };
168
Simon Glass3e57ad92021-08-07 07:24:11 -0600169 irq_sandbox: irq-sbox {
Simon Glass8c103c32023-02-13 08:56:33 -0700170 bootph-pre-ram;
Simon Glass3e57ad92021-08-07 07:24:11 -0600171 compatible = "sandbox,irq";
172 interrupt-controller;
173 #interrupt-cells = <2>;
174 };
175
176 irq-test {
Simon Glass8c103c32023-02-13 08:56:33 -0700177 bootph-pre-ram;
Simon Glass3e57ad92021-08-07 07:24:11 -0600178 compatible = "sandbox,irq-test";
179 interrupts-extended = <&irq_sandbox 3 0>;
180 };
181
Simon Glassdc8c91a2019-05-18 11:59:41 -0600182 lcd {
Simon Glass8c103c32023-02-13 08:56:33 -0700183 bootph-some-ram;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600184 compatible = "sandbox,lcd-sdl";
185 xres = <1366>;
186 yres = <768>;
Simon Glassa466db52020-02-03 07:36:14 -0700187 log2-depth = <5>;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600188 };
189
190 leds {
191 compatible = "gpio-leds";
192
193 iracibble {
194 gpios = <&gpio_a 1 0>;
195 label = "sandbox:red";
196 };
197
198 martinet {
199 gpios = <&gpio_a 2 0>;
200 label = "sandbox:green";
201 };
202 };
203
Tom Rini42c64d12020-02-11 12:41:23 -0500204 pci@0 {
Simon Glass3b65ee32019-12-06 21:41:54 -0700205 pci@1e,0 {
206 compatible = "sandbox,pmc";
207 reg = <0xf000 0 0 0 0>;
208 sandbox,emul = <&pmc_emul>;
209 gpe0-dwx-mask = <0xf>;
210 gpe0-dwx-shift-base = <4>;
211 gpe0-dw = <6 7 9>;
212 gpe0-sts = <0x20>;
213 gpe0-en = <0x30>;
214 };
215
Simon Glassdc8c91a2019-05-18 11:59:41 -0600216 pci@1f,0 {
217 compatible = "pci-generic";
218 reg = <0xf800 0 0 0 0>;
Simon Glass9b69ba42019-09-25 08:56:10 -0600219 sandbox,emul = <&swap_case_emul>;
220 };
221 };
222
223 emul {
224 compatible = "sandbox,pci-emul-parent";
Simon Glass3b65ee32019-12-06 21:41:54 -0700225 pmc_emul: emul@1e,0 {
226 compatible = "sandbox,pmc-emul";
227 };
Simon Glass9b69ba42019-09-25 08:56:10 -0600228 swap_case_emul: emul@1f,0 {
229 compatible = "sandbox,swap-case";
Simon Glassdc8c91a2019-05-18 11:59:41 -0600230 };
231 };
232
233 pinctrl {
234 compatible = "sandbox,pinctrl";
235 status = "okay";
236
237 pinctrl_i2c0: i2c0 {
238 groups = "i2c";
239 function = "i2c";
240 bias-pull-up;
241 };
242
243 pinctrl_serial0: uart0 {
244 groups = "serial_a";
245 function = "serial";
246 };
247
248 pinctrl_onewire0: onewire0 {
249 groups = "w1";
250 function = "w1";
251 bias-pull-up;
252 };
253 };
254
255 reset@1 {
256 compatible = "sandbox,reset";
Simon Glass8c103c32023-02-13 08:56:33 -0700257 bootph-some-ram;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600258 };
259
Vincent Stehlé619a8152021-03-10 15:33:30 +0100260 rng {
261 compatible = "sandbox,sandbox-rng";
262 };
263
Simon Glass22c80d52022-09-21 16:21:47 +0200264 scsi {
265 compatible = "sandbox,scsi";
266 };
267
Simon Glassdc8c91a2019-05-18 11:59:41 -0600268 sound {
269 compatible = "sandbox,sound";
270 cpu {
271 sound-dai = <&i2s 0>;
272 };
273
274 codec {
275 sound-dai = <&audio 0>;
276 };
277 };
278
279 spi@0 {
280 firmware_storage_spi: flash@0 {
Simon Glass8c103c32023-02-13 08:56:33 -0700281 bootph-some-ram;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600282 reg = <0>;
Simon Glass24c27762019-05-18 11:59:49 -0600283 compatible = "spansion,m25p16", "jedec,spi-nor";
Simon Glassdc8c91a2019-05-18 11:59:41 -0600284 spi-max-frequency = <40000000>;
285 sandbox,filename = "spi.bin";
286 };
287 };
288
289 spl-test {
Simon Glass8c103c32023-02-13 08:56:33 -0700290 bootph-pre-ram;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600291 compatible = "sandbox,spl-test";
292 boolval;
293 intval = <1>;
294 intarray = <2 3 4>;
Simon Glasseec44c72021-07-28 19:23:11 -0600295 maybe-empty-int = <>;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600296 byteval = [05];
297 bytearray = [06];
298 longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
299 stringval = "message";
300 stringarray = "multi-word", "message";
301 };
302
303 spl-test2 {
Simon Glass8c103c32023-02-13 08:56:33 -0700304 bootph-pre-ram;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600305 compatible = "sandbox,spl-test";
306 intval = <3>;
307 intarray = <5>;
308 byteval = [08];
309 bytearray = [01 23 34];
310 longbytearray = [09 0a 0b 0c];
311 stringval = "message2";
312 stringarray = "another", "multi-word", "message";
313 };
314
315 spl-test3 {
Simon Glass8c103c32023-02-13 08:56:33 -0700316 bootph-pre-ram;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600317 compatible = "sandbox,spl-test";
318 stringarray = "one";
Simon Glasseec44c72021-07-28 19:23:11 -0600319 maybe-empty-int = <1>;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600320 };
321
Patrick Delaunay099ed452019-05-21 19:19:11 +0200322 spl-test5 {
Simon Glass8c103c32023-02-13 08:56:33 -0700323 bootph-verify;
Patrick Delaunay099ed452019-05-21 19:19:11 +0200324 compatible = "sandbox,spl-test";
325 stringarray = "tpl";
326 };
327
328 spl-test6 {
Simon Glass8c103c32023-02-13 08:56:33 -0700329 bootph-some-ram;
Patrick Delaunay099ed452019-05-21 19:19:11 +0200330 compatible = "sandbox,spl-test";
331 stringarray = "pre-proper";
332 };
333
Simon Glass3a825d32021-03-15 17:25:31 +1300334 spl-test7 {
Simon Glass8c103c32023-02-13 08:56:33 -0700335 bootph-pre-ram;
Simon Glass3a825d32021-03-15 17:25:31 +1300336 compatible = "sandbox,spl-test";
337 stringarray = "spl";
Patrick Delaunay099ed452019-05-21 19:19:11 +0200338 };
339
Simon Glassdc8c91a2019-05-18 11:59:41 -0600340 square {
341 compatible = "demo-shape";
342 colour = "blue";
343 sides = <4>;
344 };
345
346 timer {
347 compatible = "sandbox,timer";
348 clock-frequency = <1000000>;
349 };
350
351 tpm {
Simon Glassdc8c91a2019-05-18 11:59:41 -0600352 compatible = "google,sandbox-tpm";
353 };
354
355 tpm2 {
356 compatible = "sandbox,tpm2";
Eddie James5999ea22023-10-24 10:43:51 -0500357 memory-region = <&event_log>;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600358 };
359
360 triangle {
361 compatible = "demo-shape";
362 colour = "cyan";
363 sides = <3>;
364 character = <83>;
365 light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
366 };
367
368 /* Needs to be available prior to relocation */
369 uart0: serial {
Simon Glass8c103c32023-02-13 08:56:33 -0700370 bootph-pre-ram;
371 bootph-pre-sram;
372 bootph-verify;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600373 compatible = "sandbox,serial";
374 sandbox,text-colour = "cyan";
375 pinctrl-names = "default";
376 pinctrl-0 = <&pinctrl_serial0>;
377 };
378
379 usb@0 {
380 compatible = "sandbox,usb";
381 status = "disabled";
382 hub {
383 compatible = "sandbox,usb-hub";
384 #address-cells = <1>;
385 #size-cells = <0>;
386 flash-stick {
387 reg = <0>;
388 compatible = "sandbox,usb-flash";
389 };
390 };
391 };
392
393 usb@1 {
394 compatible = "sandbox,usb";
395 hub {
396 compatible = "usb-hub";
397 usb,device-class = <USB_CLASS_HUB>;
398 hub-emul {
399 compatible = "sandbox,usb-hub";
400 #address-cells = <1>;
401 #size-cells = <0>;
402 flash-stick {
403 reg = <0>;
404 compatible = "sandbox,usb-flash";
405 sandbox,filepath = "flash.bin";
406 };
407 };
408 };
409 };
410
411 usb@2 {
412 compatible = "sandbox,usb";
413 status = "disabled";
414 };
415
416 spmi: spmi@0 {
417 compatible = "sandbox,spmi";
418 #address-cells = <0x1>;
419 #size-cells = <0x1>;
420 pm8916@0 {
421 compatible = "qcom,spmi-pmic";
422 reg = <0x0 0x1>;
423 #address-cells = <0x1>;
424 #size-cells = <0x1>;
425
426 spmi_gpios: gpios@c000 {
427 compatible = "qcom,pm8916-gpio";
428 reg = <0xc000 0x400>;
429 gpio-controller;
430 gpio-count = <4>;
431 #gpio-cells = <2>;
432 gpio-bank-name="spmi";
433 };
434 };
435 };
436
437 axi: axi@0 {
438 compatible = "sandbox,axi";
439 #address-cells = <0x1>;
440 #size-cells = <0x1>;
441 store@0 {
442 compatible = "sandbox,sandbox_store";
443 reg = <0x0 0x400>;
444 };
445 };
446
447 onewire0: onewire {
448 compatible = "w1-gpio";
449 gpios = <&gpio_a 8>;
450 pinctrl-names = "default";
451 pinctrl-0 = <&pinctrl_onewire0>;
452 status = "okay";
453
454 sandbox_eeprom0: sandbox_eeprom@0 {
455 compatible = "sandbox,w1-eeprom";
456 status = "okay";
457 };
458 };
459
460 sandbox_tee {
461 compatible = "sandbox,tee";
462 };
Robert Marko1fad2cb2022-09-06 13:30:35 +0200463
464 thermal {
465 compatible = "sandbox,thermal";
466 };
Abdellatif El Khlifia09852d2023-08-04 14:33:41 +0100467
468 arm-ffa-emul {
469 compatible = "sandbox,arm-ffa-emul";
470
471 sandbox-arm-ffa {
472 compatible = "sandbox,arm-ffa";
473 };
474 };
475
Simon Glassdc8c91a2019-05-18 11:59:41 -0600476};
477
478&cros_ec {
479 /*
480 * This describes the flash memory within the EC. Note
481 * that the STM32L flash erases to 0, not 0xff.
482 */
483 flash {
484 image-pos = <0x08000000>;
485 size = <0x20000>;
486 erase-value = <0>;
487
488 /* Information for sandbox */
489 ro {
490 image-pos = <0>;
491 size = <0xf000>;
492 };
493 wp-ro {
494 image-pos = <0xf000>;
495 size = <0x1000>;
496 };
497 rw {
498 image-pos = <0x10000>;
499 size = <0x10000>;
500 };
501 };
502
503 keyboard-controller {
Simon Glass8c103c32023-02-13 08:56:33 -0700504 bootph-some-ram;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600505 };
506};