blob: afe598a4f56981347561a0fa56b27b783df1cbba [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";
Michal Suchanek76874302022-10-10 20:29:39 +0200248 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -0600249 };
250
Vincent Stehlé53f6dc02021-03-10 15:33:30 +0100251 rng {
252 compatible = "sandbox,sandbox-rng";
253 };
254
Simon Glass509f32e2022-09-21 16:21:47 +0200255 scsi {
256 compatible = "sandbox,scsi";
257 };
258
Simon Glass28db4692019-05-18 11:59:41 -0600259 sound {
260 compatible = "sandbox,sound";
261 cpu {
262 sound-dai = <&i2s 0>;
263 };
264
265 codec {
266 sound-dai = <&audio 0>;
267 };
268 };
269
270 spi@0 {
271 firmware_storage_spi: flash@0 {
Simon Glasse98524a2020-12-19 10:39:56 -0700272 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -0600273 reg = <0>;
Simon Glass7e368682019-05-18 11:59:49 -0600274 compatible = "spansion,m25p16", "jedec,spi-nor";
Simon Glass28db4692019-05-18 11:59:41 -0600275 spi-max-frequency = <40000000>;
276 sandbox,filename = "spi.bin";
277 };
278 };
279
280 spl-test {
Simon Glassc86e6202022-04-30 00:56:54 -0600281 u-boot,dm-spl;
Simon Glass28db4692019-05-18 11:59:41 -0600282 compatible = "sandbox,spl-test";
283 boolval;
284 intval = <1>;
285 intarray = <2 3 4>;
Simon Glass43118322021-07-28 19:23:11 -0600286 maybe-empty-int = <>;
Simon Glass28db4692019-05-18 11:59:41 -0600287 byteval = [05];
288 bytearray = [06];
289 longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
290 stringval = "message";
291 stringarray = "multi-word", "message";
292 };
293
294 spl-test2 {
Simon Glassc86e6202022-04-30 00:56:54 -0600295 u-boot,dm-spl;
Simon Glass28db4692019-05-18 11:59:41 -0600296 compatible = "sandbox,spl-test";
297 intval = <3>;
298 intarray = <5>;
299 byteval = [08];
300 bytearray = [01 23 34];
301 longbytearray = [09 0a 0b 0c];
302 stringval = "message2";
303 stringarray = "another", "multi-word", "message";
304 };
305
306 spl-test3 {
Simon Glassc86e6202022-04-30 00:56:54 -0600307 u-boot,dm-spl;
Simon Glass28db4692019-05-18 11:59:41 -0600308 compatible = "sandbox,spl-test";
309 stringarray = "one";
Simon Glass43118322021-07-28 19:23:11 -0600310 maybe-empty-int = <1>;
Simon Glass28db4692019-05-18 11:59:41 -0600311 };
312
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200313 spl-test5 {
Simon Glassc86e6202022-04-30 00:56:54 -0600314 u-boot,dm-vpl;
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200315 compatible = "sandbox,spl-test";
316 stringarray = "tpl";
317 };
318
319 spl-test6 {
320 u-boot,dm-pre-proper;
321 compatible = "sandbox,spl-test";
322 stringarray = "pre-proper";
323 };
324
Simon Glass77faa972021-03-15 17:25:31 +1300325 spl-test7 {
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200326 u-boot,dm-spl;
Simon Glass77faa972021-03-15 17:25:31 +1300327 compatible = "sandbox,spl-test";
328 stringarray = "spl";
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200329 };
330
Simon Glass28db4692019-05-18 11:59:41 -0600331 square {
332 compatible = "demo-shape";
333 colour = "blue";
334 sides = <4>;
335 };
336
337 timer {
338 compatible = "sandbox,timer";
339 clock-frequency = <1000000>;
340 };
341
342 tpm {
Simon Glass28db4692019-05-18 11:59:41 -0600343 compatible = "google,sandbox-tpm";
344 };
345
346 tpm2 {
347 compatible = "sandbox,tpm2";
348 };
349
350 triangle {
351 compatible = "demo-shape";
352 colour = "cyan";
353 sides = <3>;
354 character = <83>;
355 light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
356 };
357
358 /* Needs to be available prior to relocation */
359 uart0: serial {
360 u-boot,dm-spl;
Simon Glassc86e6202022-04-30 00:56:54 -0600361 u-boot,dm-tpl;
362 u-boot,dm-vpl;
Simon Glass28db4692019-05-18 11:59:41 -0600363 compatible = "sandbox,serial";
364 sandbox,text-colour = "cyan";
365 pinctrl-names = "default";
366 pinctrl-0 = <&pinctrl_serial0>;
367 };
368
369 usb@0 {
370 compatible = "sandbox,usb";
371 status = "disabled";
372 hub {
373 compatible = "sandbox,usb-hub";
374 #address-cells = <1>;
375 #size-cells = <0>;
376 flash-stick {
377 reg = <0>;
378 compatible = "sandbox,usb-flash";
379 };
380 };
381 };
382
383 usb@1 {
384 compatible = "sandbox,usb";
385 hub {
386 compatible = "usb-hub";
387 usb,device-class = <USB_CLASS_HUB>;
388 hub-emul {
389 compatible = "sandbox,usb-hub";
390 #address-cells = <1>;
391 #size-cells = <0>;
392 flash-stick {
393 reg = <0>;
394 compatible = "sandbox,usb-flash";
395 sandbox,filepath = "flash.bin";
396 };
397 };
398 };
399 };
400
401 usb@2 {
402 compatible = "sandbox,usb";
403 status = "disabled";
404 };
405
406 spmi: spmi@0 {
407 compatible = "sandbox,spmi";
408 #address-cells = <0x1>;
409 #size-cells = <0x1>;
410 pm8916@0 {
411 compatible = "qcom,spmi-pmic";
412 reg = <0x0 0x1>;
413 #address-cells = <0x1>;
414 #size-cells = <0x1>;
415
416 spmi_gpios: gpios@c000 {
417 compatible = "qcom,pm8916-gpio";
418 reg = <0xc000 0x400>;
419 gpio-controller;
420 gpio-count = <4>;
421 #gpio-cells = <2>;
422 gpio-bank-name="spmi";
423 };
424 };
425 };
426
427 axi: axi@0 {
428 compatible = "sandbox,axi";
429 #address-cells = <0x1>;
430 #size-cells = <0x1>;
431 store@0 {
432 compatible = "sandbox,sandbox_store";
433 reg = <0x0 0x400>;
434 };
435 };
436
437 onewire0: onewire {
438 compatible = "w1-gpio";
439 gpios = <&gpio_a 8>;
440 pinctrl-names = "default";
441 pinctrl-0 = <&pinctrl_onewire0>;
442 status = "okay";
443
444 sandbox_eeprom0: sandbox_eeprom@0 {
445 compatible = "sandbox,w1-eeprom";
446 status = "okay";
447 };
448 };
449
450 sandbox_tee {
451 compatible = "sandbox,tee";
452 };
Robert Marko9cf87122022-09-06 13:30:35 +0200453
454 thermal {
455 compatible = "sandbox,thermal";
456 };
Simon Glass28db4692019-05-18 11:59:41 -0600457};
458
459&cros_ec {
460 /*
461 * This describes the flash memory within the EC. Note
462 * that the STM32L flash erases to 0, not 0xff.
463 */
464 flash {
465 image-pos = <0x08000000>;
466 size = <0x20000>;
467 erase-value = <0>;
468
469 /* Information for sandbox */
470 ro {
471 image-pos = <0>;
472 size = <0xf000>;
473 };
474 wp-ro {
475 image-pos = <0xf000>;
476 size = <0x1000>;
477 };
478 rw {
479 image-pos = <0x10000>;
480 size = <0x10000>;
481 };
482 };
483
484 keyboard-controller {
Simon Glasse98524a2020-12-19 10:39:56 -0700485 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -0600486 };
487};