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