Merge branch 'master' of git://git.denx.de/u-boot-video
[oweals/u-boot.git] / arch / sandbox / dts / sandbox.dts
1 /dts-v1/;
2
3 #define USB_CLASS_HUB                   9
4
5 / {
6         #address-cells = <1>;
7         #size-cells = <1>;
8         model = "sandbox";
9
10         aliases {
11                 i2c0 = &i2c_0;
12                 pci0 = &pci;
13                 rtc0 = &rtc_0;
14                 axi0 = &axi;
15         };
16
17         chosen {
18                 stdout-path = "/serial";
19         };
20
21         cros_ec: cros-ec {
22                 reg = <0 0>;
23                 u-boot,dm-pre-reloc;
24                 compatible = "google,cros-ec-sandbox";
25
26                 /*
27                  * This describes the flash memory within the EC. Note
28                  * that the STM32L flash erases to 0, not 0xff.
29                  */
30                 flash {
31                         u-boot,dm-pre-reloc;
32                         image-pos = <0x08000000>;
33                         size = <0x20000>;
34                         erase-value = <0>;
35
36                         /* Information for sandbox */
37                         ro {
38                                 image-pos = <0>;
39                                 size = <0xf000>;
40                         };
41                         wp-ro {
42                                 image-pos = <0xf000>;
43                                 size = <0x1000>;
44                         };
45                         rw {
46                                 image-pos = <0x10000>;
47                                 size = <0x10000>;
48                         };
49                 };
50         };
51
52         ethrawbus {
53                 compatible = "sandbox,eth-raw-bus";
54                 skip-localhost = <0>;
55         };
56
57         eth@10002000 {
58                 compatible = "sandbox,eth";
59                 reg = <0x10002000 0x1000>;
60                 fake-host-hwaddr = [00 00 66 44 22 00];
61         };
62
63         gpio_a: gpios@0 {
64                 u-boot,dm-pre-reloc;
65                 gpio-controller;
66                 compatible = "sandbox,gpio";
67                 #gpio-cells = <1>;
68                 gpio-bank-name = "a";
69                 sandbox,gpio-count = <20>;
70         };
71
72         gpio_b: gpios@1 {
73                 u-boot,dm-pre-reloc;
74                 gpio-controller;
75                 compatible = "sandbox,gpio";
76                 #gpio-cells = <2>;
77                 gpio-bank-name = "b";
78                 sandbox,gpio-count = <10>;
79         };
80
81         hexagon {
82                 compatible = "demo-simple";
83                 colour = "white";
84                 sides = <6>;
85         };
86
87         i2c_0: i2c@0 {
88                 #address-cells = <1>;
89                 #size-cells = <0>;
90                 reg = <0 0>;
91                 compatible = "sandbox,i2c";
92                 clock-frequency = <400000>;
93                 pinctrl-names = "default";
94                 pinctrl-0 = <&pinctrl_i2c0>;
95                 eeprom@2c {
96                         reg = <0x2c>;
97                         compatible = "i2c-eeprom";
98                         emul {
99                                 compatible = "sandbox,i2c-eeprom";
100                                 sandbox,filename = "i2c.bin";
101                                 sandbox,size = <128>;
102                         };
103                 };
104
105                 rtc_0: rtc@43 {
106                         reg = <0x43>;
107                         compatible = "sandbox-rtc";
108                         emul {
109                                 compatible = "sandbox,i2c-rtc";
110                         };
111                 };
112                 sandbox_pmic: sandbox_pmic {
113                         reg = <0x40>;
114                 };
115
116                 mc34708: pmic@41 {
117                         reg = <0x41>;
118                 };
119         };
120
121         lcd {
122                 u-boot,dm-pre-reloc;
123                 compatible = "sandbox,lcd-sdl";
124                 xres = <1366>;
125                 yres = <768>;
126         };
127
128         leds {
129                 compatible = "gpio-leds";
130
131                 iracibble {
132                         gpios = <&gpio_a 1 0>;
133                         label = "sandbox:red";
134                 };
135
136                 martinet {
137                         gpios = <&gpio_a 2 0>;
138                         label = "sandbox:green";
139                 };
140         };
141
142         pci: pci-controller {
143                 compatible = "sandbox,pci";
144                 device_type = "pci";
145                 #address-cells = <3>;
146                 #size-cells = <2>;
147                 ranges = <0x02000000 0 0x10000000 0x10000000 0 0x2000
148                                 0x01000000 0 0x20000000 0x20000000 0 0x2000>;
149                 pci@1f,0 {
150                         compatible = "pci-generic";
151                         reg = <0xf800 0 0 0 0>;
152                         emul@1f,0 {
153                                 compatible = "sandbox,swap-case";
154                         };
155                 };
156         };
157
158         pinctrl {
159                 compatible = "sandbox,pinctrl";
160                 status = "okay";
161
162                 pinctrl_i2c0: i2c0 {
163                         groups = "i2c";
164                         function = "i2c";
165                         bias-pull-up;
166                 };
167
168                 pinctrl_serial0: uart0 {
169                         groups = "serial_a";
170                         function = "serial";
171                 };
172
173                 pinctrl_onewire0: onewire0 {
174                         groups = "w1";
175                         function = "w1";
176                         bias-pull-up;
177                 };
178         };
179
180         reset@1 {
181                 compatible = "sandbox,reset";
182         };
183
184         spi@0 {
185                 u-boot,dm-pre-reloc;
186                 #address-cells = <1>;
187                 #size-cells = <0>;
188                 reg = <0 0>;
189                 compatible = "sandbox,spi";
190                 cs-gpios = <0>, <&gpio_a 0>;
191                 firmware_storage_spi: flash@0 {
192                         u-boot,dm-pre-reloc;
193                         reg = <0>;
194                         compatible = "spansion,m25p16", "sandbox,spi-flash";
195                         spi-max-frequency = <40000000>;
196                         sandbox,filename = "spi.bin";
197                 };
198         };
199
200         spl-test {
201                 u-boot,dm-pre-reloc;
202                 compatible = "sandbox,spl-test";
203                 boolval;
204                 intval = <1>;
205                 intarray = <2 3 4>;
206                 byteval = [05];
207                 bytearray = [06];
208                 longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
209                 stringval = "message";
210                 stringarray = "multi-word", "message";
211         };
212
213         spl-test2 {
214                 u-boot,dm-pre-reloc;
215                 compatible = "sandbox,spl-test";
216                 intval = <3>;
217                 intarray = <5>;
218                 byteval = [08];
219                 bytearray = [01 23 34];
220                 longbytearray = [09 0a 0b 0c];
221                 stringval = "message2";
222                 stringarray = "another", "multi-word", "message";
223         };
224
225         spl-test3 {
226                 u-boot,dm-pre-reloc;
227                 compatible = "sandbox,spl-test";
228                 stringarray = "one";
229         };
230
231         spl-test4 {
232                 u-boot,dm-pre-reloc;
233                 compatible = "sandbox,spl-test.2";
234         };
235
236         square {
237                 compatible = "demo-shape";
238                 colour = "blue";
239                 sides = <4>;
240         };
241
242         timer {
243                 compatible = "sandbox,timer";
244                 clock-frequency = <1000000>;
245         };
246
247         tpm {
248                 u-boot,dm-pre-reloc;
249                 compatible = "google,sandbox-tpm";
250         };
251
252         tpm2 {
253                 compatible = "sandbox,tpm2";
254         };
255
256         triangle {
257                 compatible = "demo-shape";
258                 colour = "cyan";
259                 sides = <3>;
260                 character = <83>;
261                 light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
262         };
263
264         /* Needs to be available prior to relocation */
265         uart0: serial {
266                 u-boot,dm-spl;
267                 compatible = "sandbox,serial";
268                 sandbox,text-colour = "cyan";
269                 pinctrl-names = "default";
270                 pinctrl-0 = <&pinctrl_serial0>;
271         };
272
273         usb@0 {
274                 compatible = "sandbox,usb";
275                 status = "disabled";
276                 hub {
277                         compatible = "sandbox,usb-hub";
278                         #address-cells = <1>;
279                         #size-cells = <0>;
280                         flash-stick {
281                                 reg = <0>;
282                                 compatible = "sandbox,usb-flash";
283                         };
284                 };
285         };
286
287         usb@1 {
288                 compatible = "sandbox,usb";
289                 hub {
290                         compatible = "usb-hub";
291                         usb,device-class = <USB_CLASS_HUB>;
292                         hub-emul {
293                                 compatible = "sandbox,usb-hub";
294                                 #address-cells = <1>;
295                                 #size-cells = <0>;
296                                 flash-stick {
297                                         reg = <0>;
298                                         compatible = "sandbox,usb-flash";
299                                         sandbox,filepath = "flash.bin";
300                                 };
301                         };
302                 };
303         };
304
305         usb@2 {
306                 compatible = "sandbox,usb";
307                 status = "disabled";
308         };
309
310         spmi: spmi@0 {
311                 compatible = "sandbox,spmi";
312                 #address-cells = <0x1>;
313                 #size-cells = <0x1>;
314                 pm8916@0 {
315                         compatible = "qcom,spmi-pmic";
316                         reg = <0x0 0x1>;
317                         #address-cells = <0x1>;
318                         #size-cells = <0x1>;
319
320                         spmi_gpios: gpios@c000 {
321                                 compatible = "qcom,pm8916-gpio";
322                                 reg = <0xc000 0x400>;
323                                 gpio-controller;
324                                 gpio-count = <4>;
325                                 #gpio-cells = <2>;
326                                 gpio-bank-name="spmi";
327                         };
328                 };
329         };
330
331         axi: axi@0 {
332                 compatible = "sandbox,axi";
333                 #address-cells = <0x1>;
334                 #size-cells = <0x1>;
335                 store@0 {
336                         compatible = "sandbox,sandbox_store";
337                         reg = <0x0 0x400>;
338                 };
339         };
340
341         onewire0: onewire {
342                 compatible = "w1-gpio";
343                 gpios = <&gpio_a 8>;
344                 pinctrl-names = "default";
345                 pinctrl-0 = <&pinctrl_onewire0>;
346                 status = "okay";
347
348                 sandbox_eeprom0: sandbox_eeprom@0 {
349                         compatible = "sandbox,w1-eeprom";
350                         status = "okay";
351                 };
352         };
353
354         sandbox_tee {
355                 compatible = "sandbox,tee";
356         };
357 };
358
359 #include "cros-ec-keyboard.dtsi"
360 #include "sandbox_pmic.dtsi"
361
362 &cros_ec {
363         u-boot,dm-pre-reloc;
364         keyboard-controller {
365                 u-boot,dm-pre-reloc;
366         };
367 };