#
# Copyright (c) 2023 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

config WIFI_NRF70
	default y if BOARD_NRF7002DK

#### Radio core selection
config NRF_DEFAULT_IPC_RADIO
	default y

# Enable IEEE802.15.4 serialization to network core
# This config automatically pulls in the `overlay-802154.conf` in the ipc_radio image
config NETCORE_IPC_RADIO_IEEE802154
	default y if (SOC_SERIES_NRF53X || SOC_SERIES_NRF54HX) && !WIFI_NRF70

# Enable Bluetooth serialization to network core
# This config automatically pulls in the `overlay-bt_hci_ipc.conf` in the ipc_radio image
config NETCORE_IPC_RADIO_BT_HCI_IPC
	default y if (SOC_SERIES_NRF53X || SOC_SERIES_NRF54HX)

#### Bootloader
choice BOOTLOADER
	default BOOTLOADER_MCUBOOT if !BOARD_NRF21540DK && !SOC_SERIES_NRF54HX
endchoice

if BOOTLOADER_MCUBOOT

#### DFU multi-image support
config DFU_MULTI_IMAGE_PACKAGE_BUILD
	default y

config DFU_MULTI_IMAGE_PACKAGE_APP
	default y

config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY
	default y

#### DFU network core configuration
if SOC_SERIES_NRF53X

config MCUBOOT_UPDATEABLE_IMAGES
	default 2

choice MCUBOOT_MODE
	default MCUBOOT_MODE_OVERWRITE_ONLY
endchoice

choice BOOT_SIGNATURE_TYPE
	default BOOT_SIGNATURE_TYPE_RSA
endchoice

config SECURE_BOOT_NETCORE
	default y

config NETCORE_APP_UPDATE
	default y

config DFU_MULTI_IMAGE_PACKAGE_NET
	default y

endif # SOC_SERIES_NRF53X

if BOARD_NRF54L15DK_NRF54L15_CPUAPP_NS

# Disable checking the external drivers for NS build.
config PM_OVERRIDE_EXTERNAL_DRIVER_CHECK
	default y

# override the mcuboot pad size, because it is not set globally for NS build.
config PM_MCUBOOT_PAD
	default 0x800

endif # BOARD_NRF54L15DK_NRF54L15_CPUAPP_NS

endif # BOOTLOADER_MCUBOOT

if SOC_SERIES_NRF54HX

config SUIT_ENVELOPE
	default y

config SUIT_BUILD_FLASH_COMPANION
	default y

config SUIT_MULTI_IMAGE_PACKAGE_BUILD
	default y if MATTER_OTA

endif # SOC_SERIES_NRF54HX

#### Enable generating factory data
config MATTER_FACTORY_DATA_GENERATE
	default y if !BOARD_NRF21540DK

source "${ZEPHYR_BASE}/share/sysbuild/Kconfig"
