boards: nrf53: switch to the network CPU management API

Switch to the network CPU management API from direct nrfx calls.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
This commit is contained in:
Jędrzej Ciupis 2024-04-10 11:51:14 +02:00 committed by Carles Cufí
parent ec3c3f153b
commit 2b23a52642
7 changed files with 16 additions and 16 deletions

View file

@ -10,7 +10,7 @@
#include <zephyr/logging/log.h>
#include <soc.h>
#include <hal/nrf_reset.h>
#include <nrf53_cpunet_mgmt.h>
LOG_MODULE_REGISTER(bl5340_dvk_cpuapp, CONFIG_LOG_DEFAULT_LEVEL);
@ -50,7 +50,7 @@ static int remoteproc_mgr_boot(void)
*/
/* Release the Network MCU, 'Release force off signal' */
nrf_reset_network_force_off(NRF_RESET, false);
nrf53_cpunet_enable(true);
LOG_DBG("Network MCU released.");
#endif /* !CONFIG_TRUSTED_EXECUTION_SECURE */

View file

@ -9,7 +9,7 @@
#include <zephyr/logging/log.h>
#include <soc.h>
#include <hal/nrf_reset.h>
#include <nrf53_cpunet_mgmt.h>
#include <hal/nrf_gpiote.h>
LOG_MODULE_REGISTER(nrf5340_audio_dk_nrf5340_cpuapp, CONFIG_LOG_DEFAULT_LEVEL);
@ -71,7 +71,7 @@ static int remoteproc_mgr_boot(void)
*/
/* Release the Network MCU, 'Release force off signal' */
nrf_reset_network_force_off(NRF_RESET, false);
nrf53_cpunet_enable(true);
LOG_DBG("Network MCU released.");
#endif /* !CONFIG_TRUSTED_EXECUTION_SECURE */

View file

@ -9,7 +9,7 @@
#include <zephyr/logging/log.h>
#include <soc.h>
#include <hal/nrf_reset.h>
#include <nrf53_cpunet_mgmt.h>
LOG_MODULE_REGISTER(nrf5340dk_nrf5340_cpuapp, CONFIG_LOG_DEFAULT_LEVEL);
@ -49,7 +49,7 @@ static int remoteproc_mgr_boot(void)
*/
/* Release the Network MCU, 'Release force off signal' */
nrf_reset_network_force_off(NRF_RESET, false);
nrf53_cpunet_enable(true);
LOG_DBG("Network MCU released.");
#endif /* !CONFIG_TRUSTED_EXECUTION_SECURE */

View file

@ -8,7 +8,7 @@
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <soc.h>
#include <hal/nrf_reset.h>
#include <nrf53_cpunet_mgmt.h>
LOG_MODULE_REGISTER(thingy53_board_init);
@ -52,7 +52,7 @@ static void enable_cpunet(void)
*/
/* Release the Network MCU, 'Release force off signal' */
nrf_reset_network_force_off(NRF_RESET, false);
nrf53_cpunet_enable(true);
LOG_DBG("Network MCU released.");
#endif /* !CONFIG_TRUSTED_EXECUTION_SECURE */

View file

@ -9,7 +9,7 @@
#include <zephyr/logging/log.h>
#include <soc.h>
#include <hal/nrf_reset.h>
#include <nrf53_cpunet_mgmt.h>
#if defined(CONFIG_BOARD_PAN1783_EVB_NRF5340_CPUAPP)
LOG_MODULE_REGISTER(pan1783_evb_cpuapp, CONFIG_LOG_DEFAULT_LEVEL);
@ -42,7 +42,7 @@ static int remoteproc_mgr_boot(void)
remoteproc_mgr_config();
/* Release the Network MCU, 'Release force off signal' */
nrf_reset_network_force_off(NRF_RESET, false);
nrf53_cpunet_enable(true);
LOG_DBG("Network MCU released.");

View file

@ -6,7 +6,7 @@
#include <soc.h>
#include <zephyr/device.h>
#include <hal/nrf_reset.h>
#include <nrf53_cpunet_mgmt.h>
#if defined(CONFIG_BT_CTLR_DEBUG_PINS_CPUAPP)
#include <../subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/debug.h>
#else
@ -21,7 +21,7 @@ int bt_hci_transport_teardown(const struct device *dev)
{
ARG_UNUSED(dev);
/* Put the Network MCU in Forced-OFF mode. */
nrf_reset_network_force_off(NRF_RESET, true);
nrf53_cpunet_enable(false);
LOG_DBG("Network MCU placed in Forced-OFF mode");
return 0;
@ -43,7 +43,7 @@ int bt_hci_transport_setup(const struct device *dev)
#endif /* !defined(CONFIG_TRUSTED_EXECUTION_NONSECURE) */
/* Release the Network MCU, 'Release force off signal' */
nrf_reset_network_force_off(NRF_RESET, false);
nrf53_cpunet_enable(true);
return 0;
}

View file

@ -8,7 +8,7 @@
#include <zephyr/device.h>
#include <zephyr/ipc/ipc_service.h>
#include <hal/nrf_reset.h>
#include <nrf53_cpunet_mgmt.h>
#include <string.h>
#include "common.h"
@ -130,7 +130,7 @@ int main(void)
k_msleep(500);
LOG_INF("Stop network core");
nrf_reset_network_force_off(NRF_RESET, true);
nrf53_cpunet_enable(false);
LOG_INF("Reset IPC service");
@ -158,7 +158,7 @@ int main(void)
}
LOG_INF("Run network core");
nrf_reset_network_force_off(NRF_RESET, false);
nrf53_cpunet_enable(true);
k_sem_take(&bound_sem, K_FOREVER);