You-Cheng Syu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30978
Change subject: google/kukui: Support I2C TPM and stop supporting SPI TPM ......................................................................
google/kukui: Support I2C TPM and stop supporting SPI TPM
Kukui TPM is going to move from SPI to I2C. This CL makes coreboot supports I2C TPM on Kukui. To make things easier, SPI TPM on Kukui is no longer supported.
BRANCH=none BUG=b:117916698 TEST=none
Change-Id: I194de167aa946d592ba20cff15f076739e5cc096 Signed-off-by: You-Cheng Syu youcheng@google.com --- M src/mainboard/google/kukui/Kconfig M src/mainboard/google/kukui/verstage.c 2 files changed, 9 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/30978/1
diff --git a/src/mainboard/google/kukui/Kconfig b/src/mainboard/google/kukui/Kconfig index 7635e5f..5de6b5b 100644 --- a/src/mainboard/google/kukui/Kconfig +++ b/src/mainboard/google/kukui/Kconfig @@ -35,7 +35,7 @@ select EC_GOOGLE_CHROMEEC select EC_GOOGLE_CHROMEEC_BOARDID select EC_GOOGLE_CHROMEEC_SPI - select MAINBOARD_HAS_SPI_TPM_CR50 if VBOOT + select MAINBOARD_HAS_I2C_TPM_CR50 if VBOOT select MAINBOARD_HAS_TPM2 if VBOOT
config MAINBOARD_DIR @@ -47,9 +47,13 @@ default "Kukui" if BOARD_GOOGLE_KUKUI default "Flapjack" if BOARD_GOOGLE_FLAPJACK
-config DRIVER_TPM_SPI_BUS +config DRIVER_TPM_I2C_BUS hex - default 0x0 + default 0x6 + +config DRIVER_TPM_I2C_ADDR + hex + default 0x50
config BOOT_DEVICE_SPI_FLASH_BUS int diff --git a/src/mainboard/google/kukui/verstage.c b/src/mainboard/google/kukui/verstage.c index 9bf93bf..f80fcc1 100644 --- a/src/mainboard/google/kukui/verstage.c +++ b/src/mainboard/google/kukui/verstage.c @@ -15,12 +15,12 @@
#include <security/vboot/vboot_common.h> #include <soc/gpio.h> -#include <soc/spi.h> +#include <soc/i2c.h>
#include "gpio.h"
void verstage_mainboard_init(void) { - mtk_spi_init(CONFIG_DRIVER_TPM_SPI_BUS, SPI_PAD0_MASK, 1 * MHz); + mtk_i2c_bus_init(CONFIG_DRIVER_TPM_I2C_BUS); gpio_eint_configure(CR50_IRQ, IRQ_TYPE_EDGE_RISING); }