-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[nrf-noup] boards: nordic: Add non-secure targets for nRF7120
This adds the nrf7120pdk/cpuapp/ns board variant to sdk-zephyr. It allows to build nrf7120pdk with TF-M in nRF Connect SDK. This is done as a noup as the out-of-tree board extension feature is not available. When zephyrproject-rtos/zephyr#69548 is completed this commit can be reverted and the variant be placed in sdk-nrf. Signed-off-by: Robert Robinsin <[email protected]>
- Loading branch information
1 parent
416c714
commit a07456c
Showing
9 changed files
with
176 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# nRF7120 PDK board configuration | ||
|
||
# Copyright (c) 2024 Nordic Semiconductor ASA | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if BOARD_NRF7120PDK_NRF7120_ENGA_CPUAPP_NS | ||
|
||
config NRF_MPC_REGION_SIZE | ||
hex | ||
default 0x1000 | ||
help | ||
Region size for the Memory Protection Controller (MPC) in bytes. | ||
|
||
config NRF_TRUSTZONE_FLASH_REGION_SIZE | ||
hex | ||
default NRF_MPC_REGION_SIZE | ||
help | ||
This defines the flash region size from the TRUSTZONE perspective. | ||
It is used when configuring the TRUSTZONE and when setting alignments | ||
requirements for the partitions. | ||
This abstraction allows us to configure TRUSTZONE without depending | ||
on peripheral specific symbols. | ||
|
||
config NRF_TRUSTZONE_RAM_REGION_SIZE | ||
hex | ||
default NRF_MPC_REGION_SIZE | ||
help | ||
This defines the RAM region size from the TRUSTZONE perspective. | ||
It is used when configuring the TRUSTZONE and when setting alignments | ||
requirements for the partitions. | ||
This abstraction allows us to configure TRUSTZONE without depending | ||
on peripheral specific symbols. | ||
|
||
endif # BOARD_NRF7120PDK_NRF7120_ENGA_CPUAPP_NS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
# Copyright (c) 2024 Nordic Semiconductor ASA | ||
# SPDX-License-Identifier: Apache-2.0 | ||
config BOARD_NRF7120PDK | ||
<<<<<<< HEAD | ||
select SOC_NRF7120_ENGA_CPUAPP if BOARD_NRF7120PDK_NRF7120_ENGA_CPUAPP | ||
======= | ||
select SOC_NRF7120_ENGA_CPUAPP if BOARD_NRF7120PDK_NRF7120_ENGA_CPUAPP || BOARD_NRF7120PDK_NRF7120_ENGA_CPUAPP_NS | ||
>>>>>>> 4e69912 (ssquash board) | ||
select SOC_NRF7120_ENGA_CPUAPP if BOARD_NRF7120PDK_NRF7120_ENGA_CPUAPP || \ | ||
BOARD_NRF7120PDK_NRF7120_ENGA_CPUAPP_NS | ||
select SOC_NRF7120_ENGA_CPUFLPR if BOARD_NRF7120PDK_NRF7120_ENGA_CPUFLPR || \ | ||
BOARD_NRF7120PDK_NRF7120_ENGA_CPUFLPR_XIP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
boards/nordic/nrf7120pdk/nrf7120pdk_nrf7120_enga_cpuapp_ns.dts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright (c) 2024 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/dts-v1/; | ||
|
||
#define USE_NON_SECURE_ADDRESS_MAP 1 | ||
|
||
#include "nrf7120_enga_cpuapp_common.dtsi" | ||
|
||
/ { | ||
compatible = "nordic,nrf7120pdk_nrf7120_enga-cpuapp"; | ||
model = "Nordic nRF7120 PDK nRF7120_ENGA Application MCU"; | ||
|
||
chosen { | ||
zephyr,sram = &cpuapp_sram; | ||
}; | ||
}; | ||
|
||
&uart30 { | ||
/* Disable so that TF-M can use this UART */ | ||
status = "disabled"; | ||
|
||
current-speed = <115200>; | ||
pinctrl-0 = <&uart30_default>; | ||
pinctrl-1 = <&uart30_sleep>; | ||
pinctrl-names = "default", "sleep"; | ||
}; |
22 changes: 22 additions & 0 deletions
22
boards/nordic/nrf7120pdk/nrf7120pdk_nrf7120_enga_cpuapp_ns.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright (c) 2024 Nordic Semiconductor ASA | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
|
||
identifier: nrf7120pdk/nrf7120_enga/cpuapp/ns | ||
name: nRF7120-PDK-nRF7120_ENGA-Application-Non-Secure | ||
type: mcu | ||
arch: arm | ||
toolchain: | ||
- gnuarmemb | ||
- xtools | ||
- zephyr | ||
ram: 1024 | ||
flash: 4088 | ||
supported: | ||
- adc | ||
- gpio | ||
- i2c | ||
- spi | ||
- counter | ||
- watchdog | ||
- adc | ||
- i2s |
31 changes: 31 additions & 0 deletions
31
boards/nordic/nrf7120pdk/nrf7120pdk_nrf7120_enga_cpuapp_ns_defconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright (c) 2024 Nordic Semiconductor ASA | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
|
||
# Enable MPU | ||
CONFIG_ARM_MPU=y | ||
|
||
# Enable hardware stack protection | ||
CONFIG_HW_STACK_PROTECTION=y | ||
|
||
CONFIG_NULL_POINTER_EXCEPTION_DETECTION_NONE=y | ||
|
||
# Enable TrustZone-M | ||
CONFIG_ARM_TRUSTZONE_M=y | ||
|
||
# This Board implies building Non-Secure firmware | ||
CONFIG_TRUSTED_EXECUTION_NONSECURE=y | ||
|
||
# Don't enable the cache in the non-secure image as it is a | ||
# secure-only peripheral on 54l | ||
CONFIG_CACHE_MANAGEMENT=n | ||
CONFIG_EXTERNAL_CACHE=n | ||
|
||
CONFIG_UART_CONSOLE=y | ||
CONFIG_CONSOLE=y | ||
CONFIG_SERIAL=y | ||
|
||
# Enable GPIO | ||
CONFIG_GPIO=y | ||
|
||
# Start SYSCOUNTER on driver init | ||
CONFIG_NRF_GRTC_START_SYSCOUNTER=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters