Merge tag 'actions-arm-dt-for-4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel...
[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 #include "sunxi-common-regulators.dtsi"
47
48 / {
49         model = "TBS A711 Tablet";
50         compatible = "tbs-biometrics,a711", "allwinner,sun8i-a83t";
51
52         aliases {
53                 serial0 = &uart0;
54                 serial1 = &uart1;
55         };
56
57         chosen {
58                 stdout-path = "serial0:115200n8";
59         };
60
61         reg_vbat: reg-vbat {
62                 compatible = "regulator-fixed";
63                 regulator-name = "vbat";
64                 regulator-min-microvolt = <3700000>;
65                 regulator-max-microvolt = <3700000>;
66         };
67
68         reg_vmain: reg-vmain {
69                 compatible = "regulator-fixed";
70                 regulator-name = "vmain";
71                 regulator-min-microvolt = <5000000>;
72                 regulator-max-microvolt = <5000000>;
73                 gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>;
74                 enable-active-high;
75                 vin-supply = <&reg_vbat>;
76         };
77
78         wifi_pwrseq: wifi_pwrseq {
79                 compatible = "mmc-pwrseq-simple";
80                 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 WL-PMU-EN */
81
82                 /*
83                  * This is actually Bluetooth's clock, but we have to
84                  * hook it up somewheere
85                  */
86                 clocks = <&ac100_rtc 1>;
87                 clock-names = "ext_clock";
88         };
89 };
90
91 /*
92  * An USB-2 hub is connected here, which also means we don't need to
93  * enable the OHCI controller.
94  */
95 &ehci0 {
96         status = "okay";
97 };
98
99 /*
100  * There's a modem connected here that needs to be initialised before
101  * being able to be enumerated.
102  */
103 &ehci1 {
104         status = "okay";
105 };
106
107 &mmc0 {
108         vmmc-supply = <&reg_vcc3v3>;
109         pinctrl-names = "default";
110         pinctrl-0 = <&mmc0_pins>;
111         cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
112         status = "okay";
113 };
114
115 &mmc1 {
116         mmc-pwrseq = <&wifi_pwrseq>;
117         bus-width = <4>;
118         pinctrl-names = "default";
119         pinctrl-0 = <&mmc1_pins>;
120         vmmc-supply = <&reg_vcc3v3>;
121         vqmmc-supply = <&reg_vcc3v3>;
122         non-removable;
123         wakeup-source;
124         status = "okay";
125
126         brcmf: wifi@1 {
127                 reg = <1>;
128                 compatible = "brcm,bcm4329-fmac";
129                 interrupt-parent = <&r_pio>;
130                 interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 WL_WAKE_UP */
131                 interrupt-names = "host-wake";
132         };
133 };
134
135 &mmc2 {
136         pinctrl-0 = <&mmc2_8bit_emmc_pins>;
137         pinctrl-names = "default";
138         vmmc-supply = <&reg_vcc3v3>;
139         vqmmc-supply = <&reg_vcc3v3>;
140         bus-width = <8>;
141         non-removable;
142         cap-mmc-hw-reset;
143         status = "okay";
144 };
145
146 &r_rsb {
147         status = "okay";
148
149         axp813: pmic@3a3 {
150                 compatible = "x-powers,axp813";
151                 reg = <0x3a3>;
152                 interrupt-parent = <&r_intc>;
153                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
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 &uart0 {
183         pinctrl-names = "default";
184         pinctrl-0 = <&uart0_pb_pins>;
185         status = "okay";
186 };
187
188 /* There's the BT part of the AP6210 connected to that UART */
189 &uart1 {
190         pinctrl-names = "default";
191         pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
192         status = "okay";
193 };
194
195 &usbphy {
196         usb1_vbus_supply = <&reg_vcc5v0>;
197         usb2_vbus_supply = <&reg_vcc5v0>;
198         status = "okay";
199 };