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