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