Skip to content

Commit

Permalink
samples: matter: Added nRF54H20 support
Browse files Browse the repository at this point in the history
Added support for nRF54H20 DK for Matter Lock and Template
samples.

DFU and factory data is not available yet.

Signed-off-by: Arkadiusz Balys <[email protected]>
  • Loading branch information
ArekBalysNordic committed Jun 5, 2024
1 parent 36c9fa9 commit fbfba31
Show file tree
Hide file tree
Showing 22 changed files with 1,382 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,15 @@ Matter samples that used :ref:`zephyr:nrf-ieee802154-rpmsg-sample` or :ref:`mult
* :ref:`matter_thermostat_sample` sample.
* :ref:`matter_window_covering_sample` sample.

DFU support for the nRF54L15 PDK is available only for the ``release`` build type.

* Support for Matter over Thread on the nRF54H20 DK with the ``nrf54h20dk/nrf54h20/cpuapp`` board target to the following Matter samples:

* :ref:`matter_lock_sample` sample.
* :ref:`matter_template_sample` sample.

DFU, factory data, and PSA Crypto API are not currently supported for the nRF54H20 DK.

* Enabled the Bluetooth® LE Extended Announcement feature for all samples, and increased advertising timeout from 15 minutes to 1 hour.

* :ref:`matter_lock_sample` sample:
Expand Down
32 changes: 21 additions & 11 deletions samples/matter/lock/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,34 @@
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

#### Radio core selection
config NRF_DEFAULT_IPC_RADIO
default y

# Enable IEEE802.15.4 serialization to network core
config NETCORE_IPC_RADIO_IEEE802154
default y if BOARD_NRF5340DK_NRF5340_CPUAPP
default y if SOC_SERIES_NRF53X || SOC_SERIES_NRF54HX

# Enable Bluetooth serialization to network core
config NETCORE_IPC_RADIO_BT_HCI_IPC
default y if (BOARD_NRF7002DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF5340_CPUAPP_NRF7001 || BOARD_NRF5340DK_NRF5340_CPUAPP)

config MATTER_FACTORY_DATA
default y if !BOARD_NRF21540DK
default y if SOC_SERIES_NRF53X || SOC_SERIES_NRF54HX

#### Bootloader
choice BOOTLOADER
default BOOTLOADER_MCUBOOT if !BOARD_NRF21540DK
default BOOTLOADER_MCUBOOT if !BOARD_NRF21540DK && !SOC_SERIES_NRF54HX
endchoice

if BOOTLOADER_MCUBOOT

#### DFU multi-image support
config DFU_MULTI_IMAGE_PACKAGE_BUILD
default y

config DFU_MULTI_IMAGE_PACKAGE_APP
default y

if (BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF5340_CPUAPP)
#### DFU network core configuration
if SOC_SERIES_NRF53X

config MCUBOOT_UPDATEABLE_IMAGES
default 2
Expand All @@ -53,11 +56,18 @@ config NETCORE_APP_UPDATE
config DFU_MULTI_IMAGE_PACKAGE_NET
default y

endif # (BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF5340_CPUAPP)

endif # SOC_SERIES_NRF53X
endif # BOOTLOADER_MCUBOOT

config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY
default y if BOARD_NRF52840DK_NRF52840 || BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF5340_CPUAPP_NRF7001 || BOARD_NRF54L15PDK_NRF54L15_CPUAPP
#### Enable generating factory data
config MATTER_FACTORY_DATA
default y if !BOARD_NRF21540DK

if BOARD_NRF54H20DK

config SUIT_ENVELOPE_EDITABLE_TEMPLATES_LOCATION
default "../suit_templates/"

endif

source "${ZEPHYR_BASE}/share/sysbuild/Kconfig"
2 changes: 1 addition & 1 deletion samples/matter/lock/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ IPv6 network support

The development kits for this sample offer the following IPv6 network support for Matter:

* Matter over Thread is supported for ``nrf52840dk/nrf52840``, ``nrf5340dk/nrf5340/cpuapp``, and ``nrf21540dk/nrf52840``.
* Matter over Thread is supported for ``nrf52840dk/nrf52840``, ``nrf5340dk/nrf5340/cpuapp``, ``nrf21540dk/nrf52840``, and ``nrf54h20dk/nrf54h20/cpuapp``.
* Matter over Wi-Fi is supported for ``nrf5340dk/nrf5340/cpuapp`` with the ``nrf7002ek`` shield attached (2.4 GHz and 5 GHz), for ``nrf7002dk/nrf5340/cpuapp`` (2.4 GHz and 5 GHz), or for ``nrf7002dk/nrf5340/cpuapp/nrf7001`` (2.4 GHz only).
* :ref:`Switching between Matter over Thread and Matter over Wi-Fi <matter_lock_sample_wifi_thread_switching>` is supported for ``nrf5340dk/nrf5340/cpuapp`` with the ``nrf7002ek`` shield attached, using the ``thread_wifi_switched`` build type.

Expand Down
22 changes: 22 additions & 0 deletions samples/matter/lock/boards/nrf54h20dk_nrf54h20_cpuapp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# TODO: Workaround to be removed once DFU and external flash will be supported on nRF54H20.
CONFIG_CHIP_OTA_REQUESTOR=n
CONFIG_CHIP_QSPI_NOR=n

CONFIG_MPU_STACK_GUARD=n

# TODO: Enable PSA crypto once it is available
CONFIG_CHIP_CRYPTO_PSA=n
CONFIG_MBEDTLS_CIPHER_PADDING_PKCS7=y
CONFIG_MBEDTLS_CIPHER_MODE_CBC=y

# TODO: Enable factory data once it is available
CONFIG_CHIP_FACTORY_DATA=n

# TODO: Workaround to be removed once Zephyr's CONFIG_FPROTECT is supported on nRF54H20.
CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n
99 changes: 99 additions & 0 deletions samples/matter/lock/boards/nrf54h20dk_nrf54h20_cpuapp.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/ {
chosen {
/* prepare IPC to HCI Radio core */
zephyr,bt-hci-ipc = &ipc0;
};

aliases {
factory-data = &factory_data;
factory-data-memory-region = &cpuapp_rw_partitions;
};
};

/**************************************************************
Redefine MRAM memory (Partitions)
**************************************************************/
/* We need to redefine partitions to meet Matter requirements */
/delete-node/ &cpuapp_rx_partitions;
/delete-node/ &cpuapp_rw_partitions;
/delete-node/ &cpurad_rx_partitions;

&mram1x {
erase-block-size = < 0x1000 >;
write-block-size = < 0x10 >;

cpurad_rx_partitions: cpurad-rx-partitions {
compatible = "nordic,owned-partitions", "fixed-partitions";
status = "disabled";
perm-read;
perm-execute;
perm-secure;
#address-cells = < 0x1 >;
#size-cells = < 0x1 >;
cpurad_slot0_partition: partition@66000 {
reg = < 0x66000 0x32000 >;
};
};

cpuapp_rx_partitions: cpuapp-rx-partitions {
compatible = "nordic,owned-partitions", "fixed-partitions";
status = "okay";
perm-read;
perm-execute;
perm-secure;
#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(900)>;
};

cpuppr_code_partition: partition@189000 {
reg = <0x189000 DT_SIZE_K(64)>;
};
};

cpuapp_rw_partitions: cpuapp-rw-partitions {
compatible = "nordic,owned-partitions", "fixed-partitions";
status = "okay";
perm-read;
perm-write;
#address-cells = < 0x1 >;
#size-cells = < 0x1 >;

factory_data: partition@199000 {
reg = < 0x199000 DT_SIZE_K(4) >;
};

storage_partition: partition@19A000 {
reg = < 0x19A000 DT_SIZE_K(32) >;
};
};
};

/**************************************************************
Enable required peripherals
**************************************************************/
/* Communication between Application and Radio Cores */
ipc0: &cpuapp_cpurad_ipc {
status = "okay";
};
&cpuapp_cpurad_ram0x_region {
status = "okay";
};
&cpurad_bellboard {
status = "okay";
};
&cpuapp_bellboard {
status = "okay";
};
2 changes: 2 additions & 0 deletions samples/matter/lock/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ tests:
- nrf7002dk/nrf5340/cpuapp
- nrf7002dk/nrf5340/cpuapp/nrf7001
- nrf54l15pdk/nrf54l15/cpuapp
- nrf54h20dk/nrf54h20/cpuapp
platform_allow: nrf52840dk/nrf52840 nrf5340dk/nrf5340/cpuapp nrf7002dk/nrf5340/cpuapp
nrf7002dk/nrf5340/cpuapp/nrf7001 nrf54l15pdk/nrf54l15/cpuapp
nrf54h20dk/nrf54h20/cpuapp
tags: sysbuild
sample.matter.lock.release:
sysbuild: true
Expand Down
148 changes: 148 additions & 0 deletions samples/matter/lock/suit_templates/app_envelope.yaml.jinja2
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
{%- set mpi_application_vendor_name = application['config']['CONFIG_SUIT_MPI_APP_LOCAL_1_VENDOR_NAME']|default('nordicsemi.com') %}
{%- set mpi_application_class_name = application['config']['CONFIG_SUIT_MPI_APP_LOCAL_1_CLASS_NAME']|default('nRF54H20_sample_app') %}
{%- set sequence_number = sysbuild['config']['SB_CONFIG_SUIT_ENVELOPE_SEQUENCE_NUM'] %}
SUIT_Envelope_Tagged:
suit-authentication-wrapper:
SuitDigest:
suit-digest-algorithm-id: cose-alg-sha-256
suit-manifest:
suit-manifest-version: 1
suit-manifest-sequence-number: {{ sequence_number }}
suit-common:
suit-components:
- - MEM
- {{ application['dt'].label2node['cpu'].unit_addr }}
- {{ get_absolute_address(application['dt'].chosen_nodes['zephyr,code-partition']) }}
- {{ application['dt'].chosen_nodes['zephyr,code-partition'].regs[0].size }}
- - CAND_IMG
- 0
{%- if flash_companion is defined %}
- - MEM
- {{ flash_companion['dt'].label2node['cpu'].unit_addr }}
- {{ get_absolute_address(flash_companion['dt'].chosen_nodes['zephyr,code-partition']) }}
- {{ flash_companion['dt'].chosen_nodes['zephyr,code-partition'].regs[0].size }}
{%- endif %}
suit-shared-sequence:
- suit-directive-set-component-index: 0
- suit-directive-override-parameters:
suit-parameter-vendor-identifier:
RFC4122_UUID: {{ mpi_application_vendor_name }}
suit-parameter-class-identifier:
RFC4122_UUID:
namespace: {{ mpi_application_vendor_name }}
name: {{ mpi_application_class_name }}
suit-parameter-image-digest:
suit-digest-algorithm-id: cose-alg-sha-256
suit-digest-bytes:
file: {{ application['binary'] }}
suit-parameter-image-size:
file: {{ application['binary'] }}
- suit-condition-vendor-identifier:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure
- suit-condition-class-identifier:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure
- suit-directive-set-component-index: 1
- suit-directive-override-parameters:
suit-parameter-image-digest:
suit-digest-algorithm-id: cose-alg-sha-256
suit-digest-bytes:
file: {{ application['binary'] }}
{%- if flash_companion is defined %}
- suit-directive-set-component-index: 2
- suit-directive-override-parameters:
suit-parameter-image-digest:
suit-digest-algorithm-id: cose-alg-sha-256
suit-digest-bytes:
file: {{ flash_companion['binary'] }}
{%- endif %}
suit-validate:
- suit-directive-set-component-index: 0
- suit-condition-image-match:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure
suit-invoke:
- suit-directive-set-component-index: 0
- suit-directive-invoke:
- suit-send-record-failure
suit-install:
{%- if flash_companion is defined %}
- suit-directive-set-component-index: 1
- suit-directive-override-parameters:
suit-parameter-uri: '#{{ flash_companion['name'] }}'
suit-parameter-image-digest:
suit-digest-algorithm-id: cose-alg-sha-256
suit-digest-bytes:
file: {{ flash_companion['binary'] }}
- suit-directive-fetch:
- suit-send-record-failure
- suit-condition-image-match:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure
- suit-directive-set-component-index: 2
- suit-directive-override-parameters:
suit-parameter-source-component: 1
- suit-directive-copy:
- suit-send-record-failure
- suit-condition-image-match:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure
- suit-directive-invoke:
- suit-send-record-failure
{%- endif %}
- suit-directive-set-component-index: 1
- suit-directive-override-parameters:
suit-parameter-uri: '#{{ application['name'] }}'
suit-parameter-image-digest:
suit-digest-algorithm-id: cose-alg-sha-256
suit-digest-bytes:
file: {{ application['binary'] }}
- suit-directive-fetch:
- suit-send-record-failure
- suit-condition-image-match:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure
- suit-directive-set-component-index: 0
- suit-directive-override-parameters:
suit-parameter-source-component: 1
- suit-directive-copy:
- suit-send-record-failure
- suit-condition-image-match:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure
suit-text:
suit-digest-algorithm-id: cose-alg-sha-256
suit-manifest-component-id:
- INSTLD_MFST
- RFC4122_UUID:
namespace: {{ mpi_application_vendor_name }}
name: {{ mpi_application_class_name }}
suit-text:
en:
'["MEM", {{ application['dt'].label2node['cpu'].unit_addr }}, {{ get_absolute_address(application['dt'].chosen_nodes['zephyr,code-partition']) }}, {{ application['dt'].chosen_nodes['zephyr,code-partition'].regs[0].size }}]':
suit-text-vendor-name: Nordic Semiconductor ASA
suit-text-model-name: nRF54H20_cpuapp
suit-text-vendor-domain: nordicsemi.com
suit-text-model-info: The nRF54H20 application core
suit-text-component-description: Sample application core FW
suit-text-component-version: v1.0.0
suit-integrated-payloads:
'#{{ application['name'] }}': {{ application['binary'] }}
{%- if flash_companion is defined %}
'#{{ flash_companion['name'] }}': {{ flash_companion['binary'] }}
{%- endif %}
Loading

0 comments on commit fbfba31

Please sign in to comment.