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