Need help to use WiFi with the ODYSSEY-STM32MP157C

I follow the “Debian: Getting Started with the ODYSSEY-STM32MP157C” Guide, with Kernel 5.5.19-armv7-lpae-x27.

I tried to use WiFi. The brcmfmac43430-sdio.bin and its blob which is specified in avobe link isn’t exists now, so I use cyfmac43430-sdio with rename.

I also use uboot_overlay introduced here, and its boot log is below.

Loaded environment from /uEnv.txt
debug: [dtb=stm32mp157c-seeed-npi.dtb] ...
Using: dtb=stm32mp157c-seeed-npi.dtb ...
Checking if uname_r is set in /uEnv.txt...
Running uname_boot ...
loading /vmlinuz-5.5.19-armv7-lpae-x27 ...
10190944 bytes read in 679 ms (14.3 MiB/s)
debug: [enable_uboot_overlays=1] ...
debug: [uboot_base_dtb=] ...
loading /dtbs/5.5.19-armv7-lpae-x27/stm32mp157c-seeed-npi.dtb ...
64390 bytes read in 11 ms (5.6 MiB/s)
uboot_overlays: [fdt_buffer=0x60000] ...
uboot_overlays: loading /lib/firmware/stm32mp1-seeed-ap6236-overlay.dtbo ...
4249 bytes read in 3 ms (1.4 MiB/s)
debug: [console=ttySTM0,115200 root=/dev/mmcblk0p5 ro rootfstype=ext4 rootwait coherent_pool=1M] ...
debug: [bootz 0xC2000000 - c4000000] ...
## Flattened Device Tree blob at c4000000
   Booting using the fdt blob at 0xc4000000
   reserving fdt memory region: addr=c4000000 size=71000
   Using Device Tree in place at c4000000, end c4073fff

Do any of you have any knowledge of this?

Thank you.

HI @pojiro

I’m trying to remember if WiFi actually worked for me when i wrote the guide…

But I’ve dug out these versions out of git… the whole Cypress rename of firmware names has started to create a massive mess…

wget -c https://raw.githubusercontent.com/rcn-ee/sdk-firmware/master/ODYSSEY-STM32MP157C/brcmfmac/brcmfmac43430-sdio.txt
wget -c https://raw.githubusercontent.com/rcn-ee/sdk-firmware/master/ODYSSEY-STM32MP157C/brcmfmac/brcmfmac43430-sdio.bin
wget -c https://raw.githubusercontent.com/rcn-ee/sdk-firmware/master/ODYSSEY-STM32MP157C/brcmfmac/brcmfmac43430-sdio.1DX.clm_blob

Regards,

Thank you for your quick reply, @RobertCNelson san.

After posted, I googled the firmware info, then I found this, ODYSSEY-STM32MP157C Wi-Fi firmware? - ODYSSEY Serials - Seeed Forum.

These firmware are from Broadcom. We didn’t get the source code, they authorized us to use the binaries.

So firmware is provided from Seeed as binary.

I’m new to the device tree, the driver that WiFi device tree overlay is tied to is bcmdhd, which doesn’t seem to already exist now. Below is a part of stm32mp1-seeed-ap6236-overlay.dts,

	fragment@10 {
		target-path = "/";
		__overlay__ {
			wifi_pwrseq: wifi-pwrseq {
				compatible = "mmc-pwrseq-simple";
				reset-gpios = <&gpiod 9 GPIO_ACTIVE_LOW>;
				post-power-on-delay-ms = <1>;
			};
			bcmdhd_wlan1: bcmdhd_wlan@1 {
				compatible = "android,bcmdhd_wlan";
				gpios = <&gpiog 12 GPIO_ACTIVE_HIGH>;
			};
		};
	};

So I think I need to change its “compatible” to “brcm,bcm4329-fmac” to bind brcmfmac driver ?

Thank you.

bcmdhd_wlan has it’s own labels, i’d first try updating the mmc node:

&sdmmc2 {

	brcmf: bcrmf@1 {
		reg = <1>;
		compatible = "brcm,bcm4329-fmac";
	};
};

Regards,

So is there any solution to bring up the Wi-Fi on this board in Debian 12?
I tried to build/merge the ap6236 overlay Seed provides. Tried with several firmware binaries, but this is as far as I’ve got:

brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50

I’ll dig around, i think i have this board somewhere in my collection..

Regards,

Anyway. This is what I have got so far: stm32mp157c-odyssey/linux-patch/stm32mp157c-odyssey.dts

Spent some more time on it. Tried to merge the WiFi configuration from the stm32mp157c-dk2.dts
Have got further with the brcmfmac43430-sdio.bin and brcmfmac43430-sdio.txt:

ieee80211 phy0: brcmf_escan_timeout: timer expired

wlan0 showed up in ifconfig:

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 02:6d:ad:e9:9f:25  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

But iwctl station wlan0 scan/get-networks gave me “No networks available

The xtalfreq=37400 seemed to be the issue in brcmfmac43430-sdio.txt.
Changed to 26000 as the onboard xtall is 26MHz (For some reason that didn’t me help last time, maybe because of a previous device tree miss configuration)
Anyway, Wi-Fi is working now…

Also it seems that iwd is sending the Neighbors report request, which brcm80211/brcmfmac/p2p.c linux driver cannot handle and crashes with the:

brcmf_p2p_send_action_frame: Unknown Frame: category 0x5, action 0x4

But wpa_supplicant is working fine.