diff --git a/applications/image_flasher/CMakeLists.txt b/applications/image_flasher/CMakeLists.txt new file mode 100644 index 000000000000..9ddc41778680 --- /dev/null +++ b/applications/image_flasher/CMakeLists.txt @@ -0,0 +1,49 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +cmake_minimum_required(VERSION 3.20.0) + +find_package(Zephyr + COMPONENTS zephyr_default:boards + REQUIRED HINTS $ENV{ZEPHYR_BASE} +) + +project(image_flasher) + +# Create the runners_yaml_props_target that flash system expects +add_custom_target(runners_yaml_props_target) + +# Fetch hex file to flash from sysbuild +zephyr_get(hex_file_to_flash SYSBUILD LOCAL VAR HEX_FILE) +zephyr_get(default_image SYSBUILD GLOBAL VAR IMAGE_FLASHER_DEFAULT_IMAGE) + +# Set hex_file property to point to the hex file +set_target_properties(runners_yaml_props_target PROPERTIES + hex_file "${hex_file_to_flash}" +) + +# Override the runners.yaml path to use CMAKE_CURRENT_BINARY_DIR/zephyr instead of +# PROJECT_BINARY_DIR, this ensures runners.yaml is generated at /softdevice/zephyr where +# west expects it +set(PROJECT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/zephyr) + +# Copy over Kconfig and dts files from the main image +set(default_image_binary_dir ${PROJECT_BINARY_DIR}/../../${default_image}/zephyr) +zephyr_file_copy(${default_image_binary_dir}/.config ${PROJECT_BINARY_DIR}/.config ONLY_IF_DIFFERENT) +zephyr_file_copy(${default_image_binary_dir}/edt.pickle ${PROJECT_BINARY_DIR}/edt.pickle ONLY_IF_DIFFERENT) +import_kconfig(CONFIG_ ${default_image_binary_dir}/.config) + +# Manually include board configuration to enable automatic runners.yaml generation +foreach(dir ${BOARD_DIRECTORIES}) + include(${dir}/board.cmake OPTIONAL) +endforeach() + +# Include flash support to automatically generate runners.yaml +include(${ZEPHYR_BASE}/cmake/flash/CMakeLists.txt) + +# Silent unused variable warnings +set(EXTRA_KCONFIG_TARGETS) +set(FORCED_CONF_FILE) diff --git a/dts/samples/matter/nrf52840dk_nrf52840_partitions.dtsi b/dts/samples/matter/nrf52840dk_nrf52840_partitions.dtsi new file mode 100644 index 000000000000..29e59aff7da1 --- /dev/null +++ b/dts/samples/matter/nrf52840dk_nrf52840_partitions.dtsi @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +&flash0 { + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + boot_partition: partition@0 { + label = "mcuboot"; + reg = <0x00000000 0x00007000>; + }; + + slot0_partition: partition@7000 { + label = "image-0"; + reg = <0x00007000 0x000f0000>; + }; + + factory_data_partition: partition@f7000 { + label = "factory-data"; + reg = <0x000f7000 0x00001000>; + }; + + storage_partition: partition@f8000 { + label = "storage"; + reg = <0x000f8000 0x00008000>; + }; + }; +}; + +&mx25r64 { + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + slot1_partition: partition@0 { + label = "image-1"; + reg = <0x00000000 0x000f0000>; + }; + }; +}; diff --git a/dts/samples/matter/nrf54l15dk_nrf54l10_cpuapp_partitions.dtsi b/dts/samples/matter/nrf54l15dk_nrf54l10_cpuapp_partitions.dtsi new file mode 100644 index 000000000000..3052e17b232a --- /dev/null +++ b/dts/samples/matter/nrf54l15dk_nrf54l10_cpuapp_partitions.dtsi @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +&cpuapp_rram { + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + boot_partition: partition@0 { + label = "mcuboot"; + reg = <0x00000000 0x0000d000>; + }; + + slot0_partition: partition@d000 { + label = "image-0"; + reg = <0x0000d000 0x000e5000>; + }; + + factory_data_partition: partition@f2000 { + label = "factory-data"; + reg = <0x000f2000 0x00001000>; + }; + + storage_partition: partition@f3000 { + label = "storage"; + reg = <0x000f3000 0x0000a000>; + }; + }; +}; + +&mx25r64 { + status = "okay"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + slot1_partition: partition@0 { + label = "image-1"; + reg = <0x00000000 0x000e5000>; + }; + }; +}; + +/* restore full SRAM space - by default some parts are dedicated to FLRP */ +&cpuapp_sram { + reg = <0x20000000 DT_SIZE_K(192)>; + ranges = <0x0 0x20000000 DT_SIZE_K(192)>; +}; diff --git a/dts/samples/matter/nrf54l15dk_nrf54l15_cpuapp_internal_partitions.dtsi b/dts/samples/matter/nrf54l15dk_nrf54l15_cpuapp_internal_partitions.dtsi new file mode 100644 index 000000000000..0472878640c7 --- /dev/null +++ b/dts/samples/matter/nrf54l15dk_nrf54l15_cpuapp_internal_partitions.dtsi @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ +&cpuapp_rram { + reg = <0x0 DT_SIZE_K(1524)>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + boot_partition: partition@0 { + label = "mcuboot"; + reg = <0x00000000 0x0000d000>; + }; + + slot0_partition: partition@d000 { + label = "image-0"; + reg = <0x0000d000 0x000d8000>; + }; + + /* Compression ratio 34.75% */ + slot1_partition: partition@E5000 { + label = "image-1"; + reg = <0x00e5000 0x0008d000>; + }; + + factory_data_partition: partition@172000 { + label = "factory-data"; + reg = <0x00172000 0x00001000>; + }; + + storage_partition: partition@173000 { + label = "storage"; + reg = <0x00173000 0x0000a000>; + }; + }; +}; + +&mx25r64 { + status = "disabled"; +}; + +&cpuapp_sram { + reg = <0x20000000 DT_SIZE_K(256)>; + ranges = <0x0 0x20000000 DT_SIZE_K(256)>; +}; diff --git a/dts/samples/matter/nrf54l15dk_nrf54l15_cpuapp_partitions.dtsi b/dts/samples/matter/nrf54l15dk_nrf54l15_cpuapp_partitions.dtsi new file mode 100644 index 000000000000..dc8dd3aa1c82 --- /dev/null +++ b/dts/samples/matter/nrf54l15dk_nrf54l15_cpuapp_partitions.dtsi @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ +&cpuapp_rram { + reg = <0x0 DT_SIZE_K(1524)>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + boot_partition: partition@0 { + label = "mcuboot"; + reg = <0x00000000 0x0000d000>; + }; + + slot0_partition: partition@d000 { + label = "image-0"; + reg = <0x0000d000 0x00165000>; + }; + + factory_data_partition: partition@172000 { + label = "factory-data"; + reg = <0x00172000 0x00001000>; + }; + + storage_partition: partition@173000 { + label = "storage"; + reg = <0x00173000 0x0000a000>; + }; + }; +}; + +&mx25r64 { + status = "okay"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + slot1_partition: partition@0 { + label = "image-1"; + reg = <0x00000000 0x00165000>; + }; + }; +}; + +&cpuapp_sram { + reg = <0x20000000 DT_SIZE_K(256)>; + ranges = <0x0 0x20000000 DT_SIZE_K(256)>; +}; diff --git a/dts/samples/matter/nrf54lm20dk_nrf54lm20a_cpuapp_internal_partitions.dtsi b/dts/samples/matter/nrf54lm20dk_nrf54lm20a_cpuapp_internal_partitions.dtsi new file mode 100644 index 000000000000..d8ef882dd354 --- /dev/null +++ b/dts/samples/matter/nrf54lm20dk_nrf54lm20a_cpuapp_internal_partitions.dtsi @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ +&cpuapp_rram { + reg = <0x0 DT_SIZE_K(2036)>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + boot_partition: partition@0 { + label = "mcuboot"; + reg = <0x00000000 0x0000a000>; + }; + + slot0_partition: partition@a000 { + label = "image-0"; + reg = <0x0000a000 0x00126000>; + }; + + /* Compression ratio 34.75% */ + slot1_partition: partition@130000 { + label = "image-1"; + reg = <0x00130000 0x000c0000>; + }; + + factory_data_partition: partition@1f0000 { + label = "factory-data"; + reg = <0x001f0000 0x00001000>; + }; + + storage_partition: partition@1f1000 { + label = "storage"; + reg = <0x001f1000 0x0000c000>; + }; + }; +}; + +&mx25r64 { + status = "disabled"; +}; + +&cpuapp_sram { + reg = <0x20000000 DT_SIZE_K(511)>; + ranges = <0x0 0x20000000 DT_SIZE_K(511)>; +}; diff --git a/dts/samples/matter/nrf54lm20dk_nrf54lm20a_cpuapp_partitions.dtsi b/dts/samples/matter/nrf54lm20dk_nrf54lm20a_cpuapp_partitions.dtsi new file mode 100644 index 000000000000..d898ad03f69b --- /dev/null +++ b/dts/samples/matter/nrf54lm20dk_nrf54lm20a_cpuapp_partitions.dtsi @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/delete-node/ &boot_partition; +/delete-node/ &slot0_partition; +/delete-node/ &slot1_partition; +/delete-node/ &storage_partition; + +/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ +&cpuapp_rram { + reg = <0x0 DT_SIZE_K(2036)>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + boot_partition: partition@0 { + label = "mcuboot"; + reg = <0x00000000 0x0000d000>; + }; + + slot0_partition: partition@d000 { + label = "image-0"; + reg = <0x0000d000 0x001e3000>; + }; + + factory_data_partition: partition@1f0000 { + label = "factory-data"; + reg = <0x001f0000 0x00001000>; + }; + + storage_partition: partition@1f1000 { + label = "storage"; + reg = <0x001f1000 0x0000c000>; + }; + }; +}; + +&mx25r64 { + status = "okay"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + slot1_partition: partition@0 { + label = "image-1"; + reg = <0x00000000 0x001e3000>; + }; + }; +}; + +&cpuapp_sram { + reg = <0x20000000 DT_SIZE_K(511)>; + ranges = <0x0 0x20000000 DT_SIZE_K(511)>; +}; diff --git a/samples/matter/closure/Kconfig.sysbuild b/samples/matter/closure/Kconfig.sysbuild index a8b5b9cb0281..452c2b827a99 100644 --- a/samples/matter/closure/Kconfig.sysbuild +++ b/samples/matter/closure/Kconfig.sysbuild @@ -4,6 +4,10 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # +config PARTITION_MANAGER + default n if (SOC_SERIES_NRF52X || SOC_NRF54L10 || SOC_NRF54L15 || SOC_NRF54LM20A) && \ + !BOARD_IS_NON_SECURE + #### Radio core selection config NRF_DEFAULT_IPC_RADIO default y @@ -32,9 +36,6 @@ config DFU_MULTI_IMAGE_PACKAGE_BUILD config DFU_MULTI_IMAGE_PACKAGE_APP default y -config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY - default y - #### DFU network core configuration if SOC_SERIES_NRF53X @@ -55,15 +56,10 @@ config NETCORE_APP_UPDATE config DFU_MULTI_IMAGE_PACKAGE_NET default y -endif # SOC_SERIES_NRF53X - -if BOARD_NRF54L15DK || BOARD_NRF54LM20DK - -# Disable checking the external drivers for nRF54L15 and nRF54LM20 DKs. -config PM_OVERRIDE_EXTERNAL_DRIVER_CHECK +config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY default y -endif # BOARD_NRF54L15DK || BOARD_NRF54LM20DK +endif # SOC_SERIES_NRF53X endif # BOOTLOADER_MCUBOOT diff --git a/samples/matter/closure/boards/nrf52840dk_nrf52840.overlay b/samples/matter/closure/boards/nrf52840dk_nrf52840.overlay index a77baababd79..2d3bcb297d15 100644 --- a/samples/matter/closure/boards/nrf52840dk_nrf52840.overlay +++ b/samples/matter/closure/boards/nrf52840dk_nrf52840.overlay @@ -4,11 +4,9 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; +#include +/ { aliases{ pwm-led1 = &pwm_led1; }; diff --git a/samples/matter/closure/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/matter/closure/boards/nrf54l15dk_nrf54l15_cpuapp.overlay index 49f9cc2b17d9..4e2b1c487508 100644 --- a/samples/matter/closure/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ b/samples/matter/closure/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -4,11 +4,9 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; +#include +/ { aliases { /* Configure PWM module for led1 (LED2 on the board) */ pwm-led1 = &pwm_led1; @@ -26,25 +24,11 @@ }; }; -/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ -&cpuapp_rram { - reg = <0x0 DT_SIZE_K(1524)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(256)>; - ranges = <0x0 0x20000000 0x40000>; -}; - /* TODO: re-enable HWFC once it's fixed */ &uart20 { /delete-property/ hw-flow-control; }; -&mx25r64 { - status = "okay"; -}; - &pwm20 { status = "okay"; pinctrl-0 = <&pwm_default>; diff --git a/samples/matter/closure/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/closure/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay index 08681b72d4e7..078d0cc1c01a 100644 --- a/samples/matter/closure/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ b/samples/matter/closure/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -4,11 +4,9 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; +#include +/ { aliases { /* Use watchdog wdt31 as the application watchdog */ watchdog0 = &wdt31; @@ -47,10 +45,6 @@ }; }; -&mx25r64 { - status = "okay"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/closure/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/closure/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay index e5b095467736..73361e2844fe 100644 --- a/samples/matter/closure/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay +++ b/samples/matter/closure/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -4,6 +4,8 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { aliases { /* Use watchdog wdt31 as the application watchdog */ @@ -43,10 +45,6 @@ }; }; -&mx25r64 { - status = "disabled"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/closure/pm_static_nrf52840dk_nrf52840.yml b/samples/matter/closure/pm_static_nrf52840dk_nrf52840.yml deleted file mode 100644 index 9c4aa3cdcac6..000000000000 --- a/samples/matter/closure/pm_static_nrf52840dk_nrf52840.yml +++ /dev/null @@ -1,42 +0,0 @@ -mcuboot: - address: 0x0 - size: 0x7000 - region: flash_primary -mcuboot_pad: - address: 0x7000 - size: 0x200 -app: - address: 0x7200 - size: 0xefe00 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0x7000 - size: 0xf0000 - region: flash_primary -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0x7200 - size: 0xefe00 -factory_data: - address: 0xf7000 - size: 0x1000 - region: flash_primary -settings_storage: - address: 0xf8000 - size: 0x8000 - region: flash_primary -mcuboot_secondary: - address: 0x0 - size: 0xf0000 - device: MX25R64 - region: external_flash -external_flash: - address: 0xf0000 - size: 0x710000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/closure/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml b/samples/matter/closure/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml deleted file mode 100644 index a8e64916b893..000000000000 --- a/samples/matter/closure/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x800 -app: - address: 0xD800 - region: flash_primary - size: 0x164800 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0xD000 - region: flash_primary - size: 0x165000 -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0xD800 - region: flash_primary - size: 0x164800 -factory_data: - address: 0x172000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x173000 - region: flash_primary - size: 0xA000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0x165000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x800 -mcuboot_secondary_app: - region: external_flash - address: 0x800 - size: 0x164800 -external_flash: - address: 0x165000 - size: 0x69B000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/closure/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml b/samples/matter/closure/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml deleted file mode 100644 index 3e9051d5b84d..000000000000 --- a/samples/matter/closure/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x800 -app: - address: 0xD800 - region: flash_primary - size: 0x1E2800 -mcuboot_primary: - address: 0xD000 - orig_span: &id001 - - app - - mcuboot_pad - region: flash_primary - size: 0x1E3000 - span: *id001 -mcuboot_primary_app: - address: 0xD800 - orig_span: &id002 - - app - region: flash_primary - size: 0x1E2800 - span: *id002 -factory_data: - address: 0x1F0000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x1F1000 - region: flash_primary - size: 0xC000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0x1E3000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x800 -mcuboot_secondary_app: - region: external_flash - address: 0x800 - size: 0x1E2800 -external_flash: - address: 0x1E3000 - size: 0x5DB000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/closure/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml b/samples/matter/closure/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml deleted file mode 100644 index 028bb179c50e..000000000000 --- a/samples/matter/closure/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml +++ /dev/null @@ -1,52 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xA000 -mcuboot_pad: - address: 0xA000 - region: flash_primary - size: 0x800 -app: - address: 0xA800 - region: flash_primary - size: 0x125800 -mcuboot_primary: - address: 0xA000 - orig_span: &id001 - - app - - mcuboot_pad - region: flash_primary - size: 0x126000 - span: *id001 -mcuboot_primary_app: - address: 0xA800 - orig_span: &id002 - - app - region: flash_primary - size: 0x125800 - span: *id002 -mcuboot_secondary: - address: 0x130000 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: flash_primary - size: 0xC0000 - span: *id003 -mcuboot_secondary_pad: - region: flash_primary - address: 0x130000 - size: 0x800 -# Compression rate 34.75% -mcuboot_secondary_app: - region: flash_primary - address: 0x130800 - size: 0xBF800 -factory_data: - address: 0x1F0000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x1F1000 - region: flash_primary - size: 0xC000 diff --git a/samples/matter/closure/sample.yaml b/samples/matter/closure/sample.yaml index 39bee91904bc..41fc53132d2c 100644 --- a/samples/matter/closure/sample.yaml +++ b/samples/matter/closure/sample.yaml @@ -50,7 +50,6 @@ tests: extra_args: - FILE_SUFFIX=release - SB_CONFIG_BOOTLOADER_MCUBOOT=y - - SB_CONFIG_PARTITION_MANAGER=y - closure_SHIELD=nrf7002eb2 - SB_CONFIG_WIFI_NRF70=y integration_platforms: diff --git a/samples/matter/closure/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay b/samples/matter/closure/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay index 010476d7854a..5b524f95b37f 100644 --- a/samples/matter/closure/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay +++ b/samples/matter/closure/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay @@ -4,9 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { zephyr,code-partition = &boot_partition; - nordic,pm-ext-flash = &mx25r64; }; }; diff --git a/samples/matter/closure/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/matter/closure/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf index 05428a3e0cdc..58811f35b5c9 100644 --- a/samples/matter/closure/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/matter/closure/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -16,9 +16,6 @@ CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -# Adjust the maximum sectors to the app image size of ~1.4MB -CONFIG_BOOT_MAX_IMG_SECTORS=512 - # 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 diff --git a/samples/matter/closure/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/matter/closure/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay index 46808ccccb9b..d3f011b84e4d 100644 --- a/samples/matter/closure/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ b/samples/matter/closure/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -4,22 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ -&cpuapp_rram { - reg = <0x0 DT_SIZE_K(1524)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(256)>; - ranges = <0x0 0x20000000 0x40000>; -}; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/closure/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/matter/closure/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index eb809a84a9fa..d1441e73d412 100644 --- a/samples/matter/closure/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/matter/closure/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -14,9 +14,6 @@ CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -# Increase the maximum number of sectors to 512 to fit the big image size (> 1024 kB). -CONFIG_BOOT_MAX_IMG_SECTORS=512 - # 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 diff --git a/samples/matter/closure/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/closure/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay index d3283eaf69b0..daf6d05db823 100644 --- a/samples/matter/closure/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ b/samples/matter/closure/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -4,12 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/closure/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf b/samples/matter/closure/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf index 9010d99d03a8..209466d403e8 100644 --- a/samples/matter/closure/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf +++ b/samples/matter/closure/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf @@ -19,9 +19,6 @@ CONFIG_PRINTK=n CONFIG_SPI_NOR=n CONFIG_SPI=n -# Increase the maximum number of sectors to 512 to fit the big image size (> 1024 kB). -CONFIG_BOOT_MAX_IMG_SECTORS=512 - # 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 diff --git a/samples/matter/closure/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/closure/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay index 83134e23fd43..382ded6fba1d 100644 --- a/samples/matter/closure/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay +++ b/samples/matter/closure/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -4,10 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/* Disable the external flash, as it's not needed - * for the configuration with secondary slot residing - * in the internal RRAM. - */ -&mx25r64 { - status = "disabled"; +#include + +/ { + chosen { + zephyr,code-partition = &boot_partition; + }; }; diff --git a/samples/matter/closure/sysbuild_internal.conf b/samples/matter/closure/sysbuild_internal.conf index 08b5c767682e..56afbb967cf1 100644 --- a/samples/matter/closure/sysbuild_internal.conf +++ b/samples/matter/closure/sysbuild_internal.conf @@ -5,8 +5,6 @@ # SB_CONFIG_MATTER=y -SB_CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=n -SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=n # Enable the DFU image compression. SB_CONFIG_MCUBOOT_MODE_OVERWRITE_ONLY=y diff --git a/samples/matter/common/cmake/data_model.cmake b/samples/matter/common/cmake/data_model.cmake index 455b3d6c6fa0..ed597bff1a1a 100644 --- a/samples/matter/common/cmake/data_model.cmake +++ b/samples/matter/common/cmake/data_model.cmake @@ -4,12 +4,22 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # +string(CONFIGURE "${CONFIG_NCS_SAMPLE_MATTER_ZAP_FILE_PATH}" zap_file_path) +cmake_path(GET zap_file_path PARENT_PATH zap_parent_dir) + +# If we have a new app zap dir assigned we need to include zap parent dir to app target as well. +if(CONFIG_CHIP_APP_ZAP_DIR) + string(CONFIGURE "${CONFIG_CHIP_APP_ZAP_DIR}" app_zap_dir) + + # Override zap-generated directory. + get_filename_component(CHIP_APP_ZAP_DIR ${app_zap_dir} REALPATH CACHE) +else() + string(CONFIGURE "${zap_parent_dir}/zap-generated" app_zap_dir) +endif() + include(${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/src/app/chip_data_model.cmake) function(ncs_configure_data_model) - string(CONFIGURE "${CONFIG_NCS_SAMPLE_MATTER_ZAP_FILE_PATH}" zap_file_path) - cmake_path(GET zap_file_path PARENT_PATH zap_parent_dir) - cmake_parse_arguments(ARG "" "" "EXTERNAL_CLUSTERS" ${ARGN}) target_include_directories(matter-data-model @@ -19,7 +29,7 @@ function(ncs_configure_data_model) chip_configure_data_model(matter-data-model BYPASS_IDL - GEN_DIR ${zap_parent_dir}/zap-generated + GEN_DIR ${app_zap_dir} ZAP_FILE ${zap_file_path} EXTERNAL_CLUSTERS ${ARG_EXTERNAL_CLUSTERS} ) diff --git a/samples/matter/contact_sensor/Kconfig.sysbuild b/samples/matter/contact_sensor/Kconfig.sysbuild index be1d23576ade..9c56ae63e1ca 100644 --- a/samples/matter/contact_sensor/Kconfig.sysbuild +++ b/samples/matter/contact_sensor/Kconfig.sysbuild @@ -4,6 +4,10 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # +config PARTITION_MANAGER + default n if (SOC_SERIES_NRF52X || SOC_NRF54L10 || SOC_NRF54L15 || SOC_NRF54LM20A) && \ + !BOARD_IS_NON_SECURE + #### Radio core selection config NRF_DEFAULT_IPC_RADIO default y diff --git a/samples/matter/contact_sensor/boards/nrf52840dk_nrf52840.overlay b/samples/matter/contact_sensor/boards/nrf52840dk_nrf52840.overlay index 8e0d3447b4a4..08c3267ee229 100644 --- a/samples/matter/contact_sensor/boards/nrf52840dk_nrf52840.overlay +++ b/samples/matter/contact_sensor/boards/nrf52840dk_nrf52840.overlay @@ -4,31 +4,29 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; +#include /* Disable unused peripherals to reduce power consumption */ &adc { status = "disabled"; }; + &uart1 { status = "disabled"; }; + &i2c0 { status = "disabled"; }; -&pwm0 { - status = "disabled"; -}; + &spi1 { status = "disabled"; }; + &spi3 { status = "disabled"; }; + &usbd { status = "disabled"; }; diff --git a/samples/matter/contact_sensor/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/matter/contact_sensor/boards/nrf54l15dk_nrf54l15_cpuapp.overlay index 4f1550b4a4e0..a3884910d1bb 100644 --- a/samples/matter/contact_sensor/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ b/samples/matter/contact_sensor/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -4,37 +4,20 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include / { - 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(1524)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(256)>; - ranges = <0x0 0x20000000 0x40000>; -}; - /* TODO: re-enable HWFC once it's fixed */ &uart20 { /delete-property/ hw-flow-control; }; -&mx25r64 { - status = "okay"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/contact_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/contact_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay index 8cca9f006e46..5cd90012a43a 100644 --- a/samples/matter/contact_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ b/samples/matter/contact_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -4,21 +4,15 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; +#include +/ { aliases { /* Use watchdog wdt31 as the application watchdog */ watchdog0 = &wdt31; }; }; -&mx25r64 { - status = "okay"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/contact_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/contact_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay index f74cfaa63dd4..a48ee791aa22 100644 --- a/samples/matter/contact_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay +++ b/samples/matter/contact_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -4,6 +4,8 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { aliases { /* Use watchdog wdt31 as the application watchdog */ @@ -11,10 +13,6 @@ }; }; -&mx25r64 { - status = "disabled"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/contact_sensor/pm_static_nrf52840dk_nrf52840.yml b/samples/matter/contact_sensor/pm_static_nrf52840dk_nrf52840.yml deleted file mode 100644 index 9c4aa3cdcac6..000000000000 --- a/samples/matter/contact_sensor/pm_static_nrf52840dk_nrf52840.yml +++ /dev/null @@ -1,42 +0,0 @@ -mcuboot: - address: 0x0 - size: 0x7000 - region: flash_primary -mcuboot_pad: - address: 0x7000 - size: 0x200 -app: - address: 0x7200 - size: 0xefe00 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0x7000 - size: 0xf0000 - region: flash_primary -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0x7200 - size: 0xefe00 -factory_data: - address: 0xf7000 - size: 0x1000 - region: flash_primary -settings_storage: - address: 0xf8000 - size: 0x8000 - region: flash_primary -mcuboot_secondary: - address: 0x0 - size: 0xf0000 - device: MX25R64 - region: external_flash -external_flash: - address: 0xf0000 - size: 0x710000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/contact_sensor/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml b/samples/matter/contact_sensor/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml deleted file mode 100644 index a8e64916b893..000000000000 --- a/samples/matter/contact_sensor/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x800 -app: - address: 0xD800 - region: flash_primary - size: 0x164800 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0xD000 - region: flash_primary - size: 0x165000 -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0xD800 - region: flash_primary - size: 0x164800 -factory_data: - address: 0x172000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x173000 - region: flash_primary - size: 0xA000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0x165000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x800 -mcuboot_secondary_app: - region: external_flash - address: 0x800 - size: 0x164800 -external_flash: - address: 0x165000 - size: 0x69B000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/contact_sensor/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml b/samples/matter/contact_sensor/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml deleted file mode 100644 index 3e9051d5b84d..000000000000 --- a/samples/matter/contact_sensor/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x800 -app: - address: 0xD800 - region: flash_primary - size: 0x1E2800 -mcuboot_primary: - address: 0xD000 - orig_span: &id001 - - app - - mcuboot_pad - region: flash_primary - size: 0x1E3000 - span: *id001 -mcuboot_primary_app: - address: 0xD800 - orig_span: &id002 - - app - region: flash_primary - size: 0x1E2800 - span: *id002 -factory_data: - address: 0x1F0000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x1F1000 - region: flash_primary - size: 0xC000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0x1E3000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x800 -mcuboot_secondary_app: - region: external_flash - address: 0x800 - size: 0x1E2800 -external_flash: - address: 0x1E3000 - size: 0x5DB000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/contact_sensor/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml b/samples/matter/contact_sensor/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml deleted file mode 100644 index 028bb179c50e..000000000000 --- a/samples/matter/contact_sensor/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml +++ /dev/null @@ -1,52 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xA000 -mcuboot_pad: - address: 0xA000 - region: flash_primary - size: 0x800 -app: - address: 0xA800 - region: flash_primary - size: 0x125800 -mcuboot_primary: - address: 0xA000 - orig_span: &id001 - - app - - mcuboot_pad - region: flash_primary - size: 0x126000 - span: *id001 -mcuboot_primary_app: - address: 0xA800 - orig_span: &id002 - - app - region: flash_primary - size: 0x125800 - span: *id002 -mcuboot_secondary: - address: 0x130000 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: flash_primary - size: 0xC0000 - span: *id003 -mcuboot_secondary_pad: - region: flash_primary - address: 0x130000 - size: 0x800 -# Compression rate 34.75% -mcuboot_secondary_app: - region: flash_primary - address: 0x130800 - size: 0xBF800 -factory_data: - address: 0x1F0000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x1F1000 - region: flash_primary - size: 0xC000 diff --git a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay index 010476d7854a..5b524f95b37f 100644 --- a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay +++ b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay @@ -4,9 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { zephyr,code-partition = &boot_partition; - nordic,pm-ext-flash = &mx25r64; }; }; diff --git a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf index 05428a3e0cdc..58811f35b5c9 100644 --- a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -16,9 +16,6 @@ CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -# Adjust the maximum sectors to the app image size of ~1.4MB -CONFIG_BOOT_MAX_IMG_SECTORS=512 - # 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 diff --git a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay index 46808ccccb9b..d3f011b84e4d 100644 --- a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -4,22 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ -&cpuapp_rram { - reg = <0x0 DT_SIZE_K(1524)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(256)>; - ranges = <0x0 0x20000000 0x40000>; -}; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index eb809a84a9fa..d1441e73d412 100644 --- a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -14,9 +14,6 @@ CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -# Increase the maximum number of sectors to 512 to fit the big image size (> 1024 kB). -CONFIG_BOOT_MAX_IMG_SECTORS=512 - # 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 diff --git a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay index d3283eaf69b0..daf6d05db823 100644 --- a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -4,12 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay index 83134e23fd43..382ded6fba1d 100644 --- a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay +++ b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -4,10 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/* Disable the external flash, as it's not needed - * for the configuration with secondary slot residing - * in the internal RRAM. - */ -&mx25r64 { - status = "disabled"; +#include + +/ { + chosen { + zephyr,code-partition = &boot_partition; + }; }; diff --git a/samples/matter/contact_sensor/sysbuild_internal.conf b/samples/matter/contact_sensor/sysbuild_internal.conf index 08b5c767682e..56afbb967cf1 100644 --- a/samples/matter/contact_sensor/sysbuild_internal.conf +++ b/samples/matter/contact_sensor/sysbuild_internal.conf @@ -5,8 +5,6 @@ # SB_CONFIG_MATTER=y -SB_CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=n -SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=n # Enable the DFU image compression. SB_CONFIG_MCUBOOT_MODE_OVERWRITE_ONLY=y diff --git a/samples/matter/light_bulb/CMakeLists.txt b/samples/matter/light_bulb/CMakeLists.txt index 5763a8483f7f..2f5e0350be9a 100644 --- a/samples/matter/light_bulb/CMakeLists.txt +++ b/samples/matter/light_bulb/CMakeLists.txt @@ -37,7 +37,7 @@ target_sources(app PRIVATE src/app_task.cpp src/main.cpp src/zcl_callbacks.cpp - ${CHIP_ROOT}/src/app/persistence/DeferredAttributePersistenceProvider.cpp + ${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/src/app/persistence/DeferredAttributePersistenceProvider.cpp ) ncs_configure_data_model() diff --git a/samples/matter/light_bulb/Kconfig.sysbuild b/samples/matter/light_bulb/Kconfig.sysbuild index ca3f9bf89f78..dc25245fb2d0 100644 --- a/samples/matter/light_bulb/Kconfig.sysbuild +++ b/samples/matter/light_bulb/Kconfig.sysbuild @@ -4,6 +4,10 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # +config PARTITION_MANAGER + default n if (SOC_SERIES_NRF52X || SOC_NRF54L10 || SOC_NRF54L15 || SOC_NRF54LM20A) && \ + !BOARD_IS_NON_SECURE + # This config has to be enabled manually for variants with shields, because sysbuild does not support it. config WIFI_NRF70 default y if BOARD_NRF7002DK diff --git a/samples/matter/light_bulb/boards/nrf52840dk_nrf52840.overlay b/samples/matter/light_bulb/boards/nrf52840dk_nrf52840.overlay index 09f0149e5013..ebc259ca0e64 100644 --- a/samples/matter/light_bulb/boards/nrf52840dk_nrf52840.overlay +++ b/samples/matter/light_bulb/boards/nrf52840dk_nrf52840.overlay @@ -4,11 +4,9 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; +#include +/ { /* * By default, PWM module is only configured for led0 (LED1 on the board). * The light bulb app, however, uses LED2 to show the state of the lighting, @@ -53,18 +51,23 @@ &adc { status = "disabled"; }; + &uart1 { status = "disabled"; }; + &i2c0 { status = "disabled"; }; + &spi1 { status = "disabled"; }; + &spi3 { status = "disabled"; }; + &usbd { status = "disabled"; }; diff --git a/samples/matter/light_bulb/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/matter/light_bulb/boards/nrf54l15dk_nrf54l15_cpuapp.overlay index 0c2620d72f23..2b98052f9e50 100644 --- a/samples/matter/light_bulb/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ b/samples/matter/light_bulb/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -4,12 +4,9 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include / { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; - aliases { /* Configure PWM module for led1 (LED2 on the board) */ pwm-led1 = &pwm_led1; @@ -26,25 +23,11 @@ }; }; -/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ -&cpuapp_rram { - reg = <0x0 DT_SIZE_K(1524)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(256)>; - ranges = <0x0 0x20000000 0x40000>; -}; - /* TODO: re-enable HWFC once it's fixed */ &uart20 { /delete-property/ hw-flow-control; }; -&mx25r64 { - status = "okay"; -}; - &pwm20 { status = "okay"; pinctrl-0 = <&pwm_default>; diff --git a/samples/matter/light_bulb/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/light_bulb/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay index e1089210957f..72ac6a844a01 100644 --- a/samples/matter/light_bulb/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ b/samples/matter/light_bulb/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -4,11 +4,9 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; +#include +/ { aliases { /* Configure PWM module for led1 (LED2 on the board) */ pwm-led1 = &pwm_led1; @@ -19,6 +17,7 @@ pwmleds { compatible = "pwm-leds"; + pwm_led1: pwm_led_1 { pwms = <&pwm20 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; }; @@ -38,6 +37,7 @@ psels = ; }; }; + pwm_sleep: pwm_sleep { group1 { psels = ; @@ -46,10 +46,6 @@ }; }; -&mx25r64 { - status = "okay"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/light_bulb/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/light_bulb/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay index 9b15c4175de6..9861d9680e9c 100644 --- a/samples/matter/light_bulb/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay +++ b/samples/matter/light_bulb/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -4,6 +4,8 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { aliases { /* Configure PWM module for led1 (LED2 on the board) */ @@ -15,6 +17,7 @@ pwmleds { compatible = "pwm-leds"; + pwm_led1: pwm_led_1 { pwms = <&pwm20 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; }; @@ -34,6 +37,7 @@ psels = ; }; }; + pwm_sleep: pwm_sleep { group1 { psels = ; @@ -42,10 +46,6 @@ }; }; -&mx25r64 { - status = "disabled"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/light_bulb/pm_static_nrf52840dk_nrf52840.yml b/samples/matter/light_bulb/pm_static_nrf52840dk_nrf52840.yml deleted file mode 100644 index 9c4aa3cdcac6..000000000000 --- a/samples/matter/light_bulb/pm_static_nrf52840dk_nrf52840.yml +++ /dev/null @@ -1,42 +0,0 @@ -mcuboot: - address: 0x0 - size: 0x7000 - region: flash_primary -mcuboot_pad: - address: 0x7000 - size: 0x200 -app: - address: 0x7200 - size: 0xefe00 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0x7000 - size: 0xf0000 - region: flash_primary -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0x7200 - size: 0xefe00 -factory_data: - address: 0xf7000 - size: 0x1000 - region: flash_primary -settings_storage: - address: 0xf8000 - size: 0x8000 - region: flash_primary -mcuboot_secondary: - address: 0x0 - size: 0xf0000 - device: MX25R64 - region: external_flash -external_flash: - address: 0xf0000 - size: 0x710000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/light_bulb/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml b/samples/matter/light_bulb/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml deleted file mode 100644 index a8e64916b893..000000000000 --- a/samples/matter/light_bulb/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x800 -app: - address: 0xD800 - region: flash_primary - size: 0x164800 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0xD000 - region: flash_primary - size: 0x165000 -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0xD800 - region: flash_primary - size: 0x164800 -factory_data: - address: 0x172000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x173000 - region: flash_primary - size: 0xA000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0x165000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x800 -mcuboot_secondary_app: - region: external_flash - address: 0x800 - size: 0x164800 -external_flash: - address: 0x165000 - size: 0x69B000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/light_bulb/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml b/samples/matter/light_bulb/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml deleted file mode 100644 index 3e9051d5b84d..000000000000 --- a/samples/matter/light_bulb/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x800 -app: - address: 0xD800 - region: flash_primary - size: 0x1E2800 -mcuboot_primary: - address: 0xD000 - orig_span: &id001 - - app - - mcuboot_pad - region: flash_primary - size: 0x1E3000 - span: *id001 -mcuboot_primary_app: - address: 0xD800 - orig_span: &id002 - - app - region: flash_primary - size: 0x1E2800 - span: *id002 -factory_data: - address: 0x1F0000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x1F1000 - region: flash_primary - size: 0xC000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0x1E3000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x800 -mcuboot_secondary_app: - region: external_flash - address: 0x800 - size: 0x1E2800 -external_flash: - address: 0x1E3000 - size: 0x5DB000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/light_bulb/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml b/samples/matter/light_bulb/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml deleted file mode 100644 index 028bb179c50e..000000000000 --- a/samples/matter/light_bulb/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml +++ /dev/null @@ -1,52 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xA000 -mcuboot_pad: - address: 0xA000 - region: flash_primary - size: 0x800 -app: - address: 0xA800 - region: flash_primary - size: 0x125800 -mcuboot_primary: - address: 0xA000 - orig_span: &id001 - - app - - mcuboot_pad - region: flash_primary - size: 0x126000 - span: *id001 -mcuboot_primary_app: - address: 0xA800 - orig_span: &id002 - - app - region: flash_primary - size: 0x125800 - span: *id002 -mcuboot_secondary: - address: 0x130000 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: flash_primary - size: 0xC0000 - span: *id003 -mcuboot_secondary_pad: - region: flash_primary - address: 0x130000 - size: 0x800 -# Compression rate 34.75% -mcuboot_secondary_app: - region: flash_primary - address: 0x130800 - size: 0xBF800 -factory_data: - address: 0x1F0000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x1F1000 - region: flash_primary - size: 0xC000 diff --git a/samples/matter/light_bulb/sample.yaml b/samples/matter/light_bulb/sample.yaml index 2f7ddf1c5193..41670e80ce23 100644 --- a/samples/matter/light_bulb/sample.yaml +++ b/samples/matter/light_bulb/sample.yaml @@ -39,7 +39,6 @@ tests: extra_args: - FILE_SUFFIX=release - SB_CONFIG_BOOTLOADER_MCUBOOT=y - - SB_CONFIG_PARTITION_MANAGER=y integration_platforms: - nrf52840dk/nrf52840 - nrf5340dk/nrf5340/cpuapp @@ -58,7 +57,6 @@ tests: extra_args: - FILE_SUFFIX=release - SB_CONFIG_BOOTLOADER_MCUBOOT=y - - SB_CONFIG_PARTITION_MANAGER=y - light_bulb_SHIELD=nrf7002eb2 - SB_CONFIG_WIFI_NRF70=y integration_platforms: diff --git a/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay b/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay index 6ea64210d733..91e2a415c6fb 100644 --- a/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay +++ b/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay @@ -4,9 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { zephyr,code-partition = &boot_partition; - nordic,pm-ext-flash = &mx25r64; }; }; diff --git a/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf index d204a2c0f7b4..aefa3107e579 100644 --- a/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -16,9 +16,6 @@ CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -# Adjust the maximum sectors to the app image size of ~1.4MB -CONFIG_BOOT_MAX_IMG_SECTORS=512 - # 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 diff --git a/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay index 87fb59e21ec8..cce7b792038f 100644 --- a/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ b/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -4,22 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ -&cpuapp_rram { - reg = <0x0 DT_SIZE_K(1524)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(256)>; - ranges = <0x0 0x20000000 0x40000>; -}; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index eb809a84a9fa..d1441e73d412 100644 --- a/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -14,9 +14,6 @@ CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -# Increase the maximum number of sectors to 512 to fit the big image size (> 1024 kB). -CONFIG_BOOT_MAX_IMG_SECTORS=512 - # 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 diff --git a/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay index d3283eaf69b0..daf6d05db823 100644 --- a/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ b/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -4,12 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay index 83134e23fd43..382ded6fba1d 100644 --- a/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay +++ b/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -4,10 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/* Disable the external flash, as it's not needed - * for the configuration with secondary slot residing - * in the internal RRAM. - */ -&mx25r64 { - status = "disabled"; +#include + +/ { + chosen { + zephyr,code-partition = &boot_partition; + }; }; diff --git a/samples/matter/light_bulb/sysbuild_internal.conf b/samples/matter/light_bulb/sysbuild_internal.conf index ea4e5b8487f1..abe76391acd9 100644 --- a/samples/matter/light_bulb/sysbuild_internal.conf +++ b/samples/matter/light_bulb/sysbuild_internal.conf @@ -5,8 +5,6 @@ # SB_CONFIG_MATTER=y -SB_CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=n -SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=n # Enable the DFU image compression. SB_CONFIG_MCUBOOT_MODE_OVERWRITE_ONLY=y diff --git a/samples/matter/light_switch/Kconfig.sysbuild b/samples/matter/light_switch/Kconfig.sysbuild index 78e7e6ea4ff0..ea3ba1f7fdcd 100644 --- a/samples/matter/light_switch/Kconfig.sysbuild +++ b/samples/matter/light_switch/Kconfig.sysbuild @@ -4,6 +4,10 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # +config PARTITION_MANAGER + default n if (SOC_SERIES_NRF52X || SOC_NRF54L10 || SOC_NRF54L15 || SOC_NRF54LM20A) && \ + !BOARD_IS_NON_SECURE + # This config has to be enabled manually for variants with shields, because sysbuild does not support it. config WIFI_NRF70 default y if BOARD_NRF7002DK diff --git a/samples/matter/light_switch/boards/nrf52840dk_nrf52840.overlay b/samples/matter/light_switch/boards/nrf52840dk_nrf52840.overlay index 5285b0300c95..08c3267ee229 100644 --- a/samples/matter/light_switch/boards/nrf52840dk_nrf52840.overlay +++ b/samples/matter/light_switch/boards/nrf52840dk_nrf52840.overlay @@ -1,34 +1,32 @@ /* - * Copyright (c) 2021 Nordic Semiconductor ASA + * Copyright (c) 2025 Nordic Semiconductor ASA * * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; +#include /* Disable unused peripherals to reduce power consumption */ &adc { status = "disabled"; }; + &uart1 { status = "disabled"; }; + &i2c0 { status = "disabled"; }; -&pwm0 { - status = "disabled"; -}; + &spi1 { status = "disabled"; }; + &spi3 { status = "disabled"; }; + &usbd { status = "disabled"; }; diff --git a/samples/matter/light_switch/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/matter/light_switch/boards/nrf54l15dk_nrf54l15_cpuapp.overlay index f3e12b04c0bf..bd0121a069e6 100644 --- a/samples/matter/light_switch/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ b/samples/matter/light_switch/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -4,25 +4,13 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { 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(1524)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(256)>; - ranges = <0x0 0x20000000 0x40000>; }; /* TODO: re-enable HWFC once it's fixed */ @@ -30,10 +18,6 @@ /delete-property/ hw-flow-control; }; -&mx25r64 { - status = "okay"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/light_switch/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/light_switch/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay index 8cca9f006e46..5cd90012a43a 100644 --- a/samples/matter/light_switch/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ b/samples/matter/light_switch/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -4,21 +4,15 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; +#include +/ { aliases { /* Use watchdog wdt31 as the application watchdog */ watchdog0 = &wdt31; }; }; -&mx25r64 { - status = "okay"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/light_switch/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/light_switch/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay index f74cfaa63dd4..a48ee791aa22 100644 --- a/samples/matter/light_switch/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay +++ b/samples/matter/light_switch/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -4,6 +4,8 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { aliases { /* Use watchdog wdt31 as the application watchdog */ @@ -11,10 +13,6 @@ }; }; -&mx25r64 { - status = "disabled"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/light_switch/pm_static_nrf52840dk_nrf52840.yml b/samples/matter/light_switch/pm_static_nrf52840dk_nrf52840.yml deleted file mode 100644 index 9c4aa3cdcac6..000000000000 --- a/samples/matter/light_switch/pm_static_nrf52840dk_nrf52840.yml +++ /dev/null @@ -1,42 +0,0 @@ -mcuboot: - address: 0x0 - size: 0x7000 - region: flash_primary -mcuboot_pad: - address: 0x7000 - size: 0x200 -app: - address: 0x7200 - size: 0xefe00 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0x7000 - size: 0xf0000 - region: flash_primary -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0x7200 - size: 0xefe00 -factory_data: - address: 0xf7000 - size: 0x1000 - region: flash_primary -settings_storage: - address: 0xf8000 - size: 0x8000 - region: flash_primary -mcuboot_secondary: - address: 0x0 - size: 0xf0000 - device: MX25R64 - region: external_flash -external_flash: - address: 0xf0000 - size: 0x710000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/light_switch/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml b/samples/matter/light_switch/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml deleted file mode 100644 index a8e64916b893..000000000000 --- a/samples/matter/light_switch/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x800 -app: - address: 0xD800 - region: flash_primary - size: 0x164800 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0xD000 - region: flash_primary - size: 0x165000 -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0xD800 - region: flash_primary - size: 0x164800 -factory_data: - address: 0x172000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x173000 - region: flash_primary - size: 0xA000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0x165000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x800 -mcuboot_secondary_app: - region: external_flash - address: 0x800 - size: 0x164800 -external_flash: - address: 0x165000 - size: 0x69B000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/light_switch/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml b/samples/matter/light_switch/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml deleted file mode 100644 index 3e9051d5b84d..000000000000 --- a/samples/matter/light_switch/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x800 -app: - address: 0xD800 - region: flash_primary - size: 0x1E2800 -mcuboot_primary: - address: 0xD000 - orig_span: &id001 - - app - - mcuboot_pad - region: flash_primary - size: 0x1E3000 - span: *id001 -mcuboot_primary_app: - address: 0xD800 - orig_span: &id002 - - app - region: flash_primary - size: 0x1E2800 - span: *id002 -factory_data: - address: 0x1F0000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x1F1000 - region: flash_primary - size: 0xC000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0x1E3000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x800 -mcuboot_secondary_app: - region: external_flash - address: 0x800 - size: 0x1E2800 -external_flash: - address: 0x1E3000 - size: 0x5DB000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/light_switch/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml b/samples/matter/light_switch/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml deleted file mode 100644 index 028bb179c50e..000000000000 --- a/samples/matter/light_switch/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml +++ /dev/null @@ -1,52 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xA000 -mcuboot_pad: - address: 0xA000 - region: flash_primary - size: 0x800 -app: - address: 0xA800 - region: flash_primary - size: 0x125800 -mcuboot_primary: - address: 0xA000 - orig_span: &id001 - - app - - mcuboot_pad - region: flash_primary - size: 0x126000 - span: *id001 -mcuboot_primary_app: - address: 0xA800 - orig_span: &id002 - - app - region: flash_primary - size: 0x125800 - span: *id002 -mcuboot_secondary: - address: 0x130000 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: flash_primary - size: 0xC0000 - span: *id003 -mcuboot_secondary_pad: - region: flash_primary - address: 0x130000 - size: 0x800 -# Compression rate 34.75% -mcuboot_secondary_app: - region: flash_primary - address: 0x130800 - size: 0xBF800 -factory_data: - address: 0x1F0000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x1F1000 - region: flash_primary - size: 0xC000 diff --git a/samples/matter/light_switch/sample.yaml b/samples/matter/light_switch/sample.yaml index 8bd7d3b2dc0c..0fe2bab4578f 100644 --- a/samples/matter/light_switch/sample.yaml +++ b/samples/matter/light_switch/sample.yaml @@ -39,7 +39,6 @@ tests: extra_args: - FILE_SUFFIX=release - SB_CONFIG_BOOTLOADER_MCUBOOT=y - - SB_CONFIG_PARTITION_MANAGER=y integration_platforms: - nrf52840dk/nrf52840 - nrf5340dk/nrf5340/cpuapp @@ -58,7 +57,6 @@ tests: extra_args: - FILE_SUFFIX=release - SB_CONFIG_BOOTLOADER_MCUBOOT=y - - SB_CONFIG_PARTITION_MANAGER=y - light_switch_SHIELD=nrf7002eb2 - SB_CONFIG_WIFI_NRF70=y integration_platforms: diff --git a/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay b/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay index 6ea64210d733..91e2a415c6fb 100644 --- a/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay +++ b/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay @@ -4,9 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { zephyr,code-partition = &boot_partition; - nordic,pm-ext-flash = &mx25r64; }; }; diff --git a/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf index d204a2c0f7b4..aefa3107e579 100644 --- a/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -16,9 +16,6 @@ CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -# Adjust the maximum sectors to the app image size of ~1.4MB -CONFIG_BOOT_MAX_IMG_SECTORS=512 - # 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 diff --git a/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay index 87fb59e21ec8..cce7b792038f 100644 --- a/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ b/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -4,22 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ -&cpuapp_rram { - reg = <0x0 DT_SIZE_K(1524)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(256)>; - ranges = <0x0 0x20000000 0x40000>; -}; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index eb809a84a9fa..d1441e73d412 100644 --- a/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -14,9 +14,6 @@ CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -# Increase the maximum number of sectors to 512 to fit the big image size (> 1024 kB). -CONFIG_BOOT_MAX_IMG_SECTORS=512 - # 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 diff --git a/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay index d3283eaf69b0..daf6d05db823 100644 --- a/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ b/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -4,12 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay index 83134e23fd43..382ded6fba1d 100644 --- a/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay +++ b/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -4,10 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/* Disable the external flash, as it's not needed - * for the configuration with secondary slot residing - * in the internal RRAM. - */ -&mx25r64 { - status = "disabled"; +#include + +/ { + chosen { + zephyr,code-partition = &boot_partition; + }; }; diff --git a/samples/matter/light_switch/sysbuild_internal.conf b/samples/matter/light_switch/sysbuild_internal.conf index ea4e5b8487f1..abe76391acd9 100644 --- a/samples/matter/light_switch/sysbuild_internal.conf +++ b/samples/matter/light_switch/sysbuild_internal.conf @@ -5,8 +5,6 @@ # SB_CONFIG_MATTER=y -SB_CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=n -SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=n # Enable the DFU image compression. SB_CONFIG_MCUBOOT_MODE_OVERWRITE_ONLY=y diff --git a/samples/matter/lock/Kconfig.sysbuild b/samples/matter/lock/Kconfig.sysbuild index 78e7e6ea4ff0..ea3ba1f7fdcd 100644 --- a/samples/matter/lock/Kconfig.sysbuild +++ b/samples/matter/lock/Kconfig.sysbuild @@ -4,6 +4,10 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # +config PARTITION_MANAGER + default n if (SOC_SERIES_NRF52X || SOC_NRF54L10 || SOC_NRF54L15 || SOC_NRF54LM20A) && \ + !BOARD_IS_NON_SECURE + # This config has to be enabled manually for variants with shields, because sysbuild does not support it. config WIFI_NRF70 default y if BOARD_NRF7002DK diff --git a/samples/matter/lock/boards/nrf52840dk_nrf52840.overlay b/samples/matter/lock/boards/nrf52840dk_nrf52840.overlay index 5285b0300c95..08c3267ee229 100644 --- a/samples/matter/lock/boards/nrf52840dk_nrf52840.overlay +++ b/samples/matter/lock/boards/nrf52840dk_nrf52840.overlay @@ -1,34 +1,32 @@ /* - * Copyright (c) 2021 Nordic Semiconductor ASA + * Copyright (c) 2025 Nordic Semiconductor ASA * * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; +#include /* Disable unused peripherals to reduce power consumption */ &adc { status = "disabled"; }; + &uart1 { status = "disabled"; }; + &i2c0 { status = "disabled"; }; -&pwm0 { - status = "disabled"; -}; + &spi1 { status = "disabled"; }; + &spi3 { status = "disabled"; }; + &usbd { status = "disabled"; }; diff --git a/samples/matter/lock/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/matter/lock/boards/nrf54l15dk_nrf54l15_cpuapp.overlay index f3e12b04c0bf..bd0121a069e6 100644 --- a/samples/matter/lock/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ b/samples/matter/lock/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -4,25 +4,13 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { 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(1524)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(256)>; - ranges = <0x0 0x20000000 0x40000>; }; /* TODO: re-enable HWFC once it's fixed */ @@ -30,10 +18,6 @@ /delete-property/ hw-flow-control; }; -&mx25r64 { - status = "okay"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/lock/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/lock/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay index 8cca9f006e46..5cd90012a43a 100644 --- a/samples/matter/lock/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ b/samples/matter/lock/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -4,21 +4,15 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; +#include +/ { aliases { /* Use watchdog wdt31 as the application watchdog */ watchdog0 = &wdt31; }; }; -&mx25r64 { - status = "okay"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/lock/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/lock/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay index f74cfaa63dd4..a48ee791aa22 100644 --- a/samples/matter/lock/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay +++ b/samples/matter/lock/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -4,6 +4,8 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { aliases { /* Use watchdog wdt31 as the application watchdog */ @@ -11,10 +13,6 @@ }; }; -&mx25r64 { - status = "disabled"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/lock/pm_static_nrf52840dk_nrf52840.yml b/samples/matter/lock/pm_static_nrf52840dk_nrf52840.yml deleted file mode 100644 index 9c4aa3cdcac6..000000000000 --- a/samples/matter/lock/pm_static_nrf52840dk_nrf52840.yml +++ /dev/null @@ -1,42 +0,0 @@ -mcuboot: - address: 0x0 - size: 0x7000 - region: flash_primary -mcuboot_pad: - address: 0x7000 - size: 0x200 -app: - address: 0x7200 - size: 0xefe00 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0x7000 - size: 0xf0000 - region: flash_primary -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0x7200 - size: 0xefe00 -factory_data: - address: 0xf7000 - size: 0x1000 - region: flash_primary -settings_storage: - address: 0xf8000 - size: 0x8000 - region: flash_primary -mcuboot_secondary: - address: 0x0 - size: 0xf0000 - device: MX25R64 - region: external_flash -external_flash: - address: 0xf0000 - size: 0x710000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/lock/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml b/samples/matter/lock/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml deleted file mode 100644 index a8e64916b893..000000000000 --- a/samples/matter/lock/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x800 -app: - address: 0xD800 - region: flash_primary - size: 0x164800 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0xD000 - region: flash_primary - size: 0x165000 -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0xD800 - region: flash_primary - size: 0x164800 -factory_data: - address: 0x172000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x173000 - region: flash_primary - size: 0xA000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0x165000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x800 -mcuboot_secondary_app: - region: external_flash - address: 0x800 - size: 0x164800 -external_flash: - address: 0x165000 - size: 0x69B000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/lock/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml b/samples/matter/lock/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml deleted file mode 100644 index 3e9051d5b84d..000000000000 --- a/samples/matter/lock/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x800 -app: - address: 0xD800 - region: flash_primary - size: 0x1E2800 -mcuboot_primary: - address: 0xD000 - orig_span: &id001 - - app - - mcuboot_pad - region: flash_primary - size: 0x1E3000 - span: *id001 -mcuboot_primary_app: - address: 0xD800 - orig_span: &id002 - - app - region: flash_primary - size: 0x1E2800 - span: *id002 -factory_data: - address: 0x1F0000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x1F1000 - region: flash_primary - size: 0xC000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0x1E3000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x800 -mcuboot_secondary_app: - region: external_flash - address: 0x800 - size: 0x1E2800 -external_flash: - address: 0x1E3000 - size: 0x5DB000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/lock/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml b/samples/matter/lock/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml deleted file mode 100644 index 028bb179c50e..000000000000 --- a/samples/matter/lock/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml +++ /dev/null @@ -1,52 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xA000 -mcuboot_pad: - address: 0xA000 - region: flash_primary - size: 0x800 -app: - address: 0xA800 - region: flash_primary - size: 0x125800 -mcuboot_primary: - address: 0xA000 - orig_span: &id001 - - app - - mcuboot_pad - region: flash_primary - size: 0x126000 - span: *id001 -mcuboot_primary_app: - address: 0xA800 - orig_span: &id002 - - app - region: flash_primary - size: 0x125800 - span: *id002 -mcuboot_secondary: - address: 0x130000 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: flash_primary - size: 0xC0000 - span: *id003 -mcuboot_secondary_pad: - region: flash_primary - address: 0x130000 - size: 0x800 -# Compression rate 34.75% -mcuboot_secondary_app: - region: flash_primary - address: 0x130800 - size: 0xBF800 -factory_data: - address: 0x1F0000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x1F1000 - region: flash_primary - size: 0xC000 diff --git a/samples/matter/lock/sample.yaml b/samples/matter/lock/sample.yaml index 7698f288fac1..9f8f19706912 100644 --- a/samples/matter/lock/sample.yaml +++ b/samples/matter/lock/sample.yaml @@ -60,7 +60,6 @@ tests: extra_args: - FILE_SUFFIX=release - SB_CONFIG_BOOTLOADER_MCUBOOT=y - - SB_CONFIG_PARTITION_MANAGER=y - lock_SHIELD=nrf7002eb2 - SB_CONFIG_WIFI_NRF70=y integration_platforms: diff --git a/samples/matter/lock/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay b/samples/matter/lock/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay index 6ea64210d733..91e2a415c6fb 100644 --- a/samples/matter/lock/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay +++ b/samples/matter/lock/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay @@ -4,9 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { zephyr,code-partition = &boot_partition; - nordic,pm-ext-flash = &mx25r64; }; }; diff --git a/samples/matter/lock/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/matter/lock/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf index d204a2c0f7b4..aefa3107e579 100644 --- a/samples/matter/lock/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/matter/lock/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -16,9 +16,6 @@ CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -# Adjust the maximum sectors to the app image size of ~1.4MB -CONFIG_BOOT_MAX_IMG_SECTORS=512 - # 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 diff --git a/samples/matter/lock/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/matter/lock/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay index 87fb59e21ec8..cce7b792038f 100644 --- a/samples/matter/lock/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ b/samples/matter/lock/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -4,22 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ -&cpuapp_rram { - reg = <0x0 DT_SIZE_K(1524)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(256)>; - ranges = <0x0 0x20000000 0x40000>; -}; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/lock/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/matter/lock/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index eb809a84a9fa..d1441e73d412 100644 --- a/samples/matter/lock/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/matter/lock/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -14,9 +14,6 @@ CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -# Increase the maximum number of sectors to 512 to fit the big image size (> 1024 kB). -CONFIG_BOOT_MAX_IMG_SECTORS=512 - # 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 diff --git a/samples/matter/lock/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/lock/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay index d3283eaf69b0..daf6d05db823 100644 --- a/samples/matter/lock/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ b/samples/matter/lock/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -4,12 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/lock/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/lock/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay index 83134e23fd43..382ded6fba1d 100644 --- a/samples/matter/lock/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay +++ b/samples/matter/lock/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -4,10 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/* Disable the external flash, as it's not needed - * for the configuration with secondary slot residing - * in the internal RRAM. - */ -&mx25r64 { - status = "disabled"; +#include + +/ { + chosen { + zephyr,code-partition = &boot_partition; + }; }; diff --git a/samples/matter/lock/sysbuild_internal.conf b/samples/matter/lock/sysbuild_internal.conf index ea4e5b8487f1..abe76391acd9 100644 --- a/samples/matter/lock/sysbuild_internal.conf +++ b/samples/matter/lock/sysbuild_internal.conf @@ -5,8 +5,6 @@ # SB_CONFIG_MATTER=y -SB_CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=n -SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=n # Enable the DFU image compression. SB_CONFIG_MCUBOOT_MODE_OVERWRITE_ONLY=y diff --git a/samples/matter/manufacturer_specific/CMakeLists.txt b/samples/matter/manufacturer_specific/CMakeLists.txt index db62accb83b9..02b005949c09 100644 --- a/samples/matter/manufacturer_specific/CMakeLists.txt +++ b/samples/matter/manufacturer_specific/CMakeLists.txt @@ -13,9 +13,6 @@ project(matter-manufacturer_specific) include(${ZEPHYR_NRF_MODULE_DIR}/samples/matter/common/cmake/zap_helpers.cmake) ncs_get_zap_parent_dir(ZAP_PARENT_DIR) -# Override zap-generated directory. -get_filename_component(CHIP_APP_ZAP_DIR ${ZAP_PARENT_DIR}/zap-generated REALPATH CACHE) - # Enable GNU STD support. include(${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/config/nrfconnect/app/enable-gnu-std.cmake) diff --git a/samples/matter/manufacturer_specific/Kconfig.sysbuild b/samples/matter/manufacturer_specific/Kconfig.sysbuild index 0518de50aaa0..3d3277233f9c 100644 --- a/samples/matter/manufacturer_specific/Kconfig.sysbuild +++ b/samples/matter/manufacturer_specific/Kconfig.sysbuild @@ -4,6 +4,10 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # +config PARTITION_MANAGER + default n if (SOC_SERIES_NRF52X || SOC_NRF54L10 || SOC_NRF54L15 || SOC_NRF54LM20A) && \ + !BOARD_IS_NON_SECURE + # This config has to be enabled manually for variants with shields, because sysbuild does not support it. config WIFI_NRF70 default y if BOARD_NRF7002DK diff --git a/samples/matter/manufacturer_specific/boards/nrf52840dk_nrf52840.overlay b/samples/matter/manufacturer_specific/boards/nrf52840dk_nrf52840.overlay index 8e0d3447b4a4..08c3267ee229 100644 --- a/samples/matter/manufacturer_specific/boards/nrf52840dk_nrf52840.overlay +++ b/samples/matter/manufacturer_specific/boards/nrf52840dk_nrf52840.overlay @@ -4,31 +4,29 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; +#include /* Disable unused peripherals to reduce power consumption */ &adc { status = "disabled"; }; + &uart1 { status = "disabled"; }; + &i2c0 { status = "disabled"; }; -&pwm0 { - status = "disabled"; -}; + &spi1 { status = "disabled"; }; + &spi3 { status = "disabled"; }; + &usbd { status = "disabled"; }; diff --git a/samples/matter/manufacturer_specific/boards/nrf54l15dk_nrf54l10_cpuapp.overlay b/samples/matter/manufacturer_specific/boards/nrf54l15dk_nrf54l10_cpuapp.overlay index 168b30eb48c3..c102b714472d 100644 --- a/samples/matter/manufacturer_specific/boards/nrf54l15dk_nrf54l10_cpuapp.overlay +++ b/samples/matter/manufacturer_specific/boards/nrf54l15dk_nrf54l10_cpuapp.overlay @@ -4,25 +4,13 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { 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(1012)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(192)>; - ranges = <0x0 0x20000000 DT_SIZE_K(192)>; }; /* TODO: re-enable HWFC once it's fixed */ @@ -30,10 +18,6 @@ /delete-property/ hw-flow-control; }; -&mx25r64 { - status = "okay"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/manufacturer_specific/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/matter/manufacturer_specific/boards/nrf54l15dk_nrf54l15_cpuapp.overlay index a0bf77816d4e..279250cb748d 100644 --- a/samples/matter/manufacturer_specific/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ b/samples/matter/manufacturer_specific/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -4,6 +4,8 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { aliases { /* Use watchdog wdt31 as the application watchdog */ @@ -11,29 +13,15 @@ }; chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &slot0_partition; }; }; -/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ -&cpuapp_rram { - reg = <0x0 DT_SIZE_K(1524)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(256)>; - ranges = <0x0 0x20000000 0x40000>; -}; - /* TODO: re-enable HWFC once it's fixed */ &uart20 { /delete-property/ hw-flow-control; }; -&mx25r64 { - status = "okay"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/manufacturer_specific/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/manufacturer_specific/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay index 8cca9f006e46..5cd90012a43a 100644 --- a/samples/matter/manufacturer_specific/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ b/samples/matter/manufacturer_specific/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -4,21 +4,15 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; +#include +/ { aliases { /* Use watchdog wdt31 as the application watchdog */ watchdog0 = &wdt31; }; }; -&mx25r64 { - status = "okay"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/manufacturer_specific/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/manufacturer_specific/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay index f74cfaa63dd4..a48ee791aa22 100644 --- a/samples/matter/manufacturer_specific/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay +++ b/samples/matter/manufacturer_specific/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -4,6 +4,8 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { aliases { /* Use watchdog wdt31 as the application watchdog */ @@ -11,10 +13,6 @@ }; }; -&mx25r64 { - status = "disabled"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/manufacturer_specific/pm_static_nrf52840dk_nrf52840.yml b/samples/matter/manufacturer_specific/pm_static_nrf52840dk_nrf52840.yml deleted file mode 100644 index 9c4aa3cdcac6..000000000000 --- a/samples/matter/manufacturer_specific/pm_static_nrf52840dk_nrf52840.yml +++ /dev/null @@ -1,42 +0,0 @@ -mcuboot: - address: 0x0 - size: 0x7000 - region: flash_primary -mcuboot_pad: - address: 0x7000 - size: 0x200 -app: - address: 0x7200 - size: 0xefe00 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0x7000 - size: 0xf0000 - region: flash_primary -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0x7200 - size: 0xefe00 -factory_data: - address: 0xf7000 - size: 0x1000 - region: flash_primary -settings_storage: - address: 0xf8000 - size: 0x8000 - region: flash_primary -mcuboot_secondary: - address: 0x0 - size: 0xf0000 - device: MX25R64 - region: external_flash -external_flash: - address: 0xf0000 - size: 0x710000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/manufacturer_specific/pm_static_nrf54l15dk_nrf54l10_cpuapp.yml b/samples/matter/manufacturer_specific/pm_static_nrf54l15dk_nrf54l10_cpuapp.yml deleted file mode 100644 index a4ccdb2eeac1..000000000000 --- a/samples/matter/manufacturer_specific/pm_static_nrf54l15dk_nrf54l10_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x1000 -app: - address: 0xE000 - region: flash_primary - size: 0xE4000 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0xD000 - region: flash_primary - size: 0xE5000 -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0xE000 - region: flash_primary - size: 0xE4000 -factory_data: - address: 0xF2000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0xF3000 - region: flash_primary - size: 0xA000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0xE5000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x1000 -mcuboot_secondary_app: - region: external_flash - address: 0x1000 - size: 0xE4000 -external_flash: - address: 0xE5000 - size: 0x71B000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/manufacturer_specific/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml b/samples/matter/manufacturer_specific/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml deleted file mode 100644 index a8e64916b893..000000000000 --- a/samples/matter/manufacturer_specific/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x800 -app: - address: 0xD800 - region: flash_primary - size: 0x164800 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0xD000 - region: flash_primary - size: 0x165000 -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0xD800 - region: flash_primary - size: 0x164800 -factory_data: - address: 0x172000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x173000 - region: flash_primary - size: 0xA000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0x165000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x800 -mcuboot_secondary_app: - region: external_flash - address: 0x800 - size: 0x164800 -external_flash: - address: 0x165000 - size: 0x69B000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/manufacturer_specific/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml b/samples/matter/manufacturer_specific/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml deleted file mode 100644 index 3e9051d5b84d..000000000000 --- a/samples/matter/manufacturer_specific/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x800 -app: - address: 0xD800 - region: flash_primary - size: 0x1E2800 -mcuboot_primary: - address: 0xD000 - orig_span: &id001 - - app - - mcuboot_pad - region: flash_primary - size: 0x1E3000 - span: *id001 -mcuboot_primary_app: - address: 0xD800 - orig_span: &id002 - - app - region: flash_primary - size: 0x1E2800 - span: *id002 -factory_data: - address: 0x1F0000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x1F1000 - region: flash_primary - size: 0xC000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0x1E3000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x800 -mcuboot_secondary_app: - region: external_flash - address: 0x800 - size: 0x1E2800 -external_flash: - address: 0x1E3000 - size: 0x5DB000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/manufacturer_specific/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml b/samples/matter/manufacturer_specific/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml deleted file mode 100644 index 028bb179c50e..000000000000 --- a/samples/matter/manufacturer_specific/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml +++ /dev/null @@ -1,52 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xA000 -mcuboot_pad: - address: 0xA000 - region: flash_primary - size: 0x800 -app: - address: 0xA800 - region: flash_primary - size: 0x125800 -mcuboot_primary: - address: 0xA000 - orig_span: &id001 - - app - - mcuboot_pad - region: flash_primary - size: 0x126000 - span: *id001 -mcuboot_primary_app: - address: 0xA800 - orig_span: &id002 - - app - region: flash_primary - size: 0x125800 - span: *id002 -mcuboot_secondary: - address: 0x130000 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: flash_primary - size: 0xC0000 - span: *id003 -mcuboot_secondary_pad: - region: flash_primary - address: 0x130000 - size: 0x800 -# Compression rate 34.75% -mcuboot_secondary_app: - region: flash_primary - address: 0x130800 - size: 0xBF800 -factory_data: - address: 0x1F0000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x1F1000 - region: flash_primary - size: 0xC000 diff --git a/samples/matter/manufacturer_specific/prj.conf b/samples/matter/manufacturer_specific/prj.conf index 8e7a5bfe6574..620aa25fb8e0 100644 --- a/samples/matter/manufacturer_specific/prj.conf +++ b/samples/matter/manufacturer_specific/prj.conf @@ -15,6 +15,7 @@ CONFIG_CHIP_DEVICE_PRODUCT_NAME="Matter Manufacturer Specific" # Configure ZAP file name CONFIG_NCS_SAMPLE_MATTER_ZAP_FILE_PATH="${APPLICATION_CONFIG_DIR}/src/default_zap/manufacturer_specific.zap" +CONFIG_CHIP_APP_ZAP_DIR="${APPLICATION_CONFIG_DIR}/src/default_zap/zap-generated" # 32768 == 0x8000 (example Product ID added temporaly, # but it must be changed with proper PID from the list: diff --git a/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay b/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay index 010476d7854a..5b524f95b37f 100644 --- a/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay +++ b/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay @@ -4,9 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { zephyr,code-partition = &boot_partition; - nordic,pm-ext-flash = &mx25r64; }; }; diff --git a/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l10_cpuapp.overlay b/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l10_cpuapp.overlay index 581c022ef176..04504700c6ad 100644 --- a/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l10_cpuapp.overlay +++ b/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l10_cpuapp.overlay @@ -4,22 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ -&cpuapp_rram { - reg = <0x0 DT_SIZE_K(1012)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(192)>; - ranges = <0x0 0x20000000 DT_SIZE_K(192)>; -}; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf index d204a2c0f7b4..aefa3107e579 100644 --- a/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -16,9 +16,6 @@ CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -# Adjust the maximum sectors to the app image size of ~1.4MB -CONFIG_BOOT_MAX_IMG_SECTORS=512 - # 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 diff --git a/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay index 87fb59e21ec8..cce7b792038f 100644 --- a/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ b/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -4,22 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ -&cpuapp_rram { - reg = <0x0 DT_SIZE_K(1524)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(256)>; - ranges = <0x0 0x20000000 0x40000>; -}; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index eb809a84a9fa..d1441e73d412 100644 --- a/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -14,9 +14,6 @@ CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -# Increase the maximum number of sectors to 512 to fit the big image size (> 1024 kB). -CONFIG_BOOT_MAX_IMG_SECTORS=512 - # 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 diff --git a/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay index d3283eaf69b0..daf6d05db823 100644 --- a/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ b/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -4,12 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay index 83134e23fd43..382ded6fba1d 100644 --- a/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay +++ b/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -4,10 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/* Disable the external flash, as it's not needed - * for the configuration with secondary slot residing - * in the internal RRAM. - */ -&mx25r64 { - status = "disabled"; +#include + +/ { + chosen { + zephyr,code-partition = &boot_partition; + }; }; diff --git a/samples/matter/manufacturer_specific/sysbuild_internal.conf b/samples/matter/manufacturer_specific/sysbuild_internal.conf index ea4e5b8487f1..abe76391acd9 100644 --- a/samples/matter/manufacturer_specific/sysbuild_internal.conf +++ b/samples/matter/manufacturer_specific/sysbuild_internal.conf @@ -5,8 +5,6 @@ # SB_CONFIG_MATTER=y -SB_CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=n -SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=n # Enable the DFU image compression. SB_CONFIG_MCUBOOT_MODE_OVERWRITE_ONLY=y diff --git a/samples/matter/smoke_co_alarm/Kconfig.sysbuild b/samples/matter/smoke_co_alarm/Kconfig.sysbuild index c85955a498ff..27e83714ff6b 100644 --- a/samples/matter/smoke_co_alarm/Kconfig.sysbuild +++ b/samples/matter/smoke_co_alarm/Kconfig.sysbuild @@ -4,6 +4,10 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # +config PARTITION_MANAGER + default n if (SOC_SERIES_NRF52X || SOC_NRF54L10 || SOC_NRF54L15 || SOC_NRF54LM20A) && \ + !BOARD_IS_NON_SECURE + #### Radio core selection config NRF_DEFAULT_IPC_RADIO default y diff --git a/samples/matter/smoke_co_alarm/boards/nrf52840dk_nrf52840.overlay b/samples/matter/smoke_co_alarm/boards/nrf52840dk_nrf52840.overlay index bebd5b4a022d..08c3267ee229 100644 --- a/samples/matter/smoke_co_alarm/boards/nrf52840dk_nrf52840.overlay +++ b/samples/matter/smoke_co_alarm/boards/nrf52840dk_nrf52840.overlay @@ -1,34 +1,32 @@ /* - * Copyright (c) 2024 Nordic Semiconductor ASA + * Copyright (c) 2025 Nordic Semiconductor ASA * * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; +#include /* Disable unused peripherals to reduce power consumption */ &adc { status = "disabled"; }; + &uart1 { status = "disabled"; }; + &i2c0 { status = "disabled"; }; -&pwm0 { - status = "disabled"; -}; + &spi1 { status = "disabled"; }; + &spi3 { status = "disabled"; }; + &usbd { status = "disabled"; }; diff --git a/samples/matter/smoke_co_alarm/boards/nrf54l15dk_nrf54l10_cpuapp.overlay b/samples/matter/smoke_co_alarm/boards/nrf54l15dk_nrf54l10_cpuapp.overlay index bd170620547a..c6ba28da834a 100644 --- a/samples/matter/smoke_co_alarm/boards/nrf54l15dk_nrf54l10_cpuapp.overlay +++ b/samples/matter/smoke_co_alarm/boards/nrf54l15dk_nrf54l10_cpuapp.overlay @@ -4,37 +4,20 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include / { - 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(1012)>; -}; - -&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"; }; diff --git a/samples/matter/smoke_co_alarm/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/matter/smoke_co_alarm/boards/nrf54l15dk_nrf54l15_cpuapp.overlay index 49ca92756ba3..bd0121a069e6 100644 --- a/samples/matter/smoke_co_alarm/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ b/samples/matter/smoke_co_alarm/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -4,37 +4,20 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include / { - 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(1524)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(256)>; - ranges = <0x0 0x20000000 0x40000>; -}; - /* TODO: re-enable HWFC once it's fixed */ &uart20 { /delete-property/ hw-flow-control; }; -&mx25r64 { - status = "okay"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/smoke_co_alarm/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/smoke_co_alarm/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay index 8cca9f006e46..5cd90012a43a 100644 --- a/samples/matter/smoke_co_alarm/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ b/samples/matter/smoke_co_alarm/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -4,21 +4,15 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; +#include +/ { aliases { /* Use watchdog wdt31 as the application watchdog */ watchdog0 = &wdt31; }; }; -&mx25r64 { - status = "okay"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/smoke_co_alarm/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/smoke_co_alarm/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay index f74cfaa63dd4..a48ee791aa22 100644 --- a/samples/matter/smoke_co_alarm/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay +++ b/samples/matter/smoke_co_alarm/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -4,6 +4,8 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { aliases { /* Use watchdog wdt31 as the application watchdog */ @@ -11,10 +13,6 @@ }; }; -&mx25r64 { - status = "disabled"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/smoke_co_alarm/pm_static_nrf52840dk_nrf52840.yml b/samples/matter/smoke_co_alarm/pm_static_nrf52840dk_nrf52840.yml deleted file mode 100644 index 9c4aa3cdcac6..000000000000 --- a/samples/matter/smoke_co_alarm/pm_static_nrf52840dk_nrf52840.yml +++ /dev/null @@ -1,42 +0,0 @@ -mcuboot: - address: 0x0 - size: 0x7000 - region: flash_primary -mcuboot_pad: - address: 0x7000 - size: 0x200 -app: - address: 0x7200 - size: 0xefe00 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0x7000 - size: 0xf0000 - region: flash_primary -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0x7200 - size: 0xefe00 -factory_data: - address: 0xf7000 - size: 0x1000 - region: flash_primary -settings_storage: - address: 0xf8000 - size: 0x8000 - region: flash_primary -mcuboot_secondary: - address: 0x0 - size: 0xf0000 - device: MX25R64 - region: external_flash -external_flash: - address: 0xf0000 - size: 0x710000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/smoke_co_alarm/pm_static_nrf54l15dk_nrf54l10_cpuapp.yml b/samples/matter/smoke_co_alarm/pm_static_nrf54l15dk_nrf54l10_cpuapp.yml deleted file mode 100644 index a4ccdb2eeac1..000000000000 --- a/samples/matter/smoke_co_alarm/pm_static_nrf54l15dk_nrf54l10_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x1000 -app: - address: 0xE000 - region: flash_primary - size: 0xE4000 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0xD000 - region: flash_primary - size: 0xE5000 -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0xE000 - region: flash_primary - size: 0xE4000 -factory_data: - address: 0xF2000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0xF3000 - region: flash_primary - size: 0xA000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0xE5000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x1000 -mcuboot_secondary_app: - region: external_flash - address: 0x1000 - size: 0xE4000 -external_flash: - address: 0xE5000 - size: 0x71B000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/smoke_co_alarm/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml b/samples/matter/smoke_co_alarm/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml deleted file mode 100644 index a8e64916b893..000000000000 --- a/samples/matter/smoke_co_alarm/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x800 -app: - address: 0xD800 - region: flash_primary - size: 0x164800 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0xD000 - region: flash_primary - size: 0x165000 -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0xD800 - region: flash_primary - size: 0x164800 -factory_data: - address: 0x172000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x173000 - region: flash_primary - size: 0xA000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0x165000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x800 -mcuboot_secondary_app: - region: external_flash - address: 0x800 - size: 0x164800 -external_flash: - address: 0x165000 - size: 0x69B000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/smoke_co_alarm/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml b/samples/matter/smoke_co_alarm/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml deleted file mode 100644 index 3e9051d5b84d..000000000000 --- a/samples/matter/smoke_co_alarm/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x800 -app: - address: 0xD800 - region: flash_primary - size: 0x1E2800 -mcuboot_primary: - address: 0xD000 - orig_span: &id001 - - app - - mcuboot_pad - region: flash_primary - size: 0x1E3000 - span: *id001 -mcuboot_primary_app: - address: 0xD800 - orig_span: &id002 - - app - region: flash_primary - size: 0x1E2800 - span: *id002 -factory_data: - address: 0x1F0000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x1F1000 - region: flash_primary - size: 0xC000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0x1E3000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x800 -mcuboot_secondary_app: - region: external_flash - address: 0x800 - size: 0x1E2800 -external_flash: - address: 0x1E3000 - size: 0x5DB000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/smoke_co_alarm/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml b/samples/matter/smoke_co_alarm/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml deleted file mode 100644 index 028bb179c50e..000000000000 --- a/samples/matter/smoke_co_alarm/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml +++ /dev/null @@ -1,52 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xA000 -mcuboot_pad: - address: 0xA000 - region: flash_primary - size: 0x800 -app: - address: 0xA800 - region: flash_primary - size: 0x125800 -mcuboot_primary: - address: 0xA000 - orig_span: &id001 - - app - - mcuboot_pad - region: flash_primary - size: 0x126000 - span: *id001 -mcuboot_primary_app: - address: 0xA800 - orig_span: &id002 - - app - region: flash_primary - size: 0x125800 - span: *id002 -mcuboot_secondary: - address: 0x130000 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: flash_primary - size: 0xC0000 - span: *id003 -mcuboot_secondary_pad: - region: flash_primary - address: 0x130000 - size: 0x800 -# Compression rate 34.75% -mcuboot_secondary_app: - region: flash_primary - address: 0x130800 - size: 0xBF800 -factory_data: - address: 0x1F0000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x1F1000 - region: flash_primary - size: 0xC000 diff --git a/samples/matter/smoke_co_alarm/sample.yaml b/samples/matter/smoke_co_alarm/sample.yaml index fd9efef3d311..3bb5138b0238 100644 --- a/samples/matter/smoke_co_alarm/sample.yaml +++ b/samples/matter/smoke_co_alarm/sample.yaml @@ -27,7 +27,6 @@ tests: extra_args: - FILE_SUFFIX=release - SB_CONFIG_BOOTLOADER_MCUBOOT=y - - SB_CONFIG_PARTITION_MANAGER=y integration_platforms: - nrf52840dk/nrf52840 - nrf5340dk/nrf5340/cpuapp diff --git a/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay b/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay index d1aa58695444..3000a1a4b464 100644 --- a/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay +++ b/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay @@ -4,9 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { zephyr,code-partition = &boot_partition; - nordic,pm-ext-flash = &mx25r64; }; }; diff --git a/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l10_cpuapp.overlay b/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l10_cpuapp.overlay index 581c022ef176..04504700c6ad 100644 --- a/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l10_cpuapp.overlay +++ b/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l10_cpuapp.overlay @@ -4,22 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ -&cpuapp_rram { - reg = <0x0 DT_SIZE_K(1012)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(192)>; - ranges = <0x0 0x20000000 DT_SIZE_K(192)>; -}; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf index d204a2c0f7b4..aefa3107e579 100644 --- a/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -16,9 +16,6 @@ CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -# Adjust the maximum sectors to the app image size of ~1.4MB -CONFIG_BOOT_MAX_IMG_SECTORS=512 - # 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 diff --git a/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay index 87fb59e21ec8..cce7b792038f 100644 --- a/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ b/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -4,22 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ -&cpuapp_rram { - reg = <0x0 DT_SIZE_K(1524)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(256)>; - ranges = <0x0 0x20000000 0x40000>; -}; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index eb809a84a9fa..d1441e73d412 100644 --- a/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -14,9 +14,6 @@ CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -# Increase the maximum number of sectors to 512 to fit the big image size (> 1024 kB). -CONFIG_BOOT_MAX_IMG_SECTORS=512 - # 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 diff --git a/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay index d3283eaf69b0..daf6d05db823 100644 --- a/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ b/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -4,12 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay index 83134e23fd43..382ded6fba1d 100644 --- a/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay +++ b/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -4,10 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/* Disable the external flash, as it's not needed - * for the configuration with secondary slot residing - * in the internal RRAM. - */ -&mx25r64 { - status = "disabled"; +#include + +/ { + chosen { + zephyr,code-partition = &boot_partition; + }; }; diff --git a/samples/matter/smoke_co_alarm/sysbuild_internal.conf b/samples/matter/smoke_co_alarm/sysbuild_internal.conf index ea4e5b8487f1..abe76391acd9 100644 --- a/samples/matter/smoke_co_alarm/sysbuild_internal.conf +++ b/samples/matter/smoke_co_alarm/sysbuild_internal.conf @@ -5,8 +5,6 @@ # SB_CONFIG_MATTER=y -SB_CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=n -SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=n # Enable the DFU image compression. SB_CONFIG_MCUBOOT_MODE_OVERWRITE_ONLY=y diff --git a/samples/matter/temperature_sensor/Kconfig.sysbuild b/samples/matter/temperature_sensor/Kconfig.sysbuild index be1d23576ade..9c56ae63e1ca 100644 --- a/samples/matter/temperature_sensor/Kconfig.sysbuild +++ b/samples/matter/temperature_sensor/Kconfig.sysbuild @@ -4,6 +4,10 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # +config PARTITION_MANAGER + default n if (SOC_SERIES_NRF52X || SOC_NRF54L10 || SOC_NRF54L15 || SOC_NRF54LM20A) && \ + !BOARD_IS_NON_SECURE + #### Radio core selection config NRF_DEFAULT_IPC_RADIO default y diff --git a/samples/matter/temperature_sensor/boards/nrf52840dk_nrf52840.overlay b/samples/matter/temperature_sensor/boards/nrf52840dk_nrf52840.overlay index 8e0d3447b4a4..08c3267ee229 100644 --- a/samples/matter/temperature_sensor/boards/nrf52840dk_nrf52840.overlay +++ b/samples/matter/temperature_sensor/boards/nrf52840dk_nrf52840.overlay @@ -4,31 +4,29 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; +#include /* Disable unused peripherals to reduce power consumption */ &adc { status = "disabled"; }; + &uart1 { status = "disabled"; }; + &i2c0 { status = "disabled"; }; -&pwm0 { - status = "disabled"; -}; + &spi1 { status = "disabled"; }; + &spi3 { status = "disabled"; }; + &usbd { status = "disabled"; }; diff --git a/samples/matter/temperature_sensor/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/matter/temperature_sensor/boards/nrf54l15dk_nrf54l15_cpuapp.overlay index 75fb37bf18d6..a3884910d1bb 100644 --- a/samples/matter/temperature_sensor/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ b/samples/matter/temperature_sensor/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -4,37 +4,20 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include / { - 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(1524)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(256)>; - ranges = <0x0 0x20000000 0x40000>; -}; - /* TODO: re-enable HWFC once it's fixed */ &uart20 { /delete-property/ hw-flow-control; }; -&mx25r64 { - status = "okay"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/temperature_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/temperature_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay index 8cca9f006e46..5cd90012a43a 100644 --- a/samples/matter/temperature_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ b/samples/matter/temperature_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -4,21 +4,15 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; +#include +/ { aliases { /* Use watchdog wdt31 as the application watchdog */ watchdog0 = &wdt31; }; }; -&mx25r64 { - status = "okay"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/temperature_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/temperature_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay index f74cfaa63dd4..a48ee791aa22 100644 --- a/samples/matter/temperature_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay +++ b/samples/matter/temperature_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -4,6 +4,8 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { aliases { /* Use watchdog wdt31 as the application watchdog */ @@ -11,10 +13,6 @@ }; }; -&mx25r64 { - status = "disabled"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/temperature_sensor/pm_static_nrf52840dk_nrf52840.yml b/samples/matter/temperature_sensor/pm_static_nrf52840dk_nrf52840.yml deleted file mode 100644 index 9c4aa3cdcac6..000000000000 --- a/samples/matter/temperature_sensor/pm_static_nrf52840dk_nrf52840.yml +++ /dev/null @@ -1,42 +0,0 @@ -mcuboot: - address: 0x0 - size: 0x7000 - region: flash_primary -mcuboot_pad: - address: 0x7000 - size: 0x200 -app: - address: 0x7200 - size: 0xefe00 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0x7000 - size: 0xf0000 - region: flash_primary -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0x7200 - size: 0xefe00 -factory_data: - address: 0xf7000 - size: 0x1000 - region: flash_primary -settings_storage: - address: 0xf8000 - size: 0x8000 - region: flash_primary -mcuboot_secondary: - address: 0x0 - size: 0xf0000 - device: MX25R64 - region: external_flash -external_flash: - address: 0xf0000 - size: 0x710000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/temperature_sensor/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml b/samples/matter/temperature_sensor/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml deleted file mode 100644 index a8e64916b893..000000000000 --- a/samples/matter/temperature_sensor/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x800 -app: - address: 0xD800 - region: flash_primary - size: 0x164800 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0xD000 - region: flash_primary - size: 0x165000 -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0xD800 - region: flash_primary - size: 0x164800 -factory_data: - address: 0x172000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x173000 - region: flash_primary - size: 0xA000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0x165000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x800 -mcuboot_secondary_app: - region: external_flash - address: 0x800 - size: 0x164800 -external_flash: - address: 0x165000 - size: 0x69B000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/temperature_sensor/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml b/samples/matter/temperature_sensor/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml deleted file mode 100644 index 3e9051d5b84d..000000000000 --- a/samples/matter/temperature_sensor/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x800 -app: - address: 0xD800 - region: flash_primary - size: 0x1E2800 -mcuboot_primary: - address: 0xD000 - orig_span: &id001 - - app - - mcuboot_pad - region: flash_primary - size: 0x1E3000 - span: *id001 -mcuboot_primary_app: - address: 0xD800 - orig_span: &id002 - - app - region: flash_primary - size: 0x1E2800 - span: *id002 -factory_data: - address: 0x1F0000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x1F1000 - region: flash_primary - size: 0xC000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0x1E3000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x800 -mcuboot_secondary_app: - region: external_flash - address: 0x800 - size: 0x1E2800 -external_flash: - address: 0x1E3000 - size: 0x5DB000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/temperature_sensor/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml b/samples/matter/temperature_sensor/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml deleted file mode 100644 index 028bb179c50e..000000000000 --- a/samples/matter/temperature_sensor/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml +++ /dev/null @@ -1,52 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xA000 -mcuboot_pad: - address: 0xA000 - region: flash_primary - size: 0x800 -app: - address: 0xA800 - region: flash_primary - size: 0x125800 -mcuboot_primary: - address: 0xA000 - orig_span: &id001 - - app - - mcuboot_pad - region: flash_primary - size: 0x126000 - span: *id001 -mcuboot_primary_app: - address: 0xA800 - orig_span: &id002 - - app - region: flash_primary - size: 0x125800 - span: *id002 -mcuboot_secondary: - address: 0x130000 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: flash_primary - size: 0xC0000 - span: *id003 -mcuboot_secondary_pad: - region: flash_primary - address: 0x130000 - size: 0x800 -# Compression rate 34.75% -mcuboot_secondary_app: - region: flash_primary - address: 0x130800 - size: 0xBF800 -factory_data: - address: 0x1F0000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x1F1000 - region: flash_primary - size: 0xC000 diff --git a/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay b/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay index 010476d7854a..5b524f95b37f 100644 --- a/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay +++ b/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay @@ -4,9 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { zephyr,code-partition = &boot_partition; - nordic,pm-ext-flash = &mx25r64; }; }; diff --git a/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf index 05428a3e0cdc..58811f35b5c9 100644 --- a/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -16,9 +16,6 @@ CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -# Adjust the maximum sectors to the app image size of ~1.4MB -CONFIG_BOOT_MAX_IMG_SECTORS=512 - # 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 diff --git a/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay index 46808ccccb9b..d3f011b84e4d 100644 --- a/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ b/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -4,22 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ -&cpuapp_rram { - reg = <0x0 DT_SIZE_K(1524)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(256)>; - ranges = <0x0 0x20000000 0x40000>; -}; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index eb809a84a9fa..d1441e73d412 100644 --- a/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -14,9 +14,6 @@ CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -# Increase the maximum number of sectors to 512 to fit the big image size (> 1024 kB). -CONFIG_BOOT_MAX_IMG_SECTORS=512 - # 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 diff --git a/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay index d3283eaf69b0..daf6d05db823 100644 --- a/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ b/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -4,12 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay index 83134e23fd43..382ded6fba1d 100644 --- a/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay +++ b/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -4,10 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/* Disable the external flash, as it's not needed - * for the configuration with secondary slot residing - * in the internal RRAM. - */ -&mx25r64 { - status = "disabled"; +#include + +/ { + chosen { + zephyr,code-partition = &boot_partition; + }; }; diff --git a/samples/matter/temperature_sensor/sysbuild_internal.conf b/samples/matter/temperature_sensor/sysbuild_internal.conf index 08b5c767682e..56afbb967cf1 100644 --- a/samples/matter/temperature_sensor/sysbuild_internal.conf +++ b/samples/matter/temperature_sensor/sysbuild_internal.conf @@ -5,8 +5,6 @@ # SB_CONFIG_MATTER=y -SB_CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=n -SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=n # Enable the DFU image compression. SB_CONFIG_MCUBOOT_MODE_OVERWRITE_ONLY=y diff --git a/samples/matter/template/Kconfig.sysbuild b/samples/matter/template/Kconfig.sysbuild index b9e0dc99bb57..08e063c125f3 100644 --- a/samples/matter/template/Kconfig.sysbuild +++ b/samples/matter/template/Kconfig.sysbuild @@ -4,6 +4,10 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # +config PARTITION_MANAGER + default n if (SOC_SERIES_NRF52X || SOC_NRF54L10 || SOC_NRF54L15 || SOC_NRF54LM20A) && \ + !BOARD_IS_NON_SECURE + # This config has to be enabled manually for variants with shields, because sysbuild does not support it. config WIFI_NRF70 default y if BOARD_NRF7002DK diff --git a/samples/matter/template/boards/nrf52840dk_nrf52840.overlay b/samples/matter/template/boards/nrf52840dk_nrf52840.overlay index 5285b0300c95..08c3267ee229 100644 --- a/samples/matter/template/boards/nrf52840dk_nrf52840.overlay +++ b/samples/matter/template/boards/nrf52840dk_nrf52840.overlay @@ -1,34 +1,32 @@ /* - * Copyright (c) 2021 Nordic Semiconductor ASA + * Copyright (c) 2025 Nordic Semiconductor ASA * * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; +#include /* Disable unused peripherals to reduce power consumption */ &adc { status = "disabled"; }; + &uart1 { status = "disabled"; }; + &i2c0 { status = "disabled"; }; -&pwm0 { - status = "disabled"; -}; + &spi1 { status = "disabled"; }; + &spi3 { status = "disabled"; }; + &usbd { status = "disabled"; }; diff --git a/samples/matter/template/boards/nrf54l15dk_nrf54l10_cpuapp.overlay b/samples/matter/template/boards/nrf54l15dk_nrf54l10_cpuapp.overlay index c0e2f85bb062..c6ba28da834a 100644 --- a/samples/matter/template/boards/nrf54l15dk_nrf54l10_cpuapp.overlay +++ b/samples/matter/template/boards/nrf54l15dk_nrf54l10_cpuapp.overlay @@ -4,25 +4,13 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { 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(1012)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(192)>; - ranges = <0x0 0x20000000 DT_SIZE_K(192)>; }; /* TODO: re-enable HWFC once it's fixed */ @@ -30,10 +18,6 @@ /delete-property/ hw-flow-control; }; -&mx25r64 { - status = "okay"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/template/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/matter/template/boards/nrf54l15dk_nrf54l15_cpuapp.overlay index 6dac07253bd7..a3884910d1bb 100644 --- a/samples/matter/template/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ b/samples/matter/template/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -1,28 +1,16 @@ /* - * Copyright (c) 2024 Nordic Semiconductor ASA + * Copyright (c) 2025 Nordic Semiconductor ASA * * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { 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(1524)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(256)>; - ranges = <0x0 0x20000000 0x40000>; }; /* TODO: re-enable HWFC once it's fixed */ @@ -30,10 +18,6 @@ /delete-property/ hw-flow-control; }; -&mx25r64 { - status = "okay"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/template/boards/nrf54l15dk_nrf54l15_cpuapp_internal.overlay b/samples/matter/template/boards/nrf54l15dk_nrf54l15_cpuapp_internal.overlay index 5c50d0bbf81c..03e12ece5f75 100644 --- a/samples/matter/template/boards/nrf54l15dk_nrf54l15_cpuapp_internal.overlay +++ b/samples/matter/template/boards/nrf54l15dk_nrf54l15_cpuapp_internal.overlay @@ -4,6 +4,8 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { aliases { /* Use watchdog wdt31 as the application watchdog */ @@ -11,25 +13,11 @@ }; }; -/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ -&cpuapp_rram { - reg = <0x0 DT_SIZE_K(1524)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(256)>; - ranges = <0x0 0x20000000 0x40000>; -}; - /* TODO: re-enable HWFC once it's fixed */ &uart20 { /delete-property/ hw-flow-control; }; -&mx25r64 { - status = "disabled"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/template/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/template/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay index 8cca9f006e46..5cd90012a43a 100644 --- a/samples/matter/template/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ b/samples/matter/template/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -4,21 +4,15 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; +#include +/ { aliases { /* Use watchdog wdt31 as the application watchdog */ watchdog0 = &wdt31; }; }; -&mx25r64 { - status = "okay"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/template/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/template/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay index f74cfaa63dd4..a48ee791aa22 100644 --- a/samples/matter/template/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay +++ b/samples/matter/template/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -4,6 +4,8 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { aliases { /* Use watchdog wdt31 as the application watchdog */ @@ -11,10 +13,6 @@ }; }; -&mx25r64 { - status = "disabled"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/template/pm_static_nrf52840dk_nrf52840.yml b/samples/matter/template/pm_static_nrf52840dk_nrf52840.yml deleted file mode 100644 index 9c4aa3cdcac6..000000000000 --- a/samples/matter/template/pm_static_nrf52840dk_nrf52840.yml +++ /dev/null @@ -1,42 +0,0 @@ -mcuboot: - address: 0x0 - size: 0x7000 - region: flash_primary -mcuboot_pad: - address: 0x7000 - size: 0x200 -app: - address: 0x7200 - size: 0xefe00 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0x7000 - size: 0xf0000 - region: flash_primary -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0x7200 - size: 0xefe00 -factory_data: - address: 0xf7000 - size: 0x1000 - region: flash_primary -settings_storage: - address: 0xf8000 - size: 0x8000 - region: flash_primary -mcuboot_secondary: - address: 0x0 - size: 0xf0000 - device: MX25R64 - region: external_flash -external_flash: - address: 0xf0000 - size: 0x710000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/template/pm_static_nrf54l15dk_nrf54l10_cpuapp.yml b/samples/matter/template/pm_static_nrf54l15dk_nrf54l10_cpuapp.yml deleted file mode 100644 index a4ccdb2eeac1..000000000000 --- a/samples/matter/template/pm_static_nrf54l15dk_nrf54l10_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x1000 -app: - address: 0xE000 - region: flash_primary - size: 0xE4000 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0xD000 - region: flash_primary - size: 0xE5000 -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0xE000 - region: flash_primary - size: 0xE4000 -factory_data: - address: 0xF2000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0xF3000 - region: flash_primary - size: 0xA000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0xE5000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x1000 -mcuboot_secondary_app: - region: external_flash - address: 0x1000 - size: 0xE4000 -external_flash: - address: 0xE5000 - size: 0x71B000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/template/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml b/samples/matter/template/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml deleted file mode 100644 index a8e64916b893..000000000000 --- a/samples/matter/template/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x800 -app: - address: 0xD800 - region: flash_primary - size: 0x164800 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0xD000 - region: flash_primary - size: 0x165000 -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0xD800 - region: flash_primary - size: 0x164800 -factory_data: - address: 0x172000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x173000 - region: flash_primary - size: 0xA000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0x165000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x800 -mcuboot_secondary_app: - region: external_flash - address: 0x800 - size: 0x164800 -external_flash: - address: 0x165000 - size: 0x69B000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/template/pm_static_nrf54l15dk_nrf54l15_cpuapp_internal.yml b/samples/matter/template/pm_static_nrf54l15dk_nrf54l15_cpuapp_internal.yml deleted file mode 100644 index a8bcbce256bf..000000000000 --- a/samples/matter/template/pm_static_nrf54l15dk_nrf54l15_cpuapp_internal.yml +++ /dev/null @@ -1,52 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x800 -app: - address: 0xD800 - region: flash_primary - size: 0xD7800 -mcuboot_primary: - address: 0xD000 - orig_span: &id001 - - app - - mcuboot_pad - region: flash_primary - size: 0xD8000 - span: *id001 -mcuboot_primary_app: - address: 0xD800 - orig_span: &id002 - - app - region: flash_primary - size: 0xD7800 - span: *id002 -mcuboot_secondary: - address: 0xE5000 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: flash_primary - size: 0x8D000 - span: *id003 -mcuboot_secondary_pad: - region: flash_primary - address: 0xE5000 - size: 0x800 -# Compression rate 34.80% -mcuboot_secondary_app: - region: flash_primary - address: 0xE5800 - size: 0x8C800 -factory_data: - address: 0x172000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x173000 - region: flash_primary - size: 0xA000 diff --git a/samples/matter/template/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml b/samples/matter/template/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml deleted file mode 100644 index 3e9051d5b84d..000000000000 --- a/samples/matter/template/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x800 -app: - address: 0xD800 - region: flash_primary - size: 0x1E2800 -mcuboot_primary: - address: 0xD000 - orig_span: &id001 - - app - - mcuboot_pad - region: flash_primary - size: 0x1E3000 - span: *id001 -mcuboot_primary_app: - address: 0xD800 - orig_span: &id002 - - app - region: flash_primary - size: 0x1E2800 - span: *id002 -factory_data: - address: 0x1F0000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x1F1000 - region: flash_primary - size: 0xC000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0x1E3000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x800 -mcuboot_secondary_app: - region: external_flash - address: 0x800 - size: 0x1E2800 -external_flash: - address: 0x1E3000 - size: 0x5DB000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/template/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml b/samples/matter/template/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml deleted file mode 100644 index 028bb179c50e..000000000000 --- a/samples/matter/template/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml +++ /dev/null @@ -1,52 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xA000 -mcuboot_pad: - address: 0xA000 - region: flash_primary - size: 0x800 -app: - address: 0xA800 - region: flash_primary - size: 0x125800 -mcuboot_primary: - address: 0xA000 - orig_span: &id001 - - app - - mcuboot_pad - region: flash_primary - size: 0x126000 - span: *id001 -mcuboot_primary_app: - address: 0xA800 - orig_span: &id002 - - app - region: flash_primary - size: 0x125800 - span: *id002 -mcuboot_secondary: - address: 0x130000 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: flash_primary - size: 0xC0000 - span: *id003 -mcuboot_secondary_pad: - region: flash_primary - address: 0x130000 - size: 0x800 -# Compression rate 34.75% -mcuboot_secondary_app: - region: flash_primary - address: 0x130800 - size: 0xBF800 -factory_data: - address: 0x1F0000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x1F1000 - region: flash_primary - size: 0xC000 diff --git a/samples/matter/template/sample.yaml b/samples/matter/template/sample.yaml index 3601ddb8b766..cdd6cb3a7acc 100644 --- a/samples/matter/template/sample.yaml +++ b/samples/matter/template/sample.yaml @@ -65,7 +65,6 @@ tests: extra_args: - FILE_SUFFIX=release - SB_CONFIG_BOOTLOADER_MCUBOOT=y - - SB_CONFIG_PARTITION_MANAGER=y - template_SHIELD=nrf7002eb2 - SB_CONFIG_WIFI_NRF70=y integration_platforms: diff --git a/samples/matter/template/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay b/samples/matter/template/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay index 6ea64210d733..91e2a415c6fb 100644 --- a/samples/matter/template/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay +++ b/samples/matter/template/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay @@ -4,9 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { zephyr,code-partition = &boot_partition; - nordic,pm-ext-flash = &mx25r64; }; }; diff --git a/samples/matter/template/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l10_cpuapp.overlay b/samples/matter/template/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l10_cpuapp.overlay index 581c022ef176..04504700c6ad 100644 --- a/samples/matter/template/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l10_cpuapp.overlay +++ b/samples/matter/template/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l10_cpuapp.overlay @@ -4,22 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ -&cpuapp_rram { - reg = <0x0 DT_SIZE_K(1012)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(192)>; - ranges = <0x0 0x20000000 DT_SIZE_K(192)>; -}; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/template/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp_internal.overlay b/samples/matter/template/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp_internal.overlay index 6dba59adb8a7..9c3d9344c144 100644 --- a/samples/matter/template/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp_internal.overlay +++ b/samples/matter/template/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp_internal.overlay @@ -4,20 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ -&cpuapp_rram { - reg = <0x0 DT_SIZE_K(1524)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(256)>; - ranges = <0x0 0x20000000 0x40000>; -}; +#include - /* Disable the external flash, as it's not needed - * for the configuration with secondary slot residing - * in the internal RRAM. - */ -&mx25r64 { - status = "disabled"; +/ { + chosen { + zephyr,code-partition = &boot_partition; + }; }; diff --git a/samples/matter/template/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/template/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay index d3283eaf69b0..daf6d05db823 100644 --- a/samples/matter/template/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ b/samples/matter/template/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -4,12 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/template/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/template/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay index 83134e23fd43..382ded6fba1d 100644 --- a/samples/matter/template/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay +++ b/samples/matter/template/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -4,10 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/* Disable the external flash, as it's not needed - * for the configuration with secondary slot residing - * in the internal RRAM. - */ -&mx25r64 { - status = "disabled"; +#include + +/ { + chosen { + zephyr,code-partition = &boot_partition; + }; }; diff --git a/samples/matter/template/sysbuild_internal.conf b/samples/matter/template/sysbuild_internal.conf index ea4e5b8487f1..abe76391acd9 100644 --- a/samples/matter/template/sysbuild_internal.conf +++ b/samples/matter/template/sysbuild_internal.conf @@ -5,8 +5,6 @@ # SB_CONFIG_MATTER=y -SB_CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=n -SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=n # Enable the DFU image compression. SB_CONFIG_MCUBOOT_MODE_OVERWRITE_ONLY=y diff --git a/samples/matter/thermostat/Kconfig.sysbuild b/samples/matter/thermostat/Kconfig.sysbuild index 3e77790c5e45..071093beed0e 100644 --- a/samples/matter/thermostat/Kconfig.sysbuild +++ b/samples/matter/thermostat/Kconfig.sysbuild @@ -4,6 +4,10 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # +config PARTITION_MANAGER + default n if (SOC_SERIES_NRF52X || SOC_NRF54L10 || SOC_NRF54L15 || SOC_NRF54LM20A) && \ + !BOARD_IS_NON_SECURE + # This config has to be enabled manually for variants with shields, because sysbuild does not support it. config WIFI_NRF70 default y if BOARD_NRF7002DK diff --git a/samples/matter/thermostat/boards/nrf52840dk_nrf52840.overlay b/samples/matter/thermostat/boards/nrf52840dk_nrf52840.overlay deleted file mode 100644 index da96f1f0d085..000000000000 --- a/samples/matter/thermostat/boards/nrf52840dk_nrf52840.overlay +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2023 Nordic Semiconductor ASA - * - * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - */ - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; - -/* Disable unused peripherals to reduce power consumption */ -&adc { - status = "disabled"; -}; -&uart1 { - status = "disabled"; -}; -&i2c0 { - status = "disabled"; -}; -&pwm0 { - status = "disabled"; -}; -&spi1 { - status = "disabled"; -}; -&spi3 { - status = "disabled"; -}; -&usbd { - status = "disabled"; -}; diff --git a/samples/matter/thermostat/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/matter/thermostat/boards/nrf54l15dk_nrf54l15_cpuapp.overlay index f3e12b04c0bf..bd0121a069e6 100644 --- a/samples/matter/thermostat/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ b/samples/matter/thermostat/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -4,25 +4,13 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { 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(1524)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(256)>; - ranges = <0x0 0x20000000 0x40000>; }; /* TODO: re-enable HWFC once it's fixed */ @@ -30,10 +18,6 @@ /delete-property/ hw-flow-control; }; -&mx25r64 { - status = "okay"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/thermostat/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/thermostat/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay index 8cca9f006e46..5cd90012a43a 100644 --- a/samples/matter/thermostat/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ b/samples/matter/thermostat/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -4,21 +4,15 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; +#include +/ { aliases { /* Use watchdog wdt31 as the application watchdog */ watchdog0 = &wdt31; }; }; -&mx25r64 { - status = "okay"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/thermostat/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/thermostat/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay index f74cfaa63dd4..a48ee791aa22 100644 --- a/samples/matter/thermostat/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay +++ b/samples/matter/thermostat/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -4,6 +4,8 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { aliases { /* Use watchdog wdt31 as the application watchdog */ @@ -11,10 +13,6 @@ }; }; -&mx25r64 { - status = "disabled"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/thermostat/pm_static_nrf52840dk_nrf52840.yml b/samples/matter/thermostat/pm_static_nrf52840dk_nrf52840.yml deleted file mode 100644 index 9c4aa3cdcac6..000000000000 --- a/samples/matter/thermostat/pm_static_nrf52840dk_nrf52840.yml +++ /dev/null @@ -1,42 +0,0 @@ -mcuboot: - address: 0x0 - size: 0x7000 - region: flash_primary -mcuboot_pad: - address: 0x7000 - size: 0x200 -app: - address: 0x7200 - size: 0xefe00 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0x7000 - size: 0xf0000 - region: flash_primary -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0x7200 - size: 0xefe00 -factory_data: - address: 0xf7000 - size: 0x1000 - region: flash_primary -settings_storage: - address: 0xf8000 - size: 0x8000 - region: flash_primary -mcuboot_secondary: - address: 0x0 - size: 0xf0000 - device: MX25R64 - region: external_flash -external_flash: - address: 0xf0000 - size: 0x710000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/thermostat/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml b/samples/matter/thermostat/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml deleted file mode 100644 index a8e64916b893..000000000000 --- a/samples/matter/thermostat/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x800 -app: - address: 0xD800 - region: flash_primary - size: 0x164800 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0xD000 - region: flash_primary - size: 0x165000 -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0xD800 - region: flash_primary - size: 0x164800 -factory_data: - address: 0x172000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x173000 - region: flash_primary - size: 0xA000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0x165000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x800 -mcuboot_secondary_app: - region: external_flash - address: 0x800 - size: 0x164800 -external_flash: - address: 0x165000 - size: 0x69B000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/thermostat/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml b/samples/matter/thermostat/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml deleted file mode 100644 index 3e9051d5b84d..000000000000 --- a/samples/matter/thermostat/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x800 -app: - address: 0xD800 - region: flash_primary - size: 0x1E2800 -mcuboot_primary: - address: 0xD000 - orig_span: &id001 - - app - - mcuboot_pad - region: flash_primary - size: 0x1E3000 - span: *id001 -mcuboot_primary_app: - address: 0xD800 - orig_span: &id002 - - app - region: flash_primary - size: 0x1E2800 - span: *id002 -factory_data: - address: 0x1F0000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x1F1000 - region: flash_primary - size: 0xC000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0x1E3000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x800 -mcuboot_secondary_app: - region: external_flash - address: 0x800 - size: 0x1E2800 -external_flash: - address: 0x1E3000 - size: 0x5DB000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/thermostat/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml b/samples/matter/thermostat/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml deleted file mode 100644 index 028bb179c50e..000000000000 --- a/samples/matter/thermostat/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml +++ /dev/null @@ -1,52 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xA000 -mcuboot_pad: - address: 0xA000 - region: flash_primary - size: 0x800 -app: - address: 0xA800 - region: flash_primary - size: 0x125800 -mcuboot_primary: - address: 0xA000 - orig_span: &id001 - - app - - mcuboot_pad - region: flash_primary - size: 0x126000 - span: *id001 -mcuboot_primary_app: - address: 0xA800 - orig_span: &id002 - - app - region: flash_primary - size: 0x125800 - span: *id002 -mcuboot_secondary: - address: 0x130000 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: flash_primary - size: 0xC0000 - span: *id003 -mcuboot_secondary_pad: - region: flash_primary - address: 0x130000 - size: 0x800 -# Compression rate 34.75% -mcuboot_secondary_app: - region: flash_primary - address: 0x130800 - size: 0xBF800 -factory_data: - address: 0x1F0000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x1F1000 - region: flash_primary - size: 0xC000 diff --git a/samples/matter/thermostat/sample.yaml b/samples/matter/thermostat/sample.yaml index 56e44be2ed40..cc4ae0df5165 100644 --- a/samples/matter/thermostat/sample.yaml +++ b/samples/matter/thermostat/sample.yaml @@ -39,7 +39,6 @@ tests: extra_args: - FILE_SUFFIX=release - SB_CONFIG_BOOTLOADER_MCUBOOT=y - - SB_CONFIG_PARTITION_MANAGER=y integration_platforms: - nrf52840dk/nrf52840 - nrf5340dk/nrf5340/cpuapp @@ -58,7 +57,6 @@ tests: extra_args: - FILE_SUFFIX=release - SB_CONFIG_BOOTLOADER_MCUBOOT=y - - SB_CONFIG_PARTITION_MANAGER=y - thermostat_SHIELD=nrf7002eb2 - SB_CONFIG_WIFI_NRF70=y integration_platforms: diff --git a/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay b/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay index 6ea64210d733..91e2a415c6fb 100644 --- a/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay +++ b/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay @@ -4,9 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { zephyr,code-partition = &boot_partition; - nordic,pm-ext-flash = &mx25r64; }; }; diff --git a/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf index d204a2c0f7b4..aefa3107e579 100644 --- a/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -16,9 +16,6 @@ CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -# Adjust the maximum sectors to the app image size of ~1.4MB -CONFIG_BOOT_MAX_IMG_SECTORS=512 - # 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 diff --git a/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay index 87fb59e21ec8..cce7b792038f 100644 --- a/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ b/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -4,22 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ -&cpuapp_rram { - reg = <0x0 DT_SIZE_K(1524)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(256)>; - ranges = <0x0 0x20000000 0x40000>; -}; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index eb809a84a9fa..d1441e73d412 100644 --- a/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -14,9 +14,6 @@ CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -# Increase the maximum number of sectors to 512 to fit the big image size (> 1024 kB). -CONFIG_BOOT_MAX_IMG_SECTORS=512 - # 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 diff --git a/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay index d3283eaf69b0..daf6d05db823 100644 --- a/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ b/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -4,12 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay index 83134e23fd43..382ded6fba1d 100644 --- a/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay +++ b/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -4,10 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/* Disable the external flash, as it's not needed - * for the configuration with secondary slot residing - * in the internal RRAM. - */ -&mx25r64 { - status = "disabled"; +#include + +/ { + chosen { + zephyr,code-partition = &boot_partition; + }; }; diff --git a/samples/matter/thermostat/sysbuild_internal.conf b/samples/matter/thermostat/sysbuild_internal.conf index ea4e5b8487f1..abe76391acd9 100644 --- a/samples/matter/thermostat/sysbuild_internal.conf +++ b/samples/matter/thermostat/sysbuild_internal.conf @@ -5,8 +5,6 @@ # SB_CONFIG_MATTER=y -SB_CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=n -SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=n # Enable the DFU image compression. SB_CONFIG_MCUBOOT_MODE_OVERWRITE_ONLY=y diff --git a/samples/matter/window_covering/Kconfig.sysbuild b/samples/matter/window_covering/Kconfig.sysbuild index 5000df38c420..81580fdee09c 100644 --- a/samples/matter/window_covering/Kconfig.sysbuild +++ b/samples/matter/window_covering/Kconfig.sysbuild @@ -4,6 +4,10 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # +config PARTITION_MANAGER + default n if (SOC_SERIES_NRF52X || SOC_NRF54L10 || SOC_NRF54L15 || SOC_NRF54LM20A) && \ + !BOARD_IS_NON_SECURE + #### Radio core selection config NRF_DEFAULT_IPC_RADIO default y diff --git a/samples/matter/window_covering/boards/nrf52840dk_nrf52840.overlay b/samples/matter/window_covering/boards/nrf52840dk_nrf52840.overlay index feb8c414fabc..c5b0749a8bcf 100644 --- a/samples/matter/window_covering/boards/nrf52840dk_nrf52840.overlay +++ b/samples/matter/window_covering/boards/nrf52840dk_nrf52840.overlay @@ -1,13 +1,10 @@ -/* Copyright (c) 2021 Nordic Semiconductor ASA +/* + * Copyright (c) 2021 Nordic Semiconductor ASA * * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; +#include / { /* @@ -29,26 +26,6 @@ }; }; -/* Disable unused peripherals to reduce power consumption */ -&adc { - status = "disabled"; -}; -&uart1 { - status = "disabled"; -}; -&i2c0 { - status = "disabled"; -}; -&spi1 { - status = "disabled"; -}; -&spi3 { - status = "disabled"; -}; -&usbd { - status = "disabled"; -}; - &pwm0 { pinctrl-0 = <&pwm0_default_alt>; pinctrl-1 = <&pwm0_sleep_alt>; @@ -70,3 +47,28 @@ }; }; }; + +/* Disable unused peripherals to reduce power consumption */ +&adc { + status = "disabled"; +}; + +&uart1 { + status = "disabled"; +}; + +&i2c0 { + status = "disabled"; +}; + +&spi1 { + status = "disabled"; +}; + +&spi3 { + status = "disabled"; +}; + +&usbd { + status = "disabled"; +}; diff --git a/samples/matter/window_covering/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/matter/window_covering/boards/nrf54l15dk_nrf54l15_cpuapp.overlay index 20e0052a8e28..dfbbb8c8937f 100644 --- a/samples/matter/window_covering/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ b/samples/matter/window_covering/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -4,11 +4,9 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; +#include +/ { aliases { /* Configure PWM module for led1 (LED2 on the board) */ pwm-led1 = &pwm_led1; @@ -29,25 +27,11 @@ }; }; -/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ -&cpuapp_rram { - reg = <0x0 DT_SIZE_K(1524)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(256)>; - ranges = <0x0 0x20000000 0x40000>; -}; - /* TODO: re-enable HWFC once it's fixed */ &uart20 { /delete-property/ hw-flow-control; }; -&mx25r64 { - status = "okay"; -}; - &pwm20 { status = "okay"; pinctrl-0 = <&pwm_default>; diff --git a/samples/matter/window_covering/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/window_covering/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay index c38352b486f7..328182998ec2 100644 --- a/samples/matter/window_covering/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ b/samples/matter/window_covering/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -4,11 +4,9 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; +#include +/ { aliases { pwm-led1 = &pwm_led1; pwm-led2 = &pwm_led2; @@ -49,10 +47,6 @@ }; }; -&mx25r64 { - status = "okay"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/window_covering/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/window_covering/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay index 97cf625adfc0..b619f5238450 100644 --- a/samples/matter/window_covering/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay +++ b/samples/matter/window_covering/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -4,6 +4,8 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { aliases { /* Configure PWM module for led1 (LED2 on the board) */ @@ -15,14 +17,17 @@ pwmleds { compatible = "pwm-leds"; + pwm_led1: pwm_led_1 { pwms = <&pwm20 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; }; + pwm_led2: pwm_led_2 { pwms = <&pwm20 2 PWM_MSEC(20) PWM_POLARITY_NORMAL>; }; }; }; + &pwm20 { status = "okay"; pinctrl-0 = <&pwm_default>; @@ -30,13 +35,13 @@ pinctrl-names = "default", "sleep"; }; - &pinctrl { pwm_default: pwm_default { group1 { psels = , ; }; }; + pwm_sleep: pwm_sleep { group1 { psels = , ; @@ -45,10 +50,6 @@ }; }; -&mx25r64 { - status = "disabled"; -}; - &wdt31 { status = "okay"; }; diff --git a/samples/matter/window_covering/pm_static_nrf52840dk_nrf52840.yml b/samples/matter/window_covering/pm_static_nrf52840dk_nrf52840.yml deleted file mode 100644 index 9c4aa3cdcac6..000000000000 --- a/samples/matter/window_covering/pm_static_nrf52840dk_nrf52840.yml +++ /dev/null @@ -1,42 +0,0 @@ -mcuboot: - address: 0x0 - size: 0x7000 - region: flash_primary -mcuboot_pad: - address: 0x7000 - size: 0x200 -app: - address: 0x7200 - size: 0xefe00 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0x7000 - size: 0xf0000 - region: flash_primary -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0x7200 - size: 0xefe00 -factory_data: - address: 0xf7000 - size: 0x1000 - region: flash_primary -settings_storage: - address: 0xf8000 - size: 0x8000 - region: flash_primary -mcuboot_secondary: - address: 0x0 - size: 0xf0000 - device: MX25R64 - region: external_flash -external_flash: - address: 0xf0000 - size: 0x710000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/window_covering/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml b/samples/matter/window_covering/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml deleted file mode 100644 index a8e64916b893..000000000000 --- a/samples/matter/window_covering/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x800 -app: - address: 0xD800 - region: flash_primary - size: 0x164800 -mcuboot_primary: - orig_span: &id001 - - mcuboot_pad - - app - span: *id001 - address: 0xD000 - region: flash_primary - size: 0x165000 -mcuboot_primary_app: - orig_span: &id002 - - app - span: *id002 - address: 0xD800 - region: flash_primary - size: 0x164800 -factory_data: - address: 0x172000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x173000 - region: flash_primary - size: 0xA000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0x165000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x800 -mcuboot_secondary_app: - region: external_flash - address: 0x800 - size: 0x164800 -external_flash: - address: 0x165000 - size: 0x69B000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/window_covering/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml b/samples/matter/window_covering/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml deleted file mode 100644 index 3e9051d5b84d..000000000000 --- a/samples/matter/window_covering/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml +++ /dev/null @@ -1,56 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xD000 -mcuboot_pad: - address: 0xD000 - region: flash_primary - size: 0x800 -app: - address: 0xD800 - region: flash_primary - size: 0x1E2800 -mcuboot_primary: - address: 0xD000 - orig_span: &id001 - - app - - mcuboot_pad - region: flash_primary - size: 0x1E3000 - span: *id001 -mcuboot_primary_app: - address: 0xD800 - orig_span: &id002 - - app - region: flash_primary - size: 0x1E2800 - span: *id002 -factory_data: - address: 0x1F0000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x1F1000 - region: flash_primary - size: 0xC000 -mcuboot_secondary: - address: 0x0 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: external_flash - size: 0x1E3000 - span: *id003 -mcuboot_secondary_pad: - region: external_flash - address: 0x0 - size: 0x800 -mcuboot_secondary_app: - region: external_flash - address: 0x800 - size: 0x1E2800 -external_flash: - address: 0x1E3000 - size: 0x5DB000 - device: MX25R64 - region: external_flash diff --git a/samples/matter/window_covering/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml b/samples/matter/window_covering/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml deleted file mode 100644 index 028bb179c50e..000000000000 --- a/samples/matter/window_covering/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml +++ /dev/null @@ -1,52 +0,0 @@ -mcuboot: - address: 0x0 - region: flash_primary - size: 0xA000 -mcuboot_pad: - address: 0xA000 - region: flash_primary - size: 0x800 -app: - address: 0xA800 - region: flash_primary - size: 0x125800 -mcuboot_primary: - address: 0xA000 - orig_span: &id001 - - app - - mcuboot_pad - region: flash_primary - size: 0x126000 - span: *id001 -mcuboot_primary_app: - address: 0xA800 - orig_span: &id002 - - app - region: flash_primary - size: 0x125800 - span: *id002 -mcuboot_secondary: - address: 0x130000 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: flash_primary - size: 0xC0000 - span: *id003 -mcuboot_secondary_pad: - region: flash_primary - address: 0x130000 - size: 0x800 -# Compression rate 34.75% -mcuboot_secondary_app: - region: flash_primary - address: 0x130800 - size: 0xBF800 -factory_data: - address: 0x1F0000 - region: flash_primary - size: 0x1000 -settings_storage: - address: 0x1F1000 - region: flash_primary - size: 0xC000 diff --git a/samples/matter/window_covering/sample.yaml b/samples/matter/window_covering/sample.yaml index 542fec085cb8..f5291b6927e9 100644 --- a/samples/matter/window_covering/sample.yaml +++ b/samples/matter/window_covering/sample.yaml @@ -27,7 +27,6 @@ tests: extra_args: - FILE_SUFFIX=release - SB_CONFIG_BOOTLOADER_MCUBOOT=y - - SB_CONFIG_PARTITION_MANAGER=y integration_platforms: - nrf52840dk/nrf52840 - nrf5340dk/nrf5340/cpuapp diff --git a/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay b/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay index 6ea64210d733..91e2a415c6fb 100644 --- a/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay +++ b/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay @@ -4,9 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { zephyr,code-partition = &boot_partition; - nordic,pm-ext-flash = &mx25r64; }; }; diff --git a/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf index d204a2c0f7b4..aefa3107e579 100644 --- a/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -16,9 +16,6 @@ CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -# Adjust the maximum sectors to the app image size of ~1.4MB -CONFIG_BOOT_MAX_IMG_SECTORS=512 - # 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 diff --git a/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay index 87fb59e21ec8..cce7b792038f 100644 --- a/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ b/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -4,22 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ -&cpuapp_rram { - reg = <0x0 DT_SIZE_K(1524)>; -}; - -&cpuapp_sram { - reg = <0x20000000 DT_SIZE_K(256)>; - ranges = <0x0 0x20000000 0x40000>; -}; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index eb809a84a9fa..d1441e73d412 100644 --- a/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -14,9 +14,6 @@ CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -# Increase the maximum number of sectors to 512 to fit the big image size (> 1024 kB). -CONFIG_BOOT_MAX_IMG_SECTORS=512 - # 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 diff --git a/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay index d3283eaf69b0..daf6d05db823 100644 --- a/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ b/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -4,12 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { - nordic,pm-ext-flash = &mx25r64; + zephyr,code-partition = &boot_partition; }; }; - -&mx25r64 { - status = "okay"; -}; diff --git a/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay index 83134e23fd43..382ded6fba1d 100644 --- a/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay +++ b/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -4,10 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/* Disable the external flash, as it's not needed - * for the configuration with secondary slot residing - * in the internal RRAM. - */ -&mx25r64 { - status = "disabled"; +#include + +/ { + chosen { + zephyr,code-partition = &boot_partition; + }; }; diff --git a/samples/matter/window_covering/sysbuild_internal.conf b/samples/matter/window_covering/sysbuild_internal.conf index ea4e5b8487f1..abe76391acd9 100644 --- a/samples/matter/window_covering/sysbuild_internal.conf +++ b/samples/matter/window_covering/sysbuild_internal.conf @@ -5,8 +5,6 @@ # SB_CONFIG_MATTER=y -SB_CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=n -SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=n # Enable the DFU image compression. SB_CONFIG_MCUBOOT_MODE_OVERWRITE_ONLY=y diff --git a/sysbuild/CMakeLists.txt b/sysbuild/CMakeLists.txt index af2b5e4db7fe..8fd720a3dd68 100644 --- a/sysbuild/CMakeLists.txt +++ b/sysbuild/CMakeLists.txt @@ -900,11 +900,6 @@ function(${SYSBUILD_CURRENT_MODULE_NAME}_post_cmake) include(${ZEPHYR_NRF_MODULE_DIR}/cmake/sysbuild/fast_pair/hex.cmake) endif() - if(SB_CONFIG_MATTER_FACTORY_DATA_GENERATE) - include(${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/config/nrfconnect/chip-module/generate_factory_data_sysbuild.cmake) - nrfconnect_generate_factory_data() - endif() - # Sign extra DFU images added via dfu_extra_add_binary() if(SB_CONFIG_MCUBOOT_EXTRA_IMAGES) include(${ZEPHYR_NRF_MODULE_DIR}/cmake/sysbuild/image_signing_extra.cmake) @@ -924,7 +919,7 @@ function(${SYSBUILD_CURRENT_MODULE_NAME}_post_cmake) endif() if(SB_CONFIG_MATTER_OTA) - include(${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/config/zephyr/ota-image_sysbuild.cmake) + include(${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/config/zephyr/ota-image.cmake) if(SB_CONFIG_DFU_MULTI_IMAGE_PACKAGE_BUILD) chip_ota_image(chip-ota-image INPUT_FILES ${CMAKE_BINARY_DIR}/dfu_multi_image.bin @@ -933,6 +928,13 @@ function(${SYSBUILD_CURRENT_MODULE_NAME}_post_cmake) endif() endif() + if(SB_CONFIG_ZEPHYR_CONNECTEDHOMEIP_MODULE AND SB_CONFIG_MATTER AND + SB_CONFIG_MATTER_FACTORY_DATA_GENERATE AND NOT SB_CONFIG_PARTITION_MANAGER + ) + include(${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/config/nrfconnect/chip-module/generate_factory_data.cmake) + nrfconnect_generate_factory_data() + endif() + if(SB_CONFIG_WIFI_PATCHES_EXT_FLASH_STORE) include(${ZEPHYR_NRF_MODULE_DIR}/cmake/sysbuild/nrf700x.cmake) endif() @@ -1063,5 +1065,6 @@ include(${CMAKE_CURRENT_LIST_DIR}/radio_loader.cmake) include(${CMAKE_CURRENT_LIST_DIR}/secureboot.cmake) include(${CMAKE_CURRENT_LIST_DIR}/mcuboot.cmake) include(${CMAKE_CURRENT_LIST_DIR}/firmware_loader_radio.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/matter_factory_data.cmake) store_ncs_vars() diff --git a/sysbuild/Kconfig.matter b/sysbuild/Kconfig.matter index 32c68c4eaa06..a1c90d49ec9a 100644 --- a/sysbuild/Kconfig.matter +++ b/sysbuild/Kconfig.matter @@ -16,7 +16,7 @@ config MATTER_FACTORY_DATA_GENERATE config MATTER_FACTORY_DATA_MERGE_WITH_FIRMWARE bool "Merge generated factory data with merged.hex output" - depends on MATTER_FACTORY_DATA_GENERATE + depends on MATTER_FACTORY_DATA_GENERATE && PARTITION_MANAGER default y help Enables merging the generated factory data with the merged.hex output build file. As a diff --git a/sysbuild/image_flasher.cmake b/sysbuild/image_flasher.cmake new file mode 100644 index 000000000000..c8e5fb742180 --- /dev/null +++ b/sysbuild/image_flasher.cmake @@ -0,0 +1,36 @@ +# +# Copyright (c) 2025 Nordic Semiconductor +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Usage: +# add_image_flasher(NAME HEX_FILE ) +# +# Adds a sysbuild image which will flash the hex file when `west flash` is invoked. +function(add_image_flasher) + set(single_args NAME HEX_FILE) + cmake_parse_arguments(args "" "${single_args}" "" ${ARGN}) + + if(NOT args_NAME) + message(FATAL_ERROR "Argument NAME is required") + elseif(NOT args_HEX_FILE) + message(FATAL_ERROR "Argument HEX_FILE is required") + elseif(NOT IS_ABSOLUTE "${args_HEX_FILE}") + message(FATAL_ERROR "Argument HEX_FILE must be an absolute path") + elseif(args_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Unknown arguments specified: ${args_UNPARSED_ARGUMENTS}") + endif() + + set(${args_NAME}_HEX_FILE "${args_HEX_FILE}" CACHE FILEPATH "Hex file to flash" FORCE) + set(IMAGE_FLASHER_DEFAULT_IMAGE ${DEFAULT_IMAGE} CACHE STRING "Default image" FORCE) + + ExternalZephyrProject_Add( + APPLICATION ${args_NAME} + SOURCE_DIR ${ZEPHYR_NRF_MODULE_DIR}/applications/image_flasher + ) + + # Must be configured after the default image as the default image Kconfig and dts files are + # copied. + sysbuild_add_dependencies(CONFIGURE ${args_NAME} ${DEFAULT_IMAGE}) +endfunction() diff --git a/sysbuild/matter_factory_data.cmake b/sysbuild/matter_factory_data.cmake new file mode 100644 index 000000000000..0724740de5cc --- /dev/null +++ b/sysbuild/matter_factory_data.cmake @@ -0,0 +1,12 @@ +# +# Copyright (c) 2025 Nordic Semiconductor +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +if(SB_CONFIG_ZEPHYR_CONNECTEDHOMEIP_MODULE AND SB_CONFIG_MATTER AND + SB_CONFIG_MATTER_FACTORY_DATA_GENERATE AND NOT SB_CONFIG_PARTITION_MANAGER +) + include(image_flasher.cmake) + add_image_flasher(NAME matter_factory_data HEX_FILE "${CMAKE_BINARY_DIR}/factory_data.hex") +endif() diff --git a/west.yml b/west.yml index 40e5a9795f4a..00791e9e49d6 100644 --- a/west.yml +++ b/west.yml @@ -156,7 +156,7 @@ manifest: - name: matter repo-path: sdk-connectedhomeip path: modules/lib/matter - revision: e0fbbd3face21c0e70acda19c56ea2ea40a59e5d + revision: pull/682/head west-commands: scripts/west/west-commands.yml submodules: - name: nlio