blob: 30a305c4d208bf4ed90a0dab44b0e75ee8e0838e [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
Dzmitry Sankouski2ea06222023-01-22 18:21:22 +03007#include <dt-bindings/input/input.h>
8
Simon Glassdc8c91a2019-05-18 11:59:41 -06009#define USB_CLASS_HUB 9
10
11/ {
Philippe Reynes059df562022-03-28 22:56:53 +020012 binman {
13 };
14
Simon Glassdc8c91a2019-05-18 11:59:41 -060015 chosen {
16 stdout-path = "/serial";
17 };
18
Rasmus Villemoes374d5d92022-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 Glassdc8c91a2019-05-18 11:59:41 -060025 audio: audio-codec {
26 compatible = "sandbox,audio-codec";
27 #sound-dai-cells = <1>;
28 };
29
Simon Glass7d0478d2022-04-24 23:31:21 -060030 bootstd {
31 compatible = "u-boot,boot-std";
32 filename-prefixes = "./";
33 };
34
Philippe Reynesbd3e4882020-07-24 18:19:48 +020035 buttons {
36 compatible = "gpio-keys";
37
Heinrich Schuchardt39916bb2020-09-14 12:50:54 +020038 btn1 {
Philippe Reynesbd3e4882020-07-24 18:19:48 +020039 gpios = <&gpio_a 3 0>;
Heinrich Schuchardt39916bb2020-09-14 12:50:54 +020040 label = "button1";
Dzmitry Sankouski2ea06222023-01-22 18:21:22 +030041 linux,code = <BTN_1>;
Philippe Reynesbd3e4882020-07-24 18:19:48 +020042 };
43
Heinrich Schuchardt39916bb2020-09-14 12:50:54 +020044 btn2 {
Philippe Reynesbd3e4882020-07-24 18:19:48 +020045 gpios = <&gpio_a 4 0>;
Heinrich Schuchardt39916bb2020-09-14 12:50:54 +020046 label = "button2";
Dzmitry Sankouski2ea06222023-01-22 18:21:22 +030047 linux,code = <BTN_2>;
Philippe Reynesbd3e4882020-07-24 18:19:48 +020048 };
49 };
50
Simon Glass88280522020-10-03 11:31:32 -060051 clk_fixed: clk-fixed {
Simon Glass8c103c32023-02-13 08:56:33 -070052 bootph-all;
Simon Glass88139862021-03-15 17:25:24 +130053 compatible = "sandbox,fixed-clock";
Simon Glass88280522020-10-03 11:31:32 -060054 #clock-cells = <0>;
55 clock-frequency = <1234>;
56 };
57
58 clk_sandbox: clk-sbox {
Simon Glass8c103c32023-02-13 08:56:33 -070059 bootph-all;
Simon Glass88280522020-10-03 11:31:32 -060060 compatible = "sandbox,clk";
61 #clock-cells = <1>;
62 assigned-clocks = <&clk_sandbox 3>;
63 assigned-clock-rates = <321>;
64 };
65
66 clk-test {
Simon Glass8c103c32023-02-13 08:56:33 -070067 bootph-all;
Simon Glass88280522020-10-03 11:31:32 -060068 compatible = "sandbox,clk-test";
69 clocks = <&clk_fixed>,
70 <&clk_sandbox 1>,
71 <&clk_sandbox 0>,
72 <&clk_sandbox 3>,
73 <&clk_sandbox 2>;
74 clock-names = "fixed", "i2c", "spi", "uart2", "uart1";
75 };
76
Simon Glassdc8c91a2019-05-18 11:59:41 -060077 gpio_a: gpios@0 {
Simon Glass8c103c32023-02-13 08:56:33 -070078 bootph-some-ram;
Simon Glassdc8c91a2019-05-18 11:59:41 -060079 gpio-controller;
80 compatible = "sandbox,gpio";
81 #gpio-cells = <1>;
82 gpio-bank-name = "a";
83 sandbox,gpio-count = <20>;
84 };
85
86 gpio_b: gpios@1 {
Simon Glass8c103c32023-02-13 08:56:33 -070087 bootph-pre-ram;
Simon Glassdc8c91a2019-05-18 11:59:41 -060088 gpio-controller;
89 compatible = "sandbox,gpio";
90 #gpio-cells = <2>;
91 gpio-bank-name = "b";
92 sandbox,gpio-count = <10>;
93 };
94
Simon Glass48609d02021-08-07 07:24:12 -060095 gpio-test {
Simon Glass8c103c32023-02-13 08:56:33 -070096 bootph-pre-ram;
Simon Glass48609d02021-08-07 07:24:12 -060097 compatible = "sandbox,gpio-test";
98 test-gpios = <&gpio_b 3 0>;
99 };
100
Simon Glassdc8c91a2019-05-18 11:59:41 -0600101 hexagon {
102 compatible = "demo-simple";
103 colour = "white";
104 sides = <6>;
105 };
106
107 i2c_0: i2c@0 {
108 eeprom@2c {
109 reg = <0x2c>;
110 compatible = "i2c-eeprom";
111 sandbox,emul = <&emul_eeprom>;
112 };
113
114 rtc_0: rtc@43 {
115 reg = <0x43>;
116 compatible = "sandbox-rtc";
117 sandbox,emul = <&emul0>;
Simon Glassdd8a2902023-02-22 09:34:04 -0700118 bootph-pre-ram;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600119 };
120 sandbox_pmic: sandbox_pmic {
121 reg = <0x40>;
122 };
123
124 mc34708: pmic@41 {
125 reg = <0x41>;
126 };
127
128 i2c_emul: emul {
Simon Glassdd8a2902023-02-22 09:34:04 -0700129 bootph-pre-ram;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600130 reg = <0xff>;
131 compatible = "sandbox,i2c-emul-parent";
132 emul_eeprom: emul-eeprom {
133 compatible = "sandbox,i2c-eeprom";
134 sandbox,filename = "i2c.bin";
135 sandbox,size = <256>;
Simon Glass23f40a32021-02-03 06:01:16 -0700136 #emul-cells = <0>;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600137 };
138 emul0: emul0 {
Simon Glassdd8a2902023-02-22 09:34:04 -0700139 bootph-pre-ram;
Simon Glass23f40a32021-02-03 06:01:16 -0700140 compatible = "sandbox,i2c-rtc-emul";
141 #emul-cells = <0>;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600142 };
143 };
144 };
145
146 i2s: i2s {
147 compatible = "sandbox,i2s";
148 #sound-dai-cells = <1>;
149 };
150
Simon Glass3e57ad92021-08-07 07:24:11 -0600151 irq_sandbox: irq-sbox {
Simon Glass8c103c32023-02-13 08:56:33 -0700152 bootph-pre-ram;
Simon Glass3e57ad92021-08-07 07:24:11 -0600153 compatible = "sandbox,irq";
154 interrupt-controller;
155 #interrupt-cells = <2>;
156 };
157
158 irq-test {
Simon Glass8c103c32023-02-13 08:56:33 -0700159 bootph-pre-ram;
Simon Glass3e57ad92021-08-07 07:24:11 -0600160 compatible = "sandbox,irq-test";
161 interrupts-extended = <&irq_sandbox 3 0>;
162 };
163
Simon Glassdc8c91a2019-05-18 11:59:41 -0600164 lcd {
Simon Glass8c103c32023-02-13 08:56:33 -0700165 bootph-some-ram;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600166 compatible = "sandbox,lcd-sdl";
167 xres = <1366>;
168 yres = <768>;
Simon Glassa466db52020-02-03 07:36:14 -0700169 log2-depth = <5>;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600170 };
171
172 leds {
173 compatible = "gpio-leds";
174
175 iracibble {
176 gpios = <&gpio_a 1 0>;
177 label = "sandbox:red";
178 };
179
180 martinet {
181 gpios = <&gpio_a 2 0>;
182 label = "sandbox:green";
183 };
184 };
185
Tom Rini42c64d12020-02-11 12:41:23 -0500186 pci@0 {
Simon Glass3b65ee32019-12-06 21:41:54 -0700187 pci@1e,0 {
188 compatible = "sandbox,pmc";
189 reg = <0xf000 0 0 0 0>;
190 sandbox,emul = <&pmc_emul>;
191 gpe0-dwx-mask = <0xf>;
192 gpe0-dwx-shift-base = <4>;
193 gpe0-dw = <6 7 9>;
194 gpe0-sts = <0x20>;
195 gpe0-en = <0x30>;
196 };
197
Simon Glassdc8c91a2019-05-18 11:59:41 -0600198 pci@1f,0 {
199 compatible = "pci-generic";
200 reg = <0xf800 0 0 0 0>;
Simon Glass9b69ba42019-09-25 08:56:10 -0600201 sandbox,emul = <&swap_case_emul>;
202 };
203 };
204
205 emul {
206 compatible = "sandbox,pci-emul-parent";
Simon Glass3b65ee32019-12-06 21:41:54 -0700207 pmc_emul: emul@1e,0 {
208 compatible = "sandbox,pmc-emul";
209 };
Simon Glass9b69ba42019-09-25 08:56:10 -0600210 swap_case_emul: emul@1f,0 {
211 compatible = "sandbox,swap-case";
Simon Glassdc8c91a2019-05-18 11:59:41 -0600212 };
213 };
214
215 pinctrl {
216 compatible = "sandbox,pinctrl";
217 status = "okay";
218
219 pinctrl_i2c0: i2c0 {
220 groups = "i2c";
221 function = "i2c";
222 bias-pull-up;
223 };
224
225 pinctrl_serial0: uart0 {
226 groups = "serial_a";
227 function = "serial";
228 };
229
230 pinctrl_onewire0: onewire0 {
231 groups = "w1";
232 function = "w1";
233 bias-pull-up;
234 };
235 };
236
237 reset@1 {
238 compatible = "sandbox,reset";
Simon Glass8c103c32023-02-13 08:56:33 -0700239 bootph-some-ram;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600240 };
241
Vincent Stehlé619a8152021-03-10 15:33:30 +0100242 rng {
243 compatible = "sandbox,sandbox-rng";
244 };
245
Simon Glass22c80d52022-09-21 16:21:47 +0200246 scsi {
247 compatible = "sandbox,scsi";
248 };
249
Simon Glassdc8c91a2019-05-18 11:59:41 -0600250 sound {
251 compatible = "sandbox,sound";
252 cpu {
253 sound-dai = <&i2s 0>;
254 };
255
256 codec {
257 sound-dai = <&audio 0>;
258 };
259 };
260
261 spi@0 {
262 firmware_storage_spi: flash@0 {
Simon Glass8c103c32023-02-13 08:56:33 -0700263 bootph-some-ram;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600264 reg = <0>;
Simon Glass24c27762019-05-18 11:59:49 -0600265 compatible = "spansion,m25p16", "jedec,spi-nor";
Simon Glassdc8c91a2019-05-18 11:59:41 -0600266 spi-max-frequency = <40000000>;
267 sandbox,filename = "spi.bin";
268 };
269 };
270
271 spl-test {
Simon Glass8c103c32023-02-13 08:56:33 -0700272 bootph-pre-ram;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600273 compatible = "sandbox,spl-test";
274 boolval;
275 intval = <1>;
276 intarray = <2 3 4>;
Simon Glasseec44c72021-07-28 19:23:11 -0600277 maybe-empty-int = <>;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600278 byteval = [05];
279 bytearray = [06];
280 longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
281 stringval = "message";
282 stringarray = "multi-word", "message";
283 };
284
285 spl-test2 {
Simon Glass8c103c32023-02-13 08:56:33 -0700286 bootph-pre-ram;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600287 compatible = "sandbox,spl-test";
288 intval = <3>;
289 intarray = <5>;
290 byteval = [08];
291 bytearray = [01 23 34];
292 longbytearray = [09 0a 0b 0c];
293 stringval = "message2";
294 stringarray = "another", "multi-word", "message";
295 };
296
297 spl-test3 {
Simon Glass8c103c32023-02-13 08:56:33 -0700298 bootph-pre-ram;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600299 compatible = "sandbox,spl-test";
300 stringarray = "one";
Simon Glasseec44c72021-07-28 19:23:11 -0600301 maybe-empty-int = <1>;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600302 };
303
Patrick Delaunay099ed452019-05-21 19:19:11 +0200304 spl-test5 {
Simon Glass8c103c32023-02-13 08:56:33 -0700305 bootph-verify;
Patrick Delaunay099ed452019-05-21 19:19:11 +0200306 compatible = "sandbox,spl-test";
307 stringarray = "tpl";
308 };
309
310 spl-test6 {
Simon Glass8c103c32023-02-13 08:56:33 -0700311 bootph-some-ram;
Patrick Delaunay099ed452019-05-21 19:19:11 +0200312 compatible = "sandbox,spl-test";
313 stringarray = "pre-proper";
314 };
315
Simon Glass3a825d32021-03-15 17:25:31 +1300316 spl-test7 {
Simon Glass8c103c32023-02-13 08:56:33 -0700317 bootph-pre-ram;
Simon Glass3a825d32021-03-15 17:25:31 +1300318 compatible = "sandbox,spl-test";
319 stringarray = "spl";
Patrick Delaunay099ed452019-05-21 19:19:11 +0200320 };
321
Simon Glassdc8c91a2019-05-18 11:59:41 -0600322 square {
323 compatible = "demo-shape";
324 colour = "blue";
325 sides = <4>;
326 };
327
328 timer {
329 compatible = "sandbox,timer";
330 clock-frequency = <1000000>;
331 };
332
333 tpm {
Simon Glassdc8c91a2019-05-18 11:59:41 -0600334 compatible = "google,sandbox-tpm";
335 };
336
337 tpm2 {
338 compatible = "sandbox,tpm2";
339 };
340
341 triangle {
342 compatible = "demo-shape";
343 colour = "cyan";
344 sides = <3>;
345 character = <83>;
346 light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
347 };
348
349 /* Needs to be available prior to relocation */
350 uart0: serial {
Simon Glass8c103c32023-02-13 08:56:33 -0700351 bootph-pre-ram;
352 bootph-pre-sram;
353 bootph-verify;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600354 compatible = "sandbox,serial";
355 sandbox,text-colour = "cyan";
356 pinctrl-names = "default";
357 pinctrl-0 = <&pinctrl_serial0>;
358 };
359
360 usb@0 {
361 compatible = "sandbox,usb";
362 status = "disabled";
363 hub {
364 compatible = "sandbox,usb-hub";
365 #address-cells = <1>;
366 #size-cells = <0>;
367 flash-stick {
368 reg = <0>;
369 compatible = "sandbox,usb-flash";
370 };
371 };
372 };
373
374 usb@1 {
375 compatible = "sandbox,usb";
376 hub {
377 compatible = "usb-hub";
378 usb,device-class = <USB_CLASS_HUB>;
379 hub-emul {
380 compatible = "sandbox,usb-hub";
381 #address-cells = <1>;
382 #size-cells = <0>;
383 flash-stick {
384 reg = <0>;
385 compatible = "sandbox,usb-flash";
386 sandbox,filepath = "flash.bin";
387 };
388 };
389 };
390 };
391
392 usb@2 {
393 compatible = "sandbox,usb";
394 status = "disabled";
395 };
396
397 spmi: spmi@0 {
398 compatible = "sandbox,spmi";
399 #address-cells = <0x1>;
400 #size-cells = <0x1>;
401 pm8916@0 {
402 compatible = "qcom,spmi-pmic";
403 reg = <0x0 0x1>;
404 #address-cells = <0x1>;
405 #size-cells = <0x1>;
406
407 spmi_gpios: gpios@c000 {
408 compatible = "qcom,pm8916-gpio";
409 reg = <0xc000 0x400>;
410 gpio-controller;
411 gpio-count = <4>;
412 #gpio-cells = <2>;
413 gpio-bank-name="spmi";
414 };
415 };
416 };
417
418 axi: axi@0 {
419 compatible = "sandbox,axi";
420 #address-cells = <0x1>;
421 #size-cells = <0x1>;
422 store@0 {
423 compatible = "sandbox,sandbox_store";
424 reg = <0x0 0x400>;
425 };
426 };
427
428 onewire0: onewire {
429 compatible = "w1-gpio";
430 gpios = <&gpio_a 8>;
431 pinctrl-names = "default";
432 pinctrl-0 = <&pinctrl_onewire0>;
433 status = "okay";
434
435 sandbox_eeprom0: sandbox_eeprom@0 {
436 compatible = "sandbox,w1-eeprom";
437 status = "okay";
438 };
439 };
440
441 sandbox_tee {
442 compatible = "sandbox,tee";
443 };
Robert Marko1fad2cb2022-09-06 13:30:35 +0200444
445 thermal {
446 compatible = "sandbox,thermal";
447 };
Simon Glassdc8c91a2019-05-18 11:59:41 -0600448};
449
450&cros_ec {
451 /*
452 * This describes the flash memory within the EC. Note
453 * that the STM32L flash erases to 0, not 0xff.
454 */
455 flash {
456 image-pos = <0x08000000>;
457 size = <0x20000>;
458 erase-value = <0>;
459
460 /* Information for sandbox */
461 ro {
462 image-pos = <0>;
463 size = <0xf000>;
464 };
465 wp-ro {
466 image-pos = <0xf000>;
467 size = <0x1000>;
468 };
469 rw {
470 image-pos = <0x10000>;
471 size = <0x10000>;
472 };
473 };
474
475 keyboard-controller {
Simon Glass8c103c32023-02-13 08:56:33 -0700476 bootph-some-ram;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600477 };
478};