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