1# BL5340-DVK board configuration 2 3# Copyright (c) 2019-2020 Nordic Semiconductor ASA 4# Copyright (c) 2021-2023 Laird Connectivity 5# SPDX-License-Identifier: Apache-2.0 6 7if BOARD_BL5340_DVK_CPUAPP || BOARD_BL5340_DVK_CPUAPP_NS 8 9config BOARD 10 default "bl5340_dvk_cpuapp" if BOARD_BL5340_DVK_CPUAPP || BOARD_BL5340_DVK_CPUAPP_NS 11 12 13config I2C 14 default GPIO || DAC 15 16# By default, if we build for a Non-Secure version of the board, 17# enable building with TF-M as the Secure Execution Environment. 18config BUILD_WITH_TFM 19 default y if BOARD_BL5340_DVK_CPUAPP_NS 20 21if BUILD_WITH_TFM 22 23# By default, if we build with TF-M, instruct build system to 24# flash the combined TF-M (Secure) & Zephyr (Non Secure) image 25config TFM_FLASH_MERGED_BINARY 26 bool 27 default y 28 29endif # BUILD_WITH_TFM 30 31# Code Partition: 32# 33# For the secure version of the board the firmware is linked at the beginning 34# of the flash, or into the code-partition defined in DT if it is intended to 35# be loaded by MCUboot. If the secure firmware is to be combined with a non- 36# secure image (TRUSTED_EXECUTION_SECURE=y), the secure FW image shall always 37# be restricted to the size of its code partition. 38# 39# For the non-secure version of the board, the firmware 40# must be linked into the code-partition (non-secure) defined in DT, regardless. 41# Apply this configuration below by setting the Kconfig symbols used by 42# the linker according to the information extracted from DT partitions. 43 44# SRAM Partition: 45# 46# If the secure firmware is to be combined with a non-secure image 47# (TRUSTED_EXECUTION_SECURE=y), the secure FW image SRAM shall always 48# be restricted to the secure image SRAM partition (sram-secure-partition). 49# Otherwise (if TRUSTED_EXECUTION_SECURE is not set) the whole zephyr,sram 50# may be used by the image. 51# 52# For the non-secure version of the board, the firmware image SRAM is 53# always restricted to the allocated non-secure SRAM partition. 54# 55# Workaround for not being able to have commas in macro arguments 56DT_CHOSEN_Z_CODE_PARTITION := zephyr,code-partition 57DT_CHOSEN_Z_SRAM_PARTITION := zephyr,sram-secure-partition 58 59if BOARD_BL5340_DVK_CPUAPP && TRUSTED_EXECUTION_SECURE 60 61config FLASH_LOAD_SIZE 62 default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION)) 63 64config SRAM_SIZE 65 default $(dt_chosen_reg_size_int,$(DT_CHOSEN_Z_SRAM_PARTITION),0,K) 66 67endif # BOARD_BL5340_DVK_CPUAPP && TRUSTED_EXECUTION_SECURE 68 69if BOARD_BL5340_DVK_CPUAPP_NS 70 71config FLASH_LOAD_OFFSET 72 default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION)) 73 74config FLASH_LOAD_SIZE 75 default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION)) 76 77endif # BOARD_BL5340_DVK_CPUAPP_NS 78 79endif # BOARD_BL5340_DVK_CPUAPP || BOARD_BL5340_DVK_CPUAPP_NS 80 81config BOARD 82 default "bl5340_dvk_cpunet" if BOARD_BL5340_DVK_CPUNET 83 84config IPM_NRFX 85 default IPM 86 87config MBOX_NRFX_IPC 88 default MBOX 89 90if BOARD_BL5340_DVK_CPUAPP || BOARD_BL5340_DVK_CPUAPP_NS 91 92choice BT_HCI_BUS_TYPE 93 default BT_RPMSG if BT 94endchoice 95 96config HEAP_MEM_POOL_SIZE 97 default 4096 if BT_RPMSG 98 99config BT_HCI_VS 100 default y if BT 101 102# 2.8" TFT Touch Shield for Arduino w/Capacitive Touch Screen Module 103# is mounted to the DVK using standoffs. 104# https://www.buydisplay.com/2-8-inch-tft-touch-shield-for-arduino-w-capacitive-touch-screen-module 105if DISPLAY 106 107config INPUT_FT5336_INTERRUPT 108 default y 109 110 111if LVGL 112 113config LV_Z_VDB_SIZE 114 default 64 115 116config LV_Z_BITS_PER_PIXEL 117 default 16 118 119choice LV_COLOR_DEPTH 120 default LV_COLOR_DEPTH_16 121endchoice 122 123config LV_COLOR_16_SWAP 124 default y 125 126config INPUT 127 default y 128 129endif # LVGL 130 131endif # DISPLAY 132 133endif # BOARD_BL5340_DVK_CPUAPP || BOARD_BL5340_DVK_CPUAPP_NS 134 135if BOARD_BL5340_DVK_CPUNET 136 137# BT_CTLR depends on BT. When BT is enabled we should default to also 138# enabling the controller. 139config BT_CTLR 140 default y if BT 141 142config BT_ECC 143 default y if BT 144 145endif # BOARD_BL5340_DVK_CPUNET 146