Skip to contentSkip to conversation

ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board

PATCH Superseded [email protected] 5 participants 10 messages Jun 2, 2016 – Jun 16, 2016

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board

From: Luo Yi <[email protected]>

Add support for the Bananapi M1 Plus A20 development board from sinovoip.com.cn . This board is nearly a clone of the Lemaker's Bananapro, but differ with the wlan chipset connection and i2s pinout. And I also enable the integrated audio codec on default.

---
 arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 72 ++++++++++++++++++++++++
 1 file changed, 72 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +72 -0
new file mode 100644
index 0000000..6fd55d7
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2016 Luo Yi <[email protected]>
+ *
+ * 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.
+ */
+
+#include "sun7i-a20-bananapro.dts"
+
+/ {
+	model = "Banana Pi BPI-M1-Plus";
+	compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20";
+};
+
+
+&codec {
+	status = "okay";
+};
+
+&mmc3 {
+	enable-sdio-wakeup;
+
+	brcmf: bcrmf@1 {
+		reg = <1>;
+		compatible = "brcm,bcm4329-fmac";
+		interrupt-parent = <&pio>;
+		interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>; 
+		interrupt-names = "host-wake";
+	};
+
+};
+
+&mmc3_pins_a {
+    /* AP6210 requires pull-up */
+	allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+};
+
Signature · 1 line
2.8.3
#1 lore raw

Hi Luo yi,

Quoted 6 lines · On Thu, Jun 2, 2016 at 12:36 PM, <[email protected]> wrote:

From: Luo Yi <[email protected]>

Add support for the Bananapi M1 Plus A20 development board from sinovoip.com.cn . This board is nearly a clone of the Lemaker's Bananapro, but differ with the wlan chipset connection and i2s pinout. And I also enable the integrated audio codec on default.

No signed-off-by.

Quoted 51 lines
---
 arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 72 ++++++++++++++++++++++++
 1 file changed, 72 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +40 -0
new file mode 100644
index 0000000..6fd55d7
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2016 Luo Yi <[email protected]>
+ *
+ * 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.

arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 50

Quoted 10 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +10 -0
+ */
+
+#include "sun7i-a20-bananapro.dts"
+
+/ {
+       model = "Banana Pi BPI-M1-Plus";
+       compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20";
+};
+
+

Extra line.

arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 53

Quoted 3 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +3 -0
+&codec {
+       status = "okay";
+};

Does anyone know if this should be enabled on the bananapro too?

arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 65

Quoted 12 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +12 -0
+
+&mmc3 {
+       enable-sdio-wakeup;
+
+       brcmf: bcrmf at 1 {
+               reg = <1>;
+               compatible = "brcm,bcm4329-fmac";
+               interrupt-parent = <&pio>;
+               interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>;
+               interrupt-names = "host-wake";
+       };
+

Extra line.

arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 69

Quoted 4 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +4 -0
+};
+
+&mmc3_pins_a {
+    /* AP6210 requires pull-up */

Should this be indented the same as the following line?

arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 72

Quoted 3 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +3 -0
+       allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+};
+

Extra line.

Thanks,

Signature · 4 lines
Julian Calaby

Email: julian.calaby at gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
#2 lore raw
Quoted 76 lines · Julian Calaby

Hi Luo yi,

Quoted 6 lines · On Thu, Jun 2, 2016 at 12:36 PM, <[email protected]> wrote:

From: Luo Yi <[email protected]>

Add support for the Bananapi M1 Plus A20 development board from sinovoip.com.cn . This board is nearly a clone of the Lemaker's Bananapro, but differ with the wlan chipset connection and i2s pinout. And I also enable the integrated audio codec on default.

No signed-off-by.

Quoted 51 lines
---
 arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 72 ++++++++++++++++++++++++
 1 file changed, 72 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +40 -0
new file mode 100644
index 0000000..6fd55d7
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2016 Luo Yi <[email protected]>
+ *
+ * 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.

arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 50

Quoted 10 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +10 -0
+ */
+
+#include "sun7i-a20-bananapro.dts"
+
+/ {
+       model = "Banana Pi BPI-M1-Plus";
+       compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20";
+};
+
+

Extra line.

Quoted 5 lines

arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 53

Quoted 3 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts new file +3 -0
+&codec {
+       status = "okay";
+};

Does anyone know if this should be enabled on the bananapro too?

Yes, everything that is shared with the banana-pro (which, judging from Bernhard, is pretty much everything but a GPIO) should be merged in the banapro DT.

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160602/13f3e752/attachment.sig>
#3 lore raw

Am 02.06.2016 um 10:16 schrieb Maxime Ripard:

Quoted 7 lines

[...]
Yes, everything that is shared with the banana-pro (which, judging from Bernhard, is pretty much everything but a GPIO) should be merged in the banapro DT.

Maxime

Don't take my word for granted, as I do not own this hardware or know it particularly well. There is no doubt that "BPi-M1+" and "Banana Pro" are very similar, but if in doubt the information form the wiki should be verified.

@luoyi:

You seem to be using an editor that uses 4 spaces for displaying a <TAB>. It looks like that makes you prone to whitespace formatting issues, which have shown up in both versions of the .dts you submitted so far.

Please double-check that you're using TABs for indentation and they weren't mixed up with SPACEs accidentally. (Most editors will also offer a setting that allows you to display "non-printable" chars, where you might be able to distinguish whitespace better.)

Regards, B. Nortmann

#4 lore raw

From: Luo Yi <[email protected]>

Remove the extra empty line and add signed off.

---
 arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 4 ----
 1 file changed, 4 deletions(-)
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts +0 -4
index 6fd55d7..f9063ba 100644
@@ -47,7 +47,6 @@
 	compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20";
 };
 
-
 &codec {
 	status = "okay";
 };
@@ -62,11 +61,8 @@
 		interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>; 
 		interrupt-names = "host-wake";
 	};
-
 };
 
 &mmc3_pins_a {
-    /* AP6210 requires pull-up */
 	allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
 };
-
Signature · 1 line
2.8.3
#5 lore raw
Quoted 5 lines · luoyi.ly at gmail.com

From: Luo Yi <[email protected]>

Remove the extra empty line and add signed off.

Please send a new patch.

Quoted 17 lines
---
 arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 4 ----
 1 file changed, 4 deletions(-)
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts +0 -1
index 6fd55d7..f9063ba 100644
@@ -47,7 +47,6 @@
 	compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20";
 };
 
-
 &codec {
 	status = "okay";
 };

arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts line 69

Quoted 8 lines
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts +0 -2
@@ -62,11 +61,8 @@
 		interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>; 
 		interrupt-names = "host-wake";
 	};
-
 };
 
 &mmc3_pins_a {
-    /* AP6210 requires pull-up */

And that comment was fine, why did you remove it?

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160610/d6dafede/attachment.sig>
#6 lore raw
In reply to Bernhard Nortmann
Quoted 6 lines · Bernhard Nortmann

Am 02.06.2016 um 10:16 schrieb Maxime Ripard:

Quoted 5 lines

[...]
Yes, everything that is shared with the banana-pro (which, judging from Bernhard, is pretty much everything but a GPIO) should be merged in the banapro DT.

Quoted 7 lines
Quoted 2 lines

Maxime

Don't take my word for granted, as I do not own this hardware or know it particularly well. There is no doubt that "BPi-M1+" and "Banana Pro" are very similar, but if in doubt the information form the wiki should be verified.

Hmmmm, ok. Chen-Yu, any input on this? You know the banana-pis much more than I do.

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160610/2c9da789/attachment.sig>
#7 lore raw
Quoted 10 lines · Maxime Ripard
Quoted 9 lines · Bernhard Nortmann

Am 02.06.2016 um 10:16 schrieb Maxime Ripard:

Quoted 7 lines

[...]
Yes, everything that is shared with the banana-pro (which, judging from Bernhard, is pretty much everything but a GPIO) should be merged in the banapro DT.

Maxime

Quoted 7 lines
Quoted 4 lines

Don't take my word for granted, as I do not own this hardware or know it particularly well. There is no doubt that "BPi-M1+" and "Banana Pro" are very similar, but if in doubt the information form the wiki should be verified.

Hmmmm, ok. Chen-Yu, any input on this? You know the banana-pis much more than I do.

I did a comparison of the "Banana Pro" vs the "BPi-M1+".

The differences are similar to what we have with any other development board, say the Cubietruck:

- A different WiFi chip is used, and the BT part is not hooked up.
- Different GPIOs for external power regulator/switches
- Different GPIOs for LEDs
- Different peripherals exposed on the headers.

IMO There's no need to merge or have a common .dtsi for the two boards. They (and all the other development boards) look similar because everyone is following the basic set by Allwinner's reference design, like which MMC controller and pins are used for SD/MMC, which ones are used for SDIO-based WiFi, and so on.

I did a version completely from scratch using just the schematics:

https://github.com/wens/linux/commits/bpi-m1-plus

Please ignore the last commit. It's just me playing with NTP support for GPS time.

Regards
ChenYu

#8 lore raw

Hi Chen-Yu,

Quoted 25 lines · Chen-Yu Tsai
Quoted 10 lines · Maxime Ripard
Quoted 9 lines · Bernhard Nortmann

Am 02.06.2016 um 10:16 schrieb Maxime Ripard:

Quoted 7 lines

[...]
Yes, everything that is shared with the banana-pro (which, judging from Bernhard, is pretty much everything but a GPIO) should be merged in the banapro DT.

Maxime

Quoted 7 lines
Quoted 4 lines

Don't take my word for granted, as I do not own this hardware or know it particularly well. There is no doubt that "BPi-M1+" and "Banana Pro" are very similar, but if in doubt the information form the wiki should be verified.

Hmmmm, ok. Chen-Yu, any input on this? You know the banana-pis much more than I do.

I did a comparison of the "Banana Pro" vs the "BPi-M1+".

The differences are similar to what we have with any other development board, say the Cubietruck:

Quoted 6 lines

- A different WiFi chip is used, and the BT part is not hooked up.
- Different GPIOs for external power regulator/switches
- Different GPIOs for LEDs
- Different peripherals exposed on the headers.

IMO There's no need to merge or have a common .dtsi for the two boards.

Ok.

Quoted 8 lines

They (and all the other development boards) look similar because everyone is following the basic set by Allwinner's reference design, like which MMC controller and pins are used for SD/MMC, which ones are used for SDIO-based WiFi, and so on.

I did a version completely from scratch using just the schematics:

https://github.com/wens/linux/commits/bpi-m1-plus

So, what do you mean by that? Do you have some comments on that patch, or should I merge it, and you'll post your additions on top of it?

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160615/018a54a8/attachment.sig>
#9 lore raw
Quoted 42 lines · Maxime Ripard

Hi Chen-Yu,

Quoted 25 lines · Chen-Yu Tsai
Quoted 10 lines · Maxime Ripard
Quoted 9 lines · Bernhard Nortmann

Am 02.06.2016 um 10:16 schrieb Maxime Ripard:

Quoted 7 lines

[...]
Yes, everything that is shared with the banana-pro (which, judging from Bernhard, is pretty much everything but a GPIO) should be merged in the banapro DT.

Maxime

Quoted 7 lines
Quoted 4 lines

Don't take my word for granted, as I do not own this hardware or know it particularly well. There is no doubt that "BPi-M1+" and "Banana Pro" are very similar, but if in doubt the information form the wiki should be verified.

Hmmmm, ok. Chen-Yu, any input on this? You know the banana-pis much more than I do.

I did a comparison of the "Banana Pro" vs the "BPi-M1+".

The differences are similar to what we have with any other development board, say the Cubietruck:

Quoted 6 lines

- A different WiFi chip is used, and the BT part is not hooked up.
- Different GPIOs for external power regulator/switches
- Different GPIOs for LEDs
- Different peripherals exposed on the headers.

IMO There's no need to merge or have a common .dtsi for the two boards.

Ok.

Quoted 5 lines

They (and all the other development boards) look similar because everyone is following the basic set by Allwinner's reference design, like which MMC controller and pins are used for SD/MMC, which ones are used for SDIO-based WiFi, and so on.

Quoted 6 lines
Quoted 3 lines

I did a version completely from scratch using just the schematics:

https://github.com/wens/linux/commits/bpi-m1-plus

So, what do you mean by that? Do you have some comments on that patch, or should I merge it, and you'll post your additions on top of it?

I'd like Luo to send a new version, based on what was his updated v1.

I'll reply to that one with some comments.

ChenYu