blob: 7bf144f53265a0be85932f0dfe820355ddc3e128 [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
18 gpio_a: gpios@0 {
19 u-boot,dm-pre-reloc;
20 gpio-controller;
21 compatible = "sandbox,gpio";
22 #gpio-cells = <1>;
23 gpio-bank-name = "a";
24 sandbox,gpio-count = <20>;
25 };
26
27 gpio_b: gpios@1 {
28 u-boot,dm-pre-reloc;
29 gpio-controller;
30 compatible = "sandbox,gpio";
31 #gpio-cells = <2>;
32 gpio-bank-name = "b";
33 sandbox,gpio-count = <10>;
34 };
35
36 hexagon {
37 compatible = "demo-simple";
38 colour = "white";
39 sides = <6>;
40 };
41
42 i2c_0: i2c@0 {
43 eeprom@2c {
44 reg = <0x2c>;
45 compatible = "i2c-eeprom";
46 sandbox,emul = <&emul_eeprom>;
47 };
48
49 rtc_0: rtc@43 {
50 reg = <0x43>;
51 compatible = "sandbox-rtc";
52 sandbox,emul = <&emul0>;
53 };
54 sandbox_pmic: sandbox_pmic {
55 reg = <0x40>;
56 };
57
58 mc34708: pmic@41 {
59 reg = <0x41>;
60 };
61
62 i2c_emul: emul {
63 reg = <0xff>;
64 compatible = "sandbox,i2c-emul-parent";
65 emul_eeprom: emul-eeprom {
66 compatible = "sandbox,i2c-eeprom";
67 sandbox,filename = "i2c.bin";
68 sandbox,size = <256>;
69 };
70 emul0: emul0 {
71 compatible = "sandbox,i2c-rtc";
72 };
73 };
74 };
75
76 i2s: i2s {
77 compatible = "sandbox,i2s";
78 #sound-dai-cells = <1>;
79 };
80
81 lcd {
82 u-boot,dm-pre-reloc;
83 compatible = "sandbox,lcd-sdl";
84 xres = <1366>;
85 yres = <768>;
86 };
87
88 leds {
89 compatible = "gpio-leds";
90
91 iracibble {
92 gpios = <&gpio_a 1 0>;
93 label = "sandbox:red";
94 };
95
96 martinet {
97 gpios = <&gpio_a 2 0>;
98 label = "sandbox:green";
99 };
100 };
101
102 pci-controller {
Simon Glass8c501022019-12-06 21:41:54 -0700103 pci@1e,0 {
104 compatible = "sandbox,pmc";
105 reg = <0xf000 0 0 0 0>;
106 sandbox,emul = <&pmc_emul>;
107 gpe0-dwx-mask = <0xf>;
108 gpe0-dwx-shift-base = <4>;
109 gpe0-dw = <6 7 9>;
110 gpe0-sts = <0x20>;
111 gpe0-en = <0x30>;
112 };
113
Simon Glass28db4692019-05-18 11:59:41 -0600114 pci@1f,0 {
115 compatible = "pci-generic";
116 reg = <0xf800 0 0 0 0>;
Simon Glassb98ba4c2019-09-25 08:56:10 -0600117 sandbox,emul = <&swap_case_emul>;
118 };
119 };
120
121 emul {
122 compatible = "sandbox,pci-emul-parent";
Simon Glass8c501022019-12-06 21:41:54 -0700123 pmc_emul: emul@1e,0 {
124 compatible = "sandbox,pmc-emul";
125 };
Simon Glassb98ba4c2019-09-25 08:56:10 -0600126 swap_case_emul: emul@1f,0 {
127 compatible = "sandbox,swap-case";
Simon Glass28db4692019-05-18 11:59:41 -0600128 };
129 };
130
131 pinctrl {
132 compatible = "sandbox,pinctrl";
133 status = "okay";
134
135 pinctrl_i2c0: i2c0 {
136 groups = "i2c";
137 function = "i2c";
138 bias-pull-up;
139 };
140
141 pinctrl_serial0: uart0 {
142 groups = "serial_a";
143 function = "serial";
144 };
145
146 pinctrl_onewire0: onewire0 {
147 groups = "w1";
148 function = "w1";
149 bias-pull-up;
150 };
151 };
152
153 reset@1 {
154 compatible = "sandbox,reset";
155 };
156
157 sound {
158 compatible = "sandbox,sound";
159 cpu {
160 sound-dai = <&i2s 0>;
161 };
162
163 codec {
164 sound-dai = <&audio 0>;
165 };
166 };
167
168 spi@0 {
169 firmware_storage_spi: flash@0 {
170 u-boot,dm-pre-reloc;
171 reg = <0>;
Simon Glass7e368682019-05-18 11:59:49 -0600172 compatible = "spansion,m25p16", "jedec,spi-nor";
Simon Glass28db4692019-05-18 11:59:41 -0600173 spi-max-frequency = <40000000>;
174 sandbox,filename = "spi.bin";
175 };
176 };
177
178 spl-test {
179 u-boot,dm-pre-reloc;
180 compatible = "sandbox,spl-test";
181 boolval;
182 intval = <1>;
183 intarray = <2 3 4>;
184 byteval = [05];
185 bytearray = [06];
186 longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
187 stringval = "message";
188 stringarray = "multi-word", "message";
189 };
190
191 spl-test2 {
192 u-boot,dm-pre-reloc;
193 compatible = "sandbox,spl-test";
194 intval = <3>;
195 intarray = <5>;
196 byteval = [08];
197 bytearray = [01 23 34];
198 longbytearray = [09 0a 0b 0c];
199 stringval = "message2";
200 stringarray = "another", "multi-word", "message";
201 };
202
203 spl-test3 {
204 u-boot,dm-pre-reloc;
205 compatible = "sandbox,spl-test";
206 stringarray = "one";
207 };
208
209 spl-test4 {
210 u-boot,dm-pre-reloc;
211 compatible = "sandbox,spl-test.2";
212 };
213
Patrick Delaunayae84ff12019-05-21 19:19:11 +0200214 spl-test5 {
215 u-boot,dm-tpl;
216 compatible = "sandbox,spl-test";
217 stringarray = "tpl";
218 };
219
220 spl-test6 {
221 u-boot,dm-pre-proper;
222 compatible = "sandbox,spl-test";
223 stringarray = "pre-proper";
224 };
225
226 spl-test7 {
227 u-boot,dm-spl;
228 compatible = "sandbox,spl-test";
229 stringarray = "spl";
230 };
231
Simon Glass28db4692019-05-18 11:59:41 -0600232 square {
233 compatible = "demo-shape";
234 colour = "blue";
235 sides = <4>;
236 };
237
238 timer {
239 compatible = "sandbox,timer";
240 clock-frequency = <1000000>;
241 };
242
243 tpm {
244 u-boot,dm-pre-reloc;
245 compatible = "google,sandbox-tpm";
246 };
247
248 tpm2 {
249 compatible = "sandbox,tpm2";
250 };
251
252 triangle {
253 compatible = "demo-shape";
254 colour = "cyan";
255 sides = <3>;
256 character = <83>;
257 light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
258 };
259
260 /* Needs to be available prior to relocation */
261 uart0: serial {
262 u-boot,dm-spl;
263 compatible = "sandbox,serial";
264 sandbox,text-colour = "cyan";
265 pinctrl-names = "default";
266 pinctrl-0 = <&pinctrl_serial0>;
267 };
268
269 usb@0 {
270 compatible = "sandbox,usb";
271 status = "disabled";
272 hub {
273 compatible = "sandbox,usb-hub";
274 #address-cells = <1>;
275 #size-cells = <0>;
276 flash-stick {
277 reg = <0>;
278 compatible = "sandbox,usb-flash";
279 };
280 };
281 };
282
283 usb@1 {
284 compatible = "sandbox,usb";
285 hub {
286 compatible = "usb-hub";
287 usb,device-class = <USB_CLASS_HUB>;
288 hub-emul {
289 compatible = "sandbox,usb-hub";
290 #address-cells = <1>;
291 #size-cells = <0>;
292 flash-stick {
293 reg = <0>;
294 compatible = "sandbox,usb-flash";
295 sandbox,filepath = "flash.bin";
296 };
297 };
298 };
299 };
300
301 usb@2 {
302 compatible = "sandbox,usb";
303 status = "disabled";
304 };
305
306 spmi: spmi@0 {
307 compatible = "sandbox,spmi";
308 #address-cells = <0x1>;
309 #size-cells = <0x1>;
310 pm8916@0 {
311 compatible = "qcom,spmi-pmic";
312 reg = <0x0 0x1>;
313 #address-cells = <0x1>;
314 #size-cells = <0x1>;
315
316 spmi_gpios: gpios@c000 {
317 compatible = "qcom,pm8916-gpio";
318 reg = <0xc000 0x400>;
319 gpio-controller;
320 gpio-count = <4>;
321 #gpio-cells = <2>;
322 gpio-bank-name="spmi";
323 };
324 };
325 };
326
327 axi: axi@0 {
328 compatible = "sandbox,axi";
329 #address-cells = <0x1>;
330 #size-cells = <0x1>;
331 store@0 {
332 compatible = "sandbox,sandbox_store";
333 reg = <0x0 0x400>;
334 };
335 };
336
337 onewire0: onewire {
338 compatible = "w1-gpio";
339 gpios = <&gpio_a 8>;
340 pinctrl-names = "default";
341 pinctrl-0 = <&pinctrl_onewire0>;
342 status = "okay";
343
344 sandbox_eeprom0: sandbox_eeprom@0 {
345 compatible = "sandbox,w1-eeprom";
346 status = "okay";
347 };
348 };
349
350 sandbox_tee {
351 compatible = "sandbox,tee";
352 };
353};
354
355&cros_ec {
356 /*
357 * This describes the flash memory within the EC. Note
358 * that the STM32L flash erases to 0, not 0xff.
359 */
360 flash {
361 image-pos = <0x08000000>;
362 size = <0x20000>;
363 erase-value = <0>;
364
365 /* Information for sandbox */
366 ro {
367 image-pos = <0>;
368 size = <0xf000>;
369 };
370 wp-ro {
371 image-pos = <0xf000>;
372 size = <0x1000>;
373 };
374 rw {
375 image-pos = <0x10000>;
376 size = <0x10000>;
377 };
378 };
379
380 keyboard-controller {
381 u-boot,dm-pre-reloc;
382 };
383};