From 78b925d60e2d760bf9156e2915b4b8e1f511580f Mon Sep 17 00:00:00 2001 From: Mateusz Michalek Date: Tue, 9 Jan 2024 08:30:58 +0100 Subject: [PATCH 1/3] [nrf fromtree] boot: zephyr: moonlight watchdogs adding WATCHDOG_FEED support for WDT30 and WDT31 Signed-off-by: Mateusz Michalek (cherry picked from commit c3a72e9daf8f94a7c3b0dc91cc19e2bb15b7110a) Signed-off-by: Andrzej Puzdrowski --- boot/zephyr/Kconfig | 3 +++ .../include/mcuboot_config/mcuboot_config.h | 16 ++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/boot/zephyr/Kconfig b/boot/zephyr/Kconfig index 8472294d3..f69790e74 100644 --- a/boot/zephyr/Kconfig +++ b/boot/zephyr/Kconfig @@ -1,5 +1,6 @@ # Copyright (c) 2017-2020 Linaro Limited # Copyright (c) 2020 Arm Limited +# Copyright (c) 2023 Nordic Semiconductor ASA # # SPDX-License-Identifier: Apache-2.0 # @@ -651,6 +652,8 @@ config BOOT_WATCHDOG_FEED imply NRFX_WDT if SOC_FAMILY_NRF imply NRFX_WDT0 if SOC_FAMILY_NRF imply NRFX_WDT1 if SOC_FAMILY_NRF + imply NRFX_WDT30 if SOC_FAMILY_NRF + imply NRFX_WDT31 if SOC_FAMILY_NRF help Enables implementation of MCUBOOT_WATCHDOG_FEED() macro which is used to feed watchdog while doing time consuming operations. diff --git a/boot/zephyr/include/mcuboot_config/mcuboot_config.h b/boot/zephyr/include/mcuboot_config/mcuboot_config.h index 0cf2e6060..375088741 100644 --- a/boot/zephyr/include/mcuboot_config/mcuboot_config.h +++ b/boot/zephyr/include/mcuboot_config/mcuboot_config.h @@ -324,9 +324,21 @@ #elif defined(CONFIG_NRFX_WDT0) #define MCUBOOT_WATCHDOG_FEED() \ FEED_WDT_INST(0); -#else /* defined(CONFIG_NRFX_WDT0) && defined(CONFIG_NRFX_WDT1) */ +#elif defined(CONFIG_NRFX_WDT30) && defined(CONFIG_NRFX_WDT31) +#define MCUBOOT_WATCHDOG_FEED() \ + do { \ + FEED_WDT_INST(30); \ + FEED_WDT_INST(31); \ + } while (0) +#elif defined(CONFIG_NRFX_WDT30) +#define MCUBOOT_WATCHDOG_FEED() \ + FEED_WDT_INST(30); +#elif defined(CONFIG_NRFX_WDT31) +#define MCUBOOT_WATCHDOG_FEED() \ + FEED_WDT_INST(31); +#else #error "No NRFX WDT instances enabled" -#endif /* defined(CONFIG_NRFX_WDT0) && defined(CONFIG_NRFX_WDT1) */ +#endif #elif DT_NODE_HAS_STATUS(DT_ALIAS(watchdog0), okay) /* CONFIG_NRFX_WDT */ #include From 2ba5fedb5c2f2f0519a81dad8499b2d623c4f670 Mon Sep 17 00:00:00 2001 From: Mateusz Michalek Date: Wed, 22 Nov 2023 15:20:52 +0000 Subject: [PATCH 2/3] [nrf fromtree] zephyr: Add NRF54L configuration Adds default Kconfig configuration that allows to build MCUboot for NRF54L. Currently this configuration turns off WDT and FPROTECT, which is TODO to fix. Signed-off-by: Dominik Ermel Signed-off-by: Mateusz Michalek (cherry picked from commit 4b4cc85c67bf5689ce0b35d088ca7f35809b5a82) Signed-off-by: Andrzej Puzdrowski --- boot/zephyr/boards/nrf54l15dk_nrf54l15_cpuapp.conf | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 boot/zephyr/boards/nrf54l15dk_nrf54l15_cpuapp.conf diff --git a/boot/zephyr/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/boot/zephyr/boards/nrf54l15dk_nrf54l15_cpuapp.conf new file mode 100644 index 000000000..59a549113 --- /dev/null +++ b/boot/zephyr/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -0,0 +1,12 @@ +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: Apache-2.0 +# +CONFIG_BOOT_MAX_IMG_SECTORS=256 + +# Ensure that the qspi driver is disabled by default +CONFIG_NORDIC_QSPI_NOR=n + +# TODO: below are not yet supported and need fixing +CONFIG_FPROTECT=n +CONFIG_BOOT_WATCHDOG_FEED=n From c9920502af1b53a4d5314dbbe8a4cfbd33564b66 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Thu, 15 Feb 2024 17:01:36 +0100 Subject: [PATCH 3/3] [nrf fromlist] zephyr/boards: nrf54l15pdk_nrf54l15_cpuapp config Upstream PR: https://github.com/mcu-tools/mcuboot/pull/1901 Renamed the DK config file to proper name. Signed-off-by: Andrzej Puzdrowski (cherry picked from commit bd1464f69934ff37f91321da397fb1398907c946) --- ...15dk_nrf54l15_cpuapp.conf => nrf54l15pdk_nrf54l15_cpuapp.conf} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename boot/zephyr/boards/{nrf54l15dk_nrf54l15_cpuapp.conf => nrf54l15pdk_nrf54l15_cpuapp.conf} (100%) diff --git a/boot/zephyr/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/boot/zephyr/boards/nrf54l15pdk_nrf54l15_cpuapp.conf similarity index 100% rename from boot/zephyr/boards/nrf54l15dk_nrf54l15_cpuapp.conf rename to boot/zephyr/boards/nrf54l15pdk_nrf54l15_cpuapp.conf