From 8ad5f2f7979f6ac0950e70135c535c558fbe2e97 Mon Sep 17 00:00:00 2001 From: Markus Swarowsky Date: Mon, 27 May 2024 14:48:12 +0200 Subject: [PATCH] [noup] nordic_nrf: 54l: Add TIMER00 config for regression tests fixup! [nrf noup] platform: nordic_nrf: Add support for 54l Adding missing definitions for UART ports to build the regression tests Ref: NCSDK-27431 Signed-off-by: Markus Swarowsky --- platform/ext/target/nordic_nrf/common/core/target_cfg.c | 7 +++++++ .../common/nrf54l15/tfm_peripherals_config_nrf54l15.h | 4 ++++ .../nordic_nrf/common/nrf54l15/tfm_peripherals_def.h | 4 ++-- .../nrf54l15dk_nrf54l15_cpuapp/tfm_peripherals_config.h | 4 ++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/platform/ext/target/nordic_nrf/common/core/target_cfg.c b/platform/ext/target/nordic_nrf/common/core/target_cfg.c index cf0dd2b28..5c40f70f9 100644 --- a/platform/ext/target/nordic_nrf/common/core/target_cfg.c +++ b/platform/ext/target/nordic_nrf/common/core/target_cfg.c @@ -317,6 +317,13 @@ struct platform_data_t tfm_peripheral_timer0 = { }; #endif +#if TFM_PERIPHERAL_TIMER00_SECURE +struct platform_data_t tfm_peripheral_timer00 = { + NRF_TIMER00_S_BASE, + NRF_TIMER00_S_BASE + (sizeof(NRF_TIMER_Type) - 1), +}; +#endif + #if TFM_PERIPHERAL_TIMER1_SECURE struct platform_data_t tfm_peripheral_timer1 = { NRF_TIMER1_S_BASE, diff --git a/platform/ext/target/nordic_nrf/common/nrf54l15/tfm_peripherals_config_nrf54l15.h b/platform/ext/target/nordic_nrf/common/nrf54l15/tfm_peripherals_config_nrf54l15.h index c6dec9b93..12f3a003c 100644 --- a/platform/ext/target/nordic_nrf/common/nrf54l15/tfm_peripherals_config_nrf54l15.h +++ b/platform/ext/target/nordic_nrf/common/nrf54l15/tfm_peripherals_config_nrf54l15.h @@ -1,4 +1,8 @@ +#ifndef TFM_PERIPHERAL_TIMER00_SECURE +#define TFM_PERIPHERAL_TIMER00_SECURE 0 +#endif + #ifndef TFM_PERIPHERAL_UARTE00_SECURE #define TFM_PERIPHERAL_UARTE00_SECURE 0 #endif diff --git a/platform/ext/target/nordic_nrf/common/nrf54l15/tfm_peripherals_def.h b/platform/ext/target/nordic_nrf/common/nrf54l15/tfm_peripherals_def.h index 8eacfe064..e4bf94811 100644 --- a/platform/ext/target/nordic_nrf/common/nrf54l15/tfm_peripherals_def.h +++ b/platform/ext/target/nordic_nrf/common/nrf54l15/tfm_peripherals_def.h @@ -18,9 +18,9 @@ extern "C" { #define TFM_TIMER0_IRQ (NRFX_IRQ_NUMBER_GET(NRF_TIMER0)) -extern struct platform_data_t tfm_peripheral_timer0; +extern struct platform_data_t tfm_peripheral_timer00; -#define TFM_PERIPHERAL_TIMER0 (&tfm_peripheral_timer0) +#define TFM_PERIPHERAL_TIMER00 (&tfm_peripheral_timer00) /* * Quantized default IRQ priority, the value is: diff --git a/platform/ext/target/nordic_nrf/nrf54l15dk_nrf54l15_cpuapp/tfm_peripherals_config.h b/platform/ext/target/nordic_nrf/nrf54l15dk_nrf54l15_cpuapp/tfm_peripherals_config.h index 1ed07d120..bc3301087 100644 --- a/platform/ext/target/nordic_nrf/nrf54l15dk_nrf54l15_cpuapp/tfm_peripherals_config.h +++ b/platform/ext/target/nordic_nrf/nrf54l15dk_nrf54l15_cpuapp/tfm_peripherals_config.h @@ -16,6 +16,10 @@ extern "C" { #define TFM_PERIPHERAL_UARTE30_SECURE 1 #endiff +#if TFM_PARTITION_SLIH_TEST || TFM_PARTITION_FLIH_TEST +#define TFM_PERIPHERAL_TIMER00_SECURE 1 +#endif + #if defined(NRF54L15_ENGA_XXAA) #include