Skip to content

Commit

Permalink
samples: nrf54l10 uses external flash
Browse files Browse the repository at this point in the history
[KRKNWK-19709]
Add external flash support for nRF54L10
And fix typo in dfu Kconfig

Signed-off-by: Krzysztof Taborowski <[email protected]>
  • Loading branch information
ktaborowski committed Nov 29, 2024
1 parent 5eceab9 commit 6cfd5d7
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 59 deletions.
4 changes: 2 additions & 2 deletions samples/sid_end_device/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ config DFU_MULTI_IMAGE_PACKAGE_APP
default y

config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY
default y if BOARD_NRF52840DK_NRF52840 || BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_THINGY53_NRF5340_CPUAPP
default y if !BOARD_NRF54L15DK_NRF54L15_CPUAPP || !BOARD_NRF54L15DK_NRF54L15_CPUAPP_NS

if (BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_THINGY53_NRF5340_CPUAPP)

Expand All @@ -50,7 +50,7 @@ config DFU_MULTI_IMAGE_PACKAGE_NET

endif # (BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_THINGY53_NRF5340_CPUAPP)

if (BOARD_NRF54L15DK_NRF54L15_CPUAPP || BOARD_NRF54L15DK_NRF54L15_CPUAPP_NS)
if (BOARD_NRF54L15DK_NRF54L15_CPUAPP || BOARD_NRF54L15DK_NRF54L15_CPUAPP_NS || BOARD_NRF54L15DK_NRF54L10_CPUAPP)

# TODO: NCSDK-28931: Cannot use fprotect twice, so disable it in MCUboot to
# test protecting factory data. It can be enabled while there is a support
Expand Down
7 changes: 7 additions & 0 deletions samples/sid_end_device/boards/nrf54l15dk_nrf54l10_cpuapp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,10 @@
#

CONFIG_POWEROFF=y

# nRF54L15DK uses SPI NOR external flash for DFU
CONFIG_SPI=y
CONFIG_SPI_NOR=y
CONFIG_MULTITHREADING=y
CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y
CONFIG_MCUMGR_GRP_IMG_ALLOW_ERASE_PENDING=y
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
label = "semtech_sx1262 DIO1";
};
};

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

sid_semtech: &spi30 {
Expand Down Expand Up @@ -89,6 +93,9 @@ sid_semtech: &spi30 {
&spi22 {
status = "disabled";
};
&mx25r64 {
status = "okay";
};

// TODO: re-enable HWFC once it's fixed
&uart20 {
Expand Down
43 changes: 20 additions & 23 deletions samples/sid_end_device/pm_static_nrf54l15dk_nrf54l10_cpuapp.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
app:
address: 0xc800
end_address: 0x84800
end_address: 0xfd000
region: flash_primary
size: 0x78000
size: 0xf0800
mcuboot:
address: 0x0
end_address: 0xc000
Expand All @@ -21,46 +21,43 @@ mcuboot_pad:
size: 0x800
mcuboot_primary:
address: 0xc000
end_address: 0x84800
end_address: 0xfd000
orig_span: &id001
- mcuboot_pad
- app
region: flash_primary
sharers: 0x1
size: 0x78800
size: 0xf1000
span: *id001
mcuboot_primary_app:
address: 0xc800
end_address: 0x84800
end_address: 0xfd000
orig_span: &id002
- app
region: flash_primary
size: 0x78000
size: 0xf0800
span: *id002
mcuboot_secondary:
address: 0x84800
end_address: 0xfd000
settings_storage:
address: 0xfd000
end_address: 0xff000
placement:
after:
- mcuboot_primary
align:
start: 0x1000
before:
- end
region: flash_primary
share_size:
- mcuboot_primary
size: 0x78800
size: 0x2000
mfg_storage:
address: 0xff000
end_address: 0x100000
region: flash_primary
size: 0x1000
settings_storage:
address: 0xfd000
end_address: 0xff000
mcuboot_secondary:
address: 0x0
end_address: 0xf1000
placement:
align:
start: 0x1000
before:
- end
region: flash_primary
size: 0x2000
start: 0x4
region: external_flash
share_size:
- mcuboot_primary
size: 0xf1000
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ CONFIG_BOOT_WATCHDOG_FEED=n

CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y

# Ensure that the qspi driver is disabled by default
CONFIG_SPI=n
CONFIG_SPI_NOR=n
CONFIG_NORDIC_QSPI_NOR=n
# nRF54L15DK uses SPI NOR external flash
CONFIG_GPIO=y
CONFIG_SPI=y
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_SFDP_DEVICETREE=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096

# required by SPI driver
CONFIG_MULTITHREADING=y
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

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

/* Application does not use cpuflpr core. Assign whole RRAM and RAM to cpuapp. */
&cpuapp_rram {
Expand All @@ -15,34 +20,6 @@
ranges = <0x0 0x20000000 DT_SIZE_K(192)>;
};

&adc {
status = "disabled";
};
&uart21 {
status = "disabled";
};
&pwm20 {
status = "disabled";
};
&i2c20 {
status = "disabled";
};
&spi00 {
status = "disabled";
};
&spi20 {
status = "disabled";
};
&spi21 {
status = "disabled";
};
&spi22 {
status = "disabled";
};

/* Disable the external flash, as it's not needed
for the configuration with secondary slot residing
in the internal MRAM. */
&mx25r64 {
status = "disabled";
status = "okay";
};
11 changes: 10 additions & 1 deletion utils/sidewalk_dfu/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ config SIDEWALK_DFU_BOOTLOADER
imply EXTRA_EXCEPTION_INFO

config SIDEWALK_DFU_SERVICE_BLE
bool "DFU sericve over BLE"
bool "DFU service over BLE"
default SIDEWALK_DFU
imply MCUMGR
imply MCUMGR_GRP_IMG
Expand All @@ -40,6 +40,15 @@ config SIDEWALK_DFU_SERVICE_BLE
help
Use Zephyr SMP Service as image upload methode for Sidewalk.

config SIDEWALK_DFU_SPI_NOR
bool "DFU service using SPI NOR"
default SIDEWALK_DFU
imply SPI
imply SPI_NOR
imply MULTITHREADING
imply PM_OVERRIDE_EXTERNAL_DRIVER_CHECK
imply MCUMGR_GRP_IMG_ALLOW_ERASE_PENDING

config SIDEWALK_DFU_IMG_UTILS
bool "Utils for dfu images management"
help
Expand Down

0 comments on commit 6cfd5d7

Please sign in to comment.