Port-arm archive

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

Re: RPI02W wifi driver?



On  Wed, 3 May 2023 15:11:02 Jim Spath <jspath55%gmail.com@localhost>
wrote:

> I installed NetBSD 10 BETA on a Raspberry Pi 3B, which finds a wifi
> driver (bwfm). This has been working fine for me with
> dhcpcd/wpa_supplicant for 10+ days of testing,
> Apr 14 19:18:43 arm64 dhcpcd[718]: bwfm0: soliciting a DHCP lease
> 
> But a Pi 02W with 10 BETA installed shows no sign of the bwfm 
> configuration.
>
> Is there a kernel that would include that driver if it is not in 
> GENERIC?
> If I need to build my own, cross-compiling on a more powerful system
> will be faster; any tips beyond "edit KERNEL file/make depend/make"?
>
> Or, if only the Pi *0W* flavor wifi driver works, I'll get on those
> supply waiting lists.
>
> (I understand the native wifi module is *not* supported currently on
> Pi4 flavors)

I have been playing with the rpi zero 2 w on both NetBSD-10 and Current
using the NetBSD 64bit arm7 base (The NetBD arm6 kernel doesn't seem
work on this system, although the equivalent Linux version does).

While I could get the i2c and spi interfaces working I never saw the
bwfm wifi detected and so have to use a ral usb wifi dongle. 

If I booted a 64 bit linux kernel then bwfm was detected and worked and
I wondered if it was an issue with the NetBSD dtb (You have to use the
NetBSDrpi 3b dtb as there is no specific NetBSD one for the rpi zero 2
w).

Out of interest I copied the linux dtb onto the NetBSD sdcard and
booted it up. This showed a btfm wifi instance, but it complained about
a missing clock and wouldn't work. I am working to try and get around
this problem by modifiying the rp1 3b dtb. I am wondering if the
attachment point for the wifi interface is slightly different - it must
plug into the sdmmc controller (and there are two of these). Sadly the
schematics for either board are unobtainable so it may be trial and
error.


The dmesg for a recent current with the linix dtb is below:

 [     1.000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003,
[     1.000000]     2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
2012, 2013,
[     1.000000]     2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021,
2022, 2023
[     1.000000]     The NetBSD Foundation, Inc.  All rights reserved.
[     1.000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[     1.000000]     The Regents of the University of California.  All
rights reserved.

[     1.000000] NetBSD 10.99.3 (GENERIC) #0: Sun Apr 16 04:52:19 UTC
2023
[     1.000000]         mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/ev
barm/compile/GENERIC
[     1.000000] total memory = 448 MB
[     1.000000] avail memory = 422 MB
[     1.000000] timecounter: Timecounters tick every 10.000 msec
[     1.000000] Kernelized RAIDframe activated
[     1.000000] armfdt0 (root)
[     1.000000] simplebus0 at armfdt0: Raspberry Pi Zero 2 W Rev 1.0
[     1.000000] simplebus1 at simplebus0
[     1.000000] simplebus2 at simplebus0
[     1.000000] cpus0 at simplebus0
[     1.000000] simplebus3 at simplebus0
[     1.000000] cpu0 at cpus0: 600 MHz Cortex-A53 r0p4 (Cortex V8A
core)
[     1.000000] cpu0: DC enabled IC enabled WB enabled EABT branch
prediction enabled
[     1.000000] cpu0: L1 32KB/64B 2-way (256 set) VIPT Instruction
cache
[     1.000000] cpu0: L1 32KB/64B 4-way (128 set) write-back-locking-C
PIPT Data cache
[     1.000000] cpu0: L2 512KB/64B 16-way (512 set) write-through PIPT
Unified cache
[     1.000000] vfp0 at cpu0: NEON MPE (VFP 3.0+), rounding, NaN
propagation, denormals
[     1.000000] cpu1 at cpus0: 600 MHz Cortex-A53 r0p4 (Cortex V8A
core)
[     1.000000] cpu1: DC enabled IC enabled WB enabled EABT branch
prediction enabled
[     1.000000] cpu1: L1 32KB/64B 2-way (256 set) VIPT Instruction
cache
[     1.000000] cpu1: L1 32KB/64B 4-way (128 set) write-back-locking-C
PIPT Data cache
[     1.000000] cpu1: L2 512KB/64B 16-way (512 set) write-through PIPT
Unified cache
[     1.000000] vfp1 at cpu1: NEON MPE (VFP 3.0+), rounding, NaN
propagation, denormals
[     1.000000] cpu2 at cpus0: 600 MHz Cortex-A53 r0p4 (Cortex V8A
core)
[     1.000000] cpu2: DC enabled IC enabled WB enabled EABT branch
prediction enabled
[     1.000000] cpu2: L1 32KB/64B 2-way (256 set) VIPT Instruction
cache
[     1.000000] cpu2: L1 32KB/64B 4-way (128 set) write-back-locking-C
PIPT Data cache
[     1.000000] cpu2: L2 512KB/64B 16-way (512 set) write-through PIPT
Unified cache
[     1.000000] vfp2 at cpu2: NEON MPE (VFP 3.0+), rounding, NaN
propagation, denormals
[     1.000000] cpu3 at cpus0: 600 MHz Cortex-A53 r0p4 (Cortex V8A
core)
[     1.000000] cpu3: DC enabled IC enabled WB enabled EABT branch
prediction enabled
[     1.000000] cpu3: L1 32KB/64B 2-way (256 set) VIPT Instruction
cache
[     1.000000] cpu3: L1 32KB/64B 4-way (128 set) write-back-locking-C
PIPT Data cache
[     1.000000] cpu3: L2 512KB/64B 16-way (512 set) write-through PIPT
Unified cache
[     1.000000] vfp3 at cpu3: NEON MPE (VFP 3.0+), rounding, NaN
propagation, denormals
[     1.000000] bcmicu0 at simplebus1
[     1.000000] fclock0 at simplebus2: 19200000 Hz fixed clock (osc)
[     1.000000] syscon0 at simplebus1autoconfiguration error: :
couldn't get registers
[     1.000000] bcmcprman0 at simplebus1: BCM283x Clock Controller
[     1.000000] bcmaux0 at simplebus1
[     1.000000] fclock1 at simplebus2: 480000000 Hz fixed clock (otg)
[     1.000000] bcmicu1 at simplebus1: Multiprocessor
[     1.000000] gtmr0 at simplebus0: Generic Timer
[     1.000000] gtmr0: interrupting on local_intc irq 3
[     1.000000] armgtmr0 at gtmr0: Generic Timer (19200 kHz, virtual)
[     1.000000] timecounter: Timecounter "armgtmr0" frequency 19200000
Hz quality 500
[     1.000004] plcom0 at simplebus1: ARM PL011 UART
[     1.000004] plcom0: txfifo 16 bytes
[     1.000004] plcom0: interrupting on icu irq 57
[     1.000004] com0 at simplebus1: BCM AUX UART, 1-byte FIFO
[     1.000004] com0: console
[     1.000004] com0: interrupting on icu irq 29
[     1.000004] fregulator0 at simplebus0: cam1-reg
[     1.000004] fregulator1 at simplebus0: cam-dummy-reg
[     1.000004] fregulator2 at simplebus0: 3v3
[     1.000004] fregulator3 at simplebus0: 5v0
[     1.000004] usbnopphy0 at simplebus0: USB PHY
[     1.000004] /soc/thermal@7e212000 at simplebus1 not configured
[     1.000004] bcmgpio0 at simplebus1: GPIO controller 2835
[     1.000004] bcmgpio0: pins 0..31 interrupting on icu irq 49
[     1.000004] bcmgpio0: pins 32..54 interrupting on icu irq 50
[     1.000004] gpio0 at bcmgpio0: 54 pins
[     1.000004] bcmdmac0 at simplebus1: DMA0 DMA2 DMA4 DMA5 DMA6 DMA7
DMA8 DMA9 DMA10 DMA11
[     1.000004] /soc/power at simplebus1 not configured
[     1.000004] bcmmbox0 at simplebus1: VC mailbox
[     1.000004] bcmmbox0: interrupting on icu irq 65
[     1.000004] vcmbox0 at bcmmbox0
[     1.000004] vchiq0 at simplebus1: BCM2835 VCHIQ
[     1.000004] bcmpmwdog0 at simplebus1: Power management, Reset and
Watchdog controller
[     1.000004] bcmrng0 at simplebus1: RNG
[     1.000004] bcmsdhost0 at simplebus1: SD HOST controller
[     1.000004] bcmsdhost0: interrupting on icu irq 56
[     1.000004] sdhc0 at simplebus1: SDHC controller
[     1.000004] sdhc0: interrupting on icu irq 62
[     1.000004] gpioleds0 at simplebus0: led0
[     1.000004] dwctwo0 at simplebus1: USB controller
[     1.000004] dwctwo0: interrupting on icu irq 9
[     1.000004] /soc/fb at simplebus1 not configured
[     1.000004] armpmu0 at simplebus0: Performance Monitor Unit
[     1.000004] /soc/gpiomem at simplebus1 not configured
[     1.000004] entropy: ready
[     1.000004] timecounter: Timecounter "clockinterrupt" frequency 100
Hz quality 0
[     1.075015] sdmmc0 at bcmsdhost0
[     1.075015] sdhc0: SDHC 3.0, rev 153, caps <01610000/00000000>,
platform DMA, 200000 kHz, HS 3.3V, re-tuning mode 1, 1024 byte blocks
[     1.085016] sdmmc1 at sdhc0 slot 0
[     1.085016] dwctwo0: Core Release: 2.80a (snpsid=4f54280a)
[     1.085016] usb0 at dwctwo0: USB revision 2.0
[     1.105020] armpmu0: interrupting on local_intc irq 9
[     1.115023] uhub0 at usb0: NetBSD (0x0000) DWC2 root hub (0x0000),
class 9/0, rev 2.00/1.00, addr 1
[     1.115023] uhub0: 1 port with 1 removable, self powered
[     1.125024] IPsec: Initialized Security Association Processing.
[     1.205031] sdmmc0: direct I/O error 5, r=6 p=0xa5307f14 write
[     1.245037] sdmmc0: SD card status: 4-bit, C10, A1
[     1.245037] ld0 at sdmmc0:
<0x03:0x5344:SC16G:0x80:0x23749dc3:0x117>
[     1.255668] ld0: 15193 MB, 7717 cyl, 64 head, 63 sec, 512
bytes/sect x 31116288 sectors
[     1.265039] ld0: 4-bit width, High-Speed/SDR25, 50.000 MHz
[     1.335047] sdmmc1: 4-bit width, 50.000 MHz
[     1.345929] bwfm0 at sdmmc1 function 1
[     1.355055] (manufacturer 0x2d0, product 0xa9a6) at sdmmc1 function
2 not configured
[     1.745093] uhub1 at uhub0 port 1: vendor 1a40 (0x1a40) USB 2.0 Hub
(0x0101), class 9/0, rev 2.00/1.11, addr 2
[     1.755094] uhub1: single transaction translator
[     1.755094] uhub1: 4 ports with 4 removable, self powered
[     2.585177] uhub2 at uhub1 port 1: vendor 1a40 (0x1a40) USB 2.0 Hub
(0x0101), class 9/0, rev 2.00/1.11, addr 3
[     2.595178] uhub2: single transaction translator
[     2.595178] uhub2: 4 ports with 4 removable, self powered
[     3.525271] uhidev0 at uhub1 port 2 configuration 1 interface 0
[     3.525271] uhidev0: Logitech (0x046d) USB Receiver (0xc52f), rev
2.00/30.00, addr 4, iclass 3/1
[     3.605279] ums0 at uhidev0: 16 buttons, W and Z dirs
[     3.605279] wsmouse0 at ums0 mux 0
[     3.605279] uhidev1 at uhub1 port 2 configuration 1 interface 1
[     3.615279] uhidev1: Logitech (0x046d) USB Receiver (0xc52f), rev
2.00/30.00, addr 4, iclass 3/0
[     3.705288] uhidev1: 17 report ids
[     3.705288] uhid0 at uhidev1 reportid 3: input=4, output=0,
feature=0
[     3.705288] uhid1 at uhidev1 reportid 16: input=6, output=6,
feature=0
[     3.715290] uhid2 at uhidev1 reportid 17: input=19, output=19,
feature=0
[     4.225343] run0 at uhub1 port 4
[     4.225343] run0: Ralink (0x2001) 802.11 n WLAN (0x3c15), rev
2.00/1.01, addr 5
[     4.285350] run0: MAC/BBP RT5392 (rev 0x0223), RF RT5372 (MIMO
2T2R), address 9c:d6:43:6a:f0:76
[     4.285350] uhub0: autoconfiguration error: illegal enable change,
port 1
[     4.845422] uhidev2 at uhub2 port 3 configuration 1 interface 0
[     4.845422] uhidev2: vendor 04f3 (0x04f3) product 0103 (0x0103),
rev 2.00/1.07, addr 6, iclass 3/1
[     4.895428] ukbd0 at uhidev2
[     4.895428] wskbd0 at ukbd0 mux 1
[     4.895428] uhidev3 at uhub2 port 3 configuration 1 interface 1
[     4.906264] uhidev3: vendor 04f3 (0x04f3) product 0103 (0x0103),
rev 2.00/1.07, addr 6, iclass 3/0
[     4.966269] uhidev3: 2 report ids
[     4.966269] uhid3 at uhidev3 reportid 1: input=2, output=0,
feature=0
[     4.966269] uhid4 at uhidev3 reportid 2: input=1, output=0,
feature=0
[     4.978354] swwdog0: software watchdog initialized
[     4.996275] WARNING: 2 errors while detecting hardware; check
system log.
[     4.996275] boot device: ld0
[     5.006274] root on ld0a dumps on ld0b
[     5.016276] root file system type: ffs
[     5.016276] kern.module.path=/stand/evbarm/10.99.3/modules
[     5.026276] WARNING: no TOD clock present
[     5.026276] WARNING: using filesystem time
[     5.026276] vchiq0: interrupting on icu irq 66
[     5.035793] WARNING: CHECK AND RESET THE DATE!
[     5.040292] vchiq: vchiq_init_state: slot_zero = 0xa5770000,
is_master = 0
[     5.040292] vchiq: local ver 8 (min 3), remote ver 8.
[     5.040292] vcaudio0 at vchiq0: auds
[     5.047909] bwfm0: Firmware file default:    brcmfmac43430-sdio.bin
[     5.047909] bwfm0: Firmware file model-spec: brcmfmac43430-
sdio.raspberrypi,model-zero-2-w.bin
[     5.047909] audio0 at vcaudio0: playback
[     5.047909] audio0: slinear_le:16 -> slinear_le:16 2ch 48000Hz, blk
7680 bytes (40ms) for playback
[     5.065806] spkr0 at audio0: PC Speaker (synthesized)
[     5.065806] wsbell at spkr0 not configured
[     5.085806] bwfm0: Found Firmware file: brcmfmac43430-sdio.bin
[     5.105807] bwfm0: NVRAM file default:    brcmfmac43430-sdio.txt
[     5.105807] bwfm0: NVRAM file model-spec: brcmfmac43430-
sdio.raspberrypi,model-zero-2-w.txt
[     5.105807] bwfm0: Found NVRAM file: brcmfmac43430-
sdio.raspberrypi,model-zero-2-w.txt
[     5.105807] bwfm0: CLM file default:    brcmfmac43430-sdio.clm_blob
[     5.105807] bwfm0: CLM file model-spec: brcmfmac43430-
sdio.raspberrypi,model-zero-2-w.clm_blob
[     5.105807] bwfm0: Found CLM file: brcmfmac43430-
sdio.raspberrypi,model-zero-2-w.clm_blob
[    10.616568] bwfm0: HT avail timeout
[    10.616568] bwfm0: autoconfiguration error: could not access clock
armv7# 


Notes:

(1) The linux dtb does not detect the i2c and spi interfaces :-(

(2) The version of the wifi chip is not clear - I think there may be
subtle differences between the rpi 3b, rpi zero w and rpi zero 2 w.
Linux seems to use brcmfmac43430 as the firmware blob and the dtb has
hints about this - these do not exist in the NetBSD variant of the rpi
3b dtb.

(3) Various developers have pointed out you shouldn't mix dtb's from
different releases or other operating systems, but in the absence of
any good written documentation the dtb implementation it pays to play
around :-)

Hope this helps,
Dave



Home | Main Index | Thread Index | Old Index