1 From 29b4146ec174f0f598d6b454caa335e8f57e392b Mon Sep 17 00:00:00 2001
2 From: Hans de Goede <hdegoede@redhat.com>
3 Date: Mon, 28 Jul 2014 23:05:14 +0200
4 Subject: [PATCH] ARM: dts: sun7i: Add Banana Pi board
6 The Banana Pi is an A20 based development board using Raspberry Pi compatible
7 IO headers. It comes with 1 GB RAM, 1 Gb ethernet, 2x USB host, sata, hdmi
8 and stereo audio out + various expenansion headers:
10 http://www.lemaker.org/
12 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
14 arch/arm/boot/dts/Makefile | 1 +
15 arch/arm/boot/dts/sun7i-a20-bananapi.dts | 214 +++++++++++++++++++++++++++++++
16 2 files changed, 215 insertions(+)
17 create mode 100644 arch/arm/boot/dts/sun7i-a20-bananapi.dts
19 diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
20 index 38c89ca..63422bd 100644
21 --- a/arch/arm/boot/dts/Makefile
22 +++ b/arch/arm/boot/dts/Makefile
23 @@ -435,6 +435,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
24 sun6i-a31-hummingbird.dtb \
26 dtb-$(CONFIG_MACH_SUN7I) += \
27 + sun7i-a20-bananapi.dtb \
28 sun7i-a20-cubieboard2.dtb \
29 sun7i-a20-cubietruck.dtb \
30 sun7i-a20-hummingbird.dtb \
31 diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
33 index 0000000..0e7c9f5
35 +++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
38 + * Copyright 2014 Hans de Goede <hdegoede@redhat.com>
40 + * Hans de Goede <hdegoede@redhat.com>
42 + * This file is dual-licensed: you can use it either under the terms
43 + * of the GPL or the X11 license, at your option. Note that this dual
44 + * licensing only applies to this file, and not this project as a
47 + * a) This library is free software; you can redistribute it and/or
48 + * modify it under the terms of the GNU General Public License as
49 + * published by the Free Software Foundation; either version 2 of the
50 + * License, or (at your option) any later version.
52 + * This library is distributed in the hope that it will be useful,
53 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
54 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
55 + * GNU General Public License for more details.
57 + * You should have received a copy of the GNU General Public
58 + * License along with this library; if not, write to the Free
59 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
62 + * Or, alternatively,
64 + * b) Permission is hereby granted, free of charge, to any person
65 + * obtaining a copy of this software and associated documentation
66 + * files (the "Software"), to deal in the Software without
67 + * restriction, including without limitation the rights to use,
68 + * copy, modify, merge, publish, distribute, sublicense, and/or
69 + * sell copies of the Software, and to permit persons to whom the
70 + * Software is furnished to do so, subject to the following
73 + * The above copyright notice and this permission notice shall be
74 + * included in all copies or substantial portions of the Software.
76 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
77 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
78 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
79 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
80 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
81 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
82 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
83 + * OTHER DEALINGS IN THE SOFTWARE.
87 +/include/ "sun7i-a20.dtsi"
88 +/include/ "sunxi-common-regulators.dtsi"
91 + model = "LeMaker Banana Pi";
92 + compatible = "lemaker,bananapi", "allwinner,sun7i-a20";
95 + spi0: spi@01c05000 {
96 + pinctrl-names = "default";
97 + pinctrl-0 = <&spi0_pins_a>;
101 + mmc0: mmc@01c0f000 {
102 + pinctrl-names = "default";
103 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>;
104 + vmmc-supply = <®_vcc3v3>;
106 + cd-gpios = <&pio 7 10 0>; /* PH10 */
111 + usbphy: phy@01c13400 {
112 + usb1_vbus-supply = <®_usb1_vbus>;
113 + usb2_vbus-supply = <®_usb2_vbus>;
117 + ehci0: usb@01c14000 {
121 + ohci0: usb@01c14400 {
125 + ahci: sata@01c18000 {
129 + ehci1: usb@01c1c000 {
133 + ohci1: usb@01c1c400 {
138 + mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
139 + allwinner,pins = "PH10";
140 + allwinner,function = "gpio_in";
141 + allwinner,drive = <0>;
142 + allwinner,pull = <1>;
145 + gmac_power_pin_bananapi: gmac_power_pin@0 {
146 + allwinner,pins = "PH23";
147 + allwinner,function = "gpio_out";
148 + allwinner,drive = <0>;
149 + allwinner,pull = <0>;
152 + led_pins_bananapi: led_pins@0 {
153 + allwinner,pins = "PH24";
154 + allwinner,function = "gpio_out";
155 + allwinner,drive = <0>;
156 + allwinner,pull = <0>;
161 + pinctrl-names = "default";
162 + pinctrl-0 = <&ir0_pins_a>;
166 + uart0: serial@01c28000 {
167 + pinctrl-names = "default";
168 + pinctrl-0 = <&uart0_pins_a>;
172 + uart3: serial@01c28c00 {
173 + pinctrl-names = "default";
174 + pinctrl-0 = <&uart3_pins_b>;
178 + uart7: serial@01c29c00 {
179 + pinctrl-names = "default";
180 + pinctrl-0 = <&uart7_pins_a>;
184 + i2c0: i2c@01c2ac00 {
185 + pinctrl-names = "default";
186 + pinctrl-0 = <&i2c0_pins_a>;
190 + compatible = "x-powers,axp209";
192 + interrupt-parent = <&nmi_intc>;
193 + interrupts = <0 8>;
195 + interrupt-controller;
196 + #interrupt-cells = <1>;
200 + i2c2: i2c@01c2b400 {
201 + pinctrl-names = "default";
202 + pinctrl-0 = <&i2c2_pins_a>;
206 + gmac: ethernet@01c50000 {
207 + pinctrl-names = "default";
208 + pinctrl-0 = <&gmac_pins_rgmii_a>;
210 + phy-mode = "rgmii";
211 + phy-supply = <®_gmac_3v3>;
214 + phy1: ethernet-phy@1 {
221 + compatible = "gpio-leds";
222 + pinctrl-names = "default";
223 + pinctrl-0 = <&led_pins_bananapi>;
226 + label = "bananapi:green:usr";
227 + gpios = <&pio 7 24 0>;
231 + reg_usb1_vbus: usb1-vbus {
235 + reg_usb2_vbus: usb2-vbus {
239 + reg_gmac_3v3: gmac-3v3 {
240 + compatible = "regulator-fixed";
241 + pinctrl-names = "default";
242 + pinctrl-0 = <&gmac_power_pin_bananapi>;
243 + regulator-name = "gmac-3v3";
244 + regulator-min-microvolt = <3300000>;
245 + regulator-max-microvolt = <3300000>;
246 + startup-delay-us = <50000>;
247 + enable-active-high;
248 + gpio = <&pio 7 23 0>;