# SPDX-License-Identifier: BSD-3-Clause

menu "Platform"

choice
	prompt "Platform"
	default APOLLOLAKE

config BAYTRAIL
	bool "Build for Baytrail"
	select HOST_PTABLE
	select DW_DMA_AGGREGATED_IRQ
	select DMA_SUSPEND_DRAIN
	select DMA_FIFO_PARTITION
	select DW
	select DW_DMA
	select HAVE_RESET_VECTOR_ROM
	select INTERRUPT_LEVEL_1
	select INTERRUPT_LEVEL_4
	select INTERRUPT_LEVEL_5
	select INTEL
	help
	  Select if your target platform is Baytrail-compatible

config CHERRYTRAIL
	bool "Build for Cherrytrail"
	select HOST_PTABLE
	select DW_DMA_AGGREGATED_IRQ
	select DMA_SUSPEND_DRAIN
	select DMA_FIFO_PARTITION
	select DW
	select DW_DMA
	select HAVE_RESET_VECTOR_ROM
	select INTERRUPT_LEVEL_1
	select INTERRUPT_LEVEL_4
	select INTERRUPT_LEVEL_5
	select INTEL
	help
	  Select if your target platform is Cherrytrail-compatible

config HASWELL
	bool "Build for Haswell"
	select HOST_PTABLE
	select DW_DMA_AGGREGATED_IRQ
	select DW
	select DW_DMA
	select HAVE_RESET_VECTOR_ROM
	select INTERRUPT_LEVEL_1
	select INTERRUPT_LEVEL_2
	select INTERRUPT_LEVEL_3
	select INTEL
	help
	  Select if your target platform is Haswell-compatible

config BROADWELL
	bool "Build for Broadwell"
	select HOST_PTABLE
	select DW_DMA_AGGREGATED_IRQ
	select DW
	select DW_DMA
	select HAVE_RESET_VECTOR_ROM
	select INTERRUPT_LEVEL_1
	select INTERRUPT_LEVEL_2
	select INTERRUPT_LEVEL_3
	select INTEL
	help
	  Select if your target platform is Broadwell-compatible

config APOLLOLAKE
	bool "Build for Apollolake"
	select BOOT_LOADER
	select IRQ_MAP
	select DMA_GW
	select DW
	select DW_DMA
	select MEM_WND
	select HW_LLI
	select DMA_FIFO_PARTITION
	select CAVS
	select CAVS_VERSION_1_5
	help
	  Select if your target platform is Apollolake-compatible

config CANNONLAKE
	bool "Build for Cannonlake"
	select BOOT_LOADER
	select IRQ_MAP
	select DMA_GW
	select DW
	select DW_DMA
	select MEM_WND
	select HW_LLI
	select DW_DMA_AGGREGATED_IRQ
	select DMA_FIFO_PARTITION
	select CAVS
	select CAVS_VERSION_1_8
	select WAITI_DELAY
	select CAVS_USE_LPRO_IN_WAITI
	help
	  Select if your target platform is Cannonlake-compatible

config SUECREEK
	bool "Build for Suecreek"
	select BOOT_LOADER
	select IRQ_MAP
	select DW
	select DW_DMA
	select DW_SPI
	select INTEL_IOMUX
	select DW_GPIO
	select HW_LLI
	select DW_DMA_AGGREGATED_IRQ
	select DMA_FIFO_PARTITION
	select CAVS
	select CAVS_VERSION_2_0
	select WAITI_DELAY
	select CAVS_USE_LPRO_IN_WAITI
	help
	  Select if your target platform is Suecreek-compatible

config ICELAKE
	bool "Build for Icelake"
	select BOOT_LOADER
	select IRQ_MAP
	select DMA_GW
	select DW
	select DW_DMA
	select MEM_WND
	select HW_LLI
	select DW_DMA_AGGREGATED_IRQ
	select DMA_FIFO_PARTITION
	select CAVS
	select CAVS_VERSION_2_0
	select WAITI_DELAY
	select CAVS_USE_LPRO_IN_WAITI
	help
	  Select if your target platform is Icelake-compatible

config TIGERLAKE
	bool "Build for Tigerlake"
	select BOOT_LOADER
	select IRQ_MAP
	select DMA_GW
	select DW
	select DW_DMA
	select MEM_WND
	select HW_LLI
	select DW_DMA_AGGREGATED_IRQ
	select DMA_FIFO_PARTITION
	select CAVS
	select CAVS_VERSION_2_5
	select WAITI_DELAY
	select NO_SECONDARY_CORE_ROM
	select CAVS_USE_LPRO_IN_WAITI
	help
	  Select if your target platform is Tigerlake-compatible

config LIBRARY
	bool "Build Library"
	help
	  Select if you want to build a library.
	  It is generic/mock configuration not tied to some specific platform.
	  Library builds are not intended to be run on DSP, but to be used by
	  user-space applications.

config IMX8
	bool "Build for NXP i.MX8"
	select HAVE_RESET_VECTOR_ROM
	select INTERRUPT_LEVEL_1
	select INTERRUPT_LEVEL_2
	select INTERRUPT_LEVEL_3
	select HOST_PTABLE
	select DUMMY_DMA
	select WAITI_DELAY
	select IMX
	select IMX_EDMA
	help
	  Select if your target platform is imx8-compatible

config IMX8X
	bool "Build for NXP i.MX8X"
	select HAVE_RESET_VECTOR_ROM
	select INTERRUPT_LEVEL_1
	select INTERRUPT_LEVEL_2
	select INTERRUPT_LEVEL_3
	select HOST_PTABLE
	select DUMMY_DMA
	select WAITI_DELAY
	select IMX
	select IMX_EDMA
	help
	  Select if your target platform is imx8x-compatible

config IMX8M
	bool "Build for NXP i.MX8M"
	select HAVE_RESET_VECTOR_ROM
	select INTERRUPT_LEVEL_1
	select INTERRUPT_LEVEL_2
	select INTERRUPT_LEVEL_3
	select HOST_PTABLE
	select DUMMY_DMA
	select WAITI_DELAY
	select IMX
	help
	  Select if your target platform is imx8m-compatible

endchoice

config INTEL
	bool
	default n
	help
	  This has to be selected for every Intel platform.
	  It enables Intel platforms-specific features.

config IMX
	bool
	default n
	help
	  This has to be selected for every i.MX NXP platform.
	  It enables NXP platforms-specific features.

config CAVS
	bool
	default n
	select INTEL
	select INTERRUPT_LEVEL_2
	select INTERRUPT_LEVEL_5
	select INTEL_HDA
	select INTEL_MN
	select WAKEUP_HOOK

config CAVS_VERSION_1_5
	depends on CAVS
	bool
	help
	  Select for CAVS version 1.5

config CAVS_VERSION_1_8
	depends on CAVS && !CAVS_VERSION_1_5
	bool
	help
	  Select for CAVS version 1.8

config CAVS_VERSION_2_0
	depends on CAVS && !CAVS_VERSION_1_5 && !CAVS_VERSION_1_8
	bool
	help
	  Select for CAVS version 2.0

config CAVS_VERSION_2_5
	depends on CAVS && !CAVS_VERSION_1_5 && !CAVS_VERSION_1_8 \
			&& !CAVS_VERSION_2_0
	bool
	help
	  Select for CAVS version 2.5

config CONFIG_CHERRYTRAIL_EXTRA_DW_DMA
	bool "Support Cherrytrail 3rd DMAC"
	default n if !CHERRYTRAIL
	depends on CHERRYTRAIL
	help
	  Select if you need support for all 3 DMACs versus the default 2 used
	  in baytrail.

config HP_MEMORY_BANKS
	int "HP memory banks count"
	depends on CAVS
	default 8
	help
	  Available memory banks count for High Performance memory
	  Lowering available banks could result in lower power consumption
	  Too low count should result in unresponsive/crashing image due to not
	  enough space for FW base image
	  Banks are 64kb in size.

config LP_MEMORY_BANKS
	int "LP memory banks count"
	depends on CAVS
	default 0
	help
	  Available memory banks count for Low Power memory.
	  It can be used to turn ON/OFF LPSRAM bank/s.
	  Firmware will turn on only as many banks as are defined here.

config LP_SRAM
	bool
	default LP_MEMORY_BANKS > 0
	help
	  Indicates that platform uses LPSRAM.

config CAVS_LPS
	bool "Intel cAVS Low Power Sequencer for Power Management"
	depends on CAVS
	default n
	help
	  Select this to enable Intel cAVS Low Power Sequencer.
	  This option is required to support S0ix/D0ix mode
	  on cAVS platforms.

config CAVS_LPRO_ONLY
	bool "Use low power ring oscillator always"
	default n
	depends on CAVS && !CAVS_VERSION_1_5
	help
	  Select if you want to use only the 120MHz LPRO as the DSP clock source.
	  This option is for debugging only at the moment, choose n if unclear.

config CAVS_USE_LPRO_IN_WAITI
	bool "Use low power ring oscillator in WFI"
	default n
	depends on CAVS && !CAVS_LPRO_ONLY
	help
	  Select if we want to use LPRO clock in waiti.
	  After waiti exit clock source will be restored.
	  Choose n if unclear.

# TODO: it should just take manifest version and offsets
config RIMAGE_SIGNING_SCHEMA
	string "Rimage firmware signing schema name"
	default "byt" if BAYTRAIL
	default "cht" if CHERRYTRAIL
	default "hsw" if HASWELL
	default "bdw" if BROADWELL
	default "apl" if APOLLOLAKE
	default "cnl" if CANNONLAKE
	default "sue" if SUECREEK
	default "icl" if ICELAKE
	default "tgl" if TIGERLAKE
	default "imx8" if IMX8
	default "imx8x" if IMX8X
	default "imx8m" if IMX8M
	default ""
	help
	  Signing schema name used by rimage to decide how to build final binary

config SYSTICK_PERIOD
	int "System tick period in microseconds"
	default 1000
	help
	  Defines platform system tick period. It is used to
	  drive timer based low latency scheduler and also
	  as a timeout check value for system agent.
	  Value should be provided in microseconds.

config HAVE_AGENT
	bool "Enable system agent"
	default y
	help
	  Enables system agent. It can be disabled on systems
	  which are still unstable and cannot assure that
	  system agent will always execute on time or systems
	  with DMA based scheduling, where asynchronous interrupts
	  can potentially starve the agent.

config AGENT_PANIC_ON_DELAY
	bool "Enable system agent time verification panic"
	default n
	depends on HAVE_AGENT
	help
	  Enables system agent time verification panic.
	  If scheduler timing verification fails, SA will
	  call a DSP panic.

endmenu
