blob: edad150afe6a356f88a569ee7332777cecec0e69 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
From 627e49e75963fb372f1d6cd2297c8f73d6ec91e0 Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
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 <jae.hyun.yoo@intel.com>
---
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 e1fd06a142b9..63af3d0f9034 100644
--- a/board/aspeed/ast2600_intel/intel.c
+++ b/board/aspeed/ast2600_intel/intel.c
@@ -215,6 +215,21 @@ static void set_gpio_default_state(void)
AST_GPIO_BASE | GPIO_024);
}
+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);
+}
+
static void timer_handler(void *regs)
{
printf("+");
@@ -245,6 +260,8 @@ int board_early_init_r(void)
debug("board_early_init_r\n");
/* timer_enable(0, 1, timer_handler); */
+ enable_onboard_tpm();
+
return 0;
}
--
2.17.1
|