Skip to content

Commit

Permalink
[noup] nordic_nrf: 54l Add UARTE defines to peripherals config
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mswarowsky committed May 29, 2024
1 parent 92a5b4f commit 27cf237
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

include(${PLATFORM_PATH}/common/core/config.cmake)

set(SECURE_UART1 ON CACHE BOOL "Enable secure UART1")
set(SECURE_UART30 ON CACHE BOOL "Enable secure UART")
set(NRF_NS_STORAGE OFF CACHE BOOL "Enable non-secure storage partition")
set(BL2 OFF CACHE BOOL "Whether to build BL2")
set(NRF_NS_SECONDARY OFF CACHE BOOL "Enable non-secure secondary partition")
15 changes: 15 additions & 0 deletions platform/ext/target/nordic_nrf/common/nrf54l15/mmio_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,21 @@ const uintptr_t partition_named_mmio_list[] = {
#if TFM_PERIPHERAL_TIMER00_SECURE
(uintptr_t)TFM_PERIPHERAL_TIMER00,
#endif
#if TFM_PERIPHERAL_UARTE00_SECURE
(uintptr_t)TFM_PERIPHERAL_UARTE00,
#endif
#if TFM_PERIPHERAL_UARTE20_SECURE
(uintptr_t)TFM_PERIPHERAL_UARTE20,
#endif
#if TFM_PERIPHERAL_UARTE21_SECURE
(uintptr_t)TFM_PERIPHERAL_UARTE21,
#endif
#if TFM_PERIPHERAL_UARTE22_SECURE
(uintptr_t)TFM_PERIPHERAL_UARTE22,
#endif
#if TFM_PERIPHERAL_UARTE30_SECURE
(uintptr_t)TFM_PERIPHERAL_UARTE30,
#endif
};

#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

#ifndef TFM_PERIPHERAL_UARTE00_SECURE
#define TFM_PERIPHERAL_UARTE00_SECURE 0
#endif

#ifndef TFM_PERIPHERAL_UARTE20_SECURE
#define TFM_PERIPHERAL_UARTE20_SECURE 0
#endif

#ifndef TFM_PERIPHERAL_UARTE21_SECURE
#define TFM_PERIPHERAL_UARTE21_SECURE 0
#endif

#ifndef TFM_PERIPHERAL_UARTE22_SECURE
#define TFM_PERIPHERAL_UARTE22_SECURE 0
#endif

#ifndef TFM_PERIPHERAL_UARTE30_SECURE
#define TFM_PERIPHERAL_UARTE30_SECURE 0
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,19 @@ extern struct platform_data_t tfm_peripheral_timer0;
*/
#define DEFAULT_IRQ_PRIORITY (1UL << (__NVIC_PRIO_BITS - 2))

#define TFM_PERIPHERAL_STD_UART TFM_PERIPHERAL_UARTE1
extern struct platform_data_t tfm_peripheral_uarte00;
extern struct platform_data_t tfm_peripheral_uarte20;
extern struct platform_data_t tfm_peripheral_uarte21;
extern struct platform_data_t tfm_peripheral_uarte22;
extern struct platform_data_t tfm_peripheral_uarte30;

#define TFM_PERIPHERAL_UARTE00 (&tfm_peripheral_uarte00)
#define TFM_PERIPHERAL_UARTE20 (&tfm_peripheral_uarte20)
#define TFM_PERIPHERAL_UARTE21 (&tfm_peripheral_uarte21)
#define TFM_PERIPHERAL_UARTE22 (&tfm_peripheral_uarte22)
#define TFM_PERIPHERAL_UARTE30 (&tfm_peripheral_uarte30)

#define TFM_PERIPHERAL_STD_UART TFM_PERIPHERAL_UARTE30

#ifdef PSA_API_TEST_IPC
/* see other platforms when supporting this */
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright (c) 2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
*/

#ifndef TFM_PERIPHERALS_CONFIG_H__
#define TFM_PERIPHERALS_CONFIG_H__

#ifdef __cplusplus
extern "C" {
#endif

#ifdef SECURE_UART30
#define TFM_PERIPHERAL_UARTE30_SECURE 1
#endiff


#if defined(NRF54L15_ENGA_XXAA)
#include <tfm_peripherals_config_nrf54l15.h>
#else
#error "Unknown device."
#endif

#ifdef __cplusplus
}
#endif

#endif /* TFM_PERIPHERAL_CONFIG_H__ */

0 comments on commit 27cf237

Please sign in to comment.