vsatv102-m6.dts revision 281415
1280906Sganbold/*-
2280906Sganbold * Copyright (c) 2013-2015 John Wehle <john@feith.com>
3280906Sganbold * All rights reserved.
4280906Sganbold *
5280906Sganbold * Redistribution and use in source and binary forms, with or without
6280906Sganbold * modification, are permitted provided that the following conditions
7280906Sganbold * are met:
8280906Sganbold * 1. Redistributions of source code must retain the above copyright
9280906Sganbold *    notice, this list of conditions and the following disclaimer.
10280906Sganbold * 2. Redistributions in binary form must reproduce the above copyright
11280906Sganbold *    notice, this list of conditions and the following disclaimer in the
12280906Sganbold *    documentation and/or other materials provided with the distribution.
13280906Sganbold *
14280906Sganbold * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15280906Sganbold * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16280906Sganbold * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17280906Sganbold * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18280906Sganbold * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19280906Sganbold * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20280906Sganbold * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21280906Sganbold * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22280906Sganbold * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23280906Sganbold * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24280906Sganbold * SUCH DAMAGE.
25280906Sganbold *
26280906Sganbold * $FreeBSD: head/sys/boot/fdt/dts/arm/vsatv102-m6.dts 281415 2015-04-11 08:27:38Z ganbold $
27280906Sganbold */
28280906Sganbold
29280906Sganbold/*
30280906Sganbold * The ordering of certain devices is significant (e.g. usb depends on
31280906Sganbold * usb-phy which depends on gpio, also the timer should appear early on
32280906Sganbold * to provide a reasonably accurate DELAY implementation).
33280906Sganbold *
34280906Sganbold * Both usb-phys devices must be configured to prevent the usb controller
35280906Sganbold * from hanging during initialization.
36280906Sganbold */
37280906Sganbold
38280906Sganbold/dts-v1/;
39280906Sganbold
40280906Sganbold/memreserve/ 0x84900000 0x00600000;			/* 6MB frame buffer */
41280906Sganbold
42281415Sganbold#include "meson6.dtsi"
43281415Sganbold
44280906Sganbold/ {
45280906Sganbold	/*
46280906Sganbold	 * My development unit visually appears to be a Visson ATV-102
47280906Sganbold	 * and the specs for both my unit and the Visson ATV-102 say
48280906Sganbold	 * the SoC is an aml8726-m3.  However the uboot prompt says
49280906Sganbold	 * m6_mbx_v1, the RTC is located on SECBUS2 instead of AOBUS,
50280906Sganbold	 * and there are two cores so it seems my unit is a newer
51280906Sganbold	 * version using the later processor.
52280906Sganbold	 */
53280906Sganbold
54280906Sganbold	model = "visson,atv-102";
55281415Sganbold	compatible = "visson,atv-102", "amlogic,meson6";
56280906Sganbold
57280906Sganbold	#address-cells = <1>;
58280906Sganbold	#size-cells = <1>;
59280906Sganbold
60280906Sganbold	aliases {
61280906Sganbold		soc = &soc;
62280906Sganbold		screen = &screen;
63281415Sganbold		uart0 = &uart_AO;
64280906Sganbold	};
65280906Sganbold
66280906Sganbold	memory {
67280906Sganbold		device_type = "memory";
68280906Sganbold		reg = <0x80000000 0x40000000>;		/* 1GB RAM */
69280906Sganbold	};
70280906Sganbold
71281415Sganbold	soc: soc {
72280906Sganbold		device_type = "soc";
73280906Sganbold		bus-frequency = <0>;
74280906Sganbold
75281415Sganbold		pic: pic@c1109a40 {
76280906Sganbold			device_type = "interrupt-controller";
77280906Sganbold			compatible = "amlogic,aml8726-pic";
78281415Sganbold			reg = <0xc1109a40 128>;	/* cbus 0x2690 */
79280906Sganbold
80280906Sganbold			interrupt-controller;
81281415Sganbold			#interrupt-cells = <3>;
82280906Sganbold		};
83280906Sganbold
84281415Sganbold		scu: scu@c4300000 {
85280906Sganbold			compatible = "arm,cortex-a9-scu";
86281415Sganbold			reg = <0xc4300000 0x1000>;
87280906Sganbold		};
88280906Sganbold
89281415Sganbold		cpuconfig: cpuconfig@d901ff80 {
90280906Sganbold			compatible = "amlogic,aml8726-cpuconfig";
91281415Sganbold			reg = <0xd901ff80 8>;
92280906Sganbold		};
93280906Sganbold
94281415Sganbold		ccm@c1104140 {
95280906Sganbold			compatible = "amlogic,aml8726-ccm";
96281415Sganbold			reg = <0xc1104140 20>;	/* cbus 0x1050 */
97280906Sganbold
98280906Sganbold			functions = "ethernet", "i2c", "rng", "sdio",
99280906Sganbold				    "uart-a", "uart-b", "uart-c",
100280906Sganbold				    "usb-a", "usb-b";
101280906Sganbold		};
102280906Sganbold
103281415Sganbold		pinctrl: pinctrl@c11080b0 {
104280906Sganbold			compatible = "amlogic,aml8726-pinctrl";
105281415Sganbold			reg = <0xc11080b0 40>,	/* mux */
106281415Sganbold			      <0xc11080e8 24>,	/* pu/pd */
107281415Sganbold			      <0xc11080e8 24>,	/* pull enable */
108281415Sganbold			      <0xc8100014 4>,	/* ao mux */
109281415Sganbold			      <0xc810002c 4>,	/* ao pu/pd */
110281415Sganbold			      <0xc810002c 4>;	/* ao pull enable */
111280906Sganbold
112280906Sganbold			/*
113280906Sganbold			 * Currently only pin muxing that deviates
114280906Sganbold			 * from the power on default of gpio is
115280906Sganbold			 * specified here.
116280906Sganbold			 */
117280906Sganbold
118280906Sganbold			pinctrl-names = "default";
119280906Sganbold			pinctrl-0 = <&pins_uartao &pins_ethernet &pins_hdmi>;
120280906Sganbold
121280906Sganbold			pins_ethernet: ethernet {
122280906Sganbold				amlogic,pins = "ref_clk_in",
123280906Sganbold					       "tx_clk", "tx_en",
124280906Sganbold					       "tx_d0",  "tx_d1",
125280906Sganbold					       "tx_d2",  "tx_d3",
126280906Sganbold					       "rx_clk", "rx_dv",
127280906Sganbold					       "rx_d0",  "rx_d1",
128280906Sganbold					       "rx_d2",  "rx_d3",
129280906Sganbold					       "mdc",    "mdio";
130280906Sganbold				amlogic,function = "ethernet";
131280906Sganbold			};
132280906Sganbold
133280906Sganbold			pins_hdmi: hdmi {
134280906Sganbold				amlogic,pins = "cec", "hpd",
135280906Sganbold					       "scl", "sda";
136280906Sganbold				amlogic,function = "hdmi";
137280906Sganbold			};
138280906Sganbold
139280906Sganbold			pins_sdio_b: sdio_b {
140280906Sganbold				amlogic,pins = "clk", "cmd",
141280906Sganbold					       "d0",  "d1",
142280906Sganbold					       "d2",  "d3";
143280906Sganbold				amlogic,function = "sdio-b";
144280906Sganbold			};
145280906Sganbold
146280906Sganbold			pins_uartao: uartao {
147280906Sganbold				amlogic,pins = "tx", "rx";
148280906Sganbold				amlogic,function = "uart-ao";
149280906Sganbold			};
150280906Sganbold		};
151280906Sganbold
152281415Sganbold		rtc@da004340 {
153280906Sganbold			compatible = "amlogic,aml8726-rtc";
154281415Sganbold			reg = <0xda004340 20>;	/* secbus2 0xd0 */
155281415Sganbold			interrupts = <0 72 1>;	/* AM_IRQ2(8) */
156280906Sganbold			interrupt-parent = <&gic>;
157280906Sganbold
158280906Sganbold			init-always = "false";
159280906Sganbold			xo-init = <0x180a>;
160280906Sganbold			gpo-init = <0x500000>;
161280906Sganbold		};
162280906Sganbold
163281415Sganbold		clkmsr: clkmsr@c1108758 {
164280906Sganbold			compatible = "amlogic,aml8726-clkmsr";
165281415Sganbold			reg = <0xc1108758 16>;	/* cbus 0x21d6 */
166280906Sganbold
167281415Sganbold			clocks = <&clk81>;
168280906Sganbold		};
169280906Sganbold
170281415Sganbold		gpioao: gpio@c8100024 {
171280906Sganbold			/* gpio unit 7 */
172280906Sganbold			compatible = "amlogic,aml8726-gpio";
173281415Sganbold			reg = <0xc8100024 4>,	/* oen aobus 0x9 */
174281415Sganbold			      <0xc8100024 4>,	/* out */
175281415Sganbold			      <0xc8100028 4>;	/* in */
176280906Sganbold
177280906Sganbold			gpio-controller;
178280906Sganbold			#gpio-cells = <1>;
179280906Sganbold			pin-count = <12>;
180280906Sganbold		};
181280906Sganbold
182281415Sganbold		gpio5: gpio@c110806c {
183280906Sganbold			compatible = "amlogic,aml8726-gpio";
184281415Sganbold			reg = <0xc110806c 4>,	/* oen cbus 0x201b */
185281415Sganbold			      <0xc1108070 4>,	/* out */
186281415Sganbold			      <0xc1108074 4>;	/* in */
187280906Sganbold
188280906Sganbold			gpio-controller;
189280906Sganbold			#gpio-cells = <1>;
190280906Sganbold			pin-count = <32>;
191280906Sganbold		};
192280906Sganbold
193281415Sganbold		gpio6: gpio@c1108020 {
194280906Sganbold			compatible = "amlogic,aml8726-gpio";
195281415Sganbold			reg = <0xc1108020 4>,	/* oen cbus 0x2008 */
196281415Sganbold			      <0xc1108024 4>,	/* out */
197281415Sganbold			      <0xc1108028 4>;	/* in */
198280906Sganbold
199280906Sganbold			gpio-controller;
200280906Sganbold			#gpio-cells = <1>;
201280906Sganbold			pin-count = <29>;
202280906Sganbold		};
203280906Sganbold
204281415Sganbold		mmc@c1108c20 {
205280906Sganbold			compatible = "amlogic,aml8726-mmc";
206281415Sganbold			reg = <0xc1108c20 32>;	/* cbus 0x2308 */
207281415Sganbold			interrupts = <0 28 1>;	/* AM_IRQ0(28) */
208280906Sganbold			interrupt-parent = <&gic>;
209280906Sganbold
210281415Sganbold			clocks = <&clk81>;
211281415Sganbold
212280906Sganbold			pinctrl-names = "default";
213280906Sganbold			pinctrl-0 = <&pins_sdio_b>;
214280906Sganbold
215280906Sganbold			mmc-voltages = "3.3";
216280906Sganbold
217280906Sganbold			mmc-pwr-en = <&gpio5 31 0>;	/* card_8 */
218280906Sganbold			ins-detect = <&gpio5 29 0>;	/* card_6 */
219280906Sganbold		};
220280906Sganbold
221281415Sganbold		rng@c1108100 {
222280906Sganbold			compatible = "amlogic,aml8726-rng";
223281415Sganbold			reg = <0xc1108100 8>;	/* cbus 0x2040 */
224280906Sganbold		};
225280906Sganbold
226281415Sganbold		usb-phy@c1108400 {
227280906Sganbold			/* usb-a phy */
228280906Sganbold			compatible = "amlogic,aml8726-m6-usb-phy";
229281415Sganbold			reg = <0xc1108400 32>;	/* cbus 0x2100 */
230280906Sganbold		};
231280906Sganbold
232281415Sganbold		usb-phy@c1108420 {
233280906Sganbold			/* usb-b phy */
234280906Sganbold			compatible = "amlogic,aml8726-m6-usb-phy";
235281415Sganbold			reg = <0xc1108420 32>;	/* cbus 0x2108 */
236280906Sganbold
237280906Sganbold			usb-pwr-en = <&gpioao 3 1>,	/* gpioao_3 vbus */
238280906Sganbold				     <&gpio6 11 0>;	/* gpioe_11 wifi */
239280906Sganbold		};
240280906Sganbold
241281415Sganbold		usb@c9040000 {
242280906Sganbold			/* usb-a */
243280906Sganbold			compatible = "synopsys,designware-hs-otg2";
244281415Sganbold			reg = <0xc9040000 0x40000>;	/* ahbbus 0x40000*/
245281415Sganbold			interrupts = <0 30 4>;		/* AM_IRQ0(30) */
246280906Sganbold			interrupt-parent = <&gic>;
247280906Sganbold			#address-cells = <1>;
248280906Sganbold			#size-cells = <0>;
249280906Sganbold		};
250280906Sganbold
251281415Sganbold		usb@c90c0000 {
252280906Sganbold			/* usb-b */
253280906Sganbold			compatible = "synopsys,designware-hs-otg2";
254281415Sganbold			reg = <0xc90c0000 0x40000>;	/* ahbbus 0xc0000 */
255281415Sganbold			interrupts = <0 31 4>;		/* AM_IRQ0(31) */
256280906Sganbold			interrupt-parent = <&gic>;
257280906Sganbold			#address-cells = <1>;
258280906Sganbold			#size-cells = <0>;
259280906Sganbold
260280906Sganbold			dr_mode = "host";
261280906Sganbold		};
262280906Sganbold
263281415Sganbold		eth@c9410000 {
264280906Sganbold			/* ethernet */
265280906Sganbold			compatible = "snps,dwmac";
266281415Sganbold			reg = <0xc9410000 0x2000>;	/* ahbbus 0x410000 */
267281415Sganbold			interrupts = <0 8 1>;		/* AM_IRQ0(8) */
268280906Sganbold			interrupt-parent = <&gic>;
269280906Sganbold			#address-cells = <1>;
270280906Sganbold			#size-cells = <0>;
271280906Sganbold
272280906Sganbold			eth-phy-rst = <&gpio5 15 0>;	/* gpioy_15 phy-rst */
273280906Sganbold		};
274280906Sganbold
275281415Sganbold		screen: fb@c8006324 {
276280906Sganbold			device_type = "display";
277280906Sganbold			compatible = "amlogic,aml8726-fb";
278281415Sganbold			reg = <0xc8006324 12>,		/* CANVAS */
279281415Sganbold			      <0xc1106800 1024>,	/* VIU */
280281415Sganbold			      <0xc1107400 1024>;	/* VPP */
281281415Sganbold			interrupts = <0 2 1>,		/* AM_IRQ0(2) */
282281415Sganbold				     <0 3 1>,		/* AM_IRQ0(3) */
283281415Sganbold				     <0 12 1>,		/* AM_IRQ0(12) */
284281415Sganbold				     <0 13 1>;		/* AM_IRQ0(13) */
285280906Sganbold			interrupt-parent = <&gic>;
286280906Sganbold
287280906Sganbold			address = <0x84900000>;	/* match memreserve */
288280906Sganbold			width = <720>;
289280906Sganbold			height = <480>;
290280906Sganbold			depth = <24>;
291280906Sganbold			linebytes = <2160>;
292280906Sganbold		};
293280906Sganbold	};
294280906Sganbold
295280906Sganbold	chosen {
296280906Sganbold		stdin = "uart0";
297280906Sganbold		stdout = "uart0";
298280906Sganbold	};
299280906Sganbold};
300281415Sganbold
301281415Sganbold&clk81 {
302281415Sganbold	clock-frequency = <0>;
303281415Sganbold};
304281415Sganbold
305281415Sganbold&uart_AO {
306281415Sganbold	status = "okay";
307281415Sganbold	current-speed = <115200>;
308281415Sganbold};
309