Skip to content

Commit abce052

Browse files
gmarullcarlescufi
authored andcommitted
boards: arm: nrf5340dk_nrf5340: move defaults to Kconfig.defconfig
Kconfig.defconfig is the file meant for adjusting other Kconfig options defaults. Also removed some redundant default conditions. Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent 12ac3fd commit abce052

File tree

2 files changed

+68
-63
lines changed

2 files changed

+68
-63
lines changed

boards/arm/nrf5340dk_nrf5340/Kconfig

Lines changed: 3 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -3,45 +3,6 @@
33
# Copyright (c) 2019 - 2021 Nordic Semiconductor ASA
44
# SPDX-License-Identifier: Apache-2.0
55

6-
config IPM_NRFX
7-
default IPM
8-
9-
config MBOX_NRFX_IPC
10-
default MBOX
11-
12-
config RPMSG_SERVICE_DUAL_IPM_SUPPORT
13-
default RPMSG_SERVICE
14-
15-
if RPMSG_SERVICE_DUAL_IPM_SUPPORT
16-
17-
config IPM_MSG_CH_0_ENABLE
18-
default y
19-
20-
config IPM_MSG_CH_1_ENABLE
21-
default y
22-
23-
config RPMSG_SERVICE_IPM_TX_NAME
24-
default "IPM_0" if RPMSG_SERVICE_MODE_MASTER
25-
default "IPM_1" if RPMSG_SERVICE_MODE_REMOTE
26-
27-
config RPMSG_SERVICE_IPM_RX_NAME
28-
default "IPM_1" if RPMSG_SERVICE_MODE_MASTER
29-
default "IPM_0" if RPMSG_SERVICE_MODE_REMOTE
30-
31-
config IPM_MSG_CH_0_TX
32-
default RPMSG_SERVICE_MODE_MASTER
33-
34-
config IPM_MSG_CH_0_RX
35-
default RPMSG_SERVICE_MODE_REMOTE
36-
37-
config IPM_MSG_CH_1_TX
38-
default RPMSG_SERVICE_MODE_REMOTE
39-
40-
config IPM_MSG_CH_1_RX
41-
default RPMSG_SERVICE_MODE_MASTER
42-
43-
endif # RPMSG_SERVICE_DUAL_IPM_SUPPORT
44-
456
if BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF5340DK_NRF5340_CPUAPP_NS
467

478
config BOARD_ENABLE_DCDC_APP
@@ -59,16 +20,6 @@ config BOARD_ENABLE_DCDC_HV
5920
select SOC_DCDC_NRF53X_HV
6021
default y
6122

62-
choice BT_HCI_BUS_TYPE
63-
default BT_RPMSG if BT
64-
endchoice
65-
66-
config HEAP_MEM_POOL_SIZE
67-
default 4096 if BT_RPMSG
68-
69-
config BT_HCI_VS
70-
default y if BT
71-
7223
config BOARD_ENABLE_CPUNET
7324
bool "NRF53 Network MCU"
7425
help
@@ -85,7 +36,7 @@ config BOARD_ENABLE_CPUNET
8536

8637
config DOMAIN_CPUNET_BOARD
8738
string
88-
default "nrf5340dk_nrf5340_cpunet" if BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF5340DK_NRF5340_CPUAPP_NS
39+
default "nrf5340dk_nrf5340_cpunet"
8940
depends on BOARD_ENABLE_CPUNET
9041
help
9142
The board which will be used for CPUNET domain when creating a multi
@@ -95,22 +46,11 @@ config DOMAIN_CPUNET_BOARD
9546

9647
endif # BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF5340DK_NRF5340_CPUAPP_NS
9748

98-
if BOARD_NRF5340DK_NRF5340_CPUNET
99-
100-
# BT_CTLR depends on BT. When BT is enabled we should default to also
101-
# enabling the controller.
102-
config BT_CTLR
103-
default y if BT
104-
105-
config BT_ECC
106-
default y if BT
107-
10849
config DOMAIN_CPUAPP_BOARD
10950
string
110-
default "nrf5340dk_nrf5340_cpuapp" if BOARD_NRF5340DK_NRF5340_CPUNET
51+
default "nrf5340dk_nrf5340_cpuapp"
52+
depends on BOARD_NRF5340DK_NRF5340_CPUNET
11153
help
11254
The board which will be used for CPUAPP domain when creating a multi
11355
image application where one or more images should be located on
11456
another board.
115-
116-
endif # BOARD_NRF5340DK_NRF5340_CPUNET

boards/arm/nrf5340dk_nrf5340/Kconfig.defconfig

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,68 @@ endif # BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF5340DK_NRF5340_CPUAPP_NS
7676

7777
config BOARD
7878
default "nrf5340dk_nrf5340_cpunet" if BOARD_NRF5340DK_NRF5340_CPUNET
79+
80+
config IPM_NRFX
81+
default IPM
82+
83+
config MBOX_NRFX_IPC
84+
default MBOX
85+
86+
config RPMSG_SERVICE_DUAL_IPM_SUPPORT
87+
default RPMSG_SERVICE
88+
89+
if RPMSG_SERVICE_DUAL_IPM_SUPPORT
90+
91+
config IPM_MSG_CH_0_ENABLE
92+
default y
93+
94+
config IPM_MSG_CH_1_ENABLE
95+
default y
96+
97+
config RPMSG_SERVICE_IPM_TX_NAME
98+
default "IPM_0" if RPMSG_SERVICE_MODE_MASTER
99+
default "IPM_1" if RPMSG_SERVICE_MODE_REMOTE
100+
101+
config RPMSG_SERVICE_IPM_RX_NAME
102+
default "IPM_1" if RPMSG_SERVICE_MODE_MASTER
103+
default "IPM_0" if RPMSG_SERVICE_MODE_REMOTE
104+
105+
config IPM_MSG_CH_0_TX
106+
default RPMSG_SERVICE_MODE_MASTER
107+
108+
config IPM_MSG_CH_0_RX
109+
default RPMSG_SERVICE_MODE_REMOTE
110+
111+
config IPM_MSG_CH_1_TX
112+
default RPMSG_SERVICE_MODE_REMOTE
113+
114+
config IPM_MSG_CH_1_RX
115+
default RPMSG_SERVICE_MODE_MASTER
116+
117+
endif # RPMSG_SERVICE_DUAL_IPM_SUPPORT
118+
119+
if BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF5340DK_NRF5340_CPUAPP_NS
120+
121+
choice BT_HCI_BUS_TYPE
122+
default BT_RPMSG if BT
123+
endchoice
124+
125+
config HEAP_MEM_POOL_SIZE
126+
default 4096 if BT_RPMSG
127+
128+
config BT_HCI_VS
129+
default y if BT
130+
131+
endif # BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF5340DK_NRF5340_CPUAPP_NS
132+
133+
if BOARD_NRF5340DK_NRF5340_CPUNET
134+
135+
# BT_CTLR depends on BT. When BT is enabled we should default to also
136+
# enabling the controller.
137+
config BT_CTLR
138+
default y if BT
139+
140+
config BT_ECC
141+
default y if BT
142+
143+
endif # BOARD_NRF5340DK_NRF5340_CPUNET

0 commit comments

Comments
 (0)