pci_ep: add pci endpoint sandbox driver
[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                 gpio1 = &gpio_a;
15                 gpio2 = &gpio_b;
16                 i2c0 = "/i2c@0";
17                 mmc0 = "/mmc0";
18                 mmc1 = "/mmc1";
19                 pci0 = &pci0;
20                 pci1 = &pci1;
21                 pci2 = &pci2;
22                 remoteproc1 = &rproc_1;
23                 remoteproc2 = &rproc_2;
24                 rtc0 = &rtc_0;
25                 rtc1 = &rtc_1;
26                 spi0 = "/spi@0";
27                 testfdt6 = "/e-test";
28                 testbus3 = "/some-bus";
29                 testfdt0 = "/some-bus/c-test@0";
30                 testfdt1 = "/some-bus/c-test@1";
31                 testfdt3 = "/b-test";
32                 testfdt5 = "/some-bus/c-test@5";
33                 testfdt8 = "/a-test";
34                 fdt-dummy0 = "/translation-test@8000/dev@0,0";
35                 fdt-dummy1 = "/translation-test@8000/dev@1,100";
36                 fdt-dummy2 = "/translation-test@8000/dev@2,200";
37                 fdt-dummy3 = "/translation-test@8000/noxlatebus@3,300/dev@42";
38                 usb0 = &usb_0;
39                 usb1 = &usb_1;
40                 usb2 = &usb_2;
41                 axi0 = &axi;
42                 osd0 = "/osd";
43         };
44
45         audio: audio-codec {
46                 compatible = "sandbox,audio-codec";
47                 #sound-dai-cells = <1>;
48         };
49
50         cros_ec: cros-ec {
51                 reg = <0 0>;
52                 compatible = "google,cros-ec-sandbox";
53
54                 /*
55                  * This describes the flash memory within the EC. Note
56                  * that the STM32L flash erases to 0, not 0xff.
57                  */
58                 flash {
59                         image-pos = <0x08000000>;
60                         size = <0x20000>;
61                         erase-value = <0>;
62
63                         /* Information for sandbox */
64                         ro {
65                                 image-pos = <0>;
66                                 size = <0xf000>;
67                         };
68                         wp-ro {
69                                 image-pos = <0xf000>;
70                                 size = <0x1000>;
71                         };
72                         rw {
73                                 image-pos = <0x10000>;
74                                 size = <0x10000>;
75                         };
76                 };
77         };
78
79         a-test {
80                 reg = <0 1>;
81                 compatible = "denx,u-boot-fdt-test";
82                 ping-expect = <0>;
83                 ping-add = <0>;
84                 u-boot,dm-pre-reloc;
85                 test-gpios = <&gpio_a 1>, <&gpio_a 4>, <&gpio_b 5 0 3 2 1>,
86                         <0>, <&gpio_a 12>;
87                 test2-gpios = <&gpio_a 1>, <&gpio_a 4>, <&gpio_b 6 1 3 2 1>,
88                         <&gpio_b 7 2 3 2 1>, <&gpio_b 8 4 3 2 1>,
89                         <&gpio_b 9 0xc 3 2 1>;
90                 int-value = <1234>;
91                 uint-value = <(-1234)>;
92         };
93
94         junk {
95                 reg = <1 1>;
96                 compatible = "not,compatible";
97         };
98
99         no-compatible {
100                 reg = <2 1>;
101         };
102
103         backlight: backlight {
104                 compatible = "pwm-backlight";
105                 enable-gpios = <&gpio_a 1>;
106                 power-supply = <&ldo_1>;
107                 pwms = <&pwm 0 1000>;
108                 default-brightness-level = <5>;
109                 brightness-levels = <0 16 32 64 128 170 202 234 255>;
110         };
111
112         bind-test {
113                 bind-test-child1 {
114                         compatible = "sandbox,phy";
115                         #phy-cells = <1>;
116                 };
117
118                 bind-test-child2 {
119                         compatible = "simple-bus";
120                 };
121         };
122
123         b-test {
124                 reg = <3 1>;
125                 compatible = "denx,u-boot-fdt-test";
126                 ping-expect = <3>;
127                 ping-add = <3>;
128         };
129
130         phy_provider0: gen_phy@0 {
131                 compatible = "sandbox,phy";
132                 #phy-cells = <1>;
133         };
134
135         phy_provider1: gen_phy@1 {
136                 compatible = "sandbox,phy";
137                 #phy-cells = <0>;
138                 broken;
139         };
140
141         gen_phy_user: gen_phy_user {
142                 compatible = "simple-bus";
143                 phys = <&phy_provider0 0>, <&phy_provider0 1>, <&phy_provider1>;
144                 phy-names = "phy1", "phy2", "phy3";
145         };
146
147         some-bus {
148                 #address-cells = <1>;
149                 #size-cells = <0>;
150                 compatible = "denx,u-boot-test-bus";
151                 reg = <3 1>;
152                 ping-expect = <4>;
153                 ping-add = <4>;
154                 c-test@5 {
155                         compatible = "denx,u-boot-fdt-test";
156                         reg = <5>;
157                         ping-expect = <5>;
158                         ping-add = <5>;
159                 };
160                 c-test@0 {
161                         compatible = "denx,u-boot-fdt-test";
162                         reg = <0>;
163                         ping-expect = <6>;
164                         ping-add = <6>;
165                 };
166                 c-test@1 {
167                         compatible = "denx,u-boot-fdt-test";
168                         reg = <1>;
169                         ping-expect = <7>;
170                         ping-add = <7>;
171                 };
172         };
173
174         d-test {
175                 reg = <3 1>;
176                 ping-expect = <6>;
177                 ping-add = <6>;
178                 compatible = "google,another-fdt-test";
179         };
180
181         e-test {
182                 reg = <3 1>;
183                 ping-expect = <6>;
184                 ping-add = <6>;
185                 compatible = "google,another-fdt-test";
186         };
187
188         f-test {
189                 compatible = "denx,u-boot-fdt-test";
190         };
191
192         g-test {
193                 compatible = "denx,u-boot-fdt-test";
194         };
195
196         h-test {
197                 compatible = "denx,u-boot-fdt-test1";
198         };
199
200         clocks {
201                 clk_fixed: clk-fixed {
202                         compatible = "fixed-clock";
203                         #clock-cells = <0>;
204                         clock-frequency = <1234>;
205                 };
206
207                 clk_fixed_factor: clk-fixed-factor {
208                         compatible = "fixed-factor-clock";
209                         #clock-cells = <0>;
210                         clock-div = <3>;
211                         clock-mult = <2>;
212                         clocks = <&clk_fixed>;
213                 };
214         };
215
216         clk_sandbox: clk-sbox {
217                 compatible = "sandbox,clk";
218                 #clock-cells = <1>;
219         };
220
221         clk-test {
222                 compatible = "sandbox,clk-test";
223                 clocks = <&clk_fixed>,
224                          <&clk_sandbox 1>,
225                          <&clk_sandbox 0>;
226                 clock-names = "fixed", "i2c", "spi";
227         };
228
229         eth@10002000 {
230                 compatible = "sandbox,eth";
231                 reg = <0x10002000 0x1000>;
232                 fake-host-hwaddr = [00 00 66 44 22 00];
233         };
234
235         eth_5: eth@10003000 {
236                 compatible = "sandbox,eth";
237                 reg = <0x10003000 0x1000>;
238                 fake-host-hwaddr = [00 00 66 44 22 11];
239         };
240
241         eth_3: sbe5 {
242                 compatible = "sandbox,eth";
243                 reg = <0x10005000 0x1000>;
244                 fake-host-hwaddr = [00 00 66 44 22 33];
245         };
246
247         eth@10004000 {
248                 compatible = "sandbox,eth";
249                 reg = <0x10004000 0x1000>;
250                 fake-host-hwaddr = [00 00 66 44 22 22];
251         };
252
253         firmware {
254                 sandbox_firmware: sandbox-firmware {
255                         compatible = "sandbox,firmware";
256                 };
257         };
258
259         gpio_a: base-gpios {
260                 compatible = "sandbox,gpio";
261                 gpio-controller;
262                 #gpio-cells = <1>;
263                 gpio-bank-name = "a";
264                 sandbox,gpio-count = <20>;
265         };
266
267         gpio_b: extra-gpios {
268                 compatible = "sandbox,gpio";
269                 gpio-controller;
270                 #gpio-cells = <5>;
271                 gpio-bank-name = "b";
272                 sandbox,gpio-count = <10>;
273         };
274
275         i2c@0 {
276                 #address-cells = <1>;
277                 #size-cells = <0>;
278                 reg = <0 1>;
279                 compatible = "sandbox,i2c";
280                 clock-frequency = <100000>;
281                 eeprom@2c {
282                         reg = <0x2c>;
283                         compatible = "i2c-eeprom";
284                         sandbox,emul = <&emul_eeprom>;
285                 };
286
287                 rtc_0: rtc@43 {
288                         reg = <0x43>;
289                         compatible = "sandbox-rtc";
290                         sandbox,emul = <&emul0>;
291                 };
292
293                 rtc_1: rtc@61 {
294                         reg = <0x61>;
295                         compatible = "sandbox-rtc";
296                         sandbox,emul = <&emul1>;
297                 };
298
299                 i2c_emul: emul {
300                         reg = <0xff>;
301                         compatible = "sandbox,i2c-emul-parent";
302                         emul_eeprom: emul-eeprom {
303                                 compatible = "sandbox,i2c-eeprom";
304                                 sandbox,filename = "i2c.bin";
305                                 sandbox,size = <256>;
306                         };
307                         emul0: emul0 {
308                                 compatible = "sandbox,i2c-rtc";
309                         };
310                         emul1: emull {
311                                 compatible = "sandbox,i2c-rtc";
312                         };
313                 };
314
315                 sandbox_pmic: sandbox_pmic {
316                         reg = <0x40>;
317                         sandbox,emul = <&emul_pmic0>;
318                 };
319
320                 mc34708: pmic@41 {
321                         reg = <0x41>;
322                         sandbox,emul = <&emul_pmic1>;
323                 };
324         };
325
326         bootcount@0 {
327                 compatible = "u-boot,bootcount-rtc";
328                 rtc = <&rtc_1>;
329                 offset = <0x13>;
330         };
331
332         adc@0 {
333                 compatible = "sandbox,adc";
334                 vdd-supply = <&buck2>;
335                 vss-microvolts = <0>;
336         };
337
338         lcd {
339                 u-boot,dm-pre-reloc;
340                 compatible = "sandbox,lcd-sdl";
341                 xres = <1366>;
342                 yres = <768>;
343         };
344
345         leds {
346                 compatible = "gpio-leds";
347
348                 iracibble {
349                         gpios = <&gpio_a 1 0>;
350                         label = "sandbox:red";
351                 };
352
353                 martinet {
354                         gpios = <&gpio_a 2 0>;
355                         label = "sandbox:green";
356                 };
357
358                 default_on {
359                         gpios = <&gpio_a 5 0>;
360                         label = "sandbox:default_on";
361                         default-state = "on";
362                 };
363
364                 default_off {
365                         gpios = <&gpio_a 6 0>;
366                         label = "sandbox:default_off";
367                         default-state = "off";
368                 };
369         };
370
371         mbox: mbox {
372                 compatible = "sandbox,mbox";
373                 #mbox-cells = <1>;
374         };
375
376         mbox-test {
377                 compatible = "sandbox,mbox-test";
378                 mboxes = <&mbox 100>, <&mbox 1>;
379                 mbox-names = "other", "test";
380         };
381
382         cpu-test1 {
383                 compatible = "sandbox,cpu_sandbox";
384                 u-boot,dm-pre-reloc;
385         };
386
387         cpu-test2 {
388                 compatible = "sandbox,cpu_sandbox";
389                 u-boot,dm-pre-reloc;
390         };
391
392         cpu-test3 {
393                 compatible = "sandbox,cpu_sandbox";
394                 u-boot,dm-pre-reloc;
395         };
396
397         i2s: i2s {
398                 compatible = "sandbox,i2s";
399                 #sound-dai-cells = <1>;
400                 sandbox,silent; /* Don't emit sounds while testing */
401         };
402
403         nop-test_0 {
404                 compatible = "sandbox,nop_sandbox1";
405                 nop-test_1 {
406                         compatible = "sandbox,nop_sandbox2";
407                         bind = "True";
408                 };
409                 nop-test_2 {
410                         compatible = "sandbox,nop_sandbox2";
411                         bind = "False";
412                 };
413         };
414
415         misc-test {
416                 compatible = "sandbox,misc_sandbox";
417         };
418
419         mmc2 {
420                 compatible = "sandbox,mmc";
421         };
422
423         mmc1 {
424                 compatible = "sandbox,mmc";
425         };
426
427         mmc0 {
428                 compatible = "sandbox,mmc";
429         };
430
431         pch {
432                 compatible = "sandbox,pch";
433         };
434
435         pci0: pci-controller0 {
436                 compatible = "sandbox,pci";
437                 device_type = "pci";
438                 #address-cells = <3>;
439                 #size-cells = <2>;
440                 ranges = <0x02000000 0 0x10000000 0x10000000 0 0x2000
441                                 0x01000000 0 0x20000000 0x20000000 0 0x2000>;
442                 pci@0,0 {
443                         compatible = "pci-generic";
444                         reg = <0x0000 0 0 0 0>;
445                         emul@0,0 {
446                                 compatible = "sandbox,swap-case";
447                         };
448                 };
449                 pci@1f,0 {
450                         compatible = "pci-generic";
451                         reg = <0xf800 0 0 0 0>;
452                         emul@1f,0 {
453                                 compatible = "sandbox,swap-case";
454                         };
455                 };
456         };
457
458         pci1: pci-controller1 {
459                 compatible = "sandbox,pci";
460                 device_type = "pci";
461                 #address-cells = <3>;
462                 #size-cells = <2>;
463                 ranges = <0x02000000 0 0x30000000 0x30000000 0 0x2000
464                                 0x01000000 0 0x40000000 0x40000000 0 0x2000>;
465                 sandbox,dev-info = <0x08 0x00 0x1234 0x5678
466                                     0x0c 0x00 0x1234 0x5678
467                                     0x10 0x00 0x1234 0x5678>;
468                 pci@10,0 {
469                         reg = <0x8000 0 0 0 0>;
470                 };
471         };
472
473         pci2: pci-controller2 {
474                 compatible = "sandbox,pci";
475                 device_type = "pci";
476                 #address-cells = <3>;
477                 #size-cells = <2>;
478                 ranges = <0x02000000 0 0x50000000 0x50000000 0 0x2000
479                                 0x01000000 0 0x60000000 0x60000000 0 0x2000>;
480                 sandbox,dev-info = <0x08 0x00 0x1234 0x5678>;
481                 pci@1f,0 {
482                         compatible = "pci-generic";
483                         reg = <0xf800 0 0 0 0>;
484                         emul@1f,0 {
485                                 compatible = "sandbox,swap-case";
486                         };
487                 };
488         };
489
490         pci_ep: pci_ep {
491                 compatible = "sandbox,pci_ep";
492         };
493
494         probing {
495                 compatible = "simple-bus";
496                 test1 {
497                         compatible = "denx,u-boot-probe-test";
498                 };
499
500                 test2 {
501                         compatible = "denx,u-boot-probe-test";
502                 };
503
504                 test3 {
505                         compatible = "denx,u-boot-probe-test";
506                 };
507
508                 test4 {
509                         compatible = "denx,u-boot-probe-test";
510                         first-syscon = <&syscon0>;
511                         second-sys-ctrl = <&another_system_controller>;
512                         third-syscon = <&syscon2>;
513                 };
514         };
515
516         pwrdom: power-domain {
517                 compatible = "sandbox,power-domain";
518                 #power-domain-cells = <1>;
519         };
520
521         power-domain-test {
522                 compatible = "sandbox,power-domain-test";
523                 power-domains = <&pwrdom 2>;
524         };
525
526         pwm: pwm {
527                 compatible = "sandbox,pwm";
528                 #pwm-cells = <2>;
529         };
530
531         pwm2 {
532                 compatible = "sandbox,pwm";
533                 #pwm-cells = <2>;
534         };
535
536         ram {
537                 compatible = "sandbox,ram";
538         };
539
540         reset@0 {
541                 compatible = "sandbox,warm-reset";
542         };
543
544         reset@1 {
545                 compatible = "sandbox,reset";
546         };
547
548         resetc: reset-ctl {
549                 compatible = "sandbox,reset-ctl";
550                 #reset-cells = <1>;
551         };
552
553         reset-ctl-test {
554                 compatible = "sandbox,reset-ctl-test";
555                 resets = <&resetc 100>, <&resetc 2>;
556                 reset-names = "other", "test";
557         };
558
559         rproc_1: rproc@1 {
560                 compatible = "sandbox,test-processor";
561                 remoteproc-name = "remoteproc-test-dev1";
562         };
563
564         rproc_2: rproc@2 {
565                 compatible = "sandbox,test-processor";
566                 internal-memory-mapped;
567                 remoteproc-name = "remoteproc-test-dev2";
568         };
569
570         panel {
571                 compatible = "simple-panel";
572                 backlight = <&backlight 0 100>;
573         };
574
575         smem@0 {
576                 compatible = "sandbox,smem";
577         };
578
579         sound {
580                 compatible = "sandbox,sound";
581                 cpu {
582                         sound-dai = <&i2s 0>;
583                 };
584
585                 codec {
586                         sound-dai = <&audio 0>;
587                 };
588         };
589
590         spi@0 {
591                 #address-cells = <1>;
592                 #size-cells = <0>;
593                 reg = <0 1>;
594                 compatible = "sandbox,spi";
595                 cs-gpios = <0>, <&gpio_a 0>;
596                 spi.bin@0 {
597                         reg = <0>;
598                         compatible = "spansion,m25p16", "jedec,spi-nor";
599                         spi-max-frequency = <40000000>;
600                         sandbox,filename = "spi.bin";
601                 };
602         };
603
604         syscon0: syscon@0 {
605                 compatible = "sandbox,syscon0";
606                 reg = <0x10 16>;
607         };
608
609         another_system_controller: syscon@1 {
610                 compatible = "sandbox,syscon1";
611                 reg = <0x20 5
612                         0x28 6
613                         0x30 7
614                         0x38 8>;
615         };
616
617         syscon2: syscon@2 {
618                 compatible = "simple-mfd", "syscon";
619                 reg = <0x40 5
620                         0x48 6
621                         0x50 7
622                         0x58 8>;
623         };
624
625         timer {
626                 compatible = "sandbox,timer";
627                 clock-frequency = <1000000>;
628         };
629
630         tpm2 {
631                 compatible = "sandbox,tpm2";
632         };
633
634         uart0: serial {
635                 compatible = "sandbox,serial";
636                 u-boot,dm-pre-reloc;
637         };
638
639         usb_0: usb@0 {
640                 compatible = "sandbox,usb";
641                 status = "disabled";
642                 hub {
643                         compatible = "sandbox,usb-hub";
644                         #address-cells = <1>;
645                         #size-cells = <0>;
646                         flash-stick {
647                                 reg = <0>;
648                                 compatible = "sandbox,usb-flash";
649                         };
650                 };
651         };
652
653         usb_1: usb@1 {
654                 compatible = "sandbox,usb";
655                 hub {
656                         compatible = "usb-hub";
657                         usb,device-class = <9>;
658                         hub-emul {
659                                 compatible = "sandbox,usb-hub";
660                                 #address-cells = <1>;
661                                 #size-cells = <0>;
662                                 flash-stick@0 {
663                                         reg = <0>;
664                                         compatible = "sandbox,usb-flash";
665                                         sandbox,filepath = "testflash.bin";
666                                 };
667
668                                 flash-stick@1 {
669                                         reg = <1>;
670                                         compatible = "sandbox,usb-flash";
671                                         sandbox,filepath = "testflash1.bin";
672                                 };
673
674                                 flash-stick@2 {
675                                         reg = <2>;
676                                         compatible = "sandbox,usb-flash";
677                                         sandbox,filepath = "testflash2.bin";
678                                 };
679
680                                 keyb@3 {
681                                         reg = <3>;
682                                         compatible = "sandbox,usb-keyb";
683                                 };
684
685                         };
686                 };
687         };
688
689         usb_2: usb@2 {
690                 compatible = "sandbox,usb";
691                 status = "disabled";
692         };
693
694         spmi: spmi@0 {
695                 compatible = "sandbox,spmi";
696                 #address-cells = <0x1>;
697                 #size-cells = <0x1>;
698                 pm8916@0 {
699                         compatible = "qcom,spmi-pmic";
700                         reg = <0x0 0x1>;
701                         #address-cells = <0x1>;
702                         #size-cells = <0x1>;
703
704                         spmi_gpios: gpios@c000 {
705                                 compatible = "qcom,pm8916-gpio";
706                                 reg = <0xc000 0x400>;
707                                 gpio-controller;
708                                 gpio-count = <4>;
709                                 #gpio-cells = <2>;
710                                 gpio-bank-name="spmi";
711                         };
712                 };
713         };
714
715         wdt0: wdt@0 {
716                 compatible = "sandbox,wdt";
717         };
718
719         axi: axi@0 {
720                 compatible = "sandbox,axi";
721                 #address-cells = <0x1>;
722                 #size-cells = <0x1>;
723                 store@0 {
724                         compatible = "sandbox,sandbox_store";
725                         reg = <0x0 0x400>;
726                 };
727         };
728
729         chosen {
730                 #address-cells = <1>;
731                 #size-cells = <1>;
732                 chosen-test {
733                         compatible = "denx,u-boot-fdt-test";
734                         reg = <9 1>;
735                 };
736         };
737
738         translation-test@8000 {
739                 compatible = "simple-bus";
740                 reg = <0x8000 0x4000>;
741
742                 #address-cells = <0x2>;
743                 #size-cells = <0x1>;
744
745                 ranges = <0 0x0 0x8000 0x1000
746                           1 0x100 0x9000 0x1000
747                           2 0x200 0xA000 0x1000
748                           3 0x300 0xB000 0x1000
749                          >;
750
751                 dev@0,0 {
752                         compatible = "denx,u-boot-fdt-dummy";
753                         reg = <0 0x0 0x1000>;
754                         reg-names = "sandbox-dummy-0";
755                 };
756
757                 dev@1,100 {
758                         compatible = "denx,u-boot-fdt-dummy";
759                         reg = <1 0x100 0x1000>;
760
761                 };
762
763                 dev@2,200 {
764                         compatible = "denx,u-boot-fdt-dummy";
765                         reg = <2 0x200 0x1000>;
766                 };
767
768
769                 noxlatebus@3,300 {
770                         compatible = "simple-bus";
771                         reg = <3 0x300 0x1000>;
772
773                         #address-cells = <0x1>;
774                         #size-cells = <0x0>;
775
776                         dev@42 {
777                                 compatible = "denx,u-boot-fdt-dummy";
778                                 reg = <0x42>;
779                         };
780                 };
781         };
782
783         osd {
784                 compatible = "sandbox,sandbox_osd";
785         };
786
787         board {
788                 compatible = "sandbox,board_sandbox";
789         };
790
791         sandbox_tee {
792                 compatible = "sandbox,tee";
793         };
794
795         sandbox_virtio1 {
796                 compatible = "sandbox,virtio1";
797         };
798
799         sandbox_virtio2 {
800                 compatible = "sandbox,virtio2";
801         };
802
803         pinctrl {
804                 compatible = "sandbox,pinctrl";
805         };
806
807         hwspinlock@0 {
808                 compatible = "sandbox,hwspinlock";
809         };
810
811         dma: dma {
812                 compatible = "sandbox,dma";
813                 #dma-cells = <1>;
814
815                 dmas = <&dma 0>, <&dma 1>, <&dma 2>;
816                 dma-names = "m2m", "tx0", "rx0";
817         };
818 };
819
820 #include "sandbox_pmic.dtsi"