blob: 81cdc55b0d4d10205bc7c7f052ac9c91e2a4cf1a [file] [log] [blame]
Simon Glass28db4692019-05-18 11:59:41 -06001/*
2 * This is the common sandbox device-tree nodes. This is shared between sandbox
3 * and sandbox64 builds.
4 */
5
6#define USB_CLASS_HUB 9
7
8/ {
9 chosen {
10 stdout-path = "/serial";
11 };
12
13 audio: audio-codec {
14 compatible = "sandbox,audio-codec";
15 #sound-dai-cells = <1>;
16 };
17
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020018 buttons {
19 compatible = "gpio-keys";
20
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020021 btn1 {
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020022 gpios = <&gpio_a 3 0>;
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020023 label = "button1";
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020024 };
25
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020026 btn2 {
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020027 gpios = <&gpio_a 4 0>;
Heinrich Schuchardt57c2fc62020-09-14 12:50:54 +020028 label = "button2";
Philippe Reynesf56bf0a2020-07-24 18:19:48 +020029 };
30 };
31
Simon Glass6b927b12020-10-03 11:31:32 -060032 clk_fixed: clk-fixed {
33 u-boot,dm-pre-reloc;
34 compatible = "fixed-clock";
35 #clock-cells = <0>;
36 clock-frequency = <1234>;
37 };
38
39 clk_sandbox: clk-sbox {
40 u-boot,dm-pre-reloc;
41 compatible = "sandbox,clk";
42 #clock-cells = <1>;
43 assigned-clocks = <&clk_sandbox 3>;
44 assigned-clock-rates = <321>;
45 };
46
47 clk-test {
48 u-boot,dm-pre-reloc;
49 compatible = "sandbox,clk-test";
50 clocks = <&clk_fixed>,
51 <&clk_sandbox 1>,
52 <&clk_sandbox 0>,
53 <&clk_sandbox 3>,
54 <&clk_sandbox 2>;
55 clock-names = "fixed", "i2c", "spi", "uart2", "uart1";
56 };
57
Simon Glass28db4692019-05-18 11:59:41 -060058 gpio_a: gpios@0 {
59 u-boot,dm-pre-reloc;
60 gpio-controller;
61 compatible = "sandbox,gpio";
62 #gpio-cells = <1>;
63 gpio-bank-name = "a";
64 sandbox,gpio-count = <20>;
65 };
66
67 gpio_b: gpios@1 {
68 u-boot,dm-pre-reloc;
69 gpio-controller;
70 compatible = "sandbox,gpio";
71 #gpio-cells = <2>;
72 gpio-bank-name = "b";
73 sandbox,gpio-count = <10>;
74 };
75
76 hexagon {
77 compatible = "demo-simple";
78 colour = "white";
79 sides = <6>;
80 };
81
82 i2c_0: i2c@0 {
83 eeprom@2c {
84 reg = <0x2c>;
85 compatible = "i2c-eeprom";
86 sandbox,emul = <&emul_eeprom>;
87 };
88
89 rtc_0: rtc@43 {
90 reg = <0x43>;
91 compatible = "sandbox-rtc";
92 sandbox,emul = <&emul0>;
Simon Glass4d4558e2020-10-03 11:31:36 -060093 u-boot,dm-pre-reloc;
Simon Glass28db4692019-05-18 11:59:41 -060094 };
95 sandbox_pmic: sandbox_pmic {
96 reg = <0x40>;
97 };
98
99 mc34708: pmic@41 {
100 reg = <0x41>;
101 };
102
103 i2c_emul: emul {
104 reg = <0xff>;
105 compatible = "sandbox,i2c-emul-parent";
106 emul_eeprom: emul-eeprom {
107 compatible = "sandbox,i2c-eeprom";
108 sandbox,filename = "i2c.bin";
109 sandbox,size = <256>;
110 };
111 emul0: emul0 {
112 compatible = "sandbox,i2c-rtc";
113 };
114 };
115 };
116
117 i2s: i2s {
118 compatible = "sandbox,i2s";
119 #sound-dai-cells = <1>;
120 };
121
122 lcd {
123 u-boot,dm-pre-reloc;
124 compatible = "sandbox,lcd-sdl";
125 xres = <1366>;
126 yres = <768>;
Simon Glassd2caf7b2020-02-03 07:36:14 -0700127 log2-depth = <5>;
Simon Glass28db4692019-05-18 11:59:41 -0600128 };
129
130 leds {
131 compatible = "gpio-leds";
132
133 iracibble {
134 gpios = <&gpio_a 1 0>;
135 label = "sandbox:red";
136 };
137
138 martinet {
139 gpios = <&gpio_a 2 0>;
140 label = "sandbox:green";
141 };
142 };
143
Tom Rini4a3ca482020-02-11 12:41:23 -0500144 pci@0 {
Simon Glass8c501022019-12-06 21:41:54 -0700145 pci@1e,0 {
146 compatible = "sandbox,pmc";
147 reg = <0xf000 0 0 0 0>;
148 sandbox,emul = <&pmc_emul>;
149 gpe0-dwx-mask = <0xf>;
150 gpe0-dwx-shift-base = <4>;
151 gpe0-dw = <6 7 9>;
152 gpe0-sts = <0x20>;
153 gpe0-en = <0x30>;
154 };
155
Simon Glass28db4692019-05-18 11:59:41 -0600156 pci@1f,0 {
157 compatible = "pci-generic";
158 reg = <0xf800 0 0 0 0>;
Simon Glassb98ba4c2019-09-25 08:56:10 -0600159 sandbox,emul = <&swap_case_emul>;
160 };
161 };
162
163 emul {
164 compatible = "sandbox,pci-emul-parent";
Simon Glass8c501022019-12-06 21:41:54 -0700165 pmc_emul: emul@1e,0 {
166 compatible = "sandbox,pmc-emul";
167 };
Simon Glassb98ba4c2019-09-25 08:56:10 -0600168 swap_case_emul: emul@1f,0 {
169 compatible = "sandbox,swap-case";
Simon Glass28db4692019-05-18 11:59:41 -0600170 };
171 };
172
173 pinctrl {
174 compatible = "sandbox,pinctrl";
175 status = "okay";
176
177 pinctrl_i2c0: i2c0 {
178 groups = "i2c";
179 function = "i2c";
180 bias-pull-up;
181 };
182
183 pinctrl_serial0: uart0 {
184 groups = "serial_a";
185 function = "serial";
186 };
187
188 pinctrl_onewire0: onewire0 {
189 groups = "w1";
190 function = "w1";
191 bias-pull-up;
192 };
193 };
194
195 reset@1 {
196 compatible = "sandbox,reset";
197 };
198
199 sound {
200 compatible = "sandbox,sound";
201 cpu {
202 sound-dai = <&i2s 0>;
203 };
204
205 codec {
206 sound-dai = <&audio 0>;
207 };
208 };
209
210 spi@0 {
211 firmware_storage_spi: flash@0 {
212 u-boot,dm-pre-reloc;
213 reg = <0>;
Simon Glass7e368682019-05-18 11:59:49 -0600214 compatible = "spansion,m25p16", "jedec,spi-nor";
Simon Glass28db4692019-05-18 11:59:41 -0600215 spi-max-frequency = <40000000>;
216 sandbox,filename = "spi.bin";
217 };
218 };
219
220 spl-test {
221 u-boot,dm-pre-reloc;
222 compatible = "sandbox,spl-test";
223 boolval;
224 intval = <1>;
225 intarray = <2 3 4>;
226 byteval = [05];
227 bytearray = [06];
228 longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
229 stringval = "message";
230 stringarray = "multi-word", "message";
231 };
232
233 spl-test2 {
234 u-boot,dm-pre-reloc;
235 compatible = "sandbox,spl-test";
236 intval = <3>;
237 intarray = <5>;
238 byteval = [08];
239 bytearray = [01 23 34];
240 longbytearray = [09 0a 0b 0c];
241 stringval = "message2";
242 stringarray = "another", "multi-word", "message";
243 };
244
245 spl-test3 {
246 u-boot,dm-pre-reloc;
247 compatible = "sandbox,spl-test";
248 stringarray = "one";
249 };
250
251 spl-test4 {
252 u-boot,dm-pre-reloc;
253 compatible = "sandbox,spl-test.2";
254 };
255
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200256 spl-test5 {
257 u-boot,dm-tpl;
258 compatible = "sandbox,spl-test";
259 stringarray = "tpl";
260 };
261
262 spl-test6 {
263 u-boot,dm-pre-proper;
264 compatible = "sandbox,spl-test";
265 stringarray = "pre-proper";
266 };
267
268 spl-test7 {
269 u-boot,dm-spl;
270 compatible = "sandbox,spl-test";
271 stringarray = "spl";
272 };
273
Simon Glass28db4692019-05-18 11:59:41 -0600274 square {
275 compatible = "demo-shape";
276 colour = "blue";
277 sides = <4>;
278 };
279
280 timer {
281 compatible = "sandbox,timer";
282 clock-frequency = <1000000>;
283 };
284
285 tpm {
286 u-boot,dm-pre-reloc;
287 compatible = "google,sandbox-tpm";
288 };
289
290 tpm2 {
291 compatible = "sandbox,tpm2";
292 };
293
294 triangle {
295 compatible = "demo-shape";
296 colour = "cyan";
297 sides = <3>;
298 character = <83>;
299 light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
300 };
301
302 /* Needs to be available prior to relocation */
303 uart0: serial {
304 u-boot,dm-spl;
305 compatible = "sandbox,serial";
306 sandbox,text-colour = "cyan";
307 pinctrl-names = "default";
308 pinctrl-0 = <&pinctrl_serial0>;
309 };
310
311 usb@0 {
312 compatible = "sandbox,usb";
313 status = "disabled";
314 hub {
315 compatible = "sandbox,usb-hub";
316 #address-cells = <1>;
317 #size-cells = <0>;
318 flash-stick {
319 reg = <0>;
320 compatible = "sandbox,usb-flash";
321 };
322 };
323 };
324
325 usb@1 {
326 compatible = "sandbox,usb";
327 hub {
328 compatible = "usb-hub";
329 usb,device-class = <USB_CLASS_HUB>;
330 hub-emul {
331 compatible = "sandbox,usb-hub";
332 #address-cells = <1>;
333 #size-cells = <0>;
334 flash-stick {
335 reg = <0>;
336 compatible = "sandbox,usb-flash";
337 sandbox,filepath = "flash.bin";
338 };
339 };
340 };
341 };
342
343 usb@2 {
344 compatible = "sandbox,usb";
345 status = "disabled";
346 };
347
348 spmi: spmi@0 {
349 compatible = "sandbox,spmi";
350 #address-cells = <0x1>;
351 #size-cells = <0x1>;
352 pm8916@0 {
353 compatible = "qcom,spmi-pmic";
354 reg = <0x0 0x1>;
355 #address-cells = <0x1>;
356 #size-cells = <0x1>;
357
358 spmi_gpios: gpios@c000 {
359 compatible = "qcom,pm8916-gpio";
360 reg = <0xc000 0x400>;
361 gpio-controller;
362 gpio-count = <4>;
363 #gpio-cells = <2>;
364 gpio-bank-name="spmi";
365 };
366 };
367 };
368
369 axi: axi@0 {
370 compatible = "sandbox,axi";
371 #address-cells = <0x1>;
372 #size-cells = <0x1>;
373 store@0 {
374 compatible = "sandbox,sandbox_store";
375 reg = <0x0 0x400>;
376 };
377 };
378
379 onewire0: onewire {
380 compatible = "w1-gpio";
381 gpios = <&gpio_a 8>;
382 pinctrl-names = "default";
383 pinctrl-0 = <&pinctrl_onewire0>;
384 status = "okay";
385
386 sandbox_eeprom0: sandbox_eeprom@0 {
387 compatible = "sandbox,w1-eeprom";
388 status = "okay";
389 };
390 };
391
392 sandbox_tee {
393 compatible = "sandbox,tee";
394 };
395};
396
397&cros_ec {
398 /*
399 * This describes the flash memory within the EC. Note
400 * that the STM32L flash erases to 0, not 0xff.
401 */
402 flash {
403 image-pos = <0x08000000>;
404 size = <0x20000>;
405 erase-value = <0>;
406
407 /* Information for sandbox */
408 ro {
409 image-pos = <0>;
410 size = <0xf000>;
411 };
412 wp-ro {
413 image-pos = <0xf000>;
414 size = <0x1000>;
415 };
416 rw {
417 image-pos = <0x10000>;
418 size = <0x10000>;
419 };
420 };
421
422 keyboard-controller {
423 u-boot,dm-pre-reloc;
424 };
425};