xref: /openbmc/u-boot/arch/sandbox/dts/sandbox.dts (revision ed09a554)
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		pci0 = &pci;
12	};
13
14	chosen {
15		stdout-path = "/serial";
16	};
17
18	/* Needs to be available prior to relocation */
19	uart0: serial {
20		compatible = "sandbox,serial";
21		sandbox,text-colour = "cyan";
22	};
23
24	triangle {
25		compatible = "demo-shape";
26		colour = "cyan";
27		sides = <3>;
28		character = <83>;
29		light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
30	};
31	square {
32		compatible = "demo-shape";
33		colour = "blue";
34		sides = <4>;
35	};
36	hexagon {
37		compatible = "demo-simple";
38		colour = "white";
39		sides = <6>;
40	};
41
42	cros_ec: cros-ec@0 {
43		reg = <0 0>;
44		compatible = "google,cros-ec-sandbox";
45
46		/*
47		 * This describes the flash memory within the EC. Note
48		 * that the STM32L flash erases to 0, not 0xff.
49		 */
50		#address-cells = <1>;
51		#size-cells = <1>;
52		flash@8000000 {
53			reg = <0x08000000 0x20000>;
54			erase-value = <0>;
55			#address-cells = <1>;
56			#size-cells = <1>;
57
58			/* Information for sandbox */
59			ro {
60				reg = <0 0xf000>;
61			};
62			wp-ro {
63				reg = <0xf000 0x1000>;
64			};
65			rw {
66				reg = <0x10000 0x10000>;
67			};
68		};
69	};
70
71	lcd {
72		compatible = "sandbox,lcd-sdl";
73		xres = <800>;
74		yres = <600>;
75	};
76
77	gpio_a: gpios@0 {
78		gpio-controller;
79		compatible = "sandbox,gpio";
80		#gpio-cells = <1>;
81		gpio-bank-name = "a";
82		num-gpios = <20>;
83	};
84
85	gpio_b: gpios@1 {
86		gpio-controller;
87		compatible = "sandbox,gpio";
88		#gpio-cells = <2>;
89		gpio-bank-name = "b";
90		num-gpios = <10>;
91	};
92
93	i2c@0 {
94		#address-cells = <1>;
95		#size-cells = <0>;
96		reg = <0 0>;
97		compatible = "sandbox,i2c";
98		clock-frequency = <400000>;
99		eeprom@2c {
100			reg = <0x2c>;
101			compatible = "i2c-eeprom";
102			emul {
103				compatible = "sandbox,i2c-eeprom";
104				sandbox,filename = "i2c.bin";
105				sandbox,size = <128>;
106			};
107		};
108	};
109
110	spi@0 {
111		#address-cells = <1>;
112		#size-cells = <0>;
113		reg = <0 0>;
114		compatible = "sandbox,spi";
115		cs-gpios = <0>, <&gpio_a 0>;
116		firmware_storage_spi: flash@0 {
117			reg = <0>;
118			compatible = "spansion,m25p16", "sandbox,spi-flash";
119			spi-max-frequency = <40000000>;
120			sandbox,filename = "spi.bin";
121		};
122	};
123
124	pci: pci-controller {
125		compatible = "sandbox,pci";
126		device_type = "pci";
127		#address-cells = <3>;
128		#size-cells = <2>;
129		ranges = <0x02000000 0 0x10000000 0x10000000 0 0x2000
130				0x01000000 0 0x20000000 0x20000000 0 0x2000>;
131		pci@1f,0 {
132			compatible = "pci-generic";
133			reg = <0xf800 0 0 0 0>;
134			emul@1f,0 {
135				compatible = "sandbox,swap-case";
136			};
137		};
138	};
139
140	eth@10002000 {
141		compatible = "sandbox,eth";
142		reg = <0x10002000 0x1000>;
143		fake-host-hwaddr = [00 00 66 44 22 00];
144	};
145
146	eth@80000000 {
147		compatible = "sandbox,eth-raw";
148		reg = <0x80000000 0x1000>;
149		host-raw-interface = "eth0";
150	};
151
152	eth@90000000 {
153		compatible = "sandbox,eth-raw";
154		reg = <0x90000000 0x1000>;
155		host-raw-interface = "lo";
156	};
157
158	usb@0 {
159		compatible = "sandbox,usb";
160		status = "disabled";
161		hub {
162			compatible = "sandbox,usb-hub";
163			#address-cells = <1>;
164			#size-cells = <0>;
165			flash-stick {
166				reg = <0>;
167				compatible = "sandbox,usb-flash";
168			};
169		};
170	};
171
172	usb@1 {
173		compatible = "sandbox,usb";
174		hub {
175			compatible = "usb-hub";
176			usb,device-class = <USB_CLASS_HUB>;
177			hub-emul {
178				compatible = "sandbox,usb-hub";
179				#address-cells = <1>;
180				#size-cells = <0>;
181				flash-stick {
182					reg = <0>;
183					compatible = "sandbox,usb-flash";
184					sandbox,filepath = "flash.bin";
185				};
186			};
187		};
188	};
189
190	usb@2 {
191		compatible = "sandbox,usb";
192		status = "disabled";
193	};
194
195};
196
197#include "cros-ec-keyboard.dtsi"
198