Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wifi: Migrate to nRF70 upstream #16753

Closed
wants to merge 25 commits into from

Conversation

krish2718
Copy link
Contributor

@krish2718 krish2718 commented Aug 5, 2024

The upstream PR for nRF70 support (Boards, Drivers and hostap) will soon be is merged and this PR removes nRF70 support from NCS and switches to use from Zephyr upstream.

For now only nRF7002DK and EK (including variants) are supported, other shields (54 series, EB, Thingy etc) will be added later. Also, Firmware patches in external flash isn't supported, this will also be added later.

The invasive changes which are treewide are minor ones as below:

  1. rename configurations from NRF700X -> NRF70
  2. rename configurations from WPA_SUPP -> WIFI_NM_WPA_SUPPLICANT
  3. use per-module min HEAP https://docs.zephyrproject.org/latest/kernel/memory_management/heap.html#defining-the-heap-memory-pool this can introduce a CMake warning, so, to fix that had to modify samples to explicitly enable CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y

@github-actions github-actions bot added doc-required PR must not be merged without tech writer approval. manifest changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. labels Aug 5, 2024
@krish2718 krish2718 added this to the 2.8.0 milestone Aug 5, 2024
@krish2718 krish2718 changed the title Use nrf70 upstream wifi: Migrate to nRF70 upstream Aug 5, 2024
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Aug 5, 2024

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
hostap nrfconnect/sdk-hostap@3b64b3b (main) N/A N/A
matter nrfconnect/sdk-connectedhomeip@b6d6e9a (master) nrfconnect/sdk-connectedhomeip#469 nrfconnect/sdk-connectedhomeip#469/files
nrfxlib nrfconnect/sdk-nrfxlib@8f5ca6f nrfconnect/sdk-nrfxlib#1424 nrfconnect/sdk-nrfxlib#1424/files
trusted-firmware-m nrfconnect/sdk-trusted-firmware-m@44ba9ac (main) nrfconnect/sdk-trusted-firmware-m#167 nrfconnect/sdk-trusted-firmware-m#167/files
zephyr nrfconnect/sdk-zephyr@8bd088c nrfconnect/sdk-zephyr#1939 nrfconnect/sdk-zephyr#1939/files

Note: This message is automatically posted and updated by the Manifest GitHub Action.

nRF70 now uses upstream Zephyr WPA supplicant.

Signed-off-by: Chaitanya Tata <[email protected]>
Migrate to using Zephyr upstream.

Signed-off-by: Chaitanya Tata <[email protected]>
This board is upstreamed to Zephyr.

Signed-off-by: Chaitanya Tata <[email protected]>
These changes are necessary for migration of nRF70 to upstream.

Signed-off-by: Chaitanya Tata <[email protected]>
nRF70 driver is the primary user for kernel heap and already sets a
higher value which is typical, but for some configurations e.g.,
scan-only we need to set it to lower value to optimize memory, so,
enable the option to ignore minimum mandated value from driver and
instead use the value from the sample.

Signed-off-by: Chaitanya Tata <[email protected]>
nRF70 upstream driver now needs more heap, not sure about the cause, but
without this OOM messages during boot are seen.

Signed-off-by: Chaitanya Tata <[email protected]>
Document changes that affect customer samples or applications.

Signed-off-by: Chaitanya Tata <[email protected]>
Update Drivers, Wi-Fi protocols and documentation with notes about
upstream migration.

Signed-off-by: Chaitanya Tata <[email protected]>
With latest upstream, scan only mode now only works with nRF7000.

Signed-off-by: Chaitanya Tata <[email protected]>
These are still unsupported in nRF70 upstream.

Signed-off-by: Chaitanya Tata <[email protected]>
Pull fix an issue with 54L and nrfx 3.6.0.i

Signed-off-by: Chaitanya Tata <[email protected]>
Remove the driver header dependency and inline the structures for now,
this needs to be properly fixed in the future where nRF70 driver should
have public headers.

Signed-off-by: Chaitanya Tata <[email protected]>
With the upstream nRF70 driver, the co-ex is not auto-enabled based on
the DTS, this was implemented improperly, now user has to explicitly
choose to enable co-existence.

Signed-off-by: Chaitanya Tata <[email protected]>
Almost all matter samples rely on PM which needs EXT_FLASH support for
nRF70 which isn't supported yet, so, Quarnatine them for now.

Signed-off-by: Chaitanya Tata <[email protected]>
TF-M still has few build issues with nrfx 3.6.0, so, temporarily
disable.

Signed-off-by: Chaitanya Tata <[email protected]>
Thingy is not supported yet for nRF70 companion chips.

Signed-off-by: Chaitanya Tata <[email protected]>
Though these platforms are excluded for Wi-Fi tags, twister still fails
as this is still part of integration platforms, remove it to fix the
twister.

Signed-off-by: Chaitanya Tata <[email protected]>
In latest nrfxlib this tag is removed, so, remove the reference to fix
the doc build.

Signed-off-by: Chaitanya Tata <[email protected]>
As of now the raw mode is couple with system mode which is unsupported
for nRF7000, so, remove them.

Signed-off-by: Chaitanya Tata <[email protected]>
Shutdown sample assumes default nRF70 mode is scan and doesn't support
any other mode. With the migration to upstream scan only is limited to
nRF7000 shield, so, remove other combinations.

Also, add nRF7000 with 5340 as this was the main usecase for testing
this sample.

Signed-off-by: Chaitanya Tata <[email protected]>
These overflows are only happening in the CI, locally the same twister
command works fine, quarantine them for now, and investigate later.

Signed-off-by: Chaitanya Tata <[email protected]>
@shanthanordic
Copy link

This should not be merged by commeting test case without @endre-nordic approval

@krish2718
Copy link
Contributor Author

This should not be merged by commeting test case without @endre-nordic approval

Sure, after discussing with @bjarki-andreasen it was concluded to cherry-pick fixes from this PR to the upmerge PR and we can review it there.

@glarsennordic glarsennordic mentioned this pull request Sep 16, 2024
@@ -94,7 +94,7 @@ tests:
integration_platforms:
- nrf5340dk/nrf5340/cpuapp/ns
platform_allow: nrf5340dk/nrf5340/cpuapp/ns
extra_args: nrf_cloud_multi_service_SHIELD=nrf7002ek
extra_args: nrf_cloud_multi_service_SHIELD=nrf7002ek_nrf7000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a connectivity build, not a scan-only build, so I think that means we should stick with nrf7002ek, right?

@@ -84,7 +84,7 @@ tests:
- nrf9151dk/nrf9151/ns
- nrf9160dk/nrf9160/ns
- nrf9161dk/nrf9161/ns
extra_args: nrf_cloud_multi_service_SHIELD=nrf7002ek
extra_args: nrf_cloud_multi_service_SHIELD=nrf7002ek_nrf7000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some references to this shield in `` that I think also need to be updated. They are all in the Building with nRF7002 Wi-Fi scanning support section.

Specifically, lines 797, 804. These should, if I am not mistaken, switch to using the nrf7002ek shield.

But beware, any mentions of the shield outside this section are for connectivity-enabled builds, so I don't think those need to change.

@glarsennordic
Copy link
Contributor

Any updates regarding this / regarding the upmerge?

@krish2718 krish2718 closed this Oct 5, 2024
@krish2718
Copy link
Contributor Author

All changes in this PR are part of upmerge, any missing changes will be take care for 2.8.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants