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