blob: 66b813faadb8fc54591080814834a45d590386fc [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/ {
10 chosen {
11 stdout-path = "/serial";
12 };
13
14 audio: audio-codec {
15 compatible = "sandbox,audio-codec";
16 #sound-dai-cells = <1>;
17 };
18
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020019 buttons {
20 compatible = "gpio-keys";
21
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020022 btn1 {
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020023 gpios = <&gpio_a 3 0>;
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020024 label = "button1";
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020025 };
26
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020027 btn2 {
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020028 gpios = <&gpio_a 4 0>;
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020029 label = "button2";
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020030 };
31 };
32
Simon Glass6b927b12020-10-03 11:31:32 -060033 clk_fixed: clk-fixed {
34 u-boot,dm-pre-reloc;
Simon Glass9bb88fb2021-03-15 17:25:24 +130035 compatible = "sandbox,fixed-clock";
Simon Glass6b927b12020-10-03 11:31:32 -060036 #clock-cells = <0>;
37 clock-frequency = <1234>;
38 };
39
40 clk_sandbox: clk-sbox {
41 u-boot,dm-pre-reloc;
42 compatible = "sandbox,clk";
43 #clock-cells = <1>;
44 assigned-clocks = <&clk_sandbox 3>;
45 assigned-clock-rates = <321>;
46 };
47
48 clk-test {
49 u-boot,dm-pre-reloc;
50 compatible = "sandbox,clk-test";
51 clocks = <&clk_fixed>,
52 <&clk_sandbox 1>,
53 <&clk_sandbox 0>,
54 <&clk_sandbox 3>,
55 <&clk_sandbox 2>;
56 clock-names = "fixed", "i2c", "spi", "uart2", "uart1";
57 };
58
Simon Glass28db4692019-05-18 11:59:41 -060059 gpio_a: gpios@0 {
Simon Glasse98524a2020-12-19 10:39:56 -070060 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -060061 gpio-controller;
62 compatible = "sandbox,gpio";
63 #gpio-cells = <1>;
64 gpio-bank-name = "a";
65 sandbox,gpio-count = <20>;
66 };
67
68 gpio_b: gpios@1 {
Simon Glass2149e112021-08-07 07:24:12 -060069 u-boot,dm-spl;
Simon Glass28db4692019-05-18 11:59:41 -060070 gpio-controller;
71 compatible = "sandbox,gpio";
72 #gpio-cells = <2>;
73 gpio-bank-name = "b";
74 sandbox,gpio-count = <10>;
75 };
76
Simon Glass2149e112021-08-07 07:24:12 -060077 gpio-test {
78 u-boot,dm-spl;
79 compatible = "sandbox,gpio-test";
80 test-gpios = <&gpio_b 3 0>;
81 };
82
Simon Glass28db4692019-05-18 11:59:41 -060083 hexagon {
84 compatible = "demo-simple";
85 colour = "white";
86 sides = <6>;
87 };
88
89 i2c_0: i2c@0 {
90 eeprom@2c {
91 reg = <0x2c>;
92 compatible = "i2c-eeprom";
93 sandbox,emul = <&emul_eeprom>;
94 };
95
96 rtc_0: rtc@43 {
97 reg = <0x43>;
98 compatible = "sandbox-rtc";
99 sandbox,emul = <&emul0>;
Simon Glass4d4558e2020-10-03 11:31:36 -0600100 u-boot,dm-pre-reloc;
Simon Glass28db4692019-05-18 11:59:41 -0600101 };
102 sandbox_pmic: sandbox_pmic {
103 reg = <0x40>;
104 };
105
106 mc34708: pmic@41 {
107 reg = <0x41>;
108 };
109
110 i2c_emul: emul {
Simon Glass9db623b2021-02-03 06:01:16 -0700111 u-boot,dm-pre-reloc;
Simon Glass28db4692019-05-18 11:59:41 -0600112 reg = <0xff>;
113 compatible = "sandbox,i2c-emul-parent";
114 emul_eeprom: emul-eeprom {
115 compatible = "sandbox,i2c-eeprom";
116 sandbox,filename = "i2c.bin";
117 sandbox,size = <256>;
Simon Glass9db623b2021-02-03 06:01:16 -0700118 #emul-cells = <0>;
Simon Glass28db4692019-05-18 11:59:41 -0600119 };
120 emul0: emul0 {
Simon Glass9db623b2021-02-03 06:01:16 -0700121 u-boot,dm-pre-reloc;
122 compatible = "sandbox,i2c-rtc-emul";
123 #emul-cells = <0>;
Simon Glass28db4692019-05-18 11:59:41 -0600124 };
125 };
126 };
127
128 i2s: i2s {
129 compatible = "sandbox,i2s";
130 #sound-dai-cells = <1>;
131 };
132
Simon Glasse7995f72021-08-07 07:24:11 -0600133 irq_sandbox: irq-sbox {
134 u-boot,dm-spl;
135 compatible = "sandbox,irq";
136 interrupt-controller;
137 #interrupt-cells = <2>;
138 };
139
140 irq-test {
141 u-boot,dm-spl;
142 compatible = "sandbox,irq-test";
143 interrupts-extended = <&irq_sandbox 3 0>;
144 };
145
Simon Glass28db4692019-05-18 11:59:41 -0600146 lcd {
Simon Glasse98524a2020-12-19 10:39:56 -0700147 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -0600148 compatible = "sandbox,lcd-sdl";
149 xres = <1366>;
150 yres = <768>;
Simon Glassd2caf7b2020-02-03 07:36:14 -0700151 log2-depth = <5>;
Simon Glass28db4692019-05-18 11:59:41 -0600152 };
153
154 leds {
155 compatible = "gpio-leds";
156
157 iracibble {
158 gpios = <&gpio_a 1 0>;
159 label = "sandbox:red";
160 };
161
162 martinet {
163 gpios = <&gpio_a 2 0>;
164 label = "sandbox:green";
165 };
166 };
167
Tom Rini4a3ca482020-02-11 12:41:23 -0500168 pci@0 {
Simon Glass8c501022019-12-06 21:41:54 -0700169 pci@1e,0 {
170 compatible = "sandbox,pmc";
171 reg = <0xf000 0 0 0 0>;
172 sandbox,emul = <&pmc_emul>;
173 gpe0-dwx-mask = <0xf>;
174 gpe0-dwx-shift-base = <4>;
175 gpe0-dw = <6 7 9>;
176 gpe0-sts = <0x20>;
177 gpe0-en = <0x30>;
178 };
179
Simon Glass28db4692019-05-18 11:59:41 -0600180 pci@1f,0 {
181 compatible = "pci-generic";
182 reg = <0xf800 0 0 0 0>;
Simon Glassb98ba4c2019-09-25 08:56:10 -0600183 sandbox,emul = <&swap_case_emul>;
184 };
185 };
186
187 emul {
188 compatible = "sandbox,pci-emul-parent";
Simon Glass8c501022019-12-06 21:41:54 -0700189 pmc_emul: emul@1e,0 {
190 compatible = "sandbox,pmc-emul";
191 };
Simon Glassb98ba4c2019-09-25 08:56:10 -0600192 swap_case_emul: emul@1f,0 {
193 compatible = "sandbox,swap-case";
Simon Glass28db4692019-05-18 11:59:41 -0600194 };
195 };
196
197 pinctrl {
198 compatible = "sandbox,pinctrl";
199 status = "okay";
200
201 pinctrl_i2c0: i2c0 {
202 groups = "i2c";
203 function = "i2c";
204 bias-pull-up;
205 };
206
207 pinctrl_serial0: uart0 {
208 groups = "serial_a";
209 function = "serial";
210 };
211
212 pinctrl_onewire0: onewire0 {
213 groups = "w1";
214 function = "w1";
215 bias-pull-up;
216 };
217 };
218
219 reset@1 {
220 compatible = "sandbox,reset";
221 };
222
Vincent Stehlé53f6dc02021-03-10 15:33:30 +0100223 rng {
224 compatible = "sandbox,sandbox-rng";
225 };
226
Simon Glass28db4692019-05-18 11:59:41 -0600227 sound {
228 compatible = "sandbox,sound";
229 cpu {
230 sound-dai = <&i2s 0>;
231 };
232
233 codec {
234 sound-dai = <&audio 0>;
235 };
236 };
237
238 spi@0 {
239 firmware_storage_spi: flash@0 {
Simon Glasse98524a2020-12-19 10:39:56 -0700240 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -0600241 reg = <0>;
Simon Glass7e368682019-05-18 11:59:49 -0600242 compatible = "spansion,m25p16", "jedec,spi-nor";
Simon Glass28db4692019-05-18 11:59:41 -0600243 spi-max-frequency = <40000000>;
244 sandbox,filename = "spi.bin";
245 };
246 };
247
248 spl-test {
249 u-boot,dm-pre-reloc;
250 compatible = "sandbox,spl-test";
251 boolval;
252 intval = <1>;
253 intarray = <2 3 4>;
Simon Glass43118322021-07-28 19:23:11 -0600254 maybe-empty-int = <>;
Simon Glass28db4692019-05-18 11:59:41 -0600255 byteval = [05];
256 bytearray = [06];
257 longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
258 stringval = "message";
259 stringarray = "multi-word", "message";
260 };
261
262 spl-test2 {
263 u-boot,dm-pre-reloc;
264 compatible = "sandbox,spl-test";
265 intval = <3>;
266 intarray = <5>;
267 byteval = [08];
268 bytearray = [01 23 34];
269 longbytearray = [09 0a 0b 0c];
270 stringval = "message2";
271 stringarray = "another", "multi-word", "message";
272 };
273
274 spl-test3 {
275 u-boot,dm-pre-reloc;
276 compatible = "sandbox,spl-test";
277 stringarray = "one";
Simon Glass43118322021-07-28 19:23:11 -0600278 maybe-empty-int = <1>;
Simon Glass28db4692019-05-18 11:59:41 -0600279 };
280
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200281 spl-test5 {
282 u-boot,dm-tpl;
283 compatible = "sandbox,spl-test";
284 stringarray = "tpl";
285 };
286
287 spl-test6 {
288 u-boot,dm-pre-proper;
289 compatible = "sandbox,spl-test";
290 stringarray = "pre-proper";
291 };
292
Simon Glass77faa972021-03-15 17:25:31 +1300293 spl-test7 {
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200294 u-boot,dm-spl;
Simon Glass77faa972021-03-15 17:25:31 +1300295 compatible = "sandbox,spl-test";
296 stringarray = "spl";
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200297 };
298
Simon Glass28db4692019-05-18 11:59:41 -0600299 square {
300 compatible = "demo-shape";
301 colour = "blue";
302 sides = <4>;
303 };
304
305 timer {
306 compatible = "sandbox,timer";
307 clock-frequency = <1000000>;
308 };
309
310 tpm {
Simon Glass28db4692019-05-18 11:59:41 -0600311 compatible = "google,sandbox-tpm";
312 };
313
314 tpm2 {
315 compatible = "sandbox,tpm2";
316 };
317
318 triangle {
319 compatible = "demo-shape";
320 colour = "cyan";
321 sides = <3>;
322 character = <83>;
323 light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
324 };
325
326 /* Needs to be available prior to relocation */
327 uart0: serial {
328 u-boot,dm-spl;
329 compatible = "sandbox,serial";
330 sandbox,text-colour = "cyan";
331 pinctrl-names = "default";
332 pinctrl-0 = <&pinctrl_serial0>;
333 };
334
335 usb@0 {
336 compatible = "sandbox,usb";
337 status = "disabled";
338 hub {
339 compatible = "sandbox,usb-hub";
340 #address-cells = <1>;
341 #size-cells = <0>;
342 flash-stick {
343 reg = <0>;
344 compatible = "sandbox,usb-flash";
345 };
346 };
347 };
348
349 usb@1 {
350 compatible = "sandbox,usb";
351 hub {
352 compatible = "usb-hub";
353 usb,device-class = <USB_CLASS_HUB>;
354 hub-emul {
355 compatible = "sandbox,usb-hub";
356 #address-cells = <1>;
357 #size-cells = <0>;
358 flash-stick {
359 reg = <0>;
360 compatible = "sandbox,usb-flash";
361 sandbox,filepath = "flash.bin";
362 };
363 };
364 };
365 };
366
367 usb@2 {
368 compatible = "sandbox,usb";
369 status = "disabled";
370 };
371
372 spmi: spmi@0 {
373 compatible = "sandbox,spmi";
374 #address-cells = <0x1>;
375 #size-cells = <0x1>;
376 pm8916@0 {
377 compatible = "qcom,spmi-pmic";
378 reg = <0x0 0x1>;
379 #address-cells = <0x1>;
380 #size-cells = <0x1>;
381
382 spmi_gpios: gpios@c000 {
383 compatible = "qcom,pm8916-gpio";
384 reg = <0xc000 0x400>;
385 gpio-controller;
386 gpio-count = <4>;
387 #gpio-cells = <2>;
388 gpio-bank-name="spmi";
389 };
390 };
391 };
392
393 axi: axi@0 {
394 compatible = "sandbox,axi";
395 #address-cells = <0x1>;
396 #size-cells = <0x1>;
397 store@0 {
398 compatible = "sandbox,sandbox_store";
399 reg = <0x0 0x400>;
400 };
401 };
402
403 onewire0: onewire {
404 compatible = "w1-gpio";
405 gpios = <&gpio_a 8>;
406 pinctrl-names = "default";
407 pinctrl-0 = <&pinctrl_onewire0>;
408 status = "okay";
409
410 sandbox_eeprom0: sandbox_eeprom@0 {
411 compatible = "sandbox,w1-eeprom";
412 status = "okay";
413 };
414 };
415
416 sandbox_tee {
417 compatible = "sandbox,tee";
418 };
419};
420
421&cros_ec {
422 /*
423 * This describes the flash memory within the EC. Note
424 * that the STM32L flash erases to 0, not 0xff.
425 */
426 flash {
427 image-pos = <0x08000000>;
428 size = <0x20000>;
429 erase-value = <0>;
430
431 /* Information for sandbox */
432 ro {
433 image-pos = <0>;
434 size = <0xf000>;
435 };
436 wp-ro {
437 image-pos = <0xf000>;
438 size = <0x1000>;
439 };
440 rw {
441 image-pos = <0x10000>;
442 size = <0x10000>;
443 };
444 };
445
446 keyboard-controller {
Simon Glasse98524a2020-12-19 10:39:56 -0700447 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -0600448 };
449};