xref: /freebsd-13-stable/sys/dts/arm/yyhd18-m3.dts (revision f8167e0404dab9ffeaca95853dd237ab7c587f82)
1/*-
2 * Copyright (c) 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
27/*
28 * The ordering of certain devices is significant (e.g. usb depends on
29 * usb-phy which depends on gpio, also the timer should appear early on
30 * to provide a reasonably accurate DELAY implementation).
31 */
32
33/dts-v1/;
34
35/memreserve/ 0x84900000 0x00600000;			/* 6MB frame buffer */
36
37#include "meson3.dtsi"
38
39/ {
40	/*
41	 * My development unit is a Yiyate Android TV Box containing
42	 * a HD18 motherboard and an aml8726-m3 SoC ... later versions
43	 * shipped with an aml8726-m6.  Printenv in uboot shows m3-oplay
44	 * as the boardname supplied as part of mmcargs.
45	 */
46
47	model = "yiyate,hd18-m3";
48	compatible = "yiyate,hd18-m3", "amlogic,meson3";
49
50	#address-cells = <1>;
51	#size-cells = <1>;
52
53	aliases {
54		soc = &soc;
55		screen = &screen;
56		uart0 = &uart_AO;
57	};
58
59	memory {
60		device_type = "memory";
61		reg = <0x80000000 0x40000000>;		/* 1GB RAM */
62	};
63
64	soc: soc {
65		device_type = "soc";
66		bus-frequency = <0>;
67
68		ccm@c1104140 {
69			compatible = "amlogic,aml8726-ccm";
70			reg = <0xc1104140 20>;	/* cbus 0x1050 */
71
72			functions = "ethernet", "i2c", "rng", "sdio",
73				    "uart-a", "uart-b", "uart-c",
74				    "usb-a", "usb-b";
75		};
76
77		pinctrl: pinctrl@c11080b0 {
78			compatible = "amlogic,aml8726-pinctrl";
79			reg = <0xc11080b0 40>,	/* mux */
80			      <0xc11080e8 24>,	/* pu/pd */
81			      <0xc11080e8 24>,	/* pull enable */
82			      <0xc8100014 4>,	/* ao mux */
83			      <0xc810002c 4>,	/* ao pu/pd */
84			      <0xc810002c 4>;	/* ao pull enable */
85
86			/*
87			 * Currently only pin muxing that deviates
88			 * from the power on default of gpio is
89			 * specified here.
90			 */
91
92			pinctrl-names = "default";
93			pinctrl-0 = <&pins_uartao &pins_ethernet &pins_hdmi>;
94
95			pins_ethernet: ethernet {
96				amlogic,pins = "clk_out", "tx_en",
97					       "tx_d0",  "tx_d1",
98					       "crs_dv", "rx_err",
99					       "rx_d0",  "rx_d1",
100					       "mdc",    "mdio";
101				amlogic,function = "ethernet";
102			};
103
104			pins_hdmi: hdmi {
105				amlogic,pins = "cec", "hpd",
106					       "scl", "sda";
107				amlogic,function = "hdmi";
108			};
109
110			pins_sdio_b: sdio_b {
111				amlogic,pins = "clk", "cmd",
112					       "d0",  "d1",
113					       "d2",  "d3";
114				amlogic,function = "sdio-b";
115			};
116
117			pins_uartao: uartao {
118				amlogic,pins = "tx", "rx";
119				amlogic,function = "uart-ao";
120			};
121		};
122
123		rtc@c8100740 {
124			compatible = "amlogic,aml8726-rtc";
125			reg = <0xc8100740 20>;	/* aobus 0x1d0 */
126			interrupts = <0 72 1>;	/* AM_IRQ2(8) */
127		};
128
129		clkmsr: clkmsr@c1108758 {
130			compatible = "amlogic,aml8726-clkmsr";
131			reg = <0xc1108758 16>;	/* cbus 0x21d6 */
132
133			clocks = <&clk81>;
134		};
135
136		gpio5: gpio@c110806c {
137			compatible = "amlogic,aml8726-gpio";
138			reg = <0xc110806c 4>,	/* oen cbus 0x201b */
139			      <0xc1108070 4>,	/* out */
140			      <0xc1108074 4>;	/* in */
141
142			gpio-controller;
143			#gpio-cells = <1>;
144			pin-count = <32>;
145		};
146
147		mmc@c1108c20 {
148			compatible = "amlogic,aml8726-mmc";
149			reg = <0xc1108c20 32>;	/* cbus 0x2308 */
150			interrupts = <0 28 1>;	/* AM_IRQ0(28) */
151
152			clocks = <&clk81>;
153
154			pinctrl-names = "default";
155			pinctrl-0 = <&pins_sdio_b>;
156
157			mmc-voltages = "3.3";
158
159			mmc-pwr-en = <&gpio5 31 0>;	/* card_8 */
160			ins-detect = <&gpio5 29 0>;	/* card_6 */
161		};
162
163		rng@c1108100 {
164			compatible = "amlogic,aml8726-rng";
165			reg = <0xc1108100 8>;	/* cbus 0x2040 */
166		};
167
168		usb-phy@c1108400 {
169			/* usb-a and usb-b phy */
170			compatible = "amlogic,aml8726-m3-usb-phy";
171			reg = <0xc1108400 32>;	/* cbus 0x2100 */
172		};
173
174		usb@c9040000 {
175			/* usb-a */
176			compatible = "synopsys,designware-hs-otg2";
177			reg = <0xc9040000 0x40000>;	/* ahbbus 0x40000*/
178			interrupts = <0 30 4>;		/* AM_IRQ0(30) */
179			#address-cells = <1>;
180			#size-cells = <0>;
181		};
182
183		usb@c90c0000 {
184			/* usb-b */
185			compatible = "synopsys,designware-hs-otg2";
186			reg = <0xc90c0000 0x40000>;	/* ahbbus 0xc0000 */
187			interrupts = <0 31 4>;		/* AM_IRQ0(31) */
188			#address-cells = <1>;
189			#size-cells = <0>;
190
191			dr_mode = "host";
192		};
193
194		eth@c9410000 {
195			/* ethernet */
196			compatible = "snps,dwmac";
197			reg = <0xc9410000 0x2000>;	/* ahbbus 0x410000 */
198			interrupts = <0 8 1>;		/* AM_IRQ0(8) */
199			#address-cells = <1>;
200			#size-cells = <0>;
201		};
202
203		screen: fb@c8001324 {
204			device_type = "display";
205			compatible = "amlogic,aml8726-fb";
206			reg = <0xc8001324 12>,		/* CANVAS */
207			      <0xc1106800 1024>,	/* VIU */
208			      <0xc1107400 1024>;	/* VPP */
209			interrupts = <0 2 1>,		/* AM_IRQ0(2) */
210				     <0 3 1>,		/* AM_IRQ0(3) */
211				     <0 12 1>,		/* AM_IRQ0(12) */
212				     <0 13 1>;		/* AM_IRQ0(13) */
213
214			address = <0x84900000>;	/* match memreserve */
215			width = <720>;
216			height = <480>;
217			depth = <24>;
218			linebytes = <2160>;
219		};
220	};
221
222	chosen {
223		stdin = "uart0";
224		stdout = "uart0";
225	};
226};
227
228&clk81 {
229	clock-frequency = <0>;
230};
231
232&uart_AO {
233	status = "okay";
234	current-speed = <115200>;
235};
236