From f0b6b30c46049e9849474965c87c83e7540e25dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Niew=C3=B6hner?= Date: Sun, 19 Jul 2020 18:43:27 +0200 Subject: mb/system76/lemp9: enable TPM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit L140CU has a TPM2 connected via SPI. Add the TPM device to the devicetree and enable it. According to Intel doc#615170-001, PIRQ is required for SPI TPM to work. Since the TPM is connected to GPP_A7, enable NF1 (PIRQA#) and set it as TPM interrupt in Kconfig. Note: The PCH maps either LPC TPM or SPI TPM to the same address and handles either LPC or SPI communication transparently. Thus we can use MAINBOARD_HAS_LPC_TPM here, which implements TPM via that address. Tested, but only polling works currently, because there is some upstream issue with the tpm_tis module in current Linux kernels. [1] [1] https://bugzilla.redhat.com/show_bug.cgi?id=1770021 Signed-off-by: Michael Niewöhner Change-Id: I26d3b396fe1e99368e18fd3a6a9f02e3585b9f6e Reviewed-on: https://review.coreboot.org/c/coreboot/+/43641 Reviewed-by: Felix Singer Tested-by: build bot (Jenkins) --- src/mainboard/system76/lemp9/Kconfig | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'src/mainboard/system76/lemp9/Kconfig') diff --git a/src/mainboard/system76/lemp9/Kconfig b/src/mainboard/system76/lemp9/Kconfig index 3431de1988..ef7c89af2e 100644 --- a/src/mainboard/system76/lemp9/Kconfig +++ b/src/mainboard/system76/lemp9/Kconfig @@ -10,9 +10,8 @@ config BOARD_SPECIFIC_OPTIONS select GENERIC_SPD_BIN select INTEL_GMA_HAVE_VBT select INTEL_LPSS_UART_FOR_CONSOLE -# Chip select 2 is not yet supported by intel fast_spi -# select MAINBOARD_HAS_SPI_TPM_CR50 -# select MAINBOARD_HAS_TPM2 + select MAINBOARD_HAS_LPC_TPM + select MAINBOARD_HAS_TPM2 select NO_UART_ON_SUPERIO select SOC_INTEL_COMETLAKE select SOC_INTEL_COMMON_BLOCK_HDA @@ -77,17 +76,12 @@ config VGA_BIOS_ID string default "8086,9b41" +config TPM_PIRQ + hex + default 0x10 # GPP_A7/PIRQA# + config POST_DEVICE bool default n -# Chip select 2 is not yet supported by intel fast_spi -#config DRIVER_TPM_SPI_BUS -# hex -# default 0x0 -# -#config DRIVER_TPM_SPI_CHIP -# int -# default 2 - endif -- cgit v1.2.3