blob: 29306ac04da988698f16fa1bba29149af9ade075 [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";
15 };
16
17 audio: audio-codec {
18 compatible = "sandbox,audio-codec";
19 #sound-dai-cells = <1>;
20 };
21
Simon Glass1b4bc152022-04-24 23:31:21 -060022 bootstd {
23 compatible = "u-boot,boot-std";
24 filename-prefixes = "./";
25 };
26
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020027 buttons {
28 compatible = "gpio-keys";
29
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020030 btn1 {
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020031 gpios = <&gpio_a 3 0>;
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020032 label = "button1";
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020033 };
34
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020035 btn2 {
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020036 gpios = <&gpio_a 4 0>;
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020037 label = "button2";
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020038 };
39 };
40
Simon Glass6b927b12020-10-03 11:31:32 -060041 clk_fixed: clk-fixed {
42 u-boot,dm-pre-reloc;
Simon Glass9bb88fb2021-03-15 17:25:24 +130043 compatible = "sandbox,fixed-clock";
Simon Glass6b927b12020-10-03 11:31:32 -060044 #clock-cells = <0>;
45 clock-frequency = <1234>;
46 };
47
48 clk_sandbox: clk-sbox {
49 u-boot,dm-pre-reloc;
50 compatible = "sandbox,clk";
51 #clock-cells = <1>;
52 assigned-clocks = <&clk_sandbox 3>;
53 assigned-clock-rates = <321>;
54 };
55
56 clk-test {
57 u-boot,dm-pre-reloc;
58 compatible = "sandbox,clk-test";
59 clocks = <&clk_fixed>,
60 <&clk_sandbox 1>,
61 <&clk_sandbox 0>,
62 <&clk_sandbox 3>,
63 <&clk_sandbox 2>;
64 clock-names = "fixed", "i2c", "spi", "uart2", "uart1";
65 };
66
Simon Glass28db4692019-05-18 11:59:41 -060067 gpio_a: gpios@0 {
Simon Glasse98524a2020-12-19 10:39:56 -070068 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -060069 gpio-controller;
70 compatible = "sandbox,gpio";
71 #gpio-cells = <1>;
72 gpio-bank-name = "a";
73 sandbox,gpio-count = <20>;
74 };
75
76 gpio_b: gpios@1 {
Simon Glass2149e112021-08-07 07:24:12 -060077 u-boot,dm-spl;
Simon Glass28db4692019-05-18 11:59:41 -060078 gpio-controller;
79 compatible = "sandbox,gpio";
80 #gpio-cells = <2>;
81 gpio-bank-name = "b";
82 sandbox,gpio-count = <10>;
83 };
84
Simon Glass2149e112021-08-07 07:24:12 -060085 gpio-test {
86 u-boot,dm-spl;
87 compatible = "sandbox,gpio-test";
88 test-gpios = <&gpio_b 3 0>;
89 };
90
Simon Glass28db4692019-05-18 11:59:41 -060091 hexagon {
92 compatible = "demo-simple";
93 colour = "white";
94 sides = <6>;
95 };
96
97 i2c_0: i2c@0 {
98 eeprom@2c {
99 reg = <0x2c>;
100 compatible = "i2c-eeprom";
101 sandbox,emul = <&emul_eeprom>;
102 };
103
104 rtc_0: rtc@43 {
105 reg = <0x43>;
106 compatible = "sandbox-rtc";
107 sandbox,emul = <&emul0>;
Simon Glass4d4558e2020-10-03 11:31:36 -0600108 u-boot,dm-pre-reloc;
Simon Glass28db4692019-05-18 11:59:41 -0600109 };
110 sandbox_pmic: sandbox_pmic {
111 reg = <0x40>;
112 };
113
114 mc34708: pmic@41 {
115 reg = <0x41>;
116 };
117
118 i2c_emul: emul {
Simon Glass9db623b2021-02-03 06:01:16 -0700119 u-boot,dm-pre-reloc;
Simon Glass28db4692019-05-18 11:59:41 -0600120 reg = <0xff>;
121 compatible = "sandbox,i2c-emul-parent";
122 emul_eeprom: emul-eeprom {
123 compatible = "sandbox,i2c-eeprom";
124 sandbox,filename = "i2c.bin";
125 sandbox,size = <256>;
Simon Glass9db623b2021-02-03 06:01:16 -0700126 #emul-cells = <0>;
Simon Glass28db4692019-05-18 11:59:41 -0600127 };
128 emul0: emul0 {
Simon Glass9db623b2021-02-03 06:01:16 -0700129 u-boot,dm-pre-reloc;
130 compatible = "sandbox,i2c-rtc-emul";
131 #emul-cells = <0>;
Simon Glass28db4692019-05-18 11:59:41 -0600132 };
133 };
134 };
135
136 i2s: i2s {
137 compatible = "sandbox,i2s";
138 #sound-dai-cells = <1>;
139 };
140
Simon Glasse7995f72021-08-07 07:24:11 -0600141 irq_sandbox: irq-sbox {
142 u-boot,dm-spl;
143 compatible = "sandbox,irq";
144 interrupt-controller;
145 #interrupt-cells = <2>;
146 };
147
148 irq-test {
149 u-boot,dm-spl;
150 compatible = "sandbox,irq-test";
151 interrupts-extended = <&irq_sandbox 3 0>;
152 };
153
Simon Glass28db4692019-05-18 11:59:41 -0600154 lcd {
Simon Glasse98524a2020-12-19 10:39:56 -0700155 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -0600156 compatible = "sandbox,lcd-sdl";
157 xres = <1366>;
158 yres = <768>;
Simon Glassd2caf7b2020-02-03 07:36:14 -0700159 log2-depth = <5>;
Simon Glass28db4692019-05-18 11:59:41 -0600160 };
161
162 leds {
163 compatible = "gpio-leds";
164
165 iracibble {
166 gpios = <&gpio_a 1 0>;
167 label = "sandbox:red";
168 };
169
170 martinet {
171 gpios = <&gpio_a 2 0>;
172 label = "sandbox:green";
173 };
174 };
175
Tom Rini4a3ca482020-02-11 12:41:23 -0500176 pci@0 {
Simon Glass8c501022019-12-06 21:41:54 -0700177 pci@1e,0 {
178 compatible = "sandbox,pmc";
179 reg = <0xf000 0 0 0 0>;
180 sandbox,emul = <&pmc_emul>;
181 gpe0-dwx-mask = <0xf>;
182 gpe0-dwx-shift-base = <4>;
183 gpe0-dw = <6 7 9>;
184 gpe0-sts = <0x20>;
185 gpe0-en = <0x30>;
186 };
187
Simon Glass28db4692019-05-18 11:59:41 -0600188 pci@1f,0 {
189 compatible = "pci-generic";
190 reg = <0xf800 0 0 0 0>;
Simon Glassb98ba4c2019-09-25 08:56:10 -0600191 sandbox,emul = <&swap_case_emul>;
192 };
193 };
194
195 emul {
196 compatible = "sandbox,pci-emul-parent";
Simon Glass8c501022019-12-06 21:41:54 -0700197 pmc_emul: emul@1e,0 {
198 compatible = "sandbox,pmc-emul";
199 };
Simon Glassb98ba4c2019-09-25 08:56:10 -0600200 swap_case_emul: emul@1f,0 {
201 compatible = "sandbox,swap-case";
Simon Glass28db4692019-05-18 11:59:41 -0600202 };
203 };
204
205 pinctrl {
206 compatible = "sandbox,pinctrl";
207 status = "okay";
208
209 pinctrl_i2c0: i2c0 {
210 groups = "i2c";
211 function = "i2c";
212 bias-pull-up;
213 };
214
215 pinctrl_serial0: uart0 {
216 groups = "serial_a";
217 function = "serial";
218 };
219
220 pinctrl_onewire0: onewire0 {
221 groups = "w1";
222 function = "w1";
223 bias-pull-up;
224 };
225 };
226
227 reset@1 {
228 compatible = "sandbox,reset";
229 };
230
Vincent Stehlé53f6dc02021-03-10 15:33:30 +0100231 rng {
232 compatible = "sandbox,sandbox-rng";
233 };
234
Simon Glass28db4692019-05-18 11:59:41 -0600235 sound {
236 compatible = "sandbox,sound";
237 cpu {
238 sound-dai = <&i2s 0>;
239 };
240
241 codec {
242 sound-dai = <&audio 0>;
243 };
244 };
245
246 spi@0 {
247 firmware_storage_spi: flash@0 {
Simon Glasse98524a2020-12-19 10:39:56 -0700248 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -0600249 reg = <0>;
Simon Glass7e368682019-05-18 11:59:49 -0600250 compatible = "spansion,m25p16", "jedec,spi-nor";
Simon Glass28db4692019-05-18 11:59:41 -0600251 spi-max-frequency = <40000000>;
252 sandbox,filename = "spi.bin";
253 };
254 };
255
256 spl-test {
257 u-boot,dm-pre-reloc;
258 compatible = "sandbox,spl-test";
259 boolval;
260 intval = <1>;
261 intarray = <2 3 4>;
Simon Glass43118322021-07-28 19:23:11 -0600262 maybe-empty-int = <>;
Simon Glass28db4692019-05-18 11:59:41 -0600263 byteval = [05];
264 bytearray = [06];
265 longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
266 stringval = "message";
267 stringarray = "multi-word", "message";
268 };
269
270 spl-test2 {
271 u-boot,dm-pre-reloc;
272 compatible = "sandbox,spl-test";
273 intval = <3>;
274 intarray = <5>;
275 byteval = [08];
276 bytearray = [01 23 34];
277 longbytearray = [09 0a 0b 0c];
278 stringval = "message2";
279 stringarray = "another", "multi-word", "message";
280 };
281
282 spl-test3 {
283 u-boot,dm-pre-reloc;
284 compatible = "sandbox,spl-test";
285 stringarray = "one";
Simon Glass43118322021-07-28 19:23:11 -0600286 maybe-empty-int = <1>;
Simon Glass28db4692019-05-18 11:59:41 -0600287 };
288
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200289 spl-test5 {
290 u-boot,dm-tpl;
291 compatible = "sandbox,spl-test";
292 stringarray = "tpl";
293 };
294
295 spl-test6 {
296 u-boot,dm-pre-proper;
297 compatible = "sandbox,spl-test";
298 stringarray = "pre-proper";
299 };
300
Simon Glass77faa972021-03-15 17:25:31 +1300301 spl-test7 {
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200302 u-boot,dm-spl;
Simon Glass77faa972021-03-15 17:25:31 +1300303 compatible = "sandbox,spl-test";
304 stringarray = "spl";
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200305 };
306
Simon Glass28db4692019-05-18 11:59:41 -0600307 square {
308 compatible = "demo-shape";
309 colour = "blue";
310 sides = <4>;
311 };
312
313 timer {
314 compatible = "sandbox,timer";
315 clock-frequency = <1000000>;
316 };
317
318 tpm {
Simon Glass28db4692019-05-18 11:59:41 -0600319 compatible = "google,sandbox-tpm";
320 };
321
322 tpm2 {
323 compatible = "sandbox,tpm2";
324 };
325
326 triangle {
327 compatible = "demo-shape";
328 colour = "cyan";
329 sides = <3>;
330 character = <83>;
331 light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
332 };
333
334 /* Needs to be available prior to relocation */
335 uart0: serial {
336 u-boot,dm-spl;
337 compatible = "sandbox,serial";
338 sandbox,text-colour = "cyan";
339 pinctrl-names = "default";
340 pinctrl-0 = <&pinctrl_serial0>;
341 };
342
343 usb@0 {
344 compatible = "sandbox,usb";
345 status = "disabled";
346 hub {
347 compatible = "sandbox,usb-hub";
348 #address-cells = <1>;
349 #size-cells = <0>;
350 flash-stick {
351 reg = <0>;
352 compatible = "sandbox,usb-flash";
353 };
354 };
355 };
356
357 usb@1 {
358 compatible = "sandbox,usb";
359 hub {
360 compatible = "usb-hub";
361 usb,device-class = <USB_CLASS_HUB>;
362 hub-emul {
363 compatible = "sandbox,usb-hub";
364 #address-cells = <1>;
365 #size-cells = <0>;
366 flash-stick {
367 reg = <0>;
368 compatible = "sandbox,usb-flash";
369 sandbox,filepath = "flash.bin";
370 };
371 };
372 };
373 };
374
375 usb@2 {
376 compatible = "sandbox,usb";
377 status = "disabled";
378 };
379
380 spmi: spmi@0 {
381 compatible = "sandbox,spmi";
382 #address-cells = <0x1>;
383 #size-cells = <0x1>;
384 pm8916@0 {
385 compatible = "qcom,spmi-pmic";
386 reg = <0x0 0x1>;
387 #address-cells = <0x1>;
388 #size-cells = <0x1>;
389
390 spmi_gpios: gpios@c000 {
391 compatible = "qcom,pm8916-gpio";
392 reg = <0xc000 0x400>;
393 gpio-controller;
394 gpio-count = <4>;
395 #gpio-cells = <2>;
396 gpio-bank-name="spmi";
397 };
398 };
399 };
400
401 axi: axi@0 {
402 compatible = "sandbox,axi";
403 #address-cells = <0x1>;
404 #size-cells = <0x1>;
405 store@0 {
406 compatible = "sandbox,sandbox_store";
407 reg = <0x0 0x400>;
408 };
409 };
410
411 onewire0: onewire {
412 compatible = "w1-gpio";
413 gpios = <&gpio_a 8>;
414 pinctrl-names = "default";
415 pinctrl-0 = <&pinctrl_onewire0>;
416 status = "okay";
417
418 sandbox_eeprom0: sandbox_eeprom@0 {
419 compatible = "sandbox,w1-eeprom";
420 status = "okay";
421 };
422 };
423
424 sandbox_tee {
425 compatible = "sandbox,tee";
426 };
427};
428
429&cros_ec {
430 /*
431 * This describes the flash memory within the EC. Note
432 * that the STM32L flash erases to 0, not 0xff.
433 */
434 flash {
435 image-pos = <0x08000000>;
436 size = <0x20000>;
437 erase-value = <0>;
438
439 /* Information for sandbox */
440 ro {
441 image-pos = <0>;
442 size = <0xf000>;
443 };
444 wp-ro {
445 image-pos = <0xf000>;
446 size = <0x1000>;
447 };
448 rw {
449 image-pos = <0x10000>;
450 size = <0x10000>;
451 };
452 };
453
454 keyboard-controller {
Simon Glasse98524a2020-12-19 10:39:56 -0700455 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -0600456 };
457};