diff --git a/applications/matter_bridge/Kconfig.sysbuild b/applications/matter_bridge/Kconfig.sysbuild index e7c6509b3815..400fa46f529d 100644 --- a/applications/matter_bridge/Kconfig.sysbuild +++ b/applications/matter_bridge/Kconfig.sysbuild @@ -64,10 +64,6 @@ config DFU_MULTI_IMAGE_PACKAGE_NET endif # SOC_SERIES_NRF53X endif # BOOTLOADER_MCUBOOT -## Disable DFU for nRF54h20 -config MATTER_OTA - default n if SOC_SERIES_NRF54HX - #### Enable generating factory data config MATTER_FACTORY_DATA_GENERATE default y diff --git a/applications/matter_bridge/boards/nrf54h20dk_nrf54h20_cpuapp.conf b/applications/matter_bridge/boards/nrf54h20dk_nrf54h20_cpuapp.conf index a081a53c028c..57588c265ac8 100644 --- a/applications/matter_bridge/boards/nrf54h20dk_nrf54h20_cpuapp.conf +++ b/applications/matter_bridge/boards/nrf54h20dk_nrf54h20_cpuapp.conf @@ -4,9 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -# TODO: Workaround to be removed once DFU and external flash will be supported on nRF54H20. -CONFIG_CHIP_QSPI_NOR=n - CONFIG_MPU_STACK_GUARD=n # Enable PSA crypto from SSF client diff --git a/applications/matter_bridge/boards/nrf54h20dk_nrf54h20_cpuapp.overlay b/applications/matter_bridge/boards/nrf54h20dk_nrf54h20_cpuapp.overlay index 76f588fdbe96..06b1d9f1d972 100644 --- a/applications/matter_bridge/boards/nrf54h20dk_nrf54h20_cpuapp.overlay +++ b/applications/matter_bridge/boards/nrf54h20dk_nrf54h20_cpuapp.overlay @@ -8,48 +8,3 @@ #include <../samples/matter/common/dts/nrf54h20/nrf54h20_cpuapp_peripherals.dtsi> #include <../samples/matter/common/dts/nrf54h20/nrf54h20_cpuapp_memory_map.dtsi> #include <../samples/matter/common/dts/nrf54h20/nrf54h20_ram_allocation.dtsi> - -/delete-node/ &cpuapp_rx_partitions; -/delete-node/ &cpuapp_rw_partitions; - -&mram1x { - erase-block-size = <0x1000>; - write-block-size = <0x10>; - - cpuapp_rx_partitions: cpuapp-rx-partitions { - compatible = "nordic,owned-partitions", "fixed-partitions"; - status = "okay"; - nordic,access = ; - #address-cells = <1>; - #size-cells = <1>; - - companion_partition: partition@98000 { - reg = <0x98000 DT_SIZE_K(64)>; - }; - - cpuapp_slot0_partition: partition@a8000 { - reg = <0xa8000 DT_SIZE_K(948)>; - }; - }; - - cpuapp_rw_partitions: cpuapp-rw-partitions { - compatible = "nordic,owned-partitions", "fixed-partitions"; - status = "okay"; - nordic,access = ; - #address-cells = <0x1>; - #size-cells = <0x1>; - - storage_partition: partition@195000 { - reg = <0x195000 DT_SIZE_K(32)>; - }; - - factory_data: partition@19D000 { - reg = <0x19D000 DT_SIZE_K(4)>; - }; - - /* DFU partition to store SUIT manifests and Nordic Firmware update */ - dfu_partition: partition@19E000 { - reg = <0x19E000 DT_SIZE_K(300)>; - }; - }; -}; diff --git a/applications/matter_bridge/doc/matter_bridge_description.rst b/applications/matter_bridge/doc/matter_bridge_description.rst index fccc399845f9..38fdd124fe5d 100644 --- a/applications/matter_bridge/doc/matter_bridge_description.rst +++ b/applications/matter_bridge/doc/matter_bridge_description.rst @@ -98,14 +98,18 @@ For example: For information about how to upgrade the device firmware using a PC or a smartphone, see the :ref:`matter_bridge_app_dfu` section. -.. note:: - Currently the DFU over Bluetooth LE SMP and Matter OTA are not available for the ``nrf54h20dk/nrf54h20/cpuapp`` board target. - The Matter bridge device has an additional functionality, enabling it to work as a smart plug. This feature provides an additional endpoint with an ID equal to 2, which represents Matter on/off smart plug device type functionality. This means that you can integrate the Matter bridge functionality into your end product, such as a smart plug, and avoid having to use a standalone bridge device. This is an optional feature and can be enabled by :ref:`Configuring the smart plug functionality `. +SUIT DFU on nRF54H20 +==================== + +.. include:: ../../../samples/matter/template/README.rst + :start-after: matter_template_dfu_suit_start + :end-before: matter_template_dfu_suit_end + .. _matter_bridge_app_bridged_support: Bridged device support diff --git a/config/suit/templates/nrf54h20/matter/v1/app_envelope.yaml.jinja2 b/config/suit/templates/nrf54h20/matter/v1/app_envelope.yaml.jinja2 index 5778233a3ccd..5ed97b9ebdf7 100644 --- a/config/suit/templates/nrf54h20/matter/v1/app_envelope.yaml.jinja2 +++ b/config/suit/templates/nrf54h20/matter/v1/app_envelope.yaml.jinja2 @@ -176,6 +176,12 @@ SUIT_Envelope_Tagged: - suit-send-record-failure - suit-send-sysinfo-success - suit-send-sysinfo-failure + {%- if 'SB_CONFIG_SUIT_ENVELOPE_NORDIC_TOP_IN_ROOT' in sysbuild['config'] %} + - suit-directive-set-component-index: 0 + - suit-directive-override-parameters: + suit-parameter-image-size: + raw: 0 + {%- endif %} suit-manifest-component-id: - INSTLD_MFST diff --git a/config/suit/templates/nrf54h20/matter/v1/rad_envelope.yaml.jinja2 b/config/suit/templates/nrf54h20/matter/v1/rad_envelope.yaml.jinja2 index 3de138321759..ee155e9f0f96 100644 --- a/config/suit/templates/nrf54h20/matter/v1/rad_envelope.yaml.jinja2 +++ b/config/suit/templates/nrf54h20/matter/v1/rad_envelope.yaml.jinja2 @@ -130,6 +130,12 @@ SUIT_Envelope_Tagged: - suit-send-record-failure - suit-send-sysinfo-success - suit-send-sysinfo-failure + {%- if 'SB_CONFIG_SUIT_ENVELOPE_NORDIC_TOP_IN_ROOT' in sysbuild['config'] %} + - suit-directive-set-component-index: 0 + - suit-directive-override-parameters: + suit-parameter-image-size: + raw: 0 + {%- endif %} suit-manifest-component-id: - INSTLD_MFST diff --git a/config/suit/templates/nrf54h20/matter/v1/root_with_binary_nordic_top.yaml.jinja2 b/config/suit/templates/nrf54h20/matter/v1/root_with_binary_nordic_top.yaml.jinja2 index 4d87ba30b031..43ef012c0f50 100644 --- a/config/suit/templates/nrf54h20/matter/v1/root_with_binary_nordic_top.yaml.jinja2 +++ b/config/suit/templates/nrf54h20/matter/v1/root_with_binary_nordic_top.yaml.jinja2 @@ -153,9 +153,9 @@ SUIT_Envelope_Tagged: suit-install: - suit-directive-set-component-index: 0 -{%- if application is defined %} +{%- if nordic_top %} - suit-directive-override-parameters: - suit-parameter-uri: '#{{ application['name'] }}' + suit-parameter-uri: '#top' - suit-directive-fetch: - suit-send-record-failure - suit-condition-dependency-integrity: @@ -163,15 +163,18 @@ SUIT_Envelope_Tagged: - suit-send-record-failure - suit-send-sysinfo-success - suit-send-sysinfo-failure - - suit-directive-process-dependency: - - suit-send-record-success - - suit-send-record-failure - - suit-send-sysinfo-success - - suit-send-sysinfo-failure + - suit-directive-run-sequence: + - suit-directive-override-parameters: + suit-parameter-soft-failure: True + - suit-directive-process-dependency: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure {%- endif %} -{%- if radio is defined %} +{%- if application is defined %} - suit-directive-override-parameters: - suit-parameter-uri: '#{{ radio['name'] }}' + suit-parameter-uri: '#{{ application['name'] }}' - suit-directive-fetch: - suit-send-record-failure - suit-condition-dependency-integrity: @@ -185,9 +188,9 @@ SUIT_Envelope_Tagged: - suit-send-sysinfo-success - suit-send-sysinfo-failure {%- endif %} -{%- if nordic_top %} +{%- if radio is defined %} - suit-directive-override-parameters: - suit-parameter-uri: '#top' + suit-parameter-uri: '#{{ radio['name'] }}' - suit-directive-fetch: - suit-send-record-failure - suit-condition-dependency-integrity: diff --git a/doc/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_suit_soc_binaries.rst b/doc/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_suit_soc_binaries.rst index 9221dbe05b5a..75a527ae1b5b 100644 --- a/doc/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_suit_soc_binaries.rst +++ b/doc/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_suit_soc_binaries.rst @@ -45,6 +45,7 @@ However, there are the following limitations: * This method requires two updates, which is not supported by all protocols. * The manufacturer envelope cannot ensure the compatibility of SoC binaries with the manufacturer application. +.. _ug_nrf54h20_suit_soc_binaries_root_in_manufacturer: Attaching the nordic_top.suit envelope to the manufacturer root manifest ======================================================================== diff --git a/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst b/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst index 8c79658b7d5f..7706fb6363f0 100644 --- a/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst +++ b/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst @@ -190,7 +190,8 @@ IPC radio firmware Matter Bridge ------------- -|no_changes_yet_note| +* Enabled SUIT DFU support for the :ref:`matter_bridge_app` application. + Currently, only the Matter OTA protocol is fully supported for SUIT DFU purposes. nRF5340 Audio ------------- @@ -347,6 +348,8 @@ Matter samples -------------- * Updated the :ref:`matter_template_sample` sample document with the instructions on how to build the sample on the nRF54L15 DK with support for Matter OTA DFU and DFU over Bluetooth SMP, and using internal MRAM only. +* Enabled SUIT DFU support for the :ref:`matter_lock_sample`, and :ref:`matter_template_sample` samples. + Currently, only the Matter OTA protocol is fully supported for SUIT DFU purposes. Networking samples ------------------ diff --git a/samples/matter/common/dts/nrf54h20/nrf54h20_cpuapp_memory_map.dtsi b/samples/matter/common/dts/nrf54h20/nrf54h20_cpuapp_memory_map.dtsi index d3b6e4691b0c..fdf6f1ff1412 100644 --- a/samples/matter/common/dts/nrf54h20/nrf54h20_cpuapp_memory_map.dtsi +++ b/samples/matter/common/dts/nrf54h20/nrf54h20_cpuapp_memory_map.dtsi @@ -36,8 +36,8 @@ #address-cells = <1>; #size-cells = <1>; - cpuapp_slot0_partition: partition@98000 { - reg = <0x98000 DT_SIZE_K(848)>; + cpuapp_slot0_partition: partition@86000 { + reg = <0x86000 DT_SIZE_K(1336)>; }; }; @@ -48,17 +48,17 @@ #address-cells = < 0x1 >; #size-cells = < 0x1 >; - storage_partition: partition@16C000 { - reg = < 0x16C000 DT_SIZE_K(32) >; + storage_partition: partition@1D4000 { + reg = < 0x1D4000 DT_SIZE_K(32) >; }; - factory_data: partition@174000 { - reg = < 0x174000 DT_SIZE_K(4) >; + factory_data: partition@1DC000 { + reg = < 0x1DC000 DT_SIZE_K(4) >; }; /* DFU partition to store SUIT manifests and Nordic Firmware update */ - dfu_partition: partition@175000 { - reg = < 0x175000 DT_SIZE_K(464) >; + dfu_partition: partition@1DD000 { + reg = < 0x1DD000 DT_SIZE_K(64) >; }; }; @@ -72,7 +72,7 @@ #size-cells = <1>; dfu_cache_partition_1: partition@0 { - reg = <0x0 DT_SIZE_K(1024)>; + reg = <0x0 DT_SIZE_K(2048)>; }; }; }; diff --git a/samples/matter/common/dts/nrf54h20/nrf54h20_cpurad_memory_map.dtsi b/samples/matter/common/dts/nrf54h20/nrf54h20_cpurad_memory_map.dtsi index e6b1af6650bc..b36e84b620af 100644 --- a/samples/matter/common/dts/nrf54h20/nrf54h20_cpurad_memory_map.dtsi +++ b/samples/matter/common/dts/nrf54h20/nrf54h20_cpurad_memory_map.dtsi @@ -25,8 +25,8 @@ nordic,access = ; #address-cells = < 0x1 >; #size-cells = < 0x1 >; - cpurad_slot0_partition: partition@66000 { - reg = < 0x66000 DT_SIZE_K(200) >; + cpurad_slot0_partition: partition@54000 { + reg = < 0x54000 DT_SIZE_K(200) >; }; }; }; diff --git a/samples/matter/lock/Kconfig.sysbuild b/samples/matter/lock/Kconfig.sysbuild index 62fb2e26e460..d997c43fb0a4 100644 --- a/samples/matter/lock/Kconfig.sysbuild +++ b/samples/matter/lock/Kconfig.sysbuild @@ -77,19 +77,6 @@ endif # BOARD_NRF54L15DK_NRF54L15_CPUAPP_NS endif # BOOTLOADER_MCUBOOT -if SOC_SERIES_NRF54HX - -config SUIT_ENVELOPE - default y - -config SUIT_BUILD_FLASH_COMPANION - default y - -config SUIT_MULTI_IMAGE_PACKAGE_BUILD - default y if MATTER_OTA - -endif # SOC_SERIES_NRF54HX - #### Enable generating factory data config MATTER_FACTORY_DATA_GENERATE default y if !BOARD_NRF21540DK diff --git a/samples/matter/lock/README.rst b/samples/matter/lock/README.rst index b038487eb26a..6501736cd090 100644 --- a/samples/matter/lock/README.rst +++ b/samples/matter/lock/README.rst @@ -319,6 +319,13 @@ For example: .. matter_door_lock_sample_build_with_dfu_end +SUIT DFU on nRF54H20 +-------------------- + +.. include:: ../template/README.rst + :start-after: matter_template_dfu_suit_start + :end-before: matter_template_dfu_suit_end + .. _matter_lock_sample_configuration_fem: FEM support diff --git a/samples/matter/template/Kconfig.sysbuild b/samples/matter/template/Kconfig.sysbuild index 3191080bb1e6..7cbb0c6539b1 100644 --- a/samples/matter/template/Kconfig.sysbuild +++ b/samples/matter/template/Kconfig.sysbuild @@ -77,19 +77,6 @@ endif # BOARD_NRF54L15DK endif # BOOTLOADER_MCUBOOT -if SOC_SERIES_NRF54HX - -config SUIT_ENVELOPE - default y - -config SUIT_BUILD_FLASH_COMPANION - default y - -config SUIT_MULTI_IMAGE_PACKAGE_BUILD - default y if MATTER_OTA - -endif # SOC_SERIES_NRF54HX - #### Enable generating factory data config MATTER_FACTORY_DATA_GENERATE default y if !BOARD_NRF21540DK diff --git a/samples/matter/template/README.rst b/samples/matter/template/README.rst index 56a30ed75997..ed845ce8afa7 100644 --- a/samples/matter/template/README.rst +++ b/samples/matter/template/README.rst @@ -153,6 +153,46 @@ To build the sample for the same purpose, but in the ``release`` configuration, Note that in this case, the size of the application partition is half of what it would be when using a configuration with external flash memory support. +SUIT DFU on nRF54H20 +-------------------- + +.. matter_template_dfu_suit_start + +Matter devices running on an nRF54H20 SoC support :ref:`ug_nrf54h20_suit_dfu`. +You can use SUIT mechanisms to update both the application and radio core firmware as well as the *nRF54H20 SoC binaries* provided by Nordic Semiconductor. +Currently, Matter samples support only the :ref:`ug_nrf54h20_suit_external_memory` approach and the *Push* firmware update model. +The default SUIT manifest template files are located in the :file:`config/suit/templates/nrf54h20/matter/v1` directory. +To change the source directory of the SUIT manifest template files, set the ``SUIT_BASE_MANIFEST_VARIANT`` sysbuild configuration option. + +Currently, only DFU over the :ref:`ug_matter_overview_dfu` protocol is fully supported for this sample without any external tools. +To perform a firmware update using the Simple Management Protocol (SMP) over Bluetooth LE, you need an external tool that supports :ref:`ug_nrf54h20_suit_smp`. + +To perform a firmware update of the application and radio core firmware using the :ref:`ug_matter_overview_dfu` protocol, ensure that the ``MATTER_OTA`` sysbuild configuration option is set to ``y`` and perform the firmware update as usual following the :doc:`matter:nrfconnect_examples_software_update` user guide. +In this case, the *nRF54H20 SoC binaries* will not be updated. + +To update the *nRF54H20 SoC binaries*, follow the :ref:`ug_nrf54h20_suit_soc_binaries_root_in_manufacturer` user guide and define the page erase size of the device on which the cache partition is stored. +To set the page erase size for SUIT purposes use the ``SUIT_DFU_CACHE_PARTITION_X_EB_SIZE`` CMake variable, where ``X`` means the cache partition number. +If the external flash is used to store the cache partition, the page erase size is the same as the external flash page erase size. +For example on nRF54H20 DK, the page erase size is 4096 bytes accordingly to the ``mx25uw63`` flash memory erase page size. +To see the exact value of the cache 1 page erase size, see the devicetree configuration file, find the ``dfu_cache_partition_1`` node and check the erase page value for the device on which the partition is defined. + +For example, you can use the following command to prepare the DFU files that include the *nRF54H20 SoC binaries* for Matter OTA on nRF54H20 DK: + +.. code-block:: console + + west build -b nrf54h20dk/nrf54h20/cpuapp -- -DSB_CONFIG_SUIT_ENVELOPE_NORDIC_TOP_DIRECTORY="\"\"" -DSUIT_DFU_CACHE_PARTITION_1_EB_SIZE=4096 + +To perform a firmware update using the SMP over the Bluetooth LE protocol, write the following files to the device using an external tool and the SUIT SMP extension described in the :ref:`ug_nrf54h20_suit_smp` user guide: + +* :file:`/DFU/root.suit` into slot 0. +* :file:`/DFU/dfu_cache_partition_1.bin` into slot 1. + +The ```` refers to your build directory. +The SUIT envelope file is included in the :file:`root.suit` file, whereas the new application firmware is included in the :file:`dfu_cache_partition_1.bin` file. +After transferring both files, confirm the update and reboot the device. + +.. matter_template_dfu_suit_end + FEM support =========== diff --git a/sysbuild/Kconfig.matter b/sysbuild/Kconfig.matter index 862e2c1b4365..afcc1c0b4f9f 100644 --- a/sysbuild/Kconfig.matter +++ b/sysbuild/Kconfig.matter @@ -5,6 +5,11 @@ menuconfig MATTER bool "Matter" depends on ZEPHYR_CONNECTEDHOMEIP_MODULE + # Matter requires at least one DFU transport so we always need to have SUIT mechanisms for nRF54H series + select SUIT_ENVELOPE if SOC_SERIES_NRF54HX + select SUIT_BUILD_FLASH_COMPANION if SOC_SERIES_NRF54HX + select SUIT_MULTI_IMAGE_PACKAGE_BUILD if MATTER_OTA && SOC_SERIES_NRF54HX + select SUIT_ENVELOPE_NORDIC_TOP_EXTRACT_PAYLOADS_TO_CACHE if SUIT_ENVELOPE_NORDIC_TOP_DIRECTORY != "" && SOC_SERIES_NRF54HX if MATTER @@ -37,7 +42,11 @@ config MATTER_OTA_IMAGE_FILE_NAME help Provides the file name of the generated Matter OTA image in the build directory. +if SOC_SERIES_NRF54HX + +# Set the default value of manifest variant dedicated to Matter config SUIT_BASE_MANIFEST_VARIANT default "matter/v1" -endif +endif # SOC_SERIES_NRF54HX +endif # MATTER