vsatv102-m6.dts revision 280906
1/*-
2 * Copyright (c) 2013-2015 John Wehle <john@feith.com>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 *    notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 *    notice, this list of conditions and the following disclaimer in the
12 *    documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/boot/fdt/dts/arm/vsatv102-m6.dts 280906 2015-03-31 11:55:56Z ganbold $
27 */
28
29/*
30 * The ordering of certain devices is significant (e.g. usb depends on
31 * usb-phy which depends on gpio, also the timer should appear early on
32 * to provide a reasonably accurate DELAY implementation).
33 *
34 * Both usb-phys devices must be configured to prevent the usb controller
35 * from hanging during initialization.
36 */
37
38/dts-v1/;
39
40/memreserve/ 0x84900000 0x00600000;			/* 6MB frame buffer */
41
42/ {
43	/*
44	 * My development unit visually appears to be a Visson ATV-102
45	 * and the specs for both my unit and the Visson ATV-102 say
46	 * the SoC is an aml8726-m3.  However the uboot prompt says
47	 * m6_mbx_v1, the RTC is located on SECBUS2 instead of AOBUS,
48	 * and there are two cores so it seems my unit is a newer
49	 * version using the later processor.
50	 */
51
52	model = "visson,atv-102";
53	compatible = "visson,atv-102", "amlogic,aml8726-m6";
54
55	#address-cells = <1>;
56	#size-cells = <1>;
57
58	interrupt-parent = <&gic>;
59
60	aliases {
61		soc = &soc;
62		screen = &screen;
63		uart0 = &uart0;
64	};
65
66	cpus {
67		#address-cells = <1>;
68		#size-cells = <0>;
69
70		cpu@0 {
71			device_type = "cpu";
72			compatible = "arm,cortex-a9";
73			reg = <0x0>;
74		};
75
76		cpu@1 {
77			device_type = "cpu";
78			compatible = "arm,cortex-a9";
79			reg = <0x1>;
80		};
81	};
82
83	memory {
84		device_type = "memory";
85		reg = <0x80000000 0x40000000>;		/* 1GB RAM */
86	};
87
88	soc: soc@c0000000 {
89		device_type = "soc";
90		compatible = "simple-bus";
91		bus-frequency = <0>;
92
93		#address-cells = <1>;
94		#size-cells = <1>;
95
96		ranges = <0x0 0xc0000000 0x1a100000>;
97
98		pic: pic@1109a40 {
99			device_type = "interrupt-controller";
100			compatible = "amlogic,aml8726-pic";
101			reg = <0x1109a40 128>;	/* cbus 0x2690 */
102
103			interrupt-controller;
104			#interrupt-cells = <1>;
105		};
106
107		gic: gic@4301000 {
108			device_type = "interrupt-controller";
109			compatible = "arm,gic";
110			reg = <0x4301000 0x1000>, /* distributer registers */
111			      <0x4300100 0x0100>; /* CPU if registers */
112
113			interrupt-controller;
114			#interrupt-cells = <1>;
115		};
116
117		scu: scu@4300000 {
118			compatible = "arm,cortex-a9-scu";
119			reg = <0x4300000 0x1000>;
120		};
121
122		cpuconfig: cpuconfig@1901ff80 {
123			compatible = "amlogic,aml8726-cpuconfig";
124			reg = <0x1901ff80 8>;
125		};
126
127		pl310@4200000 {
128			compatible = "arm,pl310";
129			reg = <0x4200000 0x1000>;
130			interrupts = <61>;	/* AM_IRQ1(29) */
131			interrupt-parent = <&gic>;
132		};
133
134		ccm@1104140 {
135			compatible = "amlogic,aml8726-ccm";
136			reg = <0x1104140 20>;	/* cbus 0x1050 */
137
138			functions = "ethernet", "i2c", "rng", "sdio",
139				    "uart-a", "uart-b", "uart-c",
140				    "usb-a", "usb-b";
141		};
142
143		pinctrl: pinctrl@11080b0 {
144			compatible = "amlogic,aml8726-pinctrl";
145			reg = <0x11080b0 40>,	/* mux */
146			      <0x11080e8 24>,	/* pu/pd */
147			      <0x11080e8 24>,	/* pull enable */
148			      <0x8100014 4>,	/* ao mux */
149			      <0x810002c 4>,	/* ao pu/pd */
150			      <0x810002c 4>;	/* ao pull enable */
151
152			/*
153			 * Currently only pin muxing that deviates
154			 * from the power on default of gpio is
155			 * specified here.
156			 */
157
158			pinctrl-names = "default";
159			pinctrl-0 = <&pins_uartao &pins_ethernet &pins_hdmi>;
160
161			pins_ethernet: ethernet {
162				amlogic,pins = "ref_clk_in",
163					       "tx_clk", "tx_en",
164					       "tx_d0",  "tx_d1",
165					       "tx_d2",  "tx_d3",
166					       "rx_clk", "rx_dv",
167					       "rx_d0",  "rx_d1",
168					       "rx_d2",  "rx_d3",
169					       "mdc",    "mdio";
170				amlogic,function = "ethernet";
171			};
172
173			pins_hdmi: hdmi {
174				amlogic,pins = "cec", "hpd",
175					       "scl", "sda";
176				amlogic,function = "hdmi";
177			};
178
179			pins_sdio_b: sdio_b {
180				amlogic,pins = "clk", "cmd",
181					       "d0",  "d1",
182					       "d2",  "d3";
183				amlogic,function = "sdio-b";
184			};
185
186			pins_uartao: uartao {
187				amlogic,pins = "tx", "rx";
188				amlogic,function = "uart-ao";
189			};
190		};
191
192		watchdog@1109900 {
193			compatible = "amlogic,aml8726-wdt";
194			reg = <0x1109900 8>;	/* cbus 0x2640 */
195			interrupts = <0>;	/* AM_IRQ0(0) */
196			interrupt-parent = <&gic>;
197		};
198
199		timer@1109940 {
200			compatible = "amlogic,aml8726-timer";
201			reg = <0x1109940 24>;	/* cbus 0x2650 */
202			interrupts = <10	/* AM_IRQ0(10) */
203				      11	/* AM_IRQ0(11) */
204				      6		/* AM_IRQ0(6)  */
205				      29>;	/* AM_IRQ0(29) */
206			interrupt-parent = <&gic>;
207		};
208
209		rtc@1a004340 {
210			compatible = "amlogic,aml8726-rtc";
211			reg = <0x1a004340 20>;	/* secbus2 0xd0 */
212			interrupts = <72>;	/* AM_IRQ2(8) */
213			interrupt-parent = <&gic>;
214
215			init-always = "false";
216			xo-init = <0x180a>;
217			gpo-init = <0x500000>;
218		};
219
220		clkmsr: clkmsr@1108758 {
221			compatible = "amlogic,aml8726-clkmsr";
222			reg = <0x1108758 16>;	/* cbus 0x21d6 */
223		};
224
225		uart0: uart@81004c0 {
226			/* uart-ao */
227			device_type = "serial";
228			compatible = "amlogic,aml8726-uart";
229			clock-frequency = <0>;
230			current-speed = <115200>;
231			reg = <0x81004c0 20>;	/* aobus 0x130 */
232			interrupts = <90>;	/* AM_IRQ2(26) */
233			interrupt-parent = <&gic>;
234		};
235
236		gpioao: gpio@8100024 {
237			/* gpio unit 7 */
238			compatible = "amlogic,aml8726-gpio";
239			reg = <0x8100024 4>,	/* oen aobus 0x9 */
240			      <0x8100024 4>,	/* out */
241			      <0x8100028 4>;	/* in */
242
243			gpio-controller;
244			#gpio-cells = <1>;
245			pin-count = <12>;
246		};
247
248		gpio5: gpio@110806c {
249			compatible = "amlogic,aml8726-gpio";
250			reg = <0x110806c 4>,	/* oen cbus 0x201b */
251			      <0x1108070 4>,	/* out */
252			      <0x1108074 4>;	/* in */
253
254			gpio-controller;
255			#gpio-cells = <1>;
256			pin-count = <32>;
257		};
258
259		gpio6: gpio@1108020 {
260			compatible = "amlogic,aml8726-gpio";
261			reg = <0x1108020 4>,	/* oen cbus 0x2008 */
262			      <0x1108024 4>,	/* out */
263			      <0x1108028 4>;	/* in */
264
265			gpio-controller;
266			#gpio-cells = <1>;
267			pin-count = <29>;
268		};
269
270		mmc@1108c20 {
271			compatible = "amlogic,aml8726-mmc";
272			reg = <0x1108c20 32>;	/* cbus 0x2308 */
273			interrupts = <28>;	/* AM_IRQ0(28) */
274			interrupt-parent = <&gic>;
275
276			pinctrl-names = "default";
277			pinctrl-0 = <&pins_sdio_b>;
278
279			mmc-voltages = "3.3";
280
281			mmc-pwr-en = <&gpio5 31 0>;	/* card_8 */
282			ins-detect = <&gpio5 29 0>;	/* card_6 */
283		};
284
285		rng@1108100 {
286			compatible = "amlogic,aml8726-rng";
287			reg = <0x1108100 8>;	/* cbus 0x2040 */
288		};
289
290		i2c@1108500 {
291			/* i2c-a */
292			compatible = "amlogic,aml8726-i2c";
293			reg = <0x1108500 32>;	/* cbus 0x2140 */
294			interrupts = <21>;
295			interrupt-parent = <&gic>;
296		};
297
298		i2c@11087c0 {
299			/* i2c-b */
300			compatible = "amlogic,aml8726-i2c";
301			reg = <0x11087c0 32>;	/* cbus 0x21f0 */
302			interrupts = <128>;
303			interrupt-parent = <&gic>;
304		};
305
306		uart@11084c0 {
307			/* uart-a */
308			device_type = "serial";
309			compatible = "amlogic,aml8726-uart";
310			clock-frequency = <0>;
311			current-speed = <115200>;
312			reg = <0x11084c0 20>;	/* cbus 0x2130 */
313			interrupts = <26>;
314			interrupt-parent = <&gic>;
315		};
316
317		uart@11084dc {
318			/* uart-b */
319			device_type = "serial";
320			compatible = "amlogic,aml8726-uart";
321			clock-frequency = <0>;
322			current-speed = <115200>;
323			reg = <0x11084dc 20>;	/* cbus 0x2137 */
324			interrupts = <75>;
325			interrupt-parent = <&gic>;
326		};
327
328		uart@1108700 {
329			/* uart-c */
330			device_type = "serial";
331			compatible = "amlogic,aml8726-uart";
332			clock-frequency = <0>;
333			current-speed = <115200>;
334			reg = <0x1108700 20>;	/* cbus 0x21c0 */
335			interrupts = <93>;
336			interrupt-parent = <&gic>;
337		};
338
339		usb-phy@1108400 {
340			/* usb-a phy */
341			compatible = "amlogic,aml8726-m6-usb-phy";
342			reg = <0x1108400 32>;	/* cbus 0x2100 */
343		};
344
345		usb-phy@1108420 {
346			/* usb-b phy */
347			compatible = "amlogic,aml8726-m6-usb-phy";
348			reg = <0x1108420 32>;	/* cbus 0x2108 */
349
350			usb-pwr-en = <&gpioao 3 1>,	/* gpioao_3 vbus */
351				     <&gpio6 11 0>;	/* gpioe_11 wifi */
352		};
353
354		usb@9040000 {
355			/* usb-a */
356			compatible = "synopsys,designware-hs-otg2";
357			reg = <0x9040000 0x40000>;	/* ahbbus 0x40000*/
358			interrupts = <30>;		/* AM_IRQ0(30) */
359			interrupt-parent = <&gic>;
360			#address-cells = <1>;
361			#size-cells = <0>;
362		};
363
364		usb@90c0000 {
365			/* usb-b */
366			compatible = "synopsys,designware-hs-otg2";
367			reg = <0x90c0000 0x40000>;	/* ahbbus 0xc0000 */
368			interrupts = <31>;		/* AM_IRQ0(31) */
369			interrupt-parent = <&gic>;
370			#address-cells = <1>;
371			#size-cells = <0>;
372
373			dr_mode = "host";
374		};
375
376		eth@9410000 {
377			/* ethernet */
378			compatible = "snps,dwmac";
379			reg = <0x9410000 0x2000>;	/* ahbbus 0x410000 */
380			interrupts = <8>;		/* AM_IRQ0(8) */
381			interrupt-parent = <&gic>;
382			#address-cells = <1>;
383			#size-cells = <0>;
384
385			eth-phy-rst = <&gpio5 15 0>;	/* gpioy_15 phy-rst */
386		};
387
388		screen: fb@8006324 {
389			device_type = "display";
390			compatible = "amlogic,aml8726-fb";
391			reg = <0x8006324 12>,	/* CANVAS */
392			      <0x1106800 1024>,	/* VIU */
393			      <0x1107400 1024>;	/* VPP */
394			interrupts = <2		/* AM_IRQ0(2) */
395				      3		/* AM_IRQ0(3) */
396				      12	/* AM_IRQ0(12) */
397				      13>;	/* AM_IRQ0(13) */
398			interrupt-parent = <&gic>;
399
400			address = <0x84900000>;	/* match memreserve */
401			width = <720>;
402			height = <480>;
403			depth = <24>;
404			linebytes = <2160>;
405		};
406	};
407
408	chosen {
409		stdin = "uart0";
410		stdout = "uart0";
411	};
412};
413