# SPDX-License-Identifier: GPL-2.0

config MTK_PLATFORM
	string "MTK platform name"

config ARCH_MTK_PROJECT
	string "MTK project name"

config MTK_DTBO_FEATURE
	bool "Support Device Tree Overlay"
	default y
	select BUILD_ARM_DTB_OVERLAY_IMAGE if !ARM64
	select BUILD_ARM64_DTB_OVERLAY_IMAGE if ARM64
	help
	  This allows a central DTB and overlays it dynamically.
	  An overlay can add nodes to the tree and make changes to properties
	  in the existing tree.
	  If you are not sure about this, set y

menu "Storage"
source "drivers/misc/mediatek/pidmap/Kconfig"
endmenu # Storage

menu "Power, PMIC, Battery & Low Power"
source "drivers/misc/mediatek/clkbuf/Kconfig"
source "drivers/misc/mediatek/slbc/Kconfig"
source "drivers/misc/mediatek/cm_mgr/Kconfig"
source "drivers/misc/mediatek/cm_mgr_legacy/Kconfig"
source "drivers/misc/mediatek/mcupm/Kconfig"
source "drivers/misc/mediatek/dvfsrc/Kconfig"
source "drivers/misc/mediatek/dcm/Kconfig"
source "drivers/misc/mediatek/dcm_v1/Kconfig"
source "drivers/misc/mediatek/qos/Kconfig"
source "drivers/misc/mediatek/srclken_rc/Kconfig"
source "drivers/misc/mediatek/lpm/Kconfig"
source "drivers/misc/mediatek/ssc/Kconfig"
source "drivers/misc/mediatek/swpm/Kconfig"
source "drivers/misc/mediatek/power_throttling/Kconfig"
source "drivers/misc/mediatek/pmic_protect/Kconfig"
source "drivers/misc/mediatek/cpufreq_v1/Kconfig"
source "drivers/misc/mediatek/cpufreq_lite/Kconfig"
source "drivers/misc/mediatek/eemgpu/Kconfig"
source "drivers/misc/mediatek/eem_v2/Kconfig"
source "drivers/misc/mediatek/leakage_table/Kconfig"
source "drivers/misc/mediatek/pbm/Kconfig"
source "drivers/misc/mediatek/pbm_v1/Kconfig"
source "drivers/misc/mediatek/mdpm/Kconfig"
source "drivers/misc/mediatek/mdpm_v1/Kconfig"
source "drivers/misc/mediatek/pmsr/Kconfig"
source "drivers/misc/mediatek/timer/Kconfig"
source "drivers/misc/mediatek/cpufreq_v2/Kconfig"
source "drivers/misc/mediatek/cpuidle/Kconfig"
source "drivers/misc/mediatek/mcdi/Kconfig"
source "drivers/misc/mediatek/cpuhotplug/Kconfig"
source "drivers/misc/mediatek/upower/Kconfig"
source "drivers/misc/mediatek/leakage_table_v2/Kconfig"
source "drivers/misc/mediatek/spm/Kconfig"
source "drivers/misc/mediatek/spm_v4/Kconfig"
source "drivers/misc/mediatek/power_gs_v1/Kconfig"
source "drivers/misc/mediatek/thermal/Kconfig"
source "drivers/misc/mediatek/hps_v3/Kconfig"

config MTK_PLAT_POWER_MT6739
	tristate "Platform power specified macro"
	help
	  This macro is used to distinguish the platform dependent parts
	  from those power related features.
	  If the macro is enabled, compile the mt6761 related code.
	  If unsure, say N.

config MTK_PLAT_POWER_MT6761
	tristate "Platform power specified macro"
	help
	  This macro is used to distinguish the platform dependent parts
	  from those power related features.
	  If the macro is enabled, compile the mt6761 related code.
	  If unsure, say N.

config MTK_PLAT_POWER_MT6768
	tristate "Platform power specified macro"
	help
	  This macro is used to distinguish the platform dependent parts
	  from those power related features.
	  If the macro is enabled, compile the mt6768 related code.
	  If unsure, say N.

config MTK_PLAT_POWER_MT6765
	tristate "Platform power specified macro"
	select SCP_DVFS_NOT_READY
	help
	  This macro is used to distinguish the platform dependent parts
	  from those power related features.
	  If the macro is enabled, compile the mt6765 related code.
	  If unsure, say N.

config MTK_PLAT_POWER_MT6833
	tristate "Platform power specified macro"
	help
	  This macro is used to distinguish the platform dependent parts
	  from those power related features.
	  If the macro is enabled, compile the mt6833 related code.
	  If unsure, say N.

endmenu # Power

menu "MultiMedia, Display, Camera"
source "drivers/misc/mediatek/iommu/Kconfig"
source "drivers/misc/mediatek/cameraisp/Kconfig"
source "drivers/misc/mediatek/cmdq/Kconfig"
source "drivers/misc/mediatek/mtk-interconnect/Kconfig"
source "drivers/misc/mediatek/mdp/Kconfig"
source "drivers/misc/mediatek/mmp/Kconfig"
source "drivers/misc/mediatek/lens/Kconfig"
source "drivers/misc/mediatek/flashlight/Kconfig"
source "drivers/misc/mediatek/flashlight/v4l2/Kconfig"
source "drivers/misc/mediatek/imgsensor/Kconfig"
source "drivers/misc/mediatek/jpeg/Kconfig"
source "drivers/misc/mediatek/cam_cal/Kconfig"
source "drivers/misc/mediatek/cam_timesync/Kconfig"
source "drivers/misc/mediatek/camera_mem/Kconfig"
source "drivers/misc/mediatek/vow/Kconfig"
source "drivers/misc/mediatek/ccu/src/Kconfig"
source "drivers/misc/mediatek/vdec_fmt/Kconfig"
source "drivers/misc/mediatek/widevine_drm/Kconfig"
source "drivers/misc/mediatek/mminfra/Kconfig"
source "drivers/misc/mediatek/vmm_spm/Kconfig"
source "drivers/misc/mediatek/vmm_dbg/Kconfig"
endmenu # MultiMedia, Display, Camera

menu "Security"
source "drivers/misc/mediatek/trusted_mem/Kconfig"
source "drivers/misc/mediatek/geniezone/Kconfig"
source "drivers/misc/mediatek/masp/Kconfig"
source "drivers/misc/mediatek/mkp/Kconfig"
endmenu # Security

menu "Tinysys"
source "drivers/misc/mediatek/apusys/Kconfig"
source "drivers/misc/mediatek/sspm/Kconfig"
source "drivers/misc/mediatek/tinysys_scmi/Kconfig"
source "drivers/misc/mediatek/scp/Kconfig"
source "drivers/misc/mediatek/vcp/Kconfig"
endmenu # Tinysys

menu "Debug, log, trace"

config MTK_MET
	tristate "MET FEATURE ENABLE"
	help
	  This selects the MET profile function for MET device.
	  If you want MET feature, say m here.
	  This is needed if support for MET devices is required.
	  If unsure, say N.

config MTK_MET_DEBUG
	bool "MET DEBUG"
	depends on MTK_MET
	help
	  To prevent abi violation, we introduce MET DEBUG config
	  for those MET features enabled only in eng/userdebug build.
	  Say Y in eng/userdebug build.
	  If unsure, say N.

config RTNL_LOCK_DEBUG
	bool "rtnl_lock debugging, deadlock detection"
	depends on STACKTRACE_SUPPORT
	select STACKTRACE
	help
	  If you say Y here then the kernel will detect whether any function
	  hold rtnl_lock too long and some key information will be printed
	  out to help locate the problem.
	  If unsure, say N.

config MTK_VM_DEBUG
	bool "MTK_VM"
	help
	  This is used for debugging kernel memory management related
	  seldom issues.
	  Say Y here if you need debug kernel memory management.
	  If unsure, say N

source "drivers/misc/mediatek/blocktag/Kconfig"
source "drivers/misc/mediatek/mtprof/Kconfig"
source "drivers/misc/mediatek/locking/Kconfig"
source "drivers/misc/mediatek/mmstat/Kconfig"
source "drivers/misc/mediatek/aee/Kconfig"
source "drivers/misc/mediatek/atf/Kconfig"
source "drivers/misc/mediatek/sda/Kconfig"
source "drivers/misc/mediatek/subpmic/Kconfig"
source "drivers/misc/mediatek/monitor_hang/Kconfig"
source "drivers/misc/mediatek/log_store/Kconfig"
source "drivers/misc/mediatek/mtprintk/Kconfig"
source "drivers/misc/mediatek/selinux_warning/Kconfig"
endmenu # Debug

menu "Modem & Connectivity"
source "drivers/misc/mediatek/ccci_util/Kconfig"
source "drivers/misc/mediatek/ccmni/Kconfig"
source "drivers/misc/mediatek/eccci/Kconfig"
source "drivers/misc/mediatek/btif/Kconfig"
source "drivers/misc/mediatek/connectivity/Kconfig"
source "drivers/misc/mediatek/conn_md/Kconfig"
source "drivers/misc/mediatek/conn_scp/Kconfig"
source "drivers/misc/mediatek/nfc/Kconfig"
#drv add by yaozhipeng 20230921 start
source "drivers/misc/mediatek/nfc_tms/Kconfig"
#drv add by yaozhipeng 20230921 end
#prize
source "drivers/misc/mediatek/prize/Kconfig"
#prize
source "drivers/misc/mediatek/memory-amms/Kconfig"
source "drivers/misc/mediatek/mddp/Kconfig"
endmenu # Modem

menu "Other Peripherals"
source "drivers/misc/mediatek/typec/Kconfig"
source "drivers/misc/mediatek/extcon/Kconfig"
source "drivers/misc/mediatek/adsp/Kconfig"
source "drivers/misc/mediatek/audio_ipi/Kconfig"
source "drivers/misc/mediatek/usb_mtp/Kconfig"
source "drivers/misc/mediatek/usb_rndis/Kconfig"
source "drivers/misc/mediatek/usb_boost/Kconfig"
source "drivers/misc/mediatek/usb_meta/Kconfig"
source "drivers/misc/mediatek/usb20/Kconfig"
source "drivers/misc/mediatek/irtx/Kconfig"
source "drivers/misc/mediatek/pwm/Kconfig"
source "drivers/misc/mediatek/sensor/Kconfig"
source "drivers/misc/mediatek/gate_ic/Kconfig"
source "drivers/misc/mediatek/lcd_bias/Kconfig"
endmenu # Other Peripheral

menu "Performance"
source "drivers/misc/mediatek/sched/Kconfig"
source "drivers/misc/mediatek/cache-auditor/Kconfig"
source "drivers/misc/mediatek/performance/Kconfig"
source "drivers/misc/mediatek/perf_common/Kconfig"
source "drivers/misc/mediatek/rps/Kconfig"
source "drivers/misc/mediatek/task_turbo/Kconfig"
endmenu # Performance

menu "Config File"
config BUILD_CONFIG_FILE
	string "build config file"
	help
	  Specify the build.config file which record toolchain environment
	  Such as "build.config.mtk.aarch64"

config ABI_MONITOR
	bool "abi monitor support"
	help
	  Used to enable abi monitor check for KMI,
	  which is the interface between kernel modules and kernel(vmlinux).
	  Say Y here if you are need abi monitor support.
	  If unsure, say N

config EXT_MODULES
	string "out-of-tree kernel modules"
	help
	  Specify out-of-tree kernel modules to build in order
	  The value must be kernel module repo list, such as
	  "vendor/mediatek/kernel_modules/connectivity/common vendor/mediatek/kernel_modules/connectivity/gps"
endmenu # Config

menu "Misc configs"
config FPGA_EARLY_PORTING
	bool "MTK FPGA EARLY PORTING"
	help
	  Used for FPGA early porting to separate code segments between FPGA
	  platform and non-FPGA platform.
	  Say Y here if you are doing FPGA early porting.
	  If unsure, say N
#prize add by zhaopengge 20221128 start
#source "drivers/misc/mediatek/imgsensor/src/isp6s/camera_ldo/Kconfig"
#prize add by zhaopengge 20221128 end
endmenu # Misc

menu "PPM V3"
config MTK_PPM_V3
        tristate "MTK PPM V3"
        help
          Used for PPM V3 to build in order,
          moved from base/power.
          Say Y here if you need to build PPM V3.
          If unsure, say N
endmenu # PPM

menu "Sensors"

config MTK_SENSOR_ARCHITECTURE
	string "MTK SENSOR ARCHITECTURE"
	default "dummy"
	help
	  Sensor config for sensor architecture in project.
	  Please set 1.0/2.0/3.0 etc if you want to support sensor
	  with mediatek sensor architecture.
	  If unsure, set dummy.

source "drivers/misc/mediatek/sensors-1.0/Kconfig"
source "drivers/misc/mediatek/sensor/Kconfig"
endmenu # Sensors

menu "MultiMedia, Display, Camera related configs"
source "drivers/misc/mediatek/videocodec/Kconfig"
endmenu # MultiMedia, Display, Camera related configs


menu "Memory"

config EXTREME_LOW_RAM
	bool "Default disable GPU/CCCI debug mechanism"
	default n
	help
	  Provide config to remove CPU/MD debug mechanism for memory slim.
	  This is a group kernel setting of GMO mechanism,
	  Select "y" separately is not suggested.
	  Select "n" by default.

config MTK_GMO_RAM_OPTIMIZE
	bool "MTK RAM Optimize"
	select MTK_ENABLE_GMO
	select MTK_ENABLE_AGO
	help
	  Provide centeral config to use memory efficiently.
	  GMO mechanism must set both in kernel & project config
	  to prevent different flow.
	  Select "y" if need to enable GMO RAM optimization mechanism.
	  Select "n" if you are not familiar with GMO mechanism.

config MTK_ENABLE_GMO
	bool "Enable/Disable GMO related feautre"
	select EXTREME_LOW_RAM
	help
	  Enable/Disable GMO related feautre.
	  This is a group kernel setting of GMO mechanism,
	  Select "y" separately is not suggested.
	  Select "n" by default.

config MTK_ENABLE_AGO
	bool "Enable/Disable A-Go related feautre"
	select ZRAM
	select CRYPTO_LZ4
	select DM_VERITY
	select DM_ANDROID_VERITY_AT_MOST_ONCE_DEFAULT_ENABLED
	select DM_VERITY_FEC
	select HZ_300
	select PSI
	select ZRAM_WRITEBACK
	select SWAP
	select SDCARD_FS
	select F2FS_FS
	select F2FS_FS_SECURITY
	select F2FS_FS_ENCRYPTION
	select UID_CPUTIME
	select PROCESS_RECLAIM
	help
	  Enable/Disable AGO related feautre.
	  This is a group kernel setting of AGO mechanism.
	  Select "y" separately is not suggested.
	  Select "n" by default.

#drv add by wangwei1 20230510 start
config LCD_BIAS
	tristate "lcd bias Driver"
	help
	  Enables to support lcd bias. 
	  If unsure, say N.
#drv add by wangwei1 20230510 start
#drv add by yaozhipeng 20230607 start
config TMS_CHIP_SUPPORT
	tristate "tms nfc"
	default n
	help
	  hardware_info. If configures to be n, means devices doesn't support
	  hardwareinfo functionality.
	  
#drv add by yaozhipeng 20230607 end 
endmenu # Memory
