From 7903cb8540f83e9beca9386681ab6232eb288527 Mon Sep 17 00:00:00 2001 From: Jae Hyun Yoo Date: Wed, 25 Mar 2020 15:04:26 -0700 Subject: [PATCH] AST2600: Add TPM pulse trigger This commit adds TPM pulse trigger into u-boot booting. Signed-off-by: Jae Hyun Yoo --- board/aspeed/ast2600_intel/intel.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c index 25c61d1a806c..cd90597221ea 100644 --- a/board/aspeed/ast2600_intel/intel.c +++ b/board/aspeed/ast2600_intel/intel.c @@ -193,6 +193,21 @@ static void set_gpio_default_state(void) AST_GPIO_BASE | GPIO_020); } +void enable_onboard_tpm(void) +{ +#define GPIO_C2 BIT(18) + + writel(readl(AST_GPIO_BASE | GPIO_004) | GPIO_C2, + AST_GPIO_BASE | GPIO_004); + writel(readl(AST_GPIO_BASE | GPIO_000) | GPIO_C2, + AST_GPIO_BASE | GPIO_000); + + mdelay(50); + + writel(readl(AST_GPIO_BASE | GPIO_000) & ~GPIO_C2, + AST_GPIO_BASE | GPIO_000); +} + void espi_init(void); int arch_interrupt_init_early(void); @@ -228,6 +243,8 @@ int board_early_init_r(void) espi_init(); + enable_onboard_tpm(); + return 0; } -- 2.7.4