Hi everyone,
I had an early-ish Librem5 evergreen with the Redpine wifi card, which stopped working after one year. I wanted to buy the new SparkLan card but from where I live the shipping fee would have been 3x the price of the card.
So instead I bought a LWB5+ M.2 SDIO wifi card on Mouser as a replacement. On paper, all that was needed was putting the firmware files (see here) in /lib/firmware/brcm/ and trigger the kill switches to initiate the firmware boot.
I was faced instead with this error when using dmesg | grep brcm
:
brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
This led me to this FAQ answer which points to an unfulfilled/misconfigured external 32khz crystal oscillator.
I found that the firmware has an NVRAM configuration file, and it seems that the parameter boardflags3 is related to the crystal oscillator, so I modified it by changing randomly the value from 0x48202100 to 0x40202100 and the firmware was able to boot, and I got WIFI on the Librem5 with it directly!!
My issue now is that I have this error:
ieee80211 phy13: brcmf_cfg80211_set_rekey_data: gtk_key_info iovar failed: ret=-52
which seems to say that the value I put is incorrect (also it is the same when I put random values or comment out boardflags3), so I fear I merely bypassed the check for an oscillator by putting an incorrect value…
Since it seems the oscillator is needed for power saving features, and the Librem5 clearly has one according to the schematics, does anyone know how I can put a correct parameter and/or debug this? I tried using the same value as the NVRAM config for the Redpine card but it is the same outcome.
Thanks,