]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/gnu/dts/arm/sun8i-a83t-bananapi-m3.dts
MFV r329766: 8962 zdb should work on non-idle pools
[FreeBSD/FreeBSD.git] / sys / gnu / dts / arm / sun8i-a83t-bananapi-m3.dts
1 /*
2  * Copyright 2017 Chen-Yu Tsai
3  *
4  * Chen-Yu Tsai <wens@csie.org>
5  *
6  * This file is dual-licensed: you can use it either under the terms
7  * of the GPL or the X11 license, at your option. Note that this dual
8  * licensing only applies to this file, and not this project as a
9  * whole.
10  *
11  *  a) This file is free software; you can redistribute it and/or
12  *     modify it under the terms of the GNU General Public License as
13  *     published by the Free Software Foundation; either version 2 of the
14  *     License, or (at your option) any later version.
15  *
16  *     This file is distributed in the hope that it will be useful,
17  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
18  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  *     GNU General Public License for more details.
20  *
21  * Or, alternatively,
22  *
23  *  b) Permission is hereby granted, free of charge, to any person
24  *     obtaining a copy of this software and associated documentation
25  *     files (the "Software"), to deal in the Software without
26  *     restriction, including without limitation the rights to use,
27  *     copy, modify, merge, publish, distribute, sublicense, and/or
28  *     sell copies of the Software, and to permit persons to whom the
29  *     Software is furnished to do so, subject to the following
30  *     conditions:
31  *
32  *     The above copyright notice and this permission notice shall be
33  *     included in all copies or substantial portions of the Software.
34  *
35  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
36  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
37  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
38  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
39  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
40  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
41  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
42  *     OTHER DEALINGS IN THE SOFTWARE.
43  */
44
45 /dts-v1/;
46 #include "sun8i-a83t.dtsi"
47
48 #include <dt-bindings/gpio/gpio.h>
49
50 / {
51         model = "Banana Pi BPI-M3";
52         compatible = "sinovoip,bpi-m3", "allwinner,sun8i-a83t";
53
54         aliases {
55                 serial0 = &uart0;
56         };
57
58         chosen {
59                 stdout-path = "serial0:115200n8";
60         };
61
62         reg_usb1_vbus: reg-usb1-vbus {
63                 compatible = "regulator-fixed";
64                 regulator-name = "usb1-vbus";
65                 regulator-min-microvolt = <5000000>;
66                 regulator-max-microvolt = <5000000>;
67                 regulator-boot-on;
68                 enable-active-high;
69                 gpio = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
70         };
71
72         wifi_pwrseq: wifi_pwrseq {
73                 compatible = "mmc-pwrseq-simple";
74                 clocks = <&ac100_rtc 1>;
75                 clock-names = "ext_clock";
76                 /* The WiFi low power clock must be 32768 Hz */
77                 assigned-clocks = <&ac100_rtc 1>;
78                 assigned-clock-rates = <32768>;
79                 /* enables internal regulator and de-asserts reset */
80                 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 WL-PMU-EN */
81         };
82 };
83
84 &ehci0 {
85         /* Terminus Tech FE 1.1s 4-port USB 2.0 hub here */
86         status = "okay";
87
88         /* TODO GL830 USB-to-SATA bridge downstream w/ GPIO power controls */
89 };
90
91 &mmc0 {
92         pinctrl-names = "default";
93         pinctrl-0 = <&mmc0_pins>;
94         vmmc-supply = <&reg_dcdc1>;
95         bus-width = <4>;
96         cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
97         cd-inverted;
98         status = "okay";
99 };
100
101 &mmc1 {
102         vmmc-supply = <&reg_dldo1>;
103         vqmmc-supply = <&reg_dldo1>;
104         mmc-pwrseq = <&wifi_pwrseq>;
105         bus-width = <4>;
106         non-removable;
107         status = "okay";
108
109         brcmf: wifi@1 {
110                 reg = <1>;
111                 compatible = "brcm,bcm4329-fmac";
112                 interrupt-parent = <&r_pio>;
113                 interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>;
114                 interrupt-names = "host-wake";
115         };
116 };
117
118 &mmc2 {
119         pinctrl-names = "default";
120         pinctrl-0 = <&mmc2_8bit_emmc_pins>;
121         vmmc-supply = <&reg_dcdc1>;
122         vqmmc-supply = <&reg_dcdc1>;
123         bus-width = <8>;
124         non-removable;
125         cap-mmc-hw-reset;
126         status = "okay";
127 };
128
129 &r_rsb {
130         status = "okay";
131
132         axp81x: pmic@3a3 {
133                 compatible = "x-powers,axp813";
134                 reg = <0x3a3>;
135                 interrupt-parent = <&r_intc>;
136                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
137                 eldoin-supply = <&reg_dcdc1>;
138                 fldoin-supply = <&reg_dcdc5>;
139                 swin-supply = <&reg_dcdc1>;
140                 x-powers,drive-vbus-en;
141         };
142
143         ac100: codec@e89 {
144                 compatible = "x-powers,ac100";
145                 reg = <0xe89>;
146
147                 ac100_codec: codec {
148                         compatible = "x-powers,ac100-codec";
149                         interrupt-parent = <&r_pio>;
150                         interrupts = <0 11 IRQ_TYPE_LEVEL_LOW>; /* PL11 */
151                         #clock-cells = <0>;
152                         clock-output-names = "4M_adda";
153                 };
154
155                 ac100_rtc: rtc {
156                         compatible = "x-powers,ac100-rtc";
157                         interrupt-parent = <&r_intc>;
158                         interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
159                         clocks = <&ac100_codec>;
160                         #clock-cells = <1>;
161                         clock-output-names = "cko1_rtc",
162                                              "cko2_rtc",
163                                              "cko3_rtc";
164                 };
165         };
166 };
167
168 #include "axp81x.dtsi"
169
170 &reg_aldo1 {
171         regulator-always-on;
172         regulator-min-microvolt = <1800000>;
173         regulator-max-microvolt = <1800000>;
174         regulator-name = "vcc-1v8";
175 };
176
177 &reg_aldo2 {
178         regulator-always-on;
179         regulator-min-microvolt = <1800000>;
180         regulator-max-microvolt = <1800000>;
181         regulator-name = "dram-pll";
182 };
183
184 &reg_aldo3 {
185         regulator-always-on;
186         regulator-min-microvolt = <3000000>;
187         regulator-max-microvolt = <3000000>;
188         regulator-name = "avcc";
189 };
190
191 &reg_dcdc1 {
192         /* schematics says 3.1V but FEX file says 3.3V */
193         regulator-always-on;
194         regulator-min-microvolt = <3300000>;
195         regulator-max-microvolt = <3300000>;
196         regulator-name = "vcc-3v3";
197 };
198
199 &reg_dcdc2 {
200         regulator-always-on;
201         regulator-min-microvolt = <700000>;
202         regulator-max-microvolt = <1100000>;
203         regulator-name = "vdd-cpua";
204 };
205
206 &reg_dcdc3 {
207         regulator-always-on;
208         regulator-min-microvolt = <700000>;
209         regulator-max-microvolt = <1100000>;
210         regulator-name = "vdd-cpub";
211 };
212
213 &reg_dcdc4 {
214         regulator-min-microvolt = <700000>;
215         regulator-max-microvolt = <1100000>;
216         regulator-name = "vdd-gpu";
217 };
218
219 &reg_dcdc5 {
220         regulator-always-on;
221         regulator-min-microvolt = <1200000>;
222         regulator-max-microvolt = <1200000>;
223         regulator-name = "vcc-dram";
224 };
225
226 &reg_dcdc6 {
227         regulator-always-on;
228         regulator-min-microvolt = <900000>;
229         regulator-max-microvolt = <900000>;
230         regulator-name = "vdd-sys";
231 };
232
233 &reg_dldo1 {
234         /*
235          * This powers both the WiFi/BT module's main power, I/O supply,
236          * and external pull-ups on all the data lines. It should be set
237          * to the same voltage as the I/O supply (DCDC1 in this case) to
238          * avoid any leakage or mismatch.
239          */
240         regulator-min-microvolt = <3300000>;
241         regulator-max-microvolt = <3300000>;
242         regulator-name = "vcc-wifi";
243 };
244
245 &reg_dldo3 {
246         regulator-always-on;
247         regulator-min-microvolt = <2500000>;
248         regulator-max-microvolt = <2500000>;
249         regulator-name = "vcc-pd";
250 };
251
252 &reg_drivevbus {
253         regulator-name = "usb0-vbus";
254         status = "okay";
255 };
256
257 &reg_fldo1 {
258         regulator-min-microvolt = <1080000>;
259         regulator-max-microvolt = <1320000>;
260         regulator-name = "vdd12-hsic";
261 };
262
263 &reg_fldo2 {
264         /*
265          * Despite the embedded CPUs core not being used in any way,
266          * this must remain on or the system will hang.
267          */
268         regulator-always-on;
269         regulator-min-microvolt = <700000>;
270         regulator-max-microvolt = <1100000>;
271         regulator-name = "vdd-cpus";
272 };
273
274 &reg_rtc_ldo {
275         regulator-name = "vcc-rtc";
276 };
277
278 &reg_sw {
279         /*
280          * The PHY requires 20ms after all voltages
281          * are applied until core logic is ready and
282          * 30ms after the reset pin is de-asserted.
283          * Set a 100ms delay to account for PMIC
284          * ramp time and board traces.
285          */
286         regulator-enable-ramp-delay = <100000>;
287         regulator-name = "vcc-ephy";
288 };
289
290 &uart0 {
291         pinctrl-names = "default";
292         pinctrl-0 = <&uart0_pb_pins>;
293         status = "okay";
294 };
295
296 &usbphy {
297         usb1_vbus-supply = <&reg_usb1_vbus>;
298         status = "okay";
299 };