Skip to content

Commit 8c3501f

Browse files
krish2718nordicjm
authored andcommitted
wifi: ext_flash: Add a new partition for storing nRF70 FW patches
Add a dedicated Wi-Fi partition for storing nRF70 firmware patches on external flash. Signed-off-by: Chaitanya Tata <[email protected]>
1 parent a211929 commit 8c3501f

File tree

8 files changed

+41
-36
lines changed

8 files changed

+41
-36
lines changed

doc/nrf/app_dev/device_guides/nrf70/fw_patches_ext_flash.rst

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ In this case the upload of the firmware patch from the external memory to the nR
8080
1. The firmware patch is loaded from the external memory onto internal RAM.
8181
#. The firmware patch is uploaded to the nRF70 device.
8282

83-
This feature can be enabled using DTS or the :ref:`app_build_snippets` feature, or by using :ref:`partition_manager`.
83+
You can enable this feature using the :ref:`app_build_snippets` feature.
84+
85+
.. note::
86+
87+
Storing the nRF70 firmware patches in external RAM memory requires the partition manager to be enabled.
8488

8589
Configuration
8690
-------------
@@ -91,24 +95,7 @@ The following configuration options are available:
9195
* :kconfig:option:`CONFIG_NRF_WIFI_FW_FLASH_CHUNK_SIZE` - Defines the size of the chunks used to read the firmware patches from the external non-XIP memory.
9296
The default value is 8192 bytes.
9397

94-
The external memory partition name must be defined in the devicetree or in the partition manager configuration file.
95-
96-
* ``nrf70_fw_partition`` - Defines the name of the external memory partition that stores the firmware patches.
97-
This must be defined in the devicetree, for example:
98-
99-
.. code-block:: dts
100-
101-
&flash0 {
102-
partitions {
103-
compatible = "fixed-partitions";
104-
#address-cells = <1>;
105-
#size-cells = <1>;
106-
nrf70_fw_partition: partition@0 {
107-
label = "nrf70_fw_partition";
108-
reg = <0x00000000 DT_SIZE_K(128)>;
109-
};
110-
};
111-
};
98+
You must define the external memory partition name in the Partition Manager configuration file as follows:
11299

113100
* ``nrf70_wifi_fw`` - Defines the name of the external memory partition that stores the firmware patches.
114101
This must be defined in the partition manager configuration file, for example:
@@ -126,8 +113,7 @@ Building
126113

127114
See :ref:`nrf7002dk_nrf5340` for general instructions on building.
128115

129-
Additionally, you can build the sample either with the ``nrf70-fw-patch-ext-flash`` snippet or with Partition Manager (``SB_CONFIG_PARTITION_MANAGER``).
130-
When using the ``nrf70-fw-patch-ext-flash`` snippet, set ``SB_CONFIG_WIFI_PATCHES_EXT_FLASH_STORE``, and disable ``SB_CONFIG_PARTITION_MANAGER``.
116+
Additionally, you can build the sample using the ``nrf70-fw-patch-ext-flash`` snippet and set the ``SB_CONFIG_WIFI_PATCHES_EXT_FLASH_STORE=y`` Kconfig option.
131117

132118
For example, to build the :ref:`wifi_shell_sample` sample for the nRF5340 DK with the ``nrf70-fw-patch-ext-flash`` snippet enabled, run the following commands.
133119

@@ -136,14 +122,14 @@ With west
136122

137123
.. code-block:: console
138124
139-
west build -p -b nrf5340dk/nrf5340/cpuapp samples/wifi/shell -- -Dnrf_wifi_shell_SHIELD=nrf7002ek -Dnrf_wifi_shell_SNIPPET="nrf70-fw-patch-ext-flash" -DSB_CONFIG_WIFI_PATCHES_EXT_FLASH_STORE=y -DSB_CONFIG_PARTITION_MANAGER=n
125+
west build -p -b nrf5340dk/nrf5340/cpuapp samples/wifi/shell -- -Dnrf_wifi_shell_SHIELD=nrf7002ek -Dnrf_wifi_shell_SNIPPET="nrf70-fw-patch-ext-flash" -DSB_CONFIG_WIFI_PATCHES_EXT_FLASH_STORE=y
140126
141127
With CMake
142128
^^^^^^^^^^
143129

144130
.. code-block:: console
145131
146-
cmake -GNinja -Bbuild -DBOARD=nrf5340dk/nrf5340/cpuapp -Dnrf_wifi_shell_SHIELD=nrf7002ek -Dnrf_wifi_shell_SNIPPET="nrf70-fw-patch-ext-flash" -DSB_CONFIG_WIFI_PATCHES_EXT_FLASH_STORE=y -DSB_CONFIG_PARTITION_MANAGER=n samples/wifi/shell
132+
cmake -GNinja -Bbuild -DBOARD=nrf5340dk/nrf5340/cpuapp -Dnrf_wifi_shell_SHIELD=nrf7002ek -Dnrf_wifi_shell_SNIPPET="nrf70-fw-patch-ext-flash" -DSB_CONFIG_WIFI_PATCHES_EXT_FLASH_STORE=y samples/wifi/shell
147133
ninja -C build
148134
149135
For example, to build the :ref:`wifi_shell_sample` sample for the nRF5340 DK with partition manager enabled, run the following commands:

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ Developing with nRF91 Series
6161
Developing with nRF70 Series
6262
============================
6363

64-
|no_changes_yet_note|
64+
* :ref:`ug_nrf70_developing_fw_patch_ext_flash`
65+
66+
* Removed support for storing the nRF70 firmware patches in external flash without the :ref:`partition_manager`.
67+
6568

6669
Working with nRF54H Series
6770
==========================
@@ -452,6 +455,10 @@ Wi-Fi samples
452455

453456
* The :ref:`wifi_radio_test` sample is now moved to :zephyr_file:`samples/wifi/radio_test/multi_domain`.
454457

458+
* :ref:`wifi_shell_sample` sample:
459+
460+
* Modified support for storing the nRF70 firmware patches in external flash using the :ref:`partition_manager`.
461+
455462
Other samples
456463
-------------
457464

samples/wifi/shell/sample.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@ tests:
280280
extra_args:
281281
- shell_SHIELD=nrf7002ek
282282
- shell_SNIPPET=nrf70-fw-patch-ext-flash
283-
- SB_CONFIG_PARTITION_MANAGER=n
284283
- SB_CONFIG_WIFI_PATCHES_EXT_FLASH_STORE=y
285284
integration_platforms:
286285
- nrf5340dk/nrf5340/cpuapp

snippets/nrf70-fw-patch-ext-flash/fw-patch-ext-flash.overlay

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,8 @@
33
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
44
*/
55

6-
&qspi {
7-
mx25r64: mx25r6435f@0 {
8-
partitions {
9-
compatible = "fixed-partitions";
10-
#address-cells = <1>;
11-
#size-cells = <1>;
12-
nrf70_fw_partition: partition@0 {
13-
label = "nrf70_fw_partition";
14-
reg = <0x0 DT_SIZE_K(128)>;
15-
};
16-
};
6+
/{
7+
chosen {
8+
nordic,pm-ext-flash = &mx25r64;
179
};
1810
};

subsys/partition_manager/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ if (CONFIG_SOC_NRF54L15_CPUFLPR)
131131
ncs_add_partition_manager_config(pm.yml.vpr_launcher)
132132
endif()
133133

134+
if(CONFIG_WIFI_NRF70 AND CONFIG_NRF_WIFI_PATCHES_EXT_FLASH_STORE)
135+
ncs_add_partition_manager_config(pm.yml.wifi)
136+
endif()
137+
134138
# We are using partition manager if we are a child image or if we are
135139
# the root image and the 'partition_manager' target exists.
136140
zephyr_compile_definitions(

subsys/partition_manager/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,15 @@ config PM_PARTITION_SIZE_VPR_LAUNCHER
156156
This to place the flpr app's code at the address found in the devicetree.
157157
endif
158158

159+
if WIFI_NRF70 && NRF_WIFI_PATCHES_EXT_FLASH_STORE
160+
161+
partition=NRF70_WIFI_FW
162+
partition-size=0x20000
163+
rsource "Kconfig.template.partition_config"
164+
rsource "Kconfig.template.partition_region"
165+
166+
endif
167+
159168
endmenu # Zephyr subsystem configurations
160169
menu "NCS subsystem configurations"
161170

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include <zephyr/autoconf.h>
2+
3+
nrf70_wifi_fw:
4+
placement:
5+
after: [settings_storage]
6+
region: external_flash
7+
size: 131072

sysbuild/Kconfig.wifi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ config WIFI_PATCHES_EXT_FLASH_STORE
6060
# nRF7002 supports SPI based external memory access but missing tools support
6161
# TODO: Enable when tools support is available (NRFJPROG-157)
6262
depends on !BOARD_NRF7002DK_NRF5340_CPUAPP && !BOARD_NRF7002DK_NRF5340_CPUAPP_NS
63+
depends on PARTITION_MANAGER
6364

6465
endchoice
6566

0 commit comments

Comments
 (0)