I'm trying to get the WiFi working on a Banana PI M2M using the mainline kernel.

The device tree definition of the banana pi m2m is very incomplete sun8i-r16-bananapi-m2m.dts I successfully managed to get SPI working but I am now struggling to get the WiFi drivers working as they should.

The banana pi M2M uses the AP6212 chip which from the looks of it uses a BRCM4329 chip.

The AP6212 is connected through the SDIO1 to the allwinner A33, PL6 is connected WL_PMU_EN and PL7 is connected to WL-WAKE-AP. (https://drive.google.com/file/d/0B4PAo2nW2KfndHY1VF9UWXl2Rm8/view?usp=sharing)

I've modified the dts with the following:

&mmc1 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc1_pg_pins>;
        vmmc-supply = <&reg_aldo1>;
        mmc-pwrseq = <&wifi_pwrseq>;
        bus-width = <4>;
        status = "okay";

        brcmf: wifi@1 {
                reg = <1>;
                compatible = "brcm,bcm4329-fmac";
                interrupt-parent = <&r_pio>;
                interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>;  /* PL7 */
                interrupt-names = "host-wake";

I've enabled in the kernel 80211, the bcrm-fmac driver and brcm-fmac-sdio. In buildroot I've added the wireless-regdb package. I've also copied from the bananapi official image (kernel 3.4) the /lib/firmware/brcm to get the firmware and config.

At the point I can load the driver with modprobe but I get a timeout issue and not too sure where to look from here...

# modprobe brcmfmac
[   67.440758] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[   67.513578] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[   67.595615] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
# [   68.745996] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
[   69.767856] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50

My guess (but it's really just a guess) is that i'm missing some steps to properly wake up the wifi chip but measuring on the board it looks like the different rails are at the right level.

Has anyone by any chance got a recent kernel working with the different drivers on a banana pi m2m?

Thanks for any answers or tips!

1 Answer 1


I have same board and also want to use mainline Linux.

I found this line in 3.4 kernel log of Banana pi m2m bsp:

[   14.519605] DHD: dongle ram size is set to 524288(orig 524288) at 0x0
[   14.535387] dhd_conf_read_others: ccode = CN
[   14.535623] dhd_conf_read_others: regrev = 0
[   14.535763] Final fw_path=/lib/firmware/ap6212/fw_bcm43438a1.bin
[   14.535959] Final nv_path=/lib/firmware/ap6212/nvram.txt

So, copy /lib/firmware/ap6212/fw_bcm43438a1.bin to /lib/firmware/brcm/brcmfmac43430-sdio.bin and copy /lib/firmware/ap6212/nvram.txt to /lib/firmware/brcm/brcmfmac43430-sdio.sinovoip,bananapi-m2m.txt and it works.

I have got working Wi-Fi now.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .