1# Copyright 2019,2024 NXP
2# SPDX-License-Identifier: Apache-2.0
3
4if BOARD_LPCXPRESSO55S69
5
6if FXOS8700
7
8choice FXOS8700_MODE
9	default FXOS8700_MODE_ACCEL
10endchoice
11
12config FXOS8700_DRDY_INT1
13	default y
14	depends on FXOS8700_TRIGGER
15
16endif # FXOS8700
17
18# For the secure version of the board the firmware is linked at the beginning
19# of the flash, or into the code-partition defined in DT if it is intended to
20# be loaded by MCUboot. If the secure firmware is to be combined with a non-
21# secure image (TRUSTED_EXECUTION_SECURE=y), the secure FW image shall always
22# be restricted to the size of its code partition.
23# For the non-secure version of the board, the firmware
24# must be linked into the code-partition (non-secure) defined in DT, regardless.
25# Apply this configuration below by setting the Kconfig symbols used by
26# the linker according to the information extracted from DT partitions.
27
28# Workaround for not being able to have commas in macro arguments
29DT_CHOSEN_Z_CODE_PARTITION := zephyr,code-partition
30
31config FLASH_LOAD_SIZE
32	default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
33	depends on BOARD_LPCXPRESSO55S69_LPC55S69_CPU0 && TRUSTED_EXECUTION_SECURE
34
35if TRUSTED_EXECUTION_NONSECURE || BOARD_LPCXPRESSO55S69_LPC55S69_CPU1
36
37config FLASH_LOAD_OFFSET
38	default 0x50000 if (!TFM_BL2 && BUILD_WITH_TFM)
39	default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
40
41config FLASH_LOAD_SIZE
42	default 0x40000 if (!TFM_BL2 && BUILD_WITH_TFM)
43	default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
44
45config PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY
46	default y if MBEDTLS_PSA_CRYPTO_CLIENT && MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
47
48endif # TRUSTED_EXECUTION_NONSECURE || BOARD_LPCXPRESSO55S69_LPC55S69_CPU1
49
50choice TFM_PROFILE_TYPE
51	depends on BUILD_WITH_TFM
52	default TFM_PROFILE_TYPE_MEDIUM
53endchoice
54
55if BOOTLOADER_MCUBOOT
56choice MCUBOOT_BOOTLOADER_MODE
57	# Board only supports MCUBoot via "upgrade only" method:
58	default MCUBOOT_BOOTLOADER_MODE_OVERWRITE_ONLY
59endchoice
60endif #BOOTLOADER_MCUBOOT
61
62endif # BOARD_LPCXPRESSO55S69
63