blob: 7387b54bbdaa8aa0363fc9d11c89245840d628e9 [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
7#define USB_CLASS_HUB 9
8
9/ {
Philippe Reynes059df562022-03-28 22:56:53 +020010 binman {
11 };
12
Simon Glassdc8c91a2019-05-18 11:59:41 -060013 chosen {
14 stdout-path = "/serial";
Simon Glass0917f772022-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 Glassdc8c91a2019-05-18 11:59:41 -060028 };
29
30 audio: audio-codec {
31 compatible = "sandbox,audio-codec";
32 #sound-dai-cells = <1>;
33 };
34
Simon Glass7d0478d2022-04-24 23:31:21 -060035 bootstd {
36 compatible = "u-boot,boot-std";
37 filename-prefixes = "./";
38 };
39
Philippe Reynesbd3e4882020-07-24 18:19:48 +020040 buttons {
41 compatible = "gpio-keys";
42
Heinrich Schuchardt39916bb2020-09-14 12:50:54 +020043 btn1 {
Philippe Reynesbd3e4882020-07-24 18:19:48 +020044 gpios = <&gpio_a 3 0>;
Heinrich Schuchardt39916bb2020-09-14 12:50:54 +020045 label = "button1";
Philippe Reynesbd3e4882020-07-24 18:19:48 +020046 };
47
Heinrich Schuchardt39916bb2020-09-14 12:50:54 +020048 btn2 {
Philippe Reynesbd3e4882020-07-24 18:19:48 +020049 gpios = <&gpio_a 4 0>;
Heinrich Schuchardt39916bb2020-09-14 12:50:54 +020050 label = "button2";
Philippe Reynesbd3e4882020-07-24 18:19:48 +020051 };
52 };
53
Simon Glass88280522020-10-03 11:31:32 -060054 clk_fixed: clk-fixed {
55 u-boot,dm-pre-reloc;
Simon Glass88139862021-03-15 17:25:24 +130056 compatible = "sandbox,fixed-clock";
Simon Glass88280522020-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 Glassdc8c91a2019-05-18 11:59:41 -060080 gpio_a: gpios@0 {
Simon Glass370746a2020-12-19 10:39:56 -070081 u-boot,dm-pre-proper;
Simon Glassdc8c91a2019-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 Glass48609d02021-08-07 07:24:12 -060090 u-boot,dm-spl;
Simon Glassdc8c91a2019-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 Glass48609d02021-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 Glassdc8c91a2019-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 Glassfbe27a52020-10-03 11:31:36 -0600121 u-boot,dm-pre-reloc;
Simon Glassdc8c91a2019-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 Glass23f40a32021-02-03 06:01:16 -0700132 u-boot,dm-pre-reloc;
Simon Glassdc8c91a2019-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 Glass23f40a32021-02-03 06:01:16 -0700139 #emul-cells = <0>;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600140 };
141 emul0: emul0 {
Simon Glass23f40a32021-02-03 06:01:16 -0700142 u-boot,dm-pre-reloc;
143 compatible = "sandbox,i2c-rtc-emul";
144 #emul-cells = <0>;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600145 };
146 };
147 };
148
149 i2s: i2s {
150 compatible = "sandbox,i2s";
151 #sound-dai-cells = <1>;
152 };
153
Simon Glass3e57ad92021-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 Glassdc8c91a2019-05-18 11:59:41 -0600167 lcd {
Simon Glass370746a2020-12-19 10:39:56 -0700168 u-boot,dm-pre-proper;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600169 compatible = "sandbox,lcd-sdl";
170 xres = <1366>;
171 yres = <768>;
Simon Glassa466db52020-02-03 07:36:14 -0700172 log2-depth = <5>;
Simon Glassdc8c91a2019-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 Rini42c64d12020-02-11 12:41:23 -0500189 pci@0 {
Simon Glass3b65ee32019-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 Glassdc8c91a2019-05-18 11:59:41 -0600201 pci@1f,0 {
202 compatible = "pci-generic";
203 reg = <0xf800 0 0 0 0>;
Simon Glass9b69ba42019-09-25 08:56:10 -0600204 sandbox,emul = <&swap_case_emul>;
205 };
206 };
207
208 emul {
209 compatible = "sandbox,pci-emul-parent";
Simon Glass3b65ee32019-12-06 21:41:54 -0700210 pmc_emul: emul@1e,0 {
211 compatible = "sandbox,pmc-emul";
212 };
Simon Glass9b69ba42019-09-25 08:56:10 -0600213 swap_case_emul: emul@1f,0 {
214 compatible = "sandbox,swap-case";
Simon Glassdc8c91a2019-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";
Michal Suchanek5b2f49c2022-10-10 20:29:39 +0200242 u-boot,dm-pre-proper;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600243 };
244
Vincent Stehlé619a8152021-03-10 15:33:30 +0100245 rng {
246 compatible = "sandbox,sandbox-rng";
247 };
248
Simon Glass22c80d52022-09-21 16:21:47 +0200249 scsi {
250 compatible = "sandbox,scsi";
251 };
252
Simon Glassdc8c91a2019-05-18 11:59:41 -0600253 sound {
254 compatible = "sandbox,sound";
255 cpu {
256 sound-dai = <&i2s 0>;
257 };
258
259 codec {
260 sound-dai = <&audio 0>;
261 };
262 };
263
264 spi@0 {
265 firmware_storage_spi: flash@0 {
Simon Glass370746a2020-12-19 10:39:56 -0700266 u-boot,dm-pre-proper;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600267 reg = <0>;
Simon Glass24c27762019-05-18 11:59:49 -0600268 compatible = "spansion,m25p16", "jedec,spi-nor";
Simon Glassdc8c91a2019-05-18 11:59:41 -0600269 spi-max-frequency = <40000000>;
270 sandbox,filename = "spi.bin";
271 };
272 };
273
274 spl-test {
Simon Glass9ae25b92022-04-30 00:56:54 -0600275 u-boot,dm-spl;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600276 compatible = "sandbox,spl-test";
277 boolval;
278 intval = <1>;
279 intarray = <2 3 4>;
Simon Glasseec44c72021-07-28 19:23:11 -0600280 maybe-empty-int = <>;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600281 byteval = [05];
282 bytearray = [06];
283 longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
284 stringval = "message";
285 stringarray = "multi-word", "message";
286 };
287
288 spl-test2 {
Simon Glass9ae25b92022-04-30 00:56:54 -0600289 u-boot,dm-spl;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600290 compatible = "sandbox,spl-test";
291 intval = <3>;
292 intarray = <5>;
293 byteval = [08];
294 bytearray = [01 23 34];
295 longbytearray = [09 0a 0b 0c];
296 stringval = "message2";
297 stringarray = "another", "multi-word", "message";
298 };
299
300 spl-test3 {
Simon Glass9ae25b92022-04-30 00:56:54 -0600301 u-boot,dm-spl;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600302 compatible = "sandbox,spl-test";
303 stringarray = "one";
Simon Glasseec44c72021-07-28 19:23:11 -0600304 maybe-empty-int = <1>;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600305 };
306
Patrick Delaunay099ed452019-05-21 19:19:11 +0200307 spl-test5 {
Simon Glass9ae25b92022-04-30 00:56:54 -0600308 u-boot,dm-vpl;
Patrick Delaunay099ed452019-05-21 19:19:11 +0200309 compatible = "sandbox,spl-test";
310 stringarray = "tpl";
311 };
312
313 spl-test6 {
314 u-boot,dm-pre-proper;
315 compatible = "sandbox,spl-test";
316 stringarray = "pre-proper";
317 };
318
Simon Glass3a825d32021-03-15 17:25:31 +1300319 spl-test7 {
Patrick Delaunay099ed452019-05-21 19:19:11 +0200320 u-boot,dm-spl;
Simon Glass3a825d32021-03-15 17:25:31 +1300321 compatible = "sandbox,spl-test";
322 stringarray = "spl";
Patrick Delaunay099ed452019-05-21 19:19:11 +0200323 };
324
Simon Glassdc8c91a2019-05-18 11:59:41 -0600325 square {
326 compatible = "demo-shape";
327 colour = "blue";
328 sides = <4>;
329 };
330
331 timer {
332 compatible = "sandbox,timer";
333 clock-frequency = <1000000>;
334 };
335
336 tpm {
Simon Glassdc8c91a2019-05-18 11:59:41 -0600337 compatible = "google,sandbox-tpm";
338 };
339
340 tpm2 {
341 compatible = "sandbox,tpm2";
342 };
343
344 triangle {
345 compatible = "demo-shape";
346 colour = "cyan";
347 sides = <3>;
348 character = <83>;
349 light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
350 };
351
352 /* Needs to be available prior to relocation */
353 uart0: serial {
354 u-boot,dm-spl;
Simon Glass9ae25b92022-04-30 00:56:54 -0600355 u-boot,dm-tpl;
356 u-boot,dm-vpl;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600357 compatible = "sandbox,serial";
358 sandbox,text-colour = "cyan";
359 pinctrl-names = "default";
360 pinctrl-0 = <&pinctrl_serial0>;
361 };
362
363 usb@0 {
364 compatible = "sandbox,usb";
365 status = "disabled";
366 hub {
367 compatible = "sandbox,usb-hub";
368 #address-cells = <1>;
369 #size-cells = <0>;
370 flash-stick {
371 reg = <0>;
372 compatible = "sandbox,usb-flash";
373 };
374 };
375 };
376
377 usb@1 {
378 compatible = "sandbox,usb";
379 hub {
380 compatible = "usb-hub";
381 usb,device-class = <USB_CLASS_HUB>;
382 hub-emul {
383 compatible = "sandbox,usb-hub";
384 #address-cells = <1>;
385 #size-cells = <0>;
386 flash-stick {
387 reg = <0>;
388 compatible = "sandbox,usb-flash";
389 sandbox,filepath = "flash.bin";
390 };
391 };
392 };
393 };
394
395 usb@2 {
396 compatible = "sandbox,usb";
397 status = "disabled";
398 };
399
400 spmi: spmi@0 {
401 compatible = "sandbox,spmi";
402 #address-cells = <0x1>;
403 #size-cells = <0x1>;
404 pm8916@0 {
405 compatible = "qcom,spmi-pmic";
406 reg = <0x0 0x1>;
407 #address-cells = <0x1>;
408 #size-cells = <0x1>;
409
410 spmi_gpios: gpios@c000 {
411 compatible = "qcom,pm8916-gpio";
412 reg = <0xc000 0x400>;
413 gpio-controller;
414 gpio-count = <4>;
415 #gpio-cells = <2>;
416 gpio-bank-name="spmi";
417 };
418 };
419 };
420
421 axi: axi@0 {
422 compatible = "sandbox,axi";
423 #address-cells = <0x1>;
424 #size-cells = <0x1>;
425 store@0 {
426 compatible = "sandbox,sandbox_store";
427 reg = <0x0 0x400>;
428 };
429 };
430
431 onewire0: onewire {
432 compatible = "w1-gpio";
433 gpios = <&gpio_a 8>;
434 pinctrl-names = "default";
435 pinctrl-0 = <&pinctrl_onewire0>;
436 status = "okay";
437
438 sandbox_eeprom0: sandbox_eeprom@0 {
439 compatible = "sandbox,w1-eeprom";
440 status = "okay";
441 };
442 };
443
444 sandbox_tee {
445 compatible = "sandbox,tee";
446 };
Robert Marko1fad2cb2022-09-06 13:30:35 +0200447
448 thermal {
449 compatible = "sandbox,thermal";
450 };
Simon Glassdc8c91a2019-05-18 11:59:41 -0600451};
452
453&cros_ec {
454 /*
455 * This describes the flash memory within the EC. Note
456 * that the STM32L flash erases to 0, not 0xff.
457 */
458 flash {
459 image-pos = <0x08000000>;
460 size = <0x20000>;
461 erase-value = <0>;
462
463 /* Information for sandbox */
464 ro {
465 image-pos = <0>;
466 size = <0xf000>;
467 };
468 wp-ro {
469 image-pos = <0xf000>;
470 size = <0x1000>;
471 };
472 rw {
473 image-pos = <0x10000>;
474 size = <0x10000>;
475 };
476 };
477
478 keyboard-controller {
Simon Glass370746a2020-12-19 10:39:56 -0700479 u-boot,dm-pre-proper;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600480 };
481};