Merge git://git.denx.de/u-boot-dm
[platform/kernel/u-boot.git] / arch / sandbox / dts / sandbox.dts
1 /dts-v1/;
2
3 #define USB_CLASS_HUB                   9
4
5 / {
6         #address-cells = <1>;
7         #size-cells = <1>;
8
9         aliases {
10                 eth5 = "/eth@90000000";
11                 i2c0 = &i2c_0;
12                 pci0 = &pci;
13                 rtc0 = &rtc_0;
14         };
15
16         chosen {
17                 stdout-path = "/serial";
18         };
19
20         /* Needs to be available prior to relocation */
21         uart0: serial {
22                 compatible = "sandbox,serial";
23                 sandbox,text-colour = "cyan";
24         };
25
26         triangle {
27                 compatible = "demo-shape";
28                 colour = "cyan";
29                 sides = <3>;
30                 character = <83>;
31                 light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
32         };
33         square {
34                 compatible = "demo-shape";
35                 colour = "blue";
36                 sides = <4>;
37         };
38         hexagon {
39                 compatible = "demo-simple";
40                 colour = "white";
41                 sides = <6>;
42         };
43
44         cros_ec: cros-ec@0 {
45                 reg = <0 0>;
46                 compatible = "google,cros-ec-sandbox";
47
48                 /*
49                  * This describes the flash memory within the EC. Note
50                  * that the STM32L flash erases to 0, not 0xff.
51                  */
52                 #address-cells = <1>;
53                 #size-cells = <1>;
54                 flash@8000000 {
55                         reg = <0x08000000 0x20000>;
56                         erase-value = <0>;
57                         #address-cells = <1>;
58                         #size-cells = <1>;
59
60                         /* Information for sandbox */
61                         ro {
62                                 reg = <0 0xf000>;
63                         };
64                         wp-ro {
65                                 reg = <0xf000 0x1000>;
66                         };
67                         rw {
68                                 reg = <0x10000 0x10000>;
69                         };
70                 };
71         };
72
73         lcd {
74                 compatible = "sandbox,lcd-sdl";
75                 xres = <800>;
76                 yres = <600>;
77         };
78
79         gpio_a: gpios@0 {
80                 gpio-controller;
81                 compatible = "sandbox,gpio";
82                 #gpio-cells = <1>;
83                 gpio-bank-name = "a";
84                 num-gpios = <20>;
85         };
86
87         gpio_b: gpios@1 {
88                 gpio-controller;
89                 compatible = "sandbox,gpio";
90                 #gpio-cells = <2>;
91                 gpio-bank-name = "b";
92                 num-gpios = <10>;
93         };
94
95         i2c_0: i2c@0 {
96                 #address-cells = <1>;
97                 #size-cells = <0>;
98                 reg = <0 0>;
99                 compatible = "sandbox,i2c";
100                 clock-frequency = <400000>;
101                 eeprom@2c {
102                         reg = <0x2c>;
103                         compatible = "i2c-eeprom";
104                         emul {
105                                 compatible = "sandbox,i2c-eeprom";
106                                 sandbox,filename = "i2c.bin";
107                                 sandbox,size = <128>;
108                         };
109                 };
110
111                 rtc_0: rtc@43 {
112                         reg = <0x43>;
113                         compatible = "sandbox-rtc";
114                         emul {
115                                 compatible = "sandbox,i2c-rtc";
116                         };
117                 };
118         };
119
120         spi@0 {
121                 #address-cells = <1>;
122                 #size-cells = <0>;
123                 reg = <0 0>;
124                 compatible = "sandbox,spi";
125                 cs-gpios = <0>, <&gpio_a 0>;
126                 firmware_storage_spi: flash@0 {
127                         reg = <0>;
128                         compatible = "spansion,m25p16", "sandbox,spi-flash";
129                         spi-max-frequency = <40000000>;
130                         sandbox,filename = "spi.bin";
131                 };
132         };
133
134         pci: pci-controller {
135                 compatible = "sandbox,pci";
136                 device_type = "pci";
137                 #address-cells = <3>;
138                 #size-cells = <2>;
139                 ranges = <0x02000000 0 0x10000000 0x10000000 0 0x2000
140                                 0x01000000 0 0x20000000 0x20000000 0 0x2000>;
141                 pci@1f,0 {
142                         compatible = "pci-generic";
143                         reg = <0xf800 0 0 0 0>;
144                         emul@1f,0 {
145                                 compatible = "sandbox,swap-case";
146                         };
147                 };
148         };
149
150         eth@10002000 {
151                 compatible = "sandbox,eth";
152                 reg = <0x10002000 0x1000>;
153                 fake-host-hwaddr = [00 00 66 44 22 00];
154         };
155
156         eth@80000000 {
157                 compatible = "sandbox,eth-raw";
158                 reg = <0x80000000 0x1000>;
159                 host-raw-interface = "eth0";
160         };
161
162         eth@90000000 {
163                 compatible = "sandbox,eth-raw";
164                 reg = <0x90000000 0x1000>;
165                 host-raw-interface = "lo";
166         };
167
168         usb@0 {
169                 compatible = "sandbox,usb";
170                 status = "disabled";
171                 hub {
172                         compatible = "sandbox,usb-hub";
173                         #address-cells = <1>;
174                         #size-cells = <0>;
175                         flash-stick {
176                                 reg = <0>;
177                                 compatible = "sandbox,usb-flash";
178                         };
179                 };
180         };
181
182         usb@1 {
183                 compatible = "sandbox,usb";
184                 hub {
185                         compatible = "usb-hub";
186                         usb,device-class = <USB_CLASS_HUB>;
187                         hub-emul {
188                                 compatible = "sandbox,usb-hub";
189                                 #address-cells = <1>;
190                                 #size-cells = <0>;
191                                 flash-stick {
192                                         reg = <0>;
193                                         compatible = "sandbox,usb-flash";
194                                         sandbox,filepath = "flash.bin";
195                                 };
196                         };
197                 };
198         };
199
200         usb@2 {
201                 compatible = "sandbox,usb";
202                 status = "disabled";
203         };
204
205 };
206
207 #include "cros-ec-keyboard.dtsi"