Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging
[platform/kernel/u-boot.git] / arch / sandbox / dts / test.dts
1 /dts-v1/;
2
3 / {
4         model = "sandbox";
5         compatible = "sandbox";
6         #address-cells = <1>;
7         #size-cells = <1>;
8
9         aliases {
10                 console = &uart0;
11                 eth0 = "/eth@10002000";
12                 eth3 = &eth_3;
13                 eth5 = &eth_5;
14                 i2c0 = "/i2c@0";
15                 mmc0 = "/mmc0";
16                 mmc1 = "/mmc1";
17                 pci0 = &pci0;
18                 pci1 = &pci1;
19                 pci2 = &pci2;
20                 remoteproc1 = &rproc_1;
21                 remoteproc2 = &rproc_2;
22                 rtc0 = &rtc_0;
23                 rtc1 = &rtc_1;
24                 spi0 = "/spi@0";
25                 testfdt6 = "/e-test";
26                 testbus3 = "/some-bus";
27                 testfdt0 = "/some-bus/c-test@0";
28                 testfdt1 = "/some-bus/c-test@1";
29                 testfdt3 = "/b-test";
30                 testfdt5 = "/some-bus/c-test@5";
31                 testfdt8 = "/a-test";
32                 fdt-dummy0 = "/translation-test@8000/dev@0,0";
33                 fdt-dummy1 = "/translation-test@8000/dev@1,100";
34                 fdt-dummy2 = "/translation-test@8000/dev@2,200";
35                 fdt-dummy3 = "/translation-test@8000/noxlatebus@3,300/dev@42";
36                 usb0 = &usb_0;
37                 usb1 = &usb_1;
38                 usb2 = &usb_2;
39                 axi0 = &axi;
40         };
41
42         a-test {
43                 reg = <0 1>;
44                 compatible = "denx,u-boot-fdt-test";
45                 ping-expect = <0>;
46                 ping-add = <0>;
47                 u-boot,dm-pre-reloc;
48                 test-gpios = <&gpio_a 1>, <&gpio_a 4>, <&gpio_b 5 0 3 2 1>,
49                         <0>, <&gpio_a 12>;
50                 test2-gpios = <&gpio_a 1>, <&gpio_a 4>, <&gpio_b 6 1 3 2 1>,
51                         <&gpio_b 7 2 3 2 1>, <&gpio_b 8 4 3 2 1>,
52                         <&gpio_b 9 0xc 3 2 1>;
53         };
54
55         junk {
56                 reg = <1 1>;
57                 compatible = "not,compatible";
58         };
59
60         no-compatible {
61                 reg = <2 1>;
62         };
63
64         b-test {
65                 reg = <3 1>;
66                 compatible = "denx,u-boot-fdt-test";
67                 ping-expect = <3>;
68                 ping-add = <3>;
69         };
70
71         phy_provider0: gen_phy@0 {
72                 compatible = "sandbox,phy";
73                 #phy-cells = <1>;
74         };
75
76         phy_provider1: gen_phy@1 {
77                 compatible = "sandbox,phy";
78                 #phy-cells = <0>;
79                 broken;
80         };
81
82         gen_phy_user: gen_phy_user {
83                 compatible = "simple-bus";
84                 phys = <&phy_provider0 0>, <&phy_provider0 1>, <&phy_provider1>;
85                 phy-names = "phy1", "phy2", "phy3";
86         };
87
88         some-bus {
89                 #address-cells = <1>;
90                 #size-cells = <0>;
91                 compatible = "denx,u-boot-test-bus";
92                 reg = <3 1>;
93                 ping-expect = <4>;
94                 ping-add = <4>;
95                 c-test@5 {
96                         compatible = "denx,u-boot-fdt-test";
97                         reg = <5>;
98                         ping-expect = <5>;
99                         ping-add = <5>;
100                 };
101                 c-test@0 {
102                         compatible = "denx,u-boot-fdt-test";
103                         reg = <0>;
104                         ping-expect = <6>;
105                         ping-add = <6>;
106                 };
107                 c-test@1 {
108                         compatible = "denx,u-boot-fdt-test";
109                         reg = <1>;
110                         ping-expect = <7>;
111                         ping-add = <7>;
112                 };
113         };
114
115         d-test {
116                 reg = <3 1>;
117                 ping-expect = <6>;
118                 ping-add = <6>;
119                 compatible = "google,another-fdt-test";
120         };
121
122         e-test {
123                 reg = <3 1>;
124                 ping-expect = <6>;
125                 ping-add = <6>;
126                 compatible = "google,another-fdt-test";
127         };
128
129         f-test {
130                 compatible = "denx,u-boot-fdt-test";
131         };
132
133         g-test {
134                 compatible = "denx,u-boot-fdt-test";
135         };
136
137         clocks {
138                 clk_fixed: clk-fixed {
139                         compatible = "fixed-clock";
140                         #clock-cells = <0>;
141                         clock-frequency = <1234>;
142                 };
143         };
144
145         clk_sandbox: clk-sbox {
146                 compatible = "sandbox,clk";
147                 #clock-cells = <1>;
148         };
149
150         clk-test {
151                 compatible = "sandbox,clk-test";
152                 clocks = <&clk_fixed>,
153                          <&clk_sandbox 1>,
154                          <&clk_sandbox 0>;
155                 clock-names = "fixed", "i2c", "spi";
156         };
157
158         eth@10002000 {
159                 compatible = "sandbox,eth";
160                 reg = <0x10002000 0x1000>;
161                 fake-host-hwaddr = [00 00 66 44 22 00];
162         };
163
164         eth_5: eth@10003000 {
165                 compatible = "sandbox,eth";
166                 reg = <0x10003000 0x1000>;
167                 fake-host-hwaddr = [00 00 66 44 22 11];
168         };
169
170         eth_3: sbe5 {
171                 compatible = "sandbox,eth";
172                 reg = <0x10005000 0x1000>;
173                 fake-host-hwaddr = [00 00 66 44 22 33];
174         };
175
176         eth@10004000 {
177                 compatible = "sandbox,eth";
178                 reg = <0x10004000 0x1000>;
179                 fake-host-hwaddr = [00 00 66 44 22 22];
180         };
181
182         gpio_a: base-gpios {
183                 compatible = "sandbox,gpio";
184                 gpio-controller;
185                 #gpio-cells = <1>;
186                 gpio-bank-name = "a";
187                 sandbox,gpio-count = <20>;
188         };
189
190         gpio_b: extra-gpios {
191                 compatible = "sandbox,gpio";
192                 gpio-controller;
193                 #gpio-cells = <5>;
194                 gpio-bank-name = "b";
195                 sandbox,gpio-count = <10>;
196         };
197
198         i2c@0 {
199                 #address-cells = <1>;
200                 #size-cells = <0>;
201                 reg = <0 1>;
202                 compatible = "sandbox,i2c";
203                 clock-frequency = <100000>;
204                 eeprom@2c {
205                         reg = <0x2c>;
206                         compatible = "i2c-eeprom";
207                         emul {
208                                 compatible = "sandbox,i2c-eeprom";
209                                 sandbox,filename = "i2c.bin";
210                                 sandbox,size = <256>;
211                         };
212                 };
213
214                 rtc_0: rtc@43 {
215                         reg = <0x43>;
216                         compatible = "sandbox-rtc";
217                         emul {
218                                 compatible = "sandbox,i2c-rtc";
219                         };
220                 };
221
222                 rtc_1: rtc@61 {
223                         reg = <0x61>;
224                         compatible = "sandbox-rtc";
225                         emul {
226                                 compatible = "sandbox,i2c-rtc";
227                         };
228                 };
229
230                 sandbox_pmic: sandbox_pmic {
231                         reg = <0x40>;
232                 };
233
234                 mc34708: pmic@41 {
235                         reg = <0x41>;
236                 };
237         };
238
239         adc@0 {
240                 compatible = "sandbox,adc";
241                 vdd-supply = <&buck2>;
242                 vss-microvolts = <0>;
243         };
244
245         lcd {
246                 u-boot,dm-pre-reloc;
247                 compatible = "sandbox,lcd-sdl";
248                 xres = <1366>;
249                 yres = <768>;
250         };
251
252         leds {
253                 compatible = "gpio-leds";
254
255                 iracibble {
256                         gpios = <&gpio_a 1 0>;
257                         label = "sandbox:red";
258                 };
259
260                 martinet {
261                         gpios = <&gpio_a 2 0>;
262                         label = "sandbox:green";
263                 };
264
265                 default_on {
266                         gpios = <&gpio_a 5 0>;
267                         label = "sandbox:default_on";
268                         default-state = "on";
269                 };
270
271                 default_off {
272                         gpios = <&gpio_a 6 0>;
273                         label = "sandbox:default_off";
274                         default-state = "off";
275                 };
276         };
277
278         mbox: mbox {
279                 compatible = "sandbox,mbox";
280                 #mbox-cells = <1>;
281         };
282
283         mbox-test {
284                 compatible = "sandbox,mbox-test";
285                 mboxes = <&mbox 100>, <&mbox 1>;
286                 mbox-names = "other", "test";
287         };
288
289         misc-test {
290                 compatible = "sandbox,misc_sandbox";
291         };
292
293         mmc2 {
294                 compatible = "sandbox,mmc";
295         };
296
297         mmc1 {
298                 compatible = "sandbox,mmc";
299         };
300
301         mmc0 {
302                 compatible = "sandbox,mmc";
303         };
304
305         pci0: pci-controller0 {
306                 compatible = "sandbox,pci";
307                 device_type = "pci";
308                 #address-cells = <3>;
309                 #size-cells = <2>;
310                 ranges = <0x02000000 0 0x10000000 0x10000000 0 0x2000
311                                 0x01000000 0 0x20000000 0x20000000 0 0x2000>;
312                 pci@0,0 {
313                         compatible = "pci-generic";
314                         reg = <0x0000 0 0 0 0>;
315                         emul@0,0 {
316                                 compatible = "sandbox,swap-case";
317                         };
318                 };
319                 pci@1f,0 {
320                         compatible = "pci-generic";
321                         reg = <0xf800 0 0 0 0>;
322                         emul@1f,0 {
323                                 compatible = "sandbox,swap-case";
324                         };
325                 };
326         };
327
328         pci1: pci-controller1 {
329                 compatible = "sandbox,pci";
330                 device_type = "pci";
331                 #address-cells = <3>;
332                 #size-cells = <2>;
333                 ranges = <0x02000000 0 0x30000000 0x30000000 0 0x2000
334                                 0x01000000 0 0x40000000 0x40000000 0 0x2000>;
335                 sandbox,dev-info = <0x08 0x00 0x1234 0x5678
336                                     0x0c 0x00 0x1234 0x5678>;
337         };
338
339         pci2: pci-controller2 {
340                 compatible = "sandbox,pci";
341                 device_type = "pci";
342                 #address-cells = <3>;
343                 #size-cells = <2>;
344                 ranges = <0x02000000 0 0x50000000 0x50000000 0 0x2000
345                                 0x01000000 0 0x60000000 0x60000000 0 0x2000>;
346                 sandbox,dev-info = <0x08 0x00 0x1234 0x5678>;
347                 pci@1f,0 {
348                         compatible = "pci-generic";
349                         reg = <0xf800 0 0 0 0>;
350                         emul@1f,0 {
351                                 compatible = "sandbox,swap-case";
352                         };
353                 };
354         };
355
356         probing {
357                 compatible = "simple-bus";
358                 test1 {
359                         compatible = "denx,u-boot-probe-test";
360                 };
361
362                 test2 {
363                         compatible = "denx,u-boot-probe-test";
364                 };
365
366                 test3 {
367                         compatible = "denx,u-boot-probe-test";
368                 };
369
370                 test4 {
371                         compatible = "denx,u-boot-probe-test";
372                 };
373         };
374
375         pwrdom: power-domain {
376                 compatible = "sandbox,power-domain";
377                 #power-domain-cells = <1>;
378         };
379
380         power-domain-test {
381                 compatible = "sandbox,power-domain-test";
382                 power-domains = <&pwrdom 2>;
383         };
384
385         pwm {
386                 compatible = "sandbox,pwm";
387         };
388
389         pwm2 {
390                 compatible = "sandbox,pwm";
391         };
392
393         ram {
394                 compatible = "sandbox,ram";
395         };
396
397         reset@0 {
398                 compatible = "sandbox,warm-reset";
399         };
400
401         reset@1 {
402                 compatible = "sandbox,reset";
403         };
404
405         resetc: reset-ctl {
406                 compatible = "sandbox,reset-ctl";
407                 #reset-cells = <1>;
408         };
409
410         reset-ctl-test {
411                 compatible = "sandbox,reset-ctl-test";
412                 resets = <&resetc 100>, <&resetc 2>;
413                 reset-names = "other", "test";
414         };
415
416         rproc_1: rproc@1 {
417                 compatible = "sandbox,test-processor";
418                 remoteproc-name = "remoteproc-test-dev1";
419         };
420
421         rproc_2: rproc@2 {
422                 compatible = "sandbox,test-processor";
423                 internal-memory-mapped;
424                 remoteproc-name = "remoteproc-test-dev2";
425         };
426
427         smem@0 {
428                 compatible = "sandbox,smem";
429         };
430
431         spi@0 {
432                 #address-cells = <1>;
433                 #size-cells = <0>;
434                 reg = <0 1>;
435                 compatible = "sandbox,spi";
436                 cs-gpios = <0>, <&gpio_a 0>;
437                 spi.bin@0 {
438                         reg = <0>;
439                         compatible = "spansion,m25p16", "spi-flash";
440                         spi-max-frequency = <40000000>;
441                         sandbox,filename = "spi.bin";
442                 };
443         };
444
445         syscon@0 {
446                 compatible = "sandbox,syscon0";
447                 reg = <0x10 4>;
448         };
449
450         syscon@1 {
451                 compatible = "sandbox,syscon1";
452                 reg = <0x20 5
453                         0x28 6
454                         0x30 7
455                         0x38 8>;
456         };
457
458         syscon@2 {
459                 compatible = "simple-mfd", "syscon";
460                 reg = <0x40 5
461                         0x48 6
462                         0x50 7
463                         0x58 8>;
464         };
465
466         timer {
467                 compatible = "sandbox,timer";
468                 clock-frequency = <1000000>;
469         };
470
471         tpm2 {
472                 compatible = "sandbox,tpm2";
473         };
474
475         uart0: serial {
476                 compatible = "sandbox,serial";
477                 u-boot,dm-pre-reloc;
478         };
479
480         usb_0: usb@0 {
481                 compatible = "sandbox,usb";
482                 status = "disabled";
483                 hub {
484                         compatible = "sandbox,usb-hub";
485                         #address-cells = <1>;
486                         #size-cells = <0>;
487                         flash-stick {
488                                 reg = <0>;
489                                 compatible = "sandbox,usb-flash";
490                         };
491                 };
492         };
493
494         usb_1: usb@1 {
495                 compatible = "sandbox,usb";
496                 hub {
497                         compatible = "usb-hub";
498                         usb,device-class = <9>;
499                         hub-emul {
500                                 compatible = "sandbox,usb-hub";
501                                 #address-cells = <1>;
502                                 #size-cells = <0>;
503                                 flash-stick@0 {
504                                         reg = <0>;
505                                         compatible = "sandbox,usb-flash";
506                                         sandbox,filepath = "testflash.bin";
507                                 };
508
509                                 flash-stick@1 {
510                                         reg = <1>;
511                                         compatible = "sandbox,usb-flash";
512                                         sandbox,filepath = "testflash1.bin";
513                                 };
514
515                                 flash-stick@2 {
516                                         reg = <2>;
517                                         compatible = "sandbox,usb-flash";
518                                         sandbox,filepath = "testflash2.bin";
519                                 };
520
521                                 keyb@3 {
522                                         reg = <3>;
523                                         compatible = "sandbox,usb-keyb";
524                                 };
525
526                         };
527                 };
528         };
529
530         usb_2: usb@2 {
531                 compatible = "sandbox,usb";
532                 status = "disabled";
533         };
534
535         spmi: spmi@0 {
536                 compatible = "sandbox,spmi";
537                 #address-cells = <0x1>;
538                 #size-cells = <0x1>;
539                 pm8916@0 {
540                         compatible = "qcom,spmi-pmic";
541                         reg = <0x0 0x1>;
542                         #address-cells = <0x1>;
543                         #size-cells = <0x1>;
544
545                         spmi_gpios: gpios@c000 {
546                                 compatible = "qcom,pm8916-gpio";
547                                 reg = <0xc000 0x400>;
548                                 gpio-controller;
549                                 gpio-count = <4>;
550                                 #gpio-cells = <2>;
551                                 gpio-bank-name="spmi";
552                         };
553                 };
554         };
555
556         wdt0: wdt@0 {
557                 compatible = "sandbox,wdt";
558         };
559
560         axi: axi@0 {
561                 compatible = "sandbox,axi";
562                 #address-cells = <0x1>;
563                 #size-cells = <0x1>;
564                 store@0 {
565                         compatible = "sandbox,sandbox_store";
566                         reg = <0x0 0x400>;
567                 };
568         };
569
570         chosen {
571                 #address-cells = <1>;
572                 #size-cells = <1>;
573                 chosen-test {
574                         compatible = "denx,u-boot-fdt-test";
575                         reg = <9 1>;
576                 };
577         };
578
579         translation-test@8000 {
580                 compatible = "simple-bus";
581                 reg = <0x8000 0x4000>;
582
583                 #address-cells = <0x2>;
584                 #size-cells = <0x1>;
585
586                 ranges = <0 0x0 0x8000 0x1000
587                           1 0x100 0x9000 0x1000
588                           2 0x200 0xA000 0x1000
589                           3 0x300 0xB000 0x1000
590                          >;
591
592                 dev@0,0 {
593                         compatible = "denx,u-boot-fdt-dummy";
594                         reg = <0 0x0 0x1000>;
595                 };
596
597                 dev@1,100 {
598                         compatible = "denx,u-boot-fdt-dummy";
599                         reg = <1 0x100 0x1000>;
600
601                 };
602
603                 dev@2,200 {
604                         compatible = "denx,u-boot-fdt-dummy";
605                         reg = <2 0x200 0x1000>;
606                 };
607
608
609                 noxlatebus@3,300 {
610                         compatible = "simple-bus";
611                         reg = <3 0x300 0x1000>;
612
613                         #address-cells = <0x1>;
614                         #size-cells = <0x0>;
615
616                         dev@42 {
617                                 compatible = "denx,u-boot-fdt-dummy";
618                                 reg = <0x42>;
619                         };
620                 };
621         };
622 };
623
624 #include "sandbox_pmic.dtsi"