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