Re: [linux-sunxi] Re: [PATCH] ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board

2016-06-16 Thread Chen-Yu Tsai
Hi,

On Wed, Jun 1, 2016 at 10:40 AM, luoyi  wrote:
> This is the new version of the patch.  and I think maybe every board
> should have their own dtb files. and we can you some cpp  macro tricks
> to merge their coressponding dts file.
>
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index e06a5ab..fde407f 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -685,6 +685,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
>  sun6i-a31s-yones-toptech-bs1078-v2.dtb
>  dtb-$(CONFIG_MACH_SUN7I) += \
>  sun7i-a20-bananapi.dtb \
> +sun7i-a20-bananapi-m1-plus.dtb \
>  sun7i-a20-bananapro.dtb \
>  sun7i-a20-cubieboard2.dtb \
>  sun7i-a20-cubietruck.dtb \
> diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
> b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
> new file mode 100644
> index 000..548ed31
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
> @@ -0,0 +1,266 @@
> +/*
> + * Copyright 2016 Luo Yi 
> + *
> + * Thanks to the original work by Hans de Goede 
> + *
> + * 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 "sun7i-a20.dtsi"
> +#include "sunxi-common-regulators.dtsi"
> +#include 
> +#include 
> +
> +/ {
> +model = "Banana Pi BPI-M1-Plus";
> +compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20";
> +
> +aliases {
> +serial0 = 
> +};
> +
> +chosen {
> +stdout-path = "serial0:115200n8";
> +};
> +
> +leds {

Extra space at end of line.

> +compatible = "gpio-leds";
> +pinctrl-names = "default";
> +pinctrl-0 = <_pins_bananapi>;
> +
> +green {
> +label = "bananapi:green:usr";

The led labels should use the board name.

> +gpios = < 7 24 GPIO_ACTIVE_HIGH>;
> +};
> +
> +red {
> +label = "bananapi:red:usr";
> +gpios = < 7 25 GPIO_ACTIVE_HIGH>;
> +linux,default-trigger = "default-on";
> +};
> +
> +};
> +
> +mmc3_pwrseq: mmc3_pwrseq {
> +compatible = "mmc-pwrseq-simple";
> +pinctrl-names = "default";
> +pinctrl-0 = <_pwrseq_pin_bananapim1plus>;
> +reset-gpios = < 7 22 GPIO_ACTIVE_LOW>; /* PH22 WL-PMU-EN */
> +};
> +
> +reg_gmac_3v3: gmac-3v3 {
> +compatible = "regulator-fixed";
> +pinctrl-names = "default";
> +pinctrl-0 = <_power_pin_bananapi>;
> +regulator-name = "gmac-3v3";
> +regulator-min-microvolt = <330>;
> +regulator-max-microvolt = <330>;
> +startup-delay-us = <10>;
> +enable-active-high;
> +gpio = < 7 23 GPIO_ACTIVE_HIGH>;
> +};
> +
> +};
> +
> + {
> +status = "okay";
> +};
> +
> + {
> +status = "okay";
> +};
> +
> + {
> +status = "okay";
> +};
> +
> + {
> +status = "okay";
> +};
> +
> + {
> +pinctrl-names = "default";
> +pinctrl-0 = 

Re: [linux-sunxi] Re: [PATCH] ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board

2016-06-16 Thread Chen-Yu Tsai
Hi,

On Wed, Jun 1, 2016 at 10:40 AM, luoyi  wrote:
> This is the new version of the patch.  and I think maybe every board
> should have their own dtb files. and we can you some cpp  macro tricks
> to merge their coressponding dts file.
>
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index e06a5ab..fde407f 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -685,6 +685,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
>  sun6i-a31s-yones-toptech-bs1078-v2.dtb
>  dtb-$(CONFIG_MACH_SUN7I) += \
>  sun7i-a20-bananapi.dtb \
> +sun7i-a20-bananapi-m1-plus.dtb \
>  sun7i-a20-bananapro.dtb \
>  sun7i-a20-cubieboard2.dtb \
>  sun7i-a20-cubietruck.dtb \
> diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
> b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
> new file mode 100644
> index 000..548ed31
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
> @@ -0,0 +1,266 @@
> +/*
> + * Copyright 2016 Luo Yi 
> + *
> + * Thanks to the original work by Hans de Goede 
> + *
> + * 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 "sun7i-a20.dtsi"
> +#include "sunxi-common-regulators.dtsi"
> +#include 
> +#include 
> +
> +/ {
> +model = "Banana Pi BPI-M1-Plus";
> +compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20";
> +
> +aliases {
> +serial0 = 
> +};
> +
> +chosen {
> +stdout-path = "serial0:115200n8";
> +};
> +
> +leds {

Extra space at end of line.

> +compatible = "gpio-leds";
> +pinctrl-names = "default";
> +pinctrl-0 = <_pins_bananapi>;
> +
> +green {
> +label = "bananapi:green:usr";

The led labels should use the board name.

> +gpios = < 7 24 GPIO_ACTIVE_HIGH>;
> +};
> +
> +red {
> +label = "bananapi:red:usr";
> +gpios = < 7 25 GPIO_ACTIVE_HIGH>;
> +linux,default-trigger = "default-on";
> +};
> +
> +};
> +
> +mmc3_pwrseq: mmc3_pwrseq {
> +compatible = "mmc-pwrseq-simple";
> +pinctrl-names = "default";
> +pinctrl-0 = <_pwrseq_pin_bananapim1plus>;
> +reset-gpios = < 7 22 GPIO_ACTIVE_LOW>; /* PH22 WL-PMU-EN */
> +};
> +
> +reg_gmac_3v3: gmac-3v3 {
> +compatible = "regulator-fixed";
> +pinctrl-names = "default";
> +pinctrl-0 = <_power_pin_bananapi>;
> +regulator-name = "gmac-3v3";
> +regulator-min-microvolt = <330>;
> +regulator-max-microvolt = <330>;
> +startup-delay-us = <10>;
> +enable-active-high;
> +gpio = < 7 23 GPIO_ACTIVE_HIGH>;
> +};
> +
> +};
> +
> + {
> +status = "okay";
> +};
> +
> + {
> +status = "okay";
> +};
> +
> + {
> +status = "okay";
> +};
> +
> + {
> +status = "okay";
> +};
> +
> + {
> +pinctrl-names = "default";
> +pinctrl-0 = <_pins_rgmii_a>;
> +phy = <>;
> +phy-mode = "rgmii";
> +

Re: [linux-sunxi] Re: [PATCH] ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board

2016-06-01 Thread Maxime Ripard
Hi,

On Wed, Jun 01, 2016 at 10:40:18AM +0800, luoyi wrote:
> This is the new version of the patch.  and I think maybe every board
> should have their own dtb files. and we can you some cpp  macro tricks
> to merge their coressponding dts file.

Please submit it as a new patch with send-email, with the version
(using the -v option) and a log of your changes.

> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index e06a5ab..fde407f 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -685,6 +685,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
>  sun6i-a31s-yones-toptech-bs1078-v2.dtb
>  dtb-$(CONFIG_MACH_SUN7I) += \
>  sun7i-a20-bananapi.dtb \
> +sun7i-a20-bananapi-m1-plus.dtb \
>  sun7i-a20-bananapro.dtb \
>  sun7i-a20-cubieboard2.dtb \
>  sun7i-a20-cubietruck.dtb \
> diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
> b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
> new file mode 100644
> index 000..548ed31
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
> @@ -0,0 +1,266 @@
> +/*
> + * Copyright 2016 Luo Yi 
> + *
> + * Thanks to the original work by Hans de Goede 
> + *
> + * 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 "sun7i-a20.dtsi"
> +#include "sunxi-common-regulators.dtsi"
> +#include 
> +#include 
> +
> +/ {
> +model = "Banana Pi BPI-M1-Plus";
> +compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20";
> +
> +aliases {
> +serial0 = 
> +};
> +
> +chosen {
> +stdout-path = "serial0:115200n8";
> +};
> +
> +leds {
> +compatible = "gpio-leds";
> +pinctrl-names = "default";
> +pinctrl-0 = <_pins_bananapi>;
> +
> +green {
> +label = "bananapi:green:usr";
> +gpios = < 7 24 GPIO_ACTIVE_HIGH>;
> +};
> +
> +red {
> +label = "bananapi:red:usr";
> +gpios = < 7 25 GPIO_ACTIVE_HIGH>;
> +linux,default-trigger = "default-on";
> +};
> +
> +};
> +
> +mmc3_pwrseq: mmc3_pwrseq {
> +compatible = "mmc-pwrseq-simple";
> +pinctrl-names = "default";
> +pinctrl-0 = <_pwrseq_pin_bananapim1plus>;
> +reset-gpios = < 7 22 GPIO_ACTIVE_LOW>; /* PH22 WL-PMU-EN */
> +};
> +
> +reg_gmac_3v3: gmac-3v3 {
> +compatible = "regulator-fixed";
> +pinctrl-names = "default";
> +pinctrl-0 = <_power_pin_bananapi>;
> +regulator-name = "gmac-3v3";
> +regulator-min-microvolt = <330>;
> +regulator-max-microvolt = <330>;
> +startup-delay-us = <10>;
> +enable-active-high;
> +gpio = < 7 23 GPIO_ACTIVE_HIGH>;
> +};
> +
> +};
> +
> + {
> +status = "okay";
> +};
> +
> + {
> +status = "okay";
> +};
> +
> + {
> +status = "okay";
> +};
> +
> + {
> +status = "okay";
> +};
> +
> + {
> +pinctrl-names = "default";

Re: [linux-sunxi] Re: [PATCH] ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board

2016-06-01 Thread Maxime Ripard
Hi,

On Wed, Jun 01, 2016 at 10:40:18AM +0800, luoyi wrote:
> This is the new version of the patch.  and I think maybe every board
> should have their own dtb files. and we can you some cpp  macro tricks
> to merge their coressponding dts file.

Please submit it as a new patch with send-email, with the version
(using the -v option) and a log of your changes.

> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index e06a5ab..fde407f 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -685,6 +685,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
>  sun6i-a31s-yones-toptech-bs1078-v2.dtb
>  dtb-$(CONFIG_MACH_SUN7I) += \
>  sun7i-a20-bananapi.dtb \
> +sun7i-a20-bananapi-m1-plus.dtb \
>  sun7i-a20-bananapro.dtb \
>  sun7i-a20-cubieboard2.dtb \
>  sun7i-a20-cubietruck.dtb \
> diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
> b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
> new file mode 100644
> index 000..548ed31
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
> @@ -0,0 +1,266 @@
> +/*
> + * Copyright 2016 Luo Yi 
> + *
> + * Thanks to the original work by Hans de Goede 
> + *
> + * 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 "sun7i-a20.dtsi"
> +#include "sunxi-common-regulators.dtsi"
> +#include 
> +#include 
> +
> +/ {
> +model = "Banana Pi BPI-M1-Plus";
> +compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20";
> +
> +aliases {
> +serial0 = 
> +};
> +
> +chosen {
> +stdout-path = "serial0:115200n8";
> +};
> +
> +leds {
> +compatible = "gpio-leds";
> +pinctrl-names = "default";
> +pinctrl-0 = <_pins_bananapi>;
> +
> +green {
> +label = "bananapi:green:usr";
> +gpios = < 7 24 GPIO_ACTIVE_HIGH>;
> +};
> +
> +red {
> +label = "bananapi:red:usr";
> +gpios = < 7 25 GPIO_ACTIVE_HIGH>;
> +linux,default-trigger = "default-on";
> +};
> +
> +};
> +
> +mmc3_pwrseq: mmc3_pwrseq {
> +compatible = "mmc-pwrseq-simple";
> +pinctrl-names = "default";
> +pinctrl-0 = <_pwrseq_pin_bananapim1plus>;
> +reset-gpios = < 7 22 GPIO_ACTIVE_LOW>; /* PH22 WL-PMU-EN */
> +};
> +
> +reg_gmac_3v3: gmac-3v3 {
> +compatible = "regulator-fixed";
> +pinctrl-names = "default";
> +pinctrl-0 = <_power_pin_bananapi>;
> +regulator-name = "gmac-3v3";
> +regulator-min-microvolt = <330>;
> +regulator-max-microvolt = <330>;
> +startup-delay-us = <10>;
> +enable-active-high;
> +gpio = < 7 23 GPIO_ACTIVE_HIGH>;
> +};
> +
> +};
> +
> + {
> +status = "okay";
> +};
> +
> + {
> +status = "okay";
> +};
> +
> + {
> +status = "okay";
> +};
> +
> + {
> +status = "okay";
> +};
> +
> + {
> +pinctrl-names = "default";
> +pinctrl-0 = <_pins_rgmii_a>;
> +   

Re: [linux-sunxi] Re: [PATCH] ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board

2016-05-31 Thread luoyi
This is the new version of the patch.  and I think maybe every board
should have their own dtb files. and we can you some cpp  macro tricks
to merge their coressponding dts file.

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index e06a5ab..fde407f 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -685,6 +685,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
 sun6i-a31s-yones-toptech-bs1078-v2.dtb
 dtb-$(CONFIG_MACH_SUN7I) += \
 sun7i-a20-bananapi.dtb \
+sun7i-a20-bananapi-m1-plus.dtb \
 sun7i-a20-bananapro.dtb \
 sun7i-a20-cubieboard2.dtb \
 sun7i-a20-cubietruck.dtb \
diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
new file mode 100644
index 000..548ed31
--- /dev/null
+++ b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
@@ -0,0 +1,266 @@
+/*
+ * Copyright 2016 Luo Yi 
+ *
+ * Thanks to the original work by Hans de Goede 
+ *
+ * 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 "sun7i-a20.dtsi"
+#include "sunxi-common-regulators.dtsi"
+#include 
+#include 
+
+/ {
+model = "Banana Pi BPI-M1-Plus";
+compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20";
+
+aliases {
+serial0 = 
+};
+
+chosen {
+stdout-path = "serial0:115200n8";
+};
+
+leds {
+compatible = "gpio-leds";
+pinctrl-names = "default";
+pinctrl-0 = <_pins_bananapi>;
+
+green {
+label = "bananapi:green:usr";
+gpios = < 7 24 GPIO_ACTIVE_HIGH>;
+};
+
+red {
+label = "bananapi:red:usr";
+gpios = < 7 25 GPIO_ACTIVE_HIGH>;
+linux,default-trigger = "default-on";
+};
+
+};
+
+mmc3_pwrseq: mmc3_pwrseq {
+compatible = "mmc-pwrseq-simple";
+pinctrl-names = "default";
+pinctrl-0 = <_pwrseq_pin_bananapim1plus>;
+reset-gpios = < 7 22 GPIO_ACTIVE_LOW>; /* PH22 WL-PMU-EN */
+};
+
+reg_gmac_3v3: gmac-3v3 {
+compatible = "regulator-fixed";
+pinctrl-names = "default";
+pinctrl-0 = <_power_pin_bananapi>;
+regulator-name = "gmac-3v3";
+regulator-min-microvolt = <330>;
+regulator-max-microvolt = <330>;
+startup-delay-us = <10>;
+enable-active-high;
+gpio = < 7 23 GPIO_ACTIVE_HIGH>;
+};
+
+};
+
+ {
+status = "okay";
+};
+
+ {
+status = "okay";
+};
+
+ {
+status = "okay";
+};
+
+ {
+status = "okay";
+};
+
+ {
+pinctrl-names = "default";
+pinctrl-0 = <_pins_rgmii_a>;
+phy = <>;
+phy-mode = "rgmii";
+phy-supply = <_gmac_3v3>;
+status = "okay";
+
+phy1: ethernet-phy@1 {
+reg = <1>;
+};
+};
+
+ {
+pinctrl-names = "default";
+pinctrl-0 = <_pins_a>;
+status = "okay";
+
+axp209: pmic@34 {
+compatible = "x-powers,axp209";
+reg = <0x34>;
+interrupt-parent = <_intc>;
+interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+
+

Re: [linux-sunxi] Re: [PATCH] ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board

2016-05-31 Thread luoyi
This is the new version of the patch.  and I think maybe every board
should have their own dtb files. and we can you some cpp  macro tricks
to merge their coressponding dts file.

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index e06a5ab..fde407f 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -685,6 +685,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
 sun6i-a31s-yones-toptech-bs1078-v2.dtb
 dtb-$(CONFIG_MACH_SUN7I) += \
 sun7i-a20-bananapi.dtb \
+sun7i-a20-bananapi-m1-plus.dtb \
 sun7i-a20-bananapro.dtb \
 sun7i-a20-cubieboard2.dtb \
 sun7i-a20-cubietruck.dtb \
diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
new file mode 100644
index 000..548ed31
--- /dev/null
+++ b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
@@ -0,0 +1,266 @@
+/*
+ * Copyright 2016 Luo Yi 
+ *
+ * Thanks to the original work by Hans de Goede 
+ *
+ * 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 "sun7i-a20.dtsi"
+#include "sunxi-common-regulators.dtsi"
+#include 
+#include 
+
+/ {
+model = "Banana Pi BPI-M1-Plus";
+compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20";
+
+aliases {
+serial0 = 
+};
+
+chosen {
+stdout-path = "serial0:115200n8";
+};
+
+leds {
+compatible = "gpio-leds";
+pinctrl-names = "default";
+pinctrl-0 = <_pins_bananapi>;
+
+green {
+label = "bananapi:green:usr";
+gpios = < 7 24 GPIO_ACTIVE_HIGH>;
+};
+
+red {
+label = "bananapi:red:usr";
+gpios = < 7 25 GPIO_ACTIVE_HIGH>;
+linux,default-trigger = "default-on";
+};
+
+};
+
+mmc3_pwrseq: mmc3_pwrseq {
+compatible = "mmc-pwrseq-simple";
+pinctrl-names = "default";
+pinctrl-0 = <_pwrseq_pin_bananapim1plus>;
+reset-gpios = < 7 22 GPIO_ACTIVE_LOW>; /* PH22 WL-PMU-EN */
+};
+
+reg_gmac_3v3: gmac-3v3 {
+compatible = "regulator-fixed";
+pinctrl-names = "default";
+pinctrl-0 = <_power_pin_bananapi>;
+regulator-name = "gmac-3v3";
+regulator-min-microvolt = <330>;
+regulator-max-microvolt = <330>;
+startup-delay-us = <10>;
+enable-active-high;
+gpio = < 7 23 GPIO_ACTIVE_HIGH>;
+};
+
+};
+
+ {
+status = "okay";
+};
+
+ {
+status = "okay";
+};
+
+ {
+status = "okay";
+};
+
+ {
+status = "okay";
+};
+
+ {
+pinctrl-names = "default";
+pinctrl-0 = <_pins_rgmii_a>;
+phy = <>;
+phy-mode = "rgmii";
+phy-supply = <_gmac_3v3>;
+status = "okay";
+
+phy1: ethernet-phy@1 {
+reg = <1>;
+};
+};
+
+ {
+pinctrl-names = "default";
+pinctrl-0 = <_pins_a>;
+status = "okay";
+
+axp209: pmic@34 {
+compatible = "x-powers,axp209";
+reg = <0x34>;
+interrupt-parent = <_intc>;
+interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+
+interrupt-controller;
+

Re: [linux-sunxi] Re: [PATCH] ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board

2016-05-31 Thread Maxime Ripard
On Mon, May 30, 2016 at 10:26:21PM +0200, Bernhard Nortmann wrote:
> Am 30.05.2016 um 21:43 schrieb Maxime Ripard:
> >Hi,
> >
> >On Mon, May 30, 2016 at 08:30:13PM +0800, luoyi...@gmail.com wrote:
> >>From: luoyi 
> >>
> >>Add support for the Bananapi M1 Plus A20 development board from 
> >>sinovoip.com.cn .
> >>This board features 1G RAM, 2 USB A receptacles, 1 micro USB receptacle for
> >>OTG, 1 micro USB receptacle for power, HDMI, sata, Gbit ethernet, ir 
> >>receiver,
> >>3.5 mm jack for stero sound out, on board microphone, 40 gpio pins and sdio 
> >>wifi.
> >What is the difference between the M1+ and the M1?
> 
> The M1+ is an updated version of the original Banana Pi. If you're
> interested in the details, have a look at
> http://linux-sunxi.org/Banana_Pi#Variants .  "BPi-M1+" is SinoVoip's
> counterpart of LeMaker's "Banana Pro", for which a .dts already
> exists. Judging from .fex files, only a single pin assignment seems
> to differ between the two (audio_pa_ctrl, PH26 vs. PH15).

Gee, that's confusing :)

I guess we should just include the banana pro DTB and change that pin
(and the i2s pins Luo was mentionning).

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


signature.asc
Description: PGP signature


Re: [linux-sunxi] Re: [PATCH] ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board

2016-05-31 Thread Maxime Ripard
On Mon, May 30, 2016 at 10:26:21PM +0200, Bernhard Nortmann wrote:
> Am 30.05.2016 um 21:43 schrieb Maxime Ripard:
> >Hi,
> >
> >On Mon, May 30, 2016 at 08:30:13PM +0800, luoyi...@gmail.com wrote:
> >>From: luoyi 
> >>
> >>Add support for the Bananapi M1 Plus A20 development board from 
> >>sinovoip.com.cn .
> >>This board features 1G RAM, 2 USB A receptacles, 1 micro USB receptacle for
> >>OTG, 1 micro USB receptacle for power, HDMI, sata, Gbit ethernet, ir 
> >>receiver,
> >>3.5 mm jack for stero sound out, on board microphone, 40 gpio pins and sdio 
> >>wifi.
> >What is the difference between the M1+ and the M1?
> 
> The M1+ is an updated version of the original Banana Pi. If you're
> interested in the details, have a look at
> http://linux-sunxi.org/Banana_Pi#Variants .  "BPi-M1+" is SinoVoip's
> counterpart of LeMaker's "Banana Pro", for which a .dts already
> exists. Judging from .fex files, only a single pin assignment seems
> to differ between the two (audio_pa_ctrl, PH26 vs. PH15).

Gee, that's confusing :)

I guess we should just include the banana pro DTB and change that pin
(and the i2s pins Luo was mentionning).

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


signature.asc
Description: PGP signature


Re: [PATCH] ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board

2016-05-30 Thread Chen-Yu Tsai
Hi,

On Tue, May 31, 2016 at 3:43 AM, Maxime Ripard
 wrote:
> Hi,
>
> On Mon, May 30, 2016 at 08:30:13PM +0800, luoyi...@gmail.com wrote:
>> From: luoyi 
>>
>> Add support for the Bananapi M1 Plus A20 development board from 
>> sinovoip.com.cn .
>> This board features 1G RAM, 2 USB A receptacles, 1 micro USB receptacle for
>> OTG, 1 micro USB receptacle for power, HDMI, sata, Gbit ethernet, ir 
>> receiver,
>> 3.5 mm jack for stero sound out, on board microphone, 40 gpio pins and sdio 
>> wifi.
>
> What is the difference between the M1+ and the M1?
>
>>
>> Signed-off-by: Luo Yi 
>> ---
>>  arch/arm/boot/dts/Makefile   |   1 +
>>  arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 270 
>> +++
>>  2 files changed, 271 insertions(+)
>>  create mode 100644 arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
>>
>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
>> index e06a5ab..fde407f 100644
>> --- a/arch/arm/boot/dts/Makefile
>> +++ b/arch/arm/boot/dts/Makefile
>> @@ -685,6 +685,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
>>   sun6i-a31s-yones-toptech-bs1078-v2.dtb
>>  dtb-$(CONFIG_MACH_SUN7I) += \
>>   sun7i-a20-bananapi.dtb \
>> + sun7i-a20-bananapi-m1-plus.dtb \
>>   sun7i-a20-bananapro.dtb \
>>   sun7i-a20-cubieboard2.dtb \
>>   sun7i-a20-cubietruck.dtb \
>> diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts 
>> b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
>> new file mode 100644
>> index 000..b62fc1d
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
>> @@ -0,0 +1,270 @@
>> +/*
>> + * Copyright 2016 Luo Yi 
>> + *
>> + * Thanks to the original work by Hans de Goede 
>> + *
>> + * 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 "sun7i-a20.dtsi"
>> +#include "sunxi-common-regulators.dtsi"
>> +#include 
>> +#include 
>> +
>> +/ {
>> + model = "Banana Pi BPI-M1-Plus";
>> + compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20";
>> +
>> + aliases {
>> + serial0 = 
>> + };
>> +
>> + chosen {
>> + stdout-path = "serial0:115200n8";
>> + };
>> +
>> + leds {
>> + compatible = "gpio-leds";
>> + pinctrl-names = "default";
>> + pinctrl-0 = <_pins_bananapi>;
>> +
>> + red {
>> + label = "bananapi:red:usr";
>
> The first part the label is the board name, in that case that would be
> bananapi-m1-plus.
>
>> + gpios = < 7 25 GPIO_ACTIVE_HIGH>;
>> + linux,default-trigger = "default-on";
>
> So that's the power led?
>
>> + };
>> +
>> + green {
>> + label = "bananapi:green:usr";
>> + gpios = < 7 24 GPIO_ACTIVE_HIGH>;
>> + 

Re: [PATCH] ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board

2016-05-30 Thread Chen-Yu Tsai
Hi,

On Tue, May 31, 2016 at 3:43 AM, Maxime Ripard
 wrote:
> Hi,
>
> On Mon, May 30, 2016 at 08:30:13PM +0800, luoyi...@gmail.com wrote:
>> From: luoyi 
>>
>> Add support for the Bananapi M1 Plus A20 development board from 
>> sinovoip.com.cn .
>> This board features 1G RAM, 2 USB A receptacles, 1 micro USB receptacle for
>> OTG, 1 micro USB receptacle for power, HDMI, sata, Gbit ethernet, ir 
>> receiver,
>> 3.5 mm jack for stero sound out, on board microphone, 40 gpio pins and sdio 
>> wifi.
>
> What is the difference between the M1+ and the M1?
>
>>
>> Signed-off-by: Luo Yi 
>> ---
>>  arch/arm/boot/dts/Makefile   |   1 +
>>  arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 270 
>> +++
>>  2 files changed, 271 insertions(+)
>>  create mode 100644 arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
>>
>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
>> index e06a5ab..fde407f 100644
>> --- a/arch/arm/boot/dts/Makefile
>> +++ b/arch/arm/boot/dts/Makefile
>> @@ -685,6 +685,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
>>   sun6i-a31s-yones-toptech-bs1078-v2.dtb
>>  dtb-$(CONFIG_MACH_SUN7I) += \
>>   sun7i-a20-bananapi.dtb \
>> + sun7i-a20-bananapi-m1-plus.dtb \
>>   sun7i-a20-bananapro.dtb \
>>   sun7i-a20-cubieboard2.dtb \
>>   sun7i-a20-cubietruck.dtb \
>> diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts 
>> b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
>> new file mode 100644
>> index 000..b62fc1d
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
>> @@ -0,0 +1,270 @@
>> +/*
>> + * Copyright 2016 Luo Yi 
>> + *
>> + * Thanks to the original work by Hans de Goede 
>> + *
>> + * 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 "sun7i-a20.dtsi"
>> +#include "sunxi-common-regulators.dtsi"
>> +#include 
>> +#include 
>> +
>> +/ {
>> + model = "Banana Pi BPI-M1-Plus";
>> + compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20";
>> +
>> + aliases {
>> + serial0 = 
>> + };
>> +
>> + chosen {
>> + stdout-path = "serial0:115200n8";
>> + };
>> +
>> + leds {
>> + compatible = "gpio-leds";
>> + pinctrl-names = "default";
>> + pinctrl-0 = <_pins_bananapi>;
>> +
>> + red {
>> + label = "bananapi:red:usr";
>
> The first part the label is the board name, in that case that would be
> bananapi-m1-plus.
>
>> + gpios = < 7 25 GPIO_ACTIVE_HIGH>;
>> + linux,default-trigger = "default-on";
>
> So that's the power led?
>
>> + };
>> +
>> + green {
>> + label = "bananapi:green:usr";
>> + gpios = < 7 24 GPIO_ACTIVE_HIGH>;
>> + linux,default-trigger = "heartbeat";
>
> We don't enforce any trigger by default.
>
>> +
>> + };
>> + };
>> +

Re: [linux-sunxi] Re: [PATCH] ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board

2016-05-30 Thread Bernhard Nortmann

Am 30.05.2016 um 21:43 schrieb Maxime Ripard:

Hi,

On Mon, May 30, 2016 at 08:30:13PM +0800, luoyi...@gmail.com wrote:

From: luoyi 

Add support for the Bananapi M1 Plus A20 development board from sinovoip.com.cn 
.
This board features 1G RAM, 2 USB A receptacles, 1 micro USB receptacle for
OTG, 1 micro USB receptacle for power, HDMI, sata, Gbit ethernet, ir receiver,
3.5 mm jack for stero sound out, on board microphone, 40 gpio pins and sdio 
wifi.

What is the difference between the M1+ and the M1?


The M1+ is an updated version of the original Banana Pi. If you're 
interested

in the details, have a look at http://linux-sunxi.org/Banana_Pi#Variants .
"BPi-M1+" is SinoVoip's counterpart of LeMaker's "Banana Pro", for which 
a .dts
already exists. Judging from .fex files, only a single pin assignment 
seems to

differ between the two (audio_pa_ctrl, PH26 vs. PH15).

Regards, B. Nortmann


Re: [linux-sunxi] Re: [PATCH] ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board

2016-05-30 Thread Bernhard Nortmann

Am 30.05.2016 um 21:43 schrieb Maxime Ripard:

Hi,

On Mon, May 30, 2016 at 08:30:13PM +0800, luoyi...@gmail.com wrote:

From: luoyi 

Add support for the Bananapi M1 Plus A20 development board from sinovoip.com.cn 
.
This board features 1G RAM, 2 USB A receptacles, 1 micro USB receptacle for
OTG, 1 micro USB receptacle for power, HDMI, sata, Gbit ethernet, ir receiver,
3.5 mm jack for stero sound out, on board microphone, 40 gpio pins and sdio 
wifi.

What is the difference between the M1+ and the M1?


The M1+ is an updated version of the original Banana Pi. If you're 
interested

in the details, have a look at http://linux-sunxi.org/Banana_Pi#Variants .
"BPi-M1+" is SinoVoip's counterpart of LeMaker's "Banana Pro", for which 
a .dts
already exists. Judging from .fex files, only a single pin assignment 
seems to

differ between the two (audio_pa_ctrl, PH26 vs. PH15).

Regards, B. Nortmann


Re: [PATCH] ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board

2016-05-30 Thread Maxime Ripard
Hi,

On Mon, May 30, 2016 at 08:30:13PM +0800, luoyi...@gmail.com wrote:
> From: luoyi 
> 
> Add support for the Bananapi M1 Plus A20 development board from 
> sinovoip.com.cn .
> This board features 1G RAM, 2 USB A receptacles, 1 micro USB receptacle for
> OTG, 1 micro USB receptacle for power, HDMI, sata, Gbit ethernet, ir receiver,
> 3.5 mm jack for stero sound out, on board microphone, 40 gpio pins and sdio 
> wifi.

What is the difference between the M1+ and the M1?

> 
> Signed-off-by: Luo Yi 
> ---
>  arch/arm/boot/dts/Makefile   |   1 +
>  arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 270 
> +++
>  2 files changed, 271 insertions(+)
>  create mode 100644 arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index e06a5ab..fde407f 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -685,6 +685,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
>   sun6i-a31s-yones-toptech-bs1078-v2.dtb
>  dtb-$(CONFIG_MACH_SUN7I) += \
>   sun7i-a20-bananapi.dtb \
> + sun7i-a20-bananapi-m1-plus.dtb \
>   sun7i-a20-bananapro.dtb \
>   sun7i-a20-cubieboard2.dtb \
>   sun7i-a20-cubietruck.dtb \
> diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts 
> b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
> new file mode 100644
> index 000..b62fc1d
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
> @@ -0,0 +1,270 @@
> +/*
> + * Copyright 2016 Luo Yi 
> + * 
> + * Thanks to the original work by Hans de Goede 
> + *
> + * 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 "sun7i-a20.dtsi"
> +#include "sunxi-common-regulators.dtsi"
> +#include 
> +#include 
> +
> +/ {
> + model = "Banana Pi BPI-M1-Plus";
> + compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20";
> +
> + aliases {
> + serial0 = 
> + };
> +
> + chosen {
> + stdout-path = "serial0:115200n8";
> + };
> +
> + leds {
> + compatible = "gpio-leds";
> + pinctrl-names = "default";
> + pinctrl-0 = <_pins_bananapi>;
> +
> + red {
> + label = "bananapi:red:usr";

The first part the label is the board name, in that case that would be
bananapi-m1-plus.

> + gpios = < 7 25 GPIO_ACTIVE_HIGH>;
> + linux,default-trigger = "default-on";

So that's the power led?

> + };
> +
> + green {
> + label = "bananapi:green:usr";
> + gpios = < 7 24 GPIO_ACTIVE_HIGH>;
> + linux,default-trigger = "heartbeat";

We don't enforce any trigger by default.

> +
> + };
> + };
> +
> + reg_gmac_3v3: gmac-3v3 {
> + compatible = "regulator-fixed";
> + pinctrl-names = 

Re: [PATCH] ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board

2016-05-30 Thread Maxime Ripard
Hi,

On Mon, May 30, 2016 at 08:30:13PM +0800, luoyi...@gmail.com wrote:
> From: luoyi 
> 
> Add support for the Bananapi M1 Plus A20 development board from 
> sinovoip.com.cn .
> This board features 1G RAM, 2 USB A receptacles, 1 micro USB receptacle for
> OTG, 1 micro USB receptacle for power, HDMI, sata, Gbit ethernet, ir receiver,
> 3.5 mm jack for stero sound out, on board microphone, 40 gpio pins and sdio 
> wifi.

What is the difference between the M1+ and the M1?

> 
> Signed-off-by: Luo Yi 
> ---
>  arch/arm/boot/dts/Makefile   |   1 +
>  arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 270 
> +++
>  2 files changed, 271 insertions(+)
>  create mode 100644 arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index e06a5ab..fde407f 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -685,6 +685,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
>   sun6i-a31s-yones-toptech-bs1078-v2.dtb
>  dtb-$(CONFIG_MACH_SUN7I) += \
>   sun7i-a20-bananapi.dtb \
> + sun7i-a20-bananapi-m1-plus.dtb \
>   sun7i-a20-bananapro.dtb \
>   sun7i-a20-cubieboard2.dtb \
>   sun7i-a20-cubietruck.dtb \
> diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts 
> b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
> new file mode 100644
> index 000..b62fc1d
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
> @@ -0,0 +1,270 @@
> +/*
> + * Copyright 2016 Luo Yi 
> + * 
> + * Thanks to the original work by Hans de Goede 
> + *
> + * 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 "sun7i-a20.dtsi"
> +#include "sunxi-common-regulators.dtsi"
> +#include 
> +#include 
> +
> +/ {
> + model = "Banana Pi BPI-M1-Plus";
> + compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20";
> +
> + aliases {
> + serial0 = 
> + };
> +
> + chosen {
> + stdout-path = "serial0:115200n8";
> + };
> +
> + leds {
> + compatible = "gpio-leds";
> + pinctrl-names = "default";
> + pinctrl-0 = <_pins_bananapi>;
> +
> + red {
> + label = "bananapi:red:usr";

The first part the label is the board name, in that case that would be
bananapi-m1-plus.

> + gpios = < 7 25 GPIO_ACTIVE_HIGH>;
> + linux,default-trigger = "default-on";

So that's the power led?

> + };
> +
> + green {
> + label = "bananapi:green:usr";
> + gpios = < 7 24 GPIO_ACTIVE_HIGH>;
> + linux,default-trigger = "heartbeat";

We don't enforce any trigger by default.

> +
> + };
> + };
> +
> + reg_gmac_3v3: gmac-3v3 {
> + compatible = "regulator-fixed";
> + pinctrl-names = "default";
> + pinctrl-0 = <_power_pin_bananapi>;
> + 

[PATCH] ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board

2016-05-30 Thread luoyi . ly
From: luoyi 

Add support for the Bananapi M1 Plus A20 development board from sinovoip.com.cn 
.
This board features 1G RAM, 2 USB A receptacles, 1 micro USB receptacle for
OTG, 1 micro USB receptacle for power, HDMI, sata, Gbit ethernet, ir receiver,
3.5 mm jack for stero sound out, on board microphone, 40 gpio pins and sdio 
wifi.

Signed-off-by: Luo Yi 
---
 arch/arm/boot/dts/Makefile   |   1 +
 arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 270 +++
 2 files changed, 271 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index e06a5ab..fde407f 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -685,6 +685,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
sun6i-a31s-yones-toptech-bs1078-v2.dtb
 dtb-$(CONFIG_MACH_SUN7I) += \
sun7i-a20-bananapi.dtb \
+   sun7i-a20-bananapi-m1-plus.dtb \
sun7i-a20-bananapro.dtb \
sun7i-a20-cubieboard2.dtb \
sun7i-a20-cubietruck.dtb \
diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts 
b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
new file mode 100644
index 000..b62fc1d
--- /dev/null
+++ b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
@@ -0,0 +1,270 @@
+/*
+ * Copyright 2016 Luo Yi 
+ * 
+ * Thanks to the original work by Hans de Goede 
+ *
+ * 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 "sun7i-a20.dtsi"
+#include "sunxi-common-regulators.dtsi"
+#include 
+#include 
+
+/ {
+   model = "Banana Pi BPI-M1-Plus";
+   compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20";
+
+   aliases {
+   serial0 = 
+   };
+
+   chosen {
+   stdout-path = "serial0:115200n8";
+   };
+
+   leds {
+   compatible = "gpio-leds";
+   pinctrl-names = "default";
+   pinctrl-0 = <_pins_bananapi>;
+
+   red {
+   label = "bananapi:red:usr";
+   gpios = < 7 25 GPIO_ACTIVE_HIGH>;
+   linux,default-trigger = "default-on";
+   };
+
+   green {
+   label = "bananapi:green:usr";
+   gpios = < 7 24 GPIO_ACTIVE_HIGH>;
+   linux,default-trigger = "heartbeat";
+
+   };
+   };
+
+   reg_gmac_3v3: gmac-3v3 {
+   compatible = "regulator-fixed";
+   pinctrl-names = "default";
+   pinctrl-0 = <_power_pin_bananapi>;
+   regulator-name = "gmac-3v3";
+   regulator-min-microvolt = <330>;
+   regulator-max-microvolt = <330>;
+   startup-delay-us = <10>;
+   enable-active-high;
+   gpio = < 7 23 GPIO_ACTIVE_HIGH>;
+   };
+
+   reg_vmmc3: vmmc3 {
+   compatible = "regulator-fixed";
+   pinctrl-names = 

[PATCH] ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board

2016-05-30 Thread luoyi . ly
From: luoyi 

Add support for the Bananapi M1 Plus A20 development board from sinovoip.com.cn 
.
This board features 1G RAM, 2 USB A receptacles, 1 micro USB receptacle for
OTG, 1 micro USB receptacle for power, HDMI, sata, Gbit ethernet, ir receiver,
3.5 mm jack for stero sound out, on board microphone, 40 gpio pins and sdio 
wifi.

Signed-off-by: Luo Yi 
---
 arch/arm/boot/dts/Makefile   |   1 +
 arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 270 +++
 2 files changed, 271 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index e06a5ab..fde407f 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -685,6 +685,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
sun6i-a31s-yones-toptech-bs1078-v2.dtb
 dtb-$(CONFIG_MACH_SUN7I) += \
sun7i-a20-bananapi.dtb \
+   sun7i-a20-bananapi-m1-plus.dtb \
sun7i-a20-bananapro.dtb \
sun7i-a20-cubieboard2.dtb \
sun7i-a20-cubietruck.dtb \
diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts 
b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
new file mode 100644
index 000..b62fc1d
--- /dev/null
+++ b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
@@ -0,0 +1,270 @@
+/*
+ * Copyright 2016 Luo Yi 
+ * 
+ * Thanks to the original work by Hans de Goede 
+ *
+ * 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 "sun7i-a20.dtsi"
+#include "sunxi-common-regulators.dtsi"
+#include 
+#include 
+
+/ {
+   model = "Banana Pi BPI-M1-Plus";
+   compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20";
+
+   aliases {
+   serial0 = 
+   };
+
+   chosen {
+   stdout-path = "serial0:115200n8";
+   };
+
+   leds {
+   compatible = "gpio-leds";
+   pinctrl-names = "default";
+   pinctrl-0 = <_pins_bananapi>;
+
+   red {
+   label = "bananapi:red:usr";
+   gpios = < 7 25 GPIO_ACTIVE_HIGH>;
+   linux,default-trigger = "default-on";
+   };
+
+   green {
+   label = "bananapi:green:usr";
+   gpios = < 7 24 GPIO_ACTIVE_HIGH>;
+   linux,default-trigger = "heartbeat";
+
+   };
+   };
+
+   reg_gmac_3v3: gmac-3v3 {
+   compatible = "regulator-fixed";
+   pinctrl-names = "default";
+   pinctrl-0 = <_power_pin_bananapi>;
+   regulator-name = "gmac-3v3";
+   regulator-min-microvolt = <330>;
+   regulator-max-microvolt = <330>;
+   startup-delay-us = <10>;
+   enable-active-high;
+   gpio = < 7 23 GPIO_ACTIVE_HIGH>;
+   };
+
+   reg_vmmc3: vmmc3 {
+   compatible = "regulator-fixed";
+   pinctrl-names = "default";
+   pinctrl-0 = <_pin_bananapi>;
+   regulator-name