Skip to content

Commit

Permalink
[nrf fromlist] boards: control the network CPU directly
Browse files Browse the repository at this point in the history
Board initialization code should not use the network CPU management. It
acts as a permanent request for the network CPU, which causes its users
to be unable to turn it off. Instead, let the board initialization code
control the network CPU directly. It sets initial state of the network
core but does not have any impact on sharing the network CPU as a
resource between its users.

Upstream PR: zephyrproject-rtos/zephyr#72412

Signed-off-by: Jędrzej Ciupis <[email protected]>
  • Loading branch information
Jędrzej Ciupis authored and rlubos committed May 9, 2024
1 parent 9074266 commit 688107b
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <zephyr/logging/log.h>

#include <soc.h>
#include <nrf53_cpunet_mgmt.h>
#include <hal/nrf_reset.h>

LOG_MODULE_REGISTER(bl5340_dvk_cpuapp, CONFIG_LOG_DEFAULT_LEVEL);

Expand Down Expand Up @@ -50,7 +50,7 @@ static int remoteproc_mgr_boot(void)
*/

/* Release the Network MCU, 'Release force off signal' */
nrf53_cpunet_enable(true);
nrf_reset_network_force_off(NRF_RESET, false);

LOG_DBG("Network MCU released.");
#endif /* !CONFIG_TRUSTED_EXECUTION_SECURE */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <zephyr/logging/log.h>

#include <soc.h>
#include <nrf53_cpunet_mgmt.h>
#include <hal/nrf_reset.h>
#include <hal/nrf_gpiote.h>

LOG_MODULE_REGISTER(nrf5340_audio_dk_nrf5340_cpuapp, CONFIG_LOG_DEFAULT_LEVEL);
Expand Down Expand Up @@ -71,7 +71,7 @@ static int remoteproc_mgr_boot(void)
*/

/* Release the Network MCU, 'Release force off signal' */
nrf53_cpunet_enable(true);
nrf_reset_network_force_off(NRF_RESET, false);

LOG_DBG("Network MCU released.");
#endif /* !CONFIG_TRUSTED_EXECUTION_SECURE */
Expand Down
4 changes: 2 additions & 2 deletions boards/nordic/nrf5340dk/nrf5340_cpunet_reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <zephyr/logging/log.h>

#include <soc.h>
#include <nrf53_cpunet_mgmt.h>
#include <hal/nrf_reset.h>

LOG_MODULE_REGISTER(nrf5340dk_nrf5340_cpuapp, CONFIG_LOG_DEFAULT_LEVEL);

Expand Down Expand Up @@ -49,7 +49,7 @@ static int remoteproc_mgr_boot(void)
*/

/* Release the Network MCU, 'Release force off signal' */
nrf53_cpunet_enable(true);
nrf_reset_network_force_off(NRF_RESET, false);

LOG_DBG("Network MCU released.");
#endif /* !CONFIG_TRUSTED_EXECUTION_SECURE */
Expand Down
4 changes: 2 additions & 2 deletions boards/nordic/thingy53/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <soc.h>
#include <nrf53_cpunet_mgmt.h>
#include <hal/nrf_reset.h>

LOG_MODULE_REGISTER(thingy53_board_init);

Expand Down Expand Up @@ -52,7 +52,7 @@ static void enable_cpunet(void)
*/

/* Release the Network MCU, 'Release force off signal' */
nrf53_cpunet_enable(true);
nrf_reset_network_force_off(NRF_RESET, false);

LOG_DBG("Network MCU released.");
#endif /* !CONFIG_TRUSTED_EXECUTION_SECURE */
Expand Down
4 changes: 2 additions & 2 deletions boards/panasonic/pan1783/pan1783_nrf5340_cpunet_reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <zephyr/logging/log.h>

#include <soc.h>
#include <nrf53_cpunet_mgmt.h>
#include <hal/nrf_reset.h>

#if defined(CONFIG_BOARD_PAN1783_EVB_NRF5340_CPUAPP)
LOG_MODULE_REGISTER(pan1783_evb_cpuapp, CONFIG_LOG_DEFAULT_LEVEL);
Expand Down Expand Up @@ -42,7 +42,7 @@ static int remoteproc_mgr_boot(void)
remoteproc_mgr_config();

/* Release the Network MCU, 'Release force off signal' */
nrf53_cpunet_enable(true);
nrf_reset_network_force_off(NRF_RESET, false);

LOG_DBG("Network MCU released.");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <zephyr/logging/log.h>

#include <soc.h>
#include <nrf53_cpunet_mgmt.h>
#include <hal/nrf_reset.h>

LOG_MODULE_REGISTER(raytac_mdbt53_db_40_nrf5340_cpuapp, CONFIG_LOG_DEFAULT_LEVEL);

Expand Down Expand Up @@ -50,7 +50,7 @@ static int remoteproc_mgr_boot(const struct device *dev)
*/

/* Release the Network MCU, 'Release force off signal' */
nrf53_cpunet_enable(true);
nrf_reset_network_force_off(NRF_RESET, false);

LOG_DBG("Network MCU released.");
#endif /* !CONFIG_TRUSTED_EXECUTION_SECURE */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static int remoteproc_mgr_boot(const struct device *dev)
*/

/* Release the Network MCU, 'Release force off signal' */
nrf53_cpunet_enable(true);
nrf_reset_network_force_off(NRF_RESET, false);

LOG_DBG("Network MCU released.");
#endif /* !CONFIG_TRUSTED_EXECUTION_SECURE */
Expand Down

0 comments on commit 688107b

Please sign in to comment.