blob: d2db1ea5220afded50eaa08ee59f49d52e7dbd61 [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
30 audio: audio-codec {
31 compatible = "sandbox,audio-codec";
32 #sound-dai-cells = <1>;
33 };
34
Simon Glass1b4bc152022-04-24 23:31:21 -060035 bootstd {
36 compatible = "u-boot,boot-std";
37 filename-prefixes = "./";
38 };
39
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020040 buttons {
41 compatible = "gpio-keys";
42
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020043 btn1 {
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020044 gpios = <&gpio_a 3 0>;
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020045 label = "button1";
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020046 };
47
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020048 btn2 {
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020049 gpios = <&gpio_a 4 0>;
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020050 label = "button2";
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020051 };
52 };
53
Simon Glass6b927b12020-10-03 11:31:32 -060054 clk_fixed: clk-fixed {
55 u-boot,dm-pre-reloc;
Simon Glass9bb88fb2021-03-15 17:25:24 +130056 compatible = "sandbox,fixed-clock";
Simon Glass6b927b12020-10-03 11:31:32 -060057 #clock-cells = <0>;
58 clock-frequency = <1234>;
59 };
60
61 clk_sandbox: clk-sbox {
62 u-boot,dm-pre-reloc;
63 compatible = "sandbox,clk";
64 #clock-cells = <1>;
65 assigned-clocks = <&clk_sandbox 3>;
66 assigned-clock-rates = <321>;
67 };
68
69 clk-test {
70 u-boot,dm-pre-reloc;
71 compatible = "sandbox,clk-test";
72 clocks = <&clk_fixed>,
73 <&clk_sandbox 1>,
74 <&clk_sandbox 0>,
75 <&clk_sandbox 3>,
76 <&clk_sandbox 2>;
77 clock-names = "fixed", "i2c", "spi", "uart2", "uart1";
78 };
79
Simon Glass28db4692019-05-18 11:59:41 -060080 gpio_a: gpios@0 {
Simon Glasse98524a2020-12-19 10:39:56 -070081 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -060082 gpio-controller;
83 compatible = "sandbox,gpio";
84 #gpio-cells = <1>;
85 gpio-bank-name = "a";
86 sandbox,gpio-count = <20>;
87 };
88
89 gpio_b: gpios@1 {
Simon Glass2149e112021-08-07 07:24:12 -060090 u-boot,dm-spl;
Simon Glass28db4692019-05-18 11:59:41 -060091 gpio-controller;
92 compatible = "sandbox,gpio";
93 #gpio-cells = <2>;
94 gpio-bank-name = "b";
95 sandbox,gpio-count = <10>;
96 };
97
Simon Glass2149e112021-08-07 07:24:12 -060098 gpio-test {
99 u-boot,dm-spl;
100 compatible = "sandbox,gpio-test";
101 test-gpios = <&gpio_b 3 0>;
102 };
103
Simon Glass28db4692019-05-18 11:59:41 -0600104 hexagon {
105 compatible = "demo-simple";
106 colour = "white";
107 sides = <6>;
108 };
109
110 i2c_0: i2c@0 {
111 eeprom@2c {
112 reg = <0x2c>;
113 compatible = "i2c-eeprom";
114 sandbox,emul = <&emul_eeprom>;
115 };
116
117 rtc_0: rtc@43 {
118 reg = <0x43>;
119 compatible = "sandbox-rtc";
120 sandbox,emul = <&emul0>;
Simon Glass4d4558e2020-10-03 11:31:36 -0600121 u-boot,dm-pre-reloc;
Simon Glass28db4692019-05-18 11:59:41 -0600122 };
123 sandbox_pmic: sandbox_pmic {
124 reg = <0x40>;
125 };
126
127 mc34708: pmic@41 {
128 reg = <0x41>;
129 };
130
131 i2c_emul: emul {
Simon Glass9db623b2021-02-03 06:01:16 -0700132 u-boot,dm-pre-reloc;
Simon Glass28db4692019-05-18 11:59:41 -0600133 reg = <0xff>;
134 compatible = "sandbox,i2c-emul-parent";
135 emul_eeprom: emul-eeprom {
136 compatible = "sandbox,i2c-eeprom";
137 sandbox,filename = "i2c.bin";
138 sandbox,size = <256>;
Simon Glass9db623b2021-02-03 06:01:16 -0700139 #emul-cells = <0>;
Simon Glass28db4692019-05-18 11:59:41 -0600140 };
141 emul0: emul0 {
Simon Glass9db623b2021-02-03 06:01:16 -0700142 u-boot,dm-pre-reloc;
143 compatible = "sandbox,i2c-rtc-emul";
144 #emul-cells = <0>;
Simon Glass28db4692019-05-18 11:59:41 -0600145 };
146 };
147 };
148
149 i2s: i2s {
150 compatible = "sandbox,i2s";
151 #sound-dai-cells = <1>;
152 };
153
Simon Glasse7995f72021-08-07 07:24:11 -0600154 irq_sandbox: irq-sbox {
155 u-boot,dm-spl;
156 compatible = "sandbox,irq";
157 interrupt-controller;
158 #interrupt-cells = <2>;
159 };
160
161 irq-test {
162 u-boot,dm-spl;
163 compatible = "sandbox,irq-test";
164 interrupts-extended = <&irq_sandbox 3 0>;
165 };
166
Simon Glass28db4692019-05-18 11:59:41 -0600167 lcd {
Simon Glasse98524a2020-12-19 10:39:56 -0700168 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -0600169 compatible = "sandbox,lcd-sdl";
170 xres = <1366>;
171 yres = <768>;
Simon Glassd2caf7b2020-02-03 07:36:14 -0700172 log2-depth = <5>;
Simon Glass28db4692019-05-18 11:59:41 -0600173 };
174
175 leds {
176 compatible = "gpio-leds";
177
178 iracibble {
179 gpios = <&gpio_a 1 0>;
180 label = "sandbox:red";
181 };
182
183 martinet {
184 gpios = <&gpio_a 2 0>;
185 label = "sandbox:green";
186 };
187 };
188
Tom Rini4a3ca482020-02-11 12:41:23 -0500189 pci@0 {
Simon Glass8c501022019-12-06 21:41:54 -0700190 pci@1e,0 {
191 compatible = "sandbox,pmc";
192 reg = <0xf000 0 0 0 0>;
193 sandbox,emul = <&pmc_emul>;
194 gpe0-dwx-mask = <0xf>;
195 gpe0-dwx-shift-base = <4>;
196 gpe0-dw = <6 7 9>;
197 gpe0-sts = <0x20>;
198 gpe0-en = <0x30>;
199 };
200
Simon Glass28db4692019-05-18 11:59:41 -0600201 pci@1f,0 {
202 compatible = "pci-generic";
203 reg = <0xf800 0 0 0 0>;
Simon Glassb98ba4c2019-09-25 08:56:10 -0600204 sandbox,emul = <&swap_case_emul>;
205 };
206 };
207
208 emul {
209 compatible = "sandbox,pci-emul-parent";
Simon Glass8c501022019-12-06 21:41:54 -0700210 pmc_emul: emul@1e,0 {
211 compatible = "sandbox,pmc-emul";
212 };
Simon Glassb98ba4c2019-09-25 08:56:10 -0600213 swap_case_emul: emul@1f,0 {
214 compatible = "sandbox,swap-case";
Simon Glass28db4692019-05-18 11:59:41 -0600215 };
216 };
217
218 pinctrl {
219 compatible = "sandbox,pinctrl";
220 status = "okay";
221
222 pinctrl_i2c0: i2c0 {
223 groups = "i2c";
224 function = "i2c";
225 bias-pull-up;
226 };
227
228 pinctrl_serial0: uart0 {
229 groups = "serial_a";
230 function = "serial";
231 };
232
233 pinctrl_onewire0: onewire0 {
234 groups = "w1";
235 function = "w1";
236 bias-pull-up;
237 };
238 };
239
240 reset@1 {
241 compatible = "sandbox,reset";
242 };
243
Vincent Stehlé53f6dc02021-03-10 15:33:30 +0100244 rng {
245 compatible = "sandbox,sandbox-rng";
246 };
247
Simon Glass509f32e2022-09-21 16:21:47 +0200248 scsi {
249 compatible = "sandbox,scsi";
250 };
251
Simon Glass28db4692019-05-18 11:59:41 -0600252 sound {
253 compatible = "sandbox,sound";
254 cpu {
255 sound-dai = <&i2s 0>;
256 };
257
258 codec {
259 sound-dai = <&audio 0>;
260 };
261 };
262
263 spi@0 {
264 firmware_storage_spi: flash@0 {
Simon Glasse98524a2020-12-19 10:39:56 -0700265 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -0600266 reg = <0>;
Simon Glass7e368682019-05-18 11:59:49 -0600267 compatible = "spansion,m25p16", "jedec,spi-nor";
Simon Glass28db4692019-05-18 11:59:41 -0600268 spi-max-frequency = <40000000>;
269 sandbox,filename = "spi.bin";
270 };
271 };
272
273 spl-test {
Simon Glassc86e6202022-04-30 00:56:54 -0600274 u-boot,dm-spl;
Simon Glass28db4692019-05-18 11:59:41 -0600275 compatible = "sandbox,spl-test";
276 boolval;
277 intval = <1>;
278 intarray = <2 3 4>;
Simon Glass43118322021-07-28 19:23:11 -0600279 maybe-empty-int = <>;
Simon Glass28db4692019-05-18 11:59:41 -0600280 byteval = [05];
281 bytearray = [06];
282 longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
283 stringval = "message";
284 stringarray = "multi-word", "message";
285 };
286
287 spl-test2 {
Simon Glassc86e6202022-04-30 00:56:54 -0600288 u-boot,dm-spl;
Simon Glass28db4692019-05-18 11:59:41 -0600289 compatible = "sandbox,spl-test";
290 intval = <3>;
291 intarray = <5>;
292 byteval = [08];
293 bytearray = [01 23 34];
294 longbytearray = [09 0a 0b 0c];
295 stringval = "message2";
296 stringarray = "another", "multi-word", "message";
297 };
298
299 spl-test3 {
Simon Glassc86e6202022-04-30 00:56:54 -0600300 u-boot,dm-spl;
Simon Glass28db4692019-05-18 11:59:41 -0600301 compatible = "sandbox,spl-test";
302 stringarray = "one";
Simon Glass43118322021-07-28 19:23:11 -0600303 maybe-empty-int = <1>;
Simon Glass28db4692019-05-18 11:59:41 -0600304 };
305
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200306 spl-test5 {
Simon Glassc86e6202022-04-30 00:56:54 -0600307 u-boot,dm-vpl;
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200308 compatible = "sandbox,spl-test";
309 stringarray = "tpl";
310 };
311
312 spl-test6 {
313 u-boot,dm-pre-proper;
314 compatible = "sandbox,spl-test";
315 stringarray = "pre-proper";
316 };
317
Simon Glass77faa972021-03-15 17:25:31 +1300318 spl-test7 {
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200319 u-boot,dm-spl;
Simon Glass77faa972021-03-15 17:25:31 +1300320 compatible = "sandbox,spl-test";
321 stringarray = "spl";
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200322 };
323
Simon Glass28db4692019-05-18 11:59:41 -0600324 square {
325 compatible = "demo-shape";
326 colour = "blue";
327 sides = <4>;
328 };
329
330 timer {
331 compatible = "sandbox,timer";
332 clock-frequency = <1000000>;
333 };
334
335 tpm {
Simon Glass28db4692019-05-18 11:59:41 -0600336 compatible = "google,sandbox-tpm";
337 };
338
339 tpm2 {
340 compatible = "sandbox,tpm2";
341 };
342
343 triangle {
344 compatible = "demo-shape";
345 colour = "cyan";
346 sides = <3>;
347 character = <83>;
348 light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
349 };
350
351 /* Needs to be available prior to relocation */
352 uart0: serial {
353 u-boot,dm-spl;
Simon Glassc86e6202022-04-30 00:56:54 -0600354 u-boot,dm-tpl;
355 u-boot,dm-vpl;
Simon Glass28db4692019-05-18 11:59:41 -0600356 compatible = "sandbox,serial";
357 sandbox,text-colour = "cyan";
358 pinctrl-names = "default";
359 pinctrl-0 = <&pinctrl_serial0>;
360 };
361
362 usb@0 {
363 compatible = "sandbox,usb";
364 status = "disabled";
365 hub {
366 compatible = "sandbox,usb-hub";
367 #address-cells = <1>;
368 #size-cells = <0>;
369 flash-stick {
370 reg = <0>;
371 compatible = "sandbox,usb-flash";
372 };
373 };
374 };
375
376 usb@1 {
377 compatible = "sandbox,usb";
378 hub {
379 compatible = "usb-hub";
380 usb,device-class = <USB_CLASS_HUB>;
381 hub-emul {
382 compatible = "sandbox,usb-hub";
383 #address-cells = <1>;
384 #size-cells = <0>;
385 flash-stick {
386 reg = <0>;
387 compatible = "sandbox,usb-flash";
388 sandbox,filepath = "flash.bin";
389 };
390 };
391 };
392 };
393
394 usb@2 {
395 compatible = "sandbox,usb";
396 status = "disabled";
397 };
398
399 spmi: spmi@0 {
400 compatible = "sandbox,spmi";
401 #address-cells = <0x1>;
402 #size-cells = <0x1>;
403 pm8916@0 {
404 compatible = "qcom,spmi-pmic";
405 reg = <0x0 0x1>;
406 #address-cells = <0x1>;
407 #size-cells = <0x1>;
408
409 spmi_gpios: gpios@c000 {
410 compatible = "qcom,pm8916-gpio";
411 reg = <0xc000 0x400>;
412 gpio-controller;
413 gpio-count = <4>;
414 #gpio-cells = <2>;
415 gpio-bank-name="spmi";
416 };
417 };
418 };
419
420 axi: axi@0 {
421 compatible = "sandbox,axi";
422 #address-cells = <0x1>;
423 #size-cells = <0x1>;
424 store@0 {
425 compatible = "sandbox,sandbox_store";
426 reg = <0x0 0x400>;
427 };
428 };
429
430 onewire0: onewire {
431 compatible = "w1-gpio";
432 gpios = <&gpio_a 8>;
433 pinctrl-names = "default";
434 pinctrl-0 = <&pinctrl_onewire0>;
435 status = "okay";
436
437 sandbox_eeprom0: sandbox_eeprom@0 {
438 compatible = "sandbox,w1-eeprom";
439 status = "okay";
440 };
441 };
442
443 sandbox_tee {
444 compatible = "sandbox,tee";
445 };
Robert Marko9cf87122022-09-06 13:30:35 +0200446
447 thermal {
448 compatible = "sandbox,thermal";
449 };
Simon Glass28db4692019-05-18 11:59:41 -0600450};
451
452&cros_ec {
453 /*
454 * This describes the flash memory within the EC. Note
455 * that the STM32L flash erases to 0, not 0xff.
456 */
457 flash {
458 image-pos = <0x08000000>;
459 size = <0x20000>;
460 erase-value = <0>;
461
462 /* Information for sandbox */
463 ro {
464 image-pos = <0>;
465 size = <0xf000>;
466 };
467 wp-ro {
468 image-pos = <0xf000>;
469 size = <0x1000>;
470 };
471 rw {
472 image-pos = <0x10000>;
473 size = <0x10000>;
474 };
475 };
476
477 keyboard-controller {
Simon Glasse98524a2020-12-19 10:39:56 -0700478 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -0600479 };
480};