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