blob: 56e6b38bfa786f27eeacd08c129bbc00d3e25220 [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 Glass28db4692019-05-18 11:59:41 -0600248 sound {
249 compatible = "sandbox,sound";
250 cpu {
251 sound-dai = <&i2s 0>;
252 };
253
254 codec {
255 sound-dai = <&audio 0>;
256 };
257 };
258
259 spi@0 {
260 firmware_storage_spi: flash@0 {
Simon Glasse98524a2020-12-19 10:39:56 -0700261 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -0600262 reg = <0>;
Simon Glass7e368682019-05-18 11:59:49 -0600263 compatible = "spansion,m25p16", "jedec,spi-nor";
Simon Glass28db4692019-05-18 11:59:41 -0600264 spi-max-frequency = <40000000>;
265 sandbox,filename = "spi.bin";
266 };
267 };
268
269 spl-test {
Simon Glassc86e6202022-04-30 00:56:54 -0600270 u-boot,dm-spl;
Simon Glass28db4692019-05-18 11:59:41 -0600271 compatible = "sandbox,spl-test";
272 boolval;
273 intval = <1>;
274 intarray = <2 3 4>;
Simon Glass43118322021-07-28 19:23:11 -0600275 maybe-empty-int = <>;
Simon Glass28db4692019-05-18 11:59:41 -0600276 byteval = [05];
277 bytearray = [06];
278 longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
279 stringval = "message";
280 stringarray = "multi-word", "message";
281 };
282
283 spl-test2 {
Simon Glassc86e6202022-04-30 00:56:54 -0600284 u-boot,dm-spl;
Simon Glass28db4692019-05-18 11:59:41 -0600285 compatible = "sandbox,spl-test";
286 intval = <3>;
287 intarray = <5>;
288 byteval = [08];
289 bytearray = [01 23 34];
290 longbytearray = [09 0a 0b 0c];
291 stringval = "message2";
292 stringarray = "another", "multi-word", "message";
293 };
294
295 spl-test3 {
Simon Glassc86e6202022-04-30 00:56:54 -0600296 u-boot,dm-spl;
Simon Glass28db4692019-05-18 11:59:41 -0600297 compatible = "sandbox,spl-test";
298 stringarray = "one";
Simon Glass43118322021-07-28 19:23:11 -0600299 maybe-empty-int = <1>;
Simon Glass28db4692019-05-18 11:59:41 -0600300 };
301
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200302 spl-test5 {
Simon Glassc86e6202022-04-30 00:56:54 -0600303 u-boot,dm-vpl;
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200304 compatible = "sandbox,spl-test";
305 stringarray = "tpl";
306 };
307
308 spl-test6 {
309 u-boot,dm-pre-proper;
310 compatible = "sandbox,spl-test";
311 stringarray = "pre-proper";
312 };
313
Simon Glass77faa972021-03-15 17:25:31 +1300314 spl-test7 {
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200315 u-boot,dm-spl;
Simon Glass77faa972021-03-15 17:25:31 +1300316 compatible = "sandbox,spl-test";
317 stringarray = "spl";
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200318 };
319
Simon Glass28db4692019-05-18 11:59:41 -0600320 square {
321 compatible = "demo-shape";
322 colour = "blue";
323 sides = <4>;
324 };
325
326 timer {
327 compatible = "sandbox,timer";
328 clock-frequency = <1000000>;
329 };
330
331 tpm {
Simon Glass28db4692019-05-18 11:59:41 -0600332 compatible = "google,sandbox-tpm";
333 };
334
335 tpm2 {
336 compatible = "sandbox,tpm2";
337 };
338
339 triangle {
340 compatible = "demo-shape";
341 colour = "cyan";
342 sides = <3>;
343 character = <83>;
344 light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
345 };
346
347 /* Needs to be available prior to relocation */
348 uart0: serial {
349 u-boot,dm-spl;
Simon Glassc86e6202022-04-30 00:56:54 -0600350 u-boot,dm-tpl;
351 u-boot,dm-vpl;
Simon Glass28db4692019-05-18 11:59:41 -0600352 compatible = "sandbox,serial";
353 sandbox,text-colour = "cyan";
354 pinctrl-names = "default";
355 pinctrl-0 = <&pinctrl_serial0>;
356 };
357
358 usb@0 {
359 compatible = "sandbox,usb";
360 status = "disabled";
361 hub {
362 compatible = "sandbox,usb-hub";
363 #address-cells = <1>;
364 #size-cells = <0>;
365 flash-stick {
366 reg = <0>;
367 compatible = "sandbox,usb-flash";
368 };
369 };
370 };
371
372 usb@1 {
373 compatible = "sandbox,usb";
374 hub {
375 compatible = "usb-hub";
376 usb,device-class = <USB_CLASS_HUB>;
377 hub-emul {
378 compatible = "sandbox,usb-hub";
379 #address-cells = <1>;
380 #size-cells = <0>;
381 flash-stick {
382 reg = <0>;
383 compatible = "sandbox,usb-flash";
384 sandbox,filepath = "flash.bin";
385 };
386 };
387 };
388 };
389
390 usb@2 {
391 compatible = "sandbox,usb";
392 status = "disabled";
393 };
394
395 spmi: spmi@0 {
396 compatible = "sandbox,spmi";
397 #address-cells = <0x1>;
398 #size-cells = <0x1>;
399 pm8916@0 {
400 compatible = "qcom,spmi-pmic";
401 reg = <0x0 0x1>;
402 #address-cells = <0x1>;
403 #size-cells = <0x1>;
404
405 spmi_gpios: gpios@c000 {
406 compatible = "qcom,pm8916-gpio";
407 reg = <0xc000 0x400>;
408 gpio-controller;
409 gpio-count = <4>;
410 #gpio-cells = <2>;
411 gpio-bank-name="spmi";
412 };
413 };
414 };
415
416 axi: axi@0 {
417 compatible = "sandbox,axi";
418 #address-cells = <0x1>;
419 #size-cells = <0x1>;
420 store@0 {
421 compatible = "sandbox,sandbox_store";
422 reg = <0x0 0x400>;
423 };
424 };
425
426 onewire0: onewire {
427 compatible = "w1-gpio";
428 gpios = <&gpio_a 8>;
429 pinctrl-names = "default";
430 pinctrl-0 = <&pinctrl_onewire0>;
431 status = "okay";
432
433 sandbox_eeprom0: sandbox_eeprom@0 {
434 compatible = "sandbox,w1-eeprom";
435 status = "okay";
436 };
437 };
438
439 sandbox_tee {
440 compatible = "sandbox,tee";
441 };
442};
443
444&cros_ec {
445 /*
446 * This describes the flash memory within the EC. Note
447 * that the STM32L flash erases to 0, not 0xff.
448 */
449 flash {
450 image-pos = <0x08000000>;
451 size = <0x20000>;
452 erase-value = <0>;
453
454 /* Information for sandbox */
455 ro {
456 image-pos = <0>;
457 size = <0xf000>;
458 };
459 wp-ro {
460 image-pos = <0xf000>;
461 size = <0x1000>;
462 };
463 rw {
464 image-pos = <0x10000>;
465 size = <0x10000>;
466 };
467 };
468
469 keyboard-controller {
Simon Glasse98524a2020-12-19 10:39:56 -0700470 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -0600471 };
472};