xref: /openbmc/u-boot/arch/sandbox/dts/sandbox.dts (revision 224f7452)
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		};
104
105		rtc_0: rtc@43 {
106			reg = <0x43>;
107			compatible = "sandbox-rtc";
108		};
109		sandbox_pmic: sandbox_pmic {
110			reg = <0x40>;
111		};
112
113		mc34708: pmic@41 {
114			reg = <0x41>;
115		};
116
117		i2c_emul: emul {
118			#address-cells = <1>;
119			#size-cells = <0>;
120			reg = <0xff>;
121			compatible = "sandbox,i2c-emul-parent";
122			emul-eeprom {
123				reg = <0x2c>;
124				compatible = "sandbox,i2c-eeprom";
125				sandbox,filename = "i2c.bin";
126				sandbox,size = <256>;
127			};
128			emul0 {
129				reg = <0x43>;
130				compatible = "sandbox,i2c-rtc";
131			};
132		};
133	};
134
135	i2s: i2s {
136		compatible = "sandbox,i2s";
137		#sound-dai-cells = <1>;
138	};
139
140	lcd {
141		u-boot,dm-pre-reloc;
142		compatible = "sandbox,lcd-sdl";
143		xres = <1366>;
144		yres = <768>;
145	};
146
147	leds {
148		compatible = "gpio-leds";
149
150		iracibble {
151			gpios = <&gpio_a 1 0>;
152			label = "sandbox:red";
153		};
154
155		martinet {
156			gpios = <&gpio_a 2 0>;
157			label = "sandbox:green";
158		};
159	};
160
161	pci: pci-controller {
162		compatible = "sandbox,pci";
163		device_type = "pci";
164		#address-cells = <3>;
165		#size-cells = <2>;
166		ranges = <0x02000000 0 0x10000000 0x10000000 0 0x2000
167				0x01000000 0 0x20000000 0x20000000 0 0x2000>;
168		pci@1f,0 {
169			compatible = "pci-generic";
170			reg = <0xf800 0 0 0 0>;
171			emul@1f,0 {
172				compatible = "sandbox,swap-case";
173			};
174		};
175	};
176
177	pinctrl {
178		compatible = "sandbox,pinctrl";
179		status = "okay";
180
181		pinctrl_i2c0: i2c0 {
182			groups = "i2c";
183			function = "i2c";
184			bias-pull-up;
185		};
186
187		pinctrl_serial0: uart0 {
188			groups = "serial_a";
189			function = "serial";
190		};
191
192		pinctrl_onewire0: onewire0 {
193			groups = "w1";
194			function = "w1";
195			bias-pull-up;
196		};
197	};
198
199	reset@1 {
200		compatible = "sandbox,reset";
201	};
202
203	sound {
204		compatible = "sandbox,sound";
205		cpu {
206			sound-dai = <&i2s 0>;
207		};
208
209		codec {
210			sound-dai = <&audio 0>;
211		};
212	};
213
214	spi@0 {
215		u-boot,dm-pre-reloc;
216		#address-cells = <1>;
217		#size-cells = <0>;
218		reg = <0 0>;
219		compatible = "sandbox,spi";
220		cs-gpios = <0>, <&gpio_a 0>;
221		firmware_storage_spi: flash@0 {
222			u-boot,dm-pre-reloc;
223			reg = <0>;
224			compatible = "spansion,m25p16", "sandbox,spi-flash";
225			spi-max-frequency = <40000000>;
226			sandbox,filename = "spi.bin";
227		};
228	};
229
230	spl-test {
231		u-boot,dm-pre-reloc;
232		compatible = "sandbox,spl-test";
233		boolval;
234		intval = <1>;
235		intarray = <2 3 4>;
236		byteval = [05];
237		bytearray = [06];
238		longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
239		stringval = "message";
240		stringarray = "multi-word", "message";
241	};
242
243	spl-test2 {
244		u-boot,dm-pre-reloc;
245		compatible = "sandbox,spl-test";
246		intval = <3>;
247		intarray = <5>;
248		byteval = [08];
249		bytearray = [01 23 34];
250		longbytearray = [09 0a 0b 0c];
251		stringval = "message2";
252		stringarray = "another", "multi-word", "message";
253	};
254
255	spl-test3 {
256		u-boot,dm-pre-reloc;
257		compatible = "sandbox,spl-test";
258		stringarray = "one";
259	};
260
261	spl-test4 {
262		u-boot,dm-pre-reloc;
263		compatible = "sandbox,spl-test.2";
264	};
265
266	square {
267		compatible = "demo-shape";
268		colour = "blue";
269		sides = <4>;
270	};
271
272	timer {
273		compatible = "sandbox,timer";
274		clock-frequency = <1000000>;
275	};
276
277	tpm {
278		u-boot,dm-pre-reloc;
279		compatible = "google,sandbox-tpm";
280	};
281
282	tpm2 {
283		compatible = "sandbox,tpm2";
284	};
285
286	triangle {
287		compatible = "demo-shape";
288		colour = "cyan";
289		sides = <3>;
290		character = <83>;
291		light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
292	};
293
294	/* Needs to be available prior to relocation */
295	uart0: serial {
296		u-boot,dm-spl;
297		compatible = "sandbox,serial";
298		sandbox,text-colour = "cyan";
299		pinctrl-names = "default";
300		pinctrl-0 = <&pinctrl_serial0>;
301	};
302
303	usb@0 {
304		compatible = "sandbox,usb";
305		status = "disabled";
306		hub {
307			compatible = "sandbox,usb-hub";
308			#address-cells = <1>;
309			#size-cells = <0>;
310			flash-stick {
311				reg = <0>;
312				compatible = "sandbox,usb-flash";
313			};
314		};
315	};
316
317	usb@1 {
318		compatible = "sandbox,usb";
319		hub {
320			compatible = "usb-hub";
321			usb,device-class = <USB_CLASS_HUB>;
322			hub-emul {
323				compatible = "sandbox,usb-hub";
324				#address-cells = <1>;
325				#size-cells = <0>;
326				flash-stick {
327					reg = <0>;
328					compatible = "sandbox,usb-flash";
329					sandbox,filepath = "flash.bin";
330				};
331			};
332		};
333	};
334
335	usb@2 {
336		compatible = "sandbox,usb";
337		status = "disabled";
338	};
339
340	spmi: spmi@0 {
341		compatible = "sandbox,spmi";
342		#address-cells = <0x1>;
343		#size-cells = <0x1>;
344		pm8916@0 {
345			compatible = "qcom,spmi-pmic";
346			reg = <0x0 0x1>;
347			#address-cells = <0x1>;
348			#size-cells = <0x1>;
349
350			spmi_gpios: gpios@c000 {
351				compatible = "qcom,pm8916-gpio";
352				reg = <0xc000 0x400>;
353				gpio-controller;
354				gpio-count = <4>;
355				#gpio-cells = <2>;
356				gpio-bank-name="spmi";
357			};
358		};
359	};
360
361	axi: axi@0 {
362		compatible = "sandbox,axi";
363		#address-cells = <0x1>;
364		#size-cells = <0x1>;
365		store@0 {
366			compatible = "sandbox,sandbox_store";
367			reg = <0x0 0x400>;
368		};
369	};
370
371	onewire0: onewire {
372		compatible = "w1-gpio";
373		gpios = <&gpio_a 8>;
374		pinctrl-names = "default";
375		pinctrl-0 = <&pinctrl_onewire0>;
376		status = "okay";
377
378		sandbox_eeprom0: sandbox_eeprom@0 {
379			compatible = "sandbox,w1-eeprom";
380			status = "okay";
381		};
382	};
383
384	sandbox_tee {
385		compatible = "sandbox,tee";
386	};
387};
388
389#include "cros-ec-keyboard.dtsi"
390#include "sandbox_pmic.dtsi"
391
392&cros_ec {
393	u-boot,dm-pre-reloc;
394	keyboard-controller {
395		u-boot,dm-pre-reloc;
396	};
397};
398