Claen up BPi M2 configuration
This commit is contained in:
parent
18e53b4a1b
commit
8ca3dcd622
@ -1,8 +1,7 @@
|
||||
# A31 quad core 1Gb SoC Wifi
|
||||
# A31s quad core 1Gb SoC Wifi
|
||||
BOARD_NAME="Banana Pi M2"
|
||||
LINUXFAMILY="sun6i"
|
||||
BOOTCONFIG="Sinovoip_BPI_M2_defconfig"
|
||||
MODULES="hci_uart gpio_sunxi rfcomm hidp sunxi-ir bonding spi_sun7i 8021q a20_tp"
|
||||
MODULES_NEXT="brcmfmac bonding"
|
||||
CLI_TARGET="jessie:next"
|
||||
DESKTOP_TARGET="xenial:next"
|
||||
|
||||
@ -2,12 +2,6 @@
|
||||
source "${BASH_SOURCE%/*}/sunxi_common.inc"
|
||||
|
||||
case $BRANCH in
|
||||
default)
|
||||
KERNELSOURCE='https://github.com/linux-sunxi/linux-sunxi'
|
||||
KERNELBRANCH='branch:sunxi-3.4'
|
||||
KERNELDIR='linux-sunxi'
|
||||
;;
|
||||
|
||||
dev)
|
||||
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELBRANCH='branch:master'
|
||||
|
||||
@ -1,262 +0,0 @@
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index 246473a..9135557
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -574,6 +574,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
|
||||
sun6i-a31-app4-evb1.dtb \
|
||||
sun6i-a31-colombus.dtb \
|
||||
sun6i-a31-hummingbird.dtb \
|
||||
+ sun6i-a31s-bananapi-m2.dtb \
|
||||
sun6i-a31-i7.dtb \
|
||||
sun6i-a31-m9.dtb \
|
||||
sun6i-a31-mele-a1000g-quad.dtb \
|
||||
diff --git a/arch/arm/boot/dts/sun6i-a31s-bananapi-m2.dts b/arch/arm/boot/dts/sun6i-a31s-bananapi-m2.dts
|
||||
new file mode 100644
|
||||
index 0000000..6bbed73
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/sun6i-a31s-bananapi-m2.dts
|
||||
@@ -0,0 +1,244 @@
|
||||
+/*
|
||||
+ * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License as
|
||||
+ * published by the Free Software Foundation; either version 2 of the
|
||||
+ * License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively,
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use,
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "sun6i-a31.dtsi"
|
||||
+#include "sunxi-common-regulators.dtsi"
|
||||
+
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/pinctrl/sun4i-a10.h>
|
||||
+
|
||||
+/ {
|
||||
+ model = "Banana Pi BPI-M2";
|
||||
+ compatible = "sinovoip,bpi-m2", "allwinner,sun6i-a31";
|
||||
+
|
||||
+ aliases {
|
||||
+ serial0 = &uart0;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&led_pins_bananapi>;
|
||||
+ green {
|
||||
+ label = "bananapi:green:usr";
|
||||
+ gpios = <&pio 6 10 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
+ };
|
||||
+ blue {
|
||||
+ label = "bananapi:blue:usr";
|
||||
+ gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "mmc0";
|
||||
+ };
|
||||
+ red {
|
||||
+ label = "bananapi:red:usr";
|
||||
+ gpios = <&pio 6 5 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "default-on";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ g40_leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&g40_pins_bananapi>;
|
||||
+ pm2 {
|
||||
+ label = "bananapi:pm2:usr";
|
||||
+ gpios = <&r_pio 1 2 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ reg_vmmc2: vmmc2 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vmmc2_pin_bananapi>;
|
||||
+ regulator-name = "vmmc2";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ enable-active-high;
|
||||
+ gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
|
||||
+// gpio = <&r_pio 1 0 GPIO_ACTIVE_HIGH>; /* PM0 */
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&ohci0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&ehci0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&gmac {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&gmac_pins_rgmii_a>;
|
||||
+ phy = <&phy1>;
|
||||
+ phy-mode = "rgmii";
|
||||
+ snps,reset-gpio = <&pio 0 21 GPIO_ACTIVE_HIGH>;
|
||||
+ snps,reset-active-low;
|
||||
+ snps,reset-delays-us = <0 10000 30000>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ phy1: ethernet-phy@1 {
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c0_pins_a>;
|
||||
+ /* pull-ups and devices require AXP221 DLDO3 */
|
||||
+ status = "failed";
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c1_pins_a>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c2 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c2_pins_a>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&mmc0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>;
|
||||
+ vmmc-supply = <®_vcc3v0>;
|
||||
+ bus-width = <4>;
|
||||
+ cd-gpios = <&pio 0 4 GPIO_ACTIVE_HIGH>; /* PA4 */
|
||||
+ cd-inverted;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&mmc2 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mmc2_pins_a>;
|
||||
+ vmmc-supply = <®_vmmc2>;
|
||||
+ bus-width = <4>;
|
||||
+ non-removable;
|
||||
+ enable-sdio-wakeup;
|
||||
+ status = "okay";
|
||||
+
|
||||
+/*
|
||||
+ brcmf: bcrmf@1 {
|
||||
+ reg = <1>;
|
||||
+ compatible = "brcm,bcm4329-fmac";
|
||||
+ interrupt-parent = <&pio>;
|
||||
+ interrupts = <5 0>;
|
||||
+ interrupt-names = "host-wake";
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+*/
|
||||
+};
|
||||
+
|
||||
+&mmc0_pins_a {
|
||||
+ /* external pull-ups missing for some pins */
|
||||
+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
+};
|
||||
+
|
||||
+&mmc2_pins_a {
|
||||
+ /* external pull-ups missing for some pins */
|
||||
+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
+};
|
||||
+
|
||||
+&pio {
|
||||
+ led_pins_bananapi: led_pins@0 {
|
||||
+ allwinner,pins = "PG10", "PG5", "PG11";
|
||||
+ allwinner,function = "gpio_out";
|
||||
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
+ };
|
||||
+
|
||||
+ mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
|
||||
+ allwinner,pins = "PA4";
|
||||
+ allwinner,function = "gpio_in";
|
||||
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
+ };
|
||||
+
|
||||
+ mmc2_pins_a: mmc2@0 {
|
||||
+ allwinner,pins = "PC6","PC7","PC8","PC9","PC10","PC11";
|
||||
+ allwinner,function = "mmc2";
|
||||
+ allwinner,drive = <SUN4I_PINCTRL_30_MA>;
|
||||
+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
+ };
|
||||
+
|
||||
+
|
||||
+};
|
||||
+
|
||||
+&r_pio {
|
||||
+ g40_pins_bananapi: g40_pins@0 {
|
||||
+ allwinner,pins = "PM2";
|
||||
+ allwinner,function = "gpio_out";
|
||||
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
+ };
|
||||
+
|
||||
+ vmmc2_pin_bananapi: vmmc2_pin@0 {
|
||||
+ allwinner,pins = "PL8";
|
||||
+// allwinner,pins = "PM0";
|
||||
+ allwinner,function = "gpio_out";
|
||||
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_pins_a>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbphy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
Loading…
Reference in New Issue
Block a user