blob: ff7e5584c5580c861e9e177e3ea59a2e503e3f5e [file] [log] [blame]
Simon Glass4cc43bf2021-08-18 21:40:25 -06001// SPDX-License-Identifier: GPL-2.0+
Simon Glass28db4692019-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
Dzmitry Sankouski55003db2023-01-22 18:21:22 +03007#include <dt-bindings/input/input.h>
8
Simon Glass28db4692019-05-18 11:59:41 -06009#define USB_CLASS_HUB 9
10
11/ {
Philippe Reynes462d1632022-03-28 22:56:53 +020012 binman {
13 };
14
Simon Glass28db4692019-05-18 11:59:41 -060015 chosen {
16 stdout-path = "/serial";
17 };
18
Rasmus Villemoesf99e8802022-09-27 11:54:05 +020019 alarm_wdt: alarm-wdt {
20 compatible = "sandbox,alarm-wdt";
21 timeout-sec = <5>;
22 u-boot,autostart;
23 };
24
Simon Glass28db4692019-05-18 11:59:41 -060025 audio: audio-codec {
26 compatible = "sandbox,audio-codec";
27 #sound-dai-cells = <1>;
28 };
29
Simon Glass1b4bc152022-04-24 23:31:21 -060030 bootstd {
31 compatible = "u-boot,boot-std";
32 filename-prefixes = "./";
Simon Glass82adc292023-08-14 16:40:30 -060033
34 cedit-theme {
35 font-size = <30>;
36 menu-inset = <3>;
37 menuitem-gap-y = <1>;
38 };
Simon Glass1b4bc152022-04-24 23:31:21 -060039 };
40
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020041 buttons {
42 compatible = "gpio-keys";
43
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020044 btn1 {
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020045 gpios = <&gpio_a 3 0>;
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020046 label = "button1";
Dzmitry Sankouski55003db2023-01-22 18:21:22 +030047 linux,code = <BTN_1>;
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020048 };
49
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020050 btn2 {
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020051 gpios = <&gpio_a 4 0>;
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020052 label = "button2";
Dzmitry Sankouski55003db2023-01-22 18:21:22 +030053 linux,code = <BTN_2>;
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020054 };
55 };
56
Simon Glass6b927b12020-10-03 11:31:32 -060057 clk_fixed: clk-fixed {
Simon Glassd3a98cb2023-02-13 08:56:33 -070058 bootph-all;
Simon Glass9bb88fb2021-03-15 17:25:24 +130059 compatible = "sandbox,fixed-clock";
Simon Glass6b927b12020-10-03 11:31:32 -060060 #clock-cells = <0>;
61 clock-frequency = <1234>;
62 };
63
64 clk_sandbox: clk-sbox {
Simon Glassd3a98cb2023-02-13 08:56:33 -070065 bootph-all;
Simon Glass6b927b12020-10-03 11:31:32 -060066 compatible = "sandbox,clk";
67 #clock-cells = <1>;
68 assigned-clocks = <&clk_sandbox 3>;
69 assigned-clock-rates = <321>;
70 };
71
72 clk-test {
Simon Glassd3a98cb2023-02-13 08:56:33 -070073 bootph-all;
Simon Glass6b927b12020-10-03 11:31:32 -060074 compatible = "sandbox,clk-test";
75 clocks = <&clk_fixed>,
76 <&clk_sandbox 1>,
77 <&clk_sandbox 0>,
78 <&clk_sandbox 3>,
79 <&clk_sandbox 2>;
80 clock-names = "fixed", "i2c", "spi", "uart2", "uart1";
81 };
82
Simon Glass28db4692019-05-18 11:59:41 -060083 gpio_a: gpios@0 {
Simon Glassd3a98cb2023-02-13 08:56:33 -070084 bootph-some-ram;
Simon Glass28db4692019-05-18 11:59:41 -060085 gpio-controller;
86 compatible = "sandbox,gpio";
87 #gpio-cells = <1>;
88 gpio-bank-name = "a";
89 sandbox,gpio-count = <20>;
90 };
91
92 gpio_b: gpios@1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -070093 bootph-pre-ram;
Simon Glass28db4692019-05-18 11:59:41 -060094 gpio-controller;
95 compatible = "sandbox,gpio";
96 #gpio-cells = <2>;
97 gpio-bank-name = "b";
98 sandbox,gpio-count = <10>;
99 };
100
Simon Glass2149e112021-08-07 07:24:12 -0600101 gpio-test {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700102 bootph-pre-ram;
Simon Glass2149e112021-08-07 07:24:12 -0600103 compatible = "sandbox,gpio-test";
104 test-gpios = <&gpio_b 3 0>;
105 };
106
Simon Glass28db4692019-05-18 11:59:41 -0600107 hexagon {
108 compatible = "demo-simple";
109 colour = "white";
110 sides = <6>;
111 };
112
113 i2c_0: i2c@0 {
114 eeprom@2c {
115 reg = <0x2c>;
116 compatible = "i2c-eeprom";
117 sandbox,emul = <&emul_eeprom>;
118 };
119
120 rtc_0: rtc@43 {
121 reg = <0x43>;
122 compatible = "sandbox-rtc";
123 sandbox,emul = <&emul0>;
Simon Glasscce3e3e2023-02-22 09:34:04 -0700124 bootph-pre-ram;
Simon Glass28db4692019-05-18 11:59:41 -0600125 };
126 sandbox_pmic: sandbox_pmic {
127 reg = <0x40>;
128 };
129
130 mc34708: pmic@41 {
131 reg = <0x41>;
132 };
133
134 i2c_emul: emul {
Simon Glasscce3e3e2023-02-22 09:34:04 -0700135 bootph-pre-ram;
Simon Glass28db4692019-05-18 11:59:41 -0600136 reg = <0xff>;
137 compatible = "sandbox,i2c-emul-parent";
138 emul_eeprom: emul-eeprom {
139 compatible = "sandbox,i2c-eeprom";
140 sandbox,filename = "i2c.bin";
141 sandbox,size = <256>;
Simon Glass9db623b2021-02-03 06:01:16 -0700142 #emul-cells = <0>;
Simon Glass28db4692019-05-18 11:59:41 -0600143 };
144 emul0: emul0 {
Simon Glasscce3e3e2023-02-22 09:34:04 -0700145 bootph-pre-ram;
Simon Glass9db623b2021-02-03 06:01:16 -0700146 compatible = "sandbox,i2c-rtc-emul";
147 #emul-cells = <0>;
Simon Glass28db4692019-05-18 11:59:41 -0600148 };
149 };
150 };
151
152 i2s: i2s {
153 compatible = "sandbox,i2s";
154 #sound-dai-cells = <1>;
155 };
156
Simon Glasse7995f72021-08-07 07:24:11 -0600157 irq_sandbox: irq-sbox {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700158 bootph-pre-ram;
Simon Glasse7995f72021-08-07 07:24:11 -0600159 compatible = "sandbox,irq";
160 interrupt-controller;
161 #interrupt-cells = <2>;
162 };
163
164 irq-test {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700165 bootph-pre-ram;
Simon Glasse7995f72021-08-07 07:24:11 -0600166 compatible = "sandbox,irq-test";
167 interrupts-extended = <&irq_sandbox 3 0>;
168 };
169
Simon Glass28db4692019-05-18 11:59:41 -0600170 lcd {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700171 bootph-some-ram;
Simon Glass28db4692019-05-18 11:59:41 -0600172 compatible = "sandbox,lcd-sdl";
173 xres = <1366>;
174 yres = <768>;
Simon Glassd2caf7b2020-02-03 07:36:14 -0700175 log2-depth = <5>;
Simon Glass28db4692019-05-18 11:59:41 -0600176 };
177
178 leds {
179 compatible = "gpio-leds";
180
181 iracibble {
182 gpios = <&gpio_a 1 0>;
183 label = "sandbox:red";
184 };
185
186 martinet {
187 gpios = <&gpio_a 2 0>;
188 label = "sandbox:green";
189 };
190 };
191
Tom Rini4a3ca482020-02-11 12:41:23 -0500192 pci@0 {
Simon Glass8c501022019-12-06 21:41:54 -0700193 pci@1e,0 {
194 compatible = "sandbox,pmc";
195 reg = <0xf000 0 0 0 0>;
196 sandbox,emul = <&pmc_emul>;
197 gpe0-dwx-mask = <0xf>;
198 gpe0-dwx-shift-base = <4>;
199 gpe0-dw = <6 7 9>;
200 gpe0-sts = <0x20>;
201 gpe0-en = <0x30>;
202 };
203
Simon Glass28db4692019-05-18 11:59:41 -0600204 pci@1f,0 {
205 compatible = "pci-generic";
206 reg = <0xf800 0 0 0 0>;
Simon Glassb98ba4c2019-09-25 08:56:10 -0600207 sandbox,emul = <&swap_case_emul>;
208 };
209 };
210
211 emul {
212 compatible = "sandbox,pci-emul-parent";
Simon Glass8c501022019-12-06 21:41:54 -0700213 pmc_emul: emul@1e,0 {
214 compatible = "sandbox,pmc-emul";
215 };
Simon Glassb98ba4c2019-09-25 08:56:10 -0600216 swap_case_emul: emul@1f,0 {
217 compatible = "sandbox,swap-case";
Simon Glass28db4692019-05-18 11:59:41 -0600218 };
219 };
220
221 pinctrl {
222 compatible = "sandbox,pinctrl";
223 status = "okay";
224
225 pinctrl_i2c0: i2c0 {
226 groups = "i2c";
227 function = "i2c";
228 bias-pull-up;
229 };
230
231 pinctrl_serial0: uart0 {
232 groups = "serial_a";
233 function = "serial";
234 };
235
236 pinctrl_onewire0: onewire0 {
237 groups = "w1";
238 function = "w1";
239 bias-pull-up;
240 };
241 };
242
243 reset@1 {
244 compatible = "sandbox,reset";
Simon Glassd3a98cb2023-02-13 08:56:33 -0700245 bootph-some-ram;
Simon Glass28db4692019-05-18 11:59:41 -0600246 };
247
Vincent Stehlé53f6dc02021-03-10 15:33:30 +0100248 rng {
249 compatible = "sandbox,sandbox-rng";
250 };
251
Simon Glass509f32e2022-09-21 16:21:47 +0200252 scsi {
253 compatible = "sandbox,scsi";
254 };
255
Simon Glass28db4692019-05-18 11:59:41 -0600256 sound {
257 compatible = "sandbox,sound";
258 cpu {
259 sound-dai = <&i2s 0>;
260 };
261
262 codec {
263 sound-dai = <&audio 0>;
264 };
265 };
266
267 spi@0 {
268 firmware_storage_spi: flash@0 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700269 bootph-some-ram;
Simon Glass28db4692019-05-18 11:59:41 -0600270 reg = <0>;
Simon Glass7e368682019-05-18 11:59:49 -0600271 compatible = "spansion,m25p16", "jedec,spi-nor";
Simon Glass28db4692019-05-18 11:59:41 -0600272 spi-max-frequency = <40000000>;
273 sandbox,filename = "spi.bin";
274 };
275 };
276
277 spl-test {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700278 bootph-pre-ram;
Simon Glass28db4692019-05-18 11:59:41 -0600279 compatible = "sandbox,spl-test";
280 boolval;
281 intval = <1>;
282 intarray = <2 3 4>;
Simon Glass43118322021-07-28 19:23:11 -0600283 maybe-empty-int = <>;
Simon Glass28db4692019-05-18 11:59:41 -0600284 byteval = [05];
285 bytearray = [06];
286 longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
287 stringval = "message";
288 stringarray = "multi-word", "message";
289 };
290
291 spl-test2 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700292 bootph-pre-ram;
Simon Glass28db4692019-05-18 11:59:41 -0600293 compatible = "sandbox,spl-test";
294 intval = <3>;
295 intarray = <5>;
296 byteval = [08];
297 bytearray = [01 23 34];
298 longbytearray = [09 0a 0b 0c];
299 stringval = "message2";
300 stringarray = "another", "multi-word", "message";
301 };
302
303 spl-test3 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700304 bootph-pre-ram;
Simon Glass28db4692019-05-18 11:59:41 -0600305 compatible = "sandbox,spl-test";
306 stringarray = "one";
Simon Glass43118322021-07-28 19:23:11 -0600307 maybe-empty-int = <1>;
Simon Glass28db4692019-05-18 11:59:41 -0600308 };
309
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200310 spl-test5 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700311 bootph-verify;
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200312 compatible = "sandbox,spl-test";
313 stringarray = "tpl";
314 };
315
316 spl-test6 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700317 bootph-some-ram;
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200318 compatible = "sandbox,spl-test";
319 stringarray = "pre-proper";
320 };
321
Simon Glass77faa972021-03-15 17:25:31 +1300322 spl-test7 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700323 bootph-pre-ram;
Simon Glass77faa972021-03-15 17:25:31 +1300324 compatible = "sandbox,spl-test";
325 stringarray = "spl";
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200326 };
327
Simon Glass28db4692019-05-18 11:59:41 -0600328 square {
329 compatible = "demo-shape";
330 colour = "blue";
331 sides = <4>;
332 };
333
334 timer {
335 compatible = "sandbox,timer";
336 clock-frequency = <1000000>;
337 };
338
339 tpm {
Simon Glass28db4692019-05-18 11:59:41 -0600340 compatible = "google,sandbox-tpm";
341 };
342
343 tpm2 {
344 compatible = "sandbox,tpm2";
345 };
346
347 triangle {
348 compatible = "demo-shape";
349 colour = "cyan";
350 sides = <3>;
351 character = <83>;
352 light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
353 };
354
355 /* Needs to be available prior to relocation */
356 uart0: serial {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700357 bootph-pre-ram;
358 bootph-pre-sram;
359 bootph-verify;
Simon Glass28db4692019-05-18 11:59:41 -0600360 compatible = "sandbox,serial";
361 sandbox,text-colour = "cyan";
362 pinctrl-names = "default";
363 pinctrl-0 = <&pinctrl_serial0>;
364 };
365
366 usb@0 {
367 compatible = "sandbox,usb";
368 status = "disabled";
369 hub {
370 compatible = "sandbox,usb-hub";
371 #address-cells = <1>;
372 #size-cells = <0>;
373 flash-stick {
374 reg = <0>;
375 compatible = "sandbox,usb-flash";
376 };
377 };
378 };
379
380 usb@1 {
381 compatible = "sandbox,usb";
382 hub {
383 compatible = "usb-hub";
384 usb,device-class = <USB_CLASS_HUB>;
385 hub-emul {
386 compatible = "sandbox,usb-hub";
387 #address-cells = <1>;
388 #size-cells = <0>;
389 flash-stick {
390 reg = <0>;
391 compatible = "sandbox,usb-flash";
392 sandbox,filepath = "flash.bin";
393 };
394 };
395 };
396 };
397
398 usb@2 {
399 compatible = "sandbox,usb";
400 status = "disabled";
401 };
402
403 spmi: spmi@0 {
404 compatible = "sandbox,spmi";
405 #address-cells = <0x1>;
406 #size-cells = <0x1>;
407 pm8916@0 {
408 compatible = "qcom,spmi-pmic";
409 reg = <0x0 0x1>;
410 #address-cells = <0x1>;
411 #size-cells = <0x1>;
412
413 spmi_gpios: gpios@c000 {
414 compatible = "qcom,pm8916-gpio";
415 reg = <0xc000 0x400>;
416 gpio-controller;
417 gpio-count = <4>;
418 #gpio-cells = <2>;
419 gpio-bank-name="spmi";
420 };
421 };
422 };
423
424 axi: axi@0 {
425 compatible = "sandbox,axi";
426 #address-cells = <0x1>;
427 #size-cells = <0x1>;
428 store@0 {
429 compatible = "sandbox,sandbox_store";
430 reg = <0x0 0x400>;
431 };
432 };
433
434 onewire0: onewire {
435 compatible = "w1-gpio";
436 gpios = <&gpio_a 8>;
437 pinctrl-names = "default";
438 pinctrl-0 = <&pinctrl_onewire0>;
439 status = "okay";
440
441 sandbox_eeprom0: sandbox_eeprom@0 {
442 compatible = "sandbox,w1-eeprom";
443 status = "okay";
444 };
445 };
446
447 sandbox_tee {
448 compatible = "sandbox,tee";
449 };
Robert Marko9cf87122022-09-06 13:30:35 +0200450
451 thermal {
452 compatible = "sandbox,thermal";
453 };
Abdellatif El Khlifi4970d5b2023-08-04 14:33:41 +0100454
455 arm-ffa-emul {
456 compatible = "sandbox,arm-ffa-emul";
457
458 sandbox-arm-ffa {
459 compatible = "sandbox,arm-ffa";
460 };
461 };
462
Simon Glass28db4692019-05-18 11:59:41 -0600463};
464
465&cros_ec {
466 /*
467 * This describes the flash memory within the EC. Note
468 * that the STM32L flash erases to 0, not 0xff.
469 */
470 flash {
471 image-pos = <0x08000000>;
472 size = <0x20000>;
473 erase-value = <0>;
474
475 /* Information for sandbox */
476 ro {
477 image-pos = <0>;
478 size = <0xf000>;
479 };
480 wp-ro {
481 image-pos = <0xf000>;
482 size = <0x1000>;
483 };
484 rw {
485 image-pos = <0x10000>;
486 size = <0x10000>;
487 };
488 };
489
490 keyboard-controller {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700491 bootph-some-ram;
Simon Glass28db4692019-05-18 11:59:41 -0600492 };
493};