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