soc: riscv: nordic_nrf: nrf54h: introduce PPR support

Add support for the nRF54H PPR (Peripheral Processor), based on the VPR
RISC-V core.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This commit is contained in:
Gerard Marull-Paretas 2024-02-01 10:36:27 +01:00 committed by Carles Cufí
parent ba16e3dd13
commit 426bbf5649
11 changed files with 98 additions and 0 deletions

View file

@ -45,6 +45,8 @@ zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54H20_ENGA_CPUAPP NRF54H20_ENGA_X
NRF_APPLICATION)
zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54H20_ENGA_CPURAD NRF54H20_ENGA_XXAA
NRF_RADIOCORE)
zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54H20_ENGA_CPUPPR NRF54H20_ENGA_XXAA
NRF_PPR)
zephyr_compile_definitions_ifdef(CONFIG_NRF_APPROTECT_LOCK
ENABLE_APPROTECT)
@ -178,6 +180,7 @@ mdk_svd_ifdef(CONFIG_SOC_NRF52840 nrf52840.svd)
mdk_svd_ifdef(CONFIG_SOC_NRF5340_CPUAPP nrf5340_application.svd)
mdk_svd_ifdef(CONFIG_SOC_NRF5340_CPUNET nrf5340_network.svd)
mdk_svd_ifdef(CONFIG_SOC_NRF54H20_ENGA_CPUAPP nrf54h20_enga_application.svd)
mdk_svd_ifdef(CONFIG_SOC_NRF54H20_ENGA_CPUPPR nrf54h20_enga_ppr.svd)
mdk_svd_ifdef(CONFIG_SOC_NRF54H20_ENGA_CPURAD nrf54h20_enga_radiocore.svd)
mdk_svd_ifdef(CONFIG_SOC_NRF9120 nrf9120.svd)
mdk_svd_ifdef(CONFIG_SOC_NRF9160 nrf9160.svd)

View file

@ -2,3 +2,4 @@
# SPDX-License-Identifier: Apache-2.0
add_subdirectory(common)
add_subdirectory(${SOC_SERIES})

View file

@ -12,4 +12,7 @@ config SOC_FAMILY
source "soc/riscv/nordic_nrf/common/Kconfig"
source "soc/common/nordic_nrf/Kconfig.peripherals"
source "soc/riscv/nordic_nrf/*/Kconfig.soc"
endif # SOC_FAMILY_NRF

View file

@ -3,6 +3,14 @@
if SOC_FAMILY_NRF
source "soc/riscv/nordic_nrf/*/Kconfig.defconfig.series"
source "soc/riscv/nordic_nrf/common/Kconfig.defconfig"
config BUILD_OUTPUT_HEX
default y
config SYS_CLOCK_HW_CYCLES_PER_SEC
default 1000000 if NRF_GRTC_TIMER
default 32768 if NRF_RTC_TIMER
endif # SOC_FAMILY_NRF

View file

@ -0,0 +1,4 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
source "soc/riscv/nordic_nrf/*/Kconfig.series"

View file

@ -0,0 +1,6 @@
# Copyright (c) 2024 Nordic Semiconductor
# SPDX-License-Identifier: Apache-2.0
# Ensure that image size aligns with 16 bytes so that MRAMC finalizes all writes
# for the image correctly
zephyr_linker_sources(SECTIONS SORT_KEY zzz_place_align_at_end align.ld)

View file

@ -0,0 +1,15 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
if SOC_NRF54H20_ENGA_CPUPPR
config SOC
default "nrf54h20_enga_cpuppr"
config NUM_IRQS
default 496
config SYS_CLOCK_TICKS_PER_SEC
default 1000
endif # SOC_NRF54H20_ENGA_CPUPPR

View file

@ -0,0 +1,19 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
if SOC_SERIES_NRF54HX
rsource "Kconfig.defconfig.nrf54h*"
config SOC_SERIES
default "nrf54h"
DT_CHOSEN_Z_SRAM = zephyr,sram
DT_CHOSEN_Z_CODE = zephyr,code-partition
config BUILD_OUTPUT_ADJUST_LMA
depends on !XIP
default "$(dt_chosen_partition_addr_hex,$(DT_CHOSEN_Z_CODE)) - \
$(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_SRAM))"
endif # SOC_SERIES_NRF54HX

View file

@ -0,0 +1,10 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config SOC_SERIES_NRF54HX
bool "Nordic Semiconductor nRF54H series MCU"
select SOC_FAMILY_NRF
select HAS_NRFX
select HAS_NORDIC_DRIVERS
help
Enable support for nRF54H MCU series

View file

@ -0,0 +1,19 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config SOC_NRF54H20
bool "nRF54H20"
depends on SOC_SERIES_NRF54HX
if SOC_NRF54H20
choice
prompt "nRF54Hx MCU Selection"
config SOC_NRF54H20_ENGA_CPUPPR
bool "nRF54H20 ENGA CPUPPR"
select RISCV
endchoice
endif # SOC_NRF54H20

View file

@ -0,0 +1,10 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA.
* SPDX-License-Identifier: Apache-2.0
*/
SECTION_PROLOGUE(.align16,,)
{
. = (ALIGN(16) > 0 ? ALIGN(16) : 16) - 1;
BYTE(0);
} GROUP_LINK_IN(ROMABLE_REGION)