Skip to content

Commit 52ba1ee

Browse files
RaytacStanleycarlescufi
authored andcommitted
boards: arm: add raytac_mdbt53_db_40_nrf5340
Adds new raytac_mdbt53_db_40_nrf5340 board. Signed-off-by: Stanley Huang <[email protected]>
1 parent fdd7e78 commit 52ba1ee

24 files changed

+1327
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
if ((CONFIG_BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUAPP OR CONFIG_BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUAPP_NS)
4+
AND CONFIG_BOARD_ENABLE_CPUNET)
5+
zephyr_library()
6+
zephyr_library_sources(raytac_mdbt53_db_40_nrf5340_cpunet_reset.c)
7+
endif()
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Ratac MDBT53-DB-40 nRF5340 board configuration
2+
3+
# Copyright (c) 2019 - 2021 Nordic Semiconductor ASA
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUAPP || BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUAPP_NS
7+
8+
config BOARD_ENABLE_DCDC_APP
9+
bool "Application MCU DCDC converter"
10+
select SOC_DCDC_NRF53X_APP
11+
default y
12+
13+
config BOARD_ENABLE_DCDC_NET
14+
bool "Network MCU DCDC converter"
15+
select SOC_DCDC_NRF53X_NET
16+
default y
17+
18+
config BOARD_ENABLE_DCDC_HV
19+
bool "High Voltage DCDC converter"
20+
select SOC_DCDC_NRF53X_HV
21+
default y
22+
23+
config BOARD_ENABLE_CPUNET
24+
bool "NRF53 Network MCU"
25+
select SOC_NRF_GPIO_FORWARDER_FOR_NRF5340 if \
26+
$(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF_GPIO_FORWARDER))
27+
help
28+
This option enables releasing the Network 'force off' signal, which
29+
as a consequence will power up the Network MCU during system boot.
30+
Additionally, the option allocates GPIO pins that will be used by UARTE
31+
of the Network MCU.
32+
Note: GPIO pin allocation can only be configured by the secure Application
33+
MCU firmware, so when this option is used with the non-secure version of
34+
the board, the application needs to take into consideration, that the
35+
secure firmware image must already have configured GPIO allocation for the
36+
Network MCU.
37+
default y if (BT || NRF_802154_SER_HOST)
38+
39+
config DOMAIN_CPUNET_BOARD
40+
string
41+
default "raytac_mdbt53_db_40_nrf5340_cpunet"
42+
depends on BOARD_ENABLE_CPUNET
43+
help
44+
The board which will be used for CPUNET domain when creating a multi
45+
image application where one or more images should be located on
46+
another board. For example hci_rpmsg on the nRF5340_cpunet for
47+
Bluetooth applications.
48+
49+
endif # BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUAPP || BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUAPP_NS
50+
51+
config DOMAIN_CPUAPP_BOARD
52+
string
53+
default "raytac_mdbt53_db_40_nrf5340_cpuapp"
54+
depends on BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUNET
55+
help
56+
The board which will be used for CPUAPP domain when creating a multi
57+
image application where one or more images should be located on
58+
another board.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Raytac MDBT53-DB-40 NRF5340 board configuration
2+
3+
# Copyright (c) 2019-2020 Nordic Semiconductor ASA
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if SOC_NRF5340_CPUAPP_QKAA
7+
8+
config BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUAPP
9+
bool "Raytac MDBT53-DB-40 nRF5340 Application MCU"
10+
11+
config BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUAPP_NS
12+
bool "Raytac MDBT53-DB-40 nRF5340 Application MCU non-secure"
13+
14+
endif # SOC_NRF5340_CPUAPP_QKAA
15+
16+
config BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUNET
17+
bool "Raytac MDBT53-DB-40 NRF5340 Network MCU"
18+
depends on SOC_NRF5340_CPUNET_QKAA
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Raytac MDBT53-DB-40 nRF5340 board configuration
2+
3+
# Copyright (c) 2019-2020 Nordic Semiconductor ASA
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUAPP || BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUAPP_NS
7+
8+
config BOARD
9+
default "raytac_mdbt53_db_40_nrf5340_cpuapp"
10+
11+
# By default, if we build for a Non-Secure version of the board,
12+
# enable building with TF-M as the Secure Execution Environment.
13+
config BUILD_WITH_TFM
14+
default n if BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUAPP_NS
15+
16+
if BUILD_WITH_TFM
17+
18+
# By default, if we build with TF-M, instruct build system to
19+
# flash the combined TF-M (Secure) & Zephyr (Non Secure) image
20+
config TFM_FLASH_MERGED_BINARY
21+
bool
22+
default n
23+
24+
endif # BUILD_WITH_TFM
25+
26+
# Code Partition:
27+
#
28+
# For the secure version of the board the firmware is linked at the beginning
29+
# of the flash, or into the code-partition defined in DT if it is intended to
30+
# be loaded by MCUboot. If the secure firmware is to be combined with a non-
31+
# secure image (TRUSTED_EXECUTION_SECURE=y), the secure FW image shall always
32+
# be restricted to the size of its code partition.
33+
#
34+
# For the non-secure version of the board, the firmware
35+
# must be linked into the code-partition (non-secure) defined in DT, regardless.
36+
# Apply this configuration below by setting the Kconfig symbols used by
37+
# the linker according to the information extracted from DT partitions.
38+
39+
# SRAM Partition:
40+
#
41+
# If the secure firmware is to be combined with a non-secure image
42+
# (TRUSTED_EXECUTION_SECURE=y), the secure FW image SRAM shall always
43+
# be restricted to the secure image SRAM partition (sram-secure-partition).
44+
# Otherwise (if TRUSTED_EXECUTION_SECURE is not set) the whole zephyr,sram
45+
# may be used by the image.
46+
#
47+
# For the non-secure version of the board, the firmware image SRAM is
48+
# always restricted to the allocated non-secure SRAM partition.
49+
#
50+
# Workaround for not being able to have commas in macro arguments
51+
DT_CHOSEN_Z_CODE_PARTITION := zephyr,code-partition
52+
DT_CHOSEN_Z_SRAM_PARTITION := zephyr,sram-secure-partition
53+
54+
if BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUAPP && TRUSTED_EXECUTION_SECURE
55+
56+
config FLASH_LOAD_SIZE
57+
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
58+
59+
config SRAM_SIZE
60+
default $(dt_chosen_reg_size_int,$(DT_CHOSEN_Z_SRAM_PARTITION),0,K)
61+
62+
endif # BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUAPP && TRUSTED_EXECUTION_SECURE
63+
64+
if BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUAPP_NS
65+
66+
config FLASH_LOAD_OFFSET
67+
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
68+
69+
config FLASH_LOAD_SIZE
70+
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
71+
72+
endif # BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUAPP_NS
73+
74+
endif # BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUAPP || BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUAPP_NS
75+
76+
config BOARD
77+
default "raytac_mdbt53_dv_40_nrf5340_cpunet" if BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUNET
78+
79+
config IPM_NRFX
80+
default IPM
81+
82+
config MBOX_NRFX_IPC
83+
default MBOX
84+
85+
if BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUAPP || BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUAPP_NS
86+
87+
choice BT_HCI_BUS_TYPE
88+
default BT_RPMSG if BT
89+
endchoice
90+
91+
config HEAP_MEM_POOL_SIZE
92+
default 4096 if BT_RPMSG
93+
94+
endif # BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUAPP || BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUAPP_NS
95+
96+
if BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUNET
97+
98+
config BT_CTLR
99+
default y if BT
100+
101+
endif # BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUNET
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
if(CONFIG_BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUAPP OR CONFIG_BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUAPP_NS)
4+
board_runner_args(jlink "--device=nrf5340_xxaa_app" "--speed=4000")
5+
endif()
6+
7+
if(CONFIG_BOARD_RAYTAC_MDBT53_DB_40_NRF5340_CPUNET)
8+
board_runner_args(jlink "--device=nrf5340_xxaa_net" "--speed=4000")
9+
endif()
10+
11+
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
12+
include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake)
13+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
47.6 KB
Loading

0 commit comments

Comments
 (0)