blob: 826db26fc2b56b47865b1d76c5a9287d74926f12 [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
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020022 buttons {
23 compatible = "gpio-keys";
24
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020025 btn1 {
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020026 gpios = <&gpio_a 3 0>;
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020027 label = "button1";
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020028 };
29
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020030 btn2 {
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020031 gpios = <&gpio_a 4 0>;
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020032 label = "button2";
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020033 };
34 };
35
Simon Glass6b927b12020-10-03 11:31:32 -060036 clk_fixed: clk-fixed {
37 u-boot,dm-pre-reloc;
Simon Glass9bb88fb2021-03-15 17:25:24 +130038 compatible = "sandbox,fixed-clock";
Simon Glass6b927b12020-10-03 11:31:32 -060039 #clock-cells = <0>;
40 clock-frequency = <1234>;
41 };
42
43 clk_sandbox: clk-sbox {
44 u-boot,dm-pre-reloc;
45 compatible = "sandbox,clk";
46 #clock-cells = <1>;
47 assigned-clocks = <&clk_sandbox 3>;
48 assigned-clock-rates = <321>;
49 };
50
51 clk-test {
52 u-boot,dm-pre-reloc;
53 compatible = "sandbox,clk-test";
54 clocks = <&clk_fixed>,
55 <&clk_sandbox 1>,
56 <&clk_sandbox 0>,
57 <&clk_sandbox 3>,
58 <&clk_sandbox 2>;
59 clock-names = "fixed", "i2c", "spi", "uart2", "uart1";
60 };
61
Simon Glass28db4692019-05-18 11:59:41 -060062 gpio_a: gpios@0 {
Simon Glasse98524a2020-12-19 10:39:56 -070063 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -060064 gpio-controller;
65 compatible = "sandbox,gpio";
66 #gpio-cells = <1>;
67 gpio-bank-name = "a";
68 sandbox,gpio-count = <20>;
69 };
70
71 gpio_b: gpios@1 {
Simon Glass2149e112021-08-07 07:24:12 -060072 u-boot,dm-spl;
Simon Glass28db4692019-05-18 11:59:41 -060073 gpio-controller;
74 compatible = "sandbox,gpio";
75 #gpio-cells = <2>;
76 gpio-bank-name = "b";
77 sandbox,gpio-count = <10>;
78 };
79
Simon Glass2149e112021-08-07 07:24:12 -060080 gpio-test {
81 u-boot,dm-spl;
82 compatible = "sandbox,gpio-test";
83 test-gpios = <&gpio_b 3 0>;
84 };
85
Simon Glass28db4692019-05-18 11:59:41 -060086 hexagon {
87 compatible = "demo-simple";
88 colour = "white";
89 sides = <6>;
90 };
91
92 i2c_0: i2c@0 {
93 eeprom@2c {
94 reg = <0x2c>;
95 compatible = "i2c-eeprom";
96 sandbox,emul = <&emul_eeprom>;
97 };
98
99 rtc_0: rtc@43 {
100 reg = <0x43>;
101 compatible = "sandbox-rtc";
102 sandbox,emul = <&emul0>;
Simon Glass4d4558e2020-10-03 11:31:36 -0600103 u-boot,dm-pre-reloc;
Simon Glass28db4692019-05-18 11:59:41 -0600104 };
105 sandbox_pmic: sandbox_pmic {
106 reg = <0x40>;
107 };
108
109 mc34708: pmic@41 {
110 reg = <0x41>;
111 };
112
113 i2c_emul: emul {
Simon Glass9db623b2021-02-03 06:01:16 -0700114 u-boot,dm-pre-reloc;
Simon Glass28db4692019-05-18 11:59:41 -0600115 reg = <0xff>;
116 compatible = "sandbox,i2c-emul-parent";
117 emul_eeprom: emul-eeprom {
118 compatible = "sandbox,i2c-eeprom";
119 sandbox,filename = "i2c.bin";
120 sandbox,size = <256>;
Simon Glass9db623b2021-02-03 06:01:16 -0700121 #emul-cells = <0>;
Simon Glass28db4692019-05-18 11:59:41 -0600122 };
123 emul0: emul0 {
Simon Glass9db623b2021-02-03 06:01:16 -0700124 u-boot,dm-pre-reloc;
125 compatible = "sandbox,i2c-rtc-emul";
126 #emul-cells = <0>;
Simon Glass28db4692019-05-18 11:59:41 -0600127 };
128 };
129 };
130
131 i2s: i2s {
132 compatible = "sandbox,i2s";
133 #sound-dai-cells = <1>;
134 };
135
Simon Glasse7995f72021-08-07 07:24:11 -0600136 irq_sandbox: irq-sbox {
137 u-boot,dm-spl;
138 compatible = "sandbox,irq";
139 interrupt-controller;
140 #interrupt-cells = <2>;
141 };
142
143 irq-test {
144 u-boot,dm-spl;
145 compatible = "sandbox,irq-test";
146 interrupts-extended = <&irq_sandbox 3 0>;
147 };
148
Simon Glass28db4692019-05-18 11:59:41 -0600149 lcd {
Simon Glasse98524a2020-12-19 10:39:56 -0700150 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -0600151 compatible = "sandbox,lcd-sdl";
152 xres = <1366>;
153 yres = <768>;
Simon Glassd2caf7b2020-02-03 07:36:14 -0700154 log2-depth = <5>;
Simon Glass28db4692019-05-18 11:59:41 -0600155 };
156
157 leds {
158 compatible = "gpio-leds";
159
160 iracibble {
161 gpios = <&gpio_a 1 0>;
162 label = "sandbox:red";
163 };
164
165 martinet {
166 gpios = <&gpio_a 2 0>;
167 label = "sandbox:green";
168 };
169 };
170
Tom Rini4a3ca482020-02-11 12:41:23 -0500171 pci@0 {
Simon Glass8c501022019-12-06 21:41:54 -0700172 pci@1e,0 {
173 compatible = "sandbox,pmc";
174 reg = <0xf000 0 0 0 0>;
175 sandbox,emul = <&pmc_emul>;
176 gpe0-dwx-mask = <0xf>;
177 gpe0-dwx-shift-base = <4>;
178 gpe0-dw = <6 7 9>;
179 gpe0-sts = <0x20>;
180 gpe0-en = <0x30>;
181 };
182
Simon Glass28db4692019-05-18 11:59:41 -0600183 pci@1f,0 {
184 compatible = "pci-generic";
185 reg = <0xf800 0 0 0 0>;
Simon Glassb98ba4c2019-09-25 08:56:10 -0600186 sandbox,emul = <&swap_case_emul>;
187 };
188 };
189
190 emul {
191 compatible = "sandbox,pci-emul-parent";
Simon Glass8c501022019-12-06 21:41:54 -0700192 pmc_emul: emul@1e,0 {
193 compatible = "sandbox,pmc-emul";
194 };
Simon Glassb98ba4c2019-09-25 08:56:10 -0600195 swap_case_emul: emul@1f,0 {
196 compatible = "sandbox,swap-case";
Simon Glass28db4692019-05-18 11:59:41 -0600197 };
198 };
199
200 pinctrl {
201 compatible = "sandbox,pinctrl";
202 status = "okay";
203
204 pinctrl_i2c0: i2c0 {
205 groups = "i2c";
206 function = "i2c";
207 bias-pull-up;
208 };
209
210 pinctrl_serial0: uart0 {
211 groups = "serial_a";
212 function = "serial";
213 };
214
215 pinctrl_onewire0: onewire0 {
216 groups = "w1";
217 function = "w1";
218 bias-pull-up;
219 };
220 };
221
222 reset@1 {
223 compatible = "sandbox,reset";
224 };
225
Vincent Stehlé53f6dc02021-03-10 15:33:30 +0100226 rng {
227 compatible = "sandbox,sandbox-rng";
228 };
229
Simon Glass28db4692019-05-18 11:59:41 -0600230 sound {
231 compatible = "sandbox,sound";
232 cpu {
233 sound-dai = <&i2s 0>;
234 };
235
236 codec {
237 sound-dai = <&audio 0>;
238 };
239 };
240
241 spi@0 {
242 firmware_storage_spi: flash@0 {
Simon Glasse98524a2020-12-19 10:39:56 -0700243 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -0600244 reg = <0>;
Simon Glass7e368682019-05-18 11:59:49 -0600245 compatible = "spansion,m25p16", "jedec,spi-nor";
Simon Glass28db4692019-05-18 11:59:41 -0600246 spi-max-frequency = <40000000>;
247 sandbox,filename = "spi.bin";
248 };
249 };
250
251 spl-test {
252 u-boot,dm-pre-reloc;
253 compatible = "sandbox,spl-test";
254 boolval;
255 intval = <1>;
256 intarray = <2 3 4>;
Simon Glass43118322021-07-28 19:23:11 -0600257 maybe-empty-int = <>;
Simon Glass28db4692019-05-18 11:59:41 -0600258 byteval = [05];
259 bytearray = [06];
260 longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
261 stringval = "message";
262 stringarray = "multi-word", "message";
263 };
264
265 spl-test2 {
266 u-boot,dm-pre-reloc;
267 compatible = "sandbox,spl-test";
268 intval = <3>;
269 intarray = <5>;
270 byteval = [08];
271 bytearray = [01 23 34];
272 longbytearray = [09 0a 0b 0c];
273 stringval = "message2";
274 stringarray = "another", "multi-word", "message";
275 };
276
277 spl-test3 {
278 u-boot,dm-pre-reloc;
279 compatible = "sandbox,spl-test";
280 stringarray = "one";
Simon Glass43118322021-07-28 19:23:11 -0600281 maybe-empty-int = <1>;
Simon Glass28db4692019-05-18 11:59:41 -0600282 };
283
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200284 spl-test5 {
285 u-boot,dm-tpl;
286 compatible = "sandbox,spl-test";
287 stringarray = "tpl";
288 };
289
290 spl-test6 {
291 u-boot,dm-pre-proper;
292 compatible = "sandbox,spl-test";
293 stringarray = "pre-proper";
294 };
295
Simon Glass77faa972021-03-15 17:25:31 +1300296 spl-test7 {
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200297 u-boot,dm-spl;
Simon Glass77faa972021-03-15 17:25:31 +1300298 compatible = "sandbox,spl-test";
299 stringarray = "spl";
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200300 };
301
Simon Glass28db4692019-05-18 11:59:41 -0600302 square {
303 compatible = "demo-shape";
304 colour = "blue";
305 sides = <4>;
306 };
307
308 timer {
309 compatible = "sandbox,timer";
310 clock-frequency = <1000000>;
311 };
312
313 tpm {
Simon Glass28db4692019-05-18 11:59:41 -0600314 compatible = "google,sandbox-tpm";
315 };
316
317 tpm2 {
318 compatible = "sandbox,tpm2";
319 };
320
321 triangle {
322 compatible = "demo-shape";
323 colour = "cyan";
324 sides = <3>;
325 character = <83>;
326 light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
327 };
328
329 /* Needs to be available prior to relocation */
330 uart0: serial {
331 u-boot,dm-spl;
332 compatible = "sandbox,serial";
333 sandbox,text-colour = "cyan";
334 pinctrl-names = "default";
335 pinctrl-0 = <&pinctrl_serial0>;
336 };
337
338 usb@0 {
339 compatible = "sandbox,usb";
340 status = "disabled";
341 hub {
342 compatible = "sandbox,usb-hub";
343 #address-cells = <1>;
344 #size-cells = <0>;
345 flash-stick {
346 reg = <0>;
347 compatible = "sandbox,usb-flash";
348 };
349 };
350 };
351
352 usb@1 {
353 compatible = "sandbox,usb";
354 hub {
355 compatible = "usb-hub";
356 usb,device-class = <USB_CLASS_HUB>;
357 hub-emul {
358 compatible = "sandbox,usb-hub";
359 #address-cells = <1>;
360 #size-cells = <0>;
361 flash-stick {
362 reg = <0>;
363 compatible = "sandbox,usb-flash";
364 sandbox,filepath = "flash.bin";
365 };
366 };
367 };
368 };
369
370 usb@2 {
371 compatible = "sandbox,usb";
372 status = "disabled";
373 };
374
375 spmi: spmi@0 {
376 compatible = "sandbox,spmi";
377 #address-cells = <0x1>;
378 #size-cells = <0x1>;
379 pm8916@0 {
380 compatible = "qcom,spmi-pmic";
381 reg = <0x0 0x1>;
382 #address-cells = <0x1>;
383 #size-cells = <0x1>;
384
385 spmi_gpios: gpios@c000 {
386 compatible = "qcom,pm8916-gpio";
387 reg = <0xc000 0x400>;
388 gpio-controller;
389 gpio-count = <4>;
390 #gpio-cells = <2>;
391 gpio-bank-name="spmi";
392 };
393 };
394 };
395
396 axi: axi@0 {
397 compatible = "sandbox,axi";
398 #address-cells = <0x1>;
399 #size-cells = <0x1>;
400 store@0 {
401 compatible = "sandbox,sandbox_store";
402 reg = <0x0 0x400>;
403 };
404 };
405
406 onewire0: onewire {
407 compatible = "w1-gpio";
408 gpios = <&gpio_a 8>;
409 pinctrl-names = "default";
410 pinctrl-0 = <&pinctrl_onewire0>;
411 status = "okay";
412
413 sandbox_eeprom0: sandbox_eeprom@0 {
414 compatible = "sandbox,w1-eeprom";
415 status = "okay";
416 };
417 };
418
419 sandbox_tee {
420 compatible = "sandbox,tee";
421 };
422};
423
424&cros_ec {
425 /*
426 * This describes the flash memory within the EC. Note
427 * that the STM32L flash erases to 0, not 0xff.
428 */
429 flash {
430 image-pos = <0x08000000>;
431 size = <0x20000>;
432 erase-value = <0>;
433
434 /* Information for sandbox */
435 ro {
436 image-pos = <0>;
437 size = <0xf000>;
438 };
439 wp-ro {
440 image-pos = <0xf000>;
441 size = <0x1000>;
442 };
443 rw {
444 image-pos = <0x10000>;
445 size = <0x10000>;
446 };
447 };
448
449 keyboard-controller {
Simon Glasse98524a2020-12-19 10:39:56 -0700450 u-boot,dm-pre-proper;
Simon Glass28db4692019-05-18 11:59:41 -0600451 };
452};