]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/gnu/dts/arm/sun9i-a80-cubieboard4.dts
Merge lldb trunk r300422 and resolve conflicts.
[FreeBSD/FreeBSD.git] / sys / gnu / dts / arm / sun9i-a80-cubieboard4.dts
1 /*
2  * Copyright 2015 Tyler Baker
3  *
4  * Tyler Baker <tyler.baker@linaro.org>
5  * Chen-Yu Tsai <wens@csie.org>
6  *
7  * This file is dual-licensed: you can use it either under the terms
8  * of the GPL or the X11 license, at your option. Note that this dual
9  * licensing only applies to this file, and not this project as a
10  * whole.
11  *
12  *  a) This file is free software; you can redistribute it and/or
13  *     modify it under the terms of the GNU General Public License as
14  *     published by the Free Software Foundation; either version 2 of the
15  *     License, or (at your option) any later version.
16  *
17  *     This file is distributed in the hope that it will be useful,
18  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
19  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  *     GNU General Public License for more details.
21  *
22  * Or, alternatively,
23  *
24  *  b) Permission is hereby granted, free of charge, to any person
25  *     obtaining a copy of this software and associated documentation
26  *     files (the "Software"), to deal in the Software without
27  *     restriction, including without limitation the rights to use,
28  *     copy, modify, merge, publish, distribute, sublicense, and/or
29  *     sell copies of the Software, and to permit persons to whom the
30  *     Software is furnished to do so, subject to the following
31  *     conditions:
32  *
33  *     The above copyright notice and this permission notice shall be
34  *     included in all copies or substantial portions of the Software.
35  *
36  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
38  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
40  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
41  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
42  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
43  *     OTHER DEALINGS IN THE SOFTWARE.
44  */
45
46 /dts-v1/;
47 #include "sun9i-a80.dtsi"
48
49 #include <dt-bindings/gpio/gpio.h>
50 #include <dt-bindings/pinctrl/sun4i-a10.h>
51
52 / {
53         model = "Cubietech Cubieboard4";
54         compatible = "cubietech,a80-cubieboard4", "allwinner,sun9i-a80";
55
56         aliases {
57                 serial0 = &uart0;
58         };
59
60         chosen {
61                 stdout-path = "serial0:115200n8";
62         };
63
64         leds {
65                 compatible = "gpio-leds";
66                 pinctrl-names = "default";
67                 pinctrl-0 = <&led_pins_cubieboard4>;
68
69                 green {
70                         label = "cubieboard4:green:usr";
71                         gpios = <&pio 7 17 GPIO_ACTIVE_HIGH>; /* PH17 */
72                 };
73
74                 red {
75                         label = "cubieboard4:red:usr";
76                         gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
77                 };
78         };
79
80         wifi_pwrseq: wifi_pwrseq {
81                 compatible = "mmc-pwrseq-simple";
82                 clocks = <&ac100_rtc 1>;
83                 clock-names = "ext_clock";
84                 /* enables internal regulator and de-asserts reset */
85                 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 WL-PMU-EN */
86         };
87 };
88
89 &mmc0 {
90         pinctrl-names = "default";
91         pinctrl-0 = <&mmc0_pins>, <&mmc0_cd_pin_cubieboard4>;
92         vmmc-supply = <&reg_dcdc1>;
93         bus-width = <4>;
94         cd-gpios = <&pio 7 18 GPIO_ACTIVE_HIGH>; /* PH18 */
95         cd-inverted;
96         status = "okay";
97 };
98
99 &mmc1 {
100         pinctrl-names = "default";
101         pinctrl-0 = <&mmc1_pins>, <&wifi_en_pin_cubieboard4>;
102         vmmc-supply = <&reg_dldo1>;
103         vqmmc-supply = <&reg_cldo3>;
104         mmc-pwrseq = <&wifi_pwrseq>;
105         bus-width = <4>;
106         non-removable;
107         status = "okay";
108 };
109
110 &mmc1_pins {
111         allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
112 };
113
114 &mmc2 {
115         pinctrl-names = "default";
116         pinctrl-0 = <&mmc2_8bit_pins>;
117         vmmc-supply = <&reg_dcdc1>;
118         bus-width = <8>;
119         non-removable;
120         cap-mmc-hw-reset;
121         status = "okay";
122 };
123
124 &mmc2_8bit_pins {
125         /* Increase drive strength for DDR modes */
126         allwinner,drive = <SUN4I_PINCTRL_40_MA>;
127 };
128
129 &osc32k {
130         /* osc32k input is from AC100 */
131         clocks = <&ac100_rtc 0>;
132 };
133
134 &pio {
135         led_pins_cubieboard4: led-pins@0 {
136                 allwinner,pins = "PH6", "PH17";
137                 allwinner,function = "gpio_out";
138                 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
139                 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
140         };
141
142         mmc0_cd_pin_cubieboard4: mmc0_cd_pin@0 {
143                 allwinner,pins = "PH18";
144                 allwinner,function = "gpio_in";
145                 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
146                 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
147         };
148 };
149
150 &r_ir {
151         status = "okay";
152 };
153
154 &r_pio {
155         wifi_en_pin_cubieboard4: wifi_en_pin@0 {
156                 allwinner,pins = "PL2";
157                 allwinner,function = "gpio_out";
158                 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
159                 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
160         };
161 };
162
163 &r_rsb {
164         status = "okay";
165
166         axp809: pmic@3a3 {
167                 reg = <0x3a3>;
168                 interrupt-parent = <&nmi_intc>;
169                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
170
171                 regulators {
172                         reg_aldo1: aldo1 {
173                                 /*
174                                  * TODO: This should be handled by the
175                                  * USB PHY driver.
176                                  */
177                                 regulator-always-on;
178                                 regulator-min-microvolt = <3000000>;
179                                 regulator-max-microvolt = <3000000>;
180                                 regulator-name = "vcc33-usbh";
181                         };
182
183                         reg_aldo2: aldo2 {
184                                 regulator-min-microvolt = <1800000>;
185                                 regulator-max-microvolt = <1800000>;
186                                 regulator-name = "vcc-pb-io-cam";
187                         };
188
189                         aldo3 {
190                                 /* unused */
191                         };
192
193                         reg_dc5ldo: dc5ldo {
194                                 regulator-always-on;
195                                 regulator-min-microvolt = <800000>;
196                                 regulator-max-microvolt = <1100000>;
197                                 regulator-name = "vdd-cpus-09-usbh";
198                         };
199
200                         reg_dcdc1: dcdc1 {
201                                 regulator-always-on;
202                                 regulator-min-microvolt = <3000000>;
203                                 regulator-max-microvolt = <3000000>;
204                                 regulator-name = "vcc-3v";
205                         };
206
207                         reg_dcdc2: dcdc2 {
208                                 regulator-min-microvolt = <800000>;
209                                 regulator-max-microvolt = <1100000>;
210                                 regulator-name = "vdd-gpu";
211                         };
212
213                         reg_dcdc3: dcdc3 {
214                                 regulator-always-on;
215                                 regulator-min-microvolt = <800000>;
216                                 regulator-max-microvolt = <1100000>;
217                                 regulator-name = "vdd-cpua";
218                         };
219
220                         reg_dcdc4: dcdc4 {
221                                 regulator-always-on;
222                                 regulator-min-microvolt = <800000>;
223                                 regulator-max-microvolt = <1100000>;
224                                 regulator-name = "vdd-sys-usb0-hdmi";
225                         };
226
227                         reg_dcdc5: dcdc5 {
228                                 regulator-always-on;
229                                 regulator-min-microvolt = <1425000>;
230                                 regulator-max-microvolt = <1575000>;
231                                 regulator-name = "vcc-dram";
232                         };
233
234                         reg_dldo1: dldo1 {
235                                 /*
236                                  * The WiFi chip supports a wide range
237                                  * (3.0 ~ 4.8V) of voltages, and so does
238                                  * this regulator (3.0 ~ 4.2V), but
239                                  * Allwinner SDK always sets it to 3.3V.
240                                  */
241                                 regulator-min-microvolt = <3300000>;
242                                 regulator-max-microvolt = <3300000>;
243                                 regulator-name = "vcc-wifi";
244                         };
245
246                         reg_dldo2: dldo2 {
247                                 regulator-always-on;
248                                 regulator-min-microvolt = <3000000>;
249                                 regulator-max-microvolt = <3000000>;
250                                 regulator-name = "vcc-pl";
251                         };
252
253                         reg_eldo1: eldo1 {
254                                 regulator-min-microvolt = <1200000>;
255                                 regulator-max-microvolt = <1200000>;
256                                 regulator-name = "vcc-dvdd-cam";
257                         };
258
259                         reg_eldo2: eldo2 {
260                                 regulator-min-microvolt = <1800000>;
261                                 regulator-max-microvolt = <1800000>;
262                                 regulator-name = "vcc-pe";
263                         };
264
265                         reg_eldo3: eldo3 {
266                                 regulator-always-on;
267                                 regulator-min-microvolt = <3000000>;
268                                 regulator-max-microvolt = <3000000>;
269                                 regulator-name = "vcc-pm-codec-io1";
270                         };
271
272                         reg_ldo_io0: ldo_io0 {
273                                 regulator-always-on;
274                                 regulator-min-microvolt = <3000000>;
275                                 regulator-max-microvolt = <3000000>;
276                                 regulator-name = "vcc-pg";
277                         };
278
279                         reg_ldo_io1: ldo_io1 {
280                                 regulator-min-microvolt = <2500000>;
281                                 regulator-max-microvolt = <2500000>;
282                                 regulator-name = "vcc-pa-gmac-2v5";
283                         };
284
285                         reg_rtc_ldo: rtc_ldo {
286                                 regulator-name = "vcc-rtc-vdd1v8-io";
287                         };
288
289                         sw {
290                                 /* unused */
291                         };
292                 };
293         };
294
295         axp806: pmic@745 {
296                 compatible = "x-powers,axp806";
297                 reg = <0x745>;
298                 interrupt-parent = <&nmi_intc>;
299                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
300                 interrupt-controller;
301                 #interrupt-cells = <1>;
302                 bldoin-supply = <&reg_dcdce>;
303
304                 regulators {
305                         reg_s_aldo1: aldo1 {
306                                 regulator-always-on;
307                                 regulator-min-microvolt = <3000000>;
308                                 regulator-max-microvolt = <3000000>;
309                                 regulator-name = "avcc";
310                         };
311
312                         aldo2 {
313                                 /*
314                                  * unused, but use a different name to
315                                  * avoid name clash with axp809's aldo's
316                                  */
317                                 regulator-name = "s_aldo2";
318                         };
319
320                         aldo3 {
321                                 /*
322                                  * unused, but use a different name to
323                                  * avoid name clash with axp809's aldo's
324                                  */
325                                 regulator-name = "s_aldo3";
326                         };
327
328                         reg_bldo1: bldo1 {
329                                 regulator-always-on;
330                                 regulator-min-microvolt = <1700000>;
331                                 regulator-max-microvolt = <1900000>;
332                                 regulator-name = "vcc18-efuse-adc-display-csi";
333                         };
334
335                         reg_bldo2: bldo2 {
336                                 regulator-always-on;
337                                 regulator-min-microvolt = <1700000>;
338                                 regulator-max-microvolt = <1900000>;
339                                 regulator-name =
340                                         "vdd18-drampll-vcc18-pll-cpvdd";
341                         };
342
343                         bldo3 {
344                                 /* unused */
345                         };
346
347                         reg_bldo4: bldo4 {
348                                 regulator-min-microvolt = <1100000>;
349                                 regulator-max-microvolt = <1300000>;
350                                 regulator-name = "vcc12-hsic";
351                         };
352
353                         reg_cldo1: cldo1 {
354                                 /*
355                                  * This was 3V in the original design, but
356                                  * 3.3V is the recommended supply voltage
357                                  * for the Ethernet PHY.
358                                  */
359                                 regulator-min-microvolt = <3300000>;
360                                 regulator-max-microvolt = <3300000>;
361                                 regulator-name = "vcc-gmac-phy";
362                         };
363
364                         reg_cldo2: cldo2 {
365                                 regulator-min-microvolt = <2800000>;
366                                 regulator-max-microvolt = <2800000>;
367                                 regulator-name = "afvcc-cam";
368                         };
369
370                         reg_cldo3: cldo3 {
371                                 regulator-min-microvolt = <3000000>;
372                                 regulator-max-microvolt = <3000000>;
373                                 regulator-name = "vcc-io-wifi-codec-io2";
374                         };
375
376                         reg_dcdca: dcdca {
377                                 regulator-always-on;
378                                 regulator-min-microvolt = <800000>;
379                                 regulator-max-microvolt = <1100000>;
380                                 regulator-name = "vdd-cpub";
381                         };
382
383                         reg_dcdcd: dcdcd {
384                                 regulator-always-on;
385                                 regulator-min-microvolt = <800000>;
386                                 regulator-max-microvolt = <1100000>;
387                                 regulator-name = "vdd-vpu";
388                         };
389
390                         reg_dcdce: dcdce {
391                                 regulator-always-on;
392                                 regulator-min-microvolt = <2100000>;
393                                 regulator-max-microvolt = <2100000>;
394                                 regulator-name = "vcc-bldo-codec-ldoin";
395                         };
396
397                         sw {
398                                 /*
399                                  * unused, but use a different name to
400                                  * avoid name clash with axp809's sw
401                                  */
402                                 regulator-name = "s_sw";
403                         };
404                 };
405         };
406
407         ac100: codec@e89 {
408                 compatible = "x-powers,ac100";
409                 reg = <0xe89>;
410
411                 ac100_codec: codec {
412                         compatible = "x-powers,ac100-codec";
413                         interrupt-parent = <&r_pio>;
414                         interrupts = <0 9 IRQ_TYPE_LEVEL_LOW>; /* PL9 */
415                         #clock-cells = <0>;
416                         clock-output-names = "4M_adda";
417                 };
418
419                 ac100_rtc: rtc {
420                         compatible = "x-powers,ac100-rtc";
421                         interrupt-parent = <&nmi_intc>;
422                         interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
423                         clocks = <&ac100_codec>;
424                         #clock-cells = <1>;
425                         clock-output-names = "cko1_rtc",
426                                              "cko2_rtc",
427                                              "cko3_rtc";
428                 };
429         };
430 };
431
432 #include "axp809.dtsi"
433
434 &uart0 {
435         pinctrl-names = "default";
436         pinctrl-0 = <&uart0_pins_a>;
437         status = "okay";
438 };