Skip to content

Commit

Permalink
samples: matter: add support for nRF54L10
Browse files Browse the repository at this point in the history
Add support for nRF54L10 in Matter

Signed-off-by: Maciej Baczmanski <[email protected]>
  • Loading branch information
maciejbaczmanski authored and nordicjm committed Dec 6, 2024
1 parent 2ebe06d commit 760a547
Show file tree
Hide file tree
Showing 16 changed files with 376 additions and 11 deletions.
8 changes: 8 additions & 0 deletions samples/matter/smoke_co_alarm/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ config DFU_MULTI_IMAGE_PACKAGE_NET
default y

endif # SOC_SERIES_NRF53X

if BOARD_NRF54L15DK

# Disable checking the external drivers for nRF54L15 DKs.
config PM_OVERRIDE_EXTERNAL_DRIVER_CHECK
default y

endif # BOARD_NRF54L15DK
endif # BOOTLOADER_MCUBOOT

#### Enable generating factory data
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Multirole is the only currently supported role by SoftDevice.
CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y

# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
CONFIG_MPSL_WORK_STACK_SIZE=2048

# Set the ZMS sector count to match the settings partition size that is 40 kB for this application.
CONFIG_SETTINGS_ZMS_SECTOR_COUNT=10
# Workaround required as Zephyr L2 implies usage of NVS backend for settings.
# It should be removed once the proper fix will be applied in Zephyr.
CONFIG_NVS=n

# Low Power mode
CONFIG_POWEROFF=y

# Disabling of unused RAM blocks to reduce power consumption is not yet available for nRF54L10 SoC
CONFIG_RAM_POWER_DOWN_LIBRARY=n
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/


/ {
chosen {
nordic,pm-ext-flash = &mx25r64;
};

aliases {
// Use watchdog wdt31 as the application watchdog
watchdog0 = &wdt31;
};
};

// restore full RRAM and SRAM space - by default some parts are dedicated to FLRP
&cpuapp_rram {
reg = <0x0 DT_SIZE_K(1022)>;
};

&cpuapp_sram {
reg = <0x20000000 DT_SIZE_K(192)>;
ranges = <0x0 0x20000000 DT_SIZE_K(192)>;
};

// TODO: re-enable HWFC once it's fixed
&uart20 {
/delete-property/ hw-flow-control;
};

&mx25r64 {
status = "okay";
};

&wdt31 {
status = "okay";
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
mcuboot:
address: 0x0
region: flash_primary
size: 0xD000
mcuboot_pad:
address: 0xD000
region: flash_primary
size: 0x800
app:
address: 0xD800
region: flash_primary
size: 0xE7000
mcuboot_primary:
orig_span: &id001
- mcuboot_pad
- app
span: *id001
address: 0xD000
region: flash_primary
size: 0xE7800
mcuboot_primary_app:
orig_span: &id002
- app
span: *id002
address: 0xD800
region: flash_primary
size: 0xE7000
factory_data:
address: 0xF4800
region: flash_primary
size: 0x1000
settings_storage:
address: 0xF5800
region: flash_primary
size: 0xA000
mcuboot_secondary:
address: 0x0
orig_span: &id003
- mcuboot_secondary_pad
- mcuboot_secondary_app
region: external_flash
size: 0xE7800
span: *id003
mcuboot_secondary_pad:
region: external_flash
address: 0x0
size: 0x800
mcuboot_secondary_app:
region: external_flash
address: 0x800
size: 0xE7000
external_flash:
address: 0xE7800
size: 0x718800
device: MX25R64
region: external_flash
9 changes: 8 additions & 1 deletion samples/matter/smoke_co_alarm/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ tests:
- nrf52840dk/nrf52840
- nrf5340dk/nrf5340/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l15dk/nrf54l10/cpuapp
platform_allow: nrf52840dk/nrf52840 nrf5340dk/nrf5340/cpuapp nrf54l15dk/nrf54l15/cpuapp
nrf54l15dk/nrf54l10/cpuapp
tags: sysbuild ci_samples_matter
sample.matter.smoke_co_alarm.release:
sysbuild: true
Expand All @@ -20,7 +22,9 @@ tests:
- nrf52840dk/nrf52840
- nrf5340dk/nrf5340/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l15dk/nrf54l10/cpuapp
platform_allow: nrf52840dk/nrf52840 nrf5340dk/nrf5340/cpuapp nrf54l15dk/nrf54l15/cpuapp
nrf54l15dk/nrf54l10/cpuapp
tags: sysbuild ci_samples_matter
sample.matter.smoke_co_alarm.lto:
sysbuild: true
Expand All @@ -30,7 +34,9 @@ tests:
- nrf52840dk/nrf52840
- nrf5340dk/nrf5340/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l15dk/nrf54l10/cpuapp
platform_allow: nrf52840dk/nrf52840 nrf5340dk/nrf5340/cpuapp nrf54l15dk/nrf54l15/cpuapp
nrf54l15dk/nrf54l10/cpuapp
tags: sysbuild ci_samples_matter
sample.matter.smoke_co_alarm.release.nrf54l15.power_consumption:
sysbuild: true
Expand All @@ -39,7 +45,8 @@ tests:
CONFIG_NCS_SAMPLE_MATTER_WATCHDOG=n
integration_platforms:
- nrf54l15dk/nrf54l15/cpuapp
platform_allow: nrf54l15dk/nrf54l15/cpuapp
- nrf54l15dk/nrf54l10/cpuapp
platform_allow: nrf54l15dk/nrf54l15/cpuapp nrf54l15dk/nrf54l10/cpuapp
tags: sysbuild ci_samples_matter
sample.matter.smoke_co_alarm.debug.reference:
sysbuild: true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# TODO: Workaround, disable memory guard to avoid false faults in application after boot
CONFIG_HW_STACK_PROTECTION=n

CONFIG_BOOT_WATCHDOG_FEED=n

# nRF54L15DK uses SPI NOR external flash
CONFIG_GPIO=y
CONFIG_SPI=y
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_SFDP_DEVICETREE=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096

# required by SPI driver
CONFIG_MULTITHREADING=y

CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y

# Currently, without tickless kernel, the SYSCOUNTER value after the software
# reset is not set properly and due to that the first system interrupt is not called
# in the proper time - the SYSCOUNTER value is set to the value from before
# reset + 1. Hence, the reboot time increases more and more.
# To avoid it enable tickles kernel for mcuboot.
CONFIG_TICKLESS_KERNEL=y

# Low Power mode
CONFIG_POWEROFF=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/ {
chosen {
nordic,pm-ext-flash = &mx25r64;
};
};

// restore full RRAM and SRAM space - by default some parts are dedicated to FLRP
&cpuapp_rram {
reg = <0x0 DT_SIZE_K(1022)>;
};

&cpuapp_sram {
reg = <0x20000000 DT_SIZE_K(192)>;
ranges = <0x0 0x20000000 DT_SIZE_K(192)>;
};

&mx25r64 {
status = "okay";
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# TODO: Workaround Fprotect is not supported on nRF54l15 yet.
CONFIG_FPROTECT=n
# TODO: Workaround, disable memory guard to avoid false faults in application after boot
CONFIG_HW_STACK_PROTECTION=n

Expand Down
6 changes: 3 additions & 3 deletions samples/matter/template/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ config DFU_MULTI_IMAGE_PACKAGE_NET

endif # SOC_SERIES_NRF53X

if BOARD_NRF54L15DK_NRF54L15_CPUAPP_NS
if BOARD_NRF54L15DK

# Disable checking the external drivers for NS build.
# Disable checking the external drivers for nRF54L15 DKs.
config PM_OVERRIDE_EXTERNAL_DRIVER_CHECK
default y

# override the mcuboot pad size, because it is not set globally for NS build.
config PM_MCUBOOT_PAD
default 0x800

endif # BOARD_NRF54L15DK_NRF54L15_CPUAPP_NS
endif # BOARD_NRF54L15DK

endif # BOOTLOADER_MCUBOOT

Expand Down
22 changes: 22 additions & 0 deletions samples/matter/template/boards/nrf54l15dk_nrf54l10_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
#

# Multirole is the only currently supported role by SoftDevice.
CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y

# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
CONFIG_MPSL_WORK_STACK_SIZE=2048

# Set the ZMS sector count to match the settings partition size that is 40 kB for this application.
CONFIG_SETTINGS_ZMS_SECTOR_COUNT=10

# Workaround required as Zephyr L2 implies usage of NVS backend for settings.
# It should be removed once the proper fix will be applied in Zephyr.
CONFIG_NVS=n

# Disabling of unused RAM blocks to reduce power consumption is not yet available for nRF54L10 SoC
CONFIG_RAM_POWER_DOWN_LIBRARY=n
39 changes: 39 additions & 0 deletions samples/matter/template/boards/nrf54l15dk_nrf54l10_cpuapp.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/ {
aliases {
// Use watchdog wdt31 as the application watchdog
watchdog0 = &wdt31;
};

chosen {
nordic,pm-ext-flash = &mx25r64;
};
};

// restore full RRAM and SRAM space - by default some parts are dedicated to FLRP
&cpuapp_rram {
reg = <0x0 DT_SIZE_K(1022)>;
};

&cpuapp_sram {
reg = <0x20000000 DT_SIZE_K(192)>;
ranges = <0x0 0x20000000 DT_SIZE_K(192)>;
};

// TODO: re-enable HWFC once it's fixed
&uart20 {
/delete-property/ hw-flow-control;
};

&mx25r64 {
status = "okay";
};

&wdt31 {
status = "okay";
};
56 changes: 56 additions & 0 deletions samples/matter/template/pm_static_nrf54l15dk_nrf54l10_cpuapp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
mcuboot:
address: 0x0
region: flash_primary
size: 0xD000
mcuboot_pad:
address: 0xD000
region: flash_primary
size: 0x800
app:
address: 0xD800
region: flash_primary
size: 0xE7000
mcuboot_primary:
orig_span: &id001
- mcuboot_pad
- app
span: *id001
address: 0xD000
region: flash_primary
size: 0xE7800
mcuboot_primary_app:
orig_span: &id002
- app
span: *id002
address: 0xD800
region: flash_primary
size: 0xE7000
factory_data:
address: 0xF4800
region: flash_primary
size: 0x1000
settings_storage:
address: 0xF5800
region: flash_primary
size: 0xA000
mcuboot_secondary:
address: 0x0
orig_span: &id003
- mcuboot_secondary_pad
- mcuboot_secondary_app
region: external_flash
size: 0xE7800
span: *id003
mcuboot_secondary_pad:
region: external_flash
address: 0x0
size: 0x800
mcuboot_secondary_app:
region: external_flash
address: 0x800
size: 0xE7000
external_flash:
address: 0xE7800
size: 0x718800
device: MX25R64
region: external_flash
Loading

0 comments on commit 760a547

Please sign in to comment.