Skip to content

Commit 73a87d1

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

26 files changed

+1208
-11
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_MDBT53V_DB_40_NRF5340_CPUAPP OR CONFIG_BOARD_RAYTAC_MDBT53V_DB_40_NRF5340_CPUAPP_NS)
4+
AND CONFIG_BOARD_ENABLE_CPUNET)
5+
zephyr_library()
6+
zephyr_library_sources(raytac_mdbt53v_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 MDBT53V-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_MDBT53V_DB_40_NRF5340_CPUAPP || BOARD_RAYTAC_MDBT53V_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_mdbt53v_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_MDBT53V_DB_40_NRF5340_CPUAPP || BOARD_RAYTAC_MDBT53V_DB_40_NRF5340_CPUAPP_NS
50+
51+
config DOMAIN_CPUAPP_BOARD
52+
string
53+
default "raytac_mdbt53v_db_40_nrf5340_cpuapp"
54+
depends on BOARD_RAYTAC_MDBT53V_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_MDBT53V_DB_40_NRF5340_CPUAPP
9+
bool "Raytac MDBT53V-DB-40 nRF5340 Application MCU"
10+
11+
config BOARD_RAYTAC_MDBT53V_DB_40_NRF5340_CPUAPP_NS
12+
bool "Raytac MDBT53V-DB-40 nRF5340 Application MCU non-secure"
13+
14+
endif # SOC_NRF5340_CPUAPP_QKAA
15+
16+
config BOARD_RAYTAC_MDBT53V_DB_40_NRF5340_CPUNET
17+
bool "Raytac MDBT53V-DB-40 NRF5340 Network MCU"
18+
depends on SOC_NRF5340_CPUNET_QKAA
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Raytac MDBT53V-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_MDBT53V_DB_40_NRF5340_CPUAPP || BOARD_RAYTAC_MDBT53V_DB_40_NRF5340_CPUAPP_NS
7+
8+
config BOARD
9+
default "raytac_mdbt53v_db_40_nrf5340_cpuapp" if BOARD_RAYTAC_MDBT53V_DB_40_NRF5340_CPUAPP || BOARD_RAYTAC_MDBT53V_DB_40_NRF5340_CPUAPP_NS
10+
# By default, if we build for a Non-Secure version of the board,
11+
# enable building with TF-M as the Secure Execution Environment.
12+
config BUILD_WITH_TFM
13+
default n if BOARD_BL5340_DVK_CPUAPP_NS
14+
15+
if BUILD_WITH_TFM
16+
17+
# By default, if we build with TF-M, instruct build system to
18+
# flash the combined TF-M (Secure) & Zephyr (Non Secure) image
19+
config TFM_FLASH_MERGED_BINARY
20+
bool
21+
default n
22+
23+
endif # BUILD_WITH_TFM
24+
25+
# Code Partition:
26+
#
27+
# For the secure version of the board the firmware is linked at the beginning
28+
# of the flash, or into the code-partition defined in DT if it is intended to
29+
# be loaded by MCUboot. If the secure firmware is to be combined with a non-
30+
# secure image (TRUSTED_EXECUTION_SECURE=y), the secure FW image shall always
31+
# be restricted to the size of its code partition.
32+
#
33+
# For the non-secure version of the board, the firmware
34+
# must be linked into the code-partition (non-secure) defined in DT, regardless.
35+
# Apply this configuration below by setting the Kconfig symbols used by
36+
# the linker according to the information extracted from DT partitions.
37+
38+
# SRAM Partition:
39+
#
40+
# If the secure firmware is to be combined with a non-secure image
41+
# (TRUSTED_EXECUTION_SECURE=y), the secure FW image SRAM shall always
42+
# be restricted to the secure image SRAM partition (sram-secure-partition).
43+
# Otherwise (if TRUSTED_EXECUTION_SECURE is not set) the whole zephyr,sram
44+
# may be used by the image.
45+
#
46+
# For the non-secure version of the board, the firmware image SRAM is
47+
# always restricted to the allocated non-secure SRAM partition.
48+
#
49+
# Workaround for not being able to have commas in macro arguments
50+
DT_CHOSEN_Z_CODE_PARTITION := zephyr,code-partition
51+
DT_CHOSEN_Z_SRAM_PARTITION := zephyr,sram-secure-partition
52+
53+
if BOARD_RAYTAC_MDBT53V_DB_40_NRF5340_CPUAPP && TRUSTED_EXECUTION_SECURE
54+
55+
config FLASH_LOAD_SIZE
56+
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
57+
58+
config SRAM_SIZE
59+
default $(dt_chosen_reg_size_int,$(DT_CHOSEN_Z_SRAM_PARTITION),0,K)
60+
61+
endif # BOARD_RAYTAC_MDBT53V_DB_40_NRF5340_CPUAPP && TRUSTED_EXECUTION_SECURE
62+
63+
if BOARD_RAYTAC_MDBT53V_DB_40_NRF5340_CPUAPP_NS
64+
65+
config FLASH_LOAD_OFFSET
66+
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
67+
68+
config FLASH_LOAD_SIZE
69+
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
70+
71+
endif # BOARD_RAYTAC_MDBT53V_DB_40_NRF5340_CPUAPP_NS
72+
73+
endif # BOARD_RAYTAC_MDBT53V_DB_40_NRF5340_CPUAPP || BOARD_RAYTAC_MDBT53V_DB_40_NRF5340_CPUAPP_NS
74+
75+
config BOARD
76+
default "raytac_mdbt53v_dv_40_nrf5340_cpunet" if BOARD_RAYTAC_MDBT53V_DB_40_NRF5340_CPUNET
77+
78+
config IPM_NRFX
79+
default IPM
80+
81+
config MBOX_NRFX_IPC
82+
default MBOX
83+
84+
if BOARD_RAYTAC_MDBT53V_DB_40_NRF5340_CPUAPP || BOARD_RAYTAC_MDBT53V_DB_40_NRF5340_CPUAPP_NS
85+
86+
choice BT_HCI_BUS_TYPE
87+
default BT_RPMSG if BT
88+
endchoice
89+
90+
config HEAP_MEM_POOL_SIZE
91+
default 4096 if BT_RPMSG
92+
93+
endif # BOARD_RAYTAC_MDBT53V_DB_40_NRF5340_CPUAPP || BOARD_RAYTAC_MDBT53V_DB_40_NRF5340_CPUAPP_NS
94+
95+
if BOARD_RAYTAC_MDBT53V_DB_40_NRF5340_CPUNET
96+
97+
config BT_CTLR
98+
default y if BT
99+
100+
endif # BOARD_RAYTAC_MDBT53V_DB_40_NRF5340_CPUNET
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
if(CONFIG_BOARD_RAYTAC_MDBT53V_DB_40_NRF5340_CPUAPP OR CONFIG_BOARD_RAYTAC_MDBT53V_DB_40_NRF5340_CPUAPP_NS)
4+
board_runner_args(jlink "--device=nrf5340_xxaa_app" "--speed=4000")
5+
endif()
6+
7+
if(CONFIG_BOARD_RAYTAC_MDBT53V_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/jlink.board.cmake)
47.2 KB
Loading

0 commit comments

Comments
 (0)