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