config MTK_PLATFORM
	string "MTK platform name"

config ARCH_MTK_PROJECT
	string "MTK project name"

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

config MTK_ENG_BUILD
	bool "MTK Engineer Build"
	default n
	help
	  This is an option for developers. Say Y here for MTK engineering
	  mode, which will have more debugging features built-in.
	  Please set N for user mode to avoid performance impact.
	  If unsure, say N here.

config MTK_LM_MODE
	bool "MTK Large Memory mode"
	select ARCH_PHYS_ADDR_T_64BIT
	select ARCH_DMA_ADDR_T_64BIT
	help
	  Large Memory mode for supporting more than 4GB DRAM access
	  It should only be enabled if hardware can support
	  more than 4GB DRAM mapping.
	  If you are not sure about this, set n

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 "Power, PMIC, Battery & Low Power"

config MTK_BASE_POWER
	bool "MediaTek power management"
	help
	  For MediaTek power management features, such as CPU idle,
	  CPU suspend, CPU DVFS, GPU DVFS,
	  Select if you want to enable MediaTek power
	  management feature.

config NONLINEAR_FREQ_CTL
	bool "Non-linear frequency control"
	depends on MTK_CPU_FREQ
	depends on MTK_UNIFY_POWER
	help
	  Choose this option to enable non-linear frequency control.
	  This will change per-opp capacity from linear scaled by
	  freuqency to evaluated by performance. This makes capacity
	  more accurate and will let scheduler/schedutil use more
	  suitable frequency.

config MTK_CLK_BUFFER
	tristate "MediaTek Clock Buffer Support"
	select REGMAP
	help
	  Say yes here to add support for the MediaTek Clock Buffer
	  driver, which support interface for  PMIC 26Mhz output to
	  other HW component such as BB_MD/WCN/NFC/RF/UFS.
	  It could also control FPM/LPM mode switch state.

config MTK_CLKBUF_BBLPM
	bool "MediaTek Clock Buffer BBLPM Mode Support"
	select REGMAP
	help
	  Say yes here to add support for the MediaTek Clock Buffer
	  BBLPM, which support PMIC 26Mhz output transfer to low
	  power mode, less accurate with power consumption.
	  But with restrict condition for some of  XO_BUFFER need to
	  be disabled.

config MTK_CLKBUF_NFC
	bool "MediaTek Clock Buffer NFC Support"
	select REGMAP
	help
	  Say yes here to support for MediaTek Clock Buffer XO_NFC,
	  which support PMIC 26Mhz output to NFC HW component. If
	  this config is not set, XO_NFC will be disabled when
	  driver is probed.

config MTK_QOS_FRAMEWORK
	tristate "MTK QOS FRAMEWORK"
	depends on MTK_TINYSYS_SSPM_SUPPORT
	help
	  This kernel config can be used to enable MTK QOS FRAMEWORK.
	  When enabling this option, BW Limiter and BW Bound Detector
	  will be enabled and set EMI hardware.
	  If unsure, say N.

config MTK_LOW_POWER_MODULE
	bool "Meditaek Low Power Module"
	depends on ARCH_MEDIATEK && MTK_LPM
	default n
	help
	  For MediaTek Low Power Module, such as CPU idle,
	  CPU suspend low power enhencement.
	  Select "y" if you want to enable low power features.
	  Select "n" if unsure.

config MTK_PTPOD
	bool "MTK PTPOD"
	help
	  This kernel config can be used to enable PTPOD.
	  When enable this option, voltage will be
	  changed which will depended on chip.
	  If unsure, say N.

config MTK_STATIC_POWER
	bool "MTK STATIC POWER"
	help
	  This kernel config can be used to enable static power.
	  This information can provide power data to someone who
	  need it
	  If unsure, say N.

config MTK_UNIFY_POWER
	bool "MTK UNIFY POWER"
	help
	  This kernel config can be used to enable unified power table.
	  This table can provide power data and capacity to someone who
	  need it.
	  If unsure, say Y.

source "drivers/misc/mediatek/lpm/Kconfig"
source "drivers/misc/mediatek/apusys/Kconfig"
source "drivers/misc/mediatek/base/power/Kconfig"
source "drivers/misc/mediatek/pmic/Kconfig"

endmenu # Power

menu "MultiMedia, Display, Camera"

config MTK_DISP_PLATFORM
	string "MTK display platform name"
	help
	  To separate display features and control
	  for different platform. Config platform name
	  for your selection. It's used for display
	  driver only.

config MTK_SEC_VIDEO_PATH_SUPPORT
	bool "Enable MTK Secure Video Path Support"
	depends on MTK_IN_HOUSE_TEE_SUPPORT || TRUSTONIC_TEE_SUPPORT || \
	           MTK_GOOGLE_TRUSTY_SUPPORT || MICROTRUST_TEE_SUPPORT
	help
	  This enable MTK Secure Video Path function of Widevine Level1,
	  HW protect the online secure video streaming by ARM/Trustzone
	  support TEE OS of: Trustonic, Microtrust, Blowfish .etc
	  relative modules include: DRM, vdec, venc, cmdq, m4u, display,
	  tplay/DXCC,ssvp, secmem, TEE frameworks, keyinstall, DAPC, MPU,
	  ION, gralloc,RPMB, DXCC, mediacodec, WFD, MDP.etc
	  relative options including: MTK_TEE_SUPPORT, MTK_GP_SUPPORT,
	  MTK_DRM_L1_SUPPORT, MTK_PERSIST_PARTITION_SUPPORT,
	  MTK_DRM_KEY_MNG_SUPPORT.

config MTK_SVP_ON_MTEE_SUPPORT
        bool "Enable MTK SVP on MTEE"
        help
          This enable MTK TEE function of Widevine Level1,
          relative modules include: DRM, vdec, venc, cmdq, m4u, display,
          tplay/DXCC,ssvp, secmem, TEE frameworks, keyinstall, DAPC, MPU,
          ION, gralloc,RPMB, DXCC, mediacodec, WFD, MDP.etc
          relative options including: MTK_TEE_SUPPORT, MTK_GP_SUPPORT,
          MTK_DRM_L1_SUPPORT, MTK_PERSIST_PARTITION_SUPPORT,
          MTK_DRM_KEY_MNG_SUPPORT

config MTK_DRM_KEY_MNG_SUPPORT
	bool "Enable MTK DRM Key Manager Support"
	depends on MTK_IN_HOUSE_TEE_SUPPORT || TRUSTONIC_TEE_SUPPORT || \
	           MTK_GOOGLE_TRUSTY_SUPPORT || MICROTRUST_TEE_SUPPORT
	help
	  This enable MTK DRM Key Manager Support.
	  the DRM key install function is used in the feature of SVP .etc
	  used by DRM/widevine to install and runtime read of keybox.
	  relative options including: MTK_SEC_VIDEO_PATH_SUPPORT and
	  MTK_PERSIST_PARTITION_SUPPORT.

config MTK_LCM_PHYSICAL_ROTATION_HW
	bool "Rotate LCM display for 180 degree using HW"
	help
	  Rotate LCM display for 180 degree using mediatek hardware engine
	  Enable it when LCM hardware is intalled upside down, and you need
	  to rotate the display content to adapting.
	  Select "y" if you want to enable LCM 180 rotate.
	  Select "n" if unsure.

config CUSTOM_KERNEL_IMGSENSOR
	string "Custom image sensor driver"
	help
	  Kernel space image sensor driver. Define  project used all image
	  sensors .The value is combination of CUSTOM_KERNEL_MAIN_IMGSENSOR,
	  CUSTOM_KERNEL_MAIN_BACKUP_IMGSENSOR, CUSTOM_KERNEL_SUB_IMGSENSOR,
	  and CUSTOM_KERNEL_SUB_BACKUP_IMGSENSOR

config MTK_MT6382_BDG
	bool "Support Bridge IC 6382"
	help
	  This config decide if device with BridgeIC 6382
	  BridgeIC 6382 can support VESA-1.2 DSC, compressing display framedata
	  Normal project will disable it first
	  If you are not sure about this, do not set it to y

source "drivers/misc/mediatek/videocodec/Kconfig"
source "drivers/misc/mediatek/mmp/Kconfig"
source "drivers/misc/mediatek/lcm/Kconfig"
source "drivers/misc/mediatek/sync/Kconfig"
source "drivers/misc/mediatek/video/Kconfig"
source "drivers/misc/mediatek/pseudo_m4u/Kconfig"
source "drivers/misc/mediatek/flashlight/Kconfig"
source "drivers/misc/mediatek/flashlight/richtek/Kconfig"
source "drivers/misc/mediatek/imgsensor/Kconfig"
source "drivers/misc/mediatek/lens/Kconfig"
source "drivers/misc/mediatek/cam_cal/Kconfig"
source "drivers/misc/mediatek/cmdq/Kconfig"
source "drivers/misc/mediatek/vpu/Kconfig"
source "drivers/misc/mediatek/smi/Kconfig"
source "drivers/misc/mediatek/jpeg/Kconfig"
source "drivers/misc/mediatek/ccu/src/Kconfig"
source "drivers/misc/mediatek/camera_security/Kconfig"
endmenu # MultiMedia

menu "Sensors"

config MTK_SENSOR_SUPPORT
	tristate "MTK SENSOR SUPPORT"
	help
	  Sensor config for sensor feature in project.
	  Please say Y/M here if you want to support and sensors
	  with mediatek sensor architecture.
	  If unsure, say N.

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"
endmenu # Sensors

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/nfc/Kconfig"
source "drivers/misc/mediatek/mddp/Kconfig"
endmenu # CONN

menu "Security"

config MTK_TEE_GP_SUPPORT
	bool "Enable MTK GlobalPlatform support in TEE related modules"
	depends on (TRUSTONIC_TEE_SUPPORT) || (MICROTRUST_TEE_SUPPORT)
	help
	  GlobalPlatform defines common/consistent APIs and this option
	  enables TEE related modules to use GPAPIs. (depending on
	  Trustonic TEE Support or Microtrust TEE Support or Google Trusty
	  TEE or other 3rd-party TEE)

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

menu "Other Peripherals"
source "drivers/misc/mediatek/extcon/Kconfig"
source "drivers/misc/mediatek/typec/Kconfig"
source "drivers/misc/mediatek/leds/Kconfig"
source "drivers/misc/mediatek/pwm/Kconfig"
source "drivers/misc/mediatek/audio_ipi/Kconfig"
source "drivers/misc/mediatek/accdet/Kconfig"
source "drivers/misc/mediatek/auxadc/Kconfig"
source "drivers/misc/mediatek/rtc/Kconfig"
endmenu # Other Peripheral

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.

config DMAUSER_PAGES
	bool "allocate highuser movable pages from dma zone"
	depends on MTK_LM_MODE
	help
	  An internal debug kernel config for testing large memory mode.
	  To test if kernel drivers are fully compatible to large
	  memorys, we replace all GFP_HIGHUSER_MOVABLE/GFP_USER pages by
	  DMA (<= 4GB) pages. It makes all drivers have more chances
	  to allocate >= 4GB physical memory.

endmenu # Memory

menu "Performance, Power, and Thermal"

config MTK_PERFORMANCE_MODULE
	bool "MediaTek Performance Module"
	depends on ARCH_MEDIATEK
	help
	  For MediaTek Performance Module, such as Boost controller
	  and FPSGO.
	  Select "y" if you want to enable performance features.
	  Select "n" if unsure.

source "drivers/misc/mediatek/perf_common/Kconfig"
source "drivers/misc/mediatek/performance/Kconfig"
source "drivers/misc/mediatek/task_turbo/Kconfig"
endmenu # PPT

menu "TinySys"
source "drivers/misc/mediatek/scp/Kconfig"
source "drivers/misc/mediatek/sspm/Kconfig"
endmenu # TinySys

menu "Debug, log, trace"

config MTK_AMMS
	bool "Support Mediatek AP and Modem Sharing Memory techonology"
	help
	  Mediatek Memory sharing techonology
	  It tries to free Modem memory once not
	  used. Modem should support this as well
	  or it won't work. If you are not sure
	  Please select "N"

config MTK_SPMTWAM
	tristate "Mediatek Signal profiling tool"
	depends on ARCH_MEDIATEK && OF
	help
	  For Mediatek low power signal profiling features.
	  Profiling several hw signals for debug purposes.
	  Select "y" if you want to use.
	  Select "n" if you are not sure.

config MTK_MET
	bool "Mediatek Embedded Technology"
	depends on FTRACE && TRACING
	help
	  For Mediatek Embedded Technology features.
	  It depends on FTRACE and TRACING.
	  Select "Y" if you want to use.
	  Select "N" if you are not sure.

config MTK_GKI_COMPAT
	bool "Mediatek GKI compatible enhancement"
	default n
	help
	  For Mediatek GKI enhanced features.
	  It's testing only, no any guarantee.
	  Select "Y" if you want to use.
	  Select "N" if you are not sure.
config MTK_HIGH_FRAME_RATE
	bool "high frame rate,for 90hz or 120hz display"
	default n

config MTK_MT6382_BDG
	bool "Support Bridge IC 6382"
	help
	  This config decide if device with BridgeIC 6382
	  BridgeIC 6382 can support VESA-1.2 DSC, compressing display framedata
	  Normal project will disable it first
	  If you are not sure about this, do not set it to y

source "drivers/misc/mediatek/met_drv/Kconfig"
source "drivers/misc/mediatek/cm_mgr/Kconfig"
source "drivers/misc/mediatek/vibrator/Kconfig"
source "drivers/misc/mediatek/systracker/Kconfig"
source "drivers/misc/mediatek/thermal/Kconfig"
source "drivers/misc/mediatek/debug_latch/Kconfig"
source "drivers/misc/mediatek/cache/Kconfig"
source "drivers/misc/mediatek/subpmic/Kconfig"
source "drivers/misc/mediatek/cameraisp/Kconfig"
source "drivers/misc/mediatek/mcupm/Kconfig"
source "drivers/misc/mediatek/rt-regmap/Kconfig"
source "drivers/misc/mediatek/vow/Kconfig"

source "drivers/misc/mediatek/hardware_info/Kconfig"

endmenu # Debug
menu "Misc"
source "drivers/misc/mediatek/ext_gic/Kconfig"
source "drivers/misc/mediatek/timer/Kconfig"
endmenu # Misc
# prize-huangzhanbin-20190319-add for dualcam-start
config DUALCAM_CALI_RW
		bool "CONFIG_DUALCAM_CALI_RW"
		default n
# prize-huangzhanbin-20190319-add for dualcam-end
