Merge remote-tracking branches 'asoc/fix/msm8916', 'asoc/fix/nau8825', 'asoc/fix...
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / sun8i-a83t-allwinner-h8homlet-v2.dts
1 /*
2  * Copyright 2015 Vishnu Patekar
3  * Vishnu Patekar <vishnupatekar0510@gmail.com>
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 = "Allwinner A83T H8Homlet Proto Dev Board v2.0";
51         compatible = "allwinner,h8homlet-v2", "allwinner,sun8i-a83t";
52
53         aliases {
54                 serial0 = &uart0;
55         };
56
57         chosen {
58                 stdout-path = "serial0:115200n8";
59         };
60
61         reg_usb0_vbus: reg-usb0-vbus {
62                 compatible = "regulator-fixed";
63                 regulator-name = "usb0-vbus";
64                 regulator-min-microvolt = <5000000>;
65                 regulator-max-microvolt = <5000000>;
66                 regulator-boot-on;
67                 enable-active-high;
68                 gpio = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */
69         };
70
71         reg_usb1_vbus: reg-usb1-vbus {
72                 compatible = "regulator-fixed";
73                 regulator-name = "usb1-vbus";
74                 regulator-min-microvolt = <5000000>;
75                 regulator-max-microvolt = <5000000>;
76                 regulator-boot-on;
77                 enable-active-high;
78                 gpio = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
79         };
80 };
81
82 &ehci0 {
83         status = "okay";
84 };
85
86 &mmc0 {
87         pinctrl-names = "default";
88         pinctrl-0 = <&mmc0_pins>;
89         vmmc-supply = <&reg_dcdc1>;
90         cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
91         bus-width = <4>;
92         cd-inverted;
93         status = "okay";
94 };
95
96 &mmc2 {
97         pinctrl-names = "default";
98         pinctrl-0 = <&mmc2_8bit_emmc_pins>;
99         vmmc-supply = <&reg_dcdc1>;
100         vqmmc-supply = <&reg_dcdc1>;
101         bus-width = <8>;
102         non-removable;
103         cap-mmc-hw-reset;
104         status = "okay";
105 };
106
107 &ohci0 {
108         status = "okay";
109 };
110
111 &r_rsb {
112         status = "okay";
113
114         axp81x: pmic@3a3 {
115                 compatible = "x-powers,axp818", "x-powers,axp813";
116                 reg = <0x3a3>;
117                 interrupt-parent = <&r_intc>;
118                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
119                 eldoin-supply = <&reg_dcdc1>;
120                 swin-supply = <&reg_dcdc1>;
121         };
122
123         ac100: codec@e89 {
124                 compatible = "x-powers,ac100";
125                 reg = <0xe89>;
126
127                 ac100_codec: codec {
128                         compatible = "x-powers,ac100-codec";
129                         interrupt-parent = <&r_pio>;
130                         interrupts = <0 11 IRQ_TYPE_LEVEL_LOW>; /* PL11 */
131                         #clock-cells = <0>;
132                         clock-output-names = "4M_adda";
133                 };
134
135                 ac100_rtc: rtc {
136                         compatible = "x-powers,ac100-rtc";
137                         interrupt-parent = <&r_intc>;
138                         interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
139                         clocks = <&ac100_codec>;
140                         #clock-cells = <1>;
141                         clock-output-names = "cko1_rtc",
142                                              "cko2_rtc",
143                                              "cko3_rtc";
144                 };
145         };
146 };
147
148 #include "axp81x.dtsi"
149
150 &reg_aldo1 {
151         regulator-always-on;
152         regulator-min-microvolt = <1800000>;
153         regulator-max-microvolt = <1800000>;
154         regulator-name = "vcc-1v8";
155 };
156
157 &reg_aldo2 {
158         regulator-always-on;
159         regulator-min-microvolt = <1800000>;
160         regulator-max-microvolt = <1800000>;
161         regulator-name = "dram-pll";
162 };
163
164 &reg_aldo3 {
165         regulator-always-on;
166         regulator-min-microvolt = <3000000>;
167         regulator-max-microvolt = <3000000>;
168         regulator-name = "avcc";
169 };
170
171 &reg_dcdc1 {
172         regulator-always-on;
173         regulator-min-microvolt = <3300000>;
174         regulator-max-microvolt = <3300000>;
175         regulator-name = "vcc-3v3";
176 };
177
178 &reg_dcdc2 {
179         regulator-always-on;
180         regulator-min-microvolt = <700000>;
181         regulator-max-microvolt = <1100000>;
182         regulator-name = "vdd-cpua";
183 };
184
185 &reg_dcdc3 {
186         regulator-always-on;
187         regulator-min-microvolt = <700000>;
188         regulator-max-microvolt = <1100000>;
189         regulator-name = "vdd-cpub";
190 };
191
192 &reg_dcdc4 {
193         regulator-min-microvolt = <700000>;
194         regulator-max-microvolt = <1100000>;
195         regulator-name = "vdd-gpu";
196 };
197
198 &reg_dcdc5 {
199         regulator-always-on;
200         regulator-min-microvolt = <1500000>;
201         regulator-max-microvolt = <1500000>;
202         regulator-name = "vcc-dram";
203 };
204
205 &reg_dcdc6 {
206         regulator-always-on;
207         regulator-min-microvolt = <900000>;
208         regulator-max-microvolt = <900000>;
209         regulator-name = "vdd-sys";
210 };
211
212 &reg_dldo2 {
213         regulator-min-microvolt = <3300000>;
214         regulator-max-microvolt = <3300000>;
215         regulator-name = "vcc-mipi";
216 };
217
218 &reg_dldo4 {
219         /*
220          * The PHY requires 20ms after all voltages are applied until core
221          * logic is ready and 30ms after the reset pin is de-asserted.
222          * Set a 100ms delay to account for PMIC ramp time and board traces.
223          */
224         regulator-enable-ramp-delay = <100000>;
225         regulator-min-microvolt = <3300000>;
226         regulator-max-microvolt = <3300000>;
227         regulator-name = "vcc-ephy";
228 };
229
230 &reg_fldo1 {
231         regulator-min-microvolt = <1080000>;
232         regulator-max-microvolt = <1320000>;
233         regulator-name = "vdd12-hsic";
234 };
235
236 &reg_fldo2 {
237         /*
238          * Despite the embedded CPUs core not being used in any way,
239          * this must remain on or the system will hang.
240          */
241         regulator-always-on;
242         regulator-min-microvolt = <700000>;
243         regulator-max-microvolt = <1100000>;
244         regulator-name = "vdd-cpus";
245 };
246
247 &reg_rtc_ldo {
248         regulator-name = "vcc-rtc";
249 };
250
251 &reg_sw {
252         regulator-name = "vcc-wifi";
253 };
254
255 &uart0 {
256         pinctrl-names = "default";
257         pinctrl-0 = <&uart0_pb_pins>;
258         status = "okay";
259 };
260
261 &usbphy {
262         usb0_vbus-supply = <&reg_usb0_vbus>;
263         usb1_vbus-supply = <&reg_usb1_vbus>;
264         status = "okay";
265 };
266
267 &usb_otg {
268         dr_mode = "host";
269         status = "okay";
270 };