From 42224d91f6dde05ada192130f93ec14a467f13b0 Mon Sep 17 00:00:00 2001 From: Marcin Kajor Date: Fri, 17 May 2024 14:23:31 +0200 Subject: [PATCH] samples: matter: rework PM static partitions for nRF54L * enabled mx25r64 external flash over SPI for Matter samples * added pm_static* files that configures static memory map with MCUboot secondary slot residing on the external flash * added initial MCUboot configuration to support DFU * provided default/debug and release variants for every sample * left the pm_static file with internal flash only for the template sample as a reference for dual bank DFU with no external flash * updated documentation to describe supported DFU variants Signed-off-by: Marcin Kajor --- .../releases/release-notes-changelog.rst | 2 - samples/matter/light_bulb/README.rst | 4 -- .../boards/nrf54l15pdk_nrf54l15_cpuapp.conf | 4 -- .../nrf54l15pdk_nrf54l15_cpuapp_0_2_1.overlay | 36 ++---------- ...5pdk_nrf54l15_cpuapp_0_2_1_release.overlay | 48 ++++++++++++++++ .../nrf54l15pdk_nrf54l15_cpuapp_0_3_0.overlay | 36 ++---------- ...5pdk_nrf54l15_cpuapp_0_3_0_release.overlay | 49 ++++++++++++++++ .../nrf54l15pdk_nrf54l15_cpuapp_release.conf | 3 - .../boards/nrf54l15pdk_nrf54l15_cpuapp.conf | 17 ++++++ .../nrf54l15pdk_nrf54l15_cpuapp.overlay | 15 +++++ .../nrf54l15pdk_nrf54l15_cpuapp_release.conf | 5 ++ ...rf54l15pdk_nrf54l15_cpuapp_release.overlay | 15 +++++ .../pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml | 56 ++++++++++++++++++ ...ic_nrf54l15pdk_nrf54l15_cpuapp_release.yml | 57 ++++++++++--------- samples/matter/light_switch/README.rst | 4 -- .../boards/nrf54l15pdk_nrf54l15_cpuapp.conf | 4 -- .../nrf54l15pdk_nrf54l15_cpuapp.overlay | 38 ++----------- .../nrf54l15pdk_nrf54l15_cpuapp_release.conf | 3 - ...rf54l15pdk_nrf54l15_cpuapp_release.overlay | 15 +++++ .../boards/nrf54l15pdk_nrf54l15_cpuapp.conf | 17 ++++++ .../nrf54l15pdk_nrf54l15_cpuapp.overlay | 15 +++++ .../nrf54l15pdk_nrf54l15_cpuapp_release.conf | 5 ++ ...rf54l15pdk_nrf54l15_cpuapp_release.overlay | 15 +++++ .../pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml | 56 ++++++++++++++++++ ...ic_nrf54l15pdk_nrf54l15_cpuapp_release.yml | 57 ++++++++++--------- samples/matter/lock/README.rst | 2 +- samples/matter/template/README.rst | 32 ++--------- .../boards/nrf54l15pdk_nrf54l15_cpuapp.conf | 4 -- .../nrf54l15pdk_nrf54l15_cpuapp.overlay | 38 ++----------- .../nrf54l15pdk_nrf54l15_cpuapp_release.conf | 3 - ...rf54l15pdk_nrf54l15_cpuapp_release.overlay | 19 +++++++ .../boards/nrf54l15pdk_nrf54l15_cpuapp.conf | 17 ++++++ .../nrf54l15pdk_nrf54l15_cpuapp.overlay | 15 +++++ .../nrf54l15pdk_nrf54l15_cpuapp_release.conf | 5 ++ ...rf54l15pdk_nrf54l15_cpuapp_release.overlay | 15 +++++ ...5pdk_nrf54l15_cpuapp_release_internal.conf | 22 +++++++ ...k_nrf54l15_cpuapp_release_internal.overlay | 12 ++++ .../pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml | 56 ++++++++++++++++++ ...c_nrf54l15pdk_nrf54l15_cpuapp_internal.yml | 51 +++++++++++++++++ ...ic_nrf54l15pdk_nrf54l15_cpuapp_release.yml | 57 ++++++++++--------- samples/matter/thermostat/README.rst | 4 -- .../boards/nrf54l15pdk_nrf54l15_cpuapp.conf | 4 -- .../nrf54l15pdk_nrf54l15_cpuapp.overlay | 40 ++----------- .../nrf54l15pdk_nrf54l15_cpuapp_release.conf | 3 - ...rf54l15pdk_nrf54l15_cpuapp_release.overlay | 15 +++++ .../boards/nrf54l15pdk_nrf54l15_cpuapp.conf | 17 ++++++ .../nrf54l15pdk_nrf54l15_cpuapp.overlay | 15 +++++ .../nrf54l15pdk_nrf54l15_cpuapp_release.conf | 5 ++ ...rf54l15pdk_nrf54l15_cpuapp_release.overlay | 15 +++++ .../pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml | 56 ++++++++++++++++++ ...ic_nrf54l15pdk_nrf54l15_cpuapp_release.yml | 57 ++++++++++--------- samples/matter/window_covering/README.rst | 4 -- .../boards/nrf54l15pdk_nrf54l15_cpuapp.conf | 4 -- .../nrf54l15pdk_nrf54l15_cpuapp_0_2_1.overlay | 37 ++---------- ...5pdk_nrf54l15_cpuapp_0_2_1_release.overlay | 52 +++++++++++++++++ .../nrf54l15pdk_nrf54l15_cpuapp_0_3_0.overlay | 36 ++---------- ...5pdk_nrf54l15_cpuapp_0_3_0_release.overlay | 52 +++++++++++++++++ .../nrf54l15pdk_nrf54l15_cpuapp_release.conf | 3 - .../boards/nrf54l15pdk_nrf54l15_cpuapp.conf | 17 ++++++ .../nrf54l15pdk_nrf54l15_cpuapp.overlay | 15 +++++ .../nrf54l15pdk_nrf54l15_cpuapp_release.conf | 6 +- ...rf54l15pdk_nrf54l15_cpuapp_release.overlay | 15 +++++ .../pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml | 56 ++++++++++++++++++ ...ic_nrf54l15pdk_nrf54l15_cpuapp_release.yml | 57 ++++++++++--------- west.yml | 2 +- 65 files changed, 1068 insertions(+), 443 deletions(-) create mode 100644 samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp_0_2_1_release.overlay create mode 100644 samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp_0_3_0_release.overlay create mode 100644 samples/matter/light_bulb/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf create mode 100644 samples/matter/light_bulb/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay create mode 100644 samples/matter/light_bulb/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay create mode 100644 samples/matter/light_bulb/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml create mode 100644 samples/matter/light_switch/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay create mode 100644 samples/matter/light_switch/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf create mode 100644 samples/matter/light_switch/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay create mode 100644 samples/matter/light_switch/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay create mode 100644 samples/matter/light_switch/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml create mode 100644 samples/matter/template/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay create mode 100644 samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf create mode 100644 samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay create mode 100644 samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay create mode 100644 samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release_internal.conf create mode 100644 samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release_internal.overlay create mode 100644 samples/matter/template/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml create mode 100644 samples/matter/template/pm_static_nrf54l15pdk_nrf54l15_cpuapp_internal.yml create mode 100644 samples/matter/thermostat/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay create mode 100644 samples/matter/thermostat/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf create mode 100644 samples/matter/thermostat/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay create mode 100644 samples/matter/thermostat/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay create mode 100644 samples/matter/thermostat/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml create mode 100644 samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp_0_2_1_release.overlay create mode 100644 samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp_0_3_0_release.overlay create mode 100644 samples/matter/window_covering/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf create mode 100644 samples/matter/window_covering/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay create mode 100644 samples/matter/window_covering/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay create mode 100644 samples/matter/window_covering/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml diff --git a/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst b/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst index b958f1a421c1..1f9ceebebc60 100644 --- a/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst +++ b/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst @@ -547,8 +547,6 @@ Matter samples * :ref:`matter_thermostat_sample` sample. * :ref:`matter_window_covering_sample` sample. - DFU support for the nRF54L15 PDK is available only for the ``release`` build target. - * :ref:`matter_lock_sample` sample: * Added support for emulation of the nRF7001 Wi-Fi companion IC on the nRF7002 DK. diff --git a/samples/matter/light_bulb/README.rst b/samples/matter/light_bulb/README.rst index 6da3b80c4d2c..4bc3dd67047f 100644 --- a/samples/matter/light_bulb/README.rst +++ b/samples/matter/light_bulb/README.rst @@ -115,10 +115,6 @@ Device Firmware Upgrade support :start-after: matter_door_lock_sample_build_with_dfu_start :end-before: matter_door_lock_sample_build_with_dfu_end -.. include:: ../template/README.rst - :start-after: matter_template_nrf54l15_build_with_dfu_start - :end-before: matter_template_nrf54l15_build_with_dfu_end - FEM support =========== diff --git a/samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp.conf b/samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp.conf index 1fd21a283a54..4e253b481958 100644 --- a/samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp.conf +++ b/samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp.conf @@ -7,10 +7,6 @@ # Multirole is the only currently supported role by SoftDevice. CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y -# TODO: Workaround to be removed once DFU and external flash will be supported on nRF54L. -CONFIG_CHIP_OTA_REQUESTOR=n -CONFIG_CHIP_QSPI_NOR=n - CONFIG_FPU=n CONFIG_PM=n CONFIG_HWINFO_NRF=n diff --git a/samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp_0_2_1.overlay b/samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp_0_2_1.overlay index 2e1d158bd33f..7de588dc94b3 100644 --- a/samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp_0_2_1.overlay +++ b/samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp_0_2_1.overlay @@ -8,12 +8,10 @@ chosen { zephyr,console = &uart30; zephyr,shell-uart = &uart30; + nordic,pm-ext-flash = &mx25r64; }; aliases { - factory-data = &factory_data; - factory-data-memory-region = &rram0; - // Configure PWM module for led1 (LED2 on the board) pwm-led1 = &pwm_led1; }; @@ -26,37 +24,11 @@ }; }; -/delete-node/ &rram0; - -&rram_controller { - reg = < 0x5004b000 0x17d000 >; - - rram0: rram@0 { - compatible = "soc-nv-flash"; - erase-block-size = < 0x1000 >; - write-block-size = < 0x10 >; - reg = < 0x0 0x17d000 >; - partitions { - compatible = "fixed-partitions"; - #address-cells = < 0x1 >; - #size-cells = < 0x1 >; - slot0_partition: partition@0 { - label = "image-0"; - reg = < 0x0 0x174000 >; - }; - factory_data: partition@174000 { - label = "factory-data"; - reg = < 0x174000 0x1000 >; - }; - storage_partition: partition@175000 { - label = "storage"; - reg = < 0x175000 0x8000 >; - }; - }; - }; +&uart30 { + status = "okay"; }; -&uart30 { +&mx25r64 { status = "okay"; }; diff --git a/samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp_0_2_1_release.overlay b/samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp_0_2_1_release.overlay new file mode 100644 index 000000000000..011e83bb563c --- /dev/null +++ b/samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp_0_2_1_release.overlay @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; + + aliases { + // Configure PWM module for led1 (LED2 on the board) + pwm-led1 = &pwm_led1; + }; + + pwmleds { + compatible = "pwm-leds"; + pwm_led1: pwm_led_1 { + pwms = <&pwm20 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; + }; + }; +}; + +&mx25r64 { + status = "okay"; +}; + +&pwm20 { + status = "okay"; + pinctrl-0 = <&pwm_default>; + pinctrl-1 = <&pwm_sleep>; + pinctrl-names = "default", "sleep"; +}; + +&pinctrl { + pwm_default: pwm_default { + group1 { + psels = ; + }; + }; + pwm_sleep: pwm_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; diff --git a/samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp_0_3_0.overlay b/samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp_0_3_0.overlay index 13ea020e6ecd..fec015d2fccc 100644 --- a/samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp_0_3_0.overlay +++ b/samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp_0_3_0.overlay @@ -9,12 +9,10 @@ chosen { zephyr,console = &uart30; zephyr,shell-uart = &uart30; + nordic,pm-ext-flash = &mx25r64; }; aliases { - factory-data = &factory_data; - factory-data-memory-region = &rram0; - // Configure PWM module for led1 (LED2 on the board) pwm-led1 = &pwm_led1; }; @@ -27,37 +25,11 @@ }; }; -/delete-node/ &rram0; - -&rram_controller { - reg = < 0x5004b000 0x17d000 >; - - rram0: rram@0 { - compatible = "soc-nv-flash"; - erase-block-size = < 0x1000 >; - write-block-size = < 0x10 >; - reg = < 0x0 0x17d000 >; - partitions { - compatible = "fixed-partitions"; - #address-cells = < 0x1 >; - #size-cells = < 0x1 >; - slot0_partition: partition@0 { - label = "image-0"; - reg = < 0x0 0x174000 >; - }; - factory_data: partition@174000 { - label = "factory-data"; - reg = < 0x174000 0x1000 >; - }; - storage_partition: partition@175000 { - label = "storage"; - reg = < 0x175000 0x8000 >; - }; - }; - }; +&uart30 { + status = "okay"; }; -&uart30 { +&mx25r64 { status = "okay"; }; diff --git a/samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp_0_3_0_release.overlay b/samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp_0_3_0_release.overlay new file mode 100644 index 000000000000..c2482f7ef665 --- /dev/null +++ b/samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp_0_3_0_release.overlay @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; + + aliases { + // Configure PWM module for led1 (LED2 on the board) + pwm-led1 = &pwm_led1; + }; + + pwmleds { + compatible = "pwm-leds"; + pwm_led1: pwm_led_1 { + pwms = <&pwm20 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; + }; + }; +}; + +&mx25r64 { + status = "okay"; +}; + +&pwm20 { + status = "okay"; + pinctrl-0 = <&pwm_default>; + pinctrl-1 = <&pwm_sleep>; + pinctrl-names = "default", "sleep"; +}; + +&pinctrl { + pwm_default: pwm_default { + group1 { + psels = ; + }; + }; + pwm_sleep: pwm_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; diff --git a/samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf b/samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf index ad5fd560f555..4e253b481958 100644 --- a/samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf +++ b/samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf @@ -7,9 +7,6 @@ # Multirole is the only currently supported role by SoftDevice. CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y -# TODO: Workaround to be removed once external flash will be supported on nRF54L. -CONFIG_CHIP_QSPI_NOR=n - CONFIG_FPU=n CONFIG_PM=n CONFIG_HWINFO_NRF=n diff --git a/samples/matter/light_bulb/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf b/samples/matter/light_bulb/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf new file mode 100644 index 000000000000..b0e64c15a998 --- /dev/null +++ b/samples/matter/light_bulb/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf @@ -0,0 +1,17 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# TODO: Workaround Fprotect is not supported on nRF54l15 yet. +CONFIG_FPROTECT=n +# TODO: Workaround, disable memory guard to avoid false faults in application after boot +CONFIG_HW_STACK_PROTECTION=n + +CONFIG_BOOT_WATCHDOG_FEED=n + +CONFIG_GPIO=y + +# Adjust the maximum sectors to the app image size of ~1.4MB +CONFIG_BOOT_MAX_IMG_SECTORS=512 diff --git a/samples/matter/light_bulb/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay b/samples/matter/light_bulb/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay new file mode 100644 index 000000000000..5fdee0c4d89b --- /dev/null +++ b/samples/matter/light_bulb/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; +}; + +&mx25r64 { + status = "okay"; +}; diff --git a/samples/matter/light_bulb/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf b/samples/matter/light_bulb/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf index da29968217bb..b0e64c15a998 100644 --- a/samples/matter/light_bulb/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf +++ b/samples/matter/light_bulb/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf @@ -10,3 +10,8 @@ CONFIG_FPROTECT=n CONFIG_HW_STACK_PROTECTION=n CONFIG_BOOT_WATCHDOG_FEED=n + +CONFIG_GPIO=y + +# Adjust the maximum sectors to the app image size of ~1.4MB +CONFIG_BOOT_MAX_IMG_SECTORS=512 diff --git a/samples/matter/light_bulb/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay b/samples/matter/light_bulb/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay new file mode 100644 index 000000000000..5fdee0c4d89b --- /dev/null +++ b/samples/matter/light_bulb/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; +}; + +&mx25r64 { + status = "okay"; +}; diff --git a/samples/matter/light_bulb/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml b/samples/matter/light_bulb/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml new file mode 100644 index 000000000000..6d7e535ebbdb --- /dev/null +++ b/samples/matter/light_bulb/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml @@ -0,0 +1,56 @@ +mcuboot: + address: 0x0 + region: flash_primary + size: 0xc000 +mcuboot_pad: + address: 0xc000 + region: flash_primary + size: 0x800 +app: + address: 0xc800 + region: flash_primary + size: 0x167800 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0xc000 + region: flash_primary + size: 0x168000 +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0xc800 + region: flash_primary + size: 0x167800 +factory_data: + address: 0x174000 + region: flash_primary + size: 0x1000 +settings_storage: + address: 0x175000 + region: flash_primary + size: 0x8000 +mcuboot_secondary: + address: 0x0 + orig_span: &id003 + - mcuboot_secondary_pad + - mcuboot_secondary_app + region: external_flash + size: 0x168000 + span: *id003 +mcuboot_secondary_pad: + region: external_flash + address: 0x0 + size: 0x800 +mcuboot_secondary_app: + region: external_flash + address: 0x800 + size: 0x167800 +external_flash: + address: 0x168000 + size: 0x698000 + device: MX25R64 + region: external_flash diff --git a/samples/matter/light_bulb/pm_static_nrf54l15pdk_nrf54l15_cpuapp_release.yml b/samples/matter/light_bulb/pm_static_nrf54l15pdk_nrf54l15_cpuapp_release.yml index a28d1effed5f..6d7e535ebbdb 100644 --- a/samples/matter/light_bulb/pm_static_nrf54l15pdk_nrf54l15_cpuapp_release.yml +++ b/samples/matter/light_bulb/pm_static_nrf54l15pdk_nrf54l15_cpuapp_release.yml @@ -1,46 +1,30 @@ mcuboot: address: 0x0 region: flash_primary - size: 0x7000 + size: 0xc000 mcuboot_pad: - address: 0x7000 + address: 0xc000 region: flash_primary size: 0x800 app: - address: 0x7800 + address: 0xc800 region: flash_primary - size: 0xb6000 + size: 0x167800 mcuboot_primary: - address: 0x7000 orig_span: &id001 - - app - mcuboot_pad - region: flash_primary - size: 0xb6800 + - app span: *id001 + address: 0xc000 + region: flash_primary + size: 0x168000 mcuboot_primary_app: - address: 0x7800 orig_span: &id002 - app - region: flash_primary - size: 0xb6000 span: *id002 -mcuboot_secondary: - address: 0xbd800 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: flash_primary - size: 0xb6800 - span: *id003 -mcuboot_secondary_pad: + address: 0xc800 region: flash_primary - address: 0xbd800 - size: 0x800 -mcuboot_secondary_app: - region: flash_primary - address: 0xbe000 - size: 0xb6000 + size: 0x167800 factory_data: address: 0x174000 region: flash_primary @@ -49,3 +33,24 @@ settings_storage: address: 0x175000 region: flash_primary size: 0x8000 +mcuboot_secondary: + address: 0x0 + orig_span: &id003 + - mcuboot_secondary_pad + - mcuboot_secondary_app + region: external_flash + size: 0x168000 + span: *id003 +mcuboot_secondary_pad: + region: external_flash + address: 0x0 + size: 0x800 +mcuboot_secondary_app: + region: external_flash + address: 0x800 + size: 0x167800 +external_flash: + address: 0x168000 + size: 0x698000 + device: MX25R64 + region: external_flash diff --git a/samples/matter/light_switch/README.rst b/samples/matter/light_switch/README.rst index 55a51cc63df8..6b3c4cc4b31b 100644 --- a/samples/matter/light_switch/README.rst +++ b/samples/matter/light_switch/README.rst @@ -127,10 +127,6 @@ Device Firmware Upgrade support :start-after: matter_door_lock_sample_build_with_dfu_start :end-before: matter_door_lock_sample_build_with_dfu_end -.. include:: ../template/README.rst - :start-after: matter_template_nrf54l15_build_with_dfu_start - :end-before: matter_template_nrf54l15_build_with_dfu_end - Factory data support ==================== diff --git a/samples/matter/light_switch/boards/nrf54l15pdk_nrf54l15_cpuapp.conf b/samples/matter/light_switch/boards/nrf54l15pdk_nrf54l15_cpuapp.conf index 1fd21a283a54..4e253b481958 100644 --- a/samples/matter/light_switch/boards/nrf54l15pdk_nrf54l15_cpuapp.conf +++ b/samples/matter/light_switch/boards/nrf54l15pdk_nrf54l15_cpuapp.conf @@ -7,10 +7,6 @@ # Multirole is the only currently supported role by SoftDevice. CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y -# TODO: Workaround to be removed once DFU and external flash will be supported on nRF54L. -CONFIG_CHIP_OTA_REQUESTOR=n -CONFIG_CHIP_QSPI_NOR=n - CONFIG_FPU=n CONFIG_PM=n CONFIG_HWINFO_NRF=n diff --git a/samples/matter/light_switch/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay b/samples/matter/light_switch/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay index e86cd4326bd6..2d62a7771d6e 100644 --- a/samples/matter/light_switch/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay +++ b/samples/matter/light_switch/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay @@ -8,45 +8,15 @@ chosen { zephyr,console = &uart30; zephyr,shell-uart = &uart30; - }; - - aliases { - factory-data = &factory_data; - factory-data-memory-region = &rram0; + nordic,pm-ext-flash = &mx25r64; }; }; -/delete-node/ &rram0; - -&rram_controller { - reg = < 0x5004b000 0x17d000 >; - - rram0: rram@0 { - compatible = "soc-nv-flash"; - erase-block-size = < 0x1000 >; - write-block-size = < 0x10 >; - reg = < 0x0 0x17d000 >; - partitions { - compatible = "fixed-partitions"; - #address-cells = < 0x1 >; - #size-cells = < 0x1 >; - slot0_partition: partition@0 { - label = "image-0"; - reg = < 0x0 0x174000 >; - }; - factory_data: partition@174000 { - label = "factory-data"; - reg = < 0x174000 0x1000 >; - }; - storage_partition: partition@175000 { - label = "storage"; - reg = < 0x175000 0x8000 >; - }; - }; - }; +&uart30 { + status = "okay"; }; -&uart30 { +&mx25r64 { status = "okay"; }; diff --git a/samples/matter/light_switch/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf b/samples/matter/light_switch/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf index ad5fd560f555..4e253b481958 100644 --- a/samples/matter/light_switch/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf +++ b/samples/matter/light_switch/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf @@ -7,9 +7,6 @@ # Multirole is the only currently supported role by SoftDevice. CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y -# TODO: Workaround to be removed once external flash will be supported on nRF54L. -CONFIG_CHIP_QSPI_NOR=n - CONFIG_FPU=n CONFIG_PM=n CONFIG_HWINFO_NRF=n diff --git a/samples/matter/light_switch/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay b/samples/matter/light_switch/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay new file mode 100644 index 000000000000..5fdee0c4d89b --- /dev/null +++ b/samples/matter/light_switch/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; +}; + +&mx25r64 { + status = "okay"; +}; diff --git a/samples/matter/light_switch/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf b/samples/matter/light_switch/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf new file mode 100644 index 000000000000..b0e64c15a998 --- /dev/null +++ b/samples/matter/light_switch/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf @@ -0,0 +1,17 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# TODO: Workaround Fprotect is not supported on nRF54l15 yet. +CONFIG_FPROTECT=n +# TODO: Workaround, disable memory guard to avoid false faults in application after boot +CONFIG_HW_STACK_PROTECTION=n + +CONFIG_BOOT_WATCHDOG_FEED=n + +CONFIG_GPIO=y + +# Adjust the maximum sectors to the app image size of ~1.4MB +CONFIG_BOOT_MAX_IMG_SECTORS=512 diff --git a/samples/matter/light_switch/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay b/samples/matter/light_switch/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay new file mode 100644 index 000000000000..5fdee0c4d89b --- /dev/null +++ b/samples/matter/light_switch/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; +}; + +&mx25r64 { + status = "okay"; +}; diff --git a/samples/matter/light_switch/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf b/samples/matter/light_switch/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf index da29968217bb..b0e64c15a998 100644 --- a/samples/matter/light_switch/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf +++ b/samples/matter/light_switch/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf @@ -10,3 +10,8 @@ CONFIG_FPROTECT=n CONFIG_HW_STACK_PROTECTION=n CONFIG_BOOT_WATCHDOG_FEED=n + +CONFIG_GPIO=y + +# Adjust the maximum sectors to the app image size of ~1.4MB +CONFIG_BOOT_MAX_IMG_SECTORS=512 diff --git a/samples/matter/light_switch/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay b/samples/matter/light_switch/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay new file mode 100644 index 000000000000..5fdee0c4d89b --- /dev/null +++ b/samples/matter/light_switch/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; +}; + +&mx25r64 { + status = "okay"; +}; diff --git a/samples/matter/light_switch/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml b/samples/matter/light_switch/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml new file mode 100644 index 000000000000..6d7e535ebbdb --- /dev/null +++ b/samples/matter/light_switch/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml @@ -0,0 +1,56 @@ +mcuboot: + address: 0x0 + region: flash_primary + size: 0xc000 +mcuboot_pad: + address: 0xc000 + region: flash_primary + size: 0x800 +app: + address: 0xc800 + region: flash_primary + size: 0x167800 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0xc000 + region: flash_primary + size: 0x168000 +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0xc800 + region: flash_primary + size: 0x167800 +factory_data: + address: 0x174000 + region: flash_primary + size: 0x1000 +settings_storage: + address: 0x175000 + region: flash_primary + size: 0x8000 +mcuboot_secondary: + address: 0x0 + orig_span: &id003 + - mcuboot_secondary_pad + - mcuboot_secondary_app + region: external_flash + size: 0x168000 + span: *id003 +mcuboot_secondary_pad: + region: external_flash + address: 0x0 + size: 0x800 +mcuboot_secondary_app: + region: external_flash + address: 0x800 + size: 0x167800 +external_flash: + address: 0x168000 + size: 0x698000 + device: MX25R64 + region: external_flash diff --git a/samples/matter/light_switch/pm_static_nrf54l15pdk_nrf54l15_cpuapp_release.yml b/samples/matter/light_switch/pm_static_nrf54l15pdk_nrf54l15_cpuapp_release.yml index a28d1effed5f..6d7e535ebbdb 100644 --- a/samples/matter/light_switch/pm_static_nrf54l15pdk_nrf54l15_cpuapp_release.yml +++ b/samples/matter/light_switch/pm_static_nrf54l15pdk_nrf54l15_cpuapp_release.yml @@ -1,46 +1,30 @@ mcuboot: address: 0x0 region: flash_primary - size: 0x7000 + size: 0xc000 mcuboot_pad: - address: 0x7000 + address: 0xc000 region: flash_primary size: 0x800 app: - address: 0x7800 + address: 0xc800 region: flash_primary - size: 0xb6000 + size: 0x167800 mcuboot_primary: - address: 0x7000 orig_span: &id001 - - app - mcuboot_pad - region: flash_primary - size: 0xb6800 + - app span: *id001 + address: 0xc000 + region: flash_primary + size: 0x168000 mcuboot_primary_app: - address: 0x7800 orig_span: &id002 - app - region: flash_primary - size: 0xb6000 span: *id002 -mcuboot_secondary: - address: 0xbd800 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: flash_primary - size: 0xb6800 - span: *id003 -mcuboot_secondary_pad: + address: 0xc800 region: flash_primary - address: 0xbd800 - size: 0x800 -mcuboot_secondary_app: - region: flash_primary - address: 0xbe000 - size: 0xb6000 + size: 0x167800 factory_data: address: 0x174000 region: flash_primary @@ -49,3 +33,24 @@ settings_storage: address: 0x175000 region: flash_primary size: 0x8000 +mcuboot_secondary: + address: 0x0 + orig_span: &id003 + - mcuboot_secondary_pad + - mcuboot_secondary_app + region: external_flash + size: 0x168000 + span: *id003 +mcuboot_secondary_pad: + region: external_flash + address: 0x0 + size: 0x800 +mcuboot_secondary_app: + region: external_flash + address: 0x800 + size: 0x167800 +external_flash: + address: 0x168000 + size: 0x698000 + device: MX25R64 + region: external_flash diff --git a/samples/matter/lock/README.rst b/samples/matter/lock/README.rst index bbdffc5bc7e2..23e0b42ec7c3 100644 --- a/samples/matter/lock/README.rst +++ b/samples/matter/lock/README.rst @@ -216,7 +216,7 @@ Device Firmware Upgrade support .. note:: You can enable over-the-air Device Firmware Upgrade only on hardware platforms that have external flash memory. - Currently only nRF52840 DK, nRF5340 DK and nRF7002 DK support Device Firmware Upgrade feature. + Currently only nRF52840 DK, nRF5340 DK, nRF7002 DK and nRF54L15 PDK support Device Firmware Upgrade feature. The sample supports over-the-air (OTA) device firmware upgrade (DFU) using one of the two following protocols: diff --git a/samples/matter/template/README.rst b/samples/matter/template/README.rst index 5d7c2f4c76f8..58f97d8399be 100644 --- a/samples/matter/template/README.rst +++ b/samples/matter/template/README.rst @@ -113,37 +113,17 @@ Device Firmware Upgrade support :start-after: matter_door_lock_sample_build_with_dfu_start :end-before: matter_door_lock_sample_build_with_dfu_end -.. matter_template_nrf54l15_build_with_dfu_start +Alternatively, for the nRF54L15 PDK, the DFU can be configured to only use the internal MRAM for storage. +This means that both the currently running firmware and the new firmware to be updated will be stored within the device's internal flash memory. +This configuration is only available for the ``release`` build variant. -The Device Firmware Upgrade (DFU) for the nRF54L15 PDK is exclusively available for the ``release`` build configuration and is limited to using the internal MRAM for storage. -This means that both the currently running firmware and the new firmware to be updated must be stored within the device's internal flash memory. -Currently, there is no support for utilizing external flash memory for this purpose. - -To build the sample with DFU support, use the ``-DCONF_FILE=prj_release.conf`` flag in your CMake build command. - -The following is an example command to build the sample with support for OTA DFU only: - -.. code-block:: console - - west build -b nrf54l15pdk_nrf54l15_cpuapp -- -DCONF_FILE=prj_release.conf - -If you want to build the sample with support for both OTA DFU and SMP DFU, use the following command: +The following is an example command to build the sample on the nRF54L15 PDK with support for Matter OTA DFU and DFU over Bluetooth® SMP, and using internal MRAM only: .. code-block:: console - west build -b nrf54l15pdk_nrf54l15_cpuapp -- -DCONF_FILE=prj_release.conf -DCONFIG_CHIP_DFU_OVER_BT_SMP=y - -You can disable DFU support for the ``release`` build configuration to double available application memory space. -Do this by setting the :kconfig:option:`CONFIG_CHIP_DFU_OVER_BT_SMP` and :kconfig:option:`CONFIG_CHIP_OTA_REQUESTOR` Kconfig options to ``n``, and removing the :file:`pm_static_nrf54l15pdk_nrf54l15_cpuapp_release.yml` file. - -For example: - -.. code-block:: console - - west build -b nrf54l15pdk_nrf54l15_cpuapp -- -DCONF_FILE=prj_release.conf -DCONFIG_CHIP_DFU_OVER_BT_SMP=n -DCONFIG_CHIP_OTA_REQUESTOR=n - + west build -b nrf54l15pdk_nrf54l15_cpuapp -- -DCONF_FILE=prj_release.conf -DCONFIG_CHIP_DFU_OVER_BT_SMP=y -DPM_STATIC_YML_FILE=pm_static_nrf54l15pdk_nrf54l15_cpuapp_internal.yml -Dmcuboot_EXTRA_CONF_FILE=/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release_internal.conf -Dmcuboot_EXTRA_DTC_OVERLAY_FILE=/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release_internal.overlay -.. matter_template_nrf54l15_build_with_dfu_end +Note that in this case, the size of the application partition is half of what it would be when using a configuration with external flash memory support. FEM support =========== diff --git a/samples/matter/template/boards/nrf54l15pdk_nrf54l15_cpuapp.conf b/samples/matter/template/boards/nrf54l15pdk_nrf54l15_cpuapp.conf index 1fd21a283a54..4e253b481958 100644 --- a/samples/matter/template/boards/nrf54l15pdk_nrf54l15_cpuapp.conf +++ b/samples/matter/template/boards/nrf54l15pdk_nrf54l15_cpuapp.conf @@ -7,10 +7,6 @@ # Multirole is the only currently supported role by SoftDevice. CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y -# TODO: Workaround to be removed once DFU and external flash will be supported on nRF54L. -CONFIG_CHIP_OTA_REQUESTOR=n -CONFIG_CHIP_QSPI_NOR=n - CONFIG_FPU=n CONFIG_PM=n CONFIG_HWINFO_NRF=n diff --git a/samples/matter/template/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay b/samples/matter/template/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay index e86cd4326bd6..2d62a7771d6e 100644 --- a/samples/matter/template/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay +++ b/samples/matter/template/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay @@ -8,45 +8,15 @@ chosen { zephyr,console = &uart30; zephyr,shell-uart = &uart30; - }; - - aliases { - factory-data = &factory_data; - factory-data-memory-region = &rram0; + nordic,pm-ext-flash = &mx25r64; }; }; -/delete-node/ &rram0; - -&rram_controller { - reg = < 0x5004b000 0x17d000 >; - - rram0: rram@0 { - compatible = "soc-nv-flash"; - erase-block-size = < 0x1000 >; - write-block-size = < 0x10 >; - reg = < 0x0 0x17d000 >; - partitions { - compatible = "fixed-partitions"; - #address-cells = < 0x1 >; - #size-cells = < 0x1 >; - slot0_partition: partition@0 { - label = "image-0"; - reg = < 0x0 0x174000 >; - }; - factory_data: partition@174000 { - label = "factory-data"; - reg = < 0x174000 0x1000 >; - }; - storage_partition: partition@175000 { - label = "storage"; - reg = < 0x175000 0x8000 >; - }; - }; - }; +&uart30 { + status = "okay"; }; -&uart30 { +&mx25r64 { status = "okay"; }; diff --git a/samples/matter/template/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf b/samples/matter/template/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf index ad5fd560f555..4e253b481958 100644 --- a/samples/matter/template/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf +++ b/samples/matter/template/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf @@ -7,9 +7,6 @@ # Multirole is the only currently supported role by SoftDevice. CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y -# TODO: Workaround to be removed once external flash will be supported on nRF54L. -CONFIG_CHIP_QSPI_NOR=n - CONFIG_FPU=n CONFIG_PM=n CONFIG_HWINFO_NRF=n diff --git a/samples/matter/template/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay b/samples/matter/template/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay new file mode 100644 index 000000000000..653a25aaae92 --- /dev/null +++ b/samples/matter/template/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; +}; + +&mx25r64 { + status = "okay"; +}; + +&wdt30 { + status = "okay"; +}; diff --git a/samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf b/samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf new file mode 100644 index 000000000000..b0e64c15a998 --- /dev/null +++ b/samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf @@ -0,0 +1,17 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# TODO: Workaround Fprotect is not supported on nRF54l15 yet. +CONFIG_FPROTECT=n +# TODO: Workaround, disable memory guard to avoid false faults in application after boot +CONFIG_HW_STACK_PROTECTION=n + +CONFIG_BOOT_WATCHDOG_FEED=n + +CONFIG_GPIO=y + +# Adjust the maximum sectors to the app image size of ~1.4MB +CONFIG_BOOT_MAX_IMG_SECTORS=512 diff --git a/samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay b/samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay new file mode 100644 index 000000000000..5fdee0c4d89b --- /dev/null +++ b/samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; +}; + +&mx25r64 { + status = "okay"; +}; diff --git a/samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf b/samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf index da29968217bb..b0e64c15a998 100644 --- a/samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf +++ b/samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf @@ -10,3 +10,8 @@ CONFIG_FPROTECT=n CONFIG_HW_STACK_PROTECTION=n CONFIG_BOOT_WATCHDOG_FEED=n + +CONFIG_GPIO=y + +# Adjust the maximum sectors to the app image size of ~1.4MB +CONFIG_BOOT_MAX_IMG_SECTORS=512 diff --git a/samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay b/samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay new file mode 100644 index 000000000000..5fdee0c4d89b --- /dev/null +++ b/samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; +}; + +&mx25r64 { + status = "okay"; +}; diff --git a/samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release_internal.conf b/samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release_internal.conf new file mode 100644 index 000000000000..4cfad00df93c --- /dev/null +++ b/samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release_internal.conf @@ -0,0 +1,22 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# TODO: Workaround Fprotect is not supported on nRF54l15 yet. +CONFIG_FPROTECT=n +# TODO: Workaround, disable memory guard to avoid false faults in application after boot +CONFIG_HW_STACK_PROTECTION=n + +CONFIG_BOOT_WATCHDOG_FEED=n + +# Bootloader size optimization to fit into 28 KB partition. +# These options can be safely disabled because in this configuration, +# the secondary slot resides in the internal MRAM, so features +# needed to handle the external flash are not needed. +CONFIG_GPIO=n +CONFIG_SPI_NOR=n +CONFIG_SPI=n +CONFIG_MULTITHREADING=n +CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=n diff --git a/samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release_internal.overlay b/samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release_internal.overlay new file mode 100644 index 000000000000..3ea47b63e855 --- /dev/null +++ b/samples/matter/template/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release_internal.overlay @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * 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 MRAM. */ +&mx25r64 { + status = "disabled"; +}; diff --git a/samples/matter/template/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml b/samples/matter/template/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml new file mode 100644 index 000000000000..6d7e535ebbdb --- /dev/null +++ b/samples/matter/template/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml @@ -0,0 +1,56 @@ +mcuboot: + address: 0x0 + region: flash_primary + size: 0xc000 +mcuboot_pad: + address: 0xc000 + region: flash_primary + size: 0x800 +app: + address: 0xc800 + region: flash_primary + size: 0x167800 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0xc000 + region: flash_primary + size: 0x168000 +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0xc800 + region: flash_primary + size: 0x167800 +factory_data: + address: 0x174000 + region: flash_primary + size: 0x1000 +settings_storage: + address: 0x175000 + region: flash_primary + size: 0x8000 +mcuboot_secondary: + address: 0x0 + orig_span: &id003 + - mcuboot_secondary_pad + - mcuboot_secondary_app + region: external_flash + size: 0x168000 + span: *id003 +mcuboot_secondary_pad: + region: external_flash + address: 0x0 + size: 0x800 +mcuboot_secondary_app: + region: external_flash + address: 0x800 + size: 0x167800 +external_flash: + address: 0x168000 + size: 0x698000 + device: MX25R64 + region: external_flash diff --git a/samples/matter/template/pm_static_nrf54l15pdk_nrf54l15_cpuapp_internal.yml b/samples/matter/template/pm_static_nrf54l15pdk_nrf54l15_cpuapp_internal.yml new file mode 100644 index 000000000000..a28d1effed5f --- /dev/null +++ b/samples/matter/template/pm_static_nrf54l15pdk_nrf54l15_cpuapp_internal.yml @@ -0,0 +1,51 @@ +mcuboot: + address: 0x0 + region: flash_primary + size: 0x7000 +mcuboot_pad: + address: 0x7000 + region: flash_primary + size: 0x800 +app: + address: 0x7800 + region: flash_primary + size: 0xb6000 +mcuboot_primary: + address: 0x7000 + orig_span: &id001 + - app + - mcuboot_pad + region: flash_primary + size: 0xb6800 + span: *id001 +mcuboot_primary_app: + address: 0x7800 + orig_span: &id002 + - app + region: flash_primary + size: 0xb6000 + span: *id002 +mcuboot_secondary: + address: 0xbd800 + orig_span: &id003 + - mcuboot_secondary_pad + - mcuboot_secondary_app + region: flash_primary + size: 0xb6800 + span: *id003 +mcuboot_secondary_pad: + region: flash_primary + address: 0xbd800 + size: 0x800 +mcuboot_secondary_app: + region: flash_primary + address: 0xbe000 + size: 0xb6000 +factory_data: + address: 0x174000 + region: flash_primary + size: 0x1000 +settings_storage: + address: 0x175000 + region: flash_primary + size: 0x8000 diff --git a/samples/matter/template/pm_static_nrf54l15pdk_nrf54l15_cpuapp_release.yml b/samples/matter/template/pm_static_nrf54l15pdk_nrf54l15_cpuapp_release.yml index a28d1effed5f..6d7e535ebbdb 100644 --- a/samples/matter/template/pm_static_nrf54l15pdk_nrf54l15_cpuapp_release.yml +++ b/samples/matter/template/pm_static_nrf54l15pdk_nrf54l15_cpuapp_release.yml @@ -1,46 +1,30 @@ mcuboot: address: 0x0 region: flash_primary - size: 0x7000 + size: 0xc000 mcuboot_pad: - address: 0x7000 + address: 0xc000 region: flash_primary size: 0x800 app: - address: 0x7800 + address: 0xc800 region: flash_primary - size: 0xb6000 + size: 0x167800 mcuboot_primary: - address: 0x7000 orig_span: &id001 - - app - mcuboot_pad - region: flash_primary - size: 0xb6800 + - app span: *id001 + address: 0xc000 + region: flash_primary + size: 0x168000 mcuboot_primary_app: - address: 0x7800 orig_span: &id002 - app - region: flash_primary - size: 0xb6000 span: *id002 -mcuboot_secondary: - address: 0xbd800 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: flash_primary - size: 0xb6800 - span: *id003 -mcuboot_secondary_pad: + address: 0xc800 region: flash_primary - address: 0xbd800 - size: 0x800 -mcuboot_secondary_app: - region: flash_primary - address: 0xbe000 - size: 0xb6000 + size: 0x167800 factory_data: address: 0x174000 region: flash_primary @@ -49,3 +33,24 @@ settings_storage: address: 0x175000 region: flash_primary size: 0x8000 +mcuboot_secondary: + address: 0x0 + orig_span: &id003 + - mcuboot_secondary_pad + - mcuboot_secondary_app + region: external_flash + size: 0x168000 + span: *id003 +mcuboot_secondary_pad: + region: external_flash + address: 0x0 + size: 0x800 +mcuboot_secondary_app: + region: external_flash + address: 0x800 + size: 0x167800 +external_flash: + address: 0x168000 + size: 0x698000 + device: MX25R64 + region: external_flash diff --git a/samples/matter/thermostat/README.rst b/samples/matter/thermostat/README.rst index bc7202d7f7f6..ff97b9d52cbb 100644 --- a/samples/matter/thermostat/README.rst +++ b/samples/matter/thermostat/README.rst @@ -138,10 +138,6 @@ Device Firmware Upgrade support :start-after: matter_door_lock_sample_build_with_dfu_start :end-before: matter_door_lock_sample_build_with_dfu_end -.. include:: ../template/README.rst - :start-after: matter_template_nrf54l15_build_with_dfu_start - :end-before: matter_template_nrf54l15_build_with_dfu_end - .. _matter_thermostat_network_mode: Remote testing in a network diff --git a/samples/matter/thermostat/boards/nrf54l15pdk_nrf54l15_cpuapp.conf b/samples/matter/thermostat/boards/nrf54l15pdk_nrf54l15_cpuapp.conf index 1fd21a283a54..4e253b481958 100644 --- a/samples/matter/thermostat/boards/nrf54l15pdk_nrf54l15_cpuapp.conf +++ b/samples/matter/thermostat/boards/nrf54l15pdk_nrf54l15_cpuapp.conf @@ -7,10 +7,6 @@ # Multirole is the only currently supported role by SoftDevice. CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y -# TODO: Workaround to be removed once DFU and external flash will be supported on nRF54L. -CONFIG_CHIP_OTA_REQUESTOR=n -CONFIG_CHIP_QSPI_NOR=n - CONFIG_FPU=n CONFIG_PM=n CONFIG_HWINFO_NRF=n diff --git a/samples/matter/thermostat/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay b/samples/matter/thermostat/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay index e86cd4326bd6..2ddd304e18e5 100644 --- a/samples/matter/thermostat/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay +++ b/samples/matter/thermostat/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay @@ -4,49 +4,19 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/ { + / { chosen { zephyr,console = &uart30; zephyr,shell-uart = &uart30; - }; - - aliases { - factory-data = &factory_data; - factory-data-memory-region = &rram0; + nordic,pm-ext-flash = &mx25r64; }; }; -/delete-node/ &rram0; - -&rram_controller { - reg = < 0x5004b000 0x17d000 >; - - rram0: rram@0 { - compatible = "soc-nv-flash"; - erase-block-size = < 0x1000 >; - write-block-size = < 0x10 >; - reg = < 0x0 0x17d000 >; - partitions { - compatible = "fixed-partitions"; - #address-cells = < 0x1 >; - #size-cells = < 0x1 >; - slot0_partition: partition@0 { - label = "image-0"; - reg = < 0x0 0x174000 >; - }; - factory_data: partition@174000 { - label = "factory-data"; - reg = < 0x174000 0x1000 >; - }; - storage_partition: partition@175000 { - label = "storage"; - reg = < 0x175000 0x8000 >; - }; - }; - }; +&uart30 { + status = "okay"; }; -&uart30 { +&mx25r64 { status = "okay"; }; diff --git a/samples/matter/thermostat/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf b/samples/matter/thermostat/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf index ad5fd560f555..4e253b481958 100644 --- a/samples/matter/thermostat/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf +++ b/samples/matter/thermostat/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf @@ -7,9 +7,6 @@ # Multirole is the only currently supported role by SoftDevice. CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y -# TODO: Workaround to be removed once external flash will be supported on nRF54L. -CONFIG_CHIP_QSPI_NOR=n - CONFIG_FPU=n CONFIG_PM=n CONFIG_HWINFO_NRF=n diff --git a/samples/matter/thermostat/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay b/samples/matter/thermostat/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay new file mode 100644 index 000000000000..5fdee0c4d89b --- /dev/null +++ b/samples/matter/thermostat/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; +}; + +&mx25r64 { + status = "okay"; +}; diff --git a/samples/matter/thermostat/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf b/samples/matter/thermostat/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf new file mode 100644 index 000000000000..b0e64c15a998 --- /dev/null +++ b/samples/matter/thermostat/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf @@ -0,0 +1,17 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# TODO: Workaround Fprotect is not supported on nRF54l15 yet. +CONFIG_FPROTECT=n +# TODO: Workaround, disable memory guard to avoid false faults in application after boot +CONFIG_HW_STACK_PROTECTION=n + +CONFIG_BOOT_WATCHDOG_FEED=n + +CONFIG_GPIO=y + +# Adjust the maximum sectors to the app image size of ~1.4MB +CONFIG_BOOT_MAX_IMG_SECTORS=512 diff --git a/samples/matter/thermostat/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay b/samples/matter/thermostat/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay new file mode 100644 index 000000000000..5fdee0c4d89b --- /dev/null +++ b/samples/matter/thermostat/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; +}; + +&mx25r64 { + status = "okay"; +}; diff --git a/samples/matter/thermostat/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf b/samples/matter/thermostat/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf index da29968217bb..b0e64c15a998 100644 --- a/samples/matter/thermostat/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf +++ b/samples/matter/thermostat/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf @@ -10,3 +10,8 @@ CONFIG_FPROTECT=n CONFIG_HW_STACK_PROTECTION=n CONFIG_BOOT_WATCHDOG_FEED=n + +CONFIG_GPIO=y + +# Adjust the maximum sectors to the app image size of ~1.4MB +CONFIG_BOOT_MAX_IMG_SECTORS=512 diff --git a/samples/matter/thermostat/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay b/samples/matter/thermostat/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay new file mode 100644 index 000000000000..5fdee0c4d89b --- /dev/null +++ b/samples/matter/thermostat/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; +}; + +&mx25r64 { + status = "okay"; +}; diff --git a/samples/matter/thermostat/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml b/samples/matter/thermostat/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml new file mode 100644 index 000000000000..6d7e535ebbdb --- /dev/null +++ b/samples/matter/thermostat/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml @@ -0,0 +1,56 @@ +mcuboot: + address: 0x0 + region: flash_primary + size: 0xc000 +mcuboot_pad: + address: 0xc000 + region: flash_primary + size: 0x800 +app: + address: 0xc800 + region: flash_primary + size: 0x167800 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0xc000 + region: flash_primary + size: 0x168000 +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0xc800 + region: flash_primary + size: 0x167800 +factory_data: + address: 0x174000 + region: flash_primary + size: 0x1000 +settings_storage: + address: 0x175000 + region: flash_primary + size: 0x8000 +mcuboot_secondary: + address: 0x0 + orig_span: &id003 + - mcuboot_secondary_pad + - mcuboot_secondary_app + region: external_flash + size: 0x168000 + span: *id003 +mcuboot_secondary_pad: + region: external_flash + address: 0x0 + size: 0x800 +mcuboot_secondary_app: + region: external_flash + address: 0x800 + size: 0x167800 +external_flash: + address: 0x168000 + size: 0x698000 + device: MX25R64 + region: external_flash diff --git a/samples/matter/thermostat/pm_static_nrf54l15pdk_nrf54l15_cpuapp_release.yml b/samples/matter/thermostat/pm_static_nrf54l15pdk_nrf54l15_cpuapp_release.yml index a28d1effed5f..6d7e535ebbdb 100644 --- a/samples/matter/thermostat/pm_static_nrf54l15pdk_nrf54l15_cpuapp_release.yml +++ b/samples/matter/thermostat/pm_static_nrf54l15pdk_nrf54l15_cpuapp_release.yml @@ -1,46 +1,30 @@ mcuboot: address: 0x0 region: flash_primary - size: 0x7000 + size: 0xc000 mcuboot_pad: - address: 0x7000 + address: 0xc000 region: flash_primary size: 0x800 app: - address: 0x7800 + address: 0xc800 region: flash_primary - size: 0xb6000 + size: 0x167800 mcuboot_primary: - address: 0x7000 orig_span: &id001 - - app - mcuboot_pad - region: flash_primary - size: 0xb6800 + - app span: *id001 + address: 0xc000 + region: flash_primary + size: 0x168000 mcuboot_primary_app: - address: 0x7800 orig_span: &id002 - app - region: flash_primary - size: 0xb6000 span: *id002 -mcuboot_secondary: - address: 0xbd800 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: flash_primary - size: 0xb6800 - span: *id003 -mcuboot_secondary_pad: + address: 0xc800 region: flash_primary - address: 0xbd800 - size: 0x800 -mcuboot_secondary_app: - region: flash_primary - address: 0xbe000 - size: 0xb6000 + size: 0x167800 factory_data: address: 0x174000 region: flash_primary @@ -49,3 +33,24 @@ settings_storage: address: 0x175000 region: flash_primary size: 0x8000 +mcuboot_secondary: + address: 0x0 + orig_span: &id003 + - mcuboot_secondary_pad + - mcuboot_secondary_app + region: external_flash + size: 0x168000 + span: *id003 +mcuboot_secondary_pad: + region: external_flash + address: 0x0 + size: 0x800 +mcuboot_secondary_app: + region: external_flash + address: 0x800 + size: 0x167800 +external_flash: + address: 0x168000 + size: 0x698000 + device: MX25R64 + region: external_flash diff --git a/samples/matter/window_covering/README.rst b/samples/matter/window_covering/README.rst index 5be38a33b1fb..9a54b3154281 100644 --- a/samples/matter/window_covering/README.rst +++ b/samples/matter/window_covering/README.rst @@ -98,10 +98,6 @@ Device Firmware Upgrade support :start-after: matter_door_lock_sample_build_with_dfu_start :end-before: matter_door_lock_sample_build_with_dfu_end -.. include:: ../template/README.rst - :start-after: matter_template_nrf54l15_build_with_dfu_start - :end-before: matter_template_nrf54l15_build_with_dfu_end - FEM support =========== diff --git a/samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp.conf b/samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp.conf index 1fd21a283a54..4e253b481958 100644 --- a/samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp.conf +++ b/samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp.conf @@ -7,10 +7,6 @@ # Multirole is the only currently supported role by SoftDevice. CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y -# TODO: Workaround to be removed once DFU and external flash will be supported on nRF54L. -CONFIG_CHIP_OTA_REQUESTOR=n -CONFIG_CHIP_QSPI_NOR=n - CONFIG_FPU=n CONFIG_PM=n CONFIG_HWINFO_NRF=n diff --git a/samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp_0_2_1.overlay b/samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp_0_2_1.overlay index 834ae8c16bf3..83135ef242b3 100644 --- a/samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp_0_2_1.overlay +++ b/samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp_0_2_1.overlay @@ -8,12 +8,10 @@ chosen { zephyr,console = &uart30; zephyr,shell-uart = &uart30; + nordic,pm-ext-flash = &mx25r64; }; aliases { - factory-data = &factory_data; - factory-data-memory-region = &rram0; - // Configure PWM module for led1 (LED2 on the board) pwm-led1 = &pwm_led1; pwm-led2 = &pwm_led2; @@ -30,40 +28,15 @@ }; }; -/delete-node/ &rram0; - -&rram_controller { - reg = < 0x5004b000 0x17d000 >; - - rram0: rram@0 { - compatible = "soc-nv-flash"; - erase-block-size = < 0x1000 >; - write-block-size = < 0x10 >; - reg = < 0x0 0x17d000 >; - partitions { - compatible = "fixed-partitions"; - #address-cells = < 0x1 >; - #size-cells = < 0x1 >; - slot0_partition: partition@0 { - label = "image-0"; - reg = < 0x0 0x174000 >; - }; - factory_data: partition@174000 { - label = "factory-data"; - reg = < 0x174000 0x1000 >; - }; - storage_partition: partition@175000 { - label = "storage"; - reg = < 0x175000 0x8000 >; - }; - }; - }; +&uart30 { + status = "okay"; }; -&uart30 { +&mx25r64 { status = "okay"; }; + &pwm20 { status = "okay"; pinctrl-0 = <&pwm_default>; diff --git a/samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp_0_2_1_release.overlay b/samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp_0_2_1_release.overlay new file mode 100644 index 000000000000..8c6463ff8a88 --- /dev/null +++ b/samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp_0_2_1_release.overlay @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; + + aliases { + // Configure PWM module for led1 (LED2 on the board) + pwm-led1 = &pwm_led1; + pwm-led2 = &pwm_led2; + }; + + 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>; + }; + }; +}; + +&mx25r64 { + status = "okay"; +}; + +&pwm20 { + status = "okay"; + pinctrl-0 = <&pwm_default>; + pinctrl-1 = <&pwm_sleep>; + pinctrl-names = "default", "sleep"; +}; + +&pinctrl { + pwm_default: pwm_default { + group1 { + psels = , ; + }; + }; + pwm_sleep: pwm_sleep { + group1 { + psels = , ; + low-power-enable; + }; + }; +}; diff --git a/samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp_0_3_0.overlay b/samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp_0_3_0.overlay index cdf07a9f9712..568c414876cc 100644 --- a/samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp_0_3_0.overlay +++ b/samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp_0_3_0.overlay @@ -8,12 +8,10 @@ chosen { zephyr,console = &uart30; zephyr,shell-uart = &uart30; + nordic,pm-ext-flash = &mx25r64; }; aliases { - factory-data = &factory_data; - factory-data-memory-region = &rram0; - // Configure PWM module for led1 (LED2 on the board) pwm-led1 = &pwm_led1; pwm-led2 = &pwm_led2; @@ -30,37 +28,11 @@ }; }; -/delete-node/ &rram0; - -&rram_controller { - reg = < 0x5004b000 0x17d000 >; - - rram0: rram@0 { - compatible = "soc-nv-flash"; - erase-block-size = < 0x1000 >; - write-block-size = < 0x10 >; - reg = < 0x0 0x17d000 >; - partitions { - compatible = "fixed-partitions"; - #address-cells = < 0x1 >; - #size-cells = < 0x1 >; - slot0_partition: partition@0 { - label = "image-0"; - reg = < 0x0 0x174000 >; - }; - factory_data: partition@174000 { - label = "factory-data"; - reg = < 0x174000 0x1000 >; - }; - storage_partition: partition@175000 { - label = "storage"; - reg = < 0x175000 0x8000 >; - }; - }; - }; +&uart30 { + status = "okay"; }; -&uart30 { +&mx25r64 { status = "okay"; }; diff --git a/samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp_0_3_0_release.overlay b/samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp_0_3_0_release.overlay new file mode 100644 index 000000000000..fc6d556c517f --- /dev/null +++ b/samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp_0_3_0_release.overlay @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; + + aliases { + // Configure PWM module for led1 (LED2 on the board) + pwm-led1 = &pwm_led1; + pwm-led2 = &pwm_led2; + }; + + 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>; + }; + }; +}; + +&mx25r64 { + status = "okay"; +}; + +&pwm20 { + status = "okay"; + pinctrl-0 = <&pwm_default>; + pinctrl-1 = <&pwm_sleep>; + pinctrl-names = "default", "sleep"; +}; + +&pinctrl { + pwm_default: pwm_default { + group1 { + psels = , ; + }; + }; + pwm_sleep: pwm_sleep { + group1 { + psels = , ; + low-power-enable; + }; + }; +}; diff --git a/samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf b/samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf index ad5fd560f555..4e253b481958 100644 --- a/samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf +++ b/samples/matter/window_covering/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf @@ -7,9 +7,6 @@ # Multirole is the only currently supported role by SoftDevice. CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y -# TODO: Workaround to be removed once external flash will be supported on nRF54L. -CONFIG_CHIP_QSPI_NOR=n - CONFIG_FPU=n CONFIG_PM=n CONFIG_HWINFO_NRF=n diff --git a/samples/matter/window_covering/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf b/samples/matter/window_covering/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf new file mode 100644 index 000000000000..b0e64c15a998 --- /dev/null +++ b/samples/matter/window_covering/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf @@ -0,0 +1,17 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# TODO: Workaround Fprotect is not supported on nRF54l15 yet. +CONFIG_FPROTECT=n +# TODO: Workaround, disable memory guard to avoid false faults in application after boot +CONFIG_HW_STACK_PROTECTION=n + +CONFIG_BOOT_WATCHDOG_FEED=n + +CONFIG_GPIO=y + +# Adjust the maximum sectors to the app image size of ~1.4MB +CONFIG_BOOT_MAX_IMG_SECTORS=512 diff --git a/samples/matter/window_covering/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay b/samples/matter/window_covering/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay new file mode 100644 index 000000000000..5fdee0c4d89b --- /dev/null +++ b/samples/matter/window_covering/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; +}; + +&mx25r64 { + status = "okay"; +}; diff --git a/samples/matter/window_covering/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf b/samples/matter/window_covering/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf index d2992aa2d8a1..b0e64c15a998 100644 --- a/samples/matter/window_covering/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf +++ b/samples/matter/window_covering/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.conf @@ -9,5 +9,9 @@ CONFIG_FPROTECT=n # TODO: Workaround, disable memory guard to avoid false faults in application after boot CONFIG_HW_STACK_PROTECTION=n -CONFIG_SPI_NOR=n CONFIG_BOOT_WATCHDOG_FEED=n + +CONFIG_GPIO=y + +# Adjust the maximum sectors to the app image size of ~1.4MB +CONFIG_BOOT_MAX_IMG_SECTORS=512 diff --git a/samples/matter/window_covering/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay b/samples/matter/window_covering/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay new file mode 100644 index 000000000000..5fdee0c4d89b --- /dev/null +++ b/samples/matter/window_covering/child_image/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp_release.overlay @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; +}; + +&mx25r64 { + status = "okay"; +}; diff --git a/samples/matter/window_covering/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml b/samples/matter/window_covering/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml new file mode 100644 index 000000000000..6d7e535ebbdb --- /dev/null +++ b/samples/matter/window_covering/pm_static_nrf54l15pdk_nrf54l15_cpuapp.yml @@ -0,0 +1,56 @@ +mcuboot: + address: 0x0 + region: flash_primary + size: 0xc000 +mcuboot_pad: + address: 0xc000 + region: flash_primary + size: 0x800 +app: + address: 0xc800 + region: flash_primary + size: 0x167800 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0xc000 + region: flash_primary + size: 0x168000 +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0xc800 + region: flash_primary + size: 0x167800 +factory_data: + address: 0x174000 + region: flash_primary + size: 0x1000 +settings_storage: + address: 0x175000 + region: flash_primary + size: 0x8000 +mcuboot_secondary: + address: 0x0 + orig_span: &id003 + - mcuboot_secondary_pad + - mcuboot_secondary_app + region: external_flash + size: 0x168000 + span: *id003 +mcuboot_secondary_pad: + region: external_flash + address: 0x0 + size: 0x800 +mcuboot_secondary_app: + region: external_flash + address: 0x800 + size: 0x167800 +external_flash: + address: 0x168000 + size: 0x698000 + device: MX25R64 + region: external_flash diff --git a/samples/matter/window_covering/pm_static_nrf54l15pdk_nrf54l15_cpuapp_release.yml b/samples/matter/window_covering/pm_static_nrf54l15pdk_nrf54l15_cpuapp_release.yml index a28d1effed5f..6d7e535ebbdb 100644 --- a/samples/matter/window_covering/pm_static_nrf54l15pdk_nrf54l15_cpuapp_release.yml +++ b/samples/matter/window_covering/pm_static_nrf54l15pdk_nrf54l15_cpuapp_release.yml @@ -1,46 +1,30 @@ mcuboot: address: 0x0 region: flash_primary - size: 0x7000 + size: 0xc000 mcuboot_pad: - address: 0x7000 + address: 0xc000 region: flash_primary size: 0x800 app: - address: 0x7800 + address: 0xc800 region: flash_primary - size: 0xb6000 + size: 0x167800 mcuboot_primary: - address: 0x7000 orig_span: &id001 - - app - mcuboot_pad - region: flash_primary - size: 0xb6800 + - app span: *id001 + address: 0xc000 + region: flash_primary + size: 0x168000 mcuboot_primary_app: - address: 0x7800 orig_span: &id002 - app - region: flash_primary - size: 0xb6000 span: *id002 -mcuboot_secondary: - address: 0xbd800 - orig_span: &id003 - - mcuboot_secondary_pad - - mcuboot_secondary_app - region: flash_primary - size: 0xb6800 - span: *id003 -mcuboot_secondary_pad: + address: 0xc800 region: flash_primary - address: 0xbd800 - size: 0x800 -mcuboot_secondary_app: - region: flash_primary - address: 0xbe000 - size: 0xb6000 + size: 0x167800 factory_data: address: 0x174000 region: flash_primary @@ -49,3 +33,24 @@ settings_storage: address: 0x175000 region: flash_primary size: 0x8000 +mcuboot_secondary: + address: 0x0 + orig_span: &id003 + - mcuboot_secondary_pad + - mcuboot_secondary_app + region: external_flash + size: 0x168000 + span: *id003 +mcuboot_secondary_pad: + region: external_flash + address: 0x0 + size: 0x800 +mcuboot_secondary_app: + region: external_flash + address: 0x800 + size: 0x167800 +external_flash: + address: 0x168000 + size: 0x698000 + device: MX25R64 + region: external_flash diff --git a/west.yml b/west.yml index 0b9ec191b333..6ae248c90384 100644 --- a/west.yml +++ b/west.yml @@ -160,7 +160,7 @@ manifest: - name: matter repo-path: sdk-connectedhomeip path: modules/lib/matter - revision: a497f79deea945a73b8a632166b26dad6e9dc10d + revision: f6d17b42b1aa33efc34b90e1e6cd7e5830ba8a89 west-commands: scripts/west/west-commands.yml submodules: - name: nlio