Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cmake/sysbuild/nrf700x.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ function(setup_nrf700x_xip_data)
sysbuild_dt_nodelabel(qspi_nodelabel IMAGE ${DEFAULT_IMAGE} NODELABEL "qspi")
sysbuild_dt_reg_addr(qspi_xip_address IMAGE ${DEFAULT_IMAGE} PATH "${qspi_nodelabel}" NAME "qspi_mm")

set(OS_AGNOSTIC_BASE ${ZEPHYR_NRFXLIB_MODULE_DIR}/nrf_wifi)
set(NRF70_FW_BINS ${ZEPHYR_HAL_NORDIC_MODULE_DIR}/zephyr/blobs/wifi_fw_bins/)

if(SB_CONFIG_WIFI_NRF70_SYSTEM_MODE)
set(NRF70_PATCH ${OS_AGNOSTIC_BASE}/fw_bins/default/nrf70.bin)
set(NRF70_PATCH ${NRF70_FW_BINS}/default/nrf70.bin)
elseif(SB_CONFIG_WIFI_NRF70_RADIO_TEST)
set(NRF70_PATCH ${OS_AGNOSTIC_BASE}/fw_bins/radio_test/nrf70.bin)
set(NRF70_PATCH ${NRF70_FW_BINS}/radio_test/nrf70.bin)
elseif(SB_CONFIG_WIFI_NRF70_SCAN_ONLY)
set(NRF70_PATCH ${OS_AGNOSTIC_BASE}/fw_bins/scan_only/nrf70.bin)
set(NRF70_PATCH ${NRF70_FW_BINS}/scan_only/nrf70.bin)
elseif(SB_CONFIG_WIFI_NRF70_SYSTEM_WITH_RAW_MODES)
set(NRF70_PATCH ${OS_AGNOSTIC_BASE}/fw_bins/system_with_raw/nrf70.bin)
set(NRF70_PATCH ${NRF70_FW_BINS}/system_with_raw/nrf70.bin)
else()
# Error
message(FATAL_ERROR "Unsupported nRF70 patch configuration")
Expand Down
9 changes: 9 additions & 0 deletions samples/matter/lock/boards/nrf7002dk_nrf5340_cpuapp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Enable LTO to decrease the flash usage.
CONFIG_LTO=y
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
17 changes: 0 additions & 17 deletions scripts/quarantine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,6 @@
- net.lib.wifi_credentials_backend_psa
comment: "Fix not known at time of upmerge, temporarily excluded to be fixed after upmerge"

- scenarios:
- sample.matter.lock.smp_dfu
- sample.matter.light_bulb.aws
platforms:
- nrf7002dk/nrf5340/cpuapp
comment: "Flash or RAM overflow, temporarily excluded"

- scenarios:
- sample.matter.lock.thread_wifi_switched.lto.smp_dfu
platforms:
- nrf5340dk/nrf5340/cpuapp
comment: "Flash or RAM overflow, temporarily excluded"

- scenarios:
- applications.matter_bridge.lto.nrf5340.wifi
comment: "nRF7002EK is not support in the upstream nRF70 driver yet"

- scenarios:
- applications.zigbee_weather_station
- applications.zigbee_weather_station.debug
Expand Down
1 change: 1 addition & 0 deletions subsys/net/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ add_subdirectory_ifdef(CONFIG_WIFI_READY_LIB wifi_ready)
add_subdirectory_ifdef(CONFIG_MQTT_HELPER mqtt_helper)
add_subdirectory_ifdef(CONFIG_NRF_PROVISIONING nrf_provisioning)
add_subdirectory_ifdef(CONFIG_NRF_MCUMGR_SMP_CLIENT mcumgr_smp_client)
add_subdirectory_ifdef(CONFIG_WIFI_NRF70 nrf70_fw_ext)
1 change: 1 addition & 0 deletions subsys/net/lib/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@ rsource "wifi_ready/Kconfig"
rsource "mqtt_helper/Kconfig"
rsource "nrf_provisioning/Kconfig"
rsource "mcumgr_smp_client/Kconfig"
rsource "nrf70_fw_ext/Kconfig"

endmenu
13 changes: 13 additions & 0 deletions subsys/net/lib/nrf70_fw_ext/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#
# Copyright (c) 2023 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

if(NOT CONFIG_NRF_WIFI_PATCHES_BUILTIN)
zephyr_library_sources(ext_fw_load.c)
if(CONFIG_NRF_WIFI_PATCHES_EXT_FLASH_XIP)
# Run patches from the external flash (XIP). No need to copy.
zephyr_code_relocate(FILES ext_fw_load.c LOCATION EXTFLASH_RODATA NOCOPY)
endif()
endif()
97 changes: 97 additions & 0 deletions subsys/net/lib/nrf70_fw_ext/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
#
# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

if WIFI_NRF70 && !NRF_WIFI_BUILD_ONLY_MODE

choice NRF_WIFI_PATCHES_EXT_FLASH_SUPPORT
bool "Store nRF700x FW patches in external flash"
help
Select this option to store nRF700x FW patches in external flash.
This option helps to reduce the code memory size of the application, but
requires external memory to be available for storing the FW patches.

config NRF_WIFI_PATCHES_EXT_FLASH_DISABLED
bool "Store nRF700x FW patches in RAM"
select NRF_WIFI_PATCHES_BUILTIN

config NRF_WIFI_PATCHES_EXT_FLASH_XIP
bool "Relocate nRF700x FW patches to external memory and execute from there"
# nRF7002 supports SPI based external flash access with no XIP
depends on !BOARD_NRF7002DK_NRF5340_CPUAPP && !BOARD_NRF7002DK_NRF5340_CPUAPP_NS
# Disable until Matter DFU changes are ready
# default y if BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF52840DK_NRF52840
# For accessing external flash
select FLASH
# For relocation code to external flash
select XIP
select NORDIC_QSPI_NOR
select BUILD_NO_GAP_FILL
select CODE_DATA_RELOCATION
select HAVE_CUSTOM_LINKER_SCRIPT

config NRF_WIFI_PATCHES_EXT_FLASH_STORE
bool "Store nRF700x FW patches in external memory but execute from RAM"
# nRF7002 supports SPI based external memory access but missing tools support
# TODO: Enable when tools support is available (NRFJPROG-157)
depends on !BOARD_NRF7002DK_NRF5340_CPUAPP && !BOARD_NRF7002DK_NRF5340_CPUAPP_NS
select FLASH
select FLASH_MAP
endchoice

if NRF_WIFI_PATCHES_EXT_FLASH_STORE
config NRF_WIFI_FW_FLASH_CHUNK_SIZE
int "Chunk size for nRF70 FW patches to be read from external flash"
default 8192
help
Chunk size for nRF70 FW patches to be read from external flash.
This option impacts the loading time of the nRF70 FW patches and
RAM usage (heap) of the application.

config NRF_WIFI_FW_PATCH_INTEGRITY_CHECK
bool "Enable integrity check of nRF70 FW patches"
select FLASH_AREA_CHECK_INTEGRITY
# TODO: Fix MbedTLS dependency issues to enable this option
help
Select this option to enable integrity check of nRF70 FW patches using
SHA-256 verification algorithm.This option impacts the loading time of the
nRF70 FW patches but protects against corrupted FW patches.

config NRF_WIFI_FW_PATCH_DFU
bool "Direct Firmware Update of nRF70 FW patch"
depends on PARTITION_MANAGER_ENABLED
depends on BOOTLOADER_MCUBOOT
depends on !XIP_SPLIT_IMAGE
help
Enabling this option adds support for Device Firmware Update (DFU)
for the nRF70 Series Firmware Patch.

This feature requires the addition of an MCUBoot partition pair:
a primary and a secondary partition. These partitions are used to
store the new firmware patch. The specific partition numbers to be used
depend on the number of partitions already in use.

The "nrf70_wifi_fw" partition must be added to the newly created
MCUBoot primary partition. Once this Kconfig option is enabled,
the nRF70.hex file will be signed by MCUBoot. The signed image
will then be merged with the application image and flashed onto
the target board.

Ensure that the required MCUBoot partitions are properly configured
before enabling this option. Refer to the documentation for detailed
instructions on partition configuration and the DFU process.

# TC is the default but Wi-Fi uses MbedTLS, so, to avoid loading another library.
if NRF_WIFI_FW_PATCH_INTEGRITY_CHECK
choice FLASH_AREA_CHECK_INTEGRITY_BACKEND
default FLASH_AREA_CHECK_INTEGRITY_MBEDTLS
endchoice
endif
endif

config CUSTOM_LINKER_SCRIPT
string "Custom linker script for nRF70 FW patches in external flash"
default "${ZEPHYR_BASE}/../nrf/subsys/net/lib/nrf70_fw_ext/rpu_fw_patches.ld"
endif
Loading
Loading