blob: e5b44264261da5af338cca954a9d5abf36a7bc16 [file] [log] [blame]
Mario Sixc6b89f32018-02-12 08:05:57 +01001/dts-v1/;
2
3#define USB_CLASS_HUB 9
4
5/ {
6 #address-cells = <2>;
7 #size-cells = <2>;
8 model = "sandbox";
9
10 aliases {
Mario Sixc6b89f32018-02-12 08:05:57 +010011 i2c0 = &i2c_0;
12 pci0 = &pci;
13 rtc0 = &rtc_0;
Simon Glasse8726da2019-05-18 11:59:40 -060014 axi0 = &axi;
Mario Sixc6b89f32018-02-12 08:05:57 +010015 };
16
17 chosen {
18 stdout-path = "/serial";
19 };
20
Simon Glasse8726da2019-05-18 11:59:40 -060021 audio: audio-codec {
22 compatible = "sandbox,audio-codec";
23 #sound-dai-cells = <1>;
24 };
25
Simon Glasse6c5c942018-10-01 12:22:08 -060026 cros_ec: cros-ec {
Mario Sixc6b89f32018-02-12 08:05:57 +010027 reg = <0 0 0 0>;
Simon Glasse8726da2019-05-18 11:59:40 -060028 u-boot,dm-pre-reloc;
Mario Sixc6b89f32018-02-12 08:05:57 +010029 compatible = "google,cros-ec-sandbox";
30
31 /*
32 * This describes the flash memory within the EC. Note
33 * that the STM32L flash erases to 0, not 0xff.
34 */
Simon Glasse6c5c942018-10-01 12:22:08 -060035 flash {
Simon Glasse8726da2019-05-18 11:59:40 -060036 u-boot,dm-pre-reloc;
Simon Glasse6c5c942018-10-01 12:22:08 -060037 image-pos = <0x08000000>;
38 size = <0x20000>;
Mario Sixc6b89f32018-02-12 08:05:57 +010039 erase-value = <0>;
Mario Sixc6b89f32018-02-12 08:05:57 +010040
41 /* Information for sandbox */
42 ro {
Simon Glasse6c5c942018-10-01 12:22:08 -060043 image-pos = <0>;
44 size = <0xf000>;
Mario Sixc6b89f32018-02-12 08:05:57 +010045 };
46 wp-ro {
Simon Glasse6c5c942018-10-01 12:22:08 -060047 image-pos = <0xf000>;
48 size = <0x1000>;
Mario Sixc6b89f32018-02-12 08:05:57 +010049 };
50 rw {
Simon Glasse6c5c942018-10-01 12:22:08 -060051 image-pos = <0x10000>;
52 size = <0x10000>;
Mario Sixc6b89f32018-02-12 08:05:57 +010053 };
54 };
55 };
56
Joe Hershbergerf40a31e2018-07-02 14:47:54 -050057 ethrawbus {
58 compatible = "sandbox,eth-raw-bus";
59 skip-localhost = <1>;
60 };
61
Mario Sixc6b89f32018-02-12 08:05:57 +010062 eth@10002000 {
63 compatible = "sandbox,eth";
64 reg = <0x0 0x10002000 0x0 0x1000>;
65 fake-host-hwaddr = [00 00 66 44 22 00];
66 };
67
Mario Sixc6b89f32018-02-12 08:05:57 +010068 gpio_a: gpios@0 {
Simon Glasse8726da2019-05-18 11:59:40 -060069 u-boot,dm-pre-reloc;
Mario Sixc6b89f32018-02-12 08:05:57 +010070 gpio-controller;
71 compatible = "sandbox,gpio";
72 #gpio-cells = <1>;
73 gpio-bank-name = "a";
74 sandbox,gpio-count = <20>;
75 };
76
77 gpio_b: gpios@1 {
Simon Glasse8726da2019-05-18 11:59:40 -060078 u-boot,dm-pre-reloc;
Mario Sixc6b89f32018-02-12 08:05:57 +010079 gpio-controller;
80 compatible = "sandbox,gpio";
81 #gpio-cells = <2>;
82 gpio-bank-name = "b";
83 sandbox,gpio-count = <10>;
84 };
85
86 hexagon {
87 compatible = "demo-simple";
88 colour = "white";
89 sides = <6>;
90 };
91
92 i2c_0: i2c@0 {
93 #address-cells = <1>;
94 #size-cells = <0>;
95 reg = <0 0 0 0>;
96 compatible = "sandbox,i2c";
97 clock-frequency = <400000>;
98 pinctrl-names = "default";
99 pinctrl-0 = <&pinctrl_i2c0>;
100 eeprom@2c {
101 reg = <0x2c>;
102 compatible = "i2c-eeprom";
Heinrich Schuchardtd0a30a82019-01-05 22:30:07 +0100103 sandbox,emul = <&emul_eeprom>;
Mario Sixc6b89f32018-02-12 08:05:57 +0100104 };
105
106 rtc_0: rtc@43 {
107 reg = <0x43>;
108 compatible = "sandbox-rtc";
Heinrich Schuchardtd0a30a82019-01-05 22:30:07 +0100109 sandbox,emul = <&emul0>;
Mario Sixc6b89f32018-02-12 08:05:57 +0100110 };
111 sandbox_pmic: sandbox_pmic {
112 reg = <0x40>;
113 };
Lukasz Majewski686df492018-05-15 16:26:40 +0200114
115 mc34708: pmic@41 {
116 reg = <0x41>;
117 };
Simon Glass031a6502018-11-18 08:14:34 -0700118
119 i2c_emul: emul {
120 reg = <0xff>;
121 compatible = "sandbox,i2c-emul-parent";
Heinrich Schuchardtd0a30a82019-01-05 22:30:07 +0100122 emul_eeprom: emul-eeprom {
Simon Glass031a6502018-11-18 08:14:34 -0700123 compatible = "sandbox,i2c-eeprom";
124 sandbox,filename = "i2c.bin";
125 sandbox,size = <256>;
126 };
Heinrich Schuchardtd0a30a82019-01-05 22:30:07 +0100127 emul0: emul0 {
Simon Glass031a6502018-11-18 08:14:34 -0700128 compatible = "sandbox,i2c-rtc";
129 };
130 };
Mario Sixc6b89f32018-02-12 08:05:57 +0100131 };
132
Simon Glasse8726da2019-05-18 11:59:40 -0600133 i2s: i2s {
134 compatible = "sandbox,i2s";
135 #sound-dai-cells = <1>;
136 };
137
Mario Sixc6b89f32018-02-12 08:05:57 +0100138 lcd {
139 u-boot,dm-pre-reloc;
140 compatible = "sandbox,lcd-sdl";
141 xres = <1366>;
142 yres = <768>;
143 };
144
145 leds {
146 compatible = "gpio-leds";
147
148 iracibble {
149 gpios = <&gpio_a 1 0>;
150 label = "sandbox:red";
151 };
152
153 martinet {
154 gpios = <&gpio_a 2 0>;
155 label = "sandbox:green";
156 };
157 };
158
159 pci: pci-controller {
160 compatible = "sandbox,pci";
161 device_type = "pci";
162 #address-cells = <3>;
163 #size-cells = <2>;
164 ranges = <0x02000000 0 0x10000000 0 0x10000000 0 0x2000
165 0x01000000 0 0x20000000 0 0x20000000 0 0x2000>;
166 pci@1f,0 {
167 compatible = "pci-generic";
168 reg = <0xf800 0 0 0 0>;
169 emul@1f,0 {
170 compatible = "sandbox,swap-case";
171 };
172 };
173 };
174
175 pinctrl {
176 compatible = "sandbox,pinctrl";
Simon Glasse8726da2019-05-18 11:59:40 -0600177 status = "okay";
Mario Sixc6b89f32018-02-12 08:05:57 +0100178
179 pinctrl_i2c0: i2c0 {
180 groups = "i2c";
181 function = "i2c";
182 bias-pull-up;
183 };
184
185 pinctrl_serial0: uart0 {
186 groups = "serial_a";
187 function = "serial";
188 };
Simon Glasse8726da2019-05-18 11:59:40 -0600189
190 pinctrl_onewire0: onewire0 {
191 groups = "w1";
192 function = "w1";
193 bias-pull-up;
194 };
Mario Sixc6b89f32018-02-12 08:05:57 +0100195 };
196
197 reset@1 {
198 compatible = "sandbox,reset";
199 };
200
Simon Glasse8726da2019-05-18 11:59:40 -0600201 sound {
202 compatible = "sandbox,sound";
203 cpu {
204 sound-dai = <&i2s 0>;
205 };
206
207 codec {
208 sound-dai = <&audio 0>;
209 };
210 };
211
Mario Sixc6b89f32018-02-12 08:05:57 +0100212 spi@0 {
Simon Glasse8726da2019-05-18 11:59:40 -0600213 u-boot,dm-pre-reloc;
Mario Sixc6b89f32018-02-12 08:05:57 +0100214 #address-cells = <1>;
215 #size-cells = <0>;
216 reg = <0 0 0 0>;
217 compatible = "sandbox,spi";
218 cs-gpios = <0>, <&gpio_a 0>;
219 firmware_storage_spi: flash@0 {
Simon Glasse8726da2019-05-18 11:59:40 -0600220 u-boot,dm-pre-reloc;
Mario Sixc6b89f32018-02-12 08:05:57 +0100221 reg = <0>;
222 compatible = "spansion,m25p16", "sandbox,spi-flash";
223 spi-max-frequency = <40000000>;
224 sandbox,filename = "spi.bin";
225 };
226 };
227
228 spl-test {
229 u-boot,dm-pre-reloc;
230 compatible = "sandbox,spl-test";
231 boolval;
232 intval = <1>;
233 intarray = <2 3 4>;
234 byteval = [05];
235 bytearray = [06];
236 longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
237 stringval = "message";
238 stringarray = "multi-word", "message";
239 };
240
241 spl-test2 {
242 u-boot,dm-pre-reloc;
243 compatible = "sandbox,spl-test";
244 intval = <3>;
245 intarray = <5>;
246 byteval = [08];
247 bytearray = [01 23 34];
248 longbytearray = [09 0a 0b 0c];
249 stringval = "message2";
250 stringarray = "another", "multi-word", "message";
251 };
252
253 spl-test3 {
254 u-boot,dm-pre-reloc;
255 compatible = "sandbox,spl-test";
256 stringarray = "one";
257 };
258
259 spl-test4 {
260 u-boot,dm-pre-reloc;
261 compatible = "sandbox,spl-test.2";
262 };
263
264 square {
265 compatible = "demo-shape";
266 colour = "blue";
267 sides = <4>;
268 };
269
270 timer {
271 compatible = "sandbox,timer";
272 clock-frequency = <1000000>;
273 };
274
275 tpm {
Simon Glasse8726da2019-05-18 11:59:40 -0600276 u-boot,dm-pre-reloc;
Mario Sixc6b89f32018-02-12 08:05:57 +0100277 compatible = "google,sandbox-tpm";
278 };
279
Miquel Raynalb91ad162018-05-15 11:57:27 +0200280 tpm2 {
281 compatible = "sandbox,tpm2";
282 };
283
Mario Sixc6b89f32018-02-12 08:05:57 +0100284 triangle {
285 compatible = "demo-shape";
286 colour = "cyan";
287 sides = <3>;
288 character = <83>;
289 light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
290 };
291
292 /* Needs to be available prior to relocation */
293 uart0: serial {
Simon Glasse8726da2019-05-18 11:59:40 -0600294 u-boot,dm-spl;
Mario Sixc6b89f32018-02-12 08:05:57 +0100295 compatible = "sandbox,serial";
296 sandbox,text-colour = "cyan";
297 pinctrl-names = "default";
298 pinctrl-0 = <&pinctrl_serial0>;
299 };
300
301 usb@0 {
302 compatible = "sandbox,usb";
303 status = "disabled";
304 hub {
305 compatible = "sandbox,usb-hub";
306 #address-cells = <1>;
307 #size-cells = <0>;
308 flash-stick {
309 reg = <0>;
310 compatible = "sandbox,usb-flash";
311 };
312 };
313 };
314
315 usb@1 {
316 compatible = "sandbox,usb";
317 hub {
318 compatible = "usb-hub";
319 usb,device-class = <USB_CLASS_HUB>;
320 hub-emul {
321 compatible = "sandbox,usb-hub";
322 #address-cells = <1>;
323 #size-cells = <0>;
324 flash-stick {
325 reg = <0>;
326 compatible = "sandbox,usb-flash";
327 sandbox,filepath = "flash.bin";
328 };
329 };
330 };
331 };
332
333 usb@2 {
334 compatible = "sandbox,usb";
335 status = "disabled";
336 };
337
338 spmi: spmi@0 {
339 compatible = "sandbox,spmi";
340 #address-cells = <0x1>;
341 #size-cells = <0x1>;
342 pm8916@0 {
343 compatible = "qcom,spmi-pmic";
344 reg = <0x0 0x1>;
345 #address-cells = <0x1>;
346 #size-cells = <0x1>;
347
348 spmi_gpios: gpios@c000 {
349 compatible = "qcom,pm8916-gpio";
350 reg = <0xc000 0x400>;
351 gpio-controller;
352 gpio-count = <4>;
353 #gpio-cells = <2>;
354 gpio-bank-name="spmi";
355 };
356 };
357 };
Jens Wiklanderfa830ae2018-09-25 16:40:16 +0200358
Simon Glasse8726da2019-05-18 11:59:40 -0600359 axi: axi@0 {
360 compatible = "sandbox,axi";
361 #address-cells = <0x1>;
362 #size-cells = <0x1>;
363 store@0 {
364 compatible = "sandbox,sandbox_store";
365 reg = <0x0 0x400>;
366 };
367 };
368
369 onewire0: onewire {
370 compatible = "w1-gpio";
371 gpios = <&gpio_a 8>;
372 pinctrl-names = "default";
373 pinctrl-0 = <&pinctrl_onewire0>;
374 status = "okay";
375
376 sandbox_eeprom0: sandbox_eeprom@0 {
377 compatible = "sandbox,w1-eeprom";
378 status = "okay";
379 };
380 };
381
Jens Wiklanderfa830ae2018-09-25 16:40:16 +0200382 sandbox_tee {
383 compatible = "sandbox,tee";
384 };
Mario Sixc6b89f32018-02-12 08:05:57 +0100385};
386
387#include "cros-ec-keyboard.dtsi"
388#include "sandbox_pmic.dtsi"
Simon Glasse8726da2019-05-18 11:59:40 -0600389
390&cros_ec {
391 u-boot,dm-pre-reloc;
392 keyboard-controller {
393 u-boot,dm-pre-reloc;
394 };
395};