ddf2dda
From: Hans de Goede <hdegoede@redhat.com>
ddf2dda
Date: Tue, 30 Sep 2014 14:29:26 +0100
ddf2dda
Subject: [PATCH] arm: dts sun7i bananapi
ddf2dda
05b52e7
The Banana Pi is an A20 based development board using Raspberry Pi compatible
05b52e7
IO headers. It comes with 1 GB RAM, 1 Gb ethernet, 2x USB host, sata, hdmi
05b52e7
and stereo audio out + various expenansion headers:
05b52e7
05b52e7
Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
05b52e7
---
05b52e7
 arch/arm/boot/dts/Makefile               |   1 +
05b52e7
 arch/arm/boot/dts/sun7i-a20-bananapi.dts | 177 +++++++++++++++++++++++++++++++
ddf2dda
 2 files changed, 178 insertions(+)
05b52e7
 create mode 100644 arch/arm/boot/dts/sun7i-a20-bananapi.dts
05b52e7
05b52e7
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
5917cde
index 38c89cafa1ab..63422bde3a46 100644
05b52e7
--- a/arch/arm/boot/dts/Makefile
05b52e7
+++ b/arch/arm/boot/dts/Makefile
5917cde
@@ -435,6 +435,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
05b52e7
 	sun6i-a31-hummingbird.dtb \
05b52e7
 	sun6i-a31-m9.dtb
05b52e7
 dtb-$(CONFIG_MACH_SUN7I) += \
05b52e7
+	sun7i-a20-bananapi.dtb \
05b52e7
 	sun7i-a20-cubieboard2.dtb \
05b52e7
 	sun7i-a20-cubietruck.dtb \
5bc66d5
 	sun7i-a20-hummingbird.dtb \
05b52e7
diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
05b52e7
new file mode 100644
ddf2dda
index 000000000000..7214475a3c36
05b52e7
--- /dev/null
05b52e7
+++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
05b52e7
@@ -0,0 +1,177 @@
05b52e7
+/*
05b52e7
+ * Copyright 2014 Hans de Goede <hdegoede@xxxxxxxxxx>
05b52e7
+ *
05b52e7
+ * The code contained herein is licensed under the GNU General Public
05b52e7
+ * License. You may obtain a copy of the GNU General Public License
05b52e7
+ * Version 2 or later at the following locations:
05b52e7
+ *
05b52e7
+ * http://www.opensource.org/licenses/gpl-license.html
05b52e7
+ * http://www.gnu.org/copyleft/gpl.html
05b52e7
+ */
05b52e7
+
05b52e7
+/dts-v1/;
05b52e7
+/include/ "sun7i-a20.dtsi"
05b52e7
+/include/ "sunxi-common-regulators.dtsi"
05b52e7
+
05b52e7
+/ {
05b52e7
+	model = "LeMaker Banana Pi";
05b52e7
+	compatible = "lemaker,bananapi", "allwinner,sun7i-a20";
05b52e7
+
05b52e7
+	soc@01c00000 {
05b52e7
+		mmc0: mmc@01c0f000 {
05b52e7
+			pinctrl-names = "default";
05b52e7
+			pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>;
05b52e7
+			vmmc-supply = <&reg_vcc3v3>;
05b52e7
+			bus-width = <4>;
05b52e7
+			cd-gpios = <&pio 7 10 0>; /* PH10 */
05b52e7
+			cd-inverted;
05b52e7
+			status = "okay";
05b52e7
+		};
05b52e7
+
05b52e7
+		usbphy: phy@01c13400 {
05b52e7
+			usb1_vbus-supply = <&reg_usb1_vbus>;
05b52e7
+			usb2_vbus-supply = <&reg_usb2_vbus>;
05b52e7
+			status = "okay";
05b52e7
+		};
05b52e7
+
05b52e7
+		ehci0: usb@01c14000 {
05b52e7
+			status = "okay";
05b52e7
+		};
05b52e7
+
05b52e7
+		ohci0: usb@01c14400 {
05b52e7
+			status = "okay";
05b52e7
+		};
05b52e7
+
05b52e7
+		ahci: sata@01c18000 {
05b52e7
+			status = "okay";
05b52e7
+		};
05b52e7
+
05b52e7
+		ehci1: usb@01c1c000 {
05b52e7
+			status = "okay";
05b52e7
+		};
05b52e7
+
05b52e7
+		ohci1: usb@01c1c400 {
05b52e7
+			status = "okay";
05b52e7
+		};
05b52e7
+
05b52e7
+		pinctrl@01c20800 {
05b52e7
+			uart3_pins_bananapi: uart3_pin@0 {
05b52e7
+				allwinner,pins = "PH0", "PH1";
05b52e7
+				allwinner,function = "uart3";
05b52e7
+				allwinner,drive = <0>;
05b52e7
+				allwinner,pull = <0>;
05b52e7
+			};
05b52e7
+
05b52e7
+			mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
05b52e7
+				allwinner,pins = "PH10";
05b52e7
+				allwinner,function = "gpio_in";
05b52e7
+				allwinner,drive = <0>;
05b52e7
+				allwinner,pull = <1>;
05b52e7
+			};
05b52e7
+
05b52e7
+			gmac_power_pin_bananapi: gmac_power_pin@0 {
05b52e7
+				allwinner,pins = "PH23";
05b52e7
+				allwinner,function = "gpio_out";
05b52e7
+				allwinner,drive = <0>;
05b52e7
+				allwinner,pull = <0>;
05b52e7
+			};
05b52e7
+
05b52e7
+			led_pins_bananapi: led_pins@0 {
05b52e7
+				allwinner,pins = "PH24";
05b52e7
+				allwinner,function = "gpio_out";
05b52e7
+				allwinner,drive = <0>;
05b52e7
+				allwinner,pull = <0>;
05b52e7
+			};
05b52e7
+		};
05b52e7
+
05b52e7
+		ir0: ir@01c21800 {
05b52e7
+			pinctrl-names = "default";
05b52e7
+			pinctrl-0 = <&ir0_pins_a>;
05b52e7
+			status = "okay";
05b52e7
+		};
05b52e7
+
05b52e7
+		uart0: serial@01c28000 {
05b52e7
+			pinctrl-names = "default";
05b52e7
+			pinctrl-0 = <&uart0_pins_a>;
05b52e7
+			status = "okay";
05b52e7
+		};
05b52e7
+
05b52e7
+		uart3: serial@01c28c00 {
05b52e7
+			pinctrl-names = "default";
05b52e7
+			pinctrl-0 = <&uart3_pins_bananapi>;
05b52e7
+			status = "okay";
05b52e7
+		};
05b52e7
+
05b52e7
+		uart7: serial@01c29c00 {
05b52e7
+			pinctrl-names = "default";
05b52e7
+			pinctrl-0 = <&uart7_pins_a>;
05b52e7
+			status = "okay";
05b52e7
+		};
05b52e7
+
05b52e7
+		i2c0: i2c@01c2ac00 {
05b52e7
+			pinctrl-names = "default";
05b52e7
+			pinctrl-0 = <&i2c0_pins_a>;
05b52e7
+			status = "okay";
05b52e7
+
05b52e7
+			axp209: pmic@34 {
05b52e7
+				compatible = "x-powers,axp209";
05b52e7
+				reg = <0x34>;
05b52e7
+				interrupt-parent = <&nmi_intc>;
05b52e7
+				interrupts = <0 8>;
05b52e7
+
05b52e7
+				interrupt-controller;
05b52e7
+				#interrupt-cells = <1>;
05b52e7
+			};
05b52e7
+		};
05b52e7
+
05b52e7
+		i2c2: i2c@01c2b400 {
05b52e7
+			pinctrl-names = "default";
05b52e7
+			pinctrl-0 = <&i2c2_pins_a>;
05b52e7
+			status = "okay";
05b52e7
+		};
05b52e7
+
05b52e7
+		gmac: ethernet@01c50000 {
05b52e7
+			pinctrl-names = "default";
05b52e7
+			pinctrl-0 = <&gmac_pins_rgmii_a>;
05b52e7
+			phy = <&phy1>;
05b52e7
+			phy-mode = "rgmii";
05b52e7
+			phy-supply = <&reg_gmac_3v3>;
05b52e7
+			status = "okay";
05b52e7
+
05b52e7
+			phy1: ethernet-phy@1 {
05b52e7
+				reg = <1>;
05b52e7
+			};
05b52e7
+		};
05b52e7
+	};
05b52e7
+
05b52e7
+	leds {
05b52e7
+		compatible = "gpio-leds";
05b52e7
+		pinctrl-names = "default";
05b52e7
+		pinctrl-0 = <&led_pins_bananapi>;
05b52e7
+
05b52e7
+		green {
05b52e7
+			label = "bananapi:green:usr";
05b52e7
+			gpios = <&pio 7 24 0>;
05b52e7
+		};
05b52e7
+	};
05b52e7
+
05b52e7
+	reg_usb1_vbus: usb1-vbus {
05b52e7
+		status = "okay";
05b52e7
+	};
05b52e7
+
05b52e7
+	reg_usb2_vbus: usb2-vbus {
05b52e7
+		status = "okay";
05b52e7
+	};
05b52e7
+
05b52e7
+	reg_gmac_3v3: gmac-3v3 {
05b52e7
+		compatible = "regulator-fixed";
05b52e7
+		pinctrl-names = "default";
05b52e7
+		pinctrl-0 = <&gmac_power_pin_bananapi>;
05b52e7
+		regulator-name = "gmac-3v3";
05b52e7
+		regulator-min-microvolt = <3300000>;
05b52e7
+		regulator-max-microvolt = <3300000>;
05b52e7
+		startup-delay-us = <50000>;
05b52e7
+		enable-active-high;
05b52e7
+		gpio = <&pio 7 23 0>;
05b52e7
+	};
05b52e7
+};
05b52e7
-- 
1e63a38
2.1.0
ddf2dda