2 * Copyright (c) 2017 Free Electrons <maxime.ripard@free-electrons.com>
4 * This file is dual-licensed: you can use it either under the terms
5 * of the GPL or the X11 license, at your option. Note that this dual
6 * licensing only applies to this file, and not this project as a
9 * a) This file is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License, or (at your option) any later version.
14 * This file is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
21 * b) Permission is hereby granted, free of charge, to any person
22 * obtaining a copy of this software and associated documentation
23 * files (the "Software"), to deal in the Software without
24 * restriction, including without limitation the rights to use,
25 * copy, modify, merge, publish, distribute, sublicense, and/or
26 * sell copies of the Software, and to permit persons to whom the
27 * Software is furnished to do so, subject to the following
30 * The above copyright notice and this permission notice shall be
31 * included in all copies or substantial portions of the Software.
33 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40 * OTHER DEALINGS IN THE SOFTWARE.
44 #include "sun8i-a33.dtsi"
46 #include <dt-bindings/gpio/gpio.h>
49 model = "BananaPi M2 Magic";
50 compatible = "sinovoip,bananapi-m2m", "allwinner,sun8i-a33";
61 stdout-path = "serial0:115200n8";
65 compatible = "gpio-leds";
68 label = "bpi-m2m:blue:usr";
69 gpios = <&pio 2 7 GPIO_ACTIVE_LOW>;
73 label = "bpi-m2m:green:usr";
74 gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>;
78 label = "bpi-m2m:red:power";
79 gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
85 compatible = "regulator-fixed";
86 regulator-name = "vcc5v0";
87 regulator-min-microvolt = <5000000>;
88 regulator-max-microvolt = <5000000>;
92 compatible = "mmc-pwrseq-simple";
93 reset-gpios = <&r_pio 0 6 GPIO_ACTIVE_LOW>; /* PL06 */
94 clocks = <&rtc CLK_OSC32K_FANOUT>;
95 clock-names = "ext_clock";
104 cpu-supply = <®_dcdc3>;
109 opp-hz = /bits/ 64 <1104000000>;
110 opp-microvolt = <1320000>;
111 clock-latency-ns = <244144>; /* 8 32k periods */
115 opp-hz = /bits/ 64 <1200000000>;
116 opp-microvolt = <1320000>;
117 clock-latency-ns = <244144>; /* 8 32k periods */
130 vmmc-supply = <®_dcdc1>;
132 cd-gpios = <&pio 1 4 GPIO_ACTIVE_LOW>; /* PB4 */
137 pinctrl-names = "default";
138 pinctrl-0 = <&mmc1_pg_pins>;
139 vmmc-supply = <®_aldo1>;
140 mmc-pwrseq = <&wifi_pwrseq>;
147 pinctrl-names = "default";
148 pinctrl-0 = <&mmc2_8bit_pins>;
149 vmmc-supply = <®_dcdc1>;
164 compatible = "x-powers,axp223";
166 interrupt-parent = <&r_intc>;
167 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
168 eldoin-supply = <®_dcdc1>;
169 x-powers,drive-vbus-en;
173 #include "axp223.dtsi"
181 regulator-min-microvolt = <3000000>;
182 regulator-max-microvolt = <3000000>;
183 regulator-name = "vcc-io";
188 regulator-min-microvolt = <2500000>;
189 regulator-max-microvolt = <2500000>;
190 regulator-name = "vdd-dll";
195 regulator-min-microvolt = <3000000>;
196 regulator-max-microvolt = <3000000>;
197 regulator-name = "avcc";
201 regulator-name = "vcc-lcd";
206 regulator-min-microvolt = <900000>;
207 regulator-max-microvolt = <1400000>;
208 regulator-name = "vdd-cpus";
213 regulator-min-microvolt = <3000000>;
214 regulator-max-microvolt = <3000000>;
215 regulator-name = "vcc-3v0";
220 regulator-min-microvolt = <900000>;
221 regulator-max-microvolt = <1400000>;
222 regulator-name = "vdd-sys";
227 regulator-min-microvolt = <900000>;
228 regulator-max-microvolt = <1400000>;
229 regulator-name = "vdd-cpu";
234 regulator-min-microvolt = <1500000>;
235 regulator-max-microvolt = <1500000>;
236 regulator-name = "vcc-dram";
240 * Our WiFi chip needs both DLDO1 and DLDO2 to be powered at the same
241 * time, with the two being in sync. Since this is not really
242 * supported right now, just use the two as always on, and we will fix
247 regulator-min-microvolt = <3300000>;
248 regulator-max-microvolt = <3300000>;
249 regulator-name = "vcc-wifi0";
254 regulator-min-microvolt = <3300000>;
255 regulator-max-microvolt = <3300000>;
256 regulator-name = "vcc-wifi1";
260 regulator-name = "usb0-vbus";
265 regulator-name = "vcc-rtc";
273 pinctrl-names = "default";
274 pinctrl-0 = <&uart0_pb_pins>;
279 pinctrl-names = "default";
280 pinctrl-0 = <&uart1_pg_pins>, <&uart1_cts_rts_pg_pins>;
285 compatible = "brcm,bcm43438-bt";
286 clocks = <&rtc CLK_OSC32K_FANOUT>;
288 vbat-supply = <®_dldo1>;
289 vddio-supply = <®_aldo3>;
290 device-wakeup-gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
291 host-wakeup-gpios = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */
292 shutdown-gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
306 usb0_id_det-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
307 usb0_vbus_power-supply = <&usb_power_supply>;
308 usb0_vbus-supply = <®_drivevbus>;
309 usb1_vbus-supply = <®_vcc5v0>;