vsatv102-m6.dts revision 282619
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 282619 2015-05-08 04:22:11Z 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#include "meson6.dtsi"
43
44/ {
45	/*
46	 * My development unit visually appears to be a Visson ATV-102
47	 * and the specs for both my unit and the Visson ATV-102 say
48	 * the SoC is an aml8726-m3.  However the uboot prompt says
49	 * m6_mbx_v1, the RTC is located on SECBUS2 instead of AOBUS,
50	 * and there are two cores so it seems my unit is a newer
51	 * version using the later processor.
52	 */
53
54	model = "visson,atv-102";
55	compatible = "visson,atv-102", "amlogic,meson6";
56
57	#address-cells = <1>;
58	#size-cells = <1>;
59
60	aliases {
61		soc = &soc;
62		screen = &screen;
63		uart0 = &uart_AO;
64	};
65
66	memory {
67		device_type = "memory";
68		reg = <0x80000000 0x40000000>;		/* 1GB RAM */
69	};
70
71	soc: soc {
72		device_type = "soc";
73		bus-frequency = <0>;
74
75		pic: pic@c1109a40 {
76			device_type = "interrupt-controller";
77			compatible = "amlogic,aml8726-pic";
78			reg = <0xc1109a40 128>;	/* cbus 0x2690 */
79
80			interrupt-controller;
81			#interrupt-cells = <3>;
82		};
83
84		scu: scu@c4300000 {
85			compatible = "arm,cortex-a9-scu";
86			reg = <0xc4300000 0x1000>;
87		};
88
89		cpuconfig: cpuconfig@d901ff80 {
90			compatible = "amlogic,aml8726-cpuconfig";
91			reg = <0xd901ff80 8>;
92		};
93
94		ccm@c1104140 {
95			compatible = "amlogic,aml8726-ccm";
96			reg = <0xc1104140 20>;	/* cbus 0x1050 */
97
98			functions = "ethernet", "i2c", "rng", "sdio",
99				    "uart-a", "uart-b", "uart-c",
100				    "usb-a", "usb-b";
101		};
102
103		pinctrl: pinctrl@c11080b0 {
104			compatible = "amlogic,aml8726-pinctrl";
105			reg = <0xc11080b0 40>,	/* mux */
106			      <0xc11080e8 24>,	/* pu/pd */
107			      <0xc11080e8 24>,	/* pull enable */
108			      <0xc8100014 4>,	/* ao mux */
109			      <0xc810002c 4>,	/* ao pu/pd */
110			      <0xc810002c 4>;	/* ao pull enable */
111
112			/*
113			 * Currently only pin muxing that deviates
114			 * from the power on default of gpio is
115			 * specified here.
116			 */
117
118			pinctrl-names = "default";
119			pinctrl-0 = <&pins_uartao &pins_ethernet &pins_hdmi>;
120
121			pins_ethernet: ethernet {
122				amlogic,pins = "ref_clk_in",
123					       "tx_clk", "tx_en",
124					       "tx_d0",  "tx_d1",
125					       "tx_d2",  "tx_d3",
126					       "rx_clk", "rx_dv",
127					       "rx_d0",  "rx_d1",
128					       "rx_d2",  "rx_d3",
129					       "mdc",    "mdio";
130				amlogic,function = "ethernet";
131			};
132
133			pins_hdmi: hdmi {
134				amlogic,pins = "cec", "hpd",
135					       "scl", "sda";
136				amlogic,function = "hdmi";
137			};
138
139			pins_sdio_b: sdio_b {
140				amlogic,pins = "clk", "cmd",
141					       "d0",  "d1",
142					       "d2",  "d3";
143				amlogic,function = "sdio-b";
144			};
145
146			pins_uartao: uartao {
147				amlogic,pins = "tx", "rx";
148				amlogic,function = "uart-ao";
149			};
150		};
151
152		rtc@da004340 {
153			compatible = "amlogic,aml8726-rtc";
154			reg = <0xda004340 20>;	/* secbus2 0xd0 */
155			interrupts = <0 72 1>;	/* AM_IRQ2(8) */
156
157			init-always = "false";
158			xo-init = <0x180a>;
159			gpo-init = <0x500000>;
160		};
161
162		clkmsr: clkmsr@c1108758 {
163			compatible = "amlogic,aml8726-clkmsr";
164			reg = <0xc1108758 16>;	/* cbus 0x21d6 */
165
166			clocks = <&clk81>;
167		};
168
169		gpioao: gpio@c8100024 {
170			/* gpio unit 7 */
171			compatible = "amlogic,aml8726-gpio";
172			reg = <0xc8100024 4>,	/* oen aobus 0x9 */
173			      <0xc8100024 4>,	/* out */
174			      <0xc8100028 4>;	/* in */
175
176			gpio-controller;
177			#gpio-cells = <1>;
178			pin-count = <12>;
179		};
180
181		gpio5: gpio@c110806c {
182			compatible = "amlogic,aml8726-gpio";
183			reg = <0xc110806c 4>,	/* oen cbus 0x201b */
184			      <0xc1108070 4>,	/* out */
185			      <0xc1108074 4>;	/* in */
186
187			gpio-controller;
188			#gpio-cells = <1>;
189			pin-count = <32>;
190		};
191
192		gpio6: gpio@c1108020 {
193			compatible = "amlogic,aml8726-gpio";
194			reg = <0xc1108020 4>,	/* oen cbus 0x2008 */
195			      <0xc1108024 4>,	/* out */
196			      <0xc1108028 4>;	/* in */
197
198			gpio-controller;
199			#gpio-cells = <1>;
200			pin-count = <29>;
201		};
202
203		mmc@c1108c20 {
204			compatible = "amlogic,aml8726-mmc";
205			reg = <0xc1108c20 32>;	/* cbus 0x2308 */
206			interrupts = <0 28 1>;	/* AM_IRQ0(28) */
207
208			clocks = <&clk81>;
209
210			pinctrl-names = "default";
211			pinctrl-0 = <&pins_sdio_b>;
212
213			mmc-voltages = "3.3";
214
215			mmc-pwr-en = <&gpio5 31 0>;	/* card_8 */
216			ins-detect = <&gpio5 29 0>;	/* card_6 */
217		};
218
219		rng@c1108100 {
220			compatible = "amlogic,aml8726-rng";
221			reg = <0xc1108100 8>;	/* cbus 0x2040 */
222		};
223
224		usb-phy@c1108400 {
225			/* usb-a phy */
226			compatible = "amlogic,aml8726-m6-usb-phy";
227			reg = <0xc1108400 32>;	/* cbus 0x2100 */
228		};
229
230		usb-phy@c1108420 {
231			/* usb-b phy */
232			compatible = "amlogic,aml8726-m6-usb-phy";
233			reg = <0xc1108420 32>;	/* cbus 0x2108 */
234
235			usb-pwr-en = <&gpioao 3 1>,	/* gpioao_3 vbus */
236				     <&gpio6 11 0>;	/* gpioe_11 wifi */
237		};
238
239		usb@c9040000 {
240			/* usb-a */
241			compatible = "synopsys,designware-hs-otg2";
242			reg = <0xc9040000 0x40000>;	/* ahbbus 0x40000*/
243			interrupts = <0 30 4>;		/* AM_IRQ0(30) */
244			#address-cells = <1>;
245			#size-cells = <0>;
246		};
247
248		usb@c90c0000 {
249			/* usb-b */
250			compatible = "synopsys,designware-hs-otg2";
251			reg = <0xc90c0000 0x40000>;	/* ahbbus 0xc0000 */
252			interrupts = <0 31 4>;		/* AM_IRQ0(31) */
253			#address-cells = <1>;
254			#size-cells = <0>;
255
256			dr_mode = "host";
257		};
258
259		eth@c9410000 {
260			/* ethernet */
261			compatible = "snps,dwmac";
262			reg = <0xc9410000 0x2000>;	/* ahbbus 0x410000 */
263			interrupts = <0 8 1>;		/* AM_IRQ0(8) */
264			#address-cells = <1>;
265			#size-cells = <0>;
266
267			eth-phy-rst = <&gpio5 15 0>;	/* gpioy_15 phy-rst */
268		};
269
270		screen: fb@c8006324 {
271			device_type = "display";
272			compatible = "amlogic,aml8726-fb";
273			reg = <0xc8006324 12>,		/* CANVAS */
274			      <0xc1106800 1024>,	/* VIU */
275			      <0xc1107400 1024>;	/* VPP */
276			interrupts = <0 2 1>,		/* AM_IRQ0(2) */
277				     <0 3 1>,		/* AM_IRQ0(3) */
278				     <0 12 1>,		/* AM_IRQ0(12) */
279				     <0 13 1>;		/* AM_IRQ0(13) */
280
281			address = <0x84900000>;	/* match memreserve */
282			width = <720>;
283			height = <480>;
284			depth = <24>;
285			linebytes = <2160>;
286		};
287	};
288
289	chosen {
290		stdin = "uart0";
291		stdout = "uart0";
292	};
293};
294
295&clk81 {
296	clock-frequency = <0>;
297};
298
299&uart_AO {
300	status = "okay";
301	current-speed = <115200>;
302};
303