Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards: Add TF-M support for all nordic NS boards #63515

Merged

Conversation

joerchan
Copy link
Contributor

@joerchan joerchan commented Oct 4, 2023

Add generic SoC support for the supported nordic SoCs:

  • nrf5340
  • nrf9160
  • nrf9120

Add generic SoC support by taking board specific configurations from
zephyr devicetree and kconfig.

@zephyrbot zephyrbot added area: TF-M ARM Trusted Firmware-M (TF-M) platform: nRF Nordic nRFx labels Oct 4, 2023
@zephyrbot zephyrbot added manifest manifest-trusted-firmware-m DNM This PR should not be merged (Do Not Merge) labels Oct 4, 2023
@zephyrbot
Copy link
Collaborator

zephyrbot commented Oct 4, 2023

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
trusted-firmware-m zephyrproject-rtos/trusted-firmware-m@b168d92 zephyrproject-rtos/trusted-firmware-m@696b095 (master) zephyrproject-rtos/trusted-firmware-m@b168d92c..696b0956

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@joerchan joerchan force-pushed the nordic-nrf-generic-board-support branch from 1658ee3 to 14fe946 Compare October 4, 2023 13:30
gmarull
gmarull previously requested changes Oct 4, 2023
Copy link
Member

@gmarull gmarull left a comment

Choose a reason for hiding this comment

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

for 2nd commit: there's no need to add Nordic internals (NCSDK-14811) to upstream commits.

modules/trusted-firmware-m/nordic_nrf/include/util/array.h Outdated Show resolved Hide resolved
boards/arm/actinius_icarus/Kconfig.defconfig Outdated Show resolved Hide resolved
Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

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

For commit: boards: Enable TF-M by default for nordic SoC NS boards:
What about adding a Kconfig TFM_NS_TARGET set to y by _NS targets which would allow to do all this at a single location ?

@joerchan joerchan force-pushed the nordic-nrf-generic-board-support branch from 14fe946 to 052365a Compare October 5, 2023 08:44
@joerchan joerchan requested a review from gmarull October 5, 2023 08:44
@zephyrbot zephyrbot added the platform: Laird Connectivity Laird Connectivity label Oct 5, 2023
@gmarull gmarull dismissed their stale review October 5, 2023 08:47

concerns addressed

@joerchan
Copy link
Contributor Author

joerchan commented Oct 9, 2023

@RaytacStanley The RayTac DKs mdbt53_db_40 and mdbt53v_db_40 don't have a uart1 node with pins.
Is it possible to add one and which pins can I assign? It's possible to just add the RX and TX pins.

@joerchan joerchan force-pushed the nordic-nrf-generic-board-support branch from 3e9829c to 48db1ce Compare October 11, 2023 09:10
@joerchan
Copy link
Contributor Author

For commit: boards: Enable TF-M by default for nordic SoC NS boards: What about adding a Kconfig TFM_NS_TARGET set to y by _NS targets which would allow to do all this at a single location ?

@erwango I have done something that addresses the concern of a single location, but limited to the nordic SOC family.
This means that there is no additional kconfig added, and that building for nordic nonsecure boards results in enabling TF-M by default.

modules/trusted-firmware-m/Kconfig.tfm Show resolved Hide resolved
modules/trusted-firmware-m/nordic_nrf/CMakeLists.txt Outdated Show resolved Hide resolved
modules/trusted-firmware-m/nordic_nrf/include/RTE_Device.h Outdated Show resolved Hide resolved
soc/arm/nordic_nrf/Kconfig Outdated Show resolved Hide resolved
@erwango
Copy link
Member

erwango commented Oct 11, 2023

For commit: boards: Enable TF-M by default for nordic SoC NS boards: What about adding a Kconfig TFM_NS_TARGET set to y by _NS targets which would allow to do all this at a single location ?

@erwango I have done something that addresses the concern of a single location, but limited to the nordic SOC family. This means that there is no additional kconfig added, and that building for nordic nonsecure boards results in enabling TF-M by default.

Ok, fine with me. Out of curiosity, did you had a specific concern for limit this to NRF ?

@joerchan
Copy link
Contributor Author

Ok, fine with me. Out of curiosity, did you had a specific concern for limit this to NRF ?

I just don't want to make this choice for everyone. For nordic I know what the policy is, for the others I have no idea.

@joerchan joerchan force-pushed the nordic-nrf-generic-board-support branch from 48db1ce to 68d7a53 Compare October 11, 2023 12:06
anangl
anangl previously approved these changes Oct 11, 2023
modules/trusted-firmware-m/nordic_nrf/include/device_cfg.h Outdated Show resolved Hide resolved
anangl
anangl previously approved these changes Oct 11, 2023
@joerchan joerchan force-pushed the nordic-nrf-generic-board-support branch from 496e0b1 to 322aec9 Compare October 23, 2023 12:54
@zephyrbot zephyrbot removed the DNM This PR should not be merged (Do Not Merge) label Oct 23, 2023
anangl
anangl previously approved these changes Oct 23, 2023
Add generic SoC support for the supported nordic SoCs:
- nrf5340
- nrf9160
- nrf9120

Add generic SoC support by taking board specific configurations from
zephyr devicetree and kconfig.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add uart1 pinctrl assignment to nrf5340 Audio DK.
Assigned according to Schematic for this board.

Uart1 pins needed by TF-M when using the NS board variant.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Enable TF-M by default for nordic nRF5340 and nrf9160 SoC boards.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
All nRF91 and nRF5340 boards (except the DKs) should support TF-M/_ns
now.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add HW flow control pins for raytac_mdbt53_db_40_nrf5340 board.
Use the same pins as the cpunet has been assigned, as the RX / TX lines
was also using the same as cpunet.
Remove bias-pull-up as uart1 using same pins on cpunet does not have
this either.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add uart1 pin assignment for the raytac_mdbt53v_db_40_nrf5340 board.
This is required in order to support building TF-M for the NS variant.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
@joerchan joerchan force-pushed the nordic-nrf-generic-board-support branch from cbec1a3 to f1bbece Compare October 23, 2023 14:09
@carlescufi carlescufi merged commit 023d483 into zephyrproject-rtos:main Oct 24, 2023
39 checks passed
@joerchan joerchan deleted the nordic-nrf-generic-board-support branch October 24, 2023 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants