-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bluetooth: rpc: add nrf53 cpunet enable code
Added the code for enabling nRF53 network core in the Bluetooth RPC configuration. The change is required as the newly introduced Kconfig - CONFIG_SOC_NRF53_CPUNET_ENABLE - for enabling the network core at the SoC level cannot be enabled in projects that use the CONFIG_BT Kconfig. Ref: NCSDK-29186 Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
- Loading branch information
1 parent
6a745bf
commit c78d98b
Showing
3 changed files
with
45 additions
and
0 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
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,7 @@ | ||
# | ||
# Copyright (c) 2024 Nordic Semiconductor | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
zephyr_library_sources_ifdef(CONFIG_SOC_NRF5340_CPUAPP nrf53_cpunet_enable.c) |
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,37 @@ | ||
/* | ||
* Copyright (c) 2024 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <nrf53_cpunet_mgmt.h> | ||
|
||
#include <zephyr/kernel.h> | ||
#include <zephyr/init.h> | ||
|
||
#include <hal/nrf_spu.h> | ||
|
||
static int nrf53_cpunet_init(void) | ||
{ | ||
#if !defined(CONFIG_TRUSTED_EXECUTION_NONSECURE) | ||
/* Retain nRF5340 Network MCU in Secure domain (bus | ||
* accesses by Network MCU will have Secure attribute set). | ||
*/ | ||
nrf_spu_extdomain_set((NRF_SPU_Type *)DT_REG_ADDR(DT_NODELABEL(spu)), 0, true, false); | ||
#endif /* !defined(CONFIG_TRUSTED_EXECUTION_NONSECURE) */ | ||
|
||
#if !defined(CONFIG_TRUSTED_EXECUTION_SECURE) | ||
/* | ||
* Building Zephyr with CONFIG_TRUSTED_EXECUTION_SECURE=y implies | ||
* building also a Non-Secure image. The Non-Secure image will, in | ||
* this case do the remainder of actions to properly configure and | ||
* boot the Network MCU. | ||
*/ | ||
|
||
nrf53_cpunet_enable(true); | ||
#endif /* !CONFIG_TRUSTED_EXECUTION_SECURE */ | ||
|
||
return 0; | ||
} | ||
|
||
SYS_INIT(nrf53_cpunet_init, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); |