Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
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#include <dt-bindings/pwm/pwm.h>
49#include <dt-bindings/input/input.h>
50
51/ {
52 model = "TBS A711 Tablet";
53 compatible = "tbs-biometrics,a711", "allwinner,sun8i-a83t";
54
55 aliases {
56 serial0 = &uart0;
57 serial1 = &uart1;
58 };
59
60 chosen {
61 stdout-path = "serial0:115200n8";
62 };
63
64 backlight: backlight {
65 compatible = "pwm-backlight";
66 pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
67 enable-gpios = <&pio 3 29 GPIO_ACTIVE_HIGH>;
68
69 brightness-levels = <0 1 2 4 8 16 32 64 128 255>;
70 default-brightness-level = <9>;
71 };
72
73 panel {
74 compatible = "tbs,a711-panel", "panel-lvds";
75 backlight = <&backlight>;
76 power-supply = <®_sw>;
77
78 width-mm = <153>;
79 height-mm = <90>;
80 data-mapping = "vesa-24";
81
82 panel-timing {
83 /* 1024x600 @60Hz */
84 clock-frequency = <52000000>;
85 hactive = <1024>;
86 vactive = <600>;
87 hsync-len = <20>;
88 hfront-porch = <180>;
89 hback-porch = <160>;
90 vfront-porch = <12>;
91 vback-porch = <23>;
92 vsync-len = <5>;
93 };
94
95 port {
96 panel_input: endpoint {
97 remote-endpoint = <&tcon0_out_lcd>;
98 };
99 };
100 };
101
102 reg_gps: reg-gps {
103 compatible = "regulator-fixed";
104 regulator-name = "gps";
105 regulator-min-microvolt = <3000000>;
106 regulator-max-microvolt = <3000000>;
107 };
108
109 reg_vbat: reg-vbat {
110 compatible = "regulator-fixed";
111 regulator-name = "vbat";
112 regulator-min-microvolt = <3700000>;
113 regulator-max-microvolt = <3700000>;
114 };
115
116 reg_vmain: reg-vmain {
117 compatible = "regulator-fixed";
118 regulator-name = "vmain";
119 regulator-min-microvolt = <5000000>;
120 regulator-max-microvolt = <5000000>;
121 gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>;
122 enable-active-high;
123 vin-supply = <®_vbat>;
124 };
125
126 wifi_pwrseq: wifi_pwrseq {
127 compatible = "mmc-pwrseq-simple";
128 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 WL-PMU-EN */
129
130 /*
131 * This is actually Bluetooth's clock, but we have to
132 * hook it up somewheere
133 */
134 clocks = <&ac100_rtc 1>;
135 clock-names = "ext_clock";
136 };
137};
138
139&cpu0 {
140 cpu-supply = <®_dcdc2>;
141};
142
143&cpu100 {
144 cpu-supply = <®_dcdc3>;
145};
146
147&de {
148 status = "okay";
149};
150
151/*
152 * An USB-2 hub is connected here, which also means we don't need to
153 * enable the OHCI controller.
154 */
155&ehci0 {
156 status = "okay";
157};
158
159/*
160 * There's a modem connected here that needs to be initialised before
161 * being able to be enumerated.
162 */
163&ehci1 {
164 status = "okay";
165};
166
167&i2c1 {
168 clock-frequency = <400000>;
169 status = "okay";
170
171 accelerometer@18 {
172 compatible = "bosch,bma250";
173 reg = <0x18>;
174 interrupt-parent = <&pio>;
175 interrupts = <7 10 IRQ_TYPE_EDGE_RISING>; /* PH10 / EINT10 */
176 };
177};
178
179&mmc0 {
180 vmmc-supply = <®_dcdc1>;
181 pinctrl-names = "default";
182 pinctrl-0 = <&mmc0_pins>;
183 bus-width = <4>;
184 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
185 status = "okay";
186};
187
188&mmc1 {
189 mmc-pwrseq = <&wifi_pwrseq>;
190 bus-width = <4>;
191 vmmc-supply = <®_dldo1>;
192 vqmmc-supply = <®_dldo1>;
193 non-removable;
194 wakeup-source;
195 status = "okay";
196
197 brcmf: wifi@1 {
198 reg = <1>;
199 compatible = "brcm,bcm4329-fmac";
200 interrupt-parent = <&r_pio>;
201 interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 WL_WAKE_UP */
202 interrupt-names = "host-wake";
203 };
204};
205
206&mmc2 {
207 pinctrl-0 = <&mmc2_8bit_emmc_pins>;
208 pinctrl-names = "default";
209 vmmc-supply = <®_dcdc1>;
210 vqmmc-supply = <®_dcdc1>;
211 bus-width = <8>;
212 non-removable;
213 cap-mmc-hw-reset;
214 status = "okay";
215};
216
217&pwm {
218 pinctrl-names = "default";
219 pinctrl-0 = <&pwm_pin>;
220 status = "okay";
221};
222
223&r_lradc {
224 vref-supply = <®_aldo2>;
225 status = "okay";
226
227 button-210 {
228 label = "Volume Up";
229 linux,code = <KEY_VOLUMEUP>;
230 channel = <0>;
231 voltage = <210000>;
232 };
233
234 button-410 {
235 label = "Volume Down";
236 linux,code = <KEY_VOLUMEDOWN>;
237 channel = <0>;
238 voltage = <410000>;
239 };
240};
241
242&r_rsb {
243 status = "okay";
244
245 axp81x: pmic@3a3 {
246 compatible = "x-powers,axp813";
247 reg = <0x3a3>;
248 interrupt-parent = <&r_intc>;
249 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
250 swin-supply = <®_dcdc1>;
251 x-powers,drive-vbus-en;
252 };
253
254 ac100: codec@e89 {
255 compatible = "x-powers,ac100";
256 reg = <0xe89>;
257
258 ac100_codec: codec {
259 compatible = "x-powers,ac100-codec";
260 interrupt-parent = <&r_pio>;
261 interrupts = <0 12 IRQ_TYPE_LEVEL_LOW>; /* PL12 */
262 #clock-cells = <0>;
263 clock-output-names = "4M_adda";
264 };
265
266 ac100_rtc: rtc {
267 compatible = "x-powers,ac100-rtc";
268 interrupt-parent = <&r_intc>;
269 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
270 clocks = <&ac100_codec>;
271 #clock-cells = <1>;
272 clock-output-names = "cko1_rtc",
273 "cko2_rtc",
274 "cko3_rtc";
275 };
276 };
277
278};
279
280#include "axp81x.dtsi"
281
282&battery_power_supply {
283 status = "okay";
284};
285
286®_aldo1 {
287 regulator-min-microvolt = <1800000>;
288 regulator-max-microvolt = <1800000>;
289 regulator-name = "vcc-1.8";
290};
291
292®_aldo2 {
293 regulator-min-microvolt = <1800000>;
294 regulator-max-microvolt = <1800000>;
295 regulator-always-on;
296 regulator-name = "vdd-drampll";
297};
298
299®_aldo3 {
300 regulator-min-microvolt = <3000000>;
301 regulator-max-microvolt = <3000000>;
302 regulator-always-on;
303 regulator-name = "avcc";
304};
305
306®_dcdc1 {
307 regulator-min-microvolt = <3100000>;
308 regulator-max-microvolt = <3100000>;
309 regulator-always-on;
310 regulator-name = "vcc-io";
311};
312
313®_dcdc2 {
314 regulator-min-microvolt = <700000>;
315 regulator-max-microvolt = <1100000>;
316 regulator-always-on;
317 regulator-name = "vdd-cpu-A";
318};
319
320®_dcdc3 {
321 regulator-min-microvolt = <700000>;
322 regulator-max-microvolt = <1100000>;
323 regulator-always-on;
324 regulator-name = "vdd-cpu-B";
325};
326
327®_dcdc4 {
328 regulator-min-microvolt = <700000>;
329 regulator-max-microvolt = <1100000>;
330 regulator-name = "vdd-gpu";
331};
332
333®_dcdc5 {
334 regulator-min-microvolt = <1200000>;
335 regulator-max-microvolt = <1500000>;
336 regulator-always-on;
337 regulator-name = "vcc-dram";
338};
339
340®_dcdc6 {
341 regulator-min-microvolt = <900000>;
342 regulator-max-microvolt = <900000>;
343 regulator-always-on;
344 regulator-name = "vdd-sys";
345};
346
347®_dldo1 {
348 regulator-min-microvolt = <3100000>;
349 regulator-max-microvolt = <3100000>;
350 regulator-name = "vcc-wifi-io";
351};
352
353®_dldo2 {
354 regulator-min-microvolt = <2800000>;
355 regulator-max-microvolt = <4200000>;
356 regulator-name = "vcc-mipi";
357};
358
359®_dldo3 {
360 regulator-min-microvolt = <2800000>;
361 regulator-max-microvolt = <2800000>;
362 regulator-name = "vdd-csi";
363};
364
365®_dldo4 {
366 regulator-min-microvolt = <2800000>;
367 regulator-max-microvolt = <2800000>;
368 regulator-name = "avdd-csi";
369};
370
371®_drivevbus {
372 regulator-name = "usb0-vbus";
373 status = "okay";
374};
375
376®_eldo1 {
377 regulator-min-microvolt = <1200000>;
378 regulator-max-microvolt = <1800000>;
379 regulator-name = "dvdd-csi-r";
380};
381
382®_eldo2 {
383 regulator-min-microvolt = <1800000>;
384 regulator-max-microvolt = <1800000>;
385 regulator-name = "vcc-dsi";
386};
387
388®_eldo3 {
389 regulator-min-microvolt = <1200000>;
390 regulator-max-microvolt = <1800000>;
391 regulator-name = "dvdd-csi-f";
392};
393
394®_fldo1 {
395 regulator-min-microvolt = <1200000>;
396 regulator-max-microvolt = <1200000>;
397 regulator-name = "vcc-hsic";
398};
399
400®_fldo2 {
401 regulator-min-microvolt = <700000>;
402 regulator-max-microvolt = <1100000>;
403 regulator-always-on;
404 regulator-name = "vdd-cpus";
405};
406
407®_ldo_io0 {
408 regulator-min-microvolt = <3100000>;
409 regulator-max-microvolt = <3100000>;
410 regulator-name = "vcc-ctp";
411 status = "okay";
412};
413
414®_ldo_io1 {
415 regulator-min-microvolt = <3100000>;
416 regulator-max-microvolt = <3100000>;
417 regulator-name = "vcc-vb";
418 status = "okay";
419};
420
421®_sw {
422 regulator-min-microvolt = <3100000>;
423 regulator-max-microvolt = <3100000>;
424 regulator-name = "vcc-lcd";
425};
426
427&tcon0 {
428 pinctrl-names = "default";
429 pinctrl-0 = <&lcd_lvds_pins>;
430};
431
432&tcon0_out {
433 tcon0_out_lcd: endpoint {
434 remote-endpoint = <&panel_input>;
435 };
436};
437
438&uart0 {
439 pinctrl-names = "default";
440 pinctrl-0 = <&uart0_pb_pins>;
441 status = "okay";
442};
443
444/* There's the BT part of the AP6210 connected to that UART */
445&uart1 {
446 pinctrl-names = "default";
447 pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
448 uart-has-rtscts;
449 status = "okay";
450
451 bluetooth {
452 compatible = "brcm,bcm20702a1";
453 clocks = <&ac100_rtc 1>;
454 clock-names = "lpo";
455 vbat-supply = <®_vbat>;
456 vddio-supply = <®_dldo1>;
457 device-wakeup-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
458 host-wakeup-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */
459 shutdown-gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
460 max-speed = <1500000>;
461 };
462};
463
464&uart2 {
465 pinctrl-names = "default";
466 pinctrl-0 = <&uart2_pb_pins>;
467 status = "okay";
468
469 gnss {
470 compatible = "u-blox,neo-6m";
471
472 v-bckp-supply = <®_rtc_ldo>;
473 vcc-supply = <®_gps>;
474 current-speed = <9600>;
475 };
476};
477
478&usb_otg {
479 dr_mode = "otg";
480 status = "okay";
481};
482
483&usbphy {
484 usb0_id_det-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
485 usb0_vbus-supply = <®_drivevbus>;
486 usb1_vbus-supply = <®_vmain>;
487 usb2_vbus-supply = <®_vmain>;
488 status = "okay";
489};