1# nRF9160 innblue V2.2 board configuration
2
3# Copyright (c) 2020 InnBlue
4# SPDX-License-Identifier: Apache-2.0
5
6if BOARD_NRF9160_INNBLUE22 || BOARD_NRF9160_INNBLUE22_NS
7
8config BOARD
9	default "nrf9160_innblue22"
10
11# For the secure version of the board the firmware is linked at the beginning
12# of the flash, or into the code-partition defined in DT if it is intended to
13# be loaded by MCUboot. If the secure firmware is to be combined with a non-
14# secure image (TRUSTED_EXECUTION_SECURE=y), the secure FW image shall always
15# be restricted to the size of its code partition.
16# For the non-secure version of the board, the firmware
17# must be linked into the code-partition (non-secure) defined in DT, regardless.
18# Apply this configuration below by setting the Kconfig symbols used by
19# the linker according to the information extracted from DT partitions.
20
21
22# Workaround for not being able to have commas in macro arguments
23DT_CHOSEN_Z_CODE_PARTITION := zephyr,code-partition
24
25if BOARD_NRF9160_INNBLUE22 && TRUSTED_EXECUTION_SECURE
26
27config FLASH_LOAD_SIZE
28	default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
29
30endif # BOARD_NRF9160_INNBLUE22 && TRUSTED_EXECUTION_SECURE
31
32if BOARD_NRF9160_INNBLUE22_NS
33
34config FLASH_LOAD_OFFSET
35	default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
36
37config FLASH_LOAD_SIZE
38	default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
39
40endif # BOARD_NRF9160_INNBLUE22_NS
41
42config BT_HCI_VS
43	default y if BT
44
45config REGULATOR
46	default y if SENSOR
47
48endif # BOARD_NRF9160_INNBLUE22 || BOARD_NRF9160_INNBLUE22_NS
49