blob: 2fb365d86e89b41ff6f0a1a0abe392e165c6de5e [file] [log] [blame]
Simon Glass28db4692019-05-18 11:59:41 -06001/*
2 * This is the common sandbox device-tree nodes. This is shared between sandbox
3 * and sandbox64 builds.
4 */
5
6#define USB_CLASS_HUB 9
7
8/ {
9 chosen {
10 stdout-path = "/serial";
11 };
12
13 audio: audio-codec {
14 compatible = "sandbox,audio-codec";
15 #sound-dai-cells = <1>;
16 };
17
18 gpio_a: gpios@0 {
19 u-boot,dm-pre-reloc;
20 gpio-controller;
21 compatible = "sandbox,gpio";
22 #gpio-cells = <1>;
23 gpio-bank-name = "a";
24 sandbox,gpio-count = <20>;
25 };
26
27 gpio_b: gpios@1 {
28 u-boot,dm-pre-reloc;
29 gpio-controller;
30 compatible = "sandbox,gpio";
31 #gpio-cells = <2>;
32 gpio-bank-name = "b";
33 sandbox,gpio-count = <10>;
34 };
35
36 hexagon {
37 compatible = "demo-simple";
38 colour = "white";
39 sides = <6>;
40 };
41
42 i2c_0: i2c@0 {
43 eeprom@2c {
44 reg = <0x2c>;
45 compatible = "i2c-eeprom";
46 sandbox,emul = <&emul_eeprom>;
47 };
48
49 rtc_0: rtc@43 {
50 reg = <0x43>;
51 compatible = "sandbox-rtc";
52 sandbox,emul = <&emul0>;
53 };
54 sandbox_pmic: sandbox_pmic {
55 reg = <0x40>;
56 };
57
58 mc34708: pmic@41 {
59 reg = <0x41>;
60 };
61
62 i2c_emul: emul {
63 reg = <0xff>;
64 compatible = "sandbox,i2c-emul-parent";
65 emul_eeprom: emul-eeprom {
66 compatible = "sandbox,i2c-eeprom";
67 sandbox,filename = "i2c.bin";
68 sandbox,size = <256>;
69 };
70 emul0: emul0 {
71 compatible = "sandbox,i2c-rtc";
72 };
73 };
74 };
75
76 i2s: i2s {
77 compatible = "sandbox,i2s";
78 #sound-dai-cells = <1>;
79 };
80
81 lcd {
82 u-boot,dm-pre-reloc;
83 compatible = "sandbox,lcd-sdl";
84 xres = <1366>;
85 yres = <768>;
86 };
87
88 leds {
89 compatible = "gpio-leds";
90
91 iracibble {
92 gpios = <&gpio_a 1 0>;
93 label = "sandbox:red";
94 };
95
96 martinet {
97 gpios = <&gpio_a 2 0>;
98 label = "sandbox:green";
99 };
100 };
101
102 pci-controller {
103 pci@1f,0 {
104 compatible = "pci-generic";
105 reg = <0xf800 0 0 0 0>;
106 emul@1f,0 {
107 compatible = "sandbox,swap-case";
108 };
109 };
110 };
111
112 pinctrl {
113 compatible = "sandbox,pinctrl";
114 status = "okay";
115
116 pinctrl_i2c0: i2c0 {
117 groups = "i2c";
118 function = "i2c";
119 bias-pull-up;
120 };
121
122 pinctrl_serial0: uart0 {
123 groups = "serial_a";
124 function = "serial";
125 };
126
127 pinctrl_onewire0: onewire0 {
128 groups = "w1";
129 function = "w1";
130 bias-pull-up;
131 };
132 };
133
134 reset@1 {
135 compatible = "sandbox,reset";
136 };
137
138 sound {
139 compatible = "sandbox,sound";
140 cpu {
141 sound-dai = <&i2s 0>;
142 };
143
144 codec {
145 sound-dai = <&audio 0>;
146 };
147 };
148
149 spi@0 {
150 firmware_storage_spi: flash@0 {
151 u-boot,dm-pre-reloc;
152 reg = <0>;
Simon Glass7e368682019-05-18 11:59:49 -0600153 compatible = "spansion,m25p16", "jedec,spi-nor";
Simon Glass28db4692019-05-18 11:59:41 -0600154 spi-max-frequency = <40000000>;
155 sandbox,filename = "spi.bin";
156 };
157 };
158
159 spl-test {
160 u-boot,dm-pre-reloc;
161 compatible = "sandbox,spl-test";
162 boolval;
163 intval = <1>;
164 intarray = <2 3 4>;
165 byteval = [05];
166 bytearray = [06];
167 longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
168 stringval = "message";
169 stringarray = "multi-word", "message";
170 };
171
172 spl-test2 {
173 u-boot,dm-pre-reloc;
174 compatible = "sandbox,spl-test";
175 intval = <3>;
176 intarray = <5>;
177 byteval = [08];
178 bytearray = [01 23 34];
179 longbytearray = [09 0a 0b 0c];
180 stringval = "message2";
181 stringarray = "another", "multi-word", "message";
182 };
183
184 spl-test3 {
185 u-boot,dm-pre-reloc;
186 compatible = "sandbox,spl-test";
187 stringarray = "one";
188 };
189
190 spl-test4 {
191 u-boot,dm-pre-reloc;
192 compatible = "sandbox,spl-test.2";
193 };
194
195 square {
196 compatible = "demo-shape";
197 colour = "blue";
198 sides = <4>;
199 };
200
201 timer {
202 compatible = "sandbox,timer";
203 clock-frequency = <1000000>;
204 };
205
206 tpm {
207 u-boot,dm-pre-reloc;
208 compatible = "google,sandbox-tpm";
209 };
210
211 tpm2 {
212 compatible = "sandbox,tpm2";
213 };
214
215 triangle {
216 compatible = "demo-shape";
217 colour = "cyan";
218 sides = <3>;
219 character = <83>;
220 light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
221 };
222
223 /* Needs to be available prior to relocation */
224 uart0: serial {
225 u-boot,dm-spl;
226 compatible = "sandbox,serial";
227 sandbox,text-colour = "cyan";
228 pinctrl-names = "default";
229 pinctrl-0 = <&pinctrl_serial0>;
230 };
231
232 usb@0 {
233 compatible = "sandbox,usb";
234 status = "disabled";
235 hub {
236 compatible = "sandbox,usb-hub";
237 #address-cells = <1>;
238 #size-cells = <0>;
239 flash-stick {
240 reg = <0>;
241 compatible = "sandbox,usb-flash";
242 };
243 };
244 };
245
246 usb@1 {
247 compatible = "sandbox,usb";
248 hub {
249 compatible = "usb-hub";
250 usb,device-class = <USB_CLASS_HUB>;
251 hub-emul {
252 compatible = "sandbox,usb-hub";
253 #address-cells = <1>;
254 #size-cells = <0>;
255 flash-stick {
256 reg = <0>;
257 compatible = "sandbox,usb-flash";
258 sandbox,filepath = "flash.bin";
259 };
260 };
261 };
262 };
263
264 usb@2 {
265 compatible = "sandbox,usb";
266 status = "disabled";
267 };
268
269 spmi: spmi@0 {
270 compatible = "sandbox,spmi";
271 #address-cells = <0x1>;
272 #size-cells = <0x1>;
273 pm8916@0 {
274 compatible = "qcom,spmi-pmic";
275 reg = <0x0 0x1>;
276 #address-cells = <0x1>;
277 #size-cells = <0x1>;
278
279 spmi_gpios: gpios@c000 {
280 compatible = "qcom,pm8916-gpio";
281 reg = <0xc000 0x400>;
282 gpio-controller;
283 gpio-count = <4>;
284 #gpio-cells = <2>;
285 gpio-bank-name="spmi";
286 };
287 };
288 };
289
290 axi: axi@0 {
291 compatible = "sandbox,axi";
292 #address-cells = <0x1>;
293 #size-cells = <0x1>;
294 store@0 {
295 compatible = "sandbox,sandbox_store";
296 reg = <0x0 0x400>;
297 };
298 };
299
300 onewire0: onewire {
301 compatible = "w1-gpio";
302 gpios = <&gpio_a 8>;
303 pinctrl-names = "default";
304 pinctrl-0 = <&pinctrl_onewire0>;
305 status = "okay";
306
307 sandbox_eeprom0: sandbox_eeprom@0 {
308 compatible = "sandbox,w1-eeprom";
309 status = "okay";
310 };
311 };
312
313 sandbox_tee {
314 compatible = "sandbox,tee";
315 };
316};
317
318&cros_ec {
319 /*
320 * This describes the flash memory within the EC. Note
321 * that the STM32L flash erases to 0, not 0xff.
322 */
323 flash {
324 image-pos = <0x08000000>;
325 size = <0x20000>;
326 erase-value = <0>;
327
328 /* Information for sandbox */
329 ro {
330 image-pos = <0>;
331 size = <0xf000>;
332 };
333 wp-ro {
334 image-pos = <0xf000>;
335 size = <0x1000>;
336 };
337 rw {
338 image-pos = <0x10000>;
339 size = <0x10000>;
340 };
341 };
342
343 keyboard-controller {
344 u-boot,dm-pre-reloc;
345 };
346};