Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / sun8i-a83t-tbs-a711.dts
1 /*
2  * Copyright (C) 2017 Touchless Biometric Systems AG
3  * Tomas Novotny <tomas@novotny.cz>
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-a83t.dtsi"
46
47 #include <dt-bindings/gpio/gpio.h>
48
49 / {
50         model = "TBS A711 Tablet";
51         compatible = "tbs-biometrics,a711", "allwinner,sun8i-a83t";
52
53         aliases {
54                 serial0 = &uart0;
55                 serial1 = &uart1;
56         };
57
58         chosen {
59                 stdout-path = "serial0:115200n8";
60         };
61
62         reg_vbat: reg-vbat {
63                 compatible = "regulator-fixed";
64                 regulator-name = "vbat";
65                 regulator-min-microvolt = <3700000>;
66                 regulator-max-microvolt = <3700000>;
67         };
68
69         reg_vmain: reg-vmain {
70                 compatible = "regulator-fixed";
71                 regulator-name = "vmain";
72                 regulator-min-microvolt = <5000000>;
73                 regulator-max-microvolt = <5000000>;
74                 gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>;
75                 enable-active-high;
76                 vin-supply = <&reg_vbat>;
77         };
78
79         wifi_pwrseq: wifi_pwrseq {
80                 compatible = "mmc-pwrseq-simple";
81                 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 WL-PMU-EN */
82
83                 /*
84                  * This is actually Bluetooth's clock, but we have to
85                  * hook it up somewheere
86                  */
87                 clocks = <&ac100_rtc 1>;
88                 clock-names = "ext_clock";
89         };
90 };
91
92 /*
93  * An USB-2 hub is connected here, which also means we don't need to
94  * enable the OHCI controller.
95  */
96 &ehci0 {
97         status = "okay";
98 };
99
100 /*
101  * There's a modem connected here that needs to be initialised before
102  * being able to be enumerated.
103  */
104 &ehci1 {
105         status = "okay";
106 };
107
108 &mmc0 {
109         vmmc-supply = <&reg_dcdc1>;
110         pinctrl-names = "default";
111         pinctrl-0 = <&mmc0_pins>;
112         cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
113         status = "okay";
114 };
115
116 &mmc1 {
117         mmc-pwrseq = <&wifi_pwrseq>;
118         bus-width = <4>;
119         vmmc-supply = <&reg_dldo1>;
120         vqmmc-supply = <&reg_dldo1>;
121         non-removable;
122         wakeup-source;
123         status = "okay";
124
125         brcmf: wifi@1 {
126                 reg = <1>;
127                 compatible = "brcm,bcm4329-fmac";
128                 interrupt-parent = <&r_pio>;
129                 interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 WL_WAKE_UP */
130                 interrupt-names = "host-wake";
131         };
132 };
133
134 &mmc2 {
135         pinctrl-0 = <&mmc2_8bit_emmc_pins>;
136         pinctrl-names = "default";
137         vmmc-supply = <&reg_dcdc1>;
138         vqmmc-supply = <&reg_dcdc1>;
139         bus-width = <8>;
140         non-removable;
141         cap-mmc-hw-reset;
142         status = "okay";
143 };
144
145 &r_rsb {
146         status = "okay";
147
148         axp81x: pmic@3a3 {
149                 compatible = "x-powers,axp813";
150                 reg = <0x3a3>;
151                 interrupt-parent = <&r_intc>;
152                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
153                 swin-supply = <&reg_dcdc1>;
154                 x-powers,drive-vbus-en;
155         };
156
157         ac100: codec@e89 {
158                 compatible = "x-powers,ac100";
159                 reg = <0xe89>;
160
161                 ac100_codec: codec {
162                         compatible = "x-powers,ac100-codec";
163                         interrupt-parent = <&r_pio>;
164                         interrupts = <0 12 IRQ_TYPE_LEVEL_LOW>; /* PL12 */
165                         #clock-cells = <0>;
166                         clock-output-names = "4M_adda";
167                 };
168
169                 ac100_rtc: rtc {
170                         compatible = "x-powers,ac100-rtc";
171                         interrupt-parent = <&r_intc>;
172                         interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
173                         clocks = <&ac100_codec>;
174                         #clock-cells = <1>;
175                         clock-output-names = "cko1_rtc",
176                                              "cko2_rtc",
177                                              "cko3_rtc";
178                 };
179         };
180
181 };
182
183 #include "axp81x.dtsi"
184
185 &reg_aldo1 {
186         regulator-min-microvolt = <1800000>;
187         regulator-max-microvolt = <1800000>;
188         regulator-name = "vcc-1.8";
189 };
190
191 &reg_aldo2 {
192         regulator-min-microvolt = <1800000>;
193         regulator-max-microvolt = <1800000>;
194         regulator-always-on;
195         regulator-name = "vdd-drampll";
196 };
197
198 &reg_aldo3 {
199         regulator-min-microvolt = <3000000>;
200         regulator-max-microvolt = <3000000>;
201         regulator-always-on;
202         regulator-name = "avcc";
203 };
204
205 &reg_dcdc1 {
206         regulator-min-microvolt = <3100000>;
207         regulator-max-microvolt = <3100000>;
208         regulator-always-on;
209         regulator-name = "vcc-io";
210 };
211
212 &reg_dcdc2 {
213         regulator-min-microvolt = <700000>;
214         regulator-max-microvolt = <1100000>;
215         regulator-always-on;
216         regulator-name = "vdd-cpu-A";
217 };
218
219 &reg_dcdc3 {
220         regulator-min-microvolt = <700000>;
221         regulator-max-microvolt = <1100000>;
222         regulator-always-on;
223         regulator-name = "vdd-cpu-B";
224 };
225
226 &reg_dcdc4 {
227         regulator-min-microvolt = <700000>;
228         regulator-max-microvolt = <1100000>;
229         regulator-name = "vdd-gpu";
230 };
231
232 &reg_dcdc5 {
233         regulator-min-microvolt = <1200000>;
234         regulator-max-microvolt = <1500000>;
235         regulator-always-on;
236         regulator-name = "vcc-dram";
237 };
238
239 &reg_dcdc6 {
240         regulator-min-microvolt = <900000>;
241         regulator-max-microvolt = <900000>;
242         regulator-always-on;
243         regulator-name = "vdd-sys";
244 };
245
246 &reg_dldo1 {
247         regulator-min-microvolt = <3100000>;
248         regulator-max-microvolt = <3100000>;
249         regulator-name = "vcc-wifi-io";
250 };
251
252 &reg_dldo2 {
253         regulator-min-microvolt = <2800000>;
254         regulator-max-microvolt = <4200000>;
255         regulator-name = "vcc-mipi";
256 };
257
258 &reg_dldo3 {
259         regulator-min-microvolt = <2800000>;
260         regulator-max-microvolt = <2800000>;
261         regulator-name = "vdd-csi";
262 };
263
264 &reg_dldo4 {
265         regulator-min-microvolt = <2800000>;
266         regulator-max-microvolt = <2800000>;
267         regulator-name = "avdd-csi";
268 };
269
270 &reg_drivevbus {
271         regulator-name = "usb0-vbus";
272         status = "okay";
273 };
274
275 &reg_eldo1 {
276         regulator-min-microvolt = <1200000>;
277         regulator-max-microvolt = <1800000>;
278         regulator-name = "dvdd-csi-r";
279 };
280
281 &reg_eldo2 {
282         regulator-min-microvolt = <1800000>;
283         regulator-max-microvolt = <1800000>;
284         regulator-name = "vcc-dsi";
285 };
286
287 &reg_eldo3 {
288         regulator-min-microvolt = <1200000>;
289         regulator-max-microvolt = <1800000>;
290         regulator-name = "dvdd-csi-f";
291 };
292
293 &reg_fldo1 {
294         regulator-min-microvolt = <1200000>;
295         regulator-max-microvolt = <1200000>;
296         regulator-name = "vcc-hsic";
297 };
298
299 &reg_fldo2 {
300         regulator-min-microvolt = <700000>;
301         regulator-max-microvolt = <1100000>;
302         regulator-always-on;
303         regulator-name = "vdd-cpus";
304 };
305
306 &reg_ldo_io0 {
307         regulator-min-microvolt = <3100000>;
308         regulator-max-microvolt = <3100000>;
309         regulator-name = "vcc-ctp";
310         status = "okay";
311 };
312
313 &reg_ldo_io1 {
314         regulator-min-microvolt = <3100000>;
315         regulator-max-microvolt = <3100000>;
316         regulator-name = "vcc-vb";
317         status = "okay";
318 };
319
320 &reg_sw {
321         regulator-min-microvolt = <3100000>;
322         regulator-max-microvolt = <3100000>;
323         regulator-name = "vcc-lcd";
324 };
325
326 &uart0 {
327         pinctrl-names = "default";
328         pinctrl-0 = <&uart0_pb_pins>;
329         status = "okay";
330 };
331
332 /* There's the BT part of the AP6210 connected to that UART */
333 &uart1 {
334         pinctrl-names = "default";
335         pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
336         status = "okay";
337 };
338
339 &usb_otg {
340         dr_mode = "otg";
341         status = "okay";
342 };
343
344 &usbphy {
345         usb0_id_det-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
346         usb0_vbus-supply = <&reg_drivevbus>;
347         usb1_vbus_supply = <&reg_vmain>;
348         usb2_vbus_supply = <&reg_vmain>;
349         status = "okay";
350 };