acpi: Add a function to get a device path and scope
[platform/kernel/u-boot.git] / arch / sandbox / dts / test.dts
1 /dts-v1/;
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/gpio/sandbox-gpio.h>
5
6 / {
7         model = "sandbox";
8         compatible = "sandbox";
9         #address-cells = <1>;
10         #size-cells = <1>;
11
12         aliases {
13                 console = &uart0;
14                 eth0 = "/eth@10002000";
15                 eth3 = &eth_3;
16                 eth5 = &eth_5;
17                 gpio1 = &gpio_a;
18                 gpio2 = &gpio_b;
19                 gpio3 = &gpio_c;
20                 i2c0 = "/i2c@0";
21                 mmc0 = "/mmc0";
22                 mmc1 = "/mmc1";
23                 pci0 = &pci0;
24                 pci1 = &pci1;
25                 pci2 = &pci2;
26                 remoteproc0 = &rproc_1;
27                 remoteproc1 = &rproc_2;
28                 rtc0 = &rtc_0;
29                 rtc1 = &rtc_1;
30                 spi0 = "/spi@0";
31                 testfdt6 = "/e-test";
32                 testbus3 = "/some-bus";
33                 testfdt0 = "/some-bus/c-test@0";
34                 testfdt1 = "/some-bus/c-test@1";
35                 testfdt3 = "/b-test";
36                 testfdt5 = "/some-bus/c-test@5";
37                 testfdt8 = "/a-test";
38                 fdt-dummy0 = "/translation-test@8000/dev@0,0";
39                 fdt-dummy1 = "/translation-test@8000/dev@1,100";
40                 fdt-dummy2 = "/translation-test@8000/dev@2,200";
41                 fdt-dummy3 = "/translation-test@8000/noxlatebus@3,300/dev@42";
42                 usb0 = &usb_0;
43                 usb1 = &usb_1;
44                 usb2 = &usb_2;
45                 axi0 = &axi;
46                 osd0 = "/osd";
47         };
48
49         audio: audio-codec {
50                 compatible = "sandbox,audio-codec";
51                 #sound-dai-cells = <1>;
52         };
53
54         cros_ec: cros-ec {
55                 reg = <0 0>;
56                 compatible = "google,cros-ec-sandbox";
57
58                 /*
59                  * This describes the flash memory within the EC. Note
60                  * that the STM32L flash erases to 0, not 0xff.
61                  */
62                 flash {
63                         image-pos = <0x08000000>;
64                         size = <0x20000>;
65                         erase-value = <0>;
66
67                         /* Information for sandbox */
68                         ro {
69                                 image-pos = <0>;
70                                 size = <0xf000>;
71                         };
72                         wp-ro {
73                                 image-pos = <0xf000>;
74                                 size = <0x1000>;
75                         };
76                         rw {
77                                 image-pos = <0x10000>;
78                                 size = <0x10000>;
79                         };
80                 };
81         };
82
83         dsi_host: dsi_host {
84                 compatible = "sandbox,dsi-host";
85         };
86
87         a-test {
88                 reg = <0 1>;
89                 compatible = "denx,u-boot-fdt-test";
90                 ping-expect = <0>;
91                 ping-add = <0>;
92                 u-boot,dm-pre-reloc;
93                 test-gpios = <&gpio_a 1>, <&gpio_a 4>,
94                         <&gpio_b 5 GPIO_ACTIVE_HIGH 3 2 1>,
95                         <0>, <&gpio_a 12>;
96                 test2-gpios = <&gpio_a 1>, <&gpio_a 4>,
97                         <&gpio_b 6 GPIO_ACTIVE_LOW 3 2 1>,
98                         <&gpio_b 7 GPIO_IN 3 2 1>,
99                         <&gpio_b 8 GPIO_OUT 3 2 1>,
100                         <&gpio_b 9 (GPIO_OUT|GPIO_OUT_ACTIVE) 3 2 1>;
101                 test3-gpios =
102                         <&gpio_c 0 (GPIO_OUT|GPIO_OPEN_DRAIN)>,
103                         <&gpio_c 1 (GPIO_OUT|GPIO_OPEN_SOURCE)>,
104                         <&gpio_c 2 GPIO_OUT>,
105                         <&gpio_c 3 (GPIO_IN|GPIO_PULL_UP)>,
106                         <&gpio_c 4 (GPIO_IN|GPIO_PULL_DOWN)>,
107                         <&gpio_c 5 GPIO_IN>,
108                         <&gpio_c 6 (GPIO_ACTIVE_LOW|GPIO_OUT|GPIO_OPEN_DRAIN)>,
109                         <&gpio_c 7 (GPIO_ACTIVE_LOW|GPIO_OUT|GPIO_OPEN_SOURCE)>;
110                 int-value = <1234>;
111                 uint-value = <(-1234)>;
112                 int64-value = /bits/ 64 <0x1111222233334444>;
113                 int-array = <5678 9123 4567>;
114                 interrupts-extended = <&irq 3 0>;
115         };
116
117         junk {
118                 reg = <1 1>;
119                 compatible = "not,compatible";
120         };
121
122         no-compatible {
123                 reg = <2 1>;
124         };
125
126         backlight: backlight {
127                 compatible = "pwm-backlight";
128                 enable-gpios = <&gpio_a 1>;
129                 power-supply = <&ldo_1>;
130                 pwms = <&pwm 0 1000>;
131                 default-brightness-level = <5>;
132                 brightness-levels = <0 16 32 64 128 170 202 234 255>;
133         };
134
135         bind-test {
136                 bind-test-child1 {
137                         compatible = "sandbox,phy";
138                         #phy-cells = <1>;
139                 };
140
141                 bind-test-child2 {
142                         compatible = "simple-bus";
143                 };
144         };
145
146         b-test {
147                 reg = <3 1>;
148                 compatible = "denx,u-boot-fdt-test";
149                 ping-expect = <3>;
150                 ping-add = <3>;
151         };
152
153         phy_provider0: gen_phy@0 {
154                 compatible = "sandbox,phy";
155                 #phy-cells = <1>;
156         };
157
158         phy_provider1: gen_phy@1 {
159                 compatible = "sandbox,phy";
160                 #phy-cells = <0>;
161                 broken;
162         };
163
164         phy_provider2: gen_phy@2 {
165                 compatible = "sandbox,phy";
166                 #phy-cells = <0>;
167         };
168
169         gen_phy_user: gen_phy_user {
170                 compatible = "simple-bus";
171                 phys = <&phy_provider0 0>, <&phy_provider0 1>, <&phy_provider1>;
172                 phy-names = "phy1", "phy2", "phy3";
173         };
174
175         gen_phy_user1: gen_phy_user1 {
176                 compatible = "simple-bus";
177                 phys = <&phy_provider0 0>, <&phy_provider2>;
178                 phy-names = "phy1", "phy2";
179         };
180
181         some-bus {
182                 #address-cells = <1>;
183                 #size-cells = <0>;
184                 compatible = "denx,u-boot-test-bus";
185                 reg = <3 1>;
186                 ping-expect = <4>;
187                 ping-add = <4>;
188                 c-test@5 {
189                         compatible = "denx,u-boot-fdt-test";
190                         reg = <5>;
191                         ping-expect = <5>;
192                         ping-add = <5>;
193                 };
194                 c-test@0 {
195                         compatible = "denx,u-boot-fdt-test";
196                         reg = <0>;
197                         ping-expect = <6>;
198                         ping-add = <6>;
199                 };
200                 c-test@1 {
201                         compatible = "denx,u-boot-fdt-test";
202                         reg = <1>;
203                         ping-expect = <7>;
204                         ping-add = <7>;
205                 };
206         };
207
208         d-test {
209                 reg = <3 1>;
210                 ping-expect = <6>;
211                 ping-add = <6>;
212                 compatible = "google,another-fdt-test";
213         };
214
215         e-test {
216                 reg = <3 1>;
217                 ping-expect = <6>;
218                 ping-add = <6>;
219                 compatible = "google,another-fdt-test";
220         };
221
222         f-test {
223                 compatible = "denx,u-boot-fdt-test";
224         };
225
226         g-test {
227                 compatible = "denx,u-boot-fdt-test";
228         };
229
230         h-test {
231                 compatible = "denx,u-boot-fdt-test1";
232         };
233
234         i-test {
235                 compatible = "mediatek,u-boot-fdt-test";
236                 #address-cells = <1>;
237                 #size-cells = <0>;
238
239                 subnode@0 {
240                         reg = <0>;
241                 };
242
243                 subnode@1 {
244                         reg = <1>;
245                 };
246
247                 subnode@2 {
248                         reg = <2>;
249                 };
250         };
251
252         devres-test {
253                 compatible = "denx,u-boot-devres-test";
254         };
255
256         acpi-test {
257                 compatible = "denx,u-boot-acpi-test";
258                 child {
259                         compatible = "denx,u-boot-acpi-test";
260                 };
261         };
262
263         acpi-test2 {
264                 compatible = "denx,u-boot-acpi-test";
265         };
266
267         clocks {
268                 clk_fixed: clk-fixed {
269                         compatible = "fixed-clock";
270                         #clock-cells = <0>;
271                         clock-frequency = <1234>;
272                 };
273
274                 clk_fixed_factor: clk-fixed-factor {
275                         compatible = "fixed-factor-clock";
276                         #clock-cells = <0>;
277                         clock-div = <3>;
278                         clock-mult = <2>;
279                         clocks = <&clk_fixed>;
280                 };
281
282                 osc {
283                         compatible = "fixed-clock";
284                         #clock-cells = <0>;
285                         clock-frequency = <20000000>;
286                 };
287         };
288
289         clk_sandbox: clk-sbox {
290                 compatible = "sandbox,clk";
291                 #clock-cells = <1>;
292                 assigned-clocks = <&clk_sandbox 3>;
293                 assigned-clock-rates = <321>;
294         };
295
296         clk-test {
297                 compatible = "sandbox,clk-test";
298                 clocks = <&clk_fixed>,
299                          <&clk_sandbox 1>,
300                          <&clk_sandbox 0>,
301                          <&clk_sandbox 3>,
302                          <&clk_sandbox 2>;
303                 clock-names = "fixed", "i2c", "spi", "uart2", "uart1";
304         };
305
306         ccf: clk-ccf {
307                 compatible = "sandbox,clk-ccf";
308         };
309
310         eth@10002000 {
311                 compatible = "sandbox,eth";
312                 reg = <0x10002000 0x1000>;
313                 fake-host-hwaddr = [00 00 66 44 22 00];
314         };
315
316         eth_5: eth@10003000 {
317                 compatible = "sandbox,eth";
318                 reg = <0x10003000 0x1000>;
319                 fake-host-hwaddr = [00 00 66 44 22 11];
320         };
321
322         eth_3: sbe5 {
323                 compatible = "sandbox,eth";
324                 reg = <0x10005000 0x1000>;
325                 fake-host-hwaddr = [00 00 66 44 22 33];
326         };
327
328         eth@10004000 {
329                 compatible = "sandbox,eth";
330                 reg = <0x10004000 0x1000>;
331                 fake-host-hwaddr = [00 00 66 44 22 22];
332         };
333
334         firmware {
335                 sandbox_firmware: sandbox-firmware {
336                         compatible = "sandbox,firmware";
337                 };
338         };
339
340         pinctrl-gpio {
341                 compatible = "sandbox,pinctrl-gpio";
342
343                 gpio_a: base-gpios {
344                         compatible = "sandbox,gpio";
345                         gpio-controller;
346                         #gpio-cells = <1>;
347                         gpio-bank-name = "a";
348                         sandbox,gpio-count = <20>;
349                         hog_input_active_low {
350                                 gpio-hog;
351                                 input;
352                                 gpios = <0 GPIO_ACTIVE_LOW>;
353                         };
354                         hog_input_active_high {
355                                 gpio-hog;
356                                 input;
357                                 gpios = <1 GPIO_ACTIVE_HIGH>;
358                         };
359                         hog_output_low {
360                                 gpio-hog;
361                                 output-low;
362                                 gpios = <2 GPIO_ACTIVE_HIGH>;
363                         };
364                         hog_output_high {
365                                 gpio-hog;
366                                 output-high;
367                                 gpios = <3 GPIO_ACTIVE_HIGH>;
368                         };
369                 };
370
371                 gpio_b: extra-gpios {
372                         compatible = "sandbox,gpio";
373                         gpio-controller;
374                         #gpio-cells = <5>;
375                         gpio-bank-name = "b";
376                         sandbox,gpio-count = <10>;
377                 };
378
379                 gpio_c: pinmux-gpios {
380                         compatible = "sandbox,gpio";
381                         gpio-controller;
382                         #gpio-cells = <2>;
383                         gpio-bank-name = "c";
384                         sandbox,gpio-count = <10>;
385                 };
386         };
387
388         i2c@0 {
389                 #address-cells = <1>;
390                 #size-cells = <0>;
391                 reg = <0 1>;
392                 compatible = "sandbox,i2c";
393                 clock-frequency = <100000>;
394                 eeprom@2c {
395                         reg = <0x2c>;
396                         compatible = "i2c-eeprom";
397                         sandbox,emul = <&emul_eeprom>;
398                 };
399
400                 rtc_0: rtc@43 {
401                         reg = <0x43>;
402                         compatible = "sandbox-rtc";
403                         sandbox,emul = <&emul0>;
404                 };
405
406                 rtc_1: rtc@61 {
407                         reg = <0x61>;
408                         compatible = "sandbox-rtc";
409                         sandbox,emul = <&emul1>;
410                 };
411
412                 i2c_emul: emul {
413                         reg = <0xff>;
414                         compatible = "sandbox,i2c-emul-parent";
415                         emul_eeprom: emul-eeprom {
416                                 compatible = "sandbox,i2c-eeprom";
417                                 sandbox,filename = "i2c.bin";
418                                 sandbox,size = <256>;
419                         };
420                         emul0: emul0 {
421                                 compatible = "sandbox,i2c-rtc";
422                         };
423                         emul1: emull {
424                                 compatible = "sandbox,i2c-rtc";
425                         };
426                 };
427
428                 sandbox_pmic: sandbox_pmic {
429                         reg = <0x40>;
430                         sandbox,emul = <&emul_pmic0>;
431                 };
432
433                 mc34708: pmic@41 {
434                         reg = <0x41>;
435                         sandbox,emul = <&emul_pmic1>;
436                 };
437         };
438
439         bootcount@0 {
440                 compatible = "u-boot,bootcount-rtc";
441                 rtc = <&rtc_1>;
442                 offset = <0x13>;
443         };
444
445         adc@0 {
446                 compatible = "sandbox,adc";
447                 vdd-supply = <&buck2>;
448                 vss-microvolts = <0>;
449         };
450
451         irq: irq {
452                 compatible = "sandbox,irq";
453                 interrupt-controller;
454                 #interrupt-cells = <2>;
455         };
456
457         lcd {
458                 u-boot,dm-pre-reloc;
459                 compatible = "sandbox,lcd-sdl";
460                 xres = <1366>;
461                 yres = <768>;
462         };
463
464         leds {
465                 compatible = "gpio-leds";
466
467                 iracibble {
468                         gpios = <&gpio_a 1 0>;
469                         label = "sandbox:red";
470                 };
471
472                 martinet {
473                         gpios = <&gpio_a 2 0>;
474                         label = "sandbox:green";
475                 };
476
477                 default_on {
478                         gpios = <&gpio_a 5 0>;
479                         label = "sandbox:default_on";
480                         default-state = "on";
481                 };
482
483                 default_off {
484                         gpios = <&gpio_a 6 0>;
485                         label = "sandbox:default_off";
486                         default-state = "off";
487                 };
488         };
489
490         mbox: mbox {
491                 compatible = "sandbox,mbox";
492                 #mbox-cells = <1>;
493         };
494
495         mbox-test {
496                 compatible = "sandbox,mbox-test";
497                 mboxes = <&mbox 100>, <&mbox 1>;
498                 mbox-names = "other", "test";
499         };
500
501         cpus {
502                 cpu-test1 {
503                         compatible = "sandbox,cpu_sandbox";
504                         u-boot,dm-pre-reloc;
505                 };
506
507                 cpu-test2 {
508                         compatible = "sandbox,cpu_sandbox";
509                         u-boot,dm-pre-reloc;
510                 };
511
512                 cpu-test3 {
513                         compatible = "sandbox,cpu_sandbox";
514                         u-boot,dm-pre-reloc;
515                 };
516         };
517
518         i2s: i2s {
519                 compatible = "sandbox,i2s";
520                 #sound-dai-cells = <1>;
521                 sandbox,silent; /* Don't emit sounds while testing */
522         };
523
524         nop-test_0 {
525                 compatible = "sandbox,nop_sandbox1";
526                 nop-test_1 {
527                         compatible = "sandbox,nop_sandbox2";
528                         bind = "True";
529                 };
530                 nop-test_2 {
531                         compatible = "sandbox,nop_sandbox2";
532                         bind = "False";
533                 };
534         };
535
536         misc-test {
537                 compatible = "sandbox,misc_sandbox";
538         };
539
540         mmc2 {
541                 compatible = "sandbox,mmc";
542         };
543
544         mmc1 {
545                 compatible = "sandbox,mmc";
546         };
547
548         mmc0 {
549                 compatible = "sandbox,mmc";
550         };
551
552         pch {
553                 compatible = "sandbox,pch";
554         };
555
556         pci0: pci@0 {
557                 compatible = "sandbox,pci";
558                 device_type = "pci";
559                 bus-range = <0x00 0xff>;
560                 #address-cells = <3>;
561                 #size-cells = <2>;
562                 ranges = <0x02000000 0 0x10000000 0x10000000 0 0x2000000
563                                 0x01000000 0 0x20000000 0x20000000 0 0x2000>;
564                 pci@0,0 {
565                         compatible = "pci-generic";
566                         reg = <0x0000 0 0 0 0>;
567                         sandbox,emul = <&swap_case_emul0_0>;
568                 };
569                 pci@1,0 {
570                         compatible = "pci-generic";
571                         /* reg 0 is at 0x14, using FDT_PCI_SPACE_MEM32 */
572                         reg = <0x02000814 0 0 0 0
573                                0x01000810 0 0 0 0>;
574                         sandbox,emul = <&swap_case_emul0_1>;
575                 };
576                 p2sb-pci@2,0 {
577                         compatible = "sandbox,p2sb";
578                         reg = <0x02001010 0 0 0 0>;
579                         sandbox,emul = <&p2sb_emul>;
580
581                         adder {
582                                 intel,p2sb-port-id = <3>;
583                                 compatible = "sandbox,adder";
584                         };
585                 };
586                 pci@1e,0 {
587                         compatible = "sandbox,pmc";
588                         reg = <0xf000 0 0 0 0>;
589                         sandbox,emul = <&pmc_emul1e>;
590                         acpi-base = <0x400>;
591                         gpe0-dwx-mask = <0xf>;
592                         gpe0-dwx-shift-base = <4>;
593                         gpe0-dw = <6 7 9>;
594                         gpe0-sts = <0x20>;
595                         gpe0-en = <0x30>;
596                 };
597                 pci@1f,0 {
598                         compatible = "pci-generic";
599                         /* reg 0 is at 0x10, using FDT_PCI_SPACE_IO */
600                         reg = <0x0100f810 0 0 0 0>;
601                         sandbox,emul = <&swap_case_emul0_1f>;
602                 };
603         };
604
605         pci-emul0 {
606                 compatible = "sandbox,pci-emul-parent";
607                 swap_case_emul0_0: emul0@0,0 {
608                         compatible = "sandbox,swap-case";
609                 };
610                 swap_case_emul0_1: emul0@1,0 {
611                         compatible = "sandbox,swap-case";
612                         use-ea;
613                 };
614                 swap_case_emul0_1f: emul0@1f,0 {
615                         compatible = "sandbox,swap-case";
616                 };
617                 p2sb_emul: emul@2,0 {
618                         compatible = "sandbox,p2sb-emul";
619                 };
620                 pmc_emul1e: emul@1e,0 {
621                         compatible = "sandbox,pmc-emul";
622                 };
623         };
624
625         pci1: pci@1 {
626                 compatible = "sandbox,pci";
627                 device_type = "pci";
628                 bus-range = <0x00 0xff>;
629                 #address-cells = <3>;
630                 #size-cells = <2>;
631                 ranges = <0x02000000 0 0x30000000 0x30000000 0 0x2000
632                                 0x01000000 0 0x40000000 0x40000000 0 0x2000>;
633                 sandbox,dev-info = <0x08 0x00 0x1234 0x5678
634                                     0x0c 0x00 0x1234 0x5678
635                                     0x10 0x00 0x1234 0x5678>;
636                 pci@10,0 {
637                         reg = <0x8000 0 0 0 0>;
638                 };
639         };
640
641         pci2: pci@2 {
642                 compatible = "sandbox,pci";
643                 device_type = "pci";
644                 bus-range = <0x00 0xff>;
645                 #address-cells = <3>;
646                 #size-cells = <2>;
647                 ranges = <0x02000000 0 0x50000000 0x50000000 0 0x2000
648                                 0x01000000 0 0x60000000 0x60000000 0 0x2000>;
649                 sandbox,dev-info = <0x08 0x00 0x1234 0x5678>;
650                 pci@1f,0 {
651                         compatible = "pci-generic";
652                         reg = <0xf800 0 0 0 0>;
653                         sandbox,emul = <&swap_case_emul2_1f>;
654                 };
655         };
656
657         pci-emul2 {
658                 compatible = "sandbox,pci-emul-parent";
659                 swap_case_emul2_1f: emul2@1f,0 {
660                         compatible = "sandbox,swap-case";
661                 };
662         };
663
664         pci_ep: pci_ep {
665                 compatible = "sandbox,pci_ep";
666         };
667
668         probing {
669                 compatible = "simple-bus";
670                 test1 {
671                         compatible = "denx,u-boot-probe-test";
672                 };
673
674                 test2 {
675                         compatible = "denx,u-boot-probe-test";
676                 };
677
678                 test3 {
679                         compatible = "denx,u-boot-probe-test";
680                 };
681
682                 test4 {
683                         compatible = "denx,u-boot-probe-test";
684                         first-syscon = <&syscon0>;
685                         second-sys-ctrl = <&another_system_controller>;
686                         third-syscon = <&syscon2>;
687                 };
688         };
689
690         pwrdom: power-domain {
691                 compatible = "sandbox,power-domain";
692                 #power-domain-cells = <1>;
693         };
694
695         power-domain-test {
696                 compatible = "sandbox,power-domain-test";
697                 power-domains = <&pwrdom 2>;
698         };
699
700         pwm: pwm {
701                 compatible = "sandbox,pwm";
702                 #pwm-cells = <2>;
703         };
704
705         pwm2 {
706                 compatible = "sandbox,pwm";
707                 #pwm-cells = <2>;
708         };
709
710         ram {
711                 compatible = "sandbox,ram";
712         };
713
714         reset@0 {
715                 compatible = "sandbox,warm-reset";
716         };
717
718         reset@1 {
719                 compatible = "sandbox,reset";
720         };
721
722         resetc: reset-ctl {
723                 compatible = "sandbox,reset-ctl";
724                 #reset-cells = <1>;
725         };
726
727         reset-ctl-test {
728                 compatible = "sandbox,reset-ctl-test";
729                 resets = <&resetc 100>, <&resetc 2>;
730                 reset-names = "other", "test";
731         };
732
733         rng {
734                 compatible = "sandbox,sandbox-rng";
735         };
736
737         rproc_1: rproc@1 {
738                 compatible = "sandbox,test-processor";
739                 remoteproc-name = "remoteproc-test-dev1";
740         };
741
742         rproc_2: rproc@2 {
743                 compatible = "sandbox,test-processor";
744                 internal-memory-mapped;
745                 remoteproc-name = "remoteproc-test-dev2";
746         };
747
748         panel {
749                 compatible = "simple-panel";
750                 backlight = <&backlight 0 100>;
751         };
752
753         smem@0 {
754                 compatible = "sandbox,smem";
755         };
756
757         sound {
758                 compatible = "sandbox,sound";
759                 cpu {
760                         sound-dai = <&i2s 0>;
761                 };
762
763                 codec {
764                         sound-dai = <&audio 0>;
765                 };
766         };
767
768         spi@0 {
769                 #address-cells = <1>;
770                 #size-cells = <0>;
771                 reg = <0 1>;
772                 compatible = "sandbox,spi";
773                 cs-gpios = <0>, <&gpio_a 0>;
774                 spi.bin@0 {
775                         reg = <0>;
776                         compatible = "spansion,m25p16", "jedec,spi-nor";
777                         spi-max-frequency = <40000000>;
778                         sandbox,filename = "spi.bin";
779                 };
780         };
781
782         syscon0: syscon@0 {
783                 compatible = "sandbox,syscon0";
784                 reg = <0x10 16>;
785         };
786
787         another_system_controller: syscon@1 {
788                 compatible = "sandbox,syscon1";
789                 reg = <0x20 5
790                         0x28 6
791                         0x30 7
792                         0x38 8>;
793         };
794
795         syscon2: syscon@2 {
796                 compatible = "simple-mfd", "syscon";
797                 reg = <0x40 5
798                         0x48 6
799                         0x50 7
800                         0x58 8>;
801         };
802
803         timer {
804                 compatible = "sandbox,timer";
805                 clock-frequency = <1000000>;
806         };
807
808         tpm2 {
809                 compatible = "sandbox,tpm2";
810         };
811
812         uart0: serial {
813                 compatible = "sandbox,serial";
814                 u-boot,dm-pre-reloc;
815         };
816
817         usb_0: usb@0 {
818                 compatible = "sandbox,usb";
819                 status = "disabled";
820                 hub {
821                         compatible = "sandbox,usb-hub";
822                         #address-cells = <1>;
823                         #size-cells = <0>;
824                         flash-stick {
825                                 reg = <0>;
826                                 compatible = "sandbox,usb-flash";
827                         };
828                 };
829         };
830
831         usb_1: usb@1 {
832                 compatible = "sandbox,usb";
833                 hub {
834                         compatible = "usb-hub";
835                         usb,device-class = <9>;
836                         #address-cells = <1>;
837                         #size-cells = <0>;
838                         hub-emul {
839                                 compatible = "sandbox,usb-hub";
840                                 #address-cells = <1>;
841                                 #size-cells = <0>;
842                                 flash-stick@0 {
843                                         reg = <0>;
844                                         compatible = "sandbox,usb-flash";
845                                         sandbox,filepath = "testflash.bin";
846                                 };
847
848                                 flash-stick@1 {
849                                         reg = <1>;
850                                         compatible = "sandbox,usb-flash";
851                                         sandbox,filepath = "testflash1.bin";
852                                 };
853
854                                 flash-stick@2 {
855                                         reg = <2>;
856                                         compatible = "sandbox,usb-flash";
857                                         sandbox,filepath = "testflash2.bin";
858                                 };
859
860                                 keyb@3 {
861                                         reg = <3>;
862                                         compatible = "sandbox,usb-keyb";
863                                 };
864
865                         };
866
867                         usbstor@1 {
868                                 reg = <1>;
869                         };
870                         usbstor@3 {
871                                 reg = <3>;
872                         };
873                 };
874         };
875
876         usb_2: usb@2 {
877                 compatible = "sandbox,usb";
878                 status = "disabled";
879         };
880
881         spmi: spmi@0 {
882                 compatible = "sandbox,spmi";
883                 #address-cells = <0x1>;
884                 #size-cells = <0x1>;
885                 ranges;
886                 pm8916@0 {
887                         compatible = "qcom,spmi-pmic";
888                         reg = <0x0 0x1>;
889                         #address-cells = <0x1>;
890                         #size-cells = <0x1>;
891                         ranges;
892
893                         spmi_gpios: gpios@c000 {
894                                 compatible = "qcom,pm8916-gpio";
895                                 reg = <0xc000 0x400>;
896                                 gpio-controller;
897                                 gpio-count = <4>;
898                                 #gpio-cells = <2>;
899                                 gpio-bank-name="spmi";
900                         };
901                 };
902         };
903
904         wdt0: wdt@0 {
905                 compatible = "sandbox,wdt";
906         };
907
908         axi: axi@0 {
909                 compatible = "sandbox,axi";
910                 #address-cells = <0x1>;
911                 #size-cells = <0x1>;
912                 store@0 {
913                         compatible = "sandbox,sandbox_store";
914                         reg = <0x0 0x400>;
915                 };
916         };
917
918         chosen {
919                 #address-cells = <1>;
920                 #size-cells = <1>;
921                 setting = "sunrise ohoka";
922                 other-node = "/some-bus/c-test@5";
923                 int-values = <0x1937 72993>;
924                 chosen-test {
925                         compatible = "denx,u-boot-fdt-test";
926                         reg = <9 1>;
927                 };
928         };
929
930         translation-test@8000 {
931                 compatible = "simple-bus";
932                 reg = <0x8000 0x4000>;
933
934                 #address-cells = <0x2>;
935                 #size-cells = <0x1>;
936
937                 ranges = <0 0x0 0x8000 0x1000
938                           1 0x100 0x9000 0x1000
939                           2 0x200 0xA000 0x1000
940                           3 0x300 0xB000 0x1000
941                          >;
942
943                 dma-ranges = <0 0x000 0x10000000 0x1000
944                               1 0x100 0x20000000 0x1000
945                              >;
946
947                 dev@0,0 {
948                         compatible = "denx,u-boot-fdt-dummy";
949                         reg = <0 0x0 0x1000>;
950                         reg-names = "sandbox-dummy-0";
951                 };
952
953                 dev@1,100 {
954                         compatible = "denx,u-boot-fdt-dummy";
955                         reg = <1 0x100 0x1000>;
956
957                 };
958
959                 dev@2,200 {
960                         compatible = "denx,u-boot-fdt-dummy";
961                         reg = <2 0x200 0x1000>;
962                 };
963
964
965                 noxlatebus@3,300 {
966                         compatible = "simple-bus";
967                         reg = <3 0x300 0x1000>;
968
969                         #address-cells = <0x1>;
970                         #size-cells = <0x0>;
971
972                         dev@42 {
973                                 compatible = "denx,u-boot-fdt-dummy";
974                                 reg = <0x42>;
975                         };
976                 };
977         };
978
979         osd {
980                 compatible = "sandbox,sandbox_osd";
981         };
982
983         board {
984                 compatible = "sandbox,board_sandbox";
985         };
986
987         sandbox_tee {
988                 compatible = "sandbox,tee";
989         };
990
991         sandbox_virtio1 {
992                 compatible = "sandbox,virtio1";
993         };
994
995         sandbox_virtio2 {
996                 compatible = "sandbox,virtio2";
997         };
998
999         pinctrl {
1000                 compatible = "sandbox,pinctrl";
1001
1002                 pinctrl-names = "default";
1003                 pinctrl-0 = <&gpios>;
1004
1005                 gpios: gpios {
1006                         gpio0 {
1007                                 pins = "GPIO0";
1008                                 bias-pull-up;
1009                                 input-disable;
1010                         };
1011                         gpio1 {
1012                                 pins = "GPIO1";
1013                                 output-high;
1014                                 drive-open-drain;
1015                         };
1016                         gpio2 {
1017                                 pins = "GPIO2";
1018                                 bias-pull-down;
1019                                 input-enable;
1020                         };
1021                         gpio3 {
1022                                 pins = "GPIO3";
1023                                 bias-disable;
1024                         };
1025                 };
1026         };
1027
1028         hwspinlock@0 {
1029                 compatible = "sandbox,hwspinlock";
1030         };
1031
1032         dma: dma {
1033                 compatible = "sandbox,dma";
1034                 #dma-cells = <1>;
1035
1036                 dmas = <&dma 0>, <&dma 1>, <&dma 2>;
1037                 dma-names = "m2m", "tx0", "rx0";
1038         };
1039
1040         /*
1041          * keep mdio-mux ahead of mdio so that the mux is removed first at the
1042          * end of the test.  If parent mdio is removed first, clean-up of the
1043          * mux will trigger a 2nd probe of parent-mdio, leaving parent-mdio
1044          * active at the end of the test.  That it turn doesn't allow the mdio
1045          * class to be destroyed, triggering an error.
1046          */
1047         mdio-mux-test {
1048                 compatible = "sandbox,mdio-mux";
1049                 #address-cells = <1>;
1050                 #size-cells = <0>;
1051                 mdio-parent-bus = <&mdio>;
1052
1053                 mdio-ch-test@0 {
1054                         reg = <0>;
1055                 };
1056                 mdio-ch-test@1 {
1057                         reg = <1>;
1058                 };
1059         };
1060
1061         mdio: mdio-test {
1062                 compatible = "sandbox,mdio";
1063         };
1064
1065         pm-bus-test {
1066                 compatible = "simple-pm-bus";
1067                 clocks = <&clk_sandbox 4>;
1068                 power-domains = <&pwrdom 1>;
1069         };
1070
1071         resetc2: syscon-reset {
1072                 compatible = "syscon-reset";
1073                 #reset-cells = <1>;
1074                 regmap = <&syscon0>;
1075                 offset = <1>;
1076                 mask = <0x27FFFFFF>;
1077                 assert-high = <0>;
1078         };
1079
1080         syscon-reset-test {
1081                 compatible = "sandbox,misc_sandbox";
1082                 resets = <&resetc2 15>, <&resetc2 30>, <&resetc2 60>;
1083                 reset-names = "valid", "no_mask", "out_of_range";
1084         };
1085 };
1086
1087 #include "sandbox_pmic.dtsi"