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