Skip to content

Commit 63b3d97

Browse files
committed
soc: nordic: uicr: Add support for uicr.SECONDARY.PROCESSOR
Add support for uicr.SECONDARY.PROCESSOR. Signed-off-by: Sebastian Bøe <[email protected]>
1 parent 9354e06 commit 63b3d97

File tree

4 files changed

+36
-1
lines changed

4 files changed

+36
-1
lines changed

scripts/ci/check_compliance.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,6 +1268,7 @@ def check_no_undef_outside_kconfig(self, kconf):
12681268
"GEN_UICR_GENERATE_PERIPHCONF", # Used in specialized build tool, not part of main Kconfig
12691269
"GEN_UICR_SECONDARY", # Used in specialized build tool, not part of main Kconfig
12701270
"GEN_UICR_SECONDARY_GENERATE_PERIPHCONF", # Used in specialized build tool, not part of main Kconfig
1271+
"GEN_UICR_SECONDARY_PROCESSOR_VALUE", # Used in specialized build tool, not part of main Kconfig
12711272
"HEAP_MEM_POOL_ADD_SIZE_", # Used as an option matching prefix
12721273
"HUGETLBFS", # Linux, in boards/xtensa/intel_adsp_cavs25/doc
12731274
"IAR_BUFFERED_WRITE",

soc/nordic/common/uicr/gen_uicr.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,12 @@ def main() -> None:
266266
type=lambda s: int(s, 0),
267267
help="Absolute flash address of the secondary firmware (decimal or 0x-prefixed hex)",
268268
)
269+
parser.add_argument(
270+
"--secondary-processor",
271+
default=0xBD2328A8,
272+
type=lambda s: int(s, 0),
273+
help="Processor to boot for the secondary firmware ",
274+
)
269275
parser.add_argument(
270276
"--secondary-periphconf-address",
271277
default=None,
@@ -366,6 +372,7 @@ def main() -> None:
366372
if args.secondary:
367373
uicr.SECONDARY.ENABLE = ENABLED_VALUE
368374
uicr.SECONDARY.ADDRESS = args.secondary_address
375+
uicr.SECONDARY.PROCESSOR = args.secondary_processor
369376

370377
# Handle secondary periphconf if provided
371378
if args.out_secondary_periphconf_hex:

soc/nordic/common/uicr/gen_uicr/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ if(CONFIG_GEN_UICR_SECONDARY)
109109

110110
list(APPEND secondary_args
111111
--secondary-address ${SECONDARY_ADDRESS}
112+
--secondary-processor ${CONFIG_GEN_UICR_SECONDARY_PROCESSOR_VALUE}
112113
)
113114

114115
if(CONFIG_GEN_UICR_SECONDARY_GENERATE_PERIPHCONF)

soc/nordic/common/uicr/gen_uicr/Kconfig

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,40 @@ config GEN_UICR_GENERATE_PERIPHCONF
1313
config GEN_UICR_SECONDARY
1414
bool "Enable UICR.SECONDARY.ENABLE"
1515

16+
if GEN_UICR_SECONDARY
17+
1618
config GEN_UICR_SECONDARY_GENERATE_PERIPHCONF
1719
bool "Generate SECONDARY.PERIPHCONF hex alongside UICR"
1820
default y
19-
depends on GEN_UICR_SECONDARY
2021
help
2122
When enabled, the UICR generator will populate the
2223
secondary_periphconf_partition partition.
2324

25+
choice GEN_UICR_SECONDARY_PROCESSOR
26+
prompt "Secondary processor selection"
27+
default GEN_UICR_SECONDARY_PROCESSOR_APPLICATION
28+
help
29+
Processor to boot for the secondary firmware.
30+
31+
config GEN_UICR_SECONDARY_PROCESSOR_APPLICATION
32+
bool "APPLICATION processor"
33+
help
34+
Boot secondary firmware on the APPLICATION processor.
35+
36+
config GEN_UICR_SECONDARY_PROCESSOR_RADIOCORE
37+
bool "RADIOCORE processor"
38+
help
39+
Boot secondary firmware on the RADIOCORE processor.
40+
41+
endchoice
42+
43+
config GEN_UICR_SECONDARY_PROCESSOR_VALUE
44+
hex
45+
default 0xBD2328A8 if GEN_UICR_SECONDARY_PROCESSOR_APPLICATION
46+
default 0x1730C77F if GEN_UICR_SECONDARY_PROCESSOR_RADIOCORE
47+
48+
endif # GEN_UICR_SECONDARY
49+
2450
endmenu
2551

2652
source "Kconfig.zephyr"

0 commit comments

Comments
 (0)