mbox series

[RFC,0/2] Nordic nRF70 series

Message ID 20250324211045.3508952-1-artur@conclusive.pl
Headers show
Series Nordic nRF70 series | expand

Message

Artur Rojek March 24, 2025, 9:10 p.m. UTC
Hi all,

this patchset introduces support for Nordic Semiconductor nRF70 series
of wireless companion IC. 

Nordic nRF70 series are FullMAC devices, which communicate over SPI or
QSPI interface. This driver provides support for STA, AP and monitor
modes, in combination with up to 2 VIFs. Throughput of up to ~16 Mbit/s
has been observed while using QSPI.

Patch [1/2] adds the nRF70 driver.

Patch [2/2] provides related Devicetree bindings documentation.

As this is our first Linux WLAN driver, I am tagging this as RFC and
looking for any sort of feedback, before I turn it into a regular
submission.

In the meantime, here are some pending questions that I have:

1) Nordic gave us permission to upstream the firmware blob [1] required
   to use this driver. As that needs to go through separate
   linux-firmware repository and is subject to different licensing,
   should I try to upstream it in parallel with this series, or does it
   need to wait until the kernel driver gets in? 

2) In AP mode, for each connected peer I maintain a pending queue for TX
   skbs that can't be transmitted while the peer is in power save mode.
   I then use a wiphy_work (nrf70_pending_worker) to move the collected
   skbs into a single hw queue once the peer is able to receive again.
   This means there can be multiple workers putting skbs onto the hw
   queue at any given time. As this scheme relies on the wiphy_work
   workqueue, can I assume that multiple workers will be able to run in
   parallel, even on a system with a single CPU? If not, what would be
   a better solution to the above problem?

3) nRF70 hardware communicates using byte packed, little-endian
   payloads (documented in nrf70_cmds.h). As these can get very large
   and complicated, I decided against writing some sort of endianess
   conversion scheme, and simply dropped big endian support by this
   driver. Is that acceptable?

4) Please put particular attention to the wiphy configuration. I am not
   100% confident I got all the flags/features/band caps right.

PS. checkpatch.pl spits out what I believe to be a false positive: 
> ERROR: Macros with complex values should be enclosed in parentheses
> #5914: FILE: drivers/net/wireless/nordic/nrf70_rf_params.h:85:
> +#define NRF70_PHY_PARAMS \
The above define is used for generating the nrf7002_qfn_rf_params array,
and as such cannot be enclosed in parentheses. 

Cheers,
Artur

[1] https://github.com/nrfconnect/sdk-nrfxlib/raw/refs/heads/main/nrf_wifi/bin/ncs/default/nrf70.bin

Artur Rojek (2):
  net: wireless: Add Nordic nRF70 series Wi-Fi driver
  dt-bindings: wireless: Document Nordic nRF70 bindings

 .../bindings/net/wireless/nordic,nrf70.yaml   |   56 +
 drivers/net/wireless/Kconfig                  |    1 +
 drivers/net/wireless/Makefile                 |    1 +
 drivers/net/wireless/nordic/Kconfig           |   26 +
 drivers/net/wireless/nordic/Makefile          |    3 +
 drivers/net/wireless/nordic/nrf70.c           | 4671 +++++++++++++++++
 drivers/net/wireless/nordic/nrf70_cmds.h      | 1051 ++++
 drivers/net/wireless/nordic/nrf70_rf_params.h |   98 +
 8 files changed, 5907 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/wireless/nordic,nrf70.yaml
 create mode 100644 drivers/net/wireless/nordic/Kconfig
 create mode 100644 drivers/net/wireless/nordic/Makefile
 create mode 100644 drivers/net/wireless/nordic/nrf70.c
 create mode 100644 drivers/net/wireless/nordic/nrf70_cmds.h
 create mode 100644 drivers/net/wireless/nordic/nrf70_rf_params.h

Comments

Rob Herring March 24, 2025, 11:05 p.m. UTC | #1
On Mon, 24 Mar 2025 22:10:45 +0100, Artur Rojek wrote:
> Add a documentation file to describe the Device Tree bindings for the
> Nordic Semiconductor nRF70 series wireless companion IC.
> 
> Signed-off-by: Artur Rojek <artur@conclusive.pl>
> ---
>  .../bindings/net/wireless/nordic,nrf70.yaml   | 56 +++++++++++++++++++
>  1 file changed, 56 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/net/wireless/nordic,nrf70.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/wireless/nordic,nrf70.yaml: properties:compatible: 'anyOf' conditional failed, one must be fixed:
	'req' is not one of ['$ref', 'additionalItems', 'additionalProperties', 'allOf', 'anyOf', 'const', 'contains', 'default', 'dependencies', 'dependentRequired', 'dependentSchemas', 'deprecated', 'description', 'else', 'enum', 'exclusiveMaximum', 'exclusiveMinimum', 'items', 'if', 'minItems', 'minimum', 'maxItems', 'maximum', 'multipleOf', 'not', 'oneOf', 'pattern', 'patternProperties', 'properties', 'required', 'then', 'typeSize', 'unevaluatedProperties', 'uniqueItems']
	'type' was expected
	from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/wireless/nordic,nrf70.yaml: 'oneOf' conditional failed, one must be fixed:
	'unevaluatedProperties' is a required property
	'additionalProperties' is a required property
	hint: Either unevaluatedProperties or additionalProperties must be present
	from schema $id: http://devicetree.org/meta-schemas/core.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/wireless/nordic,nrf70.yaml: properties:compatible: Additional properties are not allowed ('req' was unexpected)
	from schema $id: http://devicetree.org/meta-schemas/string-array.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250324211045.3508952-3-artur@conclusive.pl

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.