2 * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
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
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.
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.
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
30 * The above copyright notice and this permission notice shall be
31 * included in all copies or substantial portions of the Software.
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.
44 #include "sun6i-a31s.dtsi"
45 #include "sunxi-common-regulators.dtsi"
46 #include <dt-bindings/gpio/gpio.h>
49 model = "Sinovoip BPI-M2";
50 compatible = "sinovoip,bpi-m2", "allwinner,sun6i-a31s";
57 stdout-path = "serial0:115200n8";
61 compatible = "gpio-leds";
62 pinctrl-names = "default";
63 pinctrl-0 = <&led_pins_bpi_m2>;
66 label = "bpi-m2:blue:usr";
67 gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
71 label = "bpi-m2:green:usr";
72 gpios = <&pio 6 10 GPIO_ACTIVE_HIGH>; /* PG10 */
76 label = "bpi-m2:red:usr";
77 gpios = <&pio 6 5 GPIO_ACTIVE_HIGH>; /* PG5 */
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 */
94 pinctrl-names = "default";
95 pinctrl-0 = <&gmac_pins_rgmii_a>, <&gmac_phy_reset_pin_bpi_m2>;
98 snps,reset-gpio = <&pio 0 21 GPIO_ACTIVE_HIGH>; /* PA21 */
99 snps,reset-active-low;
100 snps,reset-delays-us = <0 10000 30000>;
103 phy1: ethernet-phy@1 {
109 pinctrl-names = "default";
110 pinctrl-0 = <&ir_pins_a>;
115 pinctrl-names = "default";
116 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bpi_m2>;
117 vmmc-supply = <®_vcc3v0>;
119 cd-gpios = <&pio 0 4 GPIO_ACTIVE_HIGH>; /* PA4 */
125 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
129 pinctrl-names = "default";
130 pinctrl-0 = <&mmc2_pins_a>;
131 vmmc-supply = <®_vcc3v0>;
132 mmc-pwrseq = <&mmc2_pwrseq>;
139 compatible = "brcm,bcm4329-fmac";
140 interrupt-parent = <&r_pio>;
141 interrupts = <0 5 IRQ_TYPE_LEVEL_LOW>; /* PL5 */
142 interrupt-names = "host-wake";
147 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
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>;
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>;
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>;
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>;
187 pinctrl-names = "default";
188 pinctrl-0 = <&uart0_pins_a>;