Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: RPI02W wifi driver?



On Tue, 2023-05-16 at 17:46 -0400, Jim Spath wrote:
> On Sat, May 6, 2023 at 7:18 PM Dave Tyson <dtyson%anduin.org.uk@localhost>
> wrote:
> > Following on from Michael van Elst's post:
> > A reboot produced:
> > [     5.097254] bwfm0: Found Firmware file: brcmfmac43430-
> > sdio.raspberrypi,model-zero-2-w.bin
> > [     5.127256] bwfm0: NVRAM file default:    brcmfmac43430-
> > sdio.txt
> > [     5.127256] bwfm0: NVRAM file model-spec: brcmfmac43430-
> > sdio.raspberrypi,model-zero-2-w.txt
> > [     5.127256] bwfm0: Found NVRAM file: brcmfmac43430-
> > sdio.raspberrypi,model-zero-2-w.txt
> > [     5.127256] bwfm0: CLM file default:    brcmfmac43430-
> > sdio.clm_blob
> > [     5.127256] bwfm0: CLM file model-spec: brcmfmac43430-
> > sdio.raspberrypi,model-zero-2-w.clm_blob
> > [     5.127256] bwfm0: Found CLM file: brcmfmac43430-
> > sdio.raspberrypi,model-zero-2-w.clm_blob
> > [     6.867502] bwfm0: CHIPACTIVE
> > [     6.967515] bwfm0: address e4:5f:01:3b:02:44
> > [     6.987518] bwfm0: wl0: Mar 31 2022 17:24:51 version 9.88.4.77
> > (g58bc5cc) FWID 01-3b307371
> > ...
> > So I guess this shows that the rpi zero 2 wifi will work OK - it
> > just
> > needs a bit of tinkering with the dtb.
> > Dave
> 
> Progress report from my tinkers:
> 
> 0w - I obtained a Pi 0W and installed the most recent earmv6hf image.
> The boot process found the wifi module and it just worked.
> 
> [     6.076562] bwfm0: Found Firmware file: brcmfmac43430-sdio.bin
> [     6.116676] bwfm0: NVRAM file default:    brcmfmac43430-sdio.txt
> [     6.126797] bwfm0: NVRAM file model-spec:
> brcmfmac43430-sdio.raspberrypi,model-zero-w.txt
> [     6.126797] bwfm0: Found NVRAM file:
> brcmfmac43430-sdio.raspberrypi,model-zero-w.txt
> [     6.126797] bwfm0: CLM file default:    brcmfmac43430-
> sdio.clm_blob
> [     6.126797] bwfm0: CLM file model-spec:
> brcmfmac43430-sdio.raspberrypi,model-zero-w.clm_blob
> [     8.359565] bwfm0: CHIPACTIVE
> 
> It's on the local wifi and purring.
> 
> 02w - I have not made progress; the notes Dave shared are
> encouraging.
> 
> 4 - With a newer UEFI boot "chip", the system that had not recognized
> the wifi module can see it now.
> 
> [     2.462716] bwfm0: NVRAM file default:    brcmfmac43455-sdio.txt
> [     2.462716] bwfm0: NVRAM file model-spec:
> brcmfmac43455-sdio.Raspberry Pi 4 Model B.txt
> [     2.462716] bwfm0: autoconfiguration error: NVRAM file not
> available
> 
> I *think* this last hurdle is just a file naming or linking issue
> (which will become obvious when it works).


Hi Jim,

I have been meaning to write up the steps I have taken with changes to
NetBSD 10 to get the rpi zero 2 w working OK with wifi.

Bottom line: I have created a armv7.img.gz file which is available at
http://penkett.anduin.org.uk/~dtyson/armv7.img.gz

This is a snapshot of NetBSD-10 from about a week ago with local
changes.

The basic ones are:

pull the linux
bcm2837-rpi-zero-2-w.dts
bcm283x-rpi-led-deprecated.dtsi
bcm283x-rpi-wifi-bt.dtsi 

into 

/usr/src/external/gpl2/dts/dist/arch/arm/boot/dts
and update the Makefile to build the rpi02w dtb.

Pull in the firmware files from linux for 

/usr/src/external/broadcom/bwfm/dist/brcmfmac43436-sdio.bin
/usr/src/external/broadcom/bwfm/dist/brcmfmac43436-sdio.clm_blob
/usr/src/external/broadcom/bwfm/dist/brcmfmac43436-sdio.txt

Modify the Makefile to make the hardlinks for the rpi02w to the above
files.

Update the rpi firmware files (bootcode.bin, start*  & fixup* etc) and
modify the Makefiles to copy the start_x/fixup_x to the release as
these have also been missing in previous releases and are needed if you
want to use the camera. The rpi02 needs later versions of the
start*/fixup* files than are shipped with the current 10 snapshots.

You also need to fixup the dist file lists so the extra files don't
cause issues...

The main reason for the delay is I have been trying to get local
changes working on current so I can send-pr with some patches. The
rpi02w has a bcm43430/2 and the current bwfm driver does thinks it is
dealing with a 43430 and so tries to load the wrong firmware files. I
think there are a few changes needed to the device id grok code, but I
haven't had a chance to look at the data sheets and the current code in
detail.

Have a try with the image and let me know if it works OK as there may
be some other wifi chip variants shipped with the rpi02w... 
I have left the linux dts/dtsi's unchanged so you need to use an
overlay to enable the spi interface. I personally think NetBSD should
ship images with this enabled - but I am sure others would reject this
:-)

Dave





Home | Main Index | Thread Index | Old Index