blob: fc5bde4bceacdf2eb90421a093aae3d9a3ab990e [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
7#define USB_CLASS_HUB 9
8
9/ {
Philippe Reynes462d1632022-03-28 22:56:53 +020010 binman {
11 };
12
Simon Glass28db4692019-05-18 11:59:41 -060013 chosen {
14 stdout-path = "/serial";
Simon Glassc8d37212022-07-30 15:52:34 -060015
16 fwupd {
17 compatible = "simple-bus";
18 firmware {
19 compatible = "fwupd,vbe-simple";
20 cur-version = "1.2.3";
21 bootloader-version = "2022.01";
22 storage = "mmc1";
23 area-start = <0x0>;
24 area-size = <0x1000000>;
25 skip-offset = <0x8000>;
26 };
27 };
Simon Glass28db4692019-05-18 11:59:41 -060028 };
29
Rasmus Villemoesf99e8802022-09-27 11:54:05 +020030 alarm_wdt: alarm-wdt {
31 compatible = "sandbox,alarm-wdt";
32 timeout-sec = <5>;
33 u-boot,autostart;
34 };
35
Simon Glass28db4692019-05-18 11:59:41 -060036 audio: audio-codec {
37 compatible = "sandbox,audio-codec";
38 #sound-dai-cells = <1>;
39 };
40
Simon Glass1b4bc152022-04-24 23:31:21 -060041 bootstd {
42 compatible = "u-boot,boot-std";
43 filename-prefixes = "./";
44 };
45
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020046 buttons {
47 compatible = "gpio-keys";
48
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020049 btn1 {
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020050 gpios = <&gpio_a 3 0>;
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020051 label = "button1";
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020052 };
53
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020054 btn2 {
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020055 gpios = <&gpio_a 4 0>;
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020056 label = "button2";
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020057 };
58 };
59
Simon Glass6b927b12020-10-03 11:31:32 -060060 clk_fixed: clk-fixed {
61 u-boot,dm-pre-reloc;
Simon Glass9bb88fb2021-03-15 17:25:24 +130062 compatible = "sandbox,fixed-clock";
Simon Glass6b927b12020-10-03 11:31:32 -060063 #clock-cells = <0>;
64 clock-frequency = <1234>;
65 };
66
67 clk_sandbox: clk-sbox {
68 u-boot,dm-pre-reloc;
69 compatible = "sandbox,clk";
70 #clock-cells = <1>;
71 assigned-clocks = <&clk_sandbox 3>;
72 assigned-clock-rates = <321>;
73 };
74
75 clk-test {
76 u-boot,dm-pre-reloc;
77 compatible = "sandbox,clk-test";
78 clocks = <&clk_fixed>,
79 <&clk_sandbox 1>,
80 <&clk_sandbox 0>,
81 <&clk_sandbox 3>,
82 <&clk_sandbox 2>;
83 clock-names = "fixed", "i2c", "spi", "uart2", "uart1";
84 };
85
Simon Glass28db4692019-05-18 11:59:41 -060086 gpio_a: gpios@0 {
Simon Glasse98524a2020-12-19 10:39:56 -070087 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -060088 gpio-controller;
89 compatible = "sandbox,gpio";
90 #gpio-cells = <1>;
91 gpio-bank-name = "a";
92 sandbox,gpio-count = <20>;
93 };
94
95 gpio_b: gpios@1 {
Simon Glass2149e112021-08-07 07:24:12 -060096 u-boot,dm-spl;
Simon Glass28db4692019-05-18 11:59:41 -060097 gpio-controller;
98 compatible = "sandbox,gpio";
99 #gpio-cells = <2>;
100 gpio-bank-name = "b";
101 sandbox,gpio-count = <10>;
102 };
103
Simon Glass2149e112021-08-07 07:24:12 -0600104 gpio-test {
105 u-boot,dm-spl;
106 compatible = "sandbox,gpio-test";
107 test-gpios = <&gpio_b 3 0>;
108 };
109
Simon Glass28db4692019-05-18 11:59:41 -0600110 hexagon {
111 compatible = "demo-simple";
112 colour = "white";
113 sides = <6>;
114 };
115
116 i2c_0: i2c@0 {
117 eeprom@2c {
118 reg = <0x2c>;
119 compatible = "i2c-eeprom";
120 sandbox,emul = <&emul_eeprom>;
121 };
122
123 rtc_0: rtc@43 {
124 reg = <0x43>;
125 compatible = "sandbox-rtc";
126 sandbox,emul = <&emul0>;
Simon Glass4d4558e2020-10-03 11:31:36 -0600127 u-boot,dm-pre-reloc;
Simon Glass28db4692019-05-18 11:59:41 -0600128 };
129 sandbox_pmic: sandbox_pmic {
130 reg = <0x40>;
131 };
132
133 mc34708: pmic@41 {
134 reg = <0x41>;
135 };
136
137 i2c_emul: emul {
Simon Glass9db623b2021-02-03 06:01:16 -0700138 u-boot,dm-pre-reloc;
Simon Glass28db4692019-05-18 11:59:41 -0600139 reg = <0xff>;
140 compatible = "sandbox,i2c-emul-parent";
141 emul_eeprom: emul-eeprom {
142 compatible = "sandbox,i2c-eeprom";
143 sandbox,filename = "i2c.bin";
144 sandbox,size = <256>;
Simon Glass9db623b2021-02-03 06:01:16 -0700145 #emul-cells = <0>;
Simon Glass28db4692019-05-18 11:59:41 -0600146 };
147 emul0: emul0 {
Simon Glass9db623b2021-02-03 06:01:16 -0700148 u-boot,dm-pre-reloc;
149 compatible = "sandbox,i2c-rtc-emul";
150 #emul-cells = <0>;
Simon Glass28db4692019-05-18 11:59:41 -0600151 };
152 };
153 };
154
155 i2s: i2s {
156 compatible = "sandbox,i2s";
157 #sound-dai-cells = <1>;
158 };
159
Simon Glasse7995f72021-08-07 07:24:11 -0600160 irq_sandbox: irq-sbox {
161 u-boot,dm-spl;
162 compatible = "sandbox,irq";
163 interrupt-controller;
164 #interrupt-cells = <2>;
165 };
166
167 irq-test {
168 u-boot,dm-spl;
169 compatible = "sandbox,irq-test";
170 interrupts-extended = <&irq_sandbox 3 0>;
171 };
172
Simon Glass28db4692019-05-18 11:59:41 -0600173 lcd {
Simon Glasse98524a2020-12-19 10:39:56 -0700174 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -0600175 compatible = "sandbox,lcd-sdl";
176 xres = <1366>;
177 yres = <768>;
Simon Glassd2caf7b2020-02-03 07:36:14 -0700178 log2-depth = <5>;
Simon Glass28db4692019-05-18 11:59:41 -0600179 };
180
181 leds {
182 compatible = "gpio-leds";
183
184 iracibble {
185 gpios = <&gpio_a 1 0>;
186 label = "sandbox:red";
187 };
188
189 martinet {
190 gpios = <&gpio_a 2 0>;
191 label = "sandbox:green";
192 };
193 };
194
Tom Rini4a3ca482020-02-11 12:41:23 -0500195 pci@0 {
Simon Glass8c501022019-12-06 21:41:54 -0700196 pci@1e,0 {
197 compatible = "sandbox,pmc";
198 reg = <0xf000 0 0 0 0>;
199 sandbox,emul = <&pmc_emul>;
200 gpe0-dwx-mask = <0xf>;
201 gpe0-dwx-shift-base = <4>;
202 gpe0-dw = <6 7 9>;
203 gpe0-sts = <0x20>;
204 gpe0-en = <0x30>;
205 };
206
Simon Glass28db4692019-05-18 11:59:41 -0600207 pci@1f,0 {
208 compatible = "pci-generic";
209 reg = <0xf800 0 0 0 0>;
Simon Glassb98ba4c2019-09-25 08:56:10 -0600210 sandbox,emul = <&swap_case_emul>;
211 };
212 };
213
214 emul {
215 compatible = "sandbox,pci-emul-parent";
Simon Glass8c501022019-12-06 21:41:54 -0700216 pmc_emul: emul@1e,0 {
217 compatible = "sandbox,pmc-emul";
218 };
Simon Glassb98ba4c2019-09-25 08:56:10 -0600219 swap_case_emul: emul@1f,0 {
220 compatible = "sandbox,swap-case";
Simon Glass28db4692019-05-18 11:59:41 -0600221 };
222 };
223
224 pinctrl {
225 compatible = "sandbox,pinctrl";
226 status = "okay";
227
228 pinctrl_i2c0: i2c0 {
229 groups = "i2c";
230 function = "i2c";
231 bias-pull-up;
232 };
233
234 pinctrl_serial0: uart0 {
235 groups = "serial_a";
236 function = "serial";
237 };
238
239 pinctrl_onewire0: onewire0 {
240 groups = "w1";
241 function = "w1";
242 bias-pull-up;
243 };
244 };
245
246 reset@1 {
247 compatible = "sandbox,reset";
248 };
249
Vincent Stehlé53f6dc02021-03-10 15:33:30 +0100250 rng {
251 compatible = "sandbox,sandbox-rng";
252 };
253
Simon Glass509f32e2022-09-21 16:21:47 +0200254 scsi {
255 compatible = "sandbox,scsi";
256 };
257
Simon Glass28db4692019-05-18 11:59:41 -0600258 sound {
259 compatible = "sandbox,sound";
260 cpu {
261 sound-dai = <&i2s 0>;
262 };
263
264 codec {
265 sound-dai = <&audio 0>;
266 };
267 };
268
269 spi@0 {
270 firmware_storage_spi: flash@0 {
Simon Glasse98524a2020-12-19 10:39:56 -0700271 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -0600272 reg = <0>;
Simon Glass7e368682019-05-18 11:59:49 -0600273 compatible = "spansion,m25p16", "jedec,spi-nor";
Simon Glass28db4692019-05-18 11:59:41 -0600274 spi-max-frequency = <40000000>;
275 sandbox,filename = "spi.bin";
276 };
277 };
278
279 spl-test {
Simon Glassc86e6202022-04-30 00:56:54 -0600280 u-boot,dm-spl;
Simon Glass28db4692019-05-18 11:59:41 -0600281 compatible = "sandbox,spl-test";
282 boolval;
283 intval = <1>;
284 intarray = <2 3 4>;
Simon Glass43118322021-07-28 19:23:11 -0600285 maybe-empty-int = <>;
Simon Glass28db4692019-05-18 11:59:41 -0600286 byteval = [05];
287 bytearray = [06];
288 longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
289 stringval = "message";
290 stringarray = "multi-word", "message";
291 };
292
293 spl-test2 {
Simon Glassc86e6202022-04-30 00:56:54 -0600294 u-boot,dm-spl;
Simon Glass28db4692019-05-18 11:59:41 -0600295 compatible = "sandbox,spl-test";
296 intval = <3>;
297 intarray = <5>;
298 byteval = [08];
299 bytearray = [01 23 34];
300 longbytearray = [09 0a 0b 0c];
301 stringval = "message2";
302 stringarray = "another", "multi-word", "message";
303 };
304
305 spl-test3 {
Simon Glassc86e6202022-04-30 00:56:54 -0600306 u-boot,dm-spl;
Simon Glass28db4692019-05-18 11:59:41 -0600307 compatible = "sandbox,spl-test";
308 stringarray = "one";
Simon Glass43118322021-07-28 19:23:11 -0600309 maybe-empty-int = <1>;
Simon Glass28db4692019-05-18 11:59:41 -0600310 };
311
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200312 spl-test5 {
Simon Glassc86e6202022-04-30 00:56:54 -0600313 u-boot,dm-vpl;
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200314 compatible = "sandbox,spl-test";
315 stringarray = "tpl";
316 };
317
318 spl-test6 {
319 u-boot,dm-pre-proper;
320 compatible = "sandbox,spl-test";
321 stringarray = "pre-proper";
322 };
323
Simon Glass77faa972021-03-15 17:25:31 +1300324 spl-test7 {
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200325 u-boot,dm-spl;
Simon Glass77faa972021-03-15 17:25:31 +1300326 compatible = "sandbox,spl-test";
327 stringarray = "spl";
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200328 };
329
Simon Glass28db4692019-05-18 11:59:41 -0600330 square {
331 compatible = "demo-shape";
332 colour = "blue";
333 sides = <4>;
334 };
335
336 timer {
337 compatible = "sandbox,timer";
338 clock-frequency = <1000000>;
339 };
340
341 tpm {
Simon Glass28db4692019-05-18 11:59:41 -0600342 compatible = "google,sandbox-tpm";
343 };
344
345 tpm2 {
346 compatible = "sandbox,tpm2";
347 };
348
349 triangle {
350 compatible = "demo-shape";
351 colour = "cyan";
352 sides = <3>;
353 character = <83>;
354 light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
355 };
356
357 /* Needs to be available prior to relocation */
358 uart0: serial {
359 u-boot,dm-spl;
Simon Glassc86e6202022-04-30 00:56:54 -0600360 u-boot,dm-tpl;
361 u-boot,dm-vpl;
Simon Glass28db4692019-05-18 11:59:41 -0600362 compatible = "sandbox,serial";
363 sandbox,text-colour = "cyan";
364 pinctrl-names = "default";
365 pinctrl-0 = <&pinctrl_serial0>;
366 };
367
368 usb@0 {
369 compatible = "sandbox,usb";
370 status = "disabled";
371 hub {
372 compatible = "sandbox,usb-hub";
373 #address-cells = <1>;
374 #size-cells = <0>;
375 flash-stick {
376 reg = <0>;
377 compatible = "sandbox,usb-flash";
378 };
379 };
380 };
381
382 usb@1 {
383 compatible = "sandbox,usb";
384 hub {
385 compatible = "usb-hub";
386 usb,device-class = <USB_CLASS_HUB>;
387 hub-emul {
388 compatible = "sandbox,usb-hub";
389 #address-cells = <1>;
390 #size-cells = <0>;
391 flash-stick {
392 reg = <0>;
393 compatible = "sandbox,usb-flash";
394 sandbox,filepath = "flash.bin";
395 };
396 };
397 };
398 };
399
400 usb@2 {
401 compatible = "sandbox,usb";
402 status = "disabled";
403 };
404
405 spmi: spmi@0 {
406 compatible = "sandbox,spmi";
407 #address-cells = <0x1>;
408 #size-cells = <0x1>;
409 pm8916@0 {
410 compatible = "qcom,spmi-pmic";
411 reg = <0x0 0x1>;
412 #address-cells = <0x1>;
413 #size-cells = <0x1>;
414
415 spmi_gpios: gpios@c000 {
416 compatible = "qcom,pm8916-gpio";
417 reg = <0xc000 0x400>;
418 gpio-controller;
419 gpio-count = <4>;
420 #gpio-cells = <2>;
421 gpio-bank-name="spmi";
422 };
423 };
424 };
425
426 axi: axi@0 {
427 compatible = "sandbox,axi";
428 #address-cells = <0x1>;
429 #size-cells = <0x1>;
430 store@0 {
431 compatible = "sandbox,sandbox_store";
432 reg = <0x0 0x400>;
433 };
434 };
435
436 onewire0: onewire {
437 compatible = "w1-gpio";
438 gpios = <&gpio_a 8>;
439 pinctrl-names = "default";
440 pinctrl-0 = <&pinctrl_onewire0>;
441 status = "okay";
442
443 sandbox_eeprom0: sandbox_eeprom@0 {
444 compatible = "sandbox,w1-eeprom";
445 status = "okay";
446 };
447 };
448
449 sandbox_tee {
450 compatible = "sandbox,tee";
451 };
Robert Marko9cf87122022-09-06 13:30:35 +0200452
453 thermal {
454 compatible = "sandbox,thermal";
455 };
Simon Glass28db4692019-05-18 11:59:41 -0600456};
457
458&cros_ec {
459 /*
460 * This describes the flash memory within the EC. Note
461 * that the STM32L flash erases to 0, not 0xff.
462 */
463 flash {
464 image-pos = <0x08000000>;
465 size = <0x20000>;
466 erase-value = <0>;
467
468 /* Information for sandbox */
469 ro {
470 image-pos = <0>;
471 size = <0xf000>;
472 };
473 wp-ro {
474 image-pos = <0xf000>;
475 size = <0x1000>;
476 };
477 rw {
478 image-pos = <0x10000>;
479 size = <0x10000>;
480 };
481 };
482
483 keyboard-controller {
Simon Glasse98524a2020-12-19 10:39:56 -0700484 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -0600485 };
486};