Attention is currently required from: Johnny Lin, Morgan Jang.
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/85510?usp=email )
Change subject: mainboard/ocp/tiogapass: Enable TPM ......................................................................
mainboard/ocp/tiogapass: Enable TPM
Add support for the optional TPM. When GPP_A22 is low a TPM is installed.
TEST: Found a working TPM 2.0 SLB9670 on ocp/tiogapass.
Change-Id: I970033981a265eb0094bc91fc070487b34972a5a Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/mainboard/ocp/tiogapass/Kconfig M src/mainboard/ocp/tiogapass/devicetree.cb M src/mainboard/ocp/tiogapass/ramstage.c 3 files changed, 17 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/85510/1
diff --git a/src/mainboard/ocp/tiogapass/Kconfig b/src/mainboard/ocp/tiogapass/Kconfig index 8bf7e79..a1ff82f 100644 --- a/src/mainboard/ocp/tiogapass/Kconfig +++ b/src/mainboard/ocp/tiogapass/Kconfig @@ -14,6 +14,8 @@ select SOC_INTEL_SKYLAKE_SP select SUPERIO_ASPEED_AST2400 select UART_OVERRIDE_BAUDRATE + select MEMORY_MAPPED_TPM + select MAINBOARD_HAS_TPM2 select MAINBOARD_USES_IFD_GBE_REGION select MAINBOARD_USES_IFD_10GBE_0_REGION select VPD diff --git a/src/mainboard/ocp/tiogapass/devicetree.cb b/src/mainboard/ocp/tiogapass/devicetree.cb index 37e740a..427694a 100644 --- a/src/mainboard/ocp/tiogapass/devicetree.cb +++ b/src/mainboard/ocp/tiogapass/devicetree.cb @@ -82,6 +82,9 @@ chip drivers/ipmi/ocp # OCP specific IPMI porting device pnp ca2.1 on end end + chip drivers/pc80/tpm # TPM + device pnp 0c31.0 alias tpm on end + end end # Intel Corporation C621 Series Chipset LPC/eSPI Controller device pci 1f.1 hidden end # p2sb device pci 1f.2 on end # Intel Corporation C620 Series Chipset Family Power Management Controller diff --git a/src/mainboard/ocp/tiogapass/ramstage.c b/src/mainboard/ocp/tiogapass/ramstage.c index a07edb8..fbc5e92 100644 --- a/src/mainboard/ocp/tiogapass/ramstage.c +++ b/src/mainboard/ocp/tiogapass/ramstage.c @@ -3,8 +3,10 @@ #include <cpu/x86/smm.h> #include <drivers/ipmi/ipmi_ops.h> #include <drivers/ocp/dmi/ocp_dmi.h> +#include <gpio.h> #include <soc/ramstage.h> #include <soc/smmrelocate.h> +#include <static.h>
extern struct fru_info_str fru_strings;
@@ -165,8 +167,18 @@ t->count = smbios_add_oem_string(t->eos, TBF); }
+WEAK_DEV_PTR(tpm); + static void mainboard_enable(struct device *dev) { + struct device *tpm = DEV_PTR(tpm); + + gpio_input(GPP_A22); + if (tpm) + tpm->enabled = !gpio_get(GPP_A22); + + printk(BIOS_DEBUG, "TPM present: %d\n", !gpio_get(GPP_A22)); + dev->ops->get_smbios_strings = tp_oem_smbios_strings; read_fru_areas(CONFIG_BMC_KCS_BASE, CONFIG_FRU_DEVICE_ID, 0, &fru_strings); #if CONFIG(GENERATE_SMBIOS_TABLES)