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

module=BOARD
module-dep=LOG
module-str=Log level for board
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"

if BOARD_THINGY91X_NRF5340_CPUAPP || BOARD_THINGY91X_NRF5340_CPUAPP_NS

config BOARD_ENABLE_DCDC_APP
	bool "Application MCU DCDC converter"
	select SOC_DCDC_NRF53X_APP
	default y

config BOARD_ENABLE_DCDC_NET
	bool "Network MCU DCDC converter"
	select SOC_DCDC_NRF53X_NET
	default y

config BOARD_ENABLE_CPUNET
	bool "Enable nRF53 Network MCU"
	select SOC_NRF_GPIO_FORWARDER_FOR_NRF5340 if \
		$(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF_GPIO_FORWARDER))
	help
	  This option enables releasing the Network 'force off' signal, which
	  as a consequence will power up the Network MCU during system boot.
	  Additionally, the option allocates GPIO pins that will be used by UARTE
	  of the Network MCU.
	  Note: GPIO pin allocation can only be configured by the secure Application
	  MCU firmware, so when this option is used with the non-secure version of
	  the board, the application needs to take into consideration, that the
	  secure firmware image must already have configured GPIO allocation for the
	  Network MCU.
	default y

config DOMAIN_CPUNET_BOARD
	string
	default "thingy91x/nrf5340/cpunet"
	depends on BOARD_ENABLE_CPUNET
	help
	  The board which will be used for CPUNET domain when creating a multi
	  image application where one or more images should be located on
	  another board. For example hci_rpmsg on the nRF5340_cpunet for
	  Bluetooth applications.

endif

if BOARD_THINGY91X_NRF5340_CPUNET

# BT_CTLR depends on BT. When BT is enabled we should default to also
# enabling the controller.
config BT_CTLR
	default y if BT

config BT_ECC
	default y if BT

config DOMAIN_CPUAPP_BOARD
	string
	default "thingy91x/nrf5340/cpuapp"
	help
	  The board which will be used for CPUAPP domain when creating a multi
	  image application where one or more images should be located on
	  another board.

endif # BOARD_THINGY91X_NRF5340_CPUNET
