# SPDX-License-Identifier: GPL-2.0-only

config TPM_GOOGLE
	bool

config TPM_GOOGLE_CR50
	bool
	select TPM_GOOGLE

config TPM_GOOGLE_TI50
	bool
	select TPM_GOOGLE

if TPM_GOOGLE

config TPM_GOOGLE_IMMEDIATELY_COMMIT_FW_SECDATA
	bool
	default y

config POWER_OFF_ON_CR50_UPDATE
	bool
	default y if ARCH_X86
	help
	  Power off machine while waiting for CR50 update to take effect.

config CR50_USE_LONG_INTERRUPT_PULSES
	bool
	default n
	help
	  Whether to request longer interrupt pulses using Cr50 BOARD_CFG register.
	  If the Cr50 firmware is too old, it will not be able to honor the request.

config GOOGLE_TPM_IRQ_TIMEOUT_MS
	int
	default 100 if TPM_GOOGLE_CR50 && I2C_TPM
	default 10 if TPM_GOOGLE_CR50
	default 750
	help
	  Timeout in milliseconds for waiting for TPM IRQ. Default to 100ms/10ms on platforms
	  using Cr50 in order to support legacy pre-ready-IRQ cr50 factory images. Default to
	  750ms otherwise.

endif
