Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszer...
[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                 reg = <0x3a3>;
150                 interrupt-parent = <&r_intc>;
151                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
152                 swin-supply = <&reg_dcdc1>;
153                 x-powers,drive-vbus-en;
154         };
155
156         ac100: codec@e89 {
157                 compatible = "x-powers,ac100";
158                 reg = <0xe89>;
159
160                 ac100_codec: codec {
161                         compatible = "x-powers,ac100-codec";
162                         interrupt-parent = <&r_pio>;
163                         interrupts = <0 12 IRQ_TYPE_LEVEL_LOW>; /* PL12 */
164                         #clock-cells = <0>;
165                         clock-output-names = "4M_adda";
166                 };
167
168                 ac100_rtc: rtc {
169                         compatible = "x-powers,ac100-rtc";
170                         interrupt-parent = <&r_intc>;
171                         interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
172                         clocks = <&ac100_codec>;
173                         #clock-cells = <1>;
174                         clock-output-names = "cko1_rtc",
175                                              "cko2_rtc",
176                                              "cko3_rtc";
177                 };
178         };
179
180 };
181
182 #include "axp81x.dtsi"
183
184 &reg_aldo1 {
185         regulator-min-microvolt = <1800000>;
186         regulator-max-microvolt = <1800000>;
187         regulator-name = "vcc-1.8";
188 };
189
190 &reg_aldo2 {
191         regulator-min-microvolt = <1800000>;
192         regulator-max-microvolt = <1800000>;
193         regulator-always-on;
194         regulator-name = "vdd-drampll";
195 };
196
197 &reg_aldo3 {
198         regulator-min-microvolt = <3000000>;
199         regulator-max-microvolt = <3000000>;
200         regulator-always-on;
201         regulator-name = "avcc";
202 };
203
204 &reg_dcdc1 {
205         regulator-min-microvolt = <3100000>;
206         regulator-max-microvolt = <3100000>;
207         regulator-always-on;
208         regulator-name = "vcc-io";
209 };
210
211 &reg_dcdc2 {
212         regulator-min-microvolt = <700000>;
213         regulator-max-microvolt = <1100000>;
214         regulator-always-on;
215         regulator-name = "vdd-cpu-A";
216 };
217
218 &reg_dcdc3 {
219         regulator-min-microvolt = <700000>;
220         regulator-max-microvolt = <1100000>;
221         regulator-always-on;
222         regulator-name = "vdd-cpu-B";
223 };
224
225 &reg_dcdc4 {
226         regulator-min-microvolt = <700000>;
227         regulator-max-microvolt = <1100000>;
228         regulator-name = "vdd-gpu";
229 };
230
231 &reg_dcdc5 {
232         regulator-min-microvolt = <1200000>;
233         regulator-max-microvolt = <1500000>;
234         regulator-always-on;
235         regulator-name = "vcc-dram";
236 };
237
238 &reg_dcdc6 {
239         regulator-min-microvolt = <900000>;
240         regulator-max-microvolt = <900000>;
241         regulator-always-on;
242         regulator-name = "vdd-sys";
243 };
244
245 &reg_dldo1 {
246         regulator-min-microvolt = <3100000>;
247         regulator-max-microvolt = <3100000>;
248         regulator-name = "vcc-wifi-io";
249 };
250
251 &reg_dldo2 {
252         regulator-min-microvolt = <2800000>;
253         regulator-max-microvolt = <4200000>;
254         regulator-name = "vcc-mipi";
255 };
256
257 &reg_dldo3 {
258         regulator-min-microvolt = <2800000>;
259         regulator-max-microvolt = <2800000>;
260         regulator-name = "vdd-csi";
261 };
262
263 &reg_dldo4 {
264         regulator-min-microvolt = <2800000>;
265         regulator-max-microvolt = <2800000>;
266         regulator-name = "avdd-csi";
267 };
268
269 &reg_drivevbus {
270         regulator-name = "usb0-vbus";
271         status = "okay";
272 };
273
274 &reg_eldo1 {
275         regulator-min-microvolt = <1200000>;
276         regulator-max-microvolt = <1800000>;
277         regulator-name = "dvdd-csi-r";
278 };
279
280 &reg_eldo2 {
281         regulator-min-microvolt = <1800000>;
282         regulator-max-microvolt = <1800000>;
283         regulator-name = "vcc-dsi";
284 };
285
286 &reg_eldo3 {
287         regulator-min-microvolt = <1200000>;
288         regulator-max-microvolt = <1800000>;
289         regulator-name = "dvdd-csi-f";
290 };
291
292 &reg_fldo1 {
293         regulator-min-microvolt = <1200000>;
294         regulator-max-microvolt = <1200000>;
295         regulator-name = "vcc-hsic";
296 };
297
298 &reg_fldo2 {
299         regulator-min-microvolt = <700000>;
300         regulator-max-microvolt = <1100000>;
301         regulator-always-on;
302         regulator-name = "vdd-cpus";
303 };
304
305 &reg_ldo_io0 {
306         regulator-min-microvolt = <3100000>;
307         regulator-max-microvolt = <3100000>;
308         regulator-name = "vcc-ctp";
309         status = "okay";
310 };
311
312 &reg_ldo_io1 {
313         regulator-min-microvolt = <3100000>;
314         regulator-max-microvolt = <3100000>;
315         regulator-name = "vcc-vb";
316         status = "okay";
317 };
318
319 &reg_sw {
320         regulator-min-microvolt = <3100000>;
321         regulator-max-microvolt = <3100000>;
322         regulator-name = "vcc-lcd";
323 };
324
325 &uart0 {
326         pinctrl-names = "default";
327         pinctrl-0 = <&uart0_pb_pins>;
328         status = "okay";
329 };
330
331 /* There's the BT part of the AP6210 connected to that UART */
332 &uart1 {
333         pinctrl-names = "default";
334         pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
335         status = "okay";
336 };
337
338 &usb_otg {
339         dr_mode = "otg";
340         status = "okay";
341 };
342
343 &usbphy {
344         usb0_id_det-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
345         usb0_vbus-supply = <&reg_drivevbus>;
346         usb1_vbus_supply = <&reg_vmain>;
347         usb2_vbus_supply = <&reg_vmain>;
348         status = "okay";
349 };