blob: 18bf1cb5b699f8e68436604a13f7b4f4889092b3 [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";
15 };
16
Rasmus Villemoes374d5d92022-09-27 11:54:05 +020017 alarm_wdt: alarm-wdt {
18 compatible = "sandbox,alarm-wdt";
19 timeout-sec = <5>;
20 u-boot,autostart;
21 };
22
Simon Glassdc8c91a2019-05-18 11:59:41 -060023 audio: audio-codec {
24 compatible = "sandbox,audio-codec";
25 #sound-dai-cells = <1>;
26 };
27
Simon Glass7d0478d2022-04-24 23:31:21 -060028 bootstd {
29 compatible = "u-boot,boot-std";
30 filename-prefixes = "./";
31 };
32
Philippe Reynesbd3e4882020-07-24 18:19:48 +020033 buttons {
34 compatible = "gpio-keys";
35
Heinrich Schuchardt39916bb2020-09-14 12:50:54 +020036 btn1 {
Philippe Reynesbd3e4882020-07-24 18:19:48 +020037 gpios = <&gpio_a 3 0>;
Heinrich Schuchardt39916bb2020-09-14 12:50:54 +020038 label = "button1";
Philippe Reynesbd3e4882020-07-24 18:19:48 +020039 };
40
Heinrich Schuchardt39916bb2020-09-14 12:50:54 +020041 btn2 {
Philippe Reynesbd3e4882020-07-24 18:19:48 +020042 gpios = <&gpio_a 4 0>;
Heinrich Schuchardt39916bb2020-09-14 12:50:54 +020043 label = "button2";
Philippe Reynesbd3e4882020-07-24 18:19:48 +020044 };
45 };
46
Simon Glass88280522020-10-03 11:31:32 -060047 clk_fixed: clk-fixed {
48 u-boot,dm-pre-reloc;
Simon Glass88139862021-03-15 17:25:24 +130049 compatible = "sandbox,fixed-clock";
Simon Glass88280522020-10-03 11:31:32 -060050 #clock-cells = <0>;
51 clock-frequency = <1234>;
52 };
53
54 clk_sandbox: clk-sbox {
55 u-boot,dm-pre-reloc;
56 compatible = "sandbox,clk";
57 #clock-cells = <1>;
58 assigned-clocks = <&clk_sandbox 3>;
59 assigned-clock-rates = <321>;
60 };
61
62 clk-test {
63 u-boot,dm-pre-reloc;
64 compatible = "sandbox,clk-test";
65 clocks = <&clk_fixed>,
66 <&clk_sandbox 1>,
67 <&clk_sandbox 0>,
68 <&clk_sandbox 3>,
69 <&clk_sandbox 2>;
70 clock-names = "fixed", "i2c", "spi", "uart2", "uart1";
71 };
72
Simon Glassdc8c91a2019-05-18 11:59:41 -060073 gpio_a: gpios@0 {
Simon Glass370746a2020-12-19 10:39:56 -070074 u-boot,dm-pre-proper;
Simon Glassdc8c91a2019-05-18 11:59:41 -060075 gpio-controller;
76 compatible = "sandbox,gpio";
77 #gpio-cells = <1>;
78 gpio-bank-name = "a";
79 sandbox,gpio-count = <20>;
80 };
81
82 gpio_b: gpios@1 {
Simon Glass48609d02021-08-07 07:24:12 -060083 u-boot,dm-spl;
Simon Glassdc8c91a2019-05-18 11:59:41 -060084 gpio-controller;
85 compatible = "sandbox,gpio";
86 #gpio-cells = <2>;
87 gpio-bank-name = "b";
88 sandbox,gpio-count = <10>;
89 };
90
Simon Glass48609d02021-08-07 07:24:12 -060091 gpio-test {
92 u-boot,dm-spl;
93 compatible = "sandbox,gpio-test";
94 test-gpios = <&gpio_b 3 0>;
95 };
96
Simon Glassdc8c91a2019-05-18 11:59:41 -060097 hexagon {
98 compatible = "demo-simple";
99 colour = "white";
100 sides = <6>;
101 };
102
103 i2c_0: i2c@0 {
104 eeprom@2c {
105 reg = <0x2c>;
106 compatible = "i2c-eeprom";
107 sandbox,emul = <&emul_eeprom>;
108 };
109
110 rtc_0: rtc@43 {
111 reg = <0x43>;
112 compatible = "sandbox-rtc";
113 sandbox,emul = <&emul0>;
Simon Glassfbe27a52020-10-03 11:31:36 -0600114 u-boot,dm-pre-reloc;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600115 };
116 sandbox_pmic: sandbox_pmic {
117 reg = <0x40>;
118 };
119
120 mc34708: pmic@41 {
121 reg = <0x41>;
122 };
123
124 i2c_emul: emul {
Simon Glass23f40a32021-02-03 06:01:16 -0700125 u-boot,dm-pre-reloc;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600126 reg = <0xff>;
127 compatible = "sandbox,i2c-emul-parent";
128 emul_eeprom: emul-eeprom {
129 compatible = "sandbox,i2c-eeprom";
130 sandbox,filename = "i2c.bin";
131 sandbox,size = <256>;
Simon Glass23f40a32021-02-03 06:01:16 -0700132 #emul-cells = <0>;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600133 };
134 emul0: emul0 {
Simon Glass23f40a32021-02-03 06:01:16 -0700135 u-boot,dm-pre-reloc;
136 compatible = "sandbox,i2c-rtc-emul";
137 #emul-cells = <0>;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600138 };
139 };
140 };
141
142 i2s: i2s {
143 compatible = "sandbox,i2s";
144 #sound-dai-cells = <1>;
145 };
146
Simon Glass3e57ad92021-08-07 07:24:11 -0600147 irq_sandbox: irq-sbox {
148 u-boot,dm-spl;
149 compatible = "sandbox,irq";
150 interrupt-controller;
151 #interrupt-cells = <2>;
152 };
153
154 irq-test {
155 u-boot,dm-spl;
156 compatible = "sandbox,irq-test";
157 interrupts-extended = <&irq_sandbox 3 0>;
158 };
159
Simon Glassdc8c91a2019-05-18 11:59:41 -0600160 lcd {
Simon Glass370746a2020-12-19 10:39:56 -0700161 u-boot,dm-pre-proper;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600162 compatible = "sandbox,lcd-sdl";
163 xres = <1366>;
164 yres = <768>;
Simon Glassa466db52020-02-03 07:36:14 -0700165 log2-depth = <5>;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600166 };
167
168 leds {
169 compatible = "gpio-leds";
170
171 iracibble {
172 gpios = <&gpio_a 1 0>;
173 label = "sandbox:red";
174 };
175
176 martinet {
177 gpios = <&gpio_a 2 0>;
178 label = "sandbox:green";
179 };
180 };
181
Tom Rini42c64d12020-02-11 12:41:23 -0500182 pci@0 {
Simon Glass3b65ee32019-12-06 21:41:54 -0700183 pci@1e,0 {
184 compatible = "sandbox,pmc";
185 reg = <0xf000 0 0 0 0>;
186 sandbox,emul = <&pmc_emul>;
187 gpe0-dwx-mask = <0xf>;
188 gpe0-dwx-shift-base = <4>;
189 gpe0-dw = <6 7 9>;
190 gpe0-sts = <0x20>;
191 gpe0-en = <0x30>;
192 };
193
Simon Glassdc8c91a2019-05-18 11:59:41 -0600194 pci@1f,0 {
195 compatible = "pci-generic";
196 reg = <0xf800 0 0 0 0>;
Simon Glass9b69ba42019-09-25 08:56:10 -0600197 sandbox,emul = <&swap_case_emul>;
198 };
199 };
200
201 emul {
202 compatible = "sandbox,pci-emul-parent";
Simon Glass3b65ee32019-12-06 21:41:54 -0700203 pmc_emul: emul@1e,0 {
204 compatible = "sandbox,pmc-emul";
205 };
Simon Glass9b69ba42019-09-25 08:56:10 -0600206 swap_case_emul: emul@1f,0 {
207 compatible = "sandbox,swap-case";
Simon Glassdc8c91a2019-05-18 11:59:41 -0600208 };
209 };
210
211 pinctrl {
212 compatible = "sandbox,pinctrl";
213 status = "okay";
214
215 pinctrl_i2c0: i2c0 {
216 groups = "i2c";
217 function = "i2c";
218 bias-pull-up;
219 };
220
221 pinctrl_serial0: uart0 {
222 groups = "serial_a";
223 function = "serial";
224 };
225
226 pinctrl_onewire0: onewire0 {
227 groups = "w1";
228 function = "w1";
229 bias-pull-up;
230 };
231 };
232
233 reset@1 {
234 compatible = "sandbox,reset";
Michal Suchanek5b2f49c2022-10-10 20:29:39 +0200235 u-boot,dm-pre-proper;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600236 };
237
Vincent Stehlé619a8152021-03-10 15:33:30 +0100238 rng {
239 compatible = "sandbox,sandbox-rng";
240 };
241
Simon Glass22c80d52022-09-21 16:21:47 +0200242 scsi {
243 compatible = "sandbox,scsi";
244 };
245
Simon Glassdc8c91a2019-05-18 11:59:41 -0600246 sound {
247 compatible = "sandbox,sound";
248 cpu {
249 sound-dai = <&i2s 0>;
250 };
251
252 codec {
253 sound-dai = <&audio 0>;
254 };
255 };
256
257 spi@0 {
258 firmware_storage_spi: flash@0 {
Simon Glass370746a2020-12-19 10:39:56 -0700259 u-boot,dm-pre-proper;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600260 reg = <0>;
Simon Glass24c27762019-05-18 11:59:49 -0600261 compatible = "spansion,m25p16", "jedec,spi-nor";
Simon Glassdc8c91a2019-05-18 11:59:41 -0600262 spi-max-frequency = <40000000>;
263 sandbox,filename = "spi.bin";
264 };
265 };
266
267 spl-test {
Simon Glass9ae25b92022-04-30 00:56:54 -0600268 u-boot,dm-spl;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600269 compatible = "sandbox,spl-test";
270 boolval;
271 intval = <1>;
272 intarray = <2 3 4>;
Simon Glasseec44c72021-07-28 19:23:11 -0600273 maybe-empty-int = <>;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600274 byteval = [05];
275 bytearray = [06];
276 longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
277 stringval = "message";
278 stringarray = "multi-word", "message";
279 };
280
281 spl-test2 {
Simon Glass9ae25b92022-04-30 00:56:54 -0600282 u-boot,dm-spl;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600283 compatible = "sandbox,spl-test";
284 intval = <3>;
285 intarray = <5>;
286 byteval = [08];
287 bytearray = [01 23 34];
288 longbytearray = [09 0a 0b 0c];
289 stringval = "message2";
290 stringarray = "another", "multi-word", "message";
291 };
292
293 spl-test3 {
Simon Glass9ae25b92022-04-30 00:56:54 -0600294 u-boot,dm-spl;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600295 compatible = "sandbox,spl-test";
296 stringarray = "one";
Simon Glasseec44c72021-07-28 19:23:11 -0600297 maybe-empty-int = <1>;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600298 };
299
Patrick Delaunay099ed452019-05-21 19:19:11 +0200300 spl-test5 {
Simon Glass9ae25b92022-04-30 00:56:54 -0600301 u-boot,dm-vpl;
Patrick Delaunay099ed452019-05-21 19:19:11 +0200302 compatible = "sandbox,spl-test";
303 stringarray = "tpl";
304 };
305
306 spl-test6 {
307 u-boot,dm-pre-proper;
308 compatible = "sandbox,spl-test";
309 stringarray = "pre-proper";
310 };
311
Simon Glass3a825d32021-03-15 17:25:31 +1300312 spl-test7 {
Patrick Delaunay099ed452019-05-21 19:19:11 +0200313 u-boot,dm-spl;
Simon Glass3a825d32021-03-15 17:25:31 +1300314 compatible = "sandbox,spl-test";
315 stringarray = "spl";
Patrick Delaunay099ed452019-05-21 19:19:11 +0200316 };
317
Simon Glassdc8c91a2019-05-18 11:59:41 -0600318 square {
319 compatible = "demo-shape";
320 colour = "blue";
321 sides = <4>;
322 };
323
324 timer {
325 compatible = "sandbox,timer";
326 clock-frequency = <1000000>;
327 };
328
329 tpm {
Simon Glassdc8c91a2019-05-18 11:59:41 -0600330 compatible = "google,sandbox-tpm";
331 };
332
333 tpm2 {
334 compatible = "sandbox,tpm2";
335 };
336
337 triangle {
338 compatible = "demo-shape";
339 colour = "cyan";
340 sides = <3>;
341 character = <83>;
342 light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
343 };
344
345 /* Needs to be available prior to relocation */
346 uart0: serial {
347 u-boot,dm-spl;
Simon Glass9ae25b92022-04-30 00:56:54 -0600348 u-boot,dm-tpl;
349 u-boot,dm-vpl;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600350 compatible = "sandbox,serial";
351 sandbox,text-colour = "cyan";
352 pinctrl-names = "default";
353 pinctrl-0 = <&pinctrl_serial0>;
354 };
355
356 usb@0 {
357 compatible = "sandbox,usb";
358 status = "disabled";
359 hub {
360 compatible = "sandbox,usb-hub";
361 #address-cells = <1>;
362 #size-cells = <0>;
363 flash-stick {
364 reg = <0>;
365 compatible = "sandbox,usb-flash";
366 };
367 };
368 };
369
370 usb@1 {
371 compatible = "sandbox,usb";
372 hub {
373 compatible = "usb-hub";
374 usb,device-class = <USB_CLASS_HUB>;
375 hub-emul {
376 compatible = "sandbox,usb-hub";
377 #address-cells = <1>;
378 #size-cells = <0>;
379 flash-stick {
380 reg = <0>;
381 compatible = "sandbox,usb-flash";
382 sandbox,filepath = "flash.bin";
383 };
384 };
385 };
386 };
387
388 usb@2 {
389 compatible = "sandbox,usb";
390 status = "disabled";
391 };
392
393 spmi: spmi@0 {
394 compatible = "sandbox,spmi";
395 #address-cells = <0x1>;
396 #size-cells = <0x1>;
397 pm8916@0 {
398 compatible = "qcom,spmi-pmic";
399 reg = <0x0 0x1>;
400 #address-cells = <0x1>;
401 #size-cells = <0x1>;
402
403 spmi_gpios: gpios@c000 {
404 compatible = "qcom,pm8916-gpio";
405 reg = <0xc000 0x400>;
406 gpio-controller;
407 gpio-count = <4>;
408 #gpio-cells = <2>;
409 gpio-bank-name="spmi";
410 };
411 };
412 };
413
414 axi: axi@0 {
415 compatible = "sandbox,axi";
416 #address-cells = <0x1>;
417 #size-cells = <0x1>;
418 store@0 {
419 compatible = "sandbox,sandbox_store";
420 reg = <0x0 0x400>;
421 };
422 };
423
424 onewire0: onewire {
425 compatible = "w1-gpio";
426 gpios = <&gpio_a 8>;
427 pinctrl-names = "default";
428 pinctrl-0 = <&pinctrl_onewire0>;
429 status = "okay";
430
431 sandbox_eeprom0: sandbox_eeprom@0 {
432 compatible = "sandbox,w1-eeprom";
433 status = "okay";
434 };
435 };
436
437 sandbox_tee {
438 compatible = "sandbox,tee";
439 };
Robert Marko1fad2cb2022-09-06 13:30:35 +0200440
441 thermal {
442 compatible = "sandbox,thermal";
443 };
Simon Glassdc8c91a2019-05-18 11:59:41 -0600444};
445
446&cros_ec {
447 /*
448 * This describes the flash memory within the EC. Note
449 * that the STM32L flash erases to 0, not 0xff.
450 */
451 flash {
452 image-pos = <0x08000000>;
453 size = <0x20000>;
454 erase-value = <0>;
455
456 /* Information for sandbox */
457 ro {
458 image-pos = <0>;
459 size = <0xf000>;
460 };
461 wp-ro {
462 image-pos = <0xf000>;
463 size = <0x1000>;
464 };
465 rw {
466 image-pos = <0x10000>;
467 size = <0x10000>;
468 };
469 };
470
471 keyboard-controller {
Simon Glass370746a2020-12-19 10:39:56 -0700472 u-boot,dm-pre-proper;
Simon Glassdc8c91a2019-05-18 11:59:41 -0600473 };
474};