# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

config NRF_IRONSIDE
	bool
	depends on SOC_NRF54H20 || SOC_NRF9280_IRON
	help
	  This is selected by drivers interacting with Nordic IronSide firmware.

config NRF_IRONSIDE_CALL
	bool
	depends on DT_HAS_NORDIC_IRONSIDE_CALL_ENABLED
	select NRF_IRONSIDE
	select EVENTS
	select MBOX
	help
	  This is selected by features that require support for IronSide calls.

if NRF_IRONSIDE_CALL

config NRF_IRONSIDE_CALL_INIT_PRIORITY
	int "IronSide calls' initialization priority"
	default 41
	help
	  Initialization priority of IronSide calls. It must be below MBOX_INIT_PRIORITY,
	  but higher than the priority of any feature that selects NRF_IRONSIDE_CALL.

endif # NRF_IRONSIDE_CALL

menu "Nordic IronSide services"
	depends on SOC_NRF54H20 || SOC_NRF9280_IRON

config NRF_IRONSIDE_CPUCONF_SERVICE
	bool "IronSide CPUCONF service"
	depends on SOC_NRF54H20_CPUAPP || SOC_NRF9280_CPUAPP
	select NRF_IRONSIDE_CALL
	help
	  Service used to boot local domain cores.

config NRF_IRONSIDE_TDD_SERVICE
	bool "IronSide TDD service"
	select NRF_IRONSIDE_CALL
	help
	  Service used to control the trace and debug domain.

config NRF_IRONSIDE_UPDATE_SERVICE
	bool "IronSide update service"
	select NRF_IRONSIDE_CALL
	help
	  Service used to update the IronSide SE firmware.

config NRF_IRONSIDE_BOOT_REPORT
	bool "IronSide boot report"
	depends on $(dt_nodelabel_exists,ironside_se_boot_report)
	select NRF_IRONSIDE
	help
	  Support for parsing the Boot Report populated by Nordic IronSide firmware.

config NRF_IRONSIDE_BOOTMODE_SERVICE
	bool "IronSide boot mode service"
	select NRF_IRONSIDE_CALL
	help
	  Service used to reboot into secondary firmware boot mode.

config NRF_IRONSIDE_DVFS_SERVICE
	bool "IronSide DVFS service"
	depends on SOC_NRF54H20_CPUAPP
	select NRF_IRONSIDE_CALL
	help
	  Service used to handle DVFS operating point requests.

if NRF_IRONSIDE_DVFS_SERVICE

config NRF_IRONSIDE_ABB_STATUSANA_CHECK_MAX_ATTEMPTS
	int "IRONSside DVFS ABB analog status check maximum attempts"
	range 0 255
	default 50
	help
	  Maximum attempts with 10us intervals before busy status will be reported.

endif # NRF_IRONSIDE_DVFS_SERVICE

endmenu
