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