boards: nrf5340dk: Configure RPMsg Service

This patch adds Kconfig entries to nRF5340-DK description that
automatically configure RPMsg Service if it is enabled for the build.

Co-authored-by: Piotr Szkotak <piotr.szkotak@nordicsemi.no>
Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
This commit is contained in:
Hubert Miś 2021-01-18 12:39:02 +01:00 committed by Carles Cufí
commit 9f1ea0f8c7
2 changed files with 38 additions and 17 deletions

View file

@ -1,8 +1,44 @@
# nRF5340 (P)DK board configuration
# Copyright (c) 2019 - 2020 Nordic Semiconductor ASA
# Copyright (c) 2019 - 2021 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config IPM_NRFX
default IPM
config RPMSG_SERVICE_DUAL_IPM_SUPPORT
default RPMSG_SERVICE
if RPMSG_SERVICE_DUAL_IPM_SUPPORT
config IPM_MSG_CH_0_ENABLE
default y
config IPM_MSG_CH_1_ENABLE
default y
config RPMSG_SERVICE_IPM_TX_NAME
default "IPM_0" if RPMSG_SERVICE_MODE_MASTER
default "IPM_1" if RPMSG_SERVICE_MODE_REMOTE
config RPMSG_SERVICE_IPM_RX_NAME
default "IPM_1" if RPMSG_SERVICE_MODE_MASTER
default "IPM_0" if RPMSG_SERVICE_MODE_REMOTE
config IPM_MSG_CH_0_TX
default RPMSG_SERVICE_MODE_MASTER
config IPM_MSG_CH_0_RX
default RPMSG_SERVICE_MODE_REMOTE
config IPM_MSG_CH_1_TX
default RPMSG_SERVICE_MODE_REMOTE
config IPM_MSG_CH_1_RX
default RPMSG_SERVICE_MODE_MASTER
endif # RPMSG_SERVICE_DUAL_IPM_SUPPORT
if BOARD_NRF5340PDK_NRF5340_CPUAPP || BOARD_NRF5340PDK_NRF5340_CPUAPPNS || BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF5340DK_NRF5340_CPUAPPNS
config BOARD_ENABLE_DCDC_APP

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2020 Nordic Semiconductor ASA.
* Copyright (c) 2019-2021 Nordic Semiconductor ASA.
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -12,13 +12,6 @@
LOG_MODULE_REGISTER(nrf5340pdk_nrf5340_cpuapp, CONFIG_LOG_DEFAULT_LEVEL);
/* Shared memory definitions */
#if DT_HAS_CHOSEN(zephyr_ipc_shm)
#define SHM_NODE DT_CHOSEN(zephyr_ipc_shm)
#define SHM_BASE_ADDRESS DT_REG_ADDR(SHM_NODE)
#define SHM_SIZE DT_REG_SIZE(SHM_NODE)
#endif
#if !defined(CONFIG_TRUSTED_EXECUTION_NONSECURE)
/* This should come from DTS, possibly an overlay. */
@ -83,14 +76,6 @@ static int remoteproc_mgr_boot(const struct device *dev)
* this case do the remainder of actions to properly configure and
* boot the Network MCU.
*/
#if defined(SHM_BASE_ADDRESS) && (SHM_BASE_ADDRESS != 0)
/* Initialize inter-processor shared memory block to zero. It is
* assumed that the application image has access to the shared
* memory at this point (see #24147).
*/
memset((void *) SHM_BASE_ADDRESS, 0, SHM_SIZE);
#endif
/* Release the Network MCU, 'Release force off signal' */
NRF_RESET->NETWORK.FORCEOFF = RESET_NETWORK_FORCEOFF_FORCEOFF_Release;