Skip to contentSkip to conversation

configs/bananapi_m1_plus_defconfig: new defconfig

PATCH New Filip Skoneczny 2 participants 2 messages Jan 25, 2021 Arm/Allwinner sunXi SoC support

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 configs/bananapi_m1_plus_defconfig: new defconfig

This commit adds support for Sinovoip's Banana Pi M1+. It is mostly based on bananapro_defconfig but with appropriate device tree and minor tweaks:

- apply bananapi-m1-plus device tree in linux
- apply bananapi_m1_plus defconfig for uboot
- apply patch for OOB IRQs on new device tree
- update device tree name in boot.cmd, genimage.cfg
- update symlink for BRCM driver in rootfs_overlay
- overall clean-up of the config

Tested on BPI-M1+ V1_1.

---
 DEVELOPERS                                    |  4 ++
 board/sinovoip/m1-plus/boot.cmd               |  5 ++
 board/sinovoip/m1-plus/genimage.cfg           | 37 +++++++++++
 board/sinovoip/m1-plus/linux-wifi.fragment    | 10 +++
 ...nanapi-m1-plus-Disable-OOB-IRQ-for-b.patch | 39 +++++++++++
 board/sinovoip/m1-plus/post-build.sh          |  4 ++
 board/sinovoip/m1-plus/readme.txt             | 64 +++++++++++++++++++
 ...rcmfmac43362-sdio.sinovoip,bpi-m1-plus.txt |  1 +
 .../lib/firmware/brcm/brcmfmac43362-sdio.txt  | 56 ++++++++++++++++
 configs/bananapi_m1_plus_defconfig            | 44 +++++++++++++
 10 files changed, 264 insertions(+)
 create mode 100644 board/sinovoip/m1-plus/boot.cmd
 create mode 100644 board/sinovoip/m1-plus/genimage.cfg
 create mode 100644 board/sinovoip/m1-plus/linux-wifi.fragment
 create mode 100644 board/sinovoip/m1-plus/patches/linux/0001-ARM-dts-sun7i-bananapi-m1-plus-Disable-OOB-IRQ-for-b.patch
 create mode 100755 board/sinovoip/m1-plus/post-build.sh
 create mode 100644 board/sinovoip/m1-plus/readme.txt
 create mode 120000 board/sinovoip/m1-plus/rootfs_overlay/lib/firmware/brcm/brcmfmac43362-sdio.sinovoip,bpi-m1-plus.txt
 create mode 100644 board/sinovoip/m1-plus/rootfs_overlay/lib/firmware/brcm/brcmfmac43362-sdio.txt
 create mode 100644 configs/bananapi_m1_plus_defconfig
DEVELOPERS +4 -0
index 7af3081760..279c37c130 100644
@@ -895,6 +895,10 @@ F:	configs/freescale_imx6ullevk_defconfig
 N:	Falco Hyfing <[email protected]>
 F:	package/python-pymodbus/
 
+N:	Filip Skoneczny <[email protected]>
+F:	board/sinovoip/m1-plus
+F:	configs/bananapi_m1_plus_defconfig
+
 N:	Floris Bos <[email protected]>
 F:	package/ipmitool/
 F:	package/odhcploc/
board/sinovoip/m1-plus/boot.cmd new file +5 -0
new file mode 100644
index 0000000000..4829996474
@@ -0,0 +1,5 @@
+setenv fdt_high ffffffff
+setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
+fatload mmc 0 $kernel_addr_r zImage
+fatload mmc 0 $fdt_addr_r sun7i-a20-bananapi-m1-plus.dtb
+bootz $kernel_addr_r - $fdt_addr_r
board/sinovoip/m1-plus/genimage.cfg new file +37 -0
new file mode 100644
index 0000000000..3cba774c6f
@@ -0,0 +1,37 @@
+# Minimal SD card image for the Banana Pi M1+
+# Based on the Banana Pro genimage.cfg
+
+image boot.vfat {
+	vfat {
+		files = {
+			"zImage",
+			"sun7i-a20-bananapi-m1-plus.dtb",
+			"boot.scr"
+		}
+	}
+	size = 10M
+}
+
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot {
+		in-partition-table = "no"
+		image = "u-boot-sunxi-with-spl.bin"
+		offset = 8192
+		size = 1040384 # 1MB - 8192
+	}
+
+	partition boot {
+		partition-type = 0xC
+		bootable = "true"
+		image = "boot.vfat"
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+		size = 512M
+	}
+}
board/sinovoip/m1-plus/linux-wifi.fragment new file +10 -0
new file mode 100644
index 0000000000..5576d738ad
@@ -0,0 +1,10 @@
+# Networking support
+CONFIG_WIRELESS=y
+CONFIG_CFG80211=y
+CONFIG_CFG80211_WEXT=y
+CONFIG_RFKILL=y
+
+# Network device support
+CONFIG_WLAN=y
+CONFIG_WLAN_VENDOR_BROADCOM=y
+CONFIG_BRCMFMAC=m
board/sinovoip/m1-plus/patches/linux/0001-ARM-dts-sun7i-bananapi-m1-plus-Disable-OOB-IRQ-for-b.patch new file +39 -0
new file mode 100644
index 0000000000..b01b6b2829
@@ -0,0 +1,39 @@
+From 58bae4096a7bf8d5d3bfbddb82cb37dd0561c938 Mon Sep 17 00:00:00 2001
+From: Filip Skoneczny <[email protected]>
+Date: Sun, 10 Jan 2021 19:07:14 +0100
+Subject: [PATCH] ARM: dts: sun7i: bananapi-m1-plus: Disable OOB IRQ for brcm
+ wifi module
+
+    Based on 23bc805.
+    BugLink: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=908438
+
+Signed-off-by: Filip Skoneczny <[email protected]>
+---
+ arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
+index 32d5d45a35c0..97f9987f51d7 100644
+--- a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
++++ b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
+@@ -193,9 +193,14 @@ &mmc3 {
+ 	brcmf: wifi at 1 {
+ 		reg = <1>;
+ 		compatible = "brcm,bcm4329-fmac";
+-		interrupt-parent = <&pio>;
+-		interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>;
+-		interrupt-names = "host-wake";
++		/*
++		 * OOB interrupt support is broken ATM, drv probe failing with:
++		 * ieee80211 phy0: brcmf_attach: dongle is not responding: err=-110
++		 *
++		 * interrupt-parent = <&pio>;
++		 * interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>;
++		 * interrupt-names = "host-wake";
++		 */
+ 	};
+ };
+ 
+-- 
+2.25.1
+
board/sinovoip/m1-plus/post-build.sh new file +4 -0
new file mode 100755
index 0000000000..4ee6fa3bc4
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Remove all but the brcmfmac43362 firmware files
+find $TARGET_DIR/lib/firmware/brcm -type f -not -name "brcmfmac43362*" -delete
board/sinovoip/m1-plus/readme.txt new file +64 -0

64 lines not on this page · raw message

board/sinovoip/m1-plus/rootfs_overlay/lib/firmware/brcm/brcmfmac43362-sdio.sinovoip,bpi-m1-plus.txt new file +1 -0
new file mode 120000
index 0000000000..93947975ee
@@ -0,0 +1 @@
+brcmfmac43362-sdio.txt
\ No newline at end of file
board/sinovoip/m1-plus/rootfs_overlay/lib/firmware/brcm/brcmfmac43362-sdio.txt new file +56 -0

56 lines not on this page · raw message

configs/bananapi_m1_plus_defconfig new file +44 -0

44 lines not on this page · raw message

Signature · 1 line
2.25.1
#1 lore raw

PATCH v4 1/1 configs/bananapi_m1_plus_defconfig: new defconfig

Quoted 27 lines · On Mon, 25 Jan 2021 18:44:03 +0100 Filip Skoneczny <[email protected]> wrote:

This commit adds support for Sinovoip's Banana Pi M1+. It is mostly based on bananapro_defconfig but with appropriate device tree and minor tweaks:

- apply bananapi-m1-plus device tree in linux
- apply bananapi_m1_plus defconfig for uboot
- apply patch for OOB IRQs on new device tree
- update device tree name in boot.cmd, genimage.cfg
- update symlink for BRCM driver in rootfs_overlay
- overall clean-up of the config

Tested on BPI-M1+ V1_1.

---
 DEVELOPERS                                    |  4 ++
 board/sinovoip/m1-plus/boot.cmd               |  5 ++
 board/sinovoip/m1-plus/genimage.cfg           | 37 +++++++++++
 board/sinovoip/m1-plus/linux-wifi.fragment    | 10 +++
 ...nanapi-m1-plus-Disable-OOB-IRQ-for-b.patch | 39 +++++++++++
 board/sinovoip/m1-plus/post-build.sh          |  4 ++
 board/sinovoip/m1-plus/readme.txt             | 64 +++++++++++++++++++
 ...rcmfmac43362-sdio.sinovoip,bpi-m1-plus.txt |  1 +
 .../lib/firmware/brcm/brcmfmac43362-sdio.txt  | 56 ++++++++++++++++
 configs/bananapi_m1_plus_defconfig            | 44 +++++++++++++
 10 files changed, 264 insertions(+)
 create mode 100644 board/sinovoip/m1-plus/boot.cmd
Quoted 8 lines
 create mode 100644 board/sinovoip/m1-plus/genimage.cfg
 create mode 100644 board/sinovoip/m1-plus/linux-wifi.fragment
 create mode 100644 board/sinovoip/m1-plus/patches/linux/0001-ARM-dts-sun7i-bananapi-m1-plus-Disable-OOB-IRQ-for-b.patch
 create mode 100755 board/sinovoip/m1-plus/post-build.sh
 create mode 100644 board/sinovoip/m1-plus/readme.txt
 create mode 120000 board/sinovoip/m1-plus/rootfs_overlay/lib/firmware/brcm/brcmfmac43362-sdio.sinovoip,bpi-m1-plus.txt
 create mode 100644 board/sinovoip/m1-plus/rootfs_overlay/lib/firmware/brcm/brcmfmac43362-sdio.txt
 create mode 100644 configs/bananapi_m1_plus_defconfig

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com