Skip to content

Commit d949932

Browse files
SebastianBoekartben
authored andcommitted
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>
1 parent 14a47cb commit d949932

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

soc/nordic/nrf54h/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ config SOC_SERIES_NRF54HX
88
select HAS_NRFX
99
select HAS_NORDIC_DRIVERS
1010
select SOC_EARLY_INIT_HOOK if ARM
11+
select SOC_LATE_INIT_HOOK if SOC_NRF54H20_CPURAD_ENABLE
1112
select NRF_PLATFORM_HALTIUM
1213

1314
config SOC_NRF54H20_CPUAPP_COMMON
@@ -66,6 +67,16 @@ config SOC_NRF54H20_CPURAD_COMMON
6667
select HAS_PM
6768
select HAS_POWEROFF
6869

70+
config SOC_NRF54H20_CPURAD_ENABLE
71+
bool "Boot the nRF54H20 Radio core"
72+
default y if NRF_802154_SER_HOST
73+
depends on SOC_NRF54H20_CPUAPP
74+
select NRF_IRONSIDE_CPUCONF_SERVICE
75+
help
76+
This will at application boot time enable clock to the
77+
Radiocore, and also power will be requested to the Radiocore
78+
subsystem. The Radiocore will then start executing instructions.
79+
6980
config SOC_NRF54H20_CPURAD
7081
select SOC_NRF54H20_CPURAD_COMMON
7182

soc/nordic/nrf54h/soc.c

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <soc/nrfx_coredep.h>
2323
#include <soc_lrcconf.h>
2424
#include <dmm.h>
25+
#include <zephyr/drivers/firmware/nrf_ironside/cpuconf.h>
2526

2627
LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL);
2728

@@ -43,6 +44,8 @@ sys_snode_t soc_node;
4344
ADDRESS_DOMAIN_Msk | \
4445
ADDRESS_BUS_Msk)))
4546

47+
#define DT_NODELABEL_CPURAD_SLOT0_PARTITION DT_NODELABEL(cpurad_slot0_partition)
48+
4649
static void power_domain_init(void)
4750
{
4851
/*
@@ -156,6 +159,30 @@ void soc_early_init_hook(void)
156159
}
157160
}
158161

162+
#if defined(CONFIG_SOC_NRF54H20_CPURAD_ENABLE)
163+
void soc_late_init_hook(void)
164+
{
165+
int err;
166+
167+
/* The msg will be used for communication prior to IPC
168+
* communication being set up. But at this moment no such
169+
* communication is required.
170+
*/
171+
uint8_t *msg = NULL;
172+
size_t msg_size = 0;
173+
174+
void *radiocore_address =
175+
(void *)(DT_REG_ADDR(DT_GPARENT(DT_NODELABEL_CPURAD_SLOT0_PARTITION)) +
176+
DT_REG_ADDR(DT_NODELABEL_CPURAD_SLOT0_PARTITION));
177+
178+
/* Don't wait as this is not yet supported. */
179+
bool cpu_wait = false;
180+
181+
err = ironside_cpuconf(NRF_PROCESSOR_RADIOCORE, radiocore_address, cpu_wait, msg, msg_size);
182+
__ASSERT(err == 0, "err was %d", err);
183+
}
184+
#endif
185+
159186
void arch_busy_wait(uint32_t time_us)
160187
{
161188
nrfx_coredep_delay_us(time_us);

0 commit comments

Comments
 (0)