summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJes B. Klinke <jbk@chromium.org>2022-04-19 14:00:33 -0700
committerJulius Werner <jwerner@chromium.org>2022-04-21 23:07:20 +0000
commitc6b041a12e56f32be37b809357225e762b070117 (patch)
treedf09f63531c43eb3c7b8f3727d3726ccdaed035a
parent0b71099f6587e9722e4554c094e5ef1c32195860 (diff)
tpm: Refactor TPM Kconfig dimensions
Break TPM related Kconfig into the following dimensions: TPM transport support: config CRB_TPM config I2C_TPM config SPI_TPM config MEMORY_MAPPED_TPM (new) TPM brand, not defining any of these is valid, and result in "generic" support: config TPM_ATMEL (new) config TPM_GOOGLE (new) config TPM_GOOGLE_CR50 (new, implies TPM_GOOGLE) config TPM_GOOGLE_TI50 (new to be used later, implies TPM_GOOGLE) What protocol the TPM chip supports: config MAINBOARD_HAS_TPM1 config MAINBOARD_HAS_TPM2 What the user chooses to compile (restricted by the above): config NO_TPM config TPM1 config TPM2 The following Kconfigs will be replaced as indicated: config TPM_CR50 -> TPM_GOOGLE config MAINBOARD_HAS_CRB_TPM -> CRB_TPM config MAINBOARD_HAS_I2C_TPM_ATMEL -> I2C_TPM && TPM_ATMEL config MAINBOARD_HAS_I2C_TPM_CR50 -> I2C_TPM && TPM_GOOGLE config MAINBOARD_HAS_I2C_TPM_GENERIC -> I2C_TPM && !TPM_GOOGLE && !TPM_ATMEL config MAINBOARD_HAS_LPC_TPM -> MEMORY_MAPPED_TPM config MAINBOARD_HAS_SPI_TPM -> SPI_TPM && !TPM_GOOGLE && !TPM_ATMEL config MAINBOARD_HAS_SPI_TPM_CR50 -> SPI_TPM && TPM_GOOGLE Signed-off-by: Jes B. Klinke <jbk@chromium.org> Change-Id: I4656b2b90363b8dfd008dc281ad591862fe2cc9e Reviewed-on: https://review.coreboot.org/c/coreboot/+/63424 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
-rw-r--r--Documentation/getting_started/kconfig.md2
-rw-r--r--src/drivers/crb/Kconfig10
-rw-r--r--src/drivers/crb/Makefile.inc8
-rw-r--r--src/drivers/i2c/tpm/Kconfig29
-rw-r--r--src/drivers/i2c/tpm/Makefile.inc30
-rw-r--r--src/drivers/pc80/tpm/Kconfig6
-rw-r--r--src/drivers/pc80/tpm/Makefile.inc8
-rw-r--r--src/drivers/spi/tpm/Kconfig14
-rw-r--r--src/drivers/spi/tpm/Makefile.inc8
-rw-r--r--src/drivers/spi/tpm/tpm.c6
-rw-r--r--src/drivers/tpm/Makefile.inc10
-rw-r--r--src/mainboard/acer/aspire_vn7_572g/Kconfig2
-rw-r--r--src/mainboard/asrock/b85m_pro4/Kconfig2
-rw-r--r--src/mainboard/asrock/h110m/Kconfig2
-rw-r--r--src/mainboard/asus/am1i-a/Kconfig2
-rw-r--r--src/mainboard/asus/h61-series/Kconfig.name4
-rw-r--r--src/mainboard/asus/p8x7x-series/Kconfig.name6
-rw-r--r--src/mainboard/clevo/cml-u/Kconfig2
-rw-r--r--src/mainboard/clevo/kbl-u/Kconfig2
-rw-r--r--src/mainboard/clevo/tgl-u/Kconfig2
-rw-r--r--src/mainboard/dell/snb_ivb_workstations/Kconfig2
-rw-r--r--src/mainboard/emulation/qemu-q35/Kconfig2
-rw-r--r--src/mainboard/facebook/fbg1701/Kconfig2
-rw-r--r--src/mainboard/facebook/monolith/Kconfig2
-rw-r--r--src/mainboard/foxconn/g41s-k/Kconfig2
-rw-r--r--src/mainboard/gigabyte/ga-b75m-d3h/Kconfig2
-rw-r--r--src/mainboard/google/asurada/Kconfig3
-rw-r--r--src/mainboard/google/auron/Kconfig2
-rw-r--r--src/mainboard/google/beltino/Kconfig2
-rw-r--r--src/mainboard/google/brya/Kconfig3
-rw-r--r--src/mainboard/google/butterfly/Kconfig2
-rw-r--r--src/mainboard/google/cherry/Kconfig3
-rw-r--r--src/mainboard/google/corsola/Kconfig3
-rw-r--r--src/mainboard/google/cyan/Kconfig2
-rw-r--r--src/mainboard/google/daisy/Kconfig2
-rw-r--r--src/mainboard/google/dedede/Kconfig5
-rw-r--r--src/mainboard/google/deltaur/Kconfig3
-rw-r--r--src/mainboard/google/drallion/Kconfig3
-rw-r--r--src/mainboard/google/eve/Kconfig3
-rw-r--r--src/mainboard/google/fizz/Kconfig3
-rw-r--r--src/mainboard/google/foster/Kconfig2
-rw-r--r--src/mainboard/google/gale/Kconfig2
-rw-r--r--src/mainboard/google/glados/Kconfig2
-rw-r--r--src/mainboard/google/gru/Kconfig5
-rw-r--r--src/mainboard/google/guybrush/Kconfig3
-rw-r--r--src/mainboard/google/hatch/Kconfig3
-rw-r--r--src/mainboard/google/herobrine/Kconfig9
-rw-r--r--src/mainboard/google/herobrine/bootblock.c4
-rw-r--r--src/mainboard/google/jecht/Kconfig2
-rw-r--r--src/mainboard/google/kahlee/Kconfig3
-rw-r--r--src/mainboard/google/kukui/Kconfig3
-rw-r--r--src/mainboard/google/link/Kconfig2
-rw-r--r--src/mainboard/google/nyan_big/Kconfig2
-rw-r--r--src/mainboard/google/nyan_blaze/Kconfig2
-rw-r--r--src/mainboard/google/oak/Kconfig2
-rw-r--r--src/mainboard/google/octopus/Kconfig3
-rw-r--r--src/mainboard/google/parrot/Kconfig2
-rw-r--r--src/mainboard/google/peach_pit/Kconfig2
-rw-r--r--src/mainboard/google/poppy/Kconfig21
-rw-r--r--src/mainboard/google/rambi/Kconfig2
-rw-r--r--src/mainboard/google/reef/Kconfig3
-rw-r--r--src/mainboard/google/sarien/Kconfig3
-rw-r--r--src/mainboard/google/skyrim/Kconfig3
-rw-r--r--src/mainboard/google/slippy/Kconfig2
-rw-r--r--src/mainboard/google/smaug/Kconfig2
-rw-r--r--src/mainboard/google/storm/Kconfig2
-rw-r--r--src/mainboard/google/stout/Kconfig2
-rw-r--r--src/mainboard/google/trogdor/Kconfig3
-rw-r--r--src/mainboard/google/veyron/Kconfig2
-rw-r--r--src/mainboard/google/veyron_mickey/Kconfig2
-rw-r--r--src/mainboard/google/veyron_rialto/Kconfig2
-rw-r--r--src/mainboard/google/volteer/Kconfig6
-rw-r--r--src/mainboard/google/volteer/mainboard.c2
-rw-r--r--src/mainboard/google/volteer/variants/chronicler/overridetree.cb2
-rw-r--r--src/mainboard/google/volteer/variants/volteer2/overridetree.cb4
-rw-r--r--src/mainboard/google/volteer/variants/volteer2/variant.c2
-rw-r--r--src/mainboard/google/zork/Kconfig3
-rw-r--r--src/mainboard/hp/compaq_8200_elite_sff/Kconfig2
-rw-r--r--src/mainboard/hp/folio_9480m/Kconfig2
-rw-r--r--src/mainboard/hp/snb_ivb_laptops/Kconfig4
-rw-r--r--src/mainboard/hp/z220_series/Kconfig2
-rw-r--r--src/mainboard/intel/adlrvp/Kconfig2
-rw-r--r--src/mainboard/intel/baskingridge/Kconfig2
-rw-r--r--src/mainboard/intel/coffeelake_rvp/Kconfig2
-rw-r--r--src/mainboard/intel/galileo/Kconfig3
-rw-r--r--src/mainboard/intel/glkrvp/Kconfig2
-rw-r--r--src/mainboard/intel/kblrvp/Kconfig2
-rw-r--r--src/mainboard/intel/kunimitsu/Kconfig2
-rw-r--r--src/mainboard/intel/shadowmountain/Kconfig3
-rw-r--r--src/mainboard/intel/strago/Kconfig2
-rw-r--r--src/mainboard/intel/tglrvp/Kconfig2
-rw-r--r--src/mainboard/intel/wtm2/Kconfig2
-rw-r--r--src/mainboard/kontron/bsl6/Kconfig2
-rw-r--r--src/mainboard/kontron/mal10/Kconfig2
-rw-r--r--src/mainboard/lenovo/s230u/Kconfig2
-rw-r--r--src/mainboard/lenovo/t410/Kconfig2
-rw-r--r--src/mainboard/lenovo/t420/Kconfig2
-rw-r--r--src/mainboard/lenovo/t420s/Kconfig2
-rw-r--r--src/mainboard/lenovo/t430/Kconfig2
-rw-r--r--src/mainboard/lenovo/t430s/Kconfig2
-rw-r--r--src/mainboard/lenovo/t440p/Kconfig4
-rw-r--r--src/mainboard/lenovo/t520/Kconfig2
-rw-r--r--src/mainboard/lenovo/t530/Kconfig2
-rw-r--r--src/mainboard/lenovo/w541/Kconfig2
-rw-r--r--src/mainboard/lenovo/x131e/Kconfig2
-rw-r--r--src/mainboard/lenovo/x1_carbon_gen1/Kconfig2
-rw-r--r--src/mainboard/lenovo/x201/Kconfig2
-rw-r--r--src/mainboard/lenovo/x220/Kconfig2
-rw-r--r--src/mainboard/lenovo/x230/Kconfig2
-rw-r--r--src/mainboard/libretrend/lt1000/Kconfig2
-rw-r--r--src/mainboard/ocp/deltalake/Kconfig2
-rw-r--r--src/mainboard/opencellular/elgon/Kconfig2
-rw-r--r--src/mainboard/pcengines/apu1/Kconfig2
-rw-r--r--src/mainboard/pcengines/apu2/Kconfig2
-rw-r--r--src/mainboard/prodrive/hermes/Kconfig2
-rw-r--r--src/mainboard/protectli/vault_kbl/Kconfig2
-rw-r--r--src/mainboard/purism/librem_cnl/Kconfig.name2
-rw-r--r--src/mainboard/purism/librem_skl/Kconfig2
-rw-r--r--src/mainboard/razer/blade_stealth_kbl/Kconfig2
-rw-r--r--src/mainboard/samsung/lumpy/Kconfig2
-rw-r--r--src/mainboard/samsung/stumpy/Kconfig2
-rw-r--r--src/mainboard/siemens/chili/Kconfig2
-rw-r--r--src/mainboard/siemens/mc_apl1/variants/mc_apl2/Kconfig2
-rw-r--r--src/mainboard/siemens/mc_apl1/variants/mc_apl4/Kconfig2
-rw-r--r--src/mainboard/siemens/mc_apl1/variants/mc_apl5/Kconfig2
-rw-r--r--src/mainboard/siemens/mc_apl1/variants/mc_apl6/Kconfig2
-rw-r--r--src/mainboard/siemens/mc_ehl/Kconfig2
-rw-r--r--src/mainboard/starlabs/labtop/Kconfig4
-rw-r--r--src/mainboard/starlabs/lite/Kconfig2
-rw-r--r--src/mainboard/supermicro/x11-lga1151-series/Kconfig2
-rw-r--r--src/mainboard/supermicro/x9sae/Kconfig2
-rw-r--r--src/mainboard/system76/addw1/Kconfig2
-rw-r--r--src/mainboard/system76/bonw14/Kconfig2
-rw-r--r--src/mainboard/system76/cml-u/Kconfig2
-rw-r--r--src/mainboard/system76/darp7/Kconfig2
-rw-r--r--src/mainboard/system76/galp5/Kconfig2
-rw-r--r--src/mainboard/system76/gaze15/Kconfig2
-rw-r--r--src/mainboard/system76/gaze16/Kconfig2
-rw-r--r--src/mainboard/system76/kbl-u/Kconfig2
-rw-r--r--src/mainboard/system76/lemp10/Kconfig2
-rw-r--r--src/mainboard/system76/lemp9/Kconfig2
-rw-r--r--src/mainboard/system76/oryp5/Kconfig2
-rw-r--r--src/mainboard/system76/oryp6/Kconfig2
-rw-r--r--src/mainboard/system76/oryp8/Kconfig2
-rw-r--r--src/mainboard/system76/whl-u/Kconfig2
-rw-r--r--src/mainboard/up/squared/Kconfig2
-rw-r--r--src/security/tpm/Kconfig13
-rw-r--r--src/security/tpm/Makefile.inc2
-rw-r--r--src/security/tpm/tss/vendor/cr50/Kconfig18
-rw-r--r--src/security/vboot/secdata_mock.c2
-rw-r--r--src/security/vboot/secdata_tpm.c7
-rw-r--r--src/security/vboot/vboot_logic.c2
-rw-r--r--src/soc/intel/apollolake/Kconfig6
-rw-r--r--src/soc/intel/common/Makefile.inc6
-rw-r--r--src/soc/intel/skylake/acpi/systemagent.asl2
-rw-r--r--src/soc/intel/tigerlake/Kconfig6
-rw-r--r--src/vendorcode/google/chromeos/Kconfig4
-rw-r--r--src/vendorcode/google/chromeos/Makefile.inc2
-rw-r--r--src/vendorcode/google/chromeos/cse_board_reset.c6
159 files changed, 260 insertions, 289 deletions
diff --git a/Documentation/getting_started/kconfig.md b/Documentation/getting_started/kconfig.md
index fff186e8a2..5be4577055 100644
--- a/Documentation/getting_started/kconfig.md
+++ b/Documentation/getting_started/kconfig.md
@@ -786,7 +786,7 @@ select &lt;symbol&gt; \[if &lt;expr&gt;\]
config TPM
bool
default n
- select LPC_TPM if ARCH_X86
+ select MEMORY_MAPPED_TPM if ARCH_X86
select I2C_TPM if ARCH_ARM
select I2C_TPM if ARCH_ARM64
help
diff --git a/src/drivers/crb/Kconfig b/src/drivers/crb/Kconfig
index bfd8be06d6..b65176ea89 100644
--- a/src/drivers/crb/Kconfig
+++ b/src/drivers/crb/Kconfig
@@ -1,17 +1,11 @@
config CRB_TPM
bool
+ default n
help
- CRB TPM driver is enabled!
+ Mainboard has Command Response Buffer support
config CRB_TPM_BASE_ADDRESS
hex
default 0xfed40000
help
Base Address of the CRB TPM Command Structure
-
-config MAINBOARD_HAS_CRB_TPM
- bool
- default n
- select CRB_TPM
- help
- Mainboard has Command Response Buffer support
diff --git a/src/drivers/crb/Makefile.inc b/src/drivers/crb/Makefile.inc
index 3f12b36923..5124514cca 100644
--- a/src/drivers/crb/Makefile.inc
+++ b/src/drivers/crb/Makefile.inc
@@ -1,5 +1,3 @@
-bootblock-$(CONFIG_CRB_TPM) += tis.c tpm.c
-verstage-$(CONFIG_CRB_TPM) += tis.c tpm.c
-romstage-$(CONFIG_CRB_TPM) += tis.c tpm.c
-ramstage-$(CONFIG_CRB_TPM) += tis.c tpm.c
-postcar-$(CONFIG_CRB_TPM) += tis.c tpm.c
+ifeq ($(CONFIG_CRB_TPM),y)
+all-y += tis.c tpm.c
+endif
diff --git a/src/drivers/i2c/tpm/Kconfig b/src/drivers/i2c/tpm/Kconfig
index 0d5f06bbdd..8efcbaf991 100644
--- a/src/drivers/i2c/tpm/Kconfig
+++ b/src/drivers/i2c/tpm/Kconfig
@@ -3,27 +3,6 @@ config I2C_TPM
help
I2C TPM driver is enabled!
-config MAINBOARD_HAS_I2C_TPM_ATMEL
- bool
- default n
- select I2C_TPM
- help
- Board has an Atmel I2C TPM support
-
-config MAINBOARD_HAS_I2C_TPM_CR50
- bool
- default n
- select I2C_TPM
- help
- Board has a Cr50 I2C TPM support
-
-config MAINBOARD_HAS_I2C_TPM_GENERIC
- bool
- default n
- select I2C_TPM
- help
- Board has a generic I2C TPM support
-
config MAINBOARD_NEEDS_I2C_TI50_WORKAROUND
bool
default n
@@ -36,7 +15,7 @@ config MAINBOARD_NEEDS_I2C_TI50_WORKAROUND
config DRIVER_TIS_DEFAULT
bool
depends on I2C_TPM
- default n if MAINBOARD_HAS_I2C_TPM_ATMEL
+ default n if TPM_ATMEL
default y
config DRIVER_TPM_I2C_BUS
@@ -58,3 +37,9 @@ config DRIVER_TPM_DISPLAY_TIS_BYTES
bool "TPM: Display the TIS transactions to I2C TPM chip"
default n
depends on I2C_TPM
+
+config TPM_ATMEL
+ bool
+ default n
+ help
+ The mainboard has an Atmel TPM chip.
diff --git a/src/drivers/i2c/tpm/Makefile.inc b/src/drivers/i2c/tpm/Makefile.inc
index 51856fa9f0..ae50f2b342 100644
--- a/src/drivers/i2c/tpm/Makefile.inc
+++ b/src/drivers/i2c/tpm/Makefile.inc
@@ -1,25 +1,15 @@
-ramstage-$(CONFIG_DRIVER_TIS_DEFAULT) += tis.c
-romstage-$(CONFIG_DRIVER_TIS_DEFAULT) += tis.c
-verstage-$(CONFIG_DRIVER_TIS_DEFAULT) += tis.c
-bootblock-$(CONFIG_DRIVER_TIS_DEFAULT) += tis.c
-postcar-$(CONFIG_DRIVER_TIS_DEFAULT) += tis.c
+ifeq ($(CONFIG_TPM)$(CONFIG_I2C_TPM),yy)
-ramstage-$(CONFIG_MAINBOARD_HAS_I2C_TPM_ATMEL) += tis_atmel.c
-romstage-$(CONFIG_MAINBOARD_HAS_I2C_TPM_ATMEL) += tis_atmel.c
-verstage-$(CONFIG_MAINBOARD_HAS_I2C_TPM_ATMEL) += tis_atmel.c
-bootblock-$(CONFIG_MAINBOARD_HAS_I2C_TPM_ATMEL) += tis_atmel.c
-postcar-$(CONFIG_MAINBOARD_HAS_I2C_TPM_ATMEL) += tis_atmel.c
+all-$(CONFIG_DRIVER_TIS_DEFAULT) += tis.c
-ramstage-$(CONFIG_MAINBOARD_HAS_I2C_TPM_GENERIC) += tpm.c
-romstage-$(CONFIG_MAINBOARD_HAS_I2C_TPM_GENERIC) += tpm.c
-verstage-$(CONFIG_MAINBOARD_HAS_I2C_TPM_GENERIC) += tpm.c
-bootblock-$(CONFIG_MAINBOARD_HAS_I2C_TPM_GENERIC) += tpm.c
-postcar-$(CONFIG_MAINBOARD_HAS_I2C_TPM_GENERIC) += tpm.c
+ifeq ($(CONFIG_TPM_ATMEL),y)
+all-y += tis_atmel.c
+else ifeq ($(CONFIG_TPM_GOOGLE),y)
+all-y += cr50.c
+else
+all-y += tpm.c
+endif
-ramstage-$(CONFIG_MAINBOARD_HAS_I2C_TPM_CR50) += cr50.c
-romstage-$(CONFIG_MAINBOARD_HAS_I2C_TPM_CR50) += cr50.c
-verstage-$(CONFIG_MAINBOARD_HAS_I2C_TPM_CR50) += cr50.c
-bootblock-$(CONFIG_MAINBOARD_HAS_I2C_TPM_CR50) += cr50.c
-postcar-$(CONFIG_MAINBOARD_HAS_I2C_TPM_CR50) += cr50.c
+endif
ramstage-$(CONFIG_DRIVER_I2C_TPM_ACPI) += chip.c
diff --git a/src/drivers/pc80/tpm/Kconfig b/src/drivers/pc80/tpm/Kconfig
index 4a40b2952f..94920dfc63 100644
--- a/src/drivers/pc80/tpm/Kconfig
+++ b/src/drivers/pc80/tpm/Kconfig
@@ -1,10 +1,10 @@
-config MAINBOARD_HAS_LPC_TPM
+config MEMORY_MAPPED_TPM
bool
default n
help
- Board has LPC TPM support
+ Board has memory mapped TPM support
-if MAINBOARD_HAS_LPC_TPM
+if MEMORY_MAPPED_TPM
config TPM_TIS_BASE_ADDRESS
hex
diff --git a/src/drivers/pc80/tpm/Makefile.inc b/src/drivers/pc80/tpm/Makefile.inc
index 8b2a864ecb..859233712b 100644
--- a/src/drivers/pc80/tpm/Makefile.inc
+++ b/src/drivers/pc80/tpm/Makefile.inc
@@ -1,5 +1,3 @@
-bootblock-$(CONFIG_MAINBOARD_HAS_LPC_TPM) += tis.c
-verstage-$(CONFIG_MAINBOARD_HAS_LPC_TPM) += tis.c
-romstage-$(CONFIG_MAINBOARD_HAS_LPC_TPM) += tis.c
-ramstage-$(CONFIG_MAINBOARD_HAS_LPC_TPM) += tis.c
-postcar-$(CONFIG_MAINBOARD_HAS_LPC_TPM) += tis.c
+ifeq ($(CONFIG_MEMORY_MAPPED_TPM),y)
+all-y += tis.c
+endif
diff --git a/src/drivers/spi/tpm/Kconfig b/src/drivers/spi/tpm/Kconfig
index 8c39a4a44a..7a55318bb0 100644
--- a/src/drivers/spi/tpm/Kconfig
+++ b/src/drivers/spi/tpm/Kconfig
@@ -12,17 +12,3 @@ config DRIVER_TPM_SPI_CHIP
int "Chip Select of the TPM chip on its SPI bus"
default 0
depends on SPI_TPM
-
-config MAINBOARD_HAS_SPI_TPM_CR50
- bool
- default n
- select MAINBOARD_HAS_SPI_TPM
- help
- Board has a CR50 SPI TPM
-
-config MAINBOARD_HAS_SPI_TPM
- bool
- default n
- select SPI_TPM
- help
- Board has SPI TPM support
diff --git a/src/drivers/spi/tpm/Makefile.inc b/src/drivers/spi/tpm/Makefile.inc
index 01d3b6641e..023479f0d0 100644
--- a/src/drivers/spi/tpm/Makefile.inc
+++ b/src/drivers/spi/tpm/Makefile.inc
@@ -1,5 +1,3 @@
-bootblock-$(CONFIG_SPI_TPM) += tis.c tpm.c
-verstage-$(CONFIG_SPI_TPM) += tis.c tpm.c
-romstage-$(CONFIG_SPI_TPM) += tis.c tpm.c
-ramstage-$(CONFIG_SPI_TPM) += tis.c tpm.c
-postcar-$(CONFIG_SPI_TPM) += tis.c tpm.c
+ifeq ($(CONFIG_TPM)$(CONFIG_SPI_TPM),yy)
+all-y += tis.c tpm.c
+endif
diff --git a/src/drivers/spi/tpm/tpm.c b/src/drivers/spi/tpm/tpm.c
index 43fd933dbf..1462dd9f7f 100644
--- a/src/drivers/spi/tpm/tpm.c
+++ b/src/drivers/spi/tpm/tpm.c
@@ -104,7 +104,7 @@ static enum cb_err start_transaction(int read_write, size_t bytes, unsigned int
static int tpm_sync_needed;
static struct stopwatch wake_up_sw;
- if (CONFIG(TPM_CR50)) {
+ if (CONFIG(TPM_GOOGLE)) {
/*
* First Cr50 access in each coreboot stage where TPM is used will be
* prepended by a wake up pulse on the CS line.
@@ -186,7 +186,7 @@ static enum cb_err start_transaction(int read_write, size_t bytes, unsigned int
*/
header_resp.body[3] = 0;
- if (CONFIG(TPM_CR50))
+ if (CONFIG(TPM_GOOGLE))
ret = spi_xfer(&spi_slave, header.body, sizeof(header.body), NULL, 0);
else
ret = spi_xfer(&spi_slave, header.body, sizeof(header.body),
@@ -497,7 +497,7 @@ int tpm2_init(struct spi_slave *spi_if)
tpm_info.vendor_id, tpm_info.device_id, tpm_info.revision);
/* Do some cr50-specific things here. */
- if (CONFIG(TPM_CR50) && tpm_info.vendor_id == 0x1ae0) {
+ if (CONFIG(TPM_GOOGLE) && tpm_info.vendor_id == 0x1ae0) {
struct cr50_firmware_version ver;
if (tpm_first_access_this_boot()) {
diff --git a/src/drivers/tpm/Makefile.inc b/src/drivers/tpm/Makefile.inc
index a56c02b666..7f0bbf59b2 100644
--- a/src/drivers/tpm/Makefile.inc
+++ b/src/drivers/tpm/Makefile.inc
@@ -1,3 +1,5 @@
+ifeq ($(CONFIG_TPM),y)
+
ramstage-$(CONFIG_TPM_INIT_RAMSTAGE) += tpm.c
ifeq ($(CONFIG_TPM_PPI),y)
@@ -6,8 +8,6 @@ else
ramstage-$(CONFIG_HAVE_ACPI_TABLES) += ppi_stub.c
endif
-bootblock-$(CONFIG_TPM_CR50) += cr50.c
-verstage-$(CONFIG_TPM_CR50) += cr50.c
-romstage-$(CONFIG_TPM_CR50) += cr50.c
-ramstage-$(CONFIG_TPM_CR50) += cr50.c
-postcar-$(CONFIG_TPM_CR50) += cr50.c
+all-$(CONFIG_TPM_GOOGLE) += cr50.c
+
+endif
diff --git a/src/mainboard/acer/aspire_vn7_572g/Kconfig b/src/mainboard/acer/aspire_vn7_572g/Kconfig
index 449eeee39a..cee7b7ec0a 100644
--- a/src/mainboard/acer/aspire_vn7_572g/Kconfig
+++ b/src/mainboard/acer/aspire_vn7_572g/Kconfig
@@ -16,7 +16,7 @@ config BOARD_SPECIFIC_OPTIONS
select INTEL_GMA_HAVE_VBT
select INTEL_INT15
select INTEL_LPSS_UART_FOR_CONSOLE
- select MAINBOARD_HAS_CRB_TPM
+ select CRB_TPM
select MAINBOARD_HAS_LIBGFXINIT
select MAINBOARD_HAS_TPM2
select NO_UART_ON_SUPERIO
diff --git a/src/mainboard/asrock/b85m_pro4/Kconfig b/src/mainboard/asrock/b85m_pro4/Kconfig
index 667a2bdd1e..51a48887a6 100644
--- a/src/mainboard/asrock/b85m_pro4/Kconfig
+++ b/src/mainboard/asrock/b85m_pro4/Kconfig
@@ -11,7 +11,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_OPTION_TABLE
select INTEL_GMA_HAVE_VBT
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_USES_IFD_GBE_REGION
select NORTHBRIDGE_INTEL_HASWELL
select SERIRQ_CONTINUOUS_MODE
diff --git a/src/mainboard/asrock/h110m/Kconfig b/src/mainboard/asrock/h110m/Kconfig
index 7f84adb5b7..b4e4851285 100644
--- a/src/mainboard/asrock/h110m/Kconfig
+++ b/src/mainboard/asrock/h110m/Kconfig
@@ -15,7 +15,7 @@ config BOARD_SPECIFIC_OPTIONS
select SUPERIO_NUVOTON_NCT6791D
select REALTEK_8168_RESET
select RT8168_SET_LED_MODE
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
config DISABLE_HECI1_AT_PRE_BOOT
default y
diff --git a/src/mainboard/asus/am1i-a/Kconfig b/src/mainboard/asus/am1i-a/Kconfig
index 9d2cb16251..9a4c8e3d7a 100644
--- a/src/mainboard/asus/am1i-a/Kconfig
+++ b/src/mainboard/asus/am1i-a/Kconfig
@@ -18,7 +18,7 @@ config BOARD_SPECIFIC_OPTIONS
select SOUTHBRIDGE_AMD_AGESA_YANGTZE
select DEFAULT_POST_ON_LPC
select SUPERIO_ITE_IT8623E
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
config MAINBOARD_DIR
default "asus/am1i-a"
diff --git a/src/mainboard/asus/h61-series/Kconfig.name b/src/mainboard/asus/h61-series/Kconfig.name
index 0956f40c2e..d2175a84f4 100644
--- a/src/mainboard/asus/h61-series/Kconfig.name
+++ b/src/mainboard/asus/h61-series/Kconfig.name
@@ -34,7 +34,7 @@ config BOARD_ASUS_P8H61_M_PRO
select DRIVERS_ASMEDIA_ASPM_BLACKLIST
select HAVE_CMOS_DEFAULT
select HAVE_OPTION_TABLE
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select REALTEK_8168_RESET
select RT8168_SET_LED_MODE
select SUPERIO_NUVOTON_NCT6776
@@ -46,7 +46,7 @@ config BOARD_ASUS_P8H61_M_PRO_CM6630
select DRIVERS_ASMEDIA_ASPM_BLACKLIST
select HAVE_CMOS_DEFAULT
select HAVE_OPTION_TABLE
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select REALTEK_8168_RESET
select RT8168_SET_LED_MODE
select SUPERIO_NUVOTON_NCT6776
diff --git a/src/mainboard/asus/p8x7x-series/Kconfig.name b/src/mainboard/asus/p8x7x-series/Kconfig.name
index 822f5d4d45..6f08b48446 100644
--- a/src/mainboard/asus/p8x7x-series/Kconfig.name
+++ b/src/mainboard/asus/p8x7x-series/Kconfig.name
@@ -2,7 +2,7 @@ config BOARD_ASUS_P8C_WS
bool "P8C_WS"
select BOARD_ASUS_P8X7X_SERIES
select BOARD_ROMSIZE_KB_8192
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select SUPERIO_NUVOTON_NCT6776
select USE_NATIVE_RAMINIT
@@ -18,7 +18,7 @@ config BOARD_ASUS_P8Z77_M_PRO
select BOARD_ASUS_P8X7X_SERIES
select BOARD_ROMSIZE_KB_8192
select DRIVERS_ASMEDIA_ASPM_BLACKLIST # for ASM1061 eSATA
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select SUPERIO_NUVOTON_NCT6779D
config BOARD_ASUS_P8Z77_V_LX2
@@ -34,7 +34,7 @@ config BOARD_ASUS_P8Z77_V
select BOARD_ASUS_P8X7X_SERIES
select BOARD_ROMSIZE_KB_8192
select DRIVERS_ASMEDIA_ASPM_BLACKLIST # for ASM1061 eSATA
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_USES_IFD_GBE_REGION
select SUPERIO_NUVOTON_NCT6779D
select USE_NATIVE_RAMINIT
diff --git a/src/mainboard/clevo/cml-u/Kconfig b/src/mainboard/clevo/cml-u/Kconfig
index 274db95836..182fd13ce2 100644
--- a/src/mainboard/clevo/cml-u/Kconfig
+++ b/src/mainboard/clevo/cml-u/Kconfig
@@ -9,7 +9,7 @@ config BOARD_CLEVO_CMLU_COMMON
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM2
select NO_UART_ON_SUPERIO
select SOC_INTEL_COMETLAKE_1
diff --git a/src/mainboard/clevo/kbl-u/Kconfig b/src/mainboard/clevo/kbl-u/Kconfig
index b5e45aafba..d86a40422a 100644
--- a/src/mainboard/clevo/kbl-u/Kconfig
+++ b/src/mainboard/clevo/kbl-u/Kconfig
@@ -10,7 +10,7 @@ config BOARD_CLEVO_KBLU_COMMON
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM2
select NO_UART_ON_SUPERIO
select SOC_INTEL_COMMON_BLOCK_HDA_VERB
diff --git a/src/mainboard/clevo/tgl-u/Kconfig b/src/mainboard/clevo/tgl-u/Kconfig
index a97d3d849b..ecdd7c123f 100644
--- a/src/mainboard/clevo/tgl-u/Kconfig
+++ b/src/mainboard/clevo/tgl-u/Kconfig
@@ -9,7 +9,7 @@ config BOARD_CLEVO_TGLU_COMMON
select HAVE_OPTION_TABLE
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM2
select NO_UART_ON_SUPERIO
select SOC_INTEL_COMMON_BLOCK_HDA_VERB
diff --git a/src/mainboard/dell/snb_ivb_workstations/Kconfig b/src/mainboard/dell/snb_ivb_workstations/Kconfig
index 788f5a1d4c..8dcafd1036 100644
--- a/src/mainboard/dell/snb_ivb_workstations/Kconfig
+++ b/src/mainboard/dell/snb_ivb_workstations/Kconfig
@@ -7,7 +7,7 @@ config BOARD_DELL_SNB_IVB_WORKSTATIONS
select NORTHBRIDGE_INTEL_SANDYBRIDGE
select SERIRQ_CONTINUOUS_MODE
select USE_NATIVE_RAMINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select MAINBOARD_USES_IFD_GBE_REGION
select SUPERIO_SMSC_SCH5545
diff --git a/src/mainboard/emulation/qemu-q35/Kconfig b/src/mainboard/emulation/qemu-q35/Kconfig
index 1fc82b5ff0..a20092fb6f 100644
--- a/src/mainboard/emulation/qemu-q35/Kconfig
+++ b/src/mainboard/emulation/qemu-q35/Kconfig
@@ -12,7 +12,7 @@ config BOARD_SPECIFIC_OPTIONS
select BOARD_ROMSIZE_KB_16384 if VBOOT
select MAINBOARD_HAS_NATIVE_VGA_INIT
select MAINBOARD_FORCE_NATIVE_VGA_INIT if !CHROMEOS
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_CHROMEOS
select SOUTHBRIDGE_INTEL_COMMON_ACPI_MADT
select BOOT_DEVICE_NOT_SPI_FLASH
diff --git a/src/mainboard/facebook/fbg1701/Kconfig b/src/mainboard/facebook/fbg1701/Kconfig
index e6e2e47e1f..b84e9b57e1 100644
--- a/src/mainboard/facebook/fbg1701/Kconfig
+++ b/src/mainboard/facebook/fbg1701/Kconfig
@@ -10,7 +10,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_IFD_BIN
select HAVE_ME_BIN
select HAVE_OPTION_TABLE
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM2
select SOC_INTEL_BRASWELL
select SOC_INTEL_COMMON_BLOCK_HDA_VERB
diff --git a/src/mainboard/facebook/monolith/Kconfig b/src/mainboard/facebook/monolith/Kconfig
index 0fb05a1ef7..1972d132d9 100644
--- a/src/mainboard/facebook/monolith/Kconfig
+++ b/src/mainboard/facebook/monolith/Kconfig
@@ -7,7 +7,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_ACPI_TABLES
select HAVE_OPTION_TABLE
select SOC_INTEL_KABYLAKE
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM2
select MAINBOARD_USES_IFD_GBE_REGION
select INTEL_GMA_HAVE_VBT
diff --git a/src/mainboard/foxconn/g41s-k/Kconfig b/src/mainboard/foxconn/g41s-k/Kconfig
index 83136d31b4..a98a47a776 100644
--- a/src/mainboard/foxconn/g41s-k/Kconfig
+++ b/src/mainboard/foxconn/g41s-k/Kconfig
@@ -16,7 +16,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_ACPI_TABLES
select HAVE_CMOS_DEFAULT
select HAVE_OPTION_TABLE
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select INTEL_GMA_HAVE_VBT
select MAINBOARD_HAS_LIBGFXINIT
diff --git a/src/mainboard/gigabyte/ga-b75m-d3h/Kconfig b/src/mainboard/gigabyte/ga-b75m-d3h/Kconfig
index 643ed78eff..14d2270ad1 100644
--- a/src/mainboard/gigabyte/ga-b75m-d3h/Kconfig
+++ b/src/mainboard/gigabyte/ga-b75m-d3h/Kconfig
@@ -15,7 +15,7 @@ config BOARD_SPECIFIC_OPTIONS
select INTEL_INT15
select SERIRQ_CONTINUOUS_MODE
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
config DRAM_RESET_GATE_GPIO
int
diff --git a/src/mainboard/google/asurada/Kconfig b/src/mainboard/google/asurada/Kconfig
index 7d757eb0a7..46a0327e4f 100644
--- a/src/mainboard/google/asurada/Kconfig
+++ b/src/mainboard/google/asurada/Kconfig
@@ -23,7 +23,8 @@ config BOARD_SPECIFIC_OPTIONS
select EC_GOOGLE_CHROMEEC
select EC_GOOGLE_CHROMEEC_BOARDID
select EC_GOOGLE_CHROMEEC_SPI
- select MAINBOARD_HAS_SPI_TPM_CR50 if VBOOT
+ select SPI_TPM if VBOOT
+ select TPM_GOOGLE_CR50 if VBOOT
select MAINBOARD_HAS_TPM2 if VBOOT
select MAINBOARD_HAS_NATIVE_VGA_INIT
select MAINBOARD_FORCE_NATIVE_VGA_INIT
diff --git a/src/mainboard/google/auron/Kconfig b/src/mainboard/google/auron/Kconfig
index 7c9b8642b8..6f0ff89b09 100644
--- a/src/mainboard/google/auron/Kconfig
+++ b/src/mainboard/google/auron/Kconfig
@@ -10,7 +10,7 @@ config BOARD_GOOGLE_BASEBOARD_AURON
select INTEL_INT15
select MAINBOARD_HAS_CHROMEOS
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select SOC_INTEL_BROADWELL
diff --git a/src/mainboard/google/beltino/Kconfig b/src/mainboard/google/beltino/Kconfig
index 74caad259f..5afb3ea144 100644
--- a/src/mainboard/google/beltino/Kconfig
+++ b/src/mainboard/google/beltino/Kconfig
@@ -8,7 +8,7 @@ config BOARD_GOOGLE_BASEBOARD_BELTINO
select INTEL_LYNXPOINT_LP
select MAINBOARD_HAS_CHROMEOS
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select NORTHBRIDGE_INTEL_HASWELL
select SOUTHBRIDGE_INTEL_LYNXPOINT
diff --git a/src/mainboard/google/brya/Kconfig b/src/mainboard/google/brya/Kconfig
index 724da6ca40..1a3cb559cc 100644
--- a/src/mainboard/google/brya/Kconfig
+++ b/src/mainboard/google/brya/Kconfig
@@ -28,15 +28,16 @@ config BOARD_GOOGLE_BRYA_COMMON
select GOOGLE_SMBIOS_MAINBOARD_VERSION
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES
+ select I2C_TPM
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_I2C_TPM_CR50
select MAINBOARD_HAS_TPM2
select PMC_IPC_ACPI_INTERFACE
select SOC_INTEL_COMMON_BLOCK_PCIE_RTD3
select SOC_INTEL_CSE_LITE_SKU
select SOC_INTEL_ENABLE_USB4_PCIE_RESOURCES if SOC_INTEL_ALDERLAKE_PCH_P
select SOC_INTEL_COMMON_BASECODE_DEBUG_FEATURE
+ select TPM_GOOGLE_CR50
config BOARD_GOOGLE_BASEBOARD_BRYA
def_bool n
diff --git a/src/mainboard/google/butterfly/Kconfig b/src/mainboard/google/butterfly/Kconfig
index f8897ac471..49ac7d2ae1 100644
--- a/src/mainboard/google/butterfly/Kconfig
+++ b/src/mainboard/google/butterfly/Kconfig
@@ -14,7 +14,7 @@ config BOARD_SPECIFIC_OPTIONS
select INTEL_INT15
select MAINBOARD_HAS_CHROMEOS
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select NORTHBRIDGE_INTEL_SANDYBRIDGE
select SANDYBRIDGE_VBOOT_IN_ROMSTAGE
diff --git a/src/mainboard/google/cherry/Kconfig b/src/mainboard/google/cherry/Kconfig
index 206c4e41f0..2816f9ba89 100644
--- a/src/mainboard/google/cherry/Kconfig
+++ b/src/mainboard/google/cherry/Kconfig
@@ -24,7 +24,8 @@ config BOARD_SPECIFIC_OPTIONS
select EC_GOOGLE_CHROMEEC_BOARDID
select EC_GOOGLE_CHROMEEC_SKUID
select EC_GOOGLE_CHROMEEC_SPI
- select MAINBOARD_HAS_I2C_TPM_CR50 if VBOOT
+ select I2C_TPM if VBOOT
+ select TPM_GOOGLE_CR50 if VBOOT
select MAINBOARD_HAS_TPM2 if VBOOT
select MAINBOARD_HAS_NATIVE_VGA_INIT
select HAVE_LINEAR_FRAMEBUFFER
diff --git a/src/mainboard/google/corsola/Kconfig b/src/mainboard/google/corsola/Kconfig
index 7bf557fd2c..436ea94a7e 100644
--- a/src/mainboard/google/corsola/Kconfig
+++ b/src/mainboard/google/corsola/Kconfig
@@ -33,7 +33,8 @@ config BOARD_SPECIFIC_OPTIONS
select EC_GOOGLE_CHROMEEC_BOARDID
select EC_GOOGLE_CHROMEEC_SKUID
select EC_GOOGLE_CHROMEEC_SPI
- select MAINBOARD_HAS_SPI_TPM_CR50 if VBOOT
+ select SPI_TPM if VBOOT
+ select TPM_GOOGLE_CR50 if VBOOT
select MAINBOARD_HAS_TPM2 if VBOOT
select MAINBOARD_HAS_NATIVE_VGA_INIT
select HAVE_LINEAR_FRAMEBUFFER
diff --git a/src/mainboard/google/cyan/Kconfig b/src/mainboard/google/cyan/Kconfig
index c3032668cf..ac679c765f 100644
--- a/src/mainboard/google/cyan/Kconfig
+++ b/src/mainboard/google/cyan/Kconfig
@@ -12,7 +12,7 @@ config BOARD_GOOGLE_BASEBOARD_CYAN
select HAVE_SPD_IN_CBFS
select INTEL_GMA_HAVE_VBT
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select PCIEXP_L1_SUB_STATE if !BOARD_GOOGLE_CYAN
select SOC_INTEL_BRASWELL
diff --git a/src/mainboard/google/daisy/Kconfig b/src/mainboard/google/daisy/Kconfig
index 56970227fe..d4117d84ac 100644
--- a/src/mainboard/google/daisy/Kconfig
+++ b/src/mainboard/google/daisy/Kconfig
@@ -15,7 +15,7 @@ config BOARD_SPECIFIC_OPTIONS
select MAINBOARD_HAS_NATIVE_VGA_INIT
select MAINBOARD_FORCE_NATIVE_VGA_INIT
select HAVE_LINEAR_FRAMEBUFFER
- select MAINBOARD_HAS_I2C_TPM_GENERIC
+ select I2C_TPM
select MAINBOARD_HAS_TPM1
config VBOOT
diff --git a/src/mainboard/google/dedede/Kconfig b/src/mainboard/google/dedede/Kconfig
index 458dfc7f43..68b87576f5 100644
--- a/src/mainboard/google/dedede/Kconfig
+++ b/src/mainboard/google/dedede/Kconfig
@@ -37,12 +37,13 @@ config BOARD_GOOGLE_BASEBOARD_DEDEDE
config BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
def_bool n
select CR50_USE_LONG_INTERRUPT_PULSES
- select MAINBOARD_HAS_SPI_TPM_CR50
+ select SPI_TPM
+ select TPM_GOOGLE_CR50
select BOARD_GOOGLE_BASEBOARD_DEDEDE
config BOARD_GOOGLE_BASEBOARD_DEDEDE_TPM2
def_bool n
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select BOARD_GOOGLE_BASEBOARD_DEDEDE
if BOARD_GOOGLE_BASEBOARD_DEDEDE
diff --git a/src/mainboard/google/deltaur/Kconfig b/src/mainboard/google/deltaur/Kconfig
index 7dc4286dc9..f0267fd633 100644
--- a/src/mainboard/google/deltaur/Kconfig
+++ b/src/mainboard/google/deltaur/Kconfig
@@ -9,14 +9,15 @@ config BOARD_GOOGLE_BASEBOARD_DELTAUR
select EC_GOOGLE_WILCO
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES
+ select I2C_TPM
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_I2C_TPM_CR50
select MAINBOARD_HAS_TPM2
select MAINBOARD_USES_IFD_EC_REGION
select SOC_INTEL_COMMON_BLOCK_HDA_VERB
select SOC_INTEL_TIGERLAKE
select SYSTEM_TYPE_LAPTOP
+ select TPM_GOOGLE_CR50
config BOARD_GOOGLE_DELTAN
select BOARD_GOOGLE_BASEBOARD_DELTAUR
diff --git a/src/mainboard/google/drallion/Kconfig b/src/mainboard/google/drallion/Kconfig
index a26e70e978..40afdf4851 100644
--- a/src/mainboard/google/drallion/Kconfig
+++ b/src/mainboard/google/drallion/Kconfig
@@ -12,9 +12,9 @@ config BOARD_GOOGLE_BASEBOARD_DRALLION
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES
select HAVE_SPD_IN_CBFS
+ select I2C_TPM
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_I2C_TPM_CR50
select MAINBOARD_HAS_TPM2
select MAINBOARD_USES_IFD_EC_REGION
select SMBIOS_SERIAL_FROM_VPD if VPD
@@ -22,6 +22,7 @@ config BOARD_GOOGLE_BASEBOARD_DRALLION
select SOC_INTEL_COMMON_BLOCK_HDA_VERB
select SOC_INTEL_COMMON_BLOCK_SMM_ESPI_DISABLE
select SYSTEM_TYPE_LAPTOP
+ select TPM_GOOGLE_CR50
config BOARD_GOOGLE_DRALLION
select BOARD_GOOGLE_BASEBOARD_DRALLION
diff --git a/src/mainboard/google/eve/Kconfig b/src/mainboard/google/eve/Kconfig
index 5e1b2f7ea5..0579c0dfe1 100644
--- a/src/mainboard/google/eve/Kconfig
+++ b/src/mainboard/google/eve/Kconfig
@@ -14,14 +14,15 @@ config BOARD_SPECIFIC_OPTIONS
select EC_GOOGLE_CHROMEEC_ESPI
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES
+ select I2C_TPM
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_I2C_TPM_CR50
select MAINBOARD_HAS_LIBGFXINIT
select MAINBOARD_HAS_TPM2
select SOC_INTEL_KABYLAKE
select SYSTEM_TYPE_CONVERTIBLE
+ select TPM_GOOGLE_CR50
select HAVE_SPD_IN_CBFS
config DISABLE_HECI1_AT_PRE_BOOT
diff --git a/src/mainboard/google/fizz/Kconfig b/src/mainboard/google/fizz/Kconfig
index 01d838a903..92c6abf05e 100644
--- a/src/mainboard/google/fizz/Kconfig
+++ b/src/mainboard/google/fizz/Kconfig
@@ -14,14 +14,15 @@ config BOARD_GOOGLE_BASEBOARD_FIZZ
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_CHROMEOS
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_SPI_TPM_CR50
select MAINBOARD_HAS_TPM2
select NO_FADT_8042
select SOC_INTEL_KABYLAKE
select SPD_READ_BY_WORD
+ select SPI_TPM
select RT8168_GET_MAC_FROM_VPD
select RT8168_SUPPORT_LEGACY_VPD_MAC
select RT8168_SET_LED_MODE
+ select TPM_GOOGLE_CR50
config BOARD_GOOGLE_FIZZ
select BOARD_GOOGLE_BASEBOARD_FIZZ
diff --git a/src/mainboard/google/foster/Kconfig b/src/mainboard/google/foster/Kconfig
index c6b00381b0..6a2d28ef06 100644
--- a/src/mainboard/google/foster/Kconfig
+++ b/src/mainboard/google/foster/Kconfig
@@ -11,7 +11,7 @@ config BOARD_SPECIFIC_OPTIONS
select BOOTROM_SDRAM_INIT # use BootRom to config sdram
select COMMON_CBFS_SPI_WRAPPER
select SPI_FLASH_WINBOND
- select MAINBOARD_HAS_I2C_TPM_GENERIC
+ select I2C_TPM
select MAINBOARD_HAS_TPM1
config VBOOT
diff --git a/src/mainboard/google/gale/Kconfig b/src/mainboard/google/gale/Kconfig
index bd2092b378..76ecb6541e 100644
--- a/src/mainboard/google/gale/Kconfig
+++ b/src/mainboard/google/gale/Kconfig
@@ -15,7 +15,7 @@ config BOARD_SPECIFIC_OPTIONS
select SPI_FLASH_STMICRO
select SPI_FLASH_WINBOND
select DRIVERS_UART
- select MAINBOARD_HAS_I2C_TPM_GENERIC
+ select I2C_TPM
select MAINBOARD_HAS_TPM1
config VBOOT
diff --git a/src/mainboard/google/glados/Kconfig b/src/mainboard/google/glados/Kconfig
index 59ea8eda0e..ff6b1ea862 100644
--- a/src/mainboard/google/glados/Kconfig
+++ b/src/mainboard/google/glados/Kconfig
@@ -16,7 +16,7 @@ config BOARD_GOOGLE_BASEBOARD_GLADOS
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_CHROMEOS
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select SOC_INTEL_SKYLAKE
select SYSTEM_TYPE_LAPTOP
diff --git a/src/mainboard/google/gru/Kconfig b/src/mainboard/google/gru/Kconfig
index 3c756cfd2f..23926b65d9 100644
--- a/src/mainboard/google/gru/Kconfig
+++ b/src/mainboard/google/gru/Kconfig
@@ -43,8 +43,9 @@ config BOARD_SPECIFIC_OPTIONS
select SPI_FLASH
select SPI_FLASH_GIGADEVICE
select SPI_FLASH_WINBOND
- select MAINBOARD_HAS_SPI_TPM_CR50 if GRU_HAS_TPM2
- select MAINBOARD_HAS_I2C_TPM_GENERIC if !GRU_HAS_TPM2
+ select I2C_TPM if !GRU_HAS_TPM2
+ select TPM_GOOGLE_CR50 if GRU_HAS_TPM2
+ select SPI_TPM if GRU_HAS_TPM2
select MAINBOARD_HAS_TPM1 if !GRU_HAS_TPM2
select MAINBOARD_HAS_TPM2 if GRU_HAS_TPM2
diff --git a/src/mainboard/google/guybrush/Kconfig b/src/mainboard/google/guybrush/Kconfig
index b082e25b31..a19cfe8ace 100644
--- a/src/mainboard/google/guybrush/Kconfig
+++ b/src/mainboard/google/guybrush/Kconfig
@@ -33,8 +33,8 @@ config BOARD_SPECIFIC_OPTIONS
select GOOGLE_SMBIOS_MAINBOARD_VERSION
select HAVE_EM100_SUPPORT
select HAVE_SPD_IN_CBFS
+ select I2C_TPM
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_I2C_TPM_CR50
select MAINBOARD_HAS_TPM2
select PCIEXP_ASPM
select PCIEXP_CLK_PM
@@ -47,6 +47,7 @@ config BOARD_SPECIFIC_OPTIONS
select SOC_AMD_COMMON_BLOCK_I2C3_TPM_SHARED_WITH_PSP
select SOC_AMD_COMMON_BLOCK_USE_ESPI
select SOC_AMD_COMMON_BLOCK_PSP_FUSE_SPL
+ select TPM_GOOGLE_CR50
config CHROMEOS
select EC_GOOGLE_CHROMEEC_SWITCHES
diff --git a/src/mainboard/google/hatch/Kconfig b/src/mainboard/google/hatch/Kconfig
index ad23f05c4c..749b0df30a 100644
--- a/src/mainboard/google/hatch/Kconfig
+++ b/src/mainboard/google/hatch/Kconfig
@@ -19,11 +19,12 @@ config BOARD_GOOGLE_HATCH_COMMON
select HAVE_ACPI_TABLES
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_SPI_TPM_CR50
select MAINBOARD_HAS_TPM2
select MB_HAS_ACTIVE_HIGH_SD_PWR_ENABLE
select SOC_INTEL_COMETLAKE_1
select SOC_INTEL_COMMON_BLOCK_DTT
+ select SPI_TPM
+ select TPM_GOOGLE_CR50
config BOARD_GOOGLE_BASEBOARD_HATCH
def_bool n
diff --git a/src/mainboard/google/herobrine/Kconfig b/src/mainboard/google/herobrine/Kconfig
index bf66bbc46f..7c2673dbf9 100644
--- a/src/mainboard/google/herobrine/Kconfig
+++ b/src/mainboard/google/herobrine/Kconfig
@@ -25,9 +25,10 @@ config BOARD_SPECIFIC_OPTIONS
select SPI_FLASH_GIGADEVICE
select SPI_FLASH_MACRONIX
select SPI_FLASH_WINBOND
+ select TPM_GOOGLE_CR50 if !BOARD_GOOGLE_SENOR
+ select SPI_TPM if BOARD_GOOGLE_PIGLIN
+ select I2C_TPM if !BOARD_GOOGLE_PIGLIN && !BOARD_GOOGLE_SENOR
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_SPI_TPM_CR50 if BOARD_GOOGLE_PIGLIN
- select MAINBOARD_HAS_I2C_TPM_CR50 if !BOARD_GOOGLE_PIGLIN && !BOARD_GOOGLE_SENOR
select MAINBOARD_HAS_TPM2 if !BOARD_GOOGLE_SENOR
config VBOOT
@@ -57,7 +58,7 @@ config MAINBOARD_PART_NUMBER
default "Villager" if BOARD_GOOGLE_VILLAGER
config DRIVER_TPM_I2C_BUS
- depends on MAINBOARD_HAS_I2C_TPM_CR50
+ depends on I2C_TPM
hex
default 0xC if BOARD_GOOGLE_HEROBRINE_REV0
default 0xE
@@ -66,7 +67,7 @@ config DRIVER_TPM_I2C_ADDR
default 0x50
config DRIVER_TPM_SPI_BUS
- depends on MAINBOARD_HAS_SPI_TPM_CR50
+ depends on SPI_TPM
hex
default 0xE
diff --git a/src/mainboard/google/herobrine/bootblock.c b/src/mainboard/google/herobrine/bootblock.c
index 50ca0aa4e0..cd1612703f 100644
--- a/src/mainboard/google/herobrine/bootblock.c
+++ b/src/mainboard/google/herobrine/bootblock.c
@@ -10,10 +10,10 @@ void bootblock_mainboard_init(void)
{
setup_chromeos_gpios();
- if (CONFIG(MAINBOARD_HAS_I2C_TPM_CR50))
+ if (CONFIG(I2C_TPM))
i2c_init(CONFIG_DRIVER_TPM_I2C_BUS, I2C_SPEED_FAST); /* H1/TPM I2C */
- if (CONFIG(MAINBOARD_HAS_SPI_TPM_CR50))
+ if (CONFIG(SPI_TPM))
qup_spi_init(CONFIG_DRIVER_TPM_SPI_BUS, 1010 * KHz); /* H1/TPM SPI */
if (CONFIG(EC_GOOGLE_CHROMEEC))
diff --git a/src/mainboard/google/jecht/Kconfig b/src/mainboard/google/jecht/Kconfig
index 836cbdf4e9..584b88b294 100644
--- a/src/mainboard/google/jecht/Kconfig
+++ b/src/mainboard/google/jecht/Kconfig
@@ -7,7 +7,7 @@ config BOARD_GOOGLE_BASEBOARD_JECHT
select INTEL_GMA_HAVE_VBT
select MAINBOARD_HAS_CHROMEOS
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select SOC_INTEL_BROADWELL
select SUPERIO_ITE_IT8772F
diff --git a/src/mainboard/google/kahlee/Kconfig b/src/mainboard/google/kahlee/Kconfig
index c82a20e18c..10524fe5e9 100644
--- a/src/mainboard/google/kahlee/Kconfig
+++ b/src/mainboard/google/kahlee/Kconfig
@@ -15,6 +15,7 @@ config BOARD_GOOGLE_BASEBOARD_KAHLEE
select EC_GOOGLE_CHROMEEC_LPC
select HAVE_ACPI_TABLES
select HAVE_SPD_IN_CBFS
+ select I2C_TPM
select GFXUMA
select GOOGLE_SMBIOS_MAINBOARD_VERSION
select MAINBOARD_HAS_CHROMEOS
@@ -23,7 +24,6 @@ config BOARD_GOOGLE_BASEBOARD_KAHLEE
select SOC_AMD_SMU_FANLESS
select HAVE_ACPI_RESUME
select DRIVERS_GENERIC_BH720
- select MAINBOARD_HAS_I2C_TPM_CR50
select MAINBOARD_HAS_TPM2
select DRIVERS_GENERIC_ADAU7002
select DRIVERS_GENERIC_MAX98357A
@@ -34,6 +34,7 @@ config BOARD_GOOGLE_BASEBOARD_KAHLEE
select PCIEXP_L1_SUB_STATE
select HAVE_EM100_SUPPORT
select SYSTEM_TYPE_LAPTOP
+ select TPM_GOOGLE_CR50
if BOARD_GOOGLE_BASEBOARD_KAHLEE
diff --git a/src/mainboard/google/kukui/Kconfig b/src/mainboard/google/kukui/Kconfig
index a1614ed2aa..45682494ff 100644
--- a/src/mainboard/google/kukui/Kconfig
+++ b/src/mainboard/google/kukui/Kconfig
@@ -31,7 +31,8 @@ config BOARD_SPECIFIC_OPTIONS
select EC_GOOGLE_CHROMEEC
select EC_GOOGLE_CHROMEEC_BOARDID
select EC_GOOGLE_CHROMEEC_SPI
- select MAINBOARD_HAS_SPI_TPM_CR50 if VBOOT
+ select SPI_TPM if VBOOT
+ select TPM_GOOGLE_CR50 if VBOOT
select MAINBOARD_HAS_TPM2 if VBOOT
select MAINBOARD_HAS_NATIVE_VGA_INIT
select MAINBOARD_FORCE_NATIVE_VGA_INIT
diff --git a/src/mainboard/google/link/Kconfig b/src/mainboard/google/link/Kconfig
index e08ced97e2..e6e4b0bff1 100644
--- a/src/mainboard/google/link/Kconfig
+++ b/src/mainboard/google/link/Kconfig
@@ -13,7 +13,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_SPD_IN_CBFS
select MAINBOARD_HAS_CHROMEOS
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select NORTHBRIDGE_INTEL_SANDYBRIDGE
select SERIRQ_CONTINUOUS_MODE
diff --git a/src/mainboard/google/nyan_big/Kconfig b/src/mainboard/google/nyan_big/Kconfig
index f3506143b7..5c253c9bc9 100644
--- a/src/mainboard/google/nyan_big/Kconfig
+++ b/src/mainboard/google/nyan_big/Kconfig
@@ -14,7 +14,7 @@ config BOARD_SPECIFIC_OPTIONS
select SPI_FLASH
select SPI_FLASH_GIGADEVICE
select SPI_FLASH_WINBOND
- select MAINBOARD_HAS_I2C_TPM_GENERIC
+ select I2C_TPM
select MAINBOARD_HAS_TPM1
select DRIVERS_AS3722_RTC
diff --git a/src/mainboard/google/nyan_blaze/Kconfig b/src/mainboard/google/nyan_blaze/Kconfig
index c16736a115..e687129617 100644
--- a/src/mainboard/google/nyan_blaze/Kconfig
+++ b/src/mainboard/google/nyan_blaze/Kconfig
@@ -14,7 +14,7 @@ config BOARD_SPECIFIC_OPTIONS
select SPI_FLASH
select SPI_FLASH_GIGADEVICE
select SPI_FLASH_WINBOND
- select MAINBOARD_HAS_I2C_TPM_GENERIC
+ select I2C_TPM
select MAINBOARD_HAS_TPM1
select DRIVERS_AS3722_RTC
diff --git a/src/mainboard/google/oak/Kconfig b/src/mainboard/google/oak/Kconfig
index 6302b85483..03535e95e5 100644
--- a/src/mainboard/google/oak/Kconfig
+++ b/src/mainboard/google/oak/Kconfig
@@ -13,7 +13,7 @@ config BOARD_SPECIFIC_OPTIONS
select DRIVER_PARADE_PS8640
select EC_GOOGLE_CHROMEEC
select EC_GOOGLE_CHROMEEC_SPI
- select MAINBOARD_HAS_I2C_TPM_GENERIC
+ select I2C_TPM
select MAINBOARD_HAS_TPM1
select MAINBOARD_HAS_NATIVE_VGA_INIT
select MAINBOARD_FORCE_NATIVE_VGA_INIT
diff --git a/src/mainboard/google/octopus/Kconfig b/src/mainboard/google/octopus/Kconfig
index 8bcd826fc5..3bdc63b60f 100644
--- a/src/mainboard/google/octopus/Kconfig
+++ b/src/mainboard/google/octopus/Kconfig
@@ -19,14 +19,15 @@ config BOARD_GOOGLE_BASEBOARD_OCTOPUS
select HAVE_ACPI_TABLES
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_SPI_TPM_CR50
select MAINBOARD_HAS_TPM2
select NO_BOOTBLOCK_CONSOLE
select NO_CBFS_MCACHE
select NO_FMAP_CACHE
select SOC_ESPI
select SOC_INTEL_GEMINILAKE
+ select SPI_TPM
select SYSTEM_TYPE_LAPTOP
+ select TPM_GOOGLE_CR50
config BOARD_GOOGLE_AMPTON
select BOARD_GOOGLE_BASEBOARD_OCTOPUS
diff --git a/src/mainboard/google/parrot/Kconfig b/src/mainboard/google/parrot/Kconfig
index c06da09dd4..dd6df3ea13 100644
--- a/src/mainboard/google/parrot/Kconfig
+++ b/src/mainboard/google/parrot/Kconfig
@@ -14,7 +14,7 @@ config BOARD_SPECIFIC_OPTIONS
select INTEL_INT15
select MAINBOARD_HAS_CHROMEOS
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select NORTHBRIDGE_INTEL_SANDYBRIDGE
select SANDYBRIDGE_VBOOT_IN_ROMSTAGE
diff --git a/src/mainboard/google/peach_pit/Kconfig b/src/mainboard/google/peach_pit/Kconfig
index 329f949726..497ada1968 100644
--- a/src/mainboard/google/peach_pit/Kconfig
+++ b/src/mainboard/google/peach_pit/Kconfig
@@ -12,7 +12,7 @@ config BOARD_SPECIFIC_OPTIONS
select MAINBOARD_FORCE_NATIVE_VGA_INIT
select HAVE_LINEAR_FRAMEBUFFER
select DRIVER_PARADE_PS8625
- select MAINBOARD_HAS_I2C_TPM_GENERIC
+ select I2C_TPM
select MAINBOARD_HAS_TPM1
select MISSING_BOARD_RESET
diff --git a/src/mainboard/google/poppy/Kconfig b/src/mainboard/google/poppy/Kconfig
index 4032f57d01..3007bcbc9a 100644
--- a/src/mainboard/google/poppy/Kconfig
+++ b/src/mainboard/google/poppy/Kconfig
@@ -14,6 +14,7 @@ config BOARD_GOOGLE_BASEBOARD_POPPY
select MAINBOARD_HAS_CHROMEOS
select MAINBOARD_HAS_TPM2
select SOC_INTEL_KABYLAKE
+ select TPM_GOOGLE_CR50
config BOARD_GOOGLE_ATLAS
select BOARD_GOOGLE_BASEBOARD_POPPY
@@ -26,14 +27,14 @@ config BOARD_GOOGLE_ATLAS
select GEO_SAR_ENABLE if CHROMEOS_WIFI_SAR
select INTEL_GMA_HAVE_VBT
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_SPI_TPM_CR50
+ select SPI_TPM
select SYSTEM_TYPE_LAPTOP
select VARIANT_HAS_CAMERA_ACPI
config BOARD_GOOGLE_POPPY
select BOARD_GOOGLE_BASEBOARD_POPPY
select DRIVERS_I2C_MAX98927
- select MAINBOARD_HAS_I2C_TPM_CR50
+ select I2C_TPM
select NO_FADT_8042
select SYSTEM_TYPE_LAPTOP
select VARIANT_HAS_CAMERA_ACPI
@@ -46,7 +47,7 @@ config BOARD_GOOGLE_NAMI
select DRIVERS_SPI_ACPI
select EXCLUDE_NATIVE_SD_INTERFACE
select INTEL_GMA_HAVE_VBT
- select MAINBOARD_HAS_SPI_TPM_CR50
+ select SPI_TPM
select SYSTEM_TYPE_LAPTOP
config BOARD_GOOGLE_NAUTILUS
@@ -54,8 +55,8 @@ config BOARD_GOOGLE_NAUTILUS
select CHROMEOS_WIFI_SAR if CHROMEOS
select DRIVERS_GENERIC_MAX98357A
select DRIVERS_I2C_DA7219
+ select I2C_TPM
select INTEL_GMA_HAVE_VBT
- select MAINBOARD_HAS_I2C_TPM_CR50
select SYSTEM_TYPE_CONVERTIBLE
select VARIANT_HAS_CAMERA_ACPI
@@ -70,8 +71,8 @@ config BOARD_GOOGLE_NOCTURNE
select EXCLUDE_NATIVE_SD_INTERFACE
select GEO_SAR_ENABLE if CHROMEOS_WIFI_SAR
select INTEL_GMA_HAVE_VBT
- select MAINBOARD_HAS_SPI_TPM_CR50
select NO_FADT_8042
+ select SPI_TPM
select SYSTEM_TYPE_DETACHABLE
select VARIANT_HAS_CAMERA_ACPI
@@ -84,14 +85,14 @@ config BOARD_GOOGLE_RAMMUS
select DRIVERS_USB_ACPI
select INTEL_GMA_HAVE_VBT
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_SPI_TPM_CR50
+ select SPI_TPM
select SYSTEM_TYPE_LAPTOP
config BOARD_GOOGLE_SORAKA
select BOARD_GOOGLE_BASEBOARD_POPPY
select DRIVERS_I2C_MAX98927
+ select I2C_TPM
select INTEL_GMA_HAVE_VBT
- select MAINBOARD_HAS_I2C_TPM_CR50
select NO_FADT_8042
select SYSTEM_TYPE_DETACHABLE
select VARIANT_HAS_CAMERA_ACPI
@@ -118,15 +119,15 @@ config DEVICETREE
default "variants/baseboard/devicetree.cb"
config DRIVER_TPM_I2C_BUS
- depends on MAINBOARD_HAS_I2C_TPM_CR50
+ depends on I2C_TPM
default 0x1
config DRIVER_TPM_I2C_ADDR
- depends on MAINBOARD_HAS_I2C_TPM_CR50
+ depends on I2C_TPM
default 0x50
config DRIVER_TPM_SPI_BUS
- depends on MAINBOARD_HAS_SPI_TPM_CR50
+ depends on SPI_TPM
default 0x1
config INCLUDE_NHLT_BLOBS
diff --git a/src/mainboard/google/rambi/Kconfig b/src/mainboard/google/rambi/Kconfig
index ad113f5409..f8af00f6b1 100644
--- a/src/mainboard/google/rambi/Kconfig
+++ b/src/mainboard/google/rambi/Kconfig
@@ -9,7 +9,7 @@ config BOARD_GOOGLE_BASEBOARD_RAMBI
select HAVE_OPTION_TABLE
select HAVE_SPD_IN_CBFS
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select SOC_INTEL_BAYTRAIL
diff --git a/src/mainboard/google/reef/Kconfig b/src/mainboard/google/reef/Kconfig
index 0ab463e22d..47d111431d 100644
--- a/src/mainboard/google/reef/Kconfig
+++ b/src/mainboard/google/reef/Kconfig
@@ -12,14 +12,15 @@ config BOARD_GOOGLE_BASEBOARD_REEF
select GOOGLE_SMBIOS_MAINBOARD_VERSION
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES
+ select I2C_TPM
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_I2C_TPM_CR50
select MAINBOARD_HAS_TPM2
select SAR_ENABLE
select SOC_INTEL_APOLLOLAKE
select SYSTEM_TYPE_LAPTOP
+ select TPM_GOOGLE_CR50
select USE_SAR
config BOARD_GOOGLE_REEF
diff --git a/src/mainboard/google/sarien/Kconfig b/src/mainboard/google/sarien/Kconfig
index 32a253e13a..37c72ad663 100644
--- a/src/mainboard/google/sarien/Kconfig
+++ b/src/mainboard/google/sarien/Kconfig
@@ -10,10 +10,10 @@ config BOARD_GOOGLE_BASEBOARD_SARIEN
select GOOGLE_SMBIOS_MAINBOARD_VERSION
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES
+ select I2C_TPM
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_I2C_TPM_CR50
select MAINBOARD_HAS_TPM2
select MAINBOARD_USES_IFD_EC_REGION
select SAR_ENABLE
@@ -22,6 +22,7 @@ config BOARD_GOOGLE_BASEBOARD_SARIEN
select SOC_INTEL_COMMON_BLOCK_SMM_ESPI_DISABLE
select SOC_INTEL_WHISKEYLAKE
select SPD_READ_BY_WORD
+ select TPM_GOOGLE_CR50
select USE_SAR
config BOARD_GOOGLE_ARCADA
diff --git a/src/mainboard/google/skyrim/Kconfig b/src/mainboard/google/skyrim/Kconfig
index 0f5469db1c..5a60c987b6 100644
--- a/src/mainboard/google/skyrim/Kconfig
+++ b/src/mainboard/google/skyrim/Kconfig
@@ -24,12 +24,13 @@ config BOARD_SPECIFIC_OPTIONS
select ELOG
select ELOG_GSMI
select FW_CONFIG
+ select I2C_TPM
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_I2C_TPM_CR50
select MAINBOARD_HAS_TPM2
select PSP_DISABLE_POSTCODES # TODO re-enable PSP postcodes later (b/227199049)
select SOC_AMD_SABRINA
select SOC_AMD_COMMON_BLOCK_USE_ESPI
+ select TPM_GOOGLE_CR50
config CHROMEOS
select EC_GOOGLE_CHROMEEC_SWITCHES
diff --git a/src/mainboard/google/slippy/Kconfig b/src/mainboard/google/slippy/Kconfig
index 0148093a9a..437797ce03 100644
--- a/src/mainboard/google/slippy/Kconfig
+++ b/src/mainboard/google/slippy/Kconfig
@@ -12,7 +12,7 @@ config BOARD_GOOGLE_BASEBOARD_SLIPPY
select INTEL_LYNXPOINT_LP
select MAINBOARD_HAS_CHROMEOS
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select NORTHBRIDGE_INTEL_HASWELL
select SOUTHBRIDGE_INTEL_LYNXPOINT
diff --git a/src/mainboard/google/smaug/Kconfig b/src/mainboard/google/smaug/Kconfig
index 48172d4eae..e57da4afd2 100644
--- a/src/mainboard/google/smaug/Kconfig
+++ b/src/mainboard/google/smaug/Kconfig
@@ -9,6 +9,7 @@ config BOARD_SPECIFIC_OPTIONS
select EC_GOOGLE_CHROMEEC
select EC_GOOGLE_CHROMEEC_I2C
select EC_GOOGLE_CHROMEEC_I2C_PROTO3
+ select I2C_TPM
select MAINBOARD_HAS_NATIVE_VGA_INIT
select MAINBOARD_FORCE_NATIVE_VGA_INIT
select SPI_FLASH
@@ -16,7 +17,6 @@ config BOARD_SPECIFIC_OPTIONS
select SOC_NVIDIA_TEGRA210
select MAINBOARD_DO_DSI_INIT
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_I2C_TPM_GENERIC
select MAINBOARD_HAS_TPM1
select DRIVERS_TI_TPS65913_RTC
diff --git a/src/mainboard/google/storm/Kconfig b/src/mainboard/google/storm/Kconfig
index 435011f279..c5ce74b49b 100644
--- a/src/mainboard/google/storm/Kconfig
+++ b/src/mainboard/google/storm/Kconfig
@@ -13,7 +13,7 @@ config BOARD_SPECIFIC_OPTIONS
select SPI_FLASH_SPANSION
select SPI_FLASH_STMICRO
select DRIVERS_UART
- select MAINBOARD_HAS_I2C_TPM_GENERIC
+ select I2C_TPM
select MAINBOARD_HAS_TPM1
config VBOOT
diff --git a/src/mainboard/google/stout/Kconfig b/src/mainboard/google/stout/Kconfig
index d26d5b94a6..152c57fc2d 100644
--- a/src/mainboard/google/stout/Kconfig
+++ b/src/mainboard/google/stout/Kconfig
@@ -14,7 +14,7 @@ config BOARD_SPECIFIC_OPTIONS
select INTEL_INT15
select MAINBOARD_HAS_CHROMEOS
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select NORTHBRIDGE_INTEL_SANDYBRIDGE
select SANDYBRIDGE_VBOOT_IN_ROMSTAGE
diff --git a/src/mainboard/google/trogdor/Kconfig b/src/mainboard/google/trogdor/Kconfig
index 29b039551e..e409aeee67 100644
--- a/src/mainboard/google/trogdor/Kconfig
+++ b/src/mainboard/google/trogdor/Kconfig
@@ -44,8 +44,9 @@ config BOARD_SPECIFIC_OPTIONS
select SPI_FLASH_GIGADEVICE
select SPI_FLASH_WINBOND
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_SPI_TPM_CR50 if !BOARD_GOOGLE_BUBS
select MAINBOARD_HAS_TPM2 if !BOARD_GOOGLE_BUBS
+ select SPI_TPM if !BOARD_GOOGLE_BUBS
+ select TPM_GOOGLE_CR50 if !BOARD_GOOGLE_BUBS
config VBOOT
select EC_GOOGLE_CHROMEEC_SWITCHES if !BOARD_GOOGLE_BUBS
diff --git a/src/mainboard/google/veyron/Kconfig b/src/mainboard/google/veyron/Kconfig
index 83f6eb2d2b..0847c410ff 100644
--- a/src/mainboard/google/veyron/Kconfig
+++ b/src/mainboard/google/veyron/Kconfig
@@ -26,7 +26,7 @@ config BOARD_SPECIFIC_OPTIONS
select SPI_FLASH
select SPI_FLASH_GIGADEVICE
select SPI_FLASH_WINBOND
- select MAINBOARD_HAS_I2C_TPM_GENERIC
+ select I2C_TPM
select MAINBOARD_HAS_TPM1
config VBOOT
diff --git a/src/mainboard/google/veyron_mickey/Kconfig b/src/mainboard/google/veyron_mickey/Kconfig
index eaeb8f430a..2c4696555a 100644
--- a/src/mainboard/google/veyron_mickey/Kconfig
+++ b/src/mainboard/google/veyron_mickey/Kconfig
@@ -11,7 +11,7 @@ config BOARD_SPECIFIC_OPTIONS
select SPI_FLASH
select SPI_FLASH_GIGADEVICE
select SPI_FLASH_WINBOND
- select MAINBOARD_HAS_I2C_TPM_GENERIC
+ select I2C_TPM
select MAINBOARD_HAS_TPM1
config VBOOT
diff --git a/src/mainboard/google/veyron_rialto/Kconfig b/src/mainboard/google/veyron_rialto/Kconfig
index 77c06dccd5..916d8a65d9 100644
--- a/src/mainboard/google/veyron_rialto/Kconfig
+++ b/src/mainboard/google/veyron_rialto/Kconfig
@@ -11,7 +11,7 @@ config BOARD_SPECIFIC_OPTIONS
select SPI_FLASH
select SPI_FLASH_GIGADEVICE
select SPI_FLASH_WINBOND
- select MAINBOARD_HAS_I2C_TPM_GENERIC
+ select I2C_TPM
select MAINBOARD_HAS_TPM1
config VBOOT
diff --git a/src/mainboard/google/volteer/Kconfig b/src/mainboard/google/volteer/Kconfig
index 28d345729d..682d247300 100644
--- a/src/mainboard/google/volteer/Kconfig
+++ b/src/mainboard/google/volteer/Kconfig
@@ -29,12 +29,14 @@ config BOARD_GOOGLE_BASEBOARD_VOLTEER
select HAVE_SPD_IN_CBFS
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_I2C_TPM_CR50 if BOARD_GOOGLE_VOLTEER2_TI50
- select MAINBOARD_HAS_SPI_TPM_CR50 if !BOARD_GOOGLE_VOLTEER2_TI50
+ select I2C_TPM if BOARD_GOOGLE_VOLTEER2_TI50
+ select SPI_TPM if !BOARD_GOOGLE_VOLTEER2_TI50
select MAINBOARD_HAS_TPM2
select SOC_INTEL_COMMON_BLOCK_TCSS
select SOC_INTEL_CSE_LITE_SKU
select SOC_INTEL_TIGERLAKE
+ select TPM_GOOGLE_TI50 if BOARD_GOOGLE_VOLTEER2_TI50
+ select TPM_GOOGLE_CR50 if !BOARD_GOOGLE_VOLTEER2_TI50
config BOARD_GOOGLE_DELBIN
select BOARD_GOOGLE_BASEBOARD_VOLTEER
diff --git a/src/mainboard/google/volteer/mainboard.c b/src/mainboard/google/volteer/mainboard.c
index 7089dddc02..91fe319b92 100644
--- a/src/mainboard/google/volteer/mainboard.c
+++ b/src/mainboard/google/volteer/mainboard.c
@@ -84,7 +84,7 @@ static void mainboard_enable(struct device *dev)
void mainboard_update_soc_chip_config(struct soc_intel_tigerlake_config *cfg)
{
int ret;
- if (!CONFIG(MAINBOARD_HAS_SPI_TPM_CR50)) {
+ if (!CONFIG(TPM_GOOGLE_CR50) || !CONFIG(SPI_TPM)) {
/*
* Negotiation of long interrupt pulses is only supported via SPI. I2C is only
* used on reworked prototypes on which the TPM is replaced with Dauntless under
diff --git a/src/mainboard/google/volteer/variants/chronicler/overridetree.cb b/src/mainboard/google/volteer/variants/chronicler/overridetree.cb
index b69990c24a..763a5ee893 100644
--- a/src/mainboard/google/volteer/variants/chronicler/overridetree.cb
+++ b/src/mainboard/google/volteer/variants/chronicler/overridetree.cb
@@ -29,7 +29,7 @@ chip soc/intel/tigerlake
register "common_soc_config" = "{
.gspi[0] = {
.speed_mhz = 1,
- .early_init = CONFIG(MAINBOARD_HAS_SPI_TPM_CR50),
+ .early_init = CONFIG(SPI_TPM),
},
.i2c[0] = {
.speed = I2C_SPEED_FAST,
diff --git a/src/mainboard/google/volteer/variants/volteer2/overridetree.cb b/src/mainboard/google/volteer/variants/volteer2/overridetree.cb
index d024835aa0..b6657a1576 100644
--- a/src/mainboard/google/volteer/variants/volteer2/overridetree.cb
+++ b/src/mainboard/google/volteer/variants/volteer2/overridetree.cb
@@ -22,14 +22,14 @@ chip soc/intel/tigerlake
register "common_soc_config" = "{
.gspi[0] = {
.speed_mhz = 1,
- .early_init = CONFIG(MAINBOARD_HAS_SPI_TPM_CR50),
+ .early_init = CONFIG(SPI_TPM),
},
.i2c[0] = {
.speed = I2C_SPEED_FAST,
},
.i2c[1] = {
.speed = I2C_SPEED_FAST,
- .early_init = CONFIG(MAINBOARD_HAS_I2C_TPM_CR50),
+ .early_init = CONFIG(I2C_TPM),
},
.i2c[2] = {
.speed = I2C_SPEED_FAST,
diff --git a/src/mainboard/google/volteer/variants/volteer2/variant.c b/src/mainboard/google/volteer/variants/volteer2/variant.c
index 442402779d..c9129b242d 100644
--- a/src/mainboard/google/volteer/variants/volteer2/variant.c
+++ b/src/mainboard/google/volteer/variants/volteer2/variant.c
@@ -20,6 +20,6 @@ static void devtree_enable_i2c_tpm(void)
void variant_devtree_update(void)
{
- if (CONFIG(MAINBOARD_HAS_I2C_TPM_CR50))
+ if (CONFIG(I2C_TPM))
devtree_enable_i2c_tpm();
}
diff --git a/src/mainboard/google/zork/Kconfig b/src/mainboard/google/zork/Kconfig
index 6d66b1a706..0e04706024 100644
--- a/src/mainboard/google/zork/Kconfig
+++ b/src/mainboard/google/zork/Kconfig
@@ -37,7 +37,8 @@ config BOARD_SPECIFIC_OPTIONS
select GOOGLE_SMBIOS_MAINBOARD_VERSION
select MAINBOARD_HAS_CHROMEOS
select AMD_SOC_CONSOLE_UART
- select MAINBOARD_HAS_I2C_TPM_CR50
+ select I2C_TPM
+ select TPM_GOOGLE_CR50
select MAINBOARD_HAS_TPM2
select PCIEXP_ASPM
select PCIEXP_CLK_PM
diff --git a/src/mainboard/hp/compaq_8200_elite_sff/Kconfig b/src/mainboard/hp/compaq_8200_elite_sff/Kconfig
index 4d8f7ddd70..0ea593f71f 100644
--- a/src/mainboard/hp/compaq_8200_elite_sff/Kconfig
+++ b/src/mainboard/hp/compaq_8200_elite_sff/Kconfig
@@ -10,7 +10,7 @@ config BOARD_SPECIFIC_OPTIONS
select SERIRQ_CONTINUOUS_MODE
select SOUTHBRIDGE_INTEL_BD82X6X
select USE_NATIVE_RAMINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select HAVE_OPTION_TABLE
select HAVE_CMOS_DEFAULT
diff --git a/src/mainboard/hp/folio_9480m/Kconfig b/src/mainboard/hp/folio_9480m/Kconfig
index 1e0f116e7b..276eaaa15f 100644
--- a/src/mainboard/hp/folio_9480m/Kconfig
+++ b/src/mainboard/hp/folio_9480m/Kconfig
@@ -11,7 +11,7 @@ config BOARD_SPECIFIC_OPTIONS
select INTEL_GMA_HAVE_VBT
select INTEL_LYNXPOINT_LP
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select MAINBOARD_USES_IFD_GBE_REGION
select NORTHBRIDGE_INTEL_HASWELL
diff --git a/src/mainboard/hp/snb_ivb_laptops/Kconfig b/src/mainboard/hp/snb_ivb_laptops/Kconfig
index bb37da3ec8..574e2697d9 100644
--- a/src/mainboard/hp/snb_ivb_laptops/Kconfig
+++ b/src/mainboard/hp/snb_ivb_laptops/Kconfig
@@ -7,7 +7,7 @@ config BOARD_HP_SNB_IVB_LAPTOPS_COMMON
select HAVE_ACPI_TABLES
select HAVE_CMOS_DEFAULT
select HAVE_OPTION_TABLE
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select NORTHBRIDGE_INTEL_SANDYBRIDGE
select SERIRQ_CONTINUOUS_MODE
@@ -86,7 +86,7 @@ config BOARD_HP_PROBOOK_6360B
select INTEL_GMA_HAVE_VBT
select INTEL_INT15
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select MAINBOARD_USES_IFD_GBE_REGION
select SOUTHBRIDGE_INTEL_BD82X6X
diff --git a/src/mainboard/hp/z220_series/Kconfig b/src/mainboard/hp/z220_series/Kconfig
index 11b608ae09..1be397298d 100644
--- a/src/mainboard/hp/z220_series/Kconfig
+++ b/src/mainboard/hp/z220_series/Kconfig
@@ -8,7 +8,7 @@ config BOARD_HP_Z220_SERIES_COMMON
select SERIRQ_CONTINUOUS_MODE
select SOUTHBRIDGE_INTEL_BD82X6X
select USE_NATIVE_RAMINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select HAVE_OPTION_TABLE
select HAVE_CMOS_DEFAULT
diff --git a/src/mainboard/intel/adlrvp/Kconfig b/src/mainboard/intel/adlrvp/Kconfig
index 0e9f4fb454..11ec375283 100644
--- a/src/mainboard/intel/adlrvp/Kconfig
+++ b/src/mainboard/intel/adlrvp/Kconfig
@@ -53,10 +53,10 @@ config BOARD_INTEL_ADLRVP_M_EXT_EC
select FW_CONFIG
select FW_CONFIG_SOURCE_CHROMEEC_CBI
select INTEL_LPSS_UART_FOR_CONSOLE
- select MAINBOARD_HAS_SPI_TPM_CR50
select MAINBOARD_HAS_TPM2
select SOC_INTEL_ALDERLAKE_PCH_M
select SPI_TPM
+ select TPM_GOOGLE_CR50
config BOARD_INTEL_ADLRVP_N
select BOARD_INTEL_ADLRVP_COMMON
diff --git a/src/mainboard/intel/baskingridge/Kconfig b/src/mainboard/intel/baskingridge/Kconfig
index 6d7bc8cf93..9983e74922 100644
--- a/src/mainboard/intel/baskingridge/Kconfig
+++ b/src/mainboard/intel/baskingridge/Kconfig
@@ -9,7 +9,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_OPTION_TABLE
select HAVE_ACPI_RESUME
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select INTEL_INT15
config VBOOT
diff --git a/src/mainboard/intel/coffeelake_rvp/Kconfig b/src/mainboard/intel/coffeelake_rvp/Kconfig
index 4148b473e4..bcb5aaf008 100644
--- a/src/mainboard/intel/coffeelake_rvp/Kconfig
+++ b/src/mainboard/intel/coffeelake_rvp/Kconfig
@@ -9,7 +9,7 @@ config BOARD_INTEL_COFFEELAKE_RVP_COMMON
select HAVE_ACPI_TABLES
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_USES_IFD_EC_REGION
config BOARD_INTEL_COFFEELAKE_RVP8
diff --git a/src/mainboard/intel/galileo/Kconfig b/src/mainboard/intel/galileo/Kconfig
index 5f6f065d1d..f22f1ee285 100644
--- a/src/mainboard/intel/galileo/Kconfig
+++ b/src/mainboard/intel/galileo/Kconfig
@@ -8,7 +8,8 @@ config BOARD_SPECIFIC_OPTIONS
select ENABLE_BUILTIN_HSUART1
select HAVE_ACPI_TABLES
select SOC_INTEL_QUARK
- select MAINBOARD_HAS_I2C_TPM_ATMEL
+ select I2C_TPM
+ select TPM_ATMEL
select MAINBOARD_HAS_TPM2
select UDK_2017_BINDING
diff --git a/src/mainboard/intel/glkrvp/Kconfig b/src/mainboard/intel/glkrvp/Kconfig
index d9b61ca764..c2584f31c7 100644
--- a/src/mainboard/intel/glkrvp/Kconfig
+++ b/src/mainboard/intel/glkrvp/Kconfig
@@ -8,7 +8,7 @@ config BOARD_INTEL_BASEBOARD_GLKRVP
select HAVE_ACPI_TABLES
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select DRIVERS_GENERIC_MAX98357A
select DRIVERS_I2C_DA7219
select SOC_ESPI
diff --git a/src/mainboard/intel/kblrvp/Kconfig b/src/mainboard/intel/kblrvp/Kconfig
index 6b60ac46ea..a381897106 100644
--- a/src/mainboard/intel/kblrvp/Kconfig
+++ b/src/mainboard/intel/kblrvp/Kconfig
@@ -8,7 +8,7 @@ config BOARD_INTEL_KBLRVP_COMMON
select HAVE_SPD_IN_CBFS
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select SOC_INTEL_KABYLAKE
config BOARD_INTEL_KBLRVP3
diff --git a/src/mainboard/intel/kunimitsu/Kconfig b/src/mainboard/intel/kunimitsu/Kconfig
index 22fffb0203..476a1b9b81 100644
--- a/src/mainboard/intel/kunimitsu/Kconfig
+++ b/src/mainboard/intel/kunimitsu/Kconfig
@@ -17,7 +17,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_OPTION_TABLE
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select SOC_INTEL_SKYLAKE
select HAVE_SPD_IN_CBFS
diff --git a/src/mainboard/intel/shadowmountain/Kconfig b/src/mainboard/intel/shadowmountain/Kconfig
index 9294857f0c..0d8ad2bcbb 100644
--- a/src/mainboard/intel/shadowmountain/Kconfig
+++ b/src/mainboard/intel/shadowmountain/Kconfig
@@ -20,11 +20,12 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_SPD_IN_CBFS
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_SPI_TPM_CR50
select MAINBOARD_HAS_TPM2
select PCIEXP_HOTPLUG
select SOC_INTEL_ALDERLAKE_PCH_P
select SOC_INTEL_CSE_LITE_SKU
+ select SPI_TPM
+ select TPM_GOOGLE_CR50
select INTEL_CAR_NEM #TODO - Enable INTEL_CAR_NEM_ENHANCED
config CHROMEOS
diff --git a/src/mainboard/intel/strago/Kconfig b/src/mainboard/intel/strago/Kconfig
index 64d5dfc842..144ba5aaa3 100644
--- a/src/mainboard/intel/strago/Kconfig
+++ b/src/mainboard/intel/strago/Kconfig
@@ -13,7 +13,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_ACPI_TABLES
select HAVE_OPTION_TABLE
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select SOC_INTEL_BRASWELL
select PCIEXP_L1_SUB_STATE
diff --git a/src/mainboard/intel/tglrvp/Kconfig b/src/mainboard/intel/tglrvp/Kconfig
index 77a8afd87d..b8110dd458 100644
--- a/src/mainboard/intel/tglrvp/Kconfig
+++ b/src/mainboard/intel/tglrvp/Kconfig
@@ -21,9 +21,9 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_SPD_IN_CBFS
select SOC_INTEL_CSE_LITE_SKU
select MAINBOARD_HAS_TPM2
- select MAINBOARD_HAS_SPI_TPM_CR50
select SOC_INTEL_ENABLE_USB4_PCIE_RESOURCES
select SPI_TPM
+ select TPM_GOOGLE_CR50
config CHROMEOS
select EC_GOOGLE_CHROMEEC_SWITCHES if TGL_CHROME_EC
diff --git a/src/mainboard/intel/wtm2/Kconfig b/src/mainboard/intel/wtm2/Kconfig
index cf16b8a7b8..9977d3bd29 100644
--- a/src/mainboard/intel/wtm2/Kconfig
+++ b/src/mainboard/intel/wtm2/Kconfig
@@ -8,7 +8,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_OPTION_TABLE
select HAVE_ACPI_RESUME
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select INTEL_INT15
config VBOOT
diff --git a/src/mainboard/kontron/bsl6/Kconfig b/src/mainboard/kontron/bsl6/Kconfig
index 782f560744..588596cb62 100644
--- a/src/mainboard/kontron/bsl6/Kconfig
+++ b/src/mainboard/kontron/bsl6/Kconfig
@@ -10,7 +10,7 @@ config BOARD_KONTRON_BSL6_COMMON
select HAVE_ACPI_TABLES
select HAVE_OPTION_TABLE
select HAVE_CMOS_DEFAULT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select EC_KONTRON_KEMPLD
select MAINBOARD_HAS_LIBGFXINIT
select DRIVERS_I2C_NCT7802Y
diff --git a/src/mainboard/kontron/mal10/Kconfig b/src/mainboard/kontron/mal10/Kconfig
index 021e17140a..389f59fe9b 100644
--- a/src/mainboard/kontron/mal10/Kconfig
+++ b/src/mainboard/kontron/mal10/Kconfig
@@ -10,7 +10,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_CMOS_DEFAULT
select HAVE_OPTION_TABLE
select INTEL_GMA_HAVE_VBT
- select MAINBOARD_HAS_CRB_TPM
+ select CRB_TPM
select MAINBOARD_HAS_LIBGFXINIT
select ONBOARD_VGA_IS_PRIMARY
select SOC_INTEL_APOLLOLAKE
diff --git a/src/mainboard/lenovo/s230u/Kconfig b/src/mainboard/lenovo/s230u/Kconfig
index 08f82aa37c..c0e1f4475b 100644
--- a/src/mainboard/lenovo/s230u/Kconfig
+++ b/src/mainboard/lenovo/s230u/Kconfig
@@ -16,7 +16,7 @@ config BOARD_SPECIFIC_OPTIONS
select MAINBOARD_HAS_LIBGFXINIT
select GFX_GMA_PANEL_1_ON_LVDS
select SERIRQ_CONTINUOUS_MODE
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select HAVE_SPD_IN_CBFS
diff --git a/src/mainboard/lenovo/t410/Kconfig b/src/mainboard/lenovo/t410/Kconfig
index 333302ea80..cff876949e 100644
--- a/src/mainboard/lenovo/t410/Kconfig
+++ b/src/mainboard/lenovo/t410/Kconfig
@@ -15,7 +15,7 @@ config BOARD_SPECIFIC_OPTIONS
select INTEL_INT15
select HAVE_ACPI_RESUME
select DRIVERS_LENOVO_WACOM
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select DRIVERS_LENOVO_HYBRID_GRAPHICS
select INTEL_GMA_HAVE_VBT
diff --git a/src/mainboard/lenovo/t420/Kconfig b/src/mainboard/lenovo/t420/Kconfig
index 6f4988c03b..553438ffc7 100644
--- a/src/mainboard/lenovo/t420/Kconfig
+++ b/src/mainboard/lenovo/t420/Kconfig
@@ -17,7 +17,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_ACPI_RESUME
select INTEL_INT15
select DRIVERS_RICOH_RCE822
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select MAINBOARD_HAS_LIBGFXINIT
select GFX_GMA_PANEL_1_ON_LVDS
diff --git a/src/mainboard/lenovo/t420s/Kconfig b/src/mainboard/lenovo/t420s/Kconfig
index c46d4fc43c..1f715fdb9f 100644
--- a/src/mainboard/lenovo/t420s/Kconfig
+++ b/src/mainboard/lenovo/t420s/Kconfig
@@ -16,7 +16,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_CMOS_DEFAULT
select HAVE_ACPI_RESUME
select INTEL_INT15
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select MAINBOARD_HAS_LIBGFXINIT
select GFX_GMA_PANEL_1_ON_LVDS
diff --git a/src/mainboard/lenovo/t430/Kconfig b/src/mainboard/lenovo/t430/Kconfig
index 4a51562fee..64a73f3add 100644
--- a/src/mainboard/lenovo/t430/Kconfig
+++ b/src/mainboard/lenovo/t430/Kconfig
@@ -12,7 +12,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_ACPI_TABLES
select HAVE_OPTION_TABLE
select HAVE_CMOS_DEFAULT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select INTEL_INT15
select NORTHBRIDGE_INTEL_SANDYBRIDGE
diff --git a/src/mainboard/lenovo/t430s/Kconfig b/src/mainboard/lenovo/t430s/Kconfig
index dce078e91a..fe5b89598a 100644
--- a/src/mainboard/lenovo/t430s/Kconfig
+++ b/src/mainboard/lenovo/t430s/Kconfig
@@ -17,7 +17,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_CMOS_DEFAULT
select HAVE_ACPI_RESUME
select INTEL_INT15
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select MAINBOARD_HAS_LIBGFXINIT
select GFX_GMA_PANEL_1_ON_LVDS if BOARD_LENOVO_T430S
diff --git a/src/mainboard/lenovo/t440p/Kconfig b/src/mainboard/lenovo/t440p/Kconfig
index 6d5329c509..6c4f7b0661 100644
--- a/src/mainboard/lenovo/t440p/Kconfig
+++ b/src/mainboard/lenovo/t440p/Kconfig
@@ -11,12 +11,14 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_ACPI_TABLES
select HAVE_CMOS_DEFAULT
select HAVE_OPTION_TABLE
+ select MEMORY_MAPPED_TPM
+ select MAINBOARD_HAS_TPM1
select INTEL_GMA_HAVE_VBT
select INTEL_INT15
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_LPC_TPM
select MAINBOARD_HAS_TPM1
select MAINBOARD_USES_IFD_GBE_REGION
+ select MEMORY_MAPPED_TPM
select NO_UART_ON_SUPERIO
select NORTHBRIDGE_INTEL_HASWELL
select SERIRQ_CONTINUOUS_MODE
diff --git a/src/mainboard/lenovo/t520/Kconfig b/src/mainboard/lenovo/t520/Kconfig
index 039baa69e1..ecd9aa9f54 100644
--- a/src/mainboard/lenovo/t520/Kconfig
+++ b/src/mainboard/lenovo/t520/Kconfig
@@ -16,7 +16,7 @@ config BOARD_LENOVO_BASEBOARD_T520
select INTEL_INT15
select GFX_GMA_PANEL_1_ON_LVDS
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select DRIVERS_LENOVO_HYBRID_GRAPHICS
select INTEL_GMA_HAVE_VBT if BOARD_LENOVO_T520
diff --git a/src/mainboard/lenovo/t530/Kconfig b/src/mainboard/lenovo/t530/Kconfig
index 87be416622..b3b0989ee4 100644
--- a/src/mainboard/lenovo/t530/Kconfig
+++ b/src/mainboard/lenovo/t530/Kconfig
@@ -14,7 +14,7 @@ config BOARD_LENOVO_BASEBOARD_T530
select HAVE_CMOS_DEFAULT
select HAVE_ACPI_RESUME
select INTEL_INT15
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select DRIVERS_LENOVO_HYBRID_GRAPHICS
select MAINBOARD_HAS_LIBGFXINIT
diff --git a/src/mainboard/lenovo/w541/Kconfig b/src/mainboard/lenovo/w541/Kconfig
index b08ce0b31f..81a3b85192 100644
--- a/src/mainboard/lenovo/w541/Kconfig
+++ b/src/mainboard/lenovo/w541/Kconfig
@@ -13,7 +13,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_OPTION_TABLE
select INTEL_GMA_HAVE_VBT
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select MAINBOARD_USES_IFD_GBE_REGION
select NORTHBRIDGE_INTEL_HASWELL
diff --git a/src/mainboard/lenovo/x131e/Kconfig b/src/mainboard/lenovo/x131e/Kconfig
index b8fc4d6f56..916baa2b49 100644
--- a/src/mainboard/lenovo/x131e/Kconfig
+++ b/src/mainboard/lenovo/x131e/Kconfig
@@ -14,7 +14,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_CMOS_DEFAULT
select HAVE_ACPI_RESUME
select INTEL_INT15
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select MAINBOARD_HAS_LIBGFXINIT
select GFX_GMA_PANEL_1_ON_LVDS
diff --git a/src/mainboard/lenovo/x1_carbon_gen1/Kconfig b/src/mainboard/lenovo/x1_carbon_gen1/Kconfig
index ec5092fd39..f514e7c227 100644
--- a/src/mainboard/lenovo/x1_carbon_gen1/Kconfig
+++ b/src/mainboard/lenovo/x1_carbon_gen1/Kconfig
@@ -17,7 +17,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_ACPI_RESUME
select INTEL_INT15
select DRIVERS_RICOH_RCE822
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select MAINBOARD_HAS_LIBGFXINIT
select GFX_GMA_PANEL_1_ON_LVDS
diff --git a/src/mainboard/lenovo/x201/Kconfig b/src/mainboard/lenovo/x201/Kconfig
index af314961bb..6c174c5cc9 100644
--- a/src/mainboard/lenovo/x201/Kconfig
+++ b/src/mainboard/lenovo/x201/Kconfig
@@ -17,7 +17,7 @@ config BOARD_SPECIFIC_OPTIONS
select MAINBOARD_HAS_LIBGFXINIT
select SUPERIO_NSC_PC87382
select DRIVERS_LENOVO_WACOM
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select INTEL_GMA_HAVE_VBT
select MAINBOARD_USES_IFD_GBE_REGION
diff --git a/src/mainboard/lenovo/x220/Kconfig b/src/mainboard/lenovo/x220/Kconfig
index 61b3c1489e..d4b5bcae57 100644
--- a/src/mainboard/lenovo/x220/Kconfig
+++ b/src/mainboard/lenovo/x220/Kconfig
@@ -16,7 +16,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_ACPI_RESUME
select INTEL_INT15
select DRIVERS_RICOH_RCE822
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select MAINBOARD_HAS_LIBGFXINIT
select GFX_GMA_PANEL_1_ON_LVDS
diff --git a/src/mainboard/lenovo/x230/Kconfig b/src/mainboard/lenovo/x230/Kconfig
index cafdead858..a6fd796206 100644
--- a/src/mainboard/lenovo/x230/Kconfig
+++ b/src/mainboard/lenovo/x230/Kconfig
@@ -19,7 +19,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_ACPI_RESUME
select INTEL_INT15
select DRIVERS_RICOH_RCE822
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1 if BOARD_LENOVO_X230 || BOARD_LENOVO_X230T
select MAINBOARD_HAS_LIBGFXINIT
select GFX_GMA_PANEL_1_ON_LVDS if BOARD_LENOVO_X230 || BOARD_LENOVO_X230T
diff --git a/src/mainboard/libretrend/lt1000/Kconfig b/src/mainboard/libretrend/lt1000/Kconfig
index 2726a2ca93..249cf1ddfe 100644
--- a/src/mainboard/libretrend/lt1000/Kconfig
+++ b/src/mainboard/libretrend/lt1000/Kconfig
@@ -7,7 +7,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_ACPI_TABLES
select INTEL_GMA_HAVE_VBT
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select SOC_INTEL_SKYLAKE
select SPD_READ_BY_WORD
select SUPERIO_ITE_IT8786E
diff --git a/src/mainboard/ocp/deltalake/Kconfig b/src/mainboard/ocp/deltalake/Kconfig
index 737bc1d1ed..dbf4a2ed6d 100644
--- a/src/mainboard/ocp/deltalake/Kconfig
+++ b/src/mainboard/ocp/deltalake/Kconfig
@@ -14,7 +14,7 @@ config BOARD_SPECIFIC_OPTIONS
select VPD
select VPD_SMBIOS_VERSION
select IPMI_OCP
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM2
select OVERRIDE_UART_FOR_CONSOLE
diff --git a/src/mainboard/opencellular/elgon/Kconfig b/src/mainboard/opencellular/elgon/Kconfig
index 6c20295d1d..e9988695aa 100644
--- a/src/mainboard/opencellular/elgon/Kconfig
+++ b/src/mainboard/opencellular/elgon/Kconfig
@@ -6,11 +6,11 @@ config BOARD_SPECIFIC_OPTIONS
def_bool y
select BOARD_ROMSIZE_KB_16384
select COMMON_CBFS_SPI_WRAPPER
+ select I2C_TPM
select RTC
select SOC_CAVIUM_CN81XX
select SPI_FLASH
select SPI_FLASH_WINBOND
- select MAINBOARD_HAS_I2C_TPM_GENERIC
select MAINBOARD_HAS_TPM1
select MISSING_BOARD_RESET
diff --git a/src/mainboard/pcengines/apu1/Kconfig b/src/mainboard/pcengines/apu1/Kconfig
index d13c0ecd00..46f4ddec59 100644
--- a/src/mainboard/pcengines/apu1/Kconfig
+++ b/src/mainboard/pcengines/apu1/Kconfig
@@ -16,7 +16,7 @@ config BOARD_SPECIFIC_OPTIONS
select BOARD_ROMSIZE_KB_2048
select HAVE_SPD_IN_CBFS
select SEABIOS_ADD_SERCON_PORT_FILE if PAYLOAD_SEABIOS
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
config MAINBOARD_DIR
default "pcengines/apu1"
diff --git a/src/mainboard/pcengines/apu2/Kconfig b/src/mainboard/pcengines/apu2/Kconfig
index d82bf81d6c..dd6536c923 100644
--- a/src/mainboard/pcengines/apu2/Kconfig
+++ b/src/mainboard/pcengines/apu2/Kconfig
@@ -14,7 +14,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_ACPI_TABLES
select BOARD_ROMSIZE_KB_8192
select HAVE_SPD_IN_CBFS
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select SEABIOS_ADD_SERCON_PORT_FILE if PAYLOAD_SEABIOS
select PCIEXP_ASPM
select PCIEXP_CLK_PM
diff --git a/src/mainboard/prodrive/hermes/Kconfig b/src/mainboard/prodrive/hermes/Kconfig
index ae7b5f1269..49fb6c4c12 100644
--- a/src/mainboard/prodrive/hermes/Kconfig
+++ b/src/mainboard/prodrive/hermes/Kconfig
@@ -10,7 +10,7 @@ config BOARD_PRODRIVE_HERMES_BASEBOARD
select DRIVERS_ASPEED_AST2050
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_TPM2
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select INTEL_GMA_HAVE_VBT
select SOC_INTEL_COMMON_BLOCK_HDA_VERB
select ONBOARD_VGA_IS_PRIMARY
diff --git a/src/mainboard/protectli/vault_kbl/Kconfig b/src/mainboard/protectli/vault_kbl/Kconfig
index 3ad5ce65f7..310a744a65 100644
--- a/src/mainboard/protectli/vault_kbl/Kconfig
+++ b/src/mainboard/protectli/vault_kbl/Kconfig
@@ -11,7 +11,7 @@ config BOARD_SPECIFIC_OPTIONS
select SOC_INTEL_KABYLAKE
select SPI_FLASH_MACRONIX
select SUPERIO_ITE_IT8772F
- select MAINBOARD_HAS_CRB_TPM
+ select CRB_TPM
select HAVE_INTEL_PTT
select MAINBOARD_HAS_TPM2
diff --git a/src/mainboard/purism/librem_cnl/Kconfig.name b/src/mainboard/purism/librem_cnl/Kconfig.name
index cfe8626afc..ad22009059 100644
--- a/src/mainboard/purism/librem_cnl/Kconfig.name
+++ b/src/mainboard/purism/librem_cnl/Kconfig.name
@@ -13,7 +13,7 @@ config BOARD_PURISM_LIBREM_14
select BOARD_PURISM_BASEBOARD_LIBREM_CNL
select DRIVERS_I2C_HID
select EC_LIBREM_EC
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select SOC_INTEL_COMETLAKE_1
select SYSTEM_TYPE_LAPTOP
diff --git a/src/mainboard/purism/librem_skl/Kconfig b/src/mainboard/purism/librem_skl/Kconfig
index e20a002716..e094259a31 100644
--- a/src/mainboard/purism/librem_skl/Kconfig
+++ b/src/mainboard/purism/librem_skl/Kconfig
@@ -7,7 +7,7 @@ config BOARD_PURISM_BASEBOARD_LIBREM_SKL
select HAVE_ACPI_TABLES
select INTEL_GMA_HAVE_VBT
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select NO_UART_ON_SUPERIO
select SOC_INTEL_COMMON_BLOCK_HDA_VERB
diff --git a/src/mainboard/razer/blade_stealth_kbl/Kconfig b/src/mainboard/razer/blade_stealth_kbl/Kconfig
index b9ca09323e..9ff6343ff1 100644
--- a/src/mainboard/razer/blade_stealth_kbl/Kconfig
+++ b/src/mainboard/razer/blade_stealth_kbl/Kconfig
@@ -7,7 +7,7 @@ config BOARD_SPECIFIC_OPTIONS
select SUPERIO_ITE_IT8528E
select SOC_INTEL_KABYLAKE
select SOC_INTEL_COMMON_BLOCK_HDA_VERB
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM2
select MAINBOARD_HAS_LIBGFXINIT
select HAVE_SPD_IN_CBFS
diff --git a/src/mainboard/samsung/lumpy/Kconfig b/src/mainboard/samsung/lumpy/Kconfig
index d0574bbbed..eb8643eff9 100644
--- a/src/mainboard/samsung/lumpy/Kconfig
+++ b/src/mainboard/samsung/lumpy/Kconfig
@@ -5,7 +5,7 @@ config BOARD_SPECIFIC_OPTIONS
select SYSTEM_TYPE_LAPTOP
select BOARD_ROMSIZE_KB_8192
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select EC_SMSC_MEC1308
select HAVE_ACPI_RESUME
diff --git a/src/mainboard/samsung/stumpy/Kconfig b/src/mainboard/samsung/stumpy/Kconfig
index 2a706b992b..e123058a6d 100644
--- a/src/mainboard/samsung/stumpy/Kconfig
+++ b/src/mainboard/samsung/stumpy/Kconfig
@@ -4,7 +4,7 @@ config BOARD_SPECIFIC_OPTIONS
def_bool y
select BOARD_ROMSIZE_KB_8192
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM1
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES
diff --git a/src/mainboard/siemens/chili/Kconfig b/src/mainboard/siemens/chili/Kconfig
index f6e4914ba0..bc1c02747e 100644
--- a/src/mainboard/siemens/chili/Kconfig
+++ b/src/mainboard/siemens/chili/Kconfig
@@ -11,7 +11,7 @@ config BOARD_SIEMENS_CHILI_COMMON
select HAVE_OPTION_TABLE
select INTEL_GMA_HAVE_VBT
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM2
select MAINBOARD_USES_IFD_GBE_REGION
select SOC_INTEL_CANNONLAKE_PCH_H
diff --git a/src/mainboard/siemens/mc_apl1/variants/mc_apl2/Kconfig b/src/mainboard/siemens/mc_apl1/variants/mc_apl2/Kconfig
index af1a572631..933e594fb5 100644
--- a/src/mainboard/siemens/mc_apl1/variants/mc_apl2/Kconfig
+++ b/src/mainboard/siemens/mc_apl1/variants/mc_apl2/Kconfig
@@ -8,7 +8,7 @@ config BOARD_SPECIFIC_OPTIONS
select RX6110SA_DISABLE_ACPI
select DRIVER_SIEMENS_NC_FPGA
select MAINBOARD_HAS_TPM2
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select TPM_ON_FAST_SPI
select TPM_MEASURED_BOOT
select HAS_RECOVERY_MRC_CACHE
diff --git a/src/mainboard/siemens/mc_apl1/variants/mc_apl4/Kconfig b/src/mainboard/siemens/mc_apl1/variants/mc_apl4/Kconfig
index 53729c2e4c..5d3938b97d 100644
--- a/src/mainboard/siemens/mc_apl1/variants/mc_apl4/Kconfig
+++ b/src/mainboard/siemens/mc_apl1/variants/mc_apl4/Kconfig
@@ -6,7 +6,7 @@ config BOARD_SPECIFIC_OPTIONS
select DRIVER_INTEL_I210
select APL_SET_MIN_CLOCK_RATIO
select MAINBOARD_HAS_TPM2
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select TPM_ON_FAST_SPI
select DRIVERS_I2C_PTN3460
select TPM_MEASURED_BOOT
diff --git a/src/mainboard/siemens/mc_apl1/variants/mc_apl5/Kconfig b/src/mainboard/siemens/mc_apl1/variants/mc_apl5/Kconfig
index 00d65ce2ff..a012ae24ae 100644
--- a/src/mainboard/siemens/mc_apl1/variants/mc_apl5/Kconfig
+++ b/src/mainboard/siemens/mc_apl1/variants/mc_apl5/Kconfig
@@ -10,7 +10,7 @@ config BOARD_SPECIFIC_OPTIONS
select NC_FPGA_NOTIFY_CB_READY
select APL_SKIP_SET_POWER_LIMITS
select MAINBOARD_HAS_TPM2
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select TPM_ON_FAST_SPI
select DRIVERS_I2C_PTN3460
select TPM_MEASURED_BOOT
diff --git a/src/mainboard/siemens/mc_apl1/variants/mc_apl6/Kconfig b/src/mainboard/siemens/mc_apl1/variants/mc_apl6/Kconfig
index af8d058ee6..bfbe1dd414 100644
--- a/src/mainboard/siemens/mc_apl1/variants/mc_apl6/Kconfig
+++ b/src/mainboard/siemens/mc_apl1/variants/mc_apl6/Kconfig
@@ -10,7 +10,7 @@ config BOARD_SPECIFIC_OPTIONS
select NC_FPGA_NOTIFY_CB_READY
select APL_SKIP_SET_POWER_LIMITS
select MAINBOARD_HAS_TPM2
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select TPM_ON_FAST_SPI
select TPM_MEASURED_BOOT
select HAS_RECOVERY_MRC_CACHE
diff --git a/src/mainboard/siemens/mc_ehl/Kconfig b/src/mainboard/siemens/mc_ehl/Kconfig
index ef8373ecc4..e1d731883f 100644
--- a/src/mainboard/siemens/mc_ehl/Kconfig
+++ b/src/mainboard/siemens/mc_ehl/Kconfig
@@ -9,7 +9,7 @@ config BOARD_SIEMENS_BASEBOARD_MC_EHL
select DRIVER_SIEMENS_NC_FPGA
select NC_FPGA_NOTIFY_CB_READY
select MAINBOARD_HAS_TPM2
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select TPM_MEASURED_BOOT
select TPM_MEASURED_BOOT_INIT_BOOTBLOCK
select USE_SIEMENS_HWILIB
diff --git a/src/mainboard/starlabs/labtop/Kconfig b/src/mainboard/starlabs/labtop/Kconfig
index f8a5bc7de6..00c84d1e8b 100644
--- a/src/mainboard/starlabs/labtop/Kconfig
+++ b/src/mainboard/starlabs/labtop/Kconfig
@@ -19,7 +19,7 @@ config BOARD_STARLABS_LABTOP_CML
select EC_STARLABS_NEED_ITE_BIN
select HAVE_INTEL_PTT
select HAVE_SPD_IN_CBFS
- select MAINBOARD_HAS_CRB_TPM
+ select CRB_TPM
select MAINBOARD_HAS_LIBGFXINIT
select MAINBOARD_HAS_TPM2
select SOC_INTEL_COMETLAKE_1
@@ -32,7 +32,7 @@ config BOARD_STARLABS_STARBOOK_TGL
select EC_STARLABS_KBL_LEVELS
select EC_STARLABS_MAX_CHARGE
select EC_STARLABS_NEED_ITE_BIN
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM2
select PCIEXP_HOTPLUG_PREFETCH_MEM_BELOW_4G
select SOC_INTEL_COMMON_BLOCK_TCSS
diff --git a/src/mainboard/starlabs/lite/Kconfig b/src/mainboard/starlabs/lite/Kconfig
index ced67d9e43..14ddfc47fa 100644
--- a/src/mainboard/starlabs/lite/Kconfig
+++ b/src/mainboard/starlabs/lite/Kconfig
@@ -9,7 +9,7 @@ config BOARD_STARLABS_LITE_SERIES
select HAVE_INTEL_PTT
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
- select MAINBOARD_HAS_CRB_TPM
+ select CRB_TPM
select MAINBOARD_HAS_TPM2
select ONBOARD_VGA_IS_PRIMARY
select SOC_INTEL_COMMON_BLOCK_HDA
diff --git a/src/mainboard/supermicro/x11-lga1151-series/Kconfig b/src/mainboard/supermicro/x11-lga1151-series/Kconfig
index 10606559bd..d6183421a8 100644
--- a/src/mainboard/supermicro/x11-lga1151-series/Kconfig
+++ b/src/mainboard/supermicro/x11-lga1151-series/Kconfig
@@ -6,7 +6,7 @@ config BOARD_SUPERMICRO_BASEBOARD_X11_LGA1151_SERIES
select HAVE_CMOS_DEFAULT
select SOC_INTEL_KABYLAKE
select SKYLAKE_SOC_PCH_H
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select DRIVERS_ASPEED_AST2050
select SUPERIO_ASPEED_AST2400
select IPMI_KCS
diff --git a/src/mainboard/supermicro/x9sae/Kconfig b/src/mainboard/supermicro/x9sae/Kconfig
index 4afe85e6aa..0a60570054 100644
--- a/src/mainboard/supermicro/x9sae/Kconfig
+++ b/src/mainboard/supermicro/x9sae/Kconfig
@@ -12,7 +12,7 @@ config BOARD_SPECIFIC_OPTIONS
select INTEL_GMA_HAVE_VBT
select INTEL_INT15
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_USES_IFD_GBE_REGION
select NORTHBRIDGE_INTEL_SANDYBRIDGE
select SERIRQ_CONTINUOUS_MODE
diff --git a/src/mainboard/system76/addw1/Kconfig b/src/mainboard/system76/addw1/Kconfig
index 84fb63d2c3..510c408a74 100644
--- a/src/mainboard/system76/addw1/Kconfig
+++ b/src/mainboard/system76/addw1/Kconfig
@@ -16,7 +16,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_OPTION_TABLE
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM2
select NO_UART_ON_SUPERIO
select PCIEXP_HOTPLUG
diff --git a/src/mainboard/system76/bonw14/Kconfig b/src/mainboard/system76/bonw14/Kconfig
index a260b4b31b..b9aef5aa8b 100644
--- a/src/mainboard/system76/bonw14/Kconfig
+++ b/src/mainboard/system76/bonw14/Kconfig
@@ -13,7 +13,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_CMOS_DEFAULT
select HAVE_OPTION_TABLE
select INTEL_LPSS_UART_FOR_CONSOLE
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM2
select NO_UART_ON_SUPERIO
select PCIEXP_HOTPLUG
diff --git a/src/mainboard/system76/cml-u/Kconfig b/src/mainboard/system76/cml-u/Kconfig
index 2502c13431..2846843197 100644
--- a/src/mainboard/system76/cml-u/Kconfig
+++ b/src/mainboard/system76/cml-u/Kconfig
@@ -13,7 +13,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_OPTION_TABLE
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM2
select NO_UART_ON_SUPERIO
select PCIEXP_HOTPLUG
diff --git a/src/mainboard/system76/darp7/Kconfig b/src/mainboard/system76/darp7/Kconfig
index 960e5aebcc..033b4580aa 100644
--- a/src/mainboard/system76/darp7/Kconfig
+++ b/src/mainboard/system76/darp7/Kconfig
@@ -14,7 +14,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_OPTION_TABLE
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM2
select NO_UART_ON_SUPERIO
select PCIEXP_HOTPLUG
diff --git a/src/mainboard/system76/galp5/Kconfig b/src/mainboard/system76/galp5/Kconfig
index 98e32f7b5f..66d5b1ee5a 100644
--- a/src/mainboard/system76/galp5/Kconfig
+++ b/src/mainboard/system76/galp5/Kconfig
@@ -14,7 +14,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_OPTION_TABLE
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM2
select NO_UART_ON_SUPERIO
select PCIEXP_HOTPLUG
diff --git a/src/mainboard/system76/gaze15/Kconfig b/src/mainboard/system76/gaze15/Kconfig
index 4ecb107b95..e2ec7d95cc 100644
--- a/src/mainboard/system76/gaze15/Kconfig
+++ b/src/mainboard/system76/gaze15/Kconfig
@@ -14,7 +14,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_OPTION_TABLE
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM2
select NO_UART_ON_SUPERIO
select SOC_INTEL_CANNONLAKE_PCH_H
diff --git a/src/mainboard/system76/gaze16/Kconfig b/src/mainboard/system76/gaze16/Kconfig
index cc96d5fed7..3b3b77aeff 100644
--- a/src/mainboard/system76/gaze16/Kconfig
+++ b/src/mainboard/system76/gaze16/Kconfig
@@ -14,7 +14,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_OPTION_TABLE
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM2
select MAINBOARD_USES_IFD_GBE_REGION if BOARD_SYSTEM76_GAZE16_3060_B
select NO_UART_ON_SUPERIO
diff --git a/src/mainboard/system76/kbl-u/Kconfig b/src/mainboard/system76/kbl-u/Kconfig
index 518b885543..f5cb968871 100644
--- a/src/mainboard/system76/kbl-u/Kconfig
+++ b/src/mainboard/system76/kbl-u/Kconfig
@@ -9,7 +9,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_OPTION_TABLE
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM2
select NO_UART_ON_SUPERIO
select PCIEXP_HOTPLUG
diff --git a/src/mainboard/system76/lemp10/Kconfig b/src/mainboard/system76/lemp10/Kconfig
index a73242579a..aedfb14ea0 100644
--- a/src/mainboard/system76/lemp10/Kconfig
+++ b/src/mainboard/system76/lemp10/Kconfig
@@ -14,7 +14,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_SPD_IN_CBFS
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM2
select NO_UART_ON_SUPERIO
select PCIEXP_HOTPLUG
diff --git a/src/mainboard/system76/lemp9/Kconfig b/src/mainboard/system76/lemp9/Kconfig
index 1cbf31bb64..a41a970d49 100644
--- a/src/mainboard/system76/lemp9/Kconfig
+++ b/src/mainboard/system76/lemp9/Kconfig
@@ -14,7 +14,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_SPD_IN_CBFS
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM2
select NO_UART_ON_SUPERIO
select SOC_INTEL_COMETLAKE_1
diff --git a/src/mainboard/system76/oryp5/Kconfig b/src/mainboard/system76/oryp5/Kconfig
index e8215f4bdd..95faf82ebf 100644
--- a/src/mainboard/system76/oryp5/Kconfig
+++ b/src/mainboard/system76/oryp5/Kconfig
@@ -15,7 +15,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_OPTION_TABLE
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM2
select NO_UART_ON_SUPERIO
select SOC_INTEL_CANNONLAKE_PCH_H
diff --git a/src/mainboard/system76/oryp6/Kconfig b/src/mainboard/system76/oryp6/Kconfig
index a5cc553624..01d8a1a1a1 100644
--- a/src/mainboard/system76/oryp6/Kconfig
+++ b/src/mainboard/system76/oryp6/Kconfig
@@ -14,7 +14,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_CMOS_DEFAULT
select HAVE_OPTION_TABLE
select INTEL_GMA_HAVE_VBT
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM2
select NO_UART_ON_SUPERIO
select PCIEXP_HOTPLUG
diff --git a/src/mainboard/system76/oryp8/Kconfig b/src/mainboard/system76/oryp8/Kconfig
index 8e65b70ad0..72a90dd208 100644
--- a/src/mainboard/system76/oryp8/Kconfig
+++ b/src/mainboard/system76/oryp8/Kconfig
@@ -15,7 +15,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_OPTION_TABLE
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM2
select NO_UART_ON_SUPERIO
select PCIEXP_HOTPLUG
diff --git a/src/mainboard/system76/whl-u/Kconfig b/src/mainboard/system76/whl-u/Kconfig
index b865444726..5eea136543 100644
--- a/src/mainboard/system76/whl-u/Kconfig
+++ b/src/mainboard/system76/whl-u/Kconfig
@@ -13,7 +13,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_OPTION_TABLE
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
- select MAINBOARD_HAS_LPC_TPM
+ select MEMORY_MAPPED_TPM
select MAINBOARD_HAS_TPM2
select NO_UART_ON_SUPERIO
select PCIEXP_HOTPLUG
diff --git a/src/mainboard/up/squared/Kconfig b/src/mainboard/up/squared/Kconfig
index 7401c9570d..91b1cbb5df 100644
--- a/src/mainboard/up/squared/Kconfig
+++ b/src/mainboard/up/squared/Kconfig
@@ -10,7 +10,7 @@ config BOARD_SPECIFIC_OPTIONS
select BOARD_ROMSIZE_KB_16384
select ONBOARD_VGA_IS_PRIMARY
select MAINBOARD_HAS_LIBGFXINIT
- select MAINBOARD_HAS_CRB_TPM
+ select CRB_TPM
select HAVE_INTEL_PTT
select NO_UART_ON_SUPERIO
diff --git a/src/security/tpm/Kconfig b/src/security/tpm/Kconfig
index 4864f12545..fc339a2b3a 100644
--- a/src/security/tpm/Kconfig
+++ b/src/security/tpm/Kconfig
@@ -20,21 +20,14 @@ config NO_TPM
config TPM1
bool "TPM 1.2"
- depends on MAINBOARD_HAS_LPC_TPM || \
- MAINBOARD_HAS_I2C_TPM_GENERIC || \
- MAINBOARD_HAS_I2C_TPM_ATMEL
+ depends on I2C_TPM || MEMORY_MAPPED_TPM || SPI_TPM || CRB_TPM
depends on !MAINBOARD_HAS_TPM2
help
Select this option if your TPM uses the older TPM 1.2 protocol.
config TPM2
bool "TPM 2.0"
- depends on MAINBOARD_HAS_I2C_TPM_GENERIC || \
- MAINBOARD_HAS_LPC_TPM || \
- MAINBOARD_HAS_I2C_TPM_ATMEL || \
- MAINBOARD_HAS_I2C_TPM_CR50 || \
- MAINBOARD_HAS_SPI_TPM || \
- MAINBOARD_HAS_CRB_TPM
+ depends on I2C_TPM || MEMORY_MAPPED_TPM || SPI_TPM || CRB_TPM
depends on !MAINBOARD_HAS_TPM1
help
Select this option if your TPM uses the newer TPM 2.0 protocol.
@@ -77,7 +70,7 @@ config DEBUG_TPM
config TPM_RDRESP_NEED_DELAY
bool "Enable Delay Workaround for TPM"
default n
- depends on MAINBOARD_HAS_LPC_TPM
+ depends on MEMORY_MAPPED_TPM
help
Certain TPMs seem to need some delay when reading response
to work around a race-condition-related issue, possibly
diff --git a/src/security/tpm/Makefile.inc b/src/security/tpm/Makefile.inc
index c36183dd9b..8f633a89bf 100644
--- a/src/security/tpm/Makefile.inc
+++ b/src/security/tpm/Makefile.inc
@@ -1,4 +1,4 @@
-subdirs-$(CONFIG_TPM_CR50) += tss/vendor/cr50
+subdirs-$(CONFIG_TPM_GOOGLE) += tss/vendor/cr50
## TSS
diff --git a/src/security/tpm/tss/vendor/cr50/Kconfig b/src/security/tpm/tss/vendor/cr50/Kconfig
index c4ecdef2fd..f98b8efeb9 100644
--- a/src/security/tpm/tss/vendor/cr50/Kconfig
+++ b/src/security/tpm/tss/vendor/cr50/Kconfig
@@ -1,11 +1,21 @@
# SPDX-License-Identifier: GPL-2.0-only
-config TPM_CR50
+config TPM_GOOGLE
bool
- depends on TPM2
- default y if MAINBOARD_HAS_I2C_TPM_CR50 || MAINBOARD_HAS_SPI_TPM_CR50
-if TPM_CR50
+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
diff --git a/src/security/vboot/secdata_mock.c b/src/security/vboot/secdata_mock.c
index 5792b41633..57aed61a71 100644
--- a/src/security/vboot/secdata_mock.c
+++ b/src/security/vboot/secdata_mock.c
@@ -31,7 +31,7 @@ vb2_error_t antirollback_read_space_kernel(struct vb2_context *ctx)
/*
* The new kernel secdata v1 stores the last read EC hash, and reboots the
* device during EC software sync when that hash didn't match the currently
- * active hash on the EC (this is used with TPM_CR50 to support EC-EFS2 and
+ * active hash on the EC (this is used with TPM_GOOGLE to support EC-EFS2 and
* pretty much a no-op for other devices). Generally, of course the whole
* point of secdata is always that it persists across reboots, but with
* MOCK_SECDATA we can't do that. Previously we always happened to somewhat
diff --git a/src/security/vboot/secdata_tpm.c b/src/security/vboot/secdata_tpm.c
index 847a9597fb..450c681c06 100644
--- a/src/security/vboot/secdata_tpm.c
+++ b/src/security/vboot/secdata_tpm.c
@@ -384,8 +384,7 @@ static uint32_t _factory_initialize_tpm(struct vb2_context *ctx)
* Define and write zero-touch enrollment (ZTE) spaces. For Cr50 devices,
* these are set up elsewhere via TPM vendor commands.
*/
- if (CONFIG(CHROMEOS) && (!(CONFIG(MAINBOARD_HAS_SPI_TPM_CR50) ||
- CONFIG(MAINBOARD_HAS_I2C_TPM_CR50))))
+ if (CONFIG(CHROMEOS) && !(CONFIG(TPM_GOOGLE)))
RETURN_ON_FAILURE(setup_zte_spaces());
/* Define widevine counter space. No need to increment/write to the secure counters
@@ -613,7 +612,7 @@ uint32_t antirollback_read_space_firmware(struct vb2_context *ctx)
uint32_t antirollback_write_space_firmware(struct vb2_context *ctx)
{
- if (CONFIG(CR50_IMMEDIATELY_COMMIT_FW_SECDATA))
+ if (CONFIG(TPM_GOOGLE_IMMEDIATELY_COMMIT_FW_SECDATA))
tlcl_cr50_enable_nvcommits();
return safe_write(FIRMWARE_NV_INDEX, ctx->secdata_firmware,
VB2_SECDATA_FIRMWARE_SIZE);
@@ -632,7 +631,7 @@ uint32_t antirollback_write_space_kernel(struct vb2_context *ctx)
* recovery, software sync, or other special boot flows. When the AP
* wants to write, it is imporant to actually commit changes.
*/
- if (CONFIG(CR50_IMMEDIATELY_COMMIT_FW_SECDATA))
+ if (CONFIG(TPM_GOOGLE_IMMEDIATELY_COMMIT_FW_SECDATA))
tlcl_cr50_enable_nvcommits();
return safe_write(KERNEL_NV_INDEX, ctx->secdata_kernel, size);
diff --git a/src/security/vboot/vboot_logic.c b/src/security/vboot/vboot_logic.c
index 509169fc95..2230b5ab57 100644
--- a/src/security/vboot/vboot_logic.c
+++ b/src/security/vboot/vboot_logic.c
@@ -303,7 +303,7 @@ void verstage_main(void)
* If there is an communication error, a recovery reason will be set and
* vb2api_fw_phase1 will route us to recovery mode.
*/
- if (CONFIG(TPM_CR50))
+ if (CONFIG(TPM_GOOGLE))
check_boot_mode(ctx);
if (get_ec_is_trusted())
diff --git a/src/soc/intel/apollolake/Kconfig b/src/soc/intel/apollolake/Kconfig
index 08ddfa4ccf..b2235f8ec2 100644
--- a/src/soc/intel/apollolake/Kconfig
+++ b/src/soc/intel/apollolake/Kconfig
@@ -150,10 +150,10 @@ config VBOOT
config TPM_ON_FAST_SPI
bool
default n
- depends on MAINBOARD_HAS_LPC_TPM
+ depends on MEMORY_MAPPED_TPM
help
- TPM part is conntected on Fast SPI interface, but the LPC MMIO
- TPM transactions are decoded and serialized over the SPI interface.
+ TPM part is conntected on Fast SPI interface and is mapped to the
+ linear address space.
config PCR_BASE_ADDRESS
hex
diff --git a/src/soc/intel/common/Makefile.inc b/src/soc/intel/common/Makefile.inc
index ad987dddcc..43fc2f8146 100644
--- a/src/soc/intel/common/Makefile.inc
+++ b/src/soc/intel/common/Makefile.inc
@@ -20,11 +20,7 @@ ramstage-$(CONFIG_MMA) += mma.c
ramstage-y += vbt.c
ramstage-$(CONFIG_SOC_INTEL_COMMON_NHLT) += nhlt.c
-bootblock-$(CONFIG_TPM_CR50) += tpm_tis.c
-verstage-$(CONFIG_TPM_CR50) += tpm_tis.c
-romstage-$(CONFIG_TPM_CR50) += tpm_tis.c
-ramstage-$(CONFIG_TPM_CR50) += tpm_tis.c
-postcar-$(CONFIG_TPM_CR50) += tpm_tis.c
+all-$(CONFIG_TPM_GOOGLE) += tpm_tis.c
romstage-$(CONFIG_SOC_INTEL_COMMON_FSP_RESET) += fsp_reset.c
ramstage-$(CONFIG_SOC_INTEL_COMMON_FSP_RESET) += fsp_reset.c
diff --git a/src/soc/intel/skylake/acpi/systemagent.asl b/src/soc/intel/skylake/acpi/systemagent.asl
index 36d49327c6..1ca6232712 100644
--- a/src/soc/intel/skylake/acpi/systemagent.asl
+++ b/src/soc/intel/skylake/acpi/systemagent.asl
@@ -171,7 +171,7 @@ Method (_CRS, 0, Serialized)
0x00000000, PCH_PRESERVED_BASE_ADDRESS, 0xfe7fffff,
0x00000000, PCH_PRESERVED_BASE_SIZE)
-#if !CONFIG(TPM_CR50)
+#if !CONFIG(TPM_GOOGLE)
/* TPM Area (0xfed40000-0xfed44fff) */
DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
Cacheable, ReadWrite,
diff --git a/src/soc/intel/tigerlake/Kconfig b/src/soc/intel/tigerlake/Kconfig
index c0cf683d2c..ac175c4041 100644
--- a/src/soc/intel/tigerlake/Kconfig
+++ b/src/soc/intel/tigerlake/Kconfig
@@ -89,6 +89,7 @@ config CPU_SPECIFIC_OPTIONS
select USE_FSP_NOTIFY_PHASE_READY_TO_BOOT
select USE_FSP_NOTIFY_PHASE_END_OF_FIRMWARE
select SOC_INTEL_COMMON_BASECODE if SOC_INTEL_CSE_LITE_SKU
+ select CR50_USE_LONG_INTERRUPT_PULSES if TPM_GOOGLE_CR50
config MAX_CPUS
int
@@ -223,11 +224,6 @@ config SOC_INTEL_COMMON_LPSS_UART_CLK_N_VAL
hex
default 0x7fff
-# Tiger Lake SoC requires at least 100us interrupt pulses in order to guarantee detection
-# in all low power states. Cr50 TPM, if used, needs to be told to generate longer pulses.
-config TPM_CR50
- select CR50_USE_LONG_INTERRUPT_PULSES
-
config VBT_DATA_SIZE_KB
int
default 9
diff --git a/src/vendorcode/google/chromeos/Kconfig b/src/vendorcode/google/chromeos/Kconfig
index 780344cede..32af5538ae 100644
--- a/src/vendorcode/google/chromeos/Kconfig
+++ b/src/vendorcode/google/chromeos/Kconfig
@@ -22,10 +22,6 @@ config CHROMEOS
if CHROMEOS
-config CR50_IMMEDIATELY_COMMIT_FW_SECDATA
- bool
- default y if TPM_CR50
-
config CHROMEOS_RAMOOPS
bool "Reserve space for Chrome OS ramoops"
default y
diff --git a/src/vendorcode/google/chromeos/Makefile.inc b/src/vendorcode/google/chromeos/Makefile.inc
index c05d8e727a..ce77194070 100644
--- a/src/vendorcode/google/chromeos/Makefile.inc
+++ b/src/vendorcode/google/chromeos/Makefile.inc
@@ -9,7 +9,7 @@ ramstage-$(CONFIG_CHROMEOS_DISABLE_PLATFORM_HIERARCHY_ON_RESUME) += tpm2.c
ramstage-$(CONFIG_HAVE_REGULATORY_DOMAIN) += wrdd.c
ramstage-$(CONFIG_USE_SAR) += sar.c
ramstage-$(CONFIG_CHROMEOS_DSM_CALIB) += dsm_calib.c
-ramstage-$(CONFIG_TPM_CR50) += cr50_enable_update.c
+ramstage-$(CONFIG_TPM_GOOGLE) += cr50_enable_update.c
romstage-$(CONFIG_CHROMEOS_CSE_BOARD_RESET_OVERRIDE) += cse_board_reset.c
ramstage-$(CONFIG_CHROMEOS_CSE_BOARD_RESET_OVERRIDE) += cse_board_reset.c
diff --git a/src/vendorcode/google/chromeos/cse_board_reset.c b/src/vendorcode/google/chromeos/cse_board_reset.c
index 0b213a66de..08db7e2b28 100644
--- a/src/vendorcode/google/chromeos/cse_board_reset.c
+++ b/src/vendorcode/google/chromeos/cse_board_reset.c
@@ -16,7 +16,7 @@ void cse_board_reset(void)
int ret;
struct cr50_firmware_version version;
- if (CONFIG(MAINBOARD_HAS_SPI_TPM_CR50)) {
+ if (CONFIG(TPM2) && CONFIG(TPM_GOOGLE_CR50)) {
/* Initialize TPM and get the cr50 firmware version. */
ret = tlcl_lib_init();
if (ret != VB2_SUCCESS) {
@@ -36,6 +36,10 @@ void cse_board_reset(void)
(version.major >= 3 && version.minor >= 20))
return;
}
+ if (CONFIG(TPM_GOOGLE_TI50)) {
+ /* All versions of Ti50 firmware support the above PLTRST wiring. */
+ return;
+ }
printk(BIOS_INFO, "Initiating request to EC to trigger cold reset\n");
/*