blob: fb866e88079385ae7fbfbdb79c6bfd7af98dcffb [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 Glass699c9ca2018-10-01 12:22:08 -060021 cros_ec: cros-ec {
Simon Glass73f220c2015-03-26 09:29:39 -060022 reg = <0 0>;
23 compatible = "google,cros-ec-sandbox";
Simon Glass1f6acb52014-02-27 13:25:59 -070024
Simon Glass73f220c2015-03-26 09:29:39 -060025 /*
26 * This describes the flash memory within the EC. Note
27 * that the STM32L flash erases to 0, not 0xff.
28 */
Simon Glass699c9ca2018-10-01 12:22:08 -060029 flash {
30 image-pos = <0x08000000>;
31 size = <0x20000>;
Simon Glass73f220c2015-03-26 09:29:39 -060032 erase-value = <0>;
Simon Glass1f6acb52014-02-27 13:25:59 -070033
Simon Glass73f220c2015-03-26 09:29:39 -060034 /* Information for sandbox */
35 ro {
Simon Glass699c9ca2018-10-01 12:22:08 -060036 image-pos = <0>;
37 size = <0xf000>;
Simon Glass73f220c2015-03-26 09:29:39 -060038 };
39 wp-ro {
Simon Glass699c9ca2018-10-01 12:22:08 -060040 image-pos = <0xf000>;
41 size = <0x1000>;
Simon Glass73f220c2015-03-26 09:29:39 -060042 };
43 rw {
Simon Glass699c9ca2018-10-01 12:22:08 -060044 image-pos = <0x10000>;
45 size = <0x10000>;
Simon Glass1f6acb52014-02-27 13:25:59 -070046 };
47 };
48 };
49
Joe Hershberger89590c82018-07-02 14:47:54 -050050 ethrawbus {
51 compatible = "sandbox,eth-raw-bus";
52 skip-localhost = <0>;
53 };
54
Simon Glass45ab0082015-05-22 15:42:16 -060055 eth@10002000 {
56 compatible = "sandbox,eth";
57 reg = <0x10002000 0x1000>;
58 fake-host-hwaddr = [00 00 66 44 22 00];
59 };
60
Simon Glass120834d2015-01-05 20:05:31 -070061 gpio_a: gpios@0 {
Simon Glass093f3a72014-08-11 09:24:03 -060062 gpio-controller;
63 compatible = "sandbox,gpio";
64 #gpio-cells = <1>;
65 gpio-bank-name = "a";
Simon Glass9e7ab232018-02-03 10:36:59 -070066 sandbox,gpio-count = <20>;
Simon Glass093f3a72014-08-11 09:24:03 -060067 };
68
Simon Glass120834d2015-01-05 20:05:31 -070069 gpio_b: gpios@1 {
70 gpio-controller;
71 compatible = "sandbox,gpio";
72 #gpio-cells = <2>;
73 gpio-bank-name = "b";
Simon Glass9e7ab232018-02-03 10:36:59 -070074 sandbox,gpio-count = <10>;
Simon Glass120834d2015-01-05 20:05:31 -070075 };
76
Simon Glass45ab0082015-05-22 15:42:16 -060077 hexagon {
78 compatible = "demo-simple";
79 colour = "white";
80 sides = <6>;
81 };
82
Simon Glass72138b92015-04-20 12:37:28 -060083 i2c_0: i2c@0 {
Simon Glass4f46a592014-12-10 08:55:53 -070084 #address-cells = <1>;
85 #size-cells = <0>;
Simon Glassf905be82015-03-05 12:25:13 -070086 reg = <0 0>;
Simon Glass4f46a592014-12-10 08:55:53 -070087 compatible = "sandbox,i2c";
88 clock-frequency = <400000>;
Masahiro Yamada0b53a752015-08-27 12:44:30 +090089 pinctrl-names = "default";
90 pinctrl-0 = <&pinctrl_i2c0>;
Simon Glass4f46a592014-12-10 08:55:53 -070091 eeprom@2c {
92 reg = <0x2c>;
93 compatible = "i2c-eeprom";
94 emul {
95 compatible = "sandbox,i2c-eeprom";
96 sandbox,filename = "i2c.bin";
97 sandbox,size = <128>;
98 };
99 };
Simon Glass72138b92015-04-20 12:37:28 -0600100
101 rtc_0: rtc@43 {
102 reg = <0x43>;
103 compatible = "sandbox-rtc";
104 emul {
105 compatible = "sandbox,i2c-rtc";
106 };
107 };
Przemyslaw Marczak77bee052015-05-13 13:38:35 +0200108 sandbox_pmic: sandbox_pmic {
109 reg = <0x40>;
110 };
Lukasz Majewskia4d82972018-05-15 16:26:40 +0200111
112 mc34708: pmic@41 {
113 reg = <0x41>;
114 };
Simon Glass4f46a592014-12-10 08:55:53 -0700115 };
116
Simon Glass45ab0082015-05-22 15:42:16 -0600117 lcd {
Simon Glass38a2ae22016-01-18 19:52:25 -0700118 u-boot,dm-pre-reloc;
Simon Glass45ab0082015-05-22 15:42:16 -0600119 compatible = "sandbox,lcd-sdl";
120 xres = <1366>;
121 yres = <768>;
Simon Glassfd91fc92014-10-13 23:41:48 -0600122 };
123
Simon Glassfefc7ba2017-04-10 11:34:51 -0600124 leds {
125 compatible = "gpio-leds";
126
127 iracibble {
128 gpios = <&gpio_a 1 0>;
129 label = "sandbox:red";
130 };
131
132 martinet {
133 gpios = <&gpio_a 2 0>;
134 label = "sandbox:green";
135 };
136 };
137
Simon Glass70778bc2015-03-05 12:25:26 -0700138 pci: pci-controller {
139 compatible = "sandbox,pci";
140 device_type = "pci";
141 #address-cells = <3>;
142 #size-cells = <2>;
143 ranges = <0x02000000 0 0x10000000 0x10000000 0 0x2000
144 0x01000000 0 0x20000000 0x20000000 0 0x2000>;
145 pci@1f,0 {
146 compatible = "pci-generic";
147 reg = <0xf800 0 0 0 0>;
148 emul@1f,0 {
149 compatible = "sandbox,swap-case";
150 };
151 };
152 };
153
Masahiro Yamada0b53a752015-08-27 12:44:30 +0900154 pinctrl {
155 compatible = "sandbox,pinctrl";
Eugen Hristevfc50a802018-09-18 10:35:35 +0300156 status = "okay";
Masahiro Yamada0b53a752015-08-27 12:44:30 +0900157
158 pinctrl_i2c0: i2c0 {
159 groups = "i2c";
160 function = "i2c";
161 bias-pull-up;
162 };
163
164 pinctrl_serial0: uart0 {
165 groups = "serial_a";
166 function = "serial";
167 };
Eugen Hristevfc50a802018-09-18 10:35:35 +0300168
169 pinctrl_onewire0: onewire0 {
170 groups = "w1";
171 function = "w1";
172 bias-pull-up;
173 };
Masahiro Yamada0b53a752015-08-27 12:44:30 +0900174 };
175
Simon Glass68a3d492015-10-03 11:21:16 -0600176 reset@1 {
177 compatible = "sandbox,reset";
178 };
179
Simon Glass45ab0082015-05-22 15:42:16 -0600180 spi@0 {
181 #address-cells = <1>;
182 #size-cells = <0>;
183 reg = <0 0>;
184 compatible = "sandbox,spi";
185 cs-gpios = <0>, <&gpio_a 0>;
186 firmware_storage_spi: flash@0 {
187 reg = <0>;
188 compatible = "spansion,m25p16", "sandbox,spi-flash";
189 spi-max-frequency = <40000000>;
190 sandbox,filename = "spi.bin";
191 };
Joe Hershberger6ab76992015-03-22 17:09:13 -0500192 };
Joe Hershberger586cbd12015-03-22 17:09:21 -0500193
Simon Glass4e9c1312016-07-04 11:57:55 -0600194 spl-test {
195 u-boot,dm-pre-reloc;
196 compatible = "sandbox,spl-test";
197 boolval;
198 intval = <1>;
199 intarray = <2 3 4>;
200 byteval = [05];
201 bytearray = [06];
202 longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
203 stringval = "message";
204 stringarray = "multi-word", "message";
205 };
206
207 spl-test2 {
208 u-boot,dm-pre-reloc;
209 compatible = "sandbox,spl-test";
210 intval = <3>;
211 intarray = <5>;
212 byteval = [08];
213 bytearray = [01 23 34];
214 longbytearray = [09 0a 0b 0c];
215 stringval = "message2";
216 stringarray = "another", "multi-word", "message";
217 };
218
219 spl-test3 {
220 u-boot,dm-pre-reloc;
221 compatible = "sandbox,spl-test";
222 stringarray = "one";
223 };
224
Simon Glassb17ab152017-01-15 21:09:08 -0700225 spl-test4 {
226 u-boot,dm-pre-reloc;
227 compatible = "sandbox,spl-test.2";
228 };
229
Simon Glass45ab0082015-05-22 15:42:16 -0600230 square {
231 compatible = "demo-shape";
232 colour = "blue";
233 sides = <4>;
Joe Hershberger586cbd12015-03-22 17:09:21 -0500234 };
Joe Hershbergera8921922015-03-22 17:09:23 -0500235
Thomas Chou7b059dc2015-10-30 15:35:52 +0800236 timer {
237 compatible = "sandbox,timer";
Bin Mengd041c422015-11-13 00:11:17 -0800238 clock-frequency = <1000000>;
Thomas Chou7b059dc2015-10-30 15:35:52 +0800239 };
240
Simon Glassa425f762015-08-22 18:31:35 -0600241 tpm {
242 compatible = "google,sandbox-tpm";
243 };
244
Miquel Raynal80938c12018-05-15 11:57:27 +0200245 tpm2 {
246 compatible = "sandbox,tpm2";
247 };
248
Simon Glass45ab0082015-05-22 15:42:16 -0600249 triangle {
250 compatible = "demo-shape";
251 colour = "cyan";
252 sides = <3>;
253 character = <83>;
254 light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
255 };
256
257 /* Needs to be available prior to relocation */
258 uart0: serial {
259 compatible = "sandbox,serial";
260 sandbox,text-colour = "cyan";
Masahiro Yamada0b53a752015-08-27 12:44:30 +0900261 pinctrl-names = "default";
262 pinctrl-0 = <&pinctrl_serial0>;
Joe Hershbergera8921922015-03-22 17:09:23 -0500263 };
Simon Glassce3ca2e2015-03-25 12:22:42 -0600264
265 usb@0 {
266 compatible = "sandbox,usb";
267 status = "disabled";
268 hub {
269 compatible = "sandbox,usb-hub";
270 #address-cells = <1>;
271 #size-cells = <0>;
272 flash-stick {
273 reg = <0>;
274 compatible = "sandbox,usb-flash";
275 };
276 };
277 };
278
279 usb@1 {
280 compatible = "sandbox,usb";
281 hub {
282 compatible = "usb-hub";
283 usb,device-class = <USB_CLASS_HUB>;
284 hub-emul {
285 compatible = "sandbox,usb-hub";
286 #address-cells = <1>;
287 #size-cells = <0>;
288 flash-stick {
289 reg = <0>;
290 compatible = "sandbox,usb-flash";
291 sandbox,filepath = "flash.bin";
292 };
293 };
294 };
295 };
296
297 usb@2 {
298 compatible = "sandbox,usb";
299 status = "disabled";
300 };
301
Mateusz Kulikowskic7e4fbb2016-03-31 23:12:28 +0200302 spmi: spmi@0 {
303 compatible = "sandbox,spmi";
304 #address-cells = <0x1>;
305 #size-cells = <0x1>;
306 pm8916@0 {
307 compatible = "qcom,spmi-pmic";
308 reg = <0x0 0x1>;
309 #address-cells = <0x1>;
310 #size-cells = <0x1>;
311
312 spmi_gpios: gpios@c000 {
313 compatible = "qcom,pm8916-gpio";
314 reg = <0xc000 0x400>;
315 gpio-controller;
316 gpio-count = <4>;
317 #gpio-cells = <2>;
318 gpio-bank-name="spmi";
319 };
320 };
321 };
Mario Six95922152018-08-09 14:51:19 +0200322
323 axi: axi@0 {
324 compatible = "sandbox,axi";
325 #address-cells = <0x1>;
326 #size-cells = <0x1>;
327 store@0 {
328 compatible = "sandbox,sandbox_store";
329 reg = <0x0 0x400>;
330 };
331 };
Eugen Hristevfc50a802018-09-18 10:35:35 +0300332
333 onewire0: onewire {
334 compatible = "w1-gpio";
335 gpios = <&gpio_a 8>;
336 pinctrl-names = "default";
337 pinctrl-0 = <&pinctrl_onewire0>;
338 status = "okay";
339
340 sandbox_eeprom0: sandbox_eeprom@0 {
341 compatible = "sandbox,w1-eeprom";
342 status = "okay";
343 };
344 };
Jens Wiklander86afaa62018-09-25 16:40:16 +0200345
346 sandbox_tee {
347 compatible = "sandbox,tee";
348 };
Simon Glass66c164b2014-02-26 15:59:14 -0700349};
Simon Glass73f220c2015-03-26 09:29:39 -0600350
351#include "cros-ec-keyboard.dtsi"
Przemyslaw Marczak77bee052015-05-13 13:38:35 +0200352#include "sandbox_pmic.dtsi"