blob: a41b5f052d7b47a7e845cfc421305c399f6d5f68 [file] [log] [blame]
Simon Glass66c164b2014-02-26 15:59:14 -07001/dts-v1/;
2
Simon Glassce3ca2e2015-03-25 12:22:42 -06003#define USB_CLASS_HUB 9
4
Simon Glass66c164b2014-02-26 15:59:14 -07005/ {
Simon Glassfd91fc92014-10-13 23:41:48 -06006 #address-cells = <1>;
Simon Glassf905be82015-03-05 12:25:13 -07007 #size-cells = <1>;
Simon Glass00c34d5b2017-06-15 21:37:53 -06008 model = "sandbox";
Simon Glassfd91fc92014-10-13 23:41:48 -06009
Simon Glass70778bc2015-03-05 12:25:26 -070010 aliases {
Simon Glass72138b92015-04-20 12:37:28 -060011 i2c0 = &i2c_0;
Simon Glass70778bc2015-03-05 12:25:26 -070012 pci0 = &pci;
Simon Glass72138b92015-04-20 12:37:28 -060013 rtc0 = &rtc_0;
Mario Six95922152018-08-09 14:51:19 +020014 axi0 = &axi;
Simon Glass70778bc2015-03-05 12:25:26 -070015 };
16
Simon Glasscdbbfe32014-09-04 16:27:29 -060017 chosen {
18 stdout-path = "/serial";
19 };
20
Simon Glass3e610172018-12-10 10:37:45 -070021 audio: audio-codec {
22 compatible = "sandbox,audio-codec";
23 #sound-dai-cells = <1>;
24 };
25
Simon Glass699c9ca2018-10-01 12:22:08 -060026 cros_ec: cros-ec {
Simon Glass73f220c2015-03-26 09:29:39 -060027 reg = <0 0>;
Simon Glasse5501552018-11-06 15:21:27 -070028 u-boot,dm-pre-reloc;
Simon Glass73f220c2015-03-26 09:29:39 -060029 compatible = "google,cros-ec-sandbox";
Simon Glass1f6acb52014-02-27 13:25:59 -070030
Simon Glass73f220c2015-03-26 09:29:39 -060031 /*
32 * This describes the flash memory within the EC. Note
33 * that the STM32L flash erases to 0, not 0xff.
34 */
Simon Glass699c9ca2018-10-01 12:22:08 -060035 flash {
Simon Glasse5501552018-11-06 15:21:27 -070036 u-boot,dm-pre-reloc;
Simon Glass699c9ca2018-10-01 12:22:08 -060037 image-pos = <0x08000000>;
38 size = <0x20000>;
Simon Glass73f220c2015-03-26 09:29:39 -060039 erase-value = <0>;
Simon Glass1f6acb52014-02-27 13:25:59 -070040
Simon Glass73f220c2015-03-26 09:29:39 -060041 /* Information for sandbox */
42 ro {
Simon Glass699c9ca2018-10-01 12:22:08 -060043 image-pos = <0>;
44 size = <0xf000>;
Simon Glass73f220c2015-03-26 09:29:39 -060045 };
46 wp-ro {
Simon Glass699c9ca2018-10-01 12:22:08 -060047 image-pos = <0xf000>;
48 size = <0x1000>;
Simon Glass73f220c2015-03-26 09:29:39 -060049 };
50 rw {
Simon Glass699c9ca2018-10-01 12:22:08 -060051 image-pos = <0x10000>;
52 size = <0x10000>;
Simon Glass1f6acb52014-02-27 13:25:59 -070053 };
54 };
55 };
56
Joe Hershberger89590c82018-07-02 14:47:54 -050057 ethrawbus {
58 compatible = "sandbox,eth-raw-bus";
59 skip-localhost = <0>;
60 };
61
Simon Glass45ab0082015-05-22 15:42:16 -060062 eth@10002000 {
63 compatible = "sandbox,eth";
64 reg = <0x10002000 0x1000>;
65 fake-host-hwaddr = [00 00 66 44 22 00];
66 };
67
Simon Glass120834d2015-01-05 20:05:31 -070068 gpio_a: gpios@0 {
Simon Glasse5501552018-11-06 15:21:27 -070069 u-boot,dm-pre-reloc;
Simon Glass093f3a72014-08-11 09:24:03 -060070 gpio-controller;
71 compatible = "sandbox,gpio";
72 #gpio-cells = <1>;
73 gpio-bank-name = "a";
Simon Glass9e7ab232018-02-03 10:36:59 -070074 sandbox,gpio-count = <20>;
Simon Glass093f3a72014-08-11 09:24:03 -060075 };
76
Simon Glass120834d2015-01-05 20:05:31 -070077 gpio_b: gpios@1 {
Simon Glasse5501552018-11-06 15:21:27 -070078 u-boot,dm-pre-reloc;
Simon Glass120834d2015-01-05 20:05:31 -070079 gpio-controller;
80 compatible = "sandbox,gpio";
81 #gpio-cells = <2>;
82 gpio-bank-name = "b";
Simon Glass9e7ab232018-02-03 10:36:59 -070083 sandbox,gpio-count = <10>;
Simon Glass120834d2015-01-05 20:05:31 -070084 };
85
Simon Glass45ab0082015-05-22 15:42:16 -060086 hexagon {
87 compatible = "demo-simple";
88 colour = "white";
89 sides = <6>;
90 };
91
Simon Glass72138b92015-04-20 12:37:28 -060092 i2c_0: i2c@0 {
Simon Glass4f46a592014-12-10 08:55:53 -070093 #address-cells = <1>;
94 #size-cells = <0>;
Simon Glassf905be82015-03-05 12:25:13 -070095 reg = <0 0>;
Simon Glass4f46a592014-12-10 08:55:53 -070096 compatible = "sandbox,i2c";
97 clock-frequency = <400000>;
Masahiro Yamada0b53a752015-08-27 12:44:30 +090098 pinctrl-names = "default";
99 pinctrl-0 = <&pinctrl_i2c0>;
Simon Glass4f46a592014-12-10 08:55:53 -0700100 eeprom@2c {
101 reg = <0x2c>;
102 compatible = "i2c-eeprom";
Heinrich Schuchardt1b995362019-01-05 22:30:07 +0100103 sandbox,emul = <&emul_eeprom>;
Simon Glass4f46a592014-12-10 08:55:53 -0700104 };
Simon Glass72138b92015-04-20 12:37:28 -0600105
106 rtc_0: rtc@43 {
107 reg = <0x43>;
108 compatible = "sandbox-rtc";
Heinrich Schuchardt1b995362019-01-05 22:30:07 +0100109 sandbox,emul = <&emul0>;
Simon Glass72138b92015-04-20 12:37:28 -0600110 };
Przemyslaw Marczak77bee052015-05-13 13:38:35 +0200111 sandbox_pmic: sandbox_pmic {
112 reg = <0x40>;
113 };
Lukasz Majewskia4d82972018-05-15 16:26:40 +0200114
115 mc34708: pmic@41 {
116 reg = <0x41>;
117 };
Simon Glass17b56f62018-11-18 08:14:34 -0700118
119 i2c_emul: emul {
Simon Glass17b56f62018-11-18 08:14:34 -0700120 reg = <0xff>;
121 compatible = "sandbox,i2c-emul-parent";
Heinrich Schuchardt1b995362019-01-05 22:30:07 +0100122 emul_eeprom: emul-eeprom {
Simon Glass17b56f62018-11-18 08:14:34 -0700123 compatible = "sandbox,i2c-eeprom";
124 sandbox,filename = "i2c.bin";
125 sandbox,size = <256>;
126 };
Heinrich Schuchardt1b995362019-01-05 22:30:07 +0100127 emul0: emul0 {
Simon Glass17b56f62018-11-18 08:14:34 -0700128 compatible = "sandbox,i2c-rtc";
129 };
130 };
Simon Glass4f46a592014-12-10 08:55:53 -0700131 };
132
Simon Glass3e610172018-12-10 10:37:45 -0700133 i2s: i2s {
134 compatible = "sandbox,i2s";
135 #sound-dai-cells = <1>;
136 };
137
Simon Glass45ab0082015-05-22 15:42:16 -0600138 lcd {
Simon Glass38a2ae22016-01-18 19:52:25 -0700139 u-boot,dm-pre-reloc;
Simon Glass45ab0082015-05-22 15:42:16 -0600140 compatible = "sandbox,lcd-sdl";
141 xres = <1366>;
142 yres = <768>;
Simon Glassfd91fc92014-10-13 23:41:48 -0600143 };
144
Simon Glassfefc7ba2017-04-10 11:34:51 -0600145 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
Simon Glass70778bc2015-03-05 12:25:26 -0700159 pci: pci-controller {
160 compatible = "sandbox,pci";
161 device_type = "pci";
162 #address-cells = <3>;
163 #size-cells = <2>;
164 ranges = <0x02000000 0 0x10000000 0x10000000 0 0x2000
165 0x01000000 0 0x20000000 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
Masahiro Yamada0b53a752015-08-27 12:44:30 +0900175 pinctrl {
176 compatible = "sandbox,pinctrl";
Eugen Hristevfc50a802018-09-18 10:35:35 +0300177 status = "okay";
Masahiro Yamada0b53a752015-08-27 12:44:30 +0900178
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 };
Eugen Hristevfc50a802018-09-18 10:35:35 +0300189
190 pinctrl_onewire0: onewire0 {
191 groups = "w1";
192 function = "w1";
193 bias-pull-up;
194 };
Masahiro Yamada0b53a752015-08-27 12:44:30 +0900195 };
196
Simon Glass68a3d492015-10-03 11:21:16 -0600197 reset@1 {
198 compatible = "sandbox,reset";
199 };
200
Simon Glass3e610172018-12-10 10:37:45 -0700201 sound {
202 compatible = "sandbox,sound";
203 cpu {
204 sound-dai = <&i2s 0>;
205 };
206
207 codec {
208 sound-dai = <&audio 0>;
209 };
210 };
211
Simon Glass45ab0082015-05-22 15:42:16 -0600212 spi@0 {
Simon Glasse5501552018-11-06 15:21:27 -0700213 u-boot,dm-pre-reloc;
Simon Glass45ab0082015-05-22 15:42:16 -0600214 #address-cells = <1>;
215 #size-cells = <0>;
216 reg = <0 0>;
217 compatible = "sandbox,spi";
218 cs-gpios = <0>, <&gpio_a 0>;
219 firmware_storage_spi: flash@0 {
Simon Glasse5501552018-11-06 15:21:27 -0700220 u-boot,dm-pre-reloc;
Simon Glass45ab0082015-05-22 15:42:16 -0600221 reg = <0>;
222 compatible = "spansion,m25p16", "sandbox,spi-flash";
223 spi-max-frequency = <40000000>;
224 sandbox,filename = "spi.bin";
225 };
Joe Hershberger6ab76992015-03-22 17:09:13 -0500226 };
Joe Hershberger586cbd12015-03-22 17:09:21 -0500227
Simon Glass4e9c1312016-07-04 11:57:55 -0600228 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
Simon Glassb17ab152017-01-15 21:09:08 -0700259 spl-test4 {
260 u-boot,dm-pre-reloc;
261 compatible = "sandbox,spl-test.2";
262 };
263
Simon Glass45ab0082015-05-22 15:42:16 -0600264 square {
265 compatible = "demo-shape";
266 colour = "blue";
267 sides = <4>;
Joe Hershberger586cbd12015-03-22 17:09:21 -0500268 };
Joe Hershbergera8921922015-03-22 17:09:23 -0500269
Thomas Chou7b059dc2015-10-30 15:35:52 +0800270 timer {
271 compatible = "sandbox,timer";
Bin Mengd041c422015-11-13 00:11:17 -0800272 clock-frequency = <1000000>;
Thomas Chou7b059dc2015-10-30 15:35:52 +0800273 };
274
Simon Glassa425f762015-08-22 18:31:35 -0600275 tpm {
Simon Glasse5501552018-11-06 15:21:27 -0700276 u-boot,dm-pre-reloc;
Simon Glassa425f762015-08-22 18:31:35 -0600277 compatible = "google,sandbox-tpm";
278 };
279
Miquel Raynal80938c12018-05-15 11:57:27 +0200280 tpm2 {
281 compatible = "sandbox,tpm2";
282 };
283
Simon Glass45ab0082015-05-22 15:42:16 -0600284 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 Glasse5501552018-11-06 15:21:27 -0700294 u-boot,dm-spl;
Simon Glass45ab0082015-05-22 15:42:16 -0600295 compatible = "sandbox,serial";
296 sandbox,text-colour = "cyan";
Masahiro Yamada0b53a752015-08-27 12:44:30 +0900297 pinctrl-names = "default";
298 pinctrl-0 = <&pinctrl_serial0>;
Joe Hershbergera8921922015-03-22 17:09:23 -0500299 };
Simon Glassce3ca2e2015-03-25 12:22:42 -0600300
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
Mateusz Kulikowskic7e4fbb2016-03-31 23:12:28 +0200338 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 };
Mario Six95922152018-08-09 14:51:19 +0200358
359 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 };
Eugen Hristevfc50a802018-09-18 10:35:35 +0300368
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 };
Jens Wiklander86afaa62018-09-25 16:40:16 +0200381
382 sandbox_tee {
383 compatible = "sandbox,tee";
384 };
Simon Glass66c164b2014-02-26 15:59:14 -0700385};
Simon Glass73f220c2015-03-26 09:29:39 -0600386
387#include "cros-ec-keyboard.dtsi"
Przemyslaw Marczak77bee052015-05-13 13:38:35 +0200388#include "sandbox_pmic.dtsi"
Simon Glasse5501552018-11-06 15:21:27 -0700389
390&cros_ec {
391 u-boot,dm-pre-reloc;
392 keyboard-controller {
393 u-boot,dm-pre-reloc;
394 };
395};