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

config MTK_CMDQ
	tristate "MediaTek CMDQ Support"
	depends on ARCH_MEDIATEK || COMPILE_TEST
	select MAILBOX
	select MTK_CMDQ_MBOX
	help
	  Say yes here to add support for the MediaTek Command Queue (CMDQ)
	  driver. The CMDQ is used to help read/write registers with critical
	  time limitation, such as updating display configuration during the
	  vblank.

config MTK_DVFSRC
	tristate "MediaTek DVFSRC Support"
	depends on ARCH_MEDIATEK
	select PM_GENERIC_DOMAINS if PM
	depends on 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 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 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 MTK_MMDVFS
	tristate "MediaTek MMDVFS Support"
	depends on ARCH_MEDIATEK || COMPILE_TEST
	depends on 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.

menu "Security"

source "drivers/soc/mediatek/devapc/Kconfig"
source "drivers/soc/mediatek/devmpu/Kconfig"
endmenu # Security
endmenu

config MTK_PM
	tristate "MediaTek PM Support"
	help
	  Say yes here to add support for Mediatek PM driver.
	  MTK_PM is a physical H/W which consists PWR_CTL and dummy register.
	  The driver does provide boot reason, wakeup reason and wakeup config.

config MTK_BOOTTIME
	tristate "MediaTek boottime record instance"
	help
	  Say yes here to add support for Mediatek PM driver.
	  MTK_PM is a physical H/W which consists PWR_CTL and dummy register.
	  The driver does setting wakeup config and send powerdown request
	  to coprocessor.

config MTK_32BIT_DIV_PATCH
        bool "Support arm 32bit ldivmod patch"
        help
                Select it to support arm 32bit ldivmod patch.

config MTK_RPMSG_32BITS_WORKAROUND
	bool "arm 32 bits rpmsg workaround"
	default n
	help
	  Say yes if you use aarch32 kernel and have the remote processor
	  using rpmsg virtio.
	  This workaround add page struct initialization for reserved memory
	  have compatible string shared-dma-pool.

source "drivers/soc/mediatek/mzc/Kconfig"
source "drivers/soc/mediatek/zdec/Kconfig"
source "drivers/soc/mediatek/realtime/Kconfig"
source "drivers/soc/mediatek/mtk-memory/Kconfig"
source "drivers/soc/mediatek/mtk-bdma/Kconfig"
