]> Git Repo - u-boot.git/blob - arch/sandbox/dts/sandbox.dtsi
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
[u-boot.git] / arch / sandbox / dts / sandbox.dtsi
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * This is the common sandbox device-tree nodes. This is shared between sandbox
4  * and sandbox64 builds.
5  */
6
7 #include <config.h>
8 #include <dt-bindings/input/input.h>
9
10 #define USB_CLASS_HUB                   9
11
12 / {
13         reserved-memory {
14                 #address-cells = <1>;
15                 #size-cells = <1>;
16                 ranges;
17
18                 event_log: tcg_event_log {
19                         no-map;
20                         reg = <(CFG_SYS_SDRAM_SIZE - 0x2000) 0x2000>;
21                 };
22         };
23
24         binman {
25         };
26
27         chosen {
28                 stdout-path = "/serial";
29         };
30
31         alarm_wdt: alarm-wdt {
32                 compatible = "sandbox,alarm-wdt";
33                 timeout-sec = <5>;
34                 u-boot,autostart;
35         };
36
37         audio: audio-codec {
38                 compatible = "sandbox,audio-codec";
39                 #sound-dai-cells = <1>;
40         };
41
42         bootstd {
43                 compatible = "u-boot,boot-std";
44                 filename-prefixes = "./";
45
46                 cedit-theme {
47                         font-size = <30>;
48                         menu-inset = <3>;
49                         menuitem-gap-y = <1>;
50                 };
51         };
52
53         buttons {
54                 compatible = "gpio-keys";
55
56                 btn1 {
57                         gpios = <&gpio_a 3 0>;
58                         label = "button1";
59                     linux,code = <BTN_1>;
60                 };
61
62                 btn2 {
63                         gpios = <&gpio_a 4 0>;
64                         label = "button2";
65                     linux,code = <BTN_2>;
66                 };
67         };
68
69         clk_fixed: clk-fixed {
70                 bootph-all;
71                 compatible = "sandbox,fixed-clock";
72                 #clock-cells = <0>;
73                 clock-frequency = <1234>;
74         };
75
76         clk_sandbox: clk-sbox {
77                 bootph-all;
78                 compatible = "sandbox,clk";
79                 #clock-cells = <1>;
80                 assigned-clocks = <&clk_sandbox 3>;
81                 assigned-clock-rates = <321>;
82         };
83
84         clk-test {
85                 bootph-all;
86                 compatible = "sandbox,clk-test";
87                 clocks = <&clk_fixed>,
88                          <&clk_sandbox 1>,
89                          <&clk_sandbox 0>,
90                          <&clk_sandbox 3>,
91                          <&clk_sandbox 2>;
92                 clock-names = "fixed", "i2c", "spi", "uart2", "uart1";
93         };
94
95         gpio_a: gpios@0 {
96                 bootph-some-ram;
97                 gpio-controller;
98                 compatible = "sandbox,gpio";
99                 #gpio-cells = <1>;
100                 gpio-bank-name = "a";
101                 sandbox,gpio-count = <20>;
102         };
103
104         gpio_b: gpios@1 {
105                 bootph-pre-ram;
106                 gpio-controller;
107                 compatible = "sandbox,gpio";
108                 #gpio-cells = <2>;
109                 gpio-bank-name = "b";
110                 sandbox,gpio-count = <10>;
111         };
112
113         gpio-test {
114                 bootph-pre-ram;
115                 compatible = "sandbox,gpio-test";
116                 test-gpios = <&gpio_b 3 0>;
117         };
118
119         hexagon {
120                 compatible = "demo-simple";
121                 colour = "white";
122                 sides = <6>;
123         };
124
125         i2c_0: i2c@0 {
126                 eeprom@2c {
127                         reg = <0x2c>;
128                         compatible = "i2c-eeprom";
129                         sandbox,emul = <&emul_eeprom>;
130                 };
131
132                 rtc_0: rtc@43 {
133                         reg = <0x43>;
134                         compatible = "sandbox-rtc";
135                         sandbox,emul = <&emul0>;
136                         bootph-pre-ram;
137                 };
138                 sandbox_pmic: sandbox_pmic {
139                         reg = <0x40>;
140                 };
141
142                 mc34708: pmic@41 {
143                         reg = <0x41>;
144                 };
145
146                 i2c_emul: emul {
147                         bootph-pre-ram;
148                         reg = <0xff>;
149                         compatible = "sandbox,i2c-emul-parent";
150                         emul_eeprom: emul-eeprom {
151                                 compatible = "sandbox,i2c-eeprom";
152                                 sandbox,filename = "i2c.bin";
153                                 sandbox,size = <256>;
154                                 #emul-cells = <0>;
155                         };
156                         emul0: emul0 {
157                                 bootph-pre-ram;
158                                 compatible = "sandbox,i2c-rtc-emul";
159                                 #emul-cells = <0>;
160                         };
161                 };
162         };
163
164         i2s: i2s {
165                 compatible = "sandbox,i2s";
166                 #sound-dai-cells = <1>;
167         };
168
169         irq_sandbox: irq-sbox {
170                 bootph-pre-ram;
171                 compatible = "sandbox,irq";
172                 interrupt-controller;
173                 #interrupt-cells = <2>;
174         };
175
176         irq-test {
177                 bootph-pre-ram;
178                 compatible = "sandbox,irq-test";
179                 interrupts-extended = <&irq_sandbox 3 0>;
180         };
181
182         lcd {
183                 bootph-some-ram;
184                 compatible = "sandbox,lcd-sdl";
185                 xres = <1366>;
186                 yres = <768>;
187                 log2-depth = <5>;
188         };
189
190         leds {
191                 compatible = "gpio-leds";
192
193                 iracibble {
194                         gpios = <&gpio_a 1 0>;
195                         label = "sandbox:red";
196                 };
197
198                 martinet {
199                         gpios = <&gpio_a 2 0>;
200                         label = "sandbox:green";
201                 };
202         };
203
204         pci@0 {
205                 pci@1e,0 {
206                         compatible = "sandbox,pmc";
207                         reg = <0xf000 0 0 0 0>;
208                         sandbox,emul = <&pmc_emul>;
209                         gpe0-dwx-mask = <0xf>;
210                         gpe0-dwx-shift-base = <4>;
211                         gpe0-dw = <6 7 9>;
212                         gpe0-sts = <0x20>;
213                         gpe0-en = <0x30>;
214                 };
215
216                 pci@1f,0 {
217                         compatible = "pci-generic";
218                         reg = <0xf800 0 0 0 0>;
219                         sandbox,emul = <&swap_case_emul>;
220                 };
221         };
222
223         emul {
224                 compatible = "sandbox,pci-emul-parent";
225                 pmc_emul: emul@1e,0 {
226                         compatible = "sandbox,pmc-emul";
227                 };
228                 swap_case_emul: emul@1f,0 {
229                         compatible = "sandbox,swap-case";
230                 };
231         };
232
233         pinctrl {
234                 bootph-some-ram;
235                 compatible = "sandbox,pinctrl";
236                 status = "okay";
237
238                 pinctrl_i2c0: i2c0 {
239                         groups = "I2C_UART";
240                         function = "I2C";
241                         bias-pull-up;
242                 };
243
244                 pinctrl_serial0: uart0 {
245                         bootph-some-ram;
246                         groups = "I2C_UART";
247                         function = "UART";
248                 };
249
250                 pinctrl_onewire0: onewire0 {
251                         pins = "P8";
252                         function = "ONEWIRE";
253                         bias-pull-up;
254                 };
255         };
256
257         reset@1 {
258                 compatible = "sandbox,reset";
259                 bootph-some-ram;
260         };
261
262         rng {
263                 compatible = "sandbox,sandbox-rng";
264         };
265
266         scsi {
267                 compatible = "sandbox,scsi";
268         };
269
270         sound {
271                 compatible = "sandbox,sound";
272                 cpu {
273                         sound-dai = <&i2s 0>;
274                 };
275
276                 codec {
277                         sound-dai = <&audio 0>;
278                 };
279         };
280
281         spi@0 {
282                 firmware_storage_spi: flash@0 {
283                         bootph-some-ram;
284                         reg = <0>;
285                         compatible = "spansion,m25p16", "jedec,spi-nor";
286                         spi-max-frequency = <40000000>;
287                         sandbox,filename = "spi.bin";
288                 };
289         };
290
291         spl-test {
292                 bootph-pre-ram;
293                 compatible = "sandbox,spl-test";
294                 boolval;
295                 intval = <1>;
296                 intarray = <2 3 4>;
297                 maybe-empty-int = <>;
298                 byteval = [05];
299                 bytearray = [06];
300                 longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
301                 stringval = "message";
302                 stringarray = "multi-word", "message";
303         };
304
305         spl-test2 {
306                 bootph-pre-ram;
307                 compatible = "sandbox,spl-test";
308                 intval = <3>;
309                 intarray = <5>;
310                 byteval = [08];
311                 bytearray = [01 23 34];
312                 longbytearray = [09 0a 0b 0c];
313                 stringval = "message2";
314                 stringarray = "another", "multi-word", "message";
315         };
316
317         spl-test3 {
318                 bootph-pre-ram;
319                 compatible = "sandbox,spl-test";
320                 stringarray = "one";
321                 maybe-empty-int = <1>;
322         };
323
324         spl-test5 {
325                 bootph-verify;
326                 compatible = "sandbox,spl-test";
327                 stringarray = "tpl";
328         };
329
330         spl-test6 {
331                 bootph-some-ram;
332                 compatible = "sandbox,spl-test";
333                 stringarray = "pre-proper";
334         };
335
336         spl-test7 {
337                 bootph-pre-ram;
338                 compatible = "sandbox,spl-test";
339                 stringarray = "spl";
340         };
341
342         square {
343                 compatible = "demo-shape";
344                 colour = "blue";
345                 sides = <4>;
346         };
347
348         timer {
349                 compatible = "sandbox,timer";
350                 clock-frequency = <1000000>;
351         };
352
353         tpm {
354                 compatible = "google,sandbox-tpm";
355         };
356
357         tpm2 {
358                 compatible = "sandbox,tpm2";
359                 memory-region = <&event_log>;
360         };
361
362         triangle {
363                 compatible = "demo-shape";
364                 colour = "cyan";
365                 sides = <3>;
366                 character = <83>;
367                 light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
368         };
369
370         /* Needs to be available prior to relocation */
371         uart0: serial {
372                 bootph-pre-ram;
373                 bootph-pre-sram;
374                 bootph-verify;
375                 compatible = "sandbox,serial";
376                 sandbox,text-colour = "cyan";
377                 pinctrl-names = "default";
378                 pinctrl-0 = <&pinctrl_serial0>;
379         };
380
381         usb@0 {
382                 compatible = "sandbox,usb";
383                 status = "disabled";
384                 hub {
385                         compatible = "sandbox,usb-hub";
386                         #address-cells = <1>;
387                         #size-cells = <0>;
388                         flash-stick {
389                                 reg = <0>;
390                                 compatible = "sandbox,usb-flash";
391                         };
392                 };
393         };
394
395         usb@1 {
396                 compatible = "sandbox,usb";
397                 hub {
398                         compatible = "usb-hub";
399                         usb,device-class = <USB_CLASS_HUB>;
400                         hub-emul {
401                                 compatible = "sandbox,usb-hub";
402                                 #address-cells = <1>;
403                                 #size-cells = <0>;
404                                 flash-stick {
405                                         reg = <0>;
406                                         compatible = "sandbox,usb-flash";
407                                         sandbox,filepath = "flash.bin";
408                                 };
409                         };
410                 };
411         };
412
413         usb@2 {
414                 compatible = "sandbox,usb";
415                 status = "disabled";
416         };
417
418         spmi: spmi@0 {
419                 compatible = "sandbox,spmi";
420                 #address-cells = <0x1>;
421                 #size-cells = <0x1>;
422                 pm8916@0 {
423                         compatible = "qcom,spmi-pmic";
424                         reg = <0x0 0x0>;
425                         #address-cells = <0x1>;
426                         #size-cells = <0x0>;
427
428                         spmi_gpios: gpios@c000 {
429                                 compatible = "qcom,pm8916-gpio";
430                                 reg = <0xc000>;
431                                 gpio-controller;
432                                 gpio-ranges = <&spmi_gpios 0 0 4>;
433                                 #gpio-cells = <2>;
434                         };
435                 };
436         };
437
438         axi: axi@0 {
439                 compatible = "sandbox,axi";
440                 #address-cells = <0x1>;
441                 #size-cells = <0x1>;
442                 store@0 {
443                         compatible = "sandbox,sandbox_store";
444                         reg = <0x0 0x400>;
445                 };
446         };
447
448         onewire0: onewire {
449                 compatible = "w1-gpio";
450                 gpios = <&gpio_a 8>;
451                 pinctrl-names = "default";
452                 pinctrl-0 = <&pinctrl_onewire0>;
453                 status = "okay";
454
455                 sandbox_eeprom0: sandbox_eeprom@0 {
456                         compatible = "sandbox,w1-eeprom";
457                         status = "okay";
458                 };
459         };
460
461         sandbox_tee {
462                 compatible = "sandbox,tee";
463         };
464
465         thermal {
466                 compatible = "sandbox,thermal";
467         };
468
469         arm-ffa-emul {
470                 compatible = "sandbox,arm-ffa-emul";
471
472                 sandbox-arm-ffa {
473                                 compatible = "sandbox,arm-ffa";
474                 };
475         };
476
477 };
478
479 &cros_ec {
480         /*
481          * This describes the flash memory within the EC. Note
482          * that the STM32L flash erases to 0, not 0xff.
483          */
484         flash {
485                 image-pos = <0x08000000>;
486                 size = <0x20000>;
487                 erase-value = <0>;
488
489                 /* Information for sandbox */
490                 ro {
491                         image-pos = <0>;
492                         size = <0xf000>;
493                 };
494                 wp-ro {
495                         image-pos = <0xf000>;
496                         size = <0x1000>;
497                 };
498                 rw {
499                         image-pos = <0x10000>;
500                         size = <0x10000>;
501                 };
502         };
503
504         keyboard-controller {
505                 bootph-some-ram;
506         };
507 };
This page took 0.061894 seconds and 4 git commands to generate.