Merge branch 'asoc-4.20' into asoc-linus
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / sun8i-r40-bananapi-m2-ultra.dts
1 /*
2  * Copyright (C) 2017 Chen-Yu Tsai <wens@csie.org>
3  * Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io>
4  *
5  * This file is dual-licensed: you can use it either under the terms
6  * of the GPL or the X11 license, at your option. Note that this dual
7  * licensing only applies to this file, and not this project as a
8  * whole.
9  *
10  *  a) This file is free software; you can redistribute it and/or
11  *     modify it under the terms of the GNU General Public License as
12  *     published by the Free Software Foundation; either version 2 of the
13  *     License, or (at your option) any later version.
14  *
15  *     This file is distributed in the hope that it will be useful,
16  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
17  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  *     GNU General Public License for more details.
19  *
20  * Or, alternatively,
21  *
22  *  b) Permission is hereby granted, free of charge, to any person
23  *     obtaining a copy of this software and associated documentation
24  *     files (the "Software"), to deal in the Software without
25  *     restriction, including without limitation the rights to use,
26  *     copy, modify, merge, publish, distribute, sublicense, and/or
27  *     sell copies of the Software, and to permit persons to whom the
28  *     Software is furnished to do so, subject to the following
29  *     conditions:
30  *
31  *     The above copyright notice and this permission notice shall be
32  *     included in all copies or substantial portions of the Software.
33  *
34  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
35  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
36  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
38  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
39  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
40  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
41  *     OTHER DEALINGS IN THE SOFTWARE.
42  */
43
44 /dts-v1/;
45 #include "sun8i-r40.dtsi"
46
47 #include <dt-bindings/gpio/gpio.h>
48
49 / {
50         model = "Banana Pi BPI-M2-Ultra";
51         compatible = "sinovoip,bpi-m2-ultra", "allwinner,sun8i-r40";
52
53         aliases {
54                 ethernet0 = &gmac;
55                 serial0 = &uart0;
56         };
57
58         chosen {
59                 stdout-path = "serial0:115200n8";
60         };
61
62         connector {
63                 compatible = "hdmi-connector";
64                 type = "a";
65
66                 port {
67                         hdmi_con_in: endpoint {
68                                 remote-endpoint = <&hdmi_out_con>;
69                         };
70                 };
71         };
72
73         leds {
74                 compatible = "gpio-leds";
75
76                 pwr-led {
77                         label = "bananapi:red:pwr";
78                         gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
79                         default-state = "on";
80                 };
81
82                 user-led-green {
83                         label = "bananapi:green:user";
84                         gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
85                 };
86
87                 user-led-blue {
88                         label = "bananapi:blue:user";
89                         gpios = <&pio 7 22 GPIO_ACTIVE_HIGH>;
90                 };
91         };
92
93         reg_vcc5v0: vcc5v0 {
94                 compatible = "regulator-fixed";
95                 regulator-name = "vcc5v0";
96                 regulator-min-microvolt = <5000000>;
97                 regulator-max-microvolt = <5000000>;
98                 gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; /* PH23 */
99                 enable-active-high;
100         };
101
102         wifi_pwrseq: wifi_pwrseq {
103                 compatible = "mmc-pwrseq-simple";
104                 reset-gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 WIFI_EN */
105         };
106 };
107
108 &ahci {
109         ahci-supply = <&reg_dldo4>;
110         phy-supply = <&reg_eldo3>;
111         status = "okay";
112 };
113
114 &de {
115         status = "okay";
116 };
117
118 &ehci1 {
119         status = "okay";
120 };
121
122 &ehci2 {
123         status = "okay";
124 };
125
126 &gmac {
127         pinctrl-names = "default";
128         pinctrl-0 = <&gmac_rgmii_pins>;
129         phy-handle = <&phy1>;
130         phy-mode = "rgmii";
131         phy-supply = <&reg_dc1sw>;
132         status = "okay";
133 };
134
135 &gmac_mdio {
136         phy1: ethernet-phy@1 {
137                 compatible = "ethernet-phy-ieee802.3-c22";
138                 reg = <1>;
139         };
140 };
141
142 &hdmi {
143         status = "okay";
144 };
145
146 &hdmi_out {
147         hdmi_out_con: endpoint {
148                 remote-endpoint = <&hdmi_con_in>;
149         };
150 };
151
152 &i2c0 {
153         status = "okay";
154
155         axp22x: pmic@34 {
156                 compatible = "x-powers,axp221";
157                 reg = <0x34>;
158                 interrupt-parent = <&nmi_intc>;
159                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
160         };
161 };
162
163 #include "axp22x.dtsi"
164
165 &mmc0 {
166         vmmc-supply = <&reg_dcdc1>;
167         bus-width = <4>;
168         cd-gpios = <&pio 7 13 GPIO_ACTIVE_LOW>; /* PH13 */
169         status = "okay";
170 };
171
172 &mmc1 {
173         pinctrl-names = "default";
174         pinctrl-0 = <&mmc1_pg_pins>;
175         vmmc-supply = <&reg_dldo2>;
176         vqmmc-supply = <&reg_dldo1>;
177         mmc-pwrseq = <&wifi_pwrseq>;
178         bus-width = <4>;
179         non-removable;
180         status = "okay";
181 };
182
183 &mmc2 {
184         vmmc-supply = <&reg_dcdc1>;
185         vqmmc-supply = <&reg_dcdc1>;
186         bus-width = <8>;
187         non-removable;
188         status = "okay";
189 };
190
191 &ohci1 {
192         status = "okay";
193 };
194
195 &ohci2 {
196         status = "okay";
197 };
198
199 &reg_aldo2 {
200         regulator-always-on;
201         regulator-min-microvolt = <2500000>;
202         regulator-max-microvolt = <2500000>;
203         regulator-name = "vcc-pa";
204 };
205
206 &reg_aldo3 {
207         regulator-always-on;
208         regulator-min-microvolt = <2700000>;
209         regulator-max-microvolt = <3300000>;
210         regulator-name = "avcc";
211 };
212
213 &reg_dc1sw {
214         regulator-min-microvolt = <3000000>;
215         regulator-max-microvolt = <3000000>;
216         regulator-name = "vcc-gmac-phy";
217 };
218
219 &reg_dcdc1 {
220         regulator-always-on;
221         regulator-min-microvolt = <3000000>;
222         regulator-max-microvolt = <3000000>;
223         regulator-name = "vcc-3v0";
224 };
225
226 &reg_dcdc2 {
227         regulator-always-on;
228         regulator-min-microvolt = <1000000>;
229         regulator-max-microvolt = <1300000>;
230         regulator-name = "vdd-cpu";
231 };
232
233 &reg_dcdc3 {
234         regulator-always-on;
235         regulator-min-microvolt = <1000000>;
236         regulator-max-microvolt = <1300000>;
237         regulator-name = "vdd-sys";
238 };
239
240 &reg_dcdc5 {
241         regulator-always-on;
242         regulator-min-microvolt = <1500000>;
243         regulator-max-microvolt = <1500000>;
244         regulator-name = "vcc-dram";
245 };
246
247 &reg_dldo1 {
248         regulator-min-microvolt = <1800000>;
249         regulator-max-microvolt = <3300000>;
250         regulator-name = "vcc-wifi-io";
251 };
252
253 &reg_dldo2 {
254         regulator-min-microvolt = <3300000>;
255         regulator-max-microvolt = <3300000>;
256         regulator-name = "vcc-wifi";
257 };
258
259 &reg_dldo4 {
260         regulator-min-microvolt = <2500000>;
261         regulator-max-microvolt = <2500000>;
262         regulator-name = "vdd2v5-sata";
263 };
264
265 &reg_eldo3 {
266         regulator-min-microvolt = <1200000>;
267         regulator-max-microvolt = <1200000>;
268         regulator-name = "vdd1v2-sata";
269 };
270
271 &tcon_tv0 {
272         status = "okay";
273 };
274
275 &uart0 {
276         pinctrl-names = "default";
277         pinctrl-0 = <&uart0_pb_pins>;
278         status = "okay";
279 };
280
281 &usbphy {
282         usb1_vbus-supply = <&reg_vcc5v0>;
283         usb2_vbus-supply = <&reg_vcc5v0>;
284         status = "okay";
285 };