Skip to content

Commit cd50c27

Browse files
rob-robinson-14Hi-Im-David
authored andcommitted
soc: nordic: Add support for nRF7120 SoC
Add nRF7120 to soc directory Signed-off-by: Robert Robinson <[email protected]> Co-authored-by: David Jewsbury <[email protected]>
1 parent 0d5020d commit cd50c27

15 files changed

+318
-0
lines changed

soc/nordic/CMakeLists.txt

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
zephyr_library()
4+
5+
if(CONFIG_ARM)
6+
set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/arm/cortex_m/scripts/linker.ld CACHE INTERNAL "SoC Linker script")
7+
endif()
8+
9+
zephyr_library_sources(
10+
${ZEPHYR_BASE}/soc/nordic/validate_base_addresses.c
11+
${ZEPHYR_BASE}/soc/nordic/validate_binding_headers.c
12+
${ZEPHYR_BASE}/soc/nordic/validate_enabled_instances.c
13+
)
14+
15+
# Include dt-bindings headers into the build. This lets us validate all required
16+
# DT values against the MDK, without having to conditionally include different
17+
# headers for different SoCs.
18+
set(dt_binding_includes ${DTS_INCLUDE_FILES})
19+
list(FILTER dt_binding_includes INCLUDE REGEX "/dt-bindings/.*\.h$")
20+
list(TRANSFORM dt_binding_includes PREPEND "-include;")
21+
set_source_files_properties(
22+
validate_binding_headers.c
23+
DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
24+
PROPERTIES COMPILE_OPTIONS "${dt_binding_includes}"
25+
)
26+
27+
if(CONFIG_SOC_HAS_TIMING_FUNCTIONS AND NOT CONFIG_BOARD_HAS_TIMING_FUNCTIONS)
28+
if(CONFIG_TIMING_FUNCTIONS)
29+
# Use nRF-specific timing calculations only if DWT is not present
30+
if(NOT CONFIG_CORTEX_M_DWT)
31+
zephyr_library_sources(${ZEPHYR_BASE}/soc/nordic/timing.c)
32+
endif()
33+
endif()
34+
endif()
35+
36+
if(CONFIG_BUILD_WITH_TFM)
37+
set_property(TARGET zephyr_property_target
38+
APPEND PROPERTY TFM_CMAKE_OPTIONS -DHAL_NORDIC_PATH=${ZEPHYR_HAL_NORDIC_MODULE_DIR}
39+
APPEND PROPERTY TFM_CMAKE_OPTIONS -DZEPHYR_BASE=${ZEPHYR_BASE}
40+
APPEND PROPERTY TFM_CMAKE_OPTIONS -DNRF_NS_STORAGE=${CONFIG_TFM_NRF_NS_STORAGE}
41+
)
42+
endif()
43+
44+
add_subdirectory(${SOC_SERIES})
45+
include_directories(${ZEPHYR_BASE}/soc/nordic/common)

soc/nordic/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Nordic Semiconductor nRFx MCU line
2+
3+
# Copyright (c) 2016-2025 Nordic Semiconductor ASA
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
# This file is contains Zephyr build system Kconfig references and is not
7+
# re-usable outside the Zephyr tree.
8+
9+
if SOC_FAMILY_NORDIC_NRF
10+
11+
rsource "*/Kconfig"
12+
13+
endif # SOC_FAMILY_NORDIC_NRF

soc/nordic/Kconfig.defconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Nordic Semiconductor nRFx MCU line
2+
3+
# Copyright (c) 2016-2025 Nordic Semiconductor ASA
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
# This file is contains Zephyr build system Kconfig references and is not
7+
# re-usable outside the Zephyr tree.
8+
if SOC_FAMILY_NORDIC_NRF
9+
10+
rsource "*/Kconfig.defconfig"
11+
12+
endif # SOC_FAMILY_NORDIC_NRF

soc/nordic/Kconfig.soc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
config SOC_SERIES
6+
default "nrf71" if SOC_SERIES_NRF71X
7+
8+
config SOC_SERIES_NRF71X
9+
bool
10+
select SOC_FAMILY_NORDIC_NRF
11+
help
12+
Nordic Semiconductor nRF71 series MCU
13+
14+
rsource "*/Kconfig.soc"

soc/nordic/nrf71/CMakeLists.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
zephyr_library_sources(
5+
soc.c
6+
)
7+
zephyr_include_directories(.)
8+
add_subdirectory(${ZEPHYR_BASE}/soc/nordic/common ${CMAKE_BINARY_DIR}/common)
9+
10+
# Ensure that image size aligns with 16 bytes so that MRAMC finalizes all writes
11+
# for the image correctly
12+
zephyr_linker_sources(SECTIONS SORT_KEY zzz_place_align_at_end align.ld)
13+
14+
# We need a buffer in memory in a static location which can be used by
15+
# the KMU peripheral. The KMU has a static destination address,for nRF7120
16+
# this address is defined as 0x200F_FF00, which is the last 256 Bytes in the SRAM.
17+
if(NOT CONFIG_BUILD_WITH_TFM AND CONFIG_PSA_NEED_CRACEN_KMU_DRIVER)
18+
# Exclamation mark is printable character with the lowest number in ASCII table.
19+
# We are sure that this file will be included first.
20+
zephyr_linker_sources(RAM_SECTIONS SORT_KEY ! kmu_push_area_section.ld)
21+
endif()

soc/nordic/nrf71/Kconfig

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Nordic Semiconductor nRF71 MCU line
2+
3+
# Copyright (c) 2025 Nordic Semiconductor ASA
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config SOC_SERIES_NRF71X
7+
select HAS_NRFX
8+
select HAS_NORDIC_DRIVERS
9+
select HAS_SEGGER_RTT if ZEPHYR_SEGGER_MODULE
10+
select SOC_EARLY_INIT_HOOK
11+
select SOC_RESET_HOOK
12+
13+
config SOC_NRF7120_ENGA_CPUAPP
14+
select ARM
15+
select ARMV8_M_DSP
16+
select CPU_CORTEX_M33
17+
select CPU_HAS_ARM_MPU
18+
select CPU_HAS_ICACHE
19+
select CPU_HAS_ARM_SAU
20+
select CPU_HAS_FPU
21+
select HAS_HW_NRF_RADIO_IEEE802154
22+
select HAS_POWEROFF
23+
24+
config SOC_NRF7120_ENGA_CPUFLPR
25+
select RISCV_CORE_NORDIC_VPR

soc/nordic/nrf71/Kconfig.defconfig

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Nordic Semiconductor nRF71 MCU line
2+
3+
# Copyright (c) 2025 Nordic Semiconductor ASA
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if SOC_SERIES_NRF71X
7+
8+
rsource "Kconfig.defconfig.nrf71*"
9+
10+
if ARM
11+
12+
config CORTEX_M_SYSTICK
13+
default !NRF_GRTC_TIMER
14+
15+
config CACHE_NRF_CACHE
16+
default y if EXTERNAL_CACHE
17+
18+
endif # ARM
19+
20+
if RISCV
21+
22+
DT_CHOSEN_Z_SRAM = zephyr,sram
23+
DT_CHOSEN_Z_CODE = zephyr,code-partition
24+
25+
config BUILD_OUTPUT_ADJUST_LMA
26+
depends on !XIP
27+
default "$(dt_chosen_partition_addr_hex,$(DT_CHOSEN_Z_CODE)) - \
28+
$(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_SRAM))"
29+
30+
endif # RISCV
31+
32+
endif # SOC_SERIES_NRF71X
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Nordic Semiconductor nRF7120 MCU
2+
3+
# Copyright (c) 2025 Nordic Semiconductor ASA
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if SOC_NRF7120_ENGA_CPUAPP
7+
8+
config NUM_IRQS
9+
default 293
10+
11+
endif # SOC_NRF7120_ENGA_CPUAPP
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Nordic Semiconductor nRF7120 MCU
2+
3+
# Copyright (c) 2025 Nordic Semiconductor ASA
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if SOC_NRF7120_ENGA_CPUFLPR
7+
8+
config NUM_IRQS
9+
default 293
10+
11+
# As FLPR has limited memory most of tests does not fit with asserts enabled.
12+
config ASSERT
13+
default n
14+
15+
endif # SOC_NRF7120_ENGA_CPUFLPR

soc/nordic/nrf71/Kconfig.soc

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Nordic Semiconductor nRF71 MCU line
2+
3+
# Copyright (c) 2025 Nordic Semiconductor ASA
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config SOC_NRF7120
7+
bool
8+
select SOC_SERIES_NRF71X
9+
help
10+
NRF7120
11+
12+
config SOC_NRF7120_ENGA
13+
bool
14+
select SOC_NRF7120
15+
help
16+
NRF7120 ENGA
17+
18+
config SOC_NRF7120_ENGA_CPUAPP
19+
bool
20+
select SOC_NRF7120_ENGA
21+
help
22+
NRF7120 ENGA CPUAPP
23+
24+
config SOC_NRF7120_ENGA_CPUFLPR
25+
bool
26+
select SOC_NRF7120_ENGA
27+
help
28+
NRF7120 ENGA CPUFLPR
29+
30+
config SOC
31+
default "nrf7120" if SOC_NRF7120

0 commit comments

Comments
 (0)