Skip to content

Commit be3dd14

Browse files
committed
kconfig: soc: adopt nRF52 SoC series to support SoC scheme v2
This commit adopts SoC v2 to nRF52 SoC series. This ensures that when Board scheme v2 is used for an nRF52 SoC series, then all SoC selection is handled internally by Kconfig, and no selection / re-configuration is possible by end-user / through configuration files. SoC Scheme v1 is still supported for backward compatibility. The SoC scheme v1 defines a choice menu, into which the SoC config entries must be injected. This is done through the existing `soc/arm/nordic_nrf/Kconfig.soc`. SoC scheme v2 uses promptless entries, and in order to share the same Kconfig.series files, then prompt is made conditional. SoC scheme v2 requires the SoC to be self-contained, that is no references are allowed out-side the SoC Kconfig tree. To support both v1 and v2 scheme, then SoC names have been moved from defconfigs into Kconfig.soc.names, and a Kconfig.soc.common with high level nRF SoC identifiers. This allow tp share those settings between both schemes. To avoid visible prompts for nRF51, nRF53, and nRF91 series, when loaded into SoC scheme v2, then the prompt has been made conditional. Signed-off-by: Torsten Rasmussen <[email protected]>
1 parent 6568e3b commit be3dd14

18 files changed

+171
-115
lines changed

soc/arm/nordic_nrf/Kconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,28 @@ config SOC_FAMILY_NRF
88
select PLATFORM_SPECIFIC_INIT
99
bool
1010

11+
config SOC_SERIES_NRF52X
12+
bool
13+
select ARM
14+
select SOC_COMPATIBLE_NRF52X
15+
select CPU_CORTEX_M4
16+
select CPU_HAS_ARM_MPU
17+
select SOC_FAMILY_NRF
18+
select XIP
19+
select HAS_NRFX
20+
select HAS_NORDIC_DRIVERS
21+
select HAS_SEGGER_RTT
22+
select HAS_SWO
23+
help
24+
Enable support for NRF52 MCU series
25+
1126
if SOC_FAMILY_NRF
1227
config SOC_FAMILY
1328
string
1429
default "nordic_nrf"
1530

1631
source "soc/arm/nordic_nrf/Kconfig.peripherals"
32+
source "soc/arm/nordic_nrf/*/Kconfig.soc.$(SOC_SCHEME)"
1733
source "soc/arm/nordic_nrf/*/Kconfig.soc"
1834

1935
config NRF_SOC_SECURE_SUPPORTED

soc/arm/nordic_nrf/Kconfig.soc

Lines changed: 0 additions & 6 deletions
This file was deleted.

soc/arm/nordic_nrf/Kconfig.soc.v2

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Copyright (c) 2022 Nordic Semiconductor ASA
2+
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
config SOC_SERIES
6+
default "nrf52"
7+
depends on SOC_SERIES_NRF52X
8+
9+
config SOC_FAMILY_NRF
10+
bool
11+
12+
config SOC_FAMILY
13+
string
14+
default "nordic_nrf"
15+
depends on SOC_FAMILY_NRF
16+
17+
config SOC_SERIES_NRF51X
18+
bool
19+
help
20+
Enable support for NRF51 MCU series
21+
22+
config SOC_SERIES_NRF52X
23+
bool
24+
select SOC_FAMILY_NRF
25+
help
26+
Enable support for NRF52 MCU series
27+
28+
config SOC_SERIES_NRF53X
29+
bool
30+
help
31+
Enable support for NRF53 MCU series
32+
33+
config SOC_SERIES_NRF91X
34+
bool
35+
help
36+
Enable support for NRF91 MCU series
37+
38+
rsource "*/Kconfig.soc.v2"

soc/arm/nordic_nrf/nrf51/Kconfig.series

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# SPDX-License-Identifier: Apache-2.0
66

77
config SOC_SERIES_NRF51X
8-
bool "Nordic Semiconductor nRF51 series MCU"
8+
bool "Nordic Semiconductor nRF51 series MCU" if "$(SOC_SCHEME)" = "v1"
99
select ARM
1010
select CPU_CORTEX_M0
1111
select SOC_FAMILY_NRF

soc/arm/nordic_nrf/nrf52/Kconfig.defconfig.nrf52810_QFAA

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55

66
if SOC_NRF52810_QFAA
77

8-
config SOC
9-
default "nRF52810_QFAA"
10-
118
config NUM_IRQS
129
default 30
1310

soc/arm/nordic_nrf/nrf52/Kconfig.defconfig.nrf52811_QFAA

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55

66
if SOC_NRF52811_QFAA
77

8-
config SOC
9-
default "nRF52811_QFAA"
10-
118
config NUM_IRQS
129
default 30
1310

soc/arm/nordic_nrf/nrf52/Kconfig.defconfig.nrf52820_QDAA

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55

66
if SOC_NRF52820_QDAA
77

8-
config SOC
9-
string
10-
default "nRF52820_QDAA"
11-
128
config NUM_IRQS
139
int
1410
default 40

soc/arm/nordic_nrf/nrf52/Kconfig.defconfig.nrf52832_CIAA

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55

66
if SOC_NRF52832_CIAA
77

8-
config SOC
9-
default "nRF52832_CIAA"
10-
118
config NUM_IRQS
129
default 39
1310

soc/arm/nordic_nrf/nrf52/Kconfig.defconfig.nrf52832_QFAA

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55

66
if SOC_NRF52832_QFAA
77

8-
config SOC
9-
default "nRF52832_QFAA"
10-
118
config NUM_IRQS
129
default 39
1310

soc/arm/nordic_nrf/nrf52/Kconfig.defconfig.nrf52832_QFAB

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55

66
if SOC_NRF52832_QFAB
77

8-
config SOC
9-
default "nRF52832_QFAB"
10-
118
config NUM_IRQS
129
default 39
1310

0 commit comments

Comments
 (0)