Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
model = "Nordic nRF7120 PDK nRF7120 Application MCU";

chosen {
zephyr,code-partition = &slot0_ns_partition;
zephyr,sram = &cpuapp_sram;
};
};
Expand Down
22 changes: 22 additions & 0 deletions dts/common/nordic/nrf7120_enga.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,28 @@
status = "disabled";
#mbox-cells = <1>;
};

mram_controller: mram-controller@5004e000 {
compatible = "nordic,nrf-mramc";
reg = <0x5004e000 0x1000>;
#address-cells = <1>;
#size-cells = <1>;
interrupts = <78 NRF_DEFAULT_IRQ_PRIORITY>;

cpuapp_mram: mram@0 {
compatible = "soc-nv-flash";
reg = <0 DT_SIZE_K(3972)>;
erase-block-size = <4096>;
write-block-size = <4>;
};

cpuflpr_mram: mram@3e1000 {
compatible = "soc-nv-flash";
reg = <0x3e1000 DT_SIZE_K(116)>;
erase-block-size = <4096>;
write-block-size = <4>;
};
};
};

wifi: wifi {
Expand Down
22 changes: 0 additions & 22 deletions dts/common/nordic/nrf7120_enga_secure_peripherals.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,6 @@ kmu: kmu@49000 {
status = "disabled";
};

mram_controller: mram-controller@4e000 {
compatible = "nordic,nrf-mramc";
reg = <0x4e000 0x1000>;
#address-cells = <1>;
#size-cells = <1>;
interrupts = <78 NRF_DEFAULT_IRQ_PRIORITY>;

cpuapp_mram: mram@0 {
compatible = "soc-nv-flash";
reg = <0 DT_SIZE_K(3972)>;
erase-block-size = <4096>;
write-block-size = <4>;
};

cpuflpr_mram: mram@3e1000 {
compatible = "soc-nv-flash";
reg = <0x3e1000 DT_SIZE_K(116)>;
erase-block-size = <4096>;
write-block-size = <4>;
};
};

spu10: spu@80000 {
compatible = "nordic,nrf-spu";
reg = <0x80000 0x1000>;
Expand Down
13 changes: 7 additions & 6 deletions modules/trusted-firmware-m/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,16 @@ config TFM_ITS_BUF_SIZE

config TFM_ITS_STACK_SIZE
hex "Stack size"
default 0x1000 if SOC_SERIES_NRF54LX
default 0x720 if !SOC_SERIES_NRF54LX
default 0x1000 if SOC_SERIES_NRF54LX || SOC_SERIES_NRF71X
default 0x720 if !(SOC_SERIES_NRF54LX || SOC_SERIES_NRF71X)

# Nordic additions to ITS Kconfig
config TFM_ITS_ENCRYPTED
bool
prompt "PSA Internal Trusted Storage with encryption"
depends on !CRACEN_NEED_MULTIPART_WORKAROUNDS
default y if SOC_SERIES_NRF54LX
select PSA_WANT_ALG_CHACHA20_POLY1305 if SOC_SERIES_NRF54LX
default y if SOC_SERIES_NRF54LX || SOC_SERIES_NRF71X
select PSA_WANT_ALG_CHACHA20_POLY1305 if SOC_SERIES_NRF54LX || SOC_SERIES_NRF71X
select PSA_WANT_GENERATE_RANDOM
help
Enables authenticated encryption for PSA Internal Trusted Storage files
Expand Down Expand Up @@ -338,7 +338,7 @@ endchoice
config TFM_CPU_FREQ_MHZ
int
default $(div, $(dt_node_int_prop_int,/clocks/hfpll,clock-frequency), 1000000) \
if SOC_SERIES_NRF54LX
if SOC_SERIES_NRF54LX || SOC_SERIES_NRF71X
default $(div, $(dt_node_int_prop_int,/cpus/cpu@0,clock-frequency), 1000000) \
if $(dt_node_has_prop,/cpus/cpu@0,clock-frequency)
default $(div, $(dt_node_int_prop_int,/cpus/cpu@1,clock-frequency), 1000000) \
Expand Down Expand Up @@ -391,7 +391,7 @@ config TFM_SECURE_UART_SHARE_INSTANCE
choice TFM_SECURE_UART_INSTANCE
prompt "TF-M logging UART instance"
default TFM_SECURE_UART20 if SOC_NRF54LV10A_ENGA_CPUAPP
default TFM_SECURE_UART30 if SOC_SERIES_NRF54LX
default TFM_SECURE_UART30 if SOC_SERIES_NRF54LX || SOC_SERIES_NRF71X
default TFM_SECURE_UART1

config TFM_SECURE_UART0
Expand Down Expand Up @@ -516,6 +516,7 @@ config TFM_S_CODE_VECTOR_TABLE_SIZE
default 0x144 if SOC_SERIES_NRF91X
default 0x154 if SOC_NRF5340_CPUAPP
default 0x47c if SOC_SERIES_NRF54LX
default 0x504 if SOC_SERIES_NRF71X
default 0xffffffff # Invalid value to discover missing SOC support.
help
The TF-M interrupt vector table size.
Expand Down
10 changes: 6 additions & 4 deletions modules/trusted-firmware-m/Kconfig.tfm.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ config TFM_BOARD
default "$(ZEPHYR_NRF_MODULE_DIR)/modules/trusted-firmware-m/tfm_boards/nrf54l15_cpuapp" if SOC_NRF54L15_CPUAPP
default "$(ZEPHYR_NRF_MODULE_DIR)/modules/trusted-firmware-m/tfm_boards/nrf54l10_cpuapp" if SOC_NRF54L10_CPUAPP
default "$(ZEPHYR_NRF_MODULE_DIR)/modules/trusted-firmware-m/tfm_boards/nrf54lv10a_cpuapp" if SOC_NRF54LV10A_ENGA_CPUAPP
default "${ZEPHYR_NRF_MODULE_DIR}/modules/trusted-firmware-m/tfm_boards/nrf7120_cpuapp" if SOC_NRF7120_ENGA_CPUAPP
depends on TRUSTED_EXECUTION_NONSECURE

if BUILD_WITH_TFM
Expand All @@ -27,8 +28,8 @@ config TFM_DUMMY_PROVISIONING

config TFM_REGRESSION_NS
bool
select NRF_TIMER0_SECURE if !SOC_SERIES_NRF54LX
select NRF_TIMER00_SECURE if SOC_SERIES_NRF54LX
select NRF_TIMER0_SECURE if !(SOC_SERIES_NRF54LX || SOC_SERIES_NRF71X)
select NRF_TIMER00_SECURE if SOC_SERIES_NRF54LX || SOC_SERIES_NRF71X

config TFM_LOG_LEVEL_SILENCE
# Overrule zephyr disable TF-M secure output if the uart1 node has not
Expand All @@ -43,7 +44,8 @@ config TFM_LOG_LEVEL_SILENCE
$(dt_nodelabel_has_prop,uart30,pinctrl-names)

choice TFM_PROFILE_TYPE
default TFM_PROFILE_TYPE_NOT_SET if SOC_SERIES_NRF54LX || BT_CRYPTO || BT_MESH_USES_TFM_PSA || OPENTHREAD
default TFM_PROFILE_TYPE_NOT_SET if SOC_SERIES_NRF54LX || SOC_SERIES_NRF71X || \
BT_CRYPTO || BT_MESH_USES_TFM_PSA || OPENTHREAD
default TFM_PROFILE_TYPE_MINIMAL
endchoice

Expand Down Expand Up @@ -83,7 +85,7 @@ config TFM_PARTITION_PROTECTED_STORAGE
select PSA_WANT_KEY_TYPE_AES
select PSA_WANT_ALG_CCM if SOC_SERIES_NRF91X
select PSA_WANT_ALG_GCM if SOC_NRF5340_CPUAPP
select PSA_WANT_ALG_GCM if SOC_SERIES_NRF54LX
select PSA_WANT_ALG_GCM if SOC_SERIES_NRF54LX || SOC_SERIES_NRF71X

# Override TF-M crypto dependency on ITS when using KMU
config TFM_PARTITION_CRYPTO
Expand Down
8 changes: 5 additions & 3 deletions modules/trusted-firmware-m/Kconfig.tfm.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ config PM_PARTITION_SIZE_TFM_SRAM
# assigning 0x16000 of RAM to TFM will not leave enough RAM for
# Matter. So we use 0x13000 of RAM on 54L.
default 0x13000 if SOC_NRF54L15_CPUAPP
default 0x13000 if SOC_NRF7120_ENGA_CPUAPP
# Set the of TFM_SRAM to 0x10000(64kB) since the nR54L10
# has less RAM. The number was selected based on the observed memory
# usage of TFM in crypto samples and it can be changed later if needed.
Expand All @@ -28,18 +29,19 @@ config PM_PARTITION_SIZE_TFM
hex
prompt "Memory reserved for TFM" if !TFM_PROFILE_TYPE_MINIMAL
default 0xE800 if TFM_PROFILE_TYPE_MINIMAL && TFM_CMAKE_BUILD_TYPE_DEBUG && \
BOOTLOADER_MCUBOOT && SOC_SERIES_NRF54LX
BOOTLOADER_MCUBOOT && (SOC_SERIES_NRF54LX || SOC_SERIES_NRF71X)
default 0xFE00 if TFM_PROFILE_TYPE_MINIMAL && TFM_CMAKE_BUILD_TYPE_DEBUG && \
BOOTLOADER_MCUBOOT
default 0x10000 if TFM_PROFILE_TYPE_MINIMAL && TFM_CMAKE_BUILD_TYPE_DEBUG
default 0x6800 if TFM_PROFILE_TYPE_MINIMAL && BOOTLOADER_MCUBOOT && SOC_NRF54L15_CPUAPP
default 0x6800 if TFM_PROFILE_TYPE_MINIMAL && BOOTLOADER_MCUBOOT && \
(SOC_NRF54L15_CPUAPP || SOC_NRF7120_ENGA_CPUAPP)
default 0x7E00 if TFM_PROFILE_TYPE_MINIMAL && BOOTLOADER_MCUBOOT
default 0x8000 if TFM_PROFILE_TYPE_MINIMAL
# NCSDK-13503: Temporarily bump size while regressions are being fixed
default 0x60000 if TFM_REGRESSION_S
default 0x4FE00 if TFM_CMAKE_BUILD_TYPE_DEBUG && BOOTLOADER_MCUBOOT
default 0x50000 if TFM_CMAKE_BUILD_TYPE_DEBUG
default 0x3F800 if BOOTLOADER_MCUBOOT && SOC_NRF54L15_CPUAPP
default 0x3F800 if BOOTLOADER_MCUBOOT && (SOC_NRF54L15_CPUAPP || SOC_NRF7120_ENGA_CPUAPP)
default 0x3FE00 if BOOTLOADER_MCUBOOT
default 0x40000
help
Expand Down
12 changes: 7 additions & 5 deletions modules/trusted-firmware-m/tfm_boards/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,11 @@ if (${TFM_PARTITION_CRYPTO})
$<$<BOOL:${CONFIG_HW_UNIQUE_KEY_RANDOM}>:CONFIG_HW_UNIQUE_KEY_RANDOM>
)

# nrf54l15/nrf54l10 use the PSA headers in the hw_unique_key_cracen_kmu.c file, which means
# that we need to make sure that the nrf_security PSA headers are included
# before any other PSA-related headers.
if(NRF_SOC_VARIANT MATCHES "nrf54l1[05]" OR NRF_SOC_VARIANT MATCHES "nrf54lv10a")
# nrf54l15/nrf54l10/nrf7120 use the PSA headers in the hw_unique_key_cracen_kmu.c
# file, which means that we need to make sure that the nrf_security PSA headers
# are included before any other PSA-related headers.
if((NRF_SOC_VARIANT MATCHES "nrf54l1[05]") OR
(NRF_SOC_VARIANT MATCHES "nrf54lv10a") OR (NRF_SOC_VARIANT MATCHES "nrf7120"))
target_link_libraries(platform_crypto_keys
PRIVATE
psa_crypto_library_config
Expand Down Expand Up @@ -222,7 +223,8 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/common
DESTINATION ${INSTALL_PLATFORM_NS_DIR})


if(NRF_SOC_VARIANT MATCHES "nrf54l1[05]" OR NRF_SOC_VARIANT MATCHES "nrf54lv10a")
if((NRF_SOC_VARIANT MATCHES "nrf54l1[05]") OR
(NRF_SOC_VARIANT MATCHES "nrf54lv10a") OR (NRF_SOC_VARIANT MATCHES "nrf7120"))
file(COPY ${ZEPHYR_NRF_MODULE_DIR}/subsys/nrf_security/src/drivers/cracen/cracenpsa/include/cracen_psa_key_ids.h
DESTINATION ${INSTALL_INTERFACE_INC_DIR})
file(COPY ${ZEPHYR_NRF_MODULE_DIR}/subsys/nrf_security/src/drivers/cracen/cracenpsa/include/cracen_psa_kmu.h
Expand Down
10 changes: 6 additions & 4 deletions modules/trusted-firmware-m/tfm_boards/board/RTE_Device.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@

#define RTE_USART0 1

#else /* NRF_UARTE0_S - 54L15 devices*/
#else /* NRF_UARTE0_S - 54L15 or 7120 devices*/

/* Only UART20 and UART30 are supported for TF-M tests, which are the
* Non-secure applications build via the TF-M build system
/* UART20 and UART30 are supported for TF-M tests on NRF54LX,
* while UART00 and UART30 are supported on NRF71X
*/
#if defined(CONFIG_TFM_SECURE_UART30)
#if defined(CONFIG_SOC_SERIES_NRF54LX) && defined(CONFIG_TFM_SECURE_UART30)
#define RTE_USART20 1
#elif defined(CONFIG_SOC_SERIES_NRF71X) && defined(CONFIG_TFM_SECURE_UART30)
#define RTE_USART00 1
#else
#define RTE_USART30 1
#endif
Expand Down
6 changes: 3 additions & 3 deletions modules/trusted-firmware-m/tfm_boards/board/device_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#include <zephyr/devicetree.h>


#if defined(NRF54L15_XXAA) || defined(NRF54L10_XXAA) || defined(NRF54LV10A_ENGA_XXAA)

#if defined(NRF54L15_XXAA) || defined(NRF54L10_XXAA) || defined(NRF54LV10A_ENGA_XXAA) || \
defined(NRF7120_ENGA_XXAA)
#if defined(CONFIG_TFM_SECURE_UART00) && DOMAIN_NS != 1U
#define TFM_UART uart00
#endif /* defined(CONFIG_TFM_SECURE_UART00) */
Expand Down Expand Up @@ -46,7 +46,7 @@
#define TFM_UART uart1
#endif /* defined(CONFIG_TFM_SECURE_UART1) */

#endif /* NRF54L15_XXAA || NRF54L10_XXAA */
#endif /* NRF54L15_XXAA || NRF54L10_XXAA || NRF54LV10A_ENGA_XXAA || NRF7120_ENGA_XXAA */

#define DEFAULT_UART_BAUDRATE DT_PROP_OR(DT_NODELABEL(TFM_UART), current_speed, 115200)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#
# Copyright (c) 2025, Nordic Semiconductor ASA.
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

set(NRF_BOARD_SELECTED True)

add_subdirectory(${Trusted\ Firmware\ M_SOURCE_DIR}/platform/ext/target/nordic_nrf/common/nrf7120 nrf7120)

add_subdirectory(.. tfm_board)

target_include_directories(platform_s
PUBLIC
${ZEPHYR_NRF_MODULE_DIR}/subsys/nrf_security/src/drivers/cracen/cracenpsa/include
)

target_sources(platform_s
PRIVATE
${ZEPHYR_NRF_MODULE_DIR}/nrf/soc/nordic/nrf71/soc.c
)

target_include_directories(platform_s
PRIVATE
${ZEPHYR_BASE}/modules/cmsis/
${ZEPHYR_NRF_MODULE_DIR}/soc/nordic/nrf71
${ZEPHYR_BASE}/soc/nordic/common
)

install(FILES ${CMAKE_CURRENT_LIST_DIR}/ns/cpuarch_ns.cmake
DESTINATION ${INSTALL_PLATFORM_NS_DIR}
RENAME cpuarch.cmake)

install(FILES config.cmake
DESTINATION ${INSTALL_PLATFORM_NS_DIR})

install(FILES ../common/config.cmake
DESTINATION ${INSTALL_PLATFORM_NS_DIR}/../common/)

install(DIRECTORY ${Trusted\ Firmware\ M_SOURCE_DIR}/platform/ext/target/nordic_nrf/nrf7120pdk_nrf7120_cpuapp/tests
DESTINATION ${INSTALL_PLATFORM_NS_DIR}
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2025, Nordic Semiconductor ASA.
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
#-------------------------------------------------------------------------------

include(${CMAKE_CURRENT_LIST_DIR}/../common/config.cmake)

set(NRF_SOC_VARIANT nrf7120 CACHE STRING "nRF SoC Variant")

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

# Override PS_CRYPTO_KDF_ALG
set(PS_CRYPTO_KDF_ALG PSA_ALG_SP800_108_COUNTER_CMAC CACHE STRING "KDF Algorithm to use")

# attest_hal.c includes bl_storage.h, which needs CONFIG_NRFX_MRAMC to be defined.
# This is because bl_storage is a lib intended to be run from either the bootloader (Zephyr) or from TF-M.
# This is independent from the NS image's CONFIG_NRFX_MRAMC, which must be disabled, so we can not inherit
# this from app Kconfig.
if(TFM_PARTITION_INITIAL_ATTESTATION)
add_compile_definitions(CONFIG_NRFX_MRAMC)
endif()
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# Copyright (c) 2025, Nordic Semiconductor ASA.
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

set(PLATFORM_PATH platform/ext/target/nordic_nrf)

include(${PLATFORM_PATH}/common/nrf7120/cpuarch.cmake)
add_compile_definitions(__NRF_TFM__)
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# Copyright (c) 2025, Nordic Semiconductor ASA.
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

set(PLATFORM_DIR ${CMAKE_CURRENT_LIST_DIR})
set(PLATFORM_PATH ${CMAKE_CURRENT_LIST_DIR})

include(${CMAKE_CURRENT_LIST_DIR}/common/nrf7120/cpuarch.cmake)
3 changes: 3 additions & 0 deletions soc/nordic/nrf71/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ if(NOT CONFIG_BUILD_WITH_TFM AND CONFIG_PSA_NEED_CRACEN_KMU_DRIVER)
# We are sure that this file will be included first.
zephyr_linker_sources(RAM_SECTIONS SORT_KEY ! kmu_push_area_section.ld)
endif()

# WZN-6148: port this to zephyr/modules/hal_nordic/nrfx/CMakeLists.txt in future
zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF7120_SKIP_CLOCK_CONFIG NRF_SKIP_CLOCK_CONFIGURATION)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should not pollute compiler invocation line for all Zephyr sources with such configs.

Those should be provided to MDK either for only the sources which needs it or through a form of a single config header, like this: https://github.com/zephyrproject-rtos/zephyr/blob/main/modules/hal_nordic/nrfx/nrfx_kconfig.h

Also providing a Kconfig -> MDK defines this way is not scalable.
The Kconfig already have dependencies, but adding the translation in CMake adds extra level of dependencies (namely the inclusion tree of the CMake file itself), which thus results in constructs like this having to be duplicated.
A single config header, as linked, allows to:

  1. Have all Kconfig -> MDK defines at a single locations
  2. Avoids duplicated CMake constructs when different CMake code is included in different trees.

Copy link
Contributor Author

@travis3630 travis3630 Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I see nrf54lx is doing it the same: https://github.com/nrfconnect/sdk-zephyr/blob/main/modules/hal_nordic/nrfx/CMakeLists.txt#L193 , and I think it is better to align for same workflow?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tejlmand What should I do with this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is better to align for same workflow?

it's better to clean up the mess instead of building on top of it.

As your example show, then we now have 2 specific Kconfigs mapping to same MDK symbol, and two CMake codelines doing the same thing but in different places.

Not to mention that the trees including nrf71/CMakeLists.txt and nrfx/CMakeLists.txt may be included based on additional different (Kconfig) conditions.

The most correct thing is having a single Kconfig, which then has proper dependencies like this:

config NRF_SKIP_CLOCK_CONFIG
        bool
        prompt "Skip clock frequency configuration" if TRUSTED_EXECUTION_SECURE
        depends on SOC_SERIES_NRF54LX || SOC_SERIES_NRF71X
        default y if TRUSTED_EXECUTION_NONSECURE

and then in a Kconfig to MDK mapping header have (such as this https://github.com/zephyrproject-rtos/zephyr/blob/main/modules/hal_nordic/nrfx/nrfx_kconfig.h):

#ifdef CONFIG_NRF_SKIP_CLOCK_CONFIG
#define NRF_SKIP_CLOCK_CONFIGURATION
#endif

That will give you:

  • A single Kconfig setting instead of 2
  • Proper dependencies on the Kconfig which:
    • becomes part of the documentation
    • Can be easily seen in menuconfig
    • Kconfig check support, such as dependency loop checking
  • No line duplication in CMake, instead of two lines like:
    zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF7120_SKIP_CLOCK_CONFIG NRF_SKIP_CLOCK_CONFIGURATION)
    zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54LX_SKIP_CLOCK_CONFIG NRF_SKIP_CLOCK_CONFIGURATION)
    
    there's a single location where all mapping between Kconfig and MDK can be found.

When looking at compile invocation and see gcc ..... -DNRF_SKIP_CLOCK_CONFIGURATION ... then it's hard to know where this flag originates from and why, because this flag might be present multiple places in the CMake code, and which one was the line causing it to be set ?
But if the flag exist in a Kconfig to MDK mapping header as presented above, then it's much easier to see it's directly related to a Kconfig symbol, and I can check that Kconfig symbol for dependencies / selects.
No extra dependencies are added directly or indirectly, whereas the symbol mapping in CMake automatically adds indirect dependencies

see also: zephyrproject-rtos/zephyr#95874 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

14 changes: 14 additions & 0 deletions soc/nordic/nrf71/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,18 @@ config NRF_TRUSTZONE_RAM_REGION_SIZE
This abstraction allows us to configure TRUSTZONE without depending
on peripheral specific symbols.

config SOC_NRF7120_SKIP_CLOCK_CONFIG
bool
prompt "Skip clock frequency configuration in system initialization" if TRUSTED_EXECUTION_SECURE
default y if TRUSTED_EXECUTION_NONSECURE
help
With this option, the CPU clock frequency is not set during this
Zephyr image's system initialization. The CPU runs with either
the HW reset values, or with the configuration set by an image
earlier in the boot chain.

Note that for security reasons it is not supported to configure
the clock peripheral (NRF_OSCILLATORS) from the non-secure
domain.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should not be needed when you have this zephyrproject-rtos/zephyr#97474.

A small hint / Kconfig info, not something required to change 🙂
I see you created following upstream

config NRF_SKIP_CLOCK_CONFIG
	bool
	prompt "Skip clock frequency configuration" if TRUSTED_EXECUTION_SECURE
	depends on NRF_PLATFORM_LUMOS
	default y if TRUSTED_EXECUTION_NONSECURE

which is one way to solve it, but you could also allow upstream to be specific, like this:

config NRF_SKIP_CLOCK_CONFIG
	bool
	prompt "Skip clock frequency configuration" if TRUSTED_EXECUTION_SECURE
	depends on SOC_SERIES_NRF54LX
	default y if TRUSTED_EXECUTION_NONSECURE

and then downstream extend the symbol by doing:

config NRF_SKIP_CLOCK_CONFIG
	depends on SOC_SERIES_NRF71X

During Kconfig run, then up- and downstream definition are combined and results in the following final definition of the symbol:

config NRF_SKIP_CLOCK_CONFIG
	bool
	prompt "Skip clock frequency configuration" if TRUSTED_EXECUTION_SECURE
	depends on SOC_SERIES_NRF54LX || SOC_SERIES_NRF71X
	default y if TRUSTED_EXECUTION_NONSECURE

endif # SOC_SERIES_NRF71X
4 changes: 2 additions & 2 deletions subsys/partition_manager/pm.yml.tfm
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ tfm_nonsecure:
tfm_storage:
span: []

# In nRF54L15 we place the tfm_storage partitions before the
# In nRF54L15 and nRF7120 we place the tfm_storage partitions before the
# TF-M non-secure application to avoid splitting the secure/non-secure
# partitions more than necessary.
#if defined(CONFIG_SOC_NRF54L15_CPUAPP) || defined(CONFIG_SOC_NRF54LV10A_ENGA_CPUAPP)
#if defined(CONFIG_SOC_NRF54L15_CPUAPP) || defined(CONFIG_SOC_NRF54LV10A_ENGA_CPUAPP) || defined(CONFIG_SOC_NRF7120_ENGA_CPUAPP)

tfm_ps:
placement:
Expand Down