Browse Source

cpuconf: Boot the radiocore from the app in soc_late_init_hook

Boot the radiocore from the app in soc_late_init_hook.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
pull/90362/head
Sebastian Bøe 2 months ago committed by Benjamin Cabé
parent
commit
d949932234
  1. 11
      soc/nordic/nrf54h/Kconfig
  2. 27
      soc/nordic/nrf54h/soc.c

11
soc/nordic/nrf54h/Kconfig

@ -8,6 +8,7 @@ config SOC_SERIES_NRF54HX @@ -8,6 +8,7 @@ config SOC_SERIES_NRF54HX
select HAS_NRFX
select HAS_NORDIC_DRIVERS
select SOC_EARLY_INIT_HOOK if ARM
select SOC_LATE_INIT_HOOK if SOC_NRF54H20_CPURAD_ENABLE
select NRF_PLATFORM_HALTIUM
config SOC_NRF54H20_CPUAPP_COMMON
@ -66,6 +67,16 @@ config SOC_NRF54H20_CPURAD_COMMON @@ -66,6 +67,16 @@ config SOC_NRF54H20_CPURAD_COMMON
select HAS_PM
select HAS_POWEROFF
config SOC_NRF54H20_CPURAD_ENABLE
bool "Boot the nRF54H20 Radio core"
default y if NRF_802154_SER_HOST
depends on SOC_NRF54H20_CPUAPP
select NRF_IRONSIDE_CPUCONF_SERVICE
help
This will at application boot time enable clock to the
Radiocore, and also power will be requested to the Radiocore
subsystem. The Radiocore will then start executing instructions.
config SOC_NRF54H20_CPURAD
select SOC_NRF54H20_CPURAD_COMMON

27
soc/nordic/nrf54h/soc.c

@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
#include <soc/nrfx_coredep.h>
#include <soc_lrcconf.h>
#include <dmm.h>
#include <zephyr/drivers/firmware/nrf_ironside/cpuconf.h>
LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL);
@ -43,6 +44,8 @@ sys_snode_t soc_node; @@ -43,6 +44,8 @@ sys_snode_t soc_node;
ADDRESS_DOMAIN_Msk | \
ADDRESS_BUS_Msk)))
#define DT_NODELABEL_CPURAD_SLOT0_PARTITION DT_NODELABEL(cpurad_slot0_partition)
static void power_domain_init(void)
{
/*
@ -156,6 +159,30 @@ void soc_early_init_hook(void) @@ -156,6 +159,30 @@ void soc_early_init_hook(void)
}
}
#if defined(CONFIG_SOC_NRF54H20_CPURAD_ENABLE)
void soc_late_init_hook(void)
{
int err;
/* The msg will be used for communication prior to IPC
* communication being set up. But at this moment no such
* communication is required.
*/
uint8_t *msg = NULL;
size_t msg_size = 0;
void *radiocore_address =
(void *)(DT_REG_ADDR(DT_GPARENT(DT_NODELABEL_CPURAD_SLOT0_PARTITION)) +
DT_REG_ADDR(DT_NODELABEL_CPURAD_SLOT0_PARTITION));
/* Don't wait as this is not yet supported. */
bool cpu_wait = false;
err = ironside_cpuconf(NRF_PROCESSOR_RADIOCORE, radiocore_address, cpu_wait, msg, msg_size);
__ASSERT(err == 0, "err was %d", err);
}
#endif
void arch_busy_wait(uint32_t time_us)
{
nrfx_coredep_delay_us(time_us);

Loading…
Cancel
Save