Open chrysn opened 1 year ago
Lets connect this to #19267 Nordic family support
@chrysn Would you mind to move this (copy the info) into https://github.com/RIOT-OS/RIOT/issues/19267 ?
Scratch that, https://github.com/RIOT-OS/RIOT/issues/19267 is more a tracking issue, while this is an in-detail feature request. I no longer think it makes sense to combine them.
Description
It'd be cool to have support for the nRF7002 WiFi chips. I have no immediate plans to implement this, but use the issue to gather data.
nRF7002 is a standalone WiFi baseband module advertised to have low power consumption (supporting the new WiFi6 modes) and good coexistence with other radio technologies.
Overview and references
Careful: Referenced source is nonfree; licensed as described at https://github.com/nrfconnect/sdk-nrf/blob/main/LICENSE -- it's probably good to look at, I'd prefer any outcome that just uses data learned from it on the main MCU
There is currently no documentation on the chip itself (inquiry ongoing). The currently vendor recommended way is to use it through their NRF SDK
The NRF SDK contains a driver for the chip that is split into an OS independent part ("OSAL" ... "OS abstraction layer"?) and a Zephyr specific part. Both are under their proprietary source-available license.
The OSAL is probably implementable for RIOT -- it asks various things to be provided in a driver-style struct, eg. malloc, spinlock stuff, linked list iteration, sleep, but also some thread-ish stuff (used sparingly, like to create a receive thread when a device is added).
I'd say it's a bit better than the softdevice in that we can do things manually where it makes unreasonable demands, but altogether at a similar level.
If one wants to implement everything on their own, there are no docs, but at least the visible source code contains kind of usable names. For example,
drivers/wifi/nrf700x/osal/hw_if/hal/inc/fw/rpu_if.h
contains register names and details, and how they're used is just a grep away.It appears that while the nRF7002 has its own firmware in ROM, there are "patches" that can be applied, which are shipped with the SDK (in
drivers/wifi/nrf700x/osal/fw_if/umac_if/inc/fw/rpu_fw_patches.h
). Given it's about 20kiB of blobs (in two versions for radio tests and regular operation, 30kiB in total), it looks like they're just overwriting the whole firmware. For that part, there's no source, nor any hints at internal documentation. Given that this is not running on our MCU and has no DMA access, I'm not too militant about FLOSS principles there (it'd be nice, but in the end it's a largely untrusted piece of hardware between our MCU and the inherently untrusted radio space).Recommendation
If there is urgent need to have this chip, it's probably possible to add support in here, but it'll need some detective work.
If you're interested in the device, I recommend politely pestering your local Nordic representative about getting documentation for the chip (or more precisely, for the interface its firmware provides).