Commit fc01daee8b8dc1ea486fcbea887224c8d1aca33b

Authored by Hans de Goede
1 parent b1e8b577c8

sunxi: Add defconfig for the Sinovoip BPI-M2 board

The Sinovoip BPI-M2 is a SBC board based on the A31s SoC it features
1G RAM, a microsd slot, Gbit ethernet, 4 usb-a USB-2 ports, ir receiver,
stereo headphone jack and hdmi video output.

The dts changes are identical to the dts files submitted upstream.

A few notes on the use if dldo and aldo regulators. DLDO1 is used
for Vdd for the ethernet phy, ALDO2 is used for AVdd for the ethernet
phy. ALDO1 is used to power the sdio wifi module.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>

Showing 5 changed files with 233 additions and 1 deletions Side-by-side Diff

arch/arm/dts/Makefile
... ... @@ -123,7 +123,8 @@
123 123 sun6i-a31-mele-a1000g-quad.dtb \
124 124 sun6i-a31-mixtile-loftq.dtb \
125 125 sun6i-a31s-cs908.dtb \
126   - sun6i-a31s-primo81.dtb
  126 + sun6i-a31s-primo81.dtb \
  127 + sun6i-a31s-sinovoip-bpi-m2.dtb
127 128 dtb-$(CONFIG_MACH_SUN7I) += \
128 129 sun7i-a20-ainol-aw1.dtb \
129 130 sun7i-a20-bananapi.dtb \
arch/arm/dts/sun6i-a31.dtsi
... ... @@ -659,6 +659,24 @@
659 659 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
660 660 };
661 661  
  662 + mmc2_pins_a: mmc2@0 {
  663 + allwinner,pins = "PC6", "PC7", "PC8", "PC9",
  664 + "PC10", "PC11";
  665 + allwinner,function = "mmc2";
  666 + allwinner,drive = <SUN4I_PINCTRL_30_MA>;
  667 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  668 + };
  669 +
  670 + mmc2_8bit_emmc_pins: mmc2@1 {
  671 + allwinner,pins = "PC6", "PC7", "PC8", "PC9",
  672 + "PC10", "PC11", "PC12",
  673 + "PC13", "PC14", "PC15",
  674 + "PC24";
  675 + allwinner,function = "mmc2";
  676 + allwinner,drive = <SUN4I_PINCTRL_30_MA>;
  677 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  678 + };
  679 +
662 680 gmac_pins_mii_a: gmac_mii@0 {
663 681 allwinner,pins = "PA0", "PA1", "PA2", "PA3",
664 682 "PA8", "PA9", "PA11",
arch/arm/dts/sun6i-a31s-sinovoip-bpi-m2.dts
  1 +/*
  2 + * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
  3 + *
  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
  7 + * whole.
  8 + *
  9 + * a) This library 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.
  13 + *
  14 + * This library 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.
  18 + *
  19 + * Or, alternatively,
  20 + *
  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
  28 + * conditions:
  29 + *
  30 + * The above copyright notice and this permission notice shall be
  31 + * included in all copies or substantial portions of the Software.
  32 + *
  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.
  41 + */
  42 +
  43 +/dts-v1/;
  44 +#include "sun6i-a31s.dtsi"
  45 +#include "sunxi-common-regulators.dtsi"
  46 +#include <dt-bindings/gpio/gpio.h>
  47 +
  48 +/ {
  49 + model = "Sinovoip BPI-M2";
  50 + compatible = "sinovoip,bpi-m2", "allwinner,sun6i-a31s";
  51 +
  52 + aliases {
  53 + serial0 = &uart0;
  54 + };
  55 +
  56 + chosen {
  57 + stdout-path = "serial0:115200n8";
  58 + };
  59 +
  60 + leds {
  61 + compatible = "gpio-leds";
  62 + pinctrl-names = "default";
  63 + pinctrl-0 = <&led_pins_bpi_m2>;
  64 +
  65 + blue {
  66 + label = "bpi-m2:blue:usr";
  67 + gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
  68 + };
  69 +
  70 + green {
  71 + label = "bpi-m2:green:usr";
  72 + gpios = <&pio 6 10 GPIO_ACTIVE_HIGH>; /* PG10 */
  73 + };
  74 +
  75 + red {
  76 + label = "bpi-m2:red:usr";
  77 + gpios = <&pio 6 5 GPIO_ACTIVE_HIGH>; /* PG5 */
  78 + };
  79 + };
  80 +
  81 + mmc2_pwrseq: mmc2_pwrseq {
  82 + compatible = "mmc-pwrseq-simple";
  83 + pinctrl-names = "default";
  84 + pinctrl-0 = <&mmc2_pwrseq_pin_bpi_m2>;
  85 + reset-gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 WIFI_EN */
  86 + };
  87 +};
  88 +
  89 +&ehci0 {
  90 + status = "okay";
  91 +};
  92 +
  93 +&gmac {
  94 + pinctrl-names = "default";
  95 + pinctrl-0 = <&gmac_pins_rgmii_a>, <&gmac_phy_reset_pin_bpi_m2>;
  96 + phy = <&phy1>;
  97 + phy-mode = "rgmii";
  98 + snps,reset-gpio = <&pio 0 21 GPIO_ACTIVE_HIGH>; /* PA21 */
  99 + snps,reset-active-low;
  100 + snps,reset-delays-us = <0 10000 30000>;
  101 + status = "okay";
  102 +
  103 + phy1: ethernet-phy@1 {
  104 + reg = <1>;
  105 + };
  106 +};
  107 +
  108 +&ir {
  109 + pinctrl-names = "default";
  110 + pinctrl-0 = <&ir_pins_a>;
  111 + status = "okay";
  112 +};
  113 +
  114 +&mmc0 {
  115 + pinctrl-names = "default";
  116 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bpi_m2>;
  117 + vmmc-supply = <&reg_vcc3v0>;
  118 + bus-width = <4>;
  119 + cd-gpios = <&pio 0 4 GPIO_ACTIVE_HIGH>; /* PA4 */
  120 + cd-inverted;
  121 + status = "okay";
  122 +};
  123 +
  124 +&mmc0_pins_a {
  125 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  126 +};
  127 +
  128 +&mmc2 {
  129 + pinctrl-names = "default";
  130 + pinctrl-0 = <&mmc2_pins_a>;
  131 + vmmc-supply = <&reg_vcc3v0>;
  132 + mmc-pwrseq = <&mmc2_pwrseq>;
  133 + bus-width = <4>;
  134 + non-removable;
  135 + status = "okay";
  136 +
  137 + brcmf: bcrmf@1 {
  138 + reg = <1>;
  139 + compatible = "brcm,bcm4329-fmac";
  140 + interrupt-parent = <&r_pio>;
  141 + interrupts = <0 5 IRQ_TYPE_LEVEL_LOW>; /* PL5 */
  142 + interrupt-names = "host-wake";
  143 + };
  144 +};
  145 +
  146 +&mmc2_pins_a {
  147 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  148 +};
  149 +
  150 +&ohci0 {
  151 + status = "okay";
  152 +};
  153 +
  154 +&pio {
  155 + gmac_phy_reset_pin_bpi_m2: gmac_phy_reset_pin@0 {
  156 + allwinner,pins = "PA21";
  157 + allwinner,function = "gpio_out";
  158 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  159 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  160 + };
  161 +
  162 + led_pins_bpi_m2: led_pins@0 {
  163 + allwinner,pins = "PG5", "PG10", "PG11";
  164 + allwinner,function = "gpio_out";
  165 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  166 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  167 + };
  168 +
  169 + mmc0_cd_pin_bpi_m2: mmc0_cd_pin@0 {
  170 + allwinner,pins = "PA4";
  171 + allwinner,function = "gpio_in";
  172 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  173 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  174 + };
  175 +};
  176 +
  177 +&r_pio {
  178 + mmc2_pwrseq_pin_bpi_m2: mmc2_pwrseq_pin@0 {
  179 + allwinner,pins = "PL8";
  180 + allwinner,function = "gpio_out";
  181 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  182 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  183 + };
  184 +};
  185 +
  186 +&uart0 {
  187 + pinctrl-names = "default";
  188 + pinctrl-0 = <&uart0_pins_a>;
  189 + status = "okay";
  190 +};
  191 +
  192 +&usbphy {
  193 + status = "okay";
  194 +};
board/sunxi/MAINTAINERS
... ... @@ -34,6 +34,7 @@
34 34 F: configs/CSQ_CS908_defconfig
35 35 F: configs/Mele_A1000G_quad_defconfig
36 36 F: configs/Mele_M9_defconfig
  37 +F: configs/Sinovoip_BPI_M2_defconfig
37 38 F: include/configs/sun7i.h
38 39 F: configs/A20-OLinuXino_MICRO_defconfig
39 40 F: configs/Bananapi_defconfig
configs/Sinovoip_BPI_M2_defconfig
  1 +CONFIG_ARM=y
  2 +CONFIG_ARCH_SUNXI=y
  3 +CONFIG_MACH_SUN6I=y
  4 +CONFIG_DRAM_CLK=432
  5 +CONFIG_USB1_VBUS_PIN=""
  6 +CONFIG_USB2_VBUS_PIN=""
  7 +CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31s-sinovoip-bpi-m2"
  8 +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
  9 +CONFIG_SPL=y
  10 +CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII"
  11 +# CONFIG_CMD_IMLS is not set
  12 +# CONFIG_CMD_FLASH is not set
  13 +# CONFIG_CMD_FPGA is not set
  14 +CONFIG_ETH_DESIGNWARE=y
  15 +CONFIG_AXP_DLDO1_VOLT=3000
  16 +CONFIG_AXP_ALDO1_VOLT=3300
  17 +CONFIG_AXP_ALDO2_VOLT=1800
  18 +CONFIG_USB_EHCI_HCD=y