arch/arm/imxrt: ELE, TRDC and TCM fixes in __start for iMXRT118x platform

- Initialize the internal secure element, if configured
- Initialize the TRDC, if configured
- Disable the TCM enabling code when compiling for other than Cortex-M7 chip.
  This needs to be skipped for M33 core on imx118x

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
This commit is contained in:
Jukka Laitinen 2026-09-03 17:13:06 +03:00 • committed by Xiang Xiao
parent 438eadd880
commit 2c51ec655c

View file

@ -47,6 +47,14 @@
#include "imxrt_start.h"
#include "imxrt_gpio.h"
#ifdef CONFIG_IMXRT_ELE
# include "imxrt118x_ele.h"
#endif
#ifdef CONFIG_IMXRT_TRDC
# include "imxrt118x_trdc.h"
#endif
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@ -100,6 +108,7 @@ extern const void * const _vectors[];
static inline void imxrt_tcmenable(void)
{
#ifdef CONFIG_ARCH_CORTEXM7
uint32_t regval;
UP_MB();
@ -131,6 +140,7 @@ static inline void imxrt_tcmenable(void)
#warning Missing logic
#endif
#endif /* CONFIG_ARCH_CORTEXM7 */
}
/****************************************************************************
@ -225,6 +235,12 @@ void __start(void)
arm_stack_check_init();
#endif
#ifdef CONFIG_IMXRT_ELE
/* Bring the EdgeLock Enclave up */
imxrt118x_ele_init();
#endif
/* Configure the UART so that we can get debug output as soon as possible */
imxrt_clockconfig();
@ -240,6 +256,13 @@ void __start(void)
imxrt_boardinitialize();
#ifdef CONFIG_IMXRT_TRDC
/* Take ownership of the TRDCs from ELE and program them. */
imxrt118x_trdc_init();
imxrt118x_trdc_config();
#endif
#ifdef CONFIG_ARM_MPU
#ifdef CONFIG_BUILD_PROTECTED
/* For the case of the separate user-/kernel-space build, perform whatever