1 From 3613d535a77270eaf15a5f988a48434c7d1530f2 Mon Sep 17 00:00:00 2001
2 From: Hans de Goede <hdegoede@redhat.com>
3 Date: Wed, 7 Jan 2015 20:44:52 +0100
4 Subject: [PATCH] ARM: dts: sun7i: Add dts file for Bananapro board
6 Add support for the new Bananapro A20 development board from lemaker.org.
7 This board features 1G RAM, 2 USB A receptacles, 1 micro USB receptacle for
8 OTG, 1 micro USB receptacle for power, HDMI, sata, Gbit ethernet, ir receiver,
9 3.5 mm jack for a/v out, on board microphone, 40 gpio pins and sdio wifi.
11 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
13 arch/arm/boot/dts/Makefile | 1 +
14 arch/arm/boot/dts/sun7i-a20-bananapro.dts | 261 ++++++++++++++++++++++++++++++
15 2 files changed, 262 insertions(+)
16 create mode 100644 arch/arm/boot/dts/sun7i-a20-bananapro.dts
18 --- a/arch/arm/boot/dts/Makefile
19 +++ b/arch/arm/boot/dts/Makefile
20 @@ -436,6 +436,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
22 dtb-$(CONFIG_MACH_SUN7I) += \
23 sun7i-a20-bananapi.dtb \
24 + sun7i-a20-bananapro.dtb \
25 sun7i-a20-cubieboard2.dtb \
26 sun7i-a20-cubietruck.dtb \
27 sun7i-a20-hummingbird.dtb \
29 +++ b/arch/arm/boot/dts/sun7i-a20-bananapro.dts
32 + * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
34 + * This file is dual-licensed: you can use it either under the terms
35 + * of the GPL or the X11 license, at your option. Note that this dual
36 + * licensing only applies to this file, and not this project as a
39 + * a) This file is free software; you can redistribute it and/or
40 + * modify it under the terms of the GNU General Public License as
41 + * published by the Free Software Foundation; either version 2 of the
42 + * License, or (at your option) any later version.
44 + * This file is distributed in the hope that it will be useful,
45 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
46 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47 + * GNU General Public License for more details.
49 + * You should have received a copy of the GNU General Public
50 + * License along with this file; if not, write to the Free
51 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
54 + * Or, alternatively,
56 + * b) Permission is hereby granted, free of charge, to any person
57 + * obtaining a copy of this software and associated documentation
58 + * files (the "Software"), to deal in the Software without
59 + * restriction, including without limitation the rights to use,
60 + * copy, modify, merge, publish, distribute, sublicense, and/or
61 + * sell copies of the Software, and to permit persons to whom the
62 + * Software is furnished to do so, subject to the following
65 + * The above copyright notice and this permission notice shall be
66 + * included in all copies or substantial portions of the Software.
68 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
69 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
70 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
71 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
72 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
73 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
74 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
75 + * OTHER DEALINGS IN THE SOFTWARE.
79 +/include/ "sun7i-a20.dtsi"
80 +/include/ "sunxi-common-regulators.dtsi"
83 + model = "LeMaker Banana Pro";
84 + compatible = "lemaker,bananapro", "allwinner,sun7i-a20";
87 + spi0: spi@01c05000 {
88 + pinctrl-names = "default";
89 + pinctrl-0 = <&spi0_pins_a>;
93 + mmc0: mmc@01c0f000 {
94 + pinctrl-names = "default";
95 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>;
96 + vmmc-supply = <®_vcc3v3>;
98 + cd-gpios = <&pio 7 10 0>; /* PH10 */
103 + mmc3: mmc@01c12000 {
104 + pinctrl-names = "default";
105 + pinctrl-0 = <&mmc3_pins_a>;
106 + vmmc-supply = <®_vmmc3>;
112 + usbphy: phy@01c13400 {
113 + usb1_vbus-supply = <®_usb1_vbus>;
114 + usb2_vbus-supply = <®_usb2_vbus>;
118 + ehci0: usb@01c14000 {
122 + ohci0: usb@01c14400 {
126 + ahci: sata@01c18000 {
130 + ehci1: usb@01c1c000 {
134 + ohci1: usb@01c1c400 {
139 + usb1_vbus_pin_bananapro: usb1_vbus_pin@0 {
140 + allwinner,pins = "PH0";
141 + allwinner,function = "gpio_out";
142 + allwinner,drive = <0>;
143 + allwinner,pull = <0>;
146 + usb2_vbus_pin_bananapro: usb2_vbus_pin@0 {
147 + allwinner,pins = "PH1";
148 + allwinner,function = "gpio_out";
149 + allwinner,drive = <0>;
150 + allwinner,pull = <0>;
153 + mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
154 + allwinner,pins = "PH10";
155 + allwinner,function = "gpio_in";
156 + allwinner,drive = <0>;
157 + allwinner,pull = <1>;
160 + vmmc3_pin_bananapro: vmmc3_pin@0 {
161 + allwinner,pins = "PH22";
162 + allwinner,function = "gpio_out";
163 + allwinner,drive = <0>;
164 + allwinner,pull = <0>;
167 + gmac_power_pin_bananapi: gmac_power_pin@0 {
168 + allwinner,pins = "PH23";
169 + allwinner,function = "gpio_out";
170 + allwinner,drive = <0>;
171 + allwinner,pull = <0>;
174 + led_pins_bananapi: led_pins@0 {
175 + allwinner,pins = "PH24", "PG2";
176 + allwinner,function = "gpio_out";
177 + allwinner,drive = <0>;
178 + allwinner,pull = <0>;
183 + pinctrl-names = "default";
184 + pinctrl-0 = <&ir0_pins_a>;
188 + uart0: serial@01c28000 {
189 + pinctrl-names = "default";
190 + pinctrl-0 = <&uart0_pins_a>;
194 + uart2: serial@01c28800 {
195 + pinctrl-names = "default";
196 + pinctrl-0 = <&uart2_pins_a>;
200 + uart7: serial@01c29c00 {
201 + pinctrl-names = "default";
202 + pinctrl-0 = <&uart7_pins_a>;
206 + i2c0: i2c@01c2ac00 {
207 + pinctrl-names = "default";
208 + pinctrl-0 = <&i2c0_pins_a>;
212 + compatible = "x-powers,axp209";
214 + interrupt-parent = <&nmi_intc>;
215 + interrupts = <0 8>;
217 + interrupt-controller;
218 + #interrupt-cells = <1>;
222 + i2c2: i2c@01c2b400 {
223 + pinctrl-names = "default";
224 + pinctrl-0 = <&i2c2_pins_a>;
228 + gmac: ethernet@01c50000 {
229 + pinctrl-names = "default";
230 + pinctrl-0 = <&gmac_pins_rgmii_a>;
232 + phy-mode = "rgmii";
233 + phy-supply = <®_gmac_3v3>;
236 + phy1: ethernet-phy@1 {
243 + compatible = "gpio-leds";
244 + pinctrl-names = "default";
245 + pinctrl-0 = <&led_pins_bananapi>;
248 + label = "bananapi:green:usr";
249 + gpios = <&pio 7 24 0>;
252 + label = "bananapi:blue:usr";
253 + gpios = <&pio 6 2 0>;
257 + reg_usb1_vbus: usb1-vbus {
258 + pinctrl-0 = <&usb1_vbus_pin_bananapro>;
259 + gpio = <&pio 7 0 0>; /* PH0 */
263 + reg_usb2_vbus: usb2-vbus {
264 + pinctrl-0 = <&usb2_vbus_pin_bananapro>;
265 + gpio = <&pio 7 1 0>; /* PH1 */
269 + reg_gmac_3v3: gmac-3v3 {
270 + compatible = "regulator-fixed";
271 + pinctrl-names = "default";
272 + pinctrl-0 = <&gmac_power_pin_bananapi>;
273 + regulator-name = "gmac-3v3";
274 + regulator-min-microvolt = <3300000>;
275 + regulator-max-microvolt = <3300000>;
276 + startup-delay-us = <100000>;
277 + enable-active-high;
278 + gpio = <&pio 7 23 0>;
282 + compatible = "regulator-fixed";
283 + pinctrl-names = "default";
284 + pinctrl-0 = <&vmmc3_pin_bananapro>;
285 + regulator-name = "vmmc3";
286 + regulator-min-microvolt = <3300000>;
287 + regulator-max-microvolt = <3300000>;
288 + enable-active-high;
289 + gpio = <&pio 7 22 0>;