Skip to content

Commit a2280a5

Browse files
degjorvaAnton-TF
authored andcommitted
Platform: nrf54lv10a: Add support for nrf54lv10a
Add initial support for nrf54lv10a This is based upon the existing nrf54l series of targets Update startup_nrf54l and target_cfg_54l to support this Change-Id: I0dc11ca4cb39485d29bf595dacc41c3ee6383cdd Signed-off-by: Dag Erik Gjørvad <dag.erik.gjorvad@nordicsemi.no>
1 parent d981277 commit a2280a5

24 files changed

+1029
-4
lines changed

platform/ext/target/nordic_nrf/common/core/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ endif()
2424
# At the time of writing there is no systematic way to identify which
2525
# NVM technology is used by the SoC from the Kconfig, so we just
2626
# hardcode this information here instead.
27-
if((NRF_SOC_VARIANT MATCHES "^nrf54l1[05]$") OR (TFM_PLATFORM MATCHES "nordic\_nrf\/nrf54l15dk\_nrf54l1[05]\_cpuapp") OR (PSA_API_TEST_TARGET MATCHES "^nrf54l1[05]$"))
27+
if((NRF_SOC_VARIANT MATCHES "^nrf54l1[05]$") OR
28+
(NRF_SOC_VARIANT MATCHES "^nrf54lv10a?$") OR
29+
(TFM_PLATFORM MATCHES "nordic_nrf/nrf54l15dk_nrf54l1[05]_cpuapp") OR
30+
(TFM_PLATFORM MATCHES "nordic_nrf/nrf54lv10dk_nrf54lv10a?_cpuapp") OR
31+
(PSA_API_TEST_TARGET MATCHES "^nrf54l1[05]$") OR
32+
(PSA_API_TEST_TARGET MATCHES "^nrf54lv10a?$"))
2833
# Maybe we only need to check one of these options but these
2934
# variables keep changing so we check both to be future proof
3035
set(HAS_RRAMC 1)

platform/ext/target/nordic_nrf/common/core/secure_peripherals_defs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ struct platform_data_t tfm_peripheral_spim20 = {
9393
};
9494
#endif
9595

96-
#if TFM_PERIPHERAL_SPIM22_SECURE
96+
#if TFM_PERIPHERAL_SPIM21_SECURE
9797
struct platform_data_t tfm_peripheral_spim21 = {
9898
NRF_SPIM21_S_BASE,
9999
NRF_SPIM21_S_BASE + (sizeof(NRF_SPIM_Type) - 1),

platform/ext/target/nordic_nrf/common/core/startup_nrf54l.c

Lines changed: 297 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,302 @@ DEFAULT_IRQ_HANDLER(CRACEN_IRQHandler)
118118
#pragma GCC diagnostic ignored "-Wpedantic"
119119
#endif
120120

121+
#if defined(NRF54LV10A_ENGA_XXAA)
122+
123+
const VECTOR_TABLE_Type __VECTOR_TABLE[] __VECTOR_TABLE_ATTRIBUTE = {
124+
(VECTOR_TABLE_Type)(&__INITIAL_SP), /* Initial Stack Pointer */
125+
/* Exceptions */
126+
Reset_Handler,
127+
NMI_Handler,
128+
HardFault_Handler,
129+
MemManage_Handler, /* MPU Fault Handler */
130+
BusFault_Handler,
131+
UsageFault_Handler,
132+
SecureFault_Handler,
133+
default_tfm_IRQHandler, /* SecureFault_IRQn */
134+
default_tfm_IRQHandler,
135+
default_tfm_IRQHandler,
136+
SVC_Handler,
137+
DebugMon_Handler,
138+
default_tfm_IRQHandler,
139+
PendSV_Handler,
140+
SysTick_Handler,
141+
/* Device specific interrupt handlers */
142+
default_tfm_IRQHandler,
143+
default_tfm_IRQHandler,
144+
default_tfm_IRQHandler,
145+
default_tfm_IRQHandler,
146+
default_tfm_IRQHandler,
147+
default_tfm_IRQHandler,
148+
default_tfm_IRQHandler,
149+
default_tfm_IRQHandler,
150+
default_tfm_IRQHandler,
151+
default_tfm_IRQHandler,
152+
default_tfm_IRQHandler,
153+
default_tfm_IRQHandler,
154+
default_tfm_IRQHandler,
155+
default_tfm_IRQHandler,
156+
default_tfm_IRQHandler,
157+
default_tfm_IRQHandler,
158+
default_tfm_IRQHandler,
159+
default_tfm_IRQHandler,
160+
default_tfm_IRQHandler,
161+
default_tfm_IRQHandler,
162+
default_tfm_IRQHandler,
163+
default_tfm_IRQHandler,
164+
default_tfm_IRQHandler,
165+
default_tfm_IRQHandler,
166+
default_tfm_IRQHandler,
167+
default_tfm_IRQHandler,
168+
default_tfm_IRQHandler,
169+
default_tfm_IRQHandler,
170+
SWI00_IRQHandler,
171+
SWI01_IRQHandler,
172+
SWI02_IRQHandler,
173+
SWI03_IRQHandler,
174+
default_tfm_IRQHandler,
175+
default_tfm_IRQHandler,
176+
default_tfm_IRQHandler,
177+
default_tfm_IRQHandler,
178+
default_tfm_IRQHandler,
179+
default_tfm_IRQHandler,
180+
default_tfm_IRQHandler,
181+
default_tfm_IRQHandler,
182+
default_tfm_IRQHandler,
183+
default_tfm_IRQHandler,
184+
default_tfm_IRQHandler,
185+
default_tfm_IRQHandler,
186+
default_tfm_IRQHandler,
187+
default_tfm_IRQHandler,
188+
default_tfm_IRQHandler,
189+
default_tfm_IRQHandler,
190+
default_tfm_IRQHandler,
191+
default_tfm_IRQHandler,
192+
default_tfm_IRQHandler,
193+
default_tfm_IRQHandler,
194+
default_tfm_IRQHandler,
195+
default_tfm_IRQHandler,
196+
default_tfm_IRQHandler,
197+
default_tfm_IRQHandler,
198+
default_tfm_IRQHandler,
199+
default_tfm_IRQHandler,
200+
default_tfm_IRQHandler,
201+
default_tfm_IRQHandler,
202+
default_tfm_IRQHandler,
203+
default_tfm_IRQHandler,
204+
default_tfm_IRQHandler,
205+
default_tfm_IRQHandler,
206+
SPU00_IRQHandler,
207+
MPC00_IRQHandler,
208+
default_tfm_IRQHandler,
209+
default_tfm_IRQHandler,
210+
default_tfm_IRQHandler,
211+
default_tfm_IRQHandler,
212+
default_tfm_IRQHandler,
213+
default_tfm_IRQHandler,
214+
default_tfm_IRQHandler,
215+
default_tfm_IRQHandler,
216+
AAR00_CCM00_IRQHandler,
217+
ECB00_IRQHandler,
218+
VPR00_IRQHandler,
219+
default_tfm_IRQHandler,
220+
RRAMC_IRQHandler,
221+
default_tfm_IRQHandler,
222+
default_tfm_IRQHandler,
223+
default_tfm_IRQHandler,
224+
CTRLAP_IRQHandler,
225+
default_tfm_IRQHandler,
226+
CM33SS_IRQHandler,
227+
TIMER00_IRQHandler,
228+
default_tfm_IRQHandler,
229+
default_tfm_IRQHandler,
230+
default_tfm_IRQHandler,
231+
CRACEN_IRQHandler,
232+
default_tfm_IRQHandler,
233+
default_tfm_IRQHandler,
234+
default_tfm_IRQHandler,
235+
default_tfm_IRQHandler,
236+
default_tfm_IRQHandler,
237+
default_tfm_IRQHandler,
238+
default_tfm_IRQHandler,
239+
default_tfm_IRQHandler,
240+
default_tfm_IRQHandler,
241+
default_tfm_IRQHandler,
242+
default_tfm_IRQHandler,
243+
default_tfm_IRQHandler,
244+
default_tfm_IRQHandler,
245+
default_tfm_IRQHandler,
246+
default_tfm_IRQHandler,
247+
default_tfm_IRQHandler,
248+
default_tfm_IRQHandler,
249+
default_tfm_IRQHandler,
250+
default_tfm_IRQHandler,
251+
default_tfm_IRQHandler,
252+
default_tfm_IRQHandler,
253+
default_tfm_IRQHandler,
254+
default_tfm_IRQHandler,
255+
default_tfm_IRQHandler,
256+
default_tfm_IRQHandler,
257+
default_tfm_IRQHandler,
258+
default_tfm_IRQHandler,
259+
default_tfm_IRQHandler,
260+
default_tfm_IRQHandler,
261+
default_tfm_IRQHandler,
262+
default_tfm_IRQHandler,
263+
default_tfm_IRQHandler,
264+
default_tfm_IRQHandler,
265+
default_tfm_IRQHandler,
266+
default_tfm_IRQHandler,
267+
default_tfm_IRQHandler,
268+
default_tfm_IRQHandler,
269+
default_tfm_IRQHandler,
270+
SPU10_IRQHandler,
271+
default_tfm_IRQHandler,
272+
default_tfm_IRQHandler,
273+
default_tfm_IRQHandler,
274+
default_tfm_IRQHandler,
275+
TIMER10_IRQHandler,
276+
EGU10_IRQHandler,
277+
EGU10_IRQHandler,
278+
EGU10_IRQHandler,
279+
default_tfm_IRQHandler,
280+
RADIO_0_IRQHandler,
281+
RADIO_1_IRQHandler,
282+
default_tfm_IRQHandler,
283+
default_tfm_IRQHandler,
284+
default_tfm_IRQHandler,
285+
default_tfm_IRQHandler,
286+
default_tfm_IRQHandler,
287+
default_tfm_IRQHandler,
288+
default_tfm_IRQHandler,
289+
default_tfm_IRQHandler,
290+
default_tfm_IRQHandler,
291+
default_tfm_IRQHandler,
292+
default_tfm_IRQHandler,
293+
default_tfm_IRQHandler,
294+
default_tfm_IRQHandler,
295+
default_tfm_IRQHandler,
296+
default_tfm_IRQHandler,
297+
default_tfm_IRQHandler,
298+
default_tfm_IRQHandler,
299+
default_tfm_IRQHandler,
300+
default_tfm_IRQHandler,
301+
default_tfm_IRQHandler,
302+
default_tfm_IRQHandler,
303+
default_tfm_IRQHandler,
304+
default_tfm_IRQHandler,
305+
default_tfm_IRQHandler,
306+
default_tfm_IRQHandler,
307+
default_tfm_IRQHandler,
308+
default_tfm_IRQHandler,
309+
default_tfm_IRQHandler,
310+
default_tfm_IRQHandler,
311+
default_tfm_IRQHandler,
312+
default_tfm_IRQHandler,
313+
default_tfm_IRQHandler,
314+
default_tfm_IRQHandler,
315+
default_tfm_IRQHandler,
316+
default_tfm_IRQHandler,
317+
default_tfm_IRQHandler,
318+
default_tfm_IRQHandler,
319+
default_tfm_IRQHandler,
320+
default_tfm_IRQHandler,
321+
default_tfm_IRQHandler,
322+
default_tfm_IRQHandler,
323+
default_tfm_IRQHandler,
324+
default_tfm_IRQHandler,
325+
default_tfm_IRQHandler,
326+
default_tfm_IRQHandler,
327+
default_tfm_IRQHandler,
328+
default_tfm_IRQHandler,
329+
default_tfm_IRQHandler,
330+
default_tfm_IRQHandler,
331+
default_tfm_IRQHandler,
332+
default_tfm_IRQHandler,
333+
default_tfm_IRQHandler,
334+
SPU20_IRQHandler,
335+
default_tfm_IRQHandler,
336+
default_tfm_IRQHandler,
337+
default_tfm_IRQHandler,
338+
default_tfm_IRQHandler,
339+
default_tfm_IRQHandler,
340+
SERIAL20_IRQHandler,
341+
SERIAL21_IRQHandler,
342+
default_tfm_IRQHandler,
343+
EGU20_IRQHandler,
344+
TIMER20_IRQHandler,
345+
TIMER21_IRQHandler,
346+
TIMER22_IRQHandler,
347+
TIMER23_IRQHandler,
348+
TIMER24_IRQHandler,
349+
default_tfm_IRQHandler,
350+
default_tfm_IRQHandler,
351+
default_tfm_IRQHandler,
352+
default_tfm_IRQHandler,
353+
default_tfm_IRQHandler,
354+
SAADC_IRQHandler,
355+
default_tfm_IRQHandler,
356+
TEMP_IRQHandler,
357+
default_tfm_IRQHandler,
358+
default_tfm_IRQHandler,
359+
default_tfm_IRQHandler,
360+
default_tfm_IRQHandler,
361+
GPIOTE20_1_IRQHandler,
362+
default_tfm_IRQHandler,
363+
default_tfm_IRQHandler,
364+
default_tfm_IRQHandler,
365+
default_tfm_IRQHandler,
366+
default_tfm_IRQHandler,
367+
default_tfm_IRQHandler,
368+
GRTC_0_IRQHandler,
369+
GRTC_1_IRQHandler,
370+
GRTC_2_IRQHandler,
371+
GRTC_3_IRQHandler,
372+
default_tfm_IRQHandler,
373+
default_tfm_IRQHandler,
374+
default_tfm_IRQHandler,
375+
default_tfm_IRQHandler,
376+
default_tfm_IRQHandler,
377+
default_tfm_IRQHandler,
378+
default_tfm_IRQHandler,
379+
default_tfm_IRQHandler,
380+
default_tfm_IRQHandler,
381+
TAMPC_IRQHandler,
382+
default_tfm_IRQHandler,
383+
default_tfm_IRQHandler,
384+
default_tfm_IRQHandler,
385+
default_tfm_IRQHandler,
386+
default_tfm_IRQHandler,
387+
default_tfm_IRQHandler,
388+
default_tfm_IRQHandler,
389+
default_tfm_IRQHandler,
390+
default_tfm_IRQHandler,
391+
default_tfm_IRQHandler,
392+
default_tfm_IRQHandler,
393+
default_tfm_IRQHandler,
394+
default_tfm_IRQHandler,
395+
default_tfm_IRQHandler,
396+
default_tfm_IRQHandler,
397+
default_tfm_IRQHandler,
398+
SPU30_IRQHandler,
399+
default_tfm_IRQHandler,
400+
default_tfm_IRQHandler,
401+
default_tfm_IRQHandler,
402+
SERIAL30_IRQHandler,
403+
default_tfm_IRQHandler,
404+
COMP_LPCOMP_IRQHandler,
405+
default_tfm_IRQHandler,
406+
WDT30_IRQHandler,
407+
WDT31_IRQHandler,
408+
default_tfm_IRQHandler,
409+
default_tfm_IRQHandler,
410+
default_tfm_IRQHandler,
411+
GPIOTE30_1_IRQHandler,
412+
CLOCK_POWER_IRQHandler,
413+
};
414+
415+
#else /* NRF54L15_XXAA || NRF54L10_XXAA */
416+
121417
const VECTOR_TABLE_Type __VECTOR_TABLE[] __VECTOR_TABLE_ATTRIBUTE = {
122418
(VECTOR_TABLE_Type)(&__INITIAL_SP), /* Initial Stack Pointer */
123419
/* Exceptions */
@@ -409,6 +705,7 @@ const VECTOR_TABLE_Type __VECTOR_TABLE[] __VECTOR_TABLE_ATTRIBUTE = {
409705
GPIOTE30_1_IRQHandler,
410706
};
411707

708+
#endif /* nrf54lv10a */
412709
#if defined ( __GNUC__ )
413710
#pragma GCC diagnostic pop
414711
#endif

platform/ext/target/nordic_nrf/common/core/target_cfg_54l.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,15 @@
5353
#define GET_SPU_INSTANCE(periph) \
5454
((NRF_SPU_Type *)(SPU_ADDRESS_REGION | (periph.periph_start & 0x00FC0000)))
5555

56+
#if defined(NRF54LV10A_ENGA_XXAA)
57+
/* On nRF54LV10A XL1 and XL2 are(P1.13) and XL2(P1.14) */
58+
#define PIN_XL1 45
59+
#define PIN_XL2 46
60+
#else
5661
/* On nRF54L15 XL1 and XL2 are(P1.00) and XL2(P1.01) */
5762
#define PIN_XL1 32
5863
#define PIN_XL2 33
64+
#endif /* SOC_NRF54LV10A_ENGA */
5965

6066
/* During TF-M system initialization we invoke a function that comes
6167
* from Zephyr. This function does not have a header file so we
@@ -411,6 +417,7 @@ static void gpio_configuration(void)
411417
}
412418
}
413419

420+
414421
/* Configure properly the XL1 and XL2 pins so that the low-frequency crystal
415422
* oscillator (LFXO) can be used.
416423
* This configuration can be done only from secure code, as otherwise those
@@ -480,7 +487,6 @@ enum tfm_plat_err_t nvic_interrupt_target_state_cfg(void)
480487
for (uint8_t i = 0; i < sizeof(NVIC->ITNS) / sizeof(NVIC->ITNS[0]); i++) {
481488
NVIC->ITNS[i] = 0xFFFFFFFF;
482489
}
483-
484490
/* Make sure that the SPU instance(s) are targeted to S state */
485491
for (int i = 0; i < ARRAY_SIZE(spu_instances); i++) {
486492
NVIC_ClearTargetState(NRFX_IRQ_NUMBER_GET(spu_instances[i]));
@@ -494,7 +500,6 @@ enum tfm_plat_err_t nvic_interrupt_target_state_cfg(void)
494500
NVIC_ClearTargetState(
495501
NRFX_IRQ_NUMBER_GET(NRF_UARTE_INSTANCE_GET(NRF_SECURE_UART_INSTANCE)));
496502
#endif
497-
498503
return TFM_PLAT_ERR_SUCCESS;
499504
}
500505

platform/ext/target/nordic_nrf/common/nrf54l/tfm_interrupts.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,21 @@ enum tfm_hal_status_t tfm_spim00_irq_init(void *p_pt,
192192
}
193193
#endif
194194

195+
#if TFM_PERIPHERAL_SPIM21_SECURE
196+
static struct irq_t spim21_irq = {0};
197+
198+
void SPIM21_IRQHandler(void)
199+
{
200+
spm_handle_interrupt(spim21_irq.p_pt, spim21_irq.p_ildi);
201+
}
202+
203+
enum tfm_hal_status_t tfm_spim21_irq_init(void *p_pt,
204+
const struct irq_load_info_t *p_ildi)
205+
{
206+
return irq_init(&spim21_irq, TFM_SPIM21_IRQ, p_pt, p_ildi);
207+
}
208+
#endif
209+
195210
#if TFM_PERIPHERAL_SPIM22_SECURE
196211
static struct irq_t spim22_irq = {0};
197212

0 commit comments

Comments
 (0)