Skip to content

Commit 580a200

Browse files
committed
[nrf fromlist] cpuconf: Boot the radiocore from the app in soc_late_init_hook
Boot the radiocore from the app in soc_late_init_hook. Upstream PR #: 88908 Signed-off-by: Sebastian Bøe <[email protected]>
1 parent 2245231 commit 580a200

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
@@ -64,6 +65,16 @@ config SOC_NRF54H20_CPURAD_COMMON
6465
select HAS_PM
6566
select HAS_POWEROFF
6667

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

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)