blob: ae3189ec8cfad3d5d1b35fa150d4706613b26c44 [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";
Simon Glass4f46a592014-12-10 08:55:53 -0700103 };
Simon Glass72138b92015-04-20 12:37:28 -0600104
105 rtc_0: rtc@43 {
106 reg = <0x43>;
107 compatible = "sandbox-rtc";
Simon Glass72138b92015-04-20 12:37:28 -0600108 };
Przemyslaw Marczak77bee052015-05-13 13:38:35 +0200109 sandbox_pmic: sandbox_pmic {
110 reg = <0x40>;
111 };
Lukasz Majewskia4d82972018-05-15 16:26:40 +0200112
113 mc34708: pmic@41 {
114 reg = <0x41>;
115 };
Simon Glass17b56f62018-11-18 08:14:34 -0700116
117 i2c_emul: emul {
118 #address-cells = <1>;
119 #size-cells = <0>;
120 reg = <0xff>;
121 compatible = "sandbox,i2c-emul-parent";
122 emul-eeprom {
123 reg = <0x2c>;
124 compatible = "sandbox,i2c-eeprom";
125 sandbox,filename = "i2c.bin";
126 sandbox,size = <256>;
127 };
128 emul0 {
129 reg = <0x43>;
130 compatible = "sandbox,i2c-rtc";
131 };
132 };
Simon Glass4f46a592014-12-10 08:55:53 -0700133 };
134
Simon Glass3e610172018-12-10 10:37:45 -0700135 i2s: i2s {
136 compatible = "sandbox,i2s";
137 #sound-dai-cells = <1>;
138 };
139
Simon Glass45ab0082015-05-22 15:42:16 -0600140 lcd {
Simon Glass38a2ae22016-01-18 19:52:25 -0700141 u-boot,dm-pre-reloc;
Simon Glass45ab0082015-05-22 15:42:16 -0600142 compatible = "sandbox,lcd-sdl";
143 xres = <1366>;
144 yres = <768>;
Simon Glassfd91fc92014-10-13 23:41:48 -0600145 };
146
Simon Glassfefc7ba2017-04-10 11:34:51 -0600147 leds {
148 compatible = "gpio-leds";
149
150 iracibble {
151 gpios = <&gpio_a 1 0>;
152 label = "sandbox:red";
153 };
154
155 martinet {
156 gpios = <&gpio_a 2 0>;
157 label = "sandbox:green";
158 };
159 };
160
Simon Glass70778bc2015-03-05 12:25:26 -0700161 pci: pci-controller {
162 compatible = "sandbox,pci";
163 device_type = "pci";
164 #address-cells = <3>;
165 #size-cells = <2>;
166 ranges = <0x02000000 0 0x10000000 0x10000000 0 0x2000
167 0x01000000 0 0x20000000 0x20000000 0 0x2000>;
168 pci@1f,0 {
169 compatible = "pci-generic";
170 reg = <0xf800 0 0 0 0>;
171 emul@1f,0 {
172 compatible = "sandbox,swap-case";
173 };
174 };
175 };
176
Masahiro Yamada0b53a752015-08-27 12:44:30 +0900177 pinctrl {
178 compatible = "sandbox,pinctrl";
Eugen Hristevfc50a802018-09-18 10:35:35 +0300179 status = "okay";
Masahiro Yamada0b53a752015-08-27 12:44:30 +0900180
181 pinctrl_i2c0: i2c0 {
182 groups = "i2c";
183 function = "i2c";
184 bias-pull-up;
185 };
186
187 pinctrl_serial0: uart0 {
188 groups = "serial_a";
189 function = "serial";
190 };
Eugen Hristevfc50a802018-09-18 10:35:35 +0300191
192 pinctrl_onewire0: onewire0 {
193 groups = "w1";
194 function = "w1";
195 bias-pull-up;
196 };
Masahiro Yamada0b53a752015-08-27 12:44:30 +0900197 };
198
Simon Glass68a3d492015-10-03 11:21:16 -0600199 reset@1 {
200 compatible = "sandbox,reset";
201 };
202
Simon Glass3e610172018-12-10 10:37:45 -0700203 sound {
204 compatible = "sandbox,sound";
205 cpu {
206 sound-dai = <&i2s 0>;
207 };
208
209 codec {
210 sound-dai = <&audio 0>;
211 };
212 };
213
Simon Glass45ab0082015-05-22 15:42:16 -0600214 spi@0 {
Simon Glasse5501552018-11-06 15:21:27 -0700215 u-boot,dm-pre-reloc;
Simon Glass45ab0082015-05-22 15:42:16 -0600216 #address-cells = <1>;
217 #size-cells = <0>;
218 reg = <0 0>;
219 compatible = "sandbox,spi";
220 cs-gpios = <0>, <&gpio_a 0>;
221 firmware_storage_spi: flash@0 {
Simon Glasse5501552018-11-06 15:21:27 -0700222 u-boot,dm-pre-reloc;
Simon Glass45ab0082015-05-22 15:42:16 -0600223 reg = <0>;
224 compatible = "spansion,m25p16", "sandbox,spi-flash";
225 spi-max-frequency = <40000000>;
226 sandbox,filename = "spi.bin";
227 };
Joe Hershberger6ab76992015-03-22 17:09:13 -0500228 };
Joe Hershberger586cbd12015-03-22 17:09:21 -0500229
Simon Glass4e9c1312016-07-04 11:57:55 -0600230 spl-test {
231 u-boot,dm-pre-reloc;
232 compatible = "sandbox,spl-test";
233 boolval;
234 intval = <1>;
235 intarray = <2 3 4>;
236 byteval = [05];
237 bytearray = [06];
238 longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
239 stringval = "message";
240 stringarray = "multi-word", "message";
241 };
242
243 spl-test2 {
244 u-boot,dm-pre-reloc;
245 compatible = "sandbox,spl-test";
246 intval = <3>;
247 intarray = <5>;
248 byteval = [08];
249 bytearray = [01 23 34];
250 longbytearray = [09 0a 0b 0c];
251 stringval = "message2";
252 stringarray = "another", "multi-word", "message";
253 };
254
255 spl-test3 {
256 u-boot,dm-pre-reloc;
257 compatible = "sandbox,spl-test";
258 stringarray = "one";
259 };
260
Simon Glassb17ab152017-01-15 21:09:08 -0700261 spl-test4 {
262 u-boot,dm-pre-reloc;
263 compatible = "sandbox,spl-test.2";
264 };
265
Simon Glass45ab0082015-05-22 15:42:16 -0600266 square {
267 compatible = "demo-shape";
268 colour = "blue";
269 sides = <4>;
Joe Hershberger586cbd12015-03-22 17:09:21 -0500270 };
Joe Hershbergera8921922015-03-22 17:09:23 -0500271
Thomas Chou7b059dc2015-10-30 15:35:52 +0800272 timer {
273 compatible = "sandbox,timer";
Bin Mengd041c422015-11-13 00:11:17 -0800274 clock-frequency = <1000000>;
Thomas Chou7b059dc2015-10-30 15:35:52 +0800275 };
276
Simon Glassa425f762015-08-22 18:31:35 -0600277 tpm {
Simon Glasse5501552018-11-06 15:21:27 -0700278 u-boot,dm-pre-reloc;
Simon Glassa425f762015-08-22 18:31:35 -0600279 compatible = "google,sandbox-tpm";
280 };
281
Miquel Raynal80938c12018-05-15 11:57:27 +0200282 tpm2 {
283 compatible = "sandbox,tpm2";
284 };
285
Simon Glass45ab0082015-05-22 15:42:16 -0600286 triangle {
287 compatible = "demo-shape";
288 colour = "cyan";
289 sides = <3>;
290 character = <83>;
291 light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
292 };
293
294 /* Needs to be available prior to relocation */
295 uart0: serial {
Simon Glasse5501552018-11-06 15:21:27 -0700296 u-boot,dm-spl;
Simon Glass45ab0082015-05-22 15:42:16 -0600297 compatible = "sandbox,serial";
298 sandbox,text-colour = "cyan";
Masahiro Yamada0b53a752015-08-27 12:44:30 +0900299 pinctrl-names = "default";
300 pinctrl-0 = <&pinctrl_serial0>;
Joe Hershbergera8921922015-03-22 17:09:23 -0500301 };
Simon Glassce3ca2e2015-03-25 12:22:42 -0600302
303 usb@0 {
304 compatible = "sandbox,usb";
305 status = "disabled";
306 hub {
307 compatible = "sandbox,usb-hub";
308 #address-cells = <1>;
309 #size-cells = <0>;
310 flash-stick {
311 reg = <0>;
312 compatible = "sandbox,usb-flash";
313 };
314 };
315 };
316
317 usb@1 {
318 compatible = "sandbox,usb";
319 hub {
320 compatible = "usb-hub";
321 usb,device-class = <USB_CLASS_HUB>;
322 hub-emul {
323 compatible = "sandbox,usb-hub";
324 #address-cells = <1>;
325 #size-cells = <0>;
326 flash-stick {
327 reg = <0>;
328 compatible = "sandbox,usb-flash";
329 sandbox,filepath = "flash.bin";
330 };
331 };
332 };
333 };
334
335 usb@2 {
336 compatible = "sandbox,usb";
337 status = "disabled";
338 };
339
Mateusz Kulikowskic7e4fbb2016-03-31 23:12:28 +0200340 spmi: spmi@0 {
341 compatible = "sandbox,spmi";
342 #address-cells = <0x1>;
343 #size-cells = <0x1>;
344 pm8916@0 {
345 compatible = "qcom,spmi-pmic";
346 reg = <0x0 0x1>;
347 #address-cells = <0x1>;
348 #size-cells = <0x1>;
349
350 spmi_gpios: gpios@c000 {
351 compatible = "qcom,pm8916-gpio";
352 reg = <0xc000 0x400>;
353 gpio-controller;
354 gpio-count = <4>;
355 #gpio-cells = <2>;
356 gpio-bank-name="spmi";
357 };
358 };
359 };
Mario Six95922152018-08-09 14:51:19 +0200360
361 axi: axi@0 {
362 compatible = "sandbox,axi";
363 #address-cells = <0x1>;
364 #size-cells = <0x1>;
365 store@0 {
366 compatible = "sandbox,sandbox_store";
367 reg = <0x0 0x400>;
368 };
369 };
Eugen Hristevfc50a802018-09-18 10:35:35 +0300370
371 onewire0: onewire {
372 compatible = "w1-gpio";
373 gpios = <&gpio_a 8>;
374 pinctrl-names = "default";
375 pinctrl-0 = <&pinctrl_onewire0>;
376 status = "okay";
377
378 sandbox_eeprom0: sandbox_eeprom@0 {
379 compatible = "sandbox,w1-eeprom";
380 status = "okay";
381 };
382 };
Jens Wiklander86afaa62018-09-25 16:40:16 +0200383
384 sandbox_tee {
385 compatible = "sandbox,tee";
386 };
Simon Glass66c164b2014-02-26 15:59:14 -0700387};
Simon Glass73f220c2015-03-26 09:29:39 -0600388
389#include "cros-ec-keyboard.dtsi"
Przemyslaw Marczak77bee052015-05-13 13:38:35 +0200390#include "sandbox_pmic.dtsi"
Simon Glasse5501552018-11-06 15:21:27 -0700391
392&cros_ec {
393 u-boot,dm-pre-reloc;
394 keyboard-controller {
395 u-boot,dm-pre-reloc;
396 };
397};