Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samples: matter: rework PM static partitions for nRF54L #15340

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -619,8 +619,6 @@ Matter samples that used :ref:`zephyr:nrf-ieee802154-rpmsg-sample` or :ref:`mult
* :ref:`matter_thermostat_sample` sample.
* :ref:`matter_window_covering_sample` sample.

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

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

* :ref:`matter_lock_sample` sample:
Expand Down
11 changes: 4 additions & 7 deletions samples/matter/light_bulb/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@ config MATTER_FACTORY_DATA
default y if !BOARD_NRF21540DK

choice BOOTLOADER
default BOOTLOADER_MCUBOOT if !BOARD_NRF21540DK && !BOARD_NRF54L15PDK_NRF54L15_CPUAPP
default BOOTLOADER_MCUBOOT if !BOARD_NRF21540DK
endchoice

config PARTITION_MANAGER
default n if BOARD_NRF54L15PDK_NRF54L15_CPUAPP

if BOOTLOADER_MCUBOOT

config DFU_MULTI_IMAGE_PACKAGE_BUILD
Expand Down Expand Up @@ -56,11 +53,11 @@ config NETCORE_APP_UPDATE
config DFU_MULTI_IMAGE_PACKAGE_NET
default y

endif # BOOTLOADER_MCUBOOT

endif # (BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF5340_CPUAPP)

endif # BOOTLOADER_MCUBOOT

config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY
default y if BOARD_NRF52840DK_NRF52840 || BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF5340_CPUAPP
default y if BOARD_NRF52840DK_NRF52840 || BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF5340_CPUAPP || BOARD_NRF54L15PDK_NRF54L15_CPUAPP

source "${ZEPHYR_BASE}/share/sysbuild/Kconfig"
4 changes: 0 additions & 4 deletions samples/matter/light_bulb/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
===========

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@


/ {
aliases {
factory-data = &factory_data;
factory-data-memory-region = &cpuapp_rram;
chosen {
nordic,pm-ext-flash = &mx25r64;
};

aliases {
// Configure PWM module for led1 (LED2 on the board)
pwm-led1 = &pwm_led1;

Expand All @@ -25,34 +26,23 @@
};
};

/delete-node/ &cpuapp_rram;
// 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>;
};

&rram_controller {
reg = < 0x5004b000 0x17d000 >;
// TODO: re-enable HWFC once it's fixed
&uart20 {
/delete-property/ hw-flow-control;
};

cpuapp_rram: 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 >;
};
};
};
&mx25r64 {
status = "okay";
};

&pwm20 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
*/

/ {
aliases {
factory-data = &factory_data;
factory-data-memory-region = &cpuapp_rram;
chosen {
nordic,pm-ext-flash = &mx25r64;
};

aliases {
// Configure PWM module for led1 (LED2 on the board)
pwm-led1 = &pwm_led1;

Expand All @@ -24,34 +25,23 @@
};
};

/delete-node/ &cpuapp_rram;
// 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>;
};

&rram_controller {
reg = < 0x5004b000 0x17d000 >;
// TODO: re-enable HWFC once it's fixed
&uart20 {
/delete-property/ hw-flow-control;
};

cpuapp_rram: 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 >;
};
};
};
&mx25r64 {
status = "okay";
};

&pwm20 {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,18 @@ CONFIG_FPROTECT=n
CONFIG_HW_STACK_PROTECTION=n

CONFIG_BOOT_WATCHDOG_FEED=n

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

# required by SPI driver
CONFIG_MULTITHREADING=y

CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y

# Adjust the maximum sectors to the app image size of ~1.4MB
CONFIG_BOOT_MAX_IMG_SECTORS=512
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

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

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

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

&mx25r64 {
status = "okay";
};
11 changes: 4 additions & 7 deletions samples/matter/light_switch/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@ config MATTER_FACTORY_DATA
default y if !BOARD_NRF21540DK

choice BOOTLOADER
default BOOTLOADER_MCUBOOT if !BOARD_NRF21540DK && !BOARD_NRF54L15PDK_NRF54L15_CPUAPP
default BOOTLOADER_MCUBOOT if !BOARD_NRF21540DK
endchoice

config PARTITION_MANAGER
default n if BOARD_NRF54L15PDK_NRF54L15_CPUAPP

if BOOTLOADER_MCUBOOT

config DFU_MULTI_IMAGE_PACKAGE_BUILD
Expand Down Expand Up @@ -56,11 +53,11 @@ config NETCORE_APP_UPDATE
config DFU_MULTI_IMAGE_PACKAGE_NET
default y

endif # BOOTLOADER_MCUBOOT

endif # (BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF5340_CPUAPP)

endif # BOOTLOADER_MCUBOOT

config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY
default y if BOARD_NRF52840DK_NRF52840 || BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF5340_CPUAPP
default y if BOARD_NRF52840DK_NRF52840 || BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF5340_CPUAPP || BOARD_NRF54L15PDK_NRF54L15_CPUAPP

source "${ZEPHYR_BASE}/share/sysbuild/Kconfig"
4 changes: 0 additions & 4 deletions samples/matter/light_switch/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
====================

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading
Loading