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