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 = <®_aldo1>;
mmc-pwrseq = <&wifi_pwrseq>;
bus-width = <4>;
non-removable;
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!