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