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 6b0f858e2dda7afce82797835f950e3501b3046d Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Date: Fri, 29 Mar 2019 12:30:20 -0700
Subject: [PATCH] Add TPM enable pulse triggering
This commit adds onboard TPM enable pulse triggering.
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
---
board/aspeed/ast-g5/ast-g5-intel.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/board/aspeed/ast-g5/ast-g5-intel.c b/board/aspeed/ast-g5/ast-g5-intel.c
index adc6d10..55afa09 100644
--- a/board/aspeed/ast-g5/ast-g5-intel.c
+++ b/board/aspeed/ast-g5/ast-g5-intel.c
@@ -53,8 +53,8 @@ static const GPIOValue gpio_table[] = {
GPIO_DEBOUNCE_8MS},
/* Enable Pulse -- pin D6 */
- [GPIO_ENABLE_TPM_PULSE] = {PORT_PIN(GPIO_PORT_D, GPIO_PIN_6),
- GPIO_CFG_DEFAULT, 0, GPIO_DEBOUNCE_8MS},
+ [GPIO_ENABLE_TPM_PULSE] = {TPM_EN_PULSE_PORT_PIN, GPCFG_OUTPUT_EN, 0,
+ GPIO_DEBOUNCE_NONE},
};
#define LPC_SNOOP_ADDR 0x80
@@ -232,6 +232,13 @@ void id_led_control(int id, int action)
gpio_set_value(s_led_info[id].gpio, s_led_info[id].state);
}
+static void enable_onboard_tpm(void)
+{
+ gpio_set_value(GPIO_ENABLE_TPM_PULSE, 1);
+ mdelay(50);
+ gpio_set_value(GPIO_ENABLE_TPM_PULSE, 0);
+}
+
static void timer8_irq_handler(void *regs)
{
int i;
@@ -488,6 +495,7 @@ void ast_g5_intel(void)
espi_init();
sgpio_init();
timer8_init();
+ enable_onboard_tpm();
if (intel_force_firmware_jumper_enabled()) {
id_led_control(GPIO_AMBER_LED, EIDLED_On);
kcs_init();
|