# SPDX-License-Identifier: GPL-2.0-only
#
# MediaTek SoC drivers
#
menu "MediaTek SoC drivers"
	depends on ARCH_MEDIATEK || COMPILE_TEST

config MTK_DVFSRC
	tristate "MediaTek DVFSRC Support"
	depends on ARCH_MEDIATEK
	select PM_GENERIC_DOMAINS if PM
	depends on DEVICE_MODULES_MTK_SCPSYS
	help
	  Say yes here to add support for the MediaTek DVFSRC (dynamic voltage
	  and frequency scaling resource collector) found
	  on different MediaTek SoCs. The DVFSRC is a proprietary
	  hardware which is used to collect all the requests from
	  system and turn into the decision of minimum Vcore voltage
	  and minimum DRAM frequency to fulfill those requests.

config DEVICE_MODULES_MTK_DEVAPC
	tristate "Mediatek Device APC Support"
	help
	  Say yes here to enable support for Mediatek Device APC driver.
	  This driver is mainly used to handle the violation which catches
	  unexpected transaction.
	  The violation information is logged for further analysis or
	  countermeasures.

config MTK_DEBUG_DEVAPC
	tristate "Mediatek Device APC UT Support"
	depends on DEVICE_MODULES_MTK_DEVAPC
	help
	  Say yes here to enable support for debugging Mediatek Device APC.
	  This is mainly used for functional test of Device APC driver.
	  Trigger unexpected transactions and check if violation information
	  is logged.

config DEVICE_MODULES_MTK_PMIC_WRAP
	tristate "MediaTek PMIC Wrapper Support"
	depends on RESET_CONTROLLER
	select REGMAP
	help
	  Say yes here to add support for MediaTek PMIC Wrapper found
	  on different MediaTek SoCs. The PMIC wrapper is a proprietary
	  hardware to connect the PMIC.

config DEVICE_MODULES_MTK_SCPSYS
	tristate "MediaTek SCPSYS Support"
	default ARCH_MEDIATEK
	select REGMAP
	select PM_GENERIC_DOMAINS if PM
	help
	  Say yes here to add support for the MediaTek SCPSYS power domain
	  driver.

config DEVICE_MODULES_MTK_SCPSYS_PM_DOMAINS
	tristate "MediaTek SCPSYS generic power domain"
	default ARCH_MEDIATEK
	depends on PM
	select PM_GENERIC_DOMAINS
	select REGMAP
	help
	  Say y here to enable power domain support.
	  In order to meet high performance and low power requirements, the System
	  Control Processor System (SCPSYS) has several power management related
	  tasks in the system.

config DEVICE_MODULES_MTK_MMSYS
	tristate "MediaTek MMSYS Support"
	depends on HAS_IOMEM
	help
	  Say yes here to add support for the MediaTek Multimedia
	  Subsystem (MMSYS).

config MTK_MMDVFS
	tristate "MediaTek MMDVFS Support"
	depends on ARCH_MEDIATEK || COMPILE_TEST
	depends on DEVICE_MODULES_REGULATOR_MTK_DVFSRC
	help
	  Say yes here to add support for the MediaTek Multimedia DVFS (MMDVFS)
	  driver. The MMDVFS is used to set clk for Mediatek multimedia hardwares
	  , such as display, camera, mdp and video codec. Say no if your device
	  does not need to do DVFS for Multimedia hardwares.

config MTK_IPI
	tristate "MediaTek IPI Support"
	depends on RPMSG_MTK
	help
	  Say yes here to add support for the MediaTek IPI between tinysys.
	  MTK IPI consists of APIs to do Linux to/from uP/DSP communication
	  based on rpmsg. Synchronization among tasks is also handled by
	  this layer. If uP/DSP drivers handle by themselves, they can use
	  rpmsg directly.

config MTK_MBOX
	tristate "MediaTek Mbox Support"
	help
	  Say yes here to add support for the MediaTek Mbox driver.
	  MTK MBOX is a physical H/W which consists of configurable 128
	  or 256 bytes SRAM and 32 bit irq. The driver does read/write
	  SRAM and IRQ handling.

config DUMMY_MTK_SCPSYS
	tristate "Dummy scpsys interface"
	default N
	help
	  Say yes here to enable support for scpsys dummy interface.

menu "Security"

source "$(KCONFIG_EXT_PREFIX)drivers/soc/mediatek/devmpu/Kconfig"

endmenu # Security

config MTK_SOCINFO
	tristate "MediaTek SoCInfo Driver"
	select SOC_BUS
	help
	  Include support for the SoC bus socinfo for the MediaTek SoC
	  platforms to provide information about the SoC family and
	  variant to user space.

endmenu
