From 5e772f25df799cb15cd73a93da48310e61cfdd58 Mon Sep 17 00:00:00 2001 From: Tim Crawford Date: Tue, 10 Oct 2023 11:00:56 -0600 Subject: [PATCH] tgl-u: Use PECI-over-eSPI implementation Using the legacy implementation causes the EC to lock up during S0ix opportunistic suspend. Switch them to the new PECI implementation. Signed-off-by: Tim Crawford --- src/board/system76/darp7/board.mk | 1 + src/board/system76/darp7/gpio.c | 5 ++--- src/board/system76/galp5/board.mk | 1 + src/board/system76/galp5/gpio.c | 5 ++--- src/board/system76/lemp10/board.mk | 1 + src/board/system76/lemp10/gpio.c | 5 ++--- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/board/system76/darp7/board.mk b/src/board/system76/darp7/board.mk index 364bed9ca..73e7012bb 100644 --- a/src/board/system76/darp7/board.mk +++ b/src/board/system76/darp7/board.mk @@ -8,6 +8,7 @@ CONFIG_EC_ITE_IT5570E=y # Enable eSPI CONFIG_BUS_ESPI=y +CONFIG_PECI_OVER_ESPI=y # Include keyboard KEYBOARD=15in_102 diff --git a/src/board/system76/darp7/gpio.c b/src/board/system76/darp7/gpio.c index ee4538fd0..5d3256941 100644 --- a/src/board/system76/darp7/gpio.c +++ b/src/board/system76/darp7/gpio.c @@ -68,8 +68,7 @@ void gpio_init() { GPDRD = BIT(5) | BIT(4); // USB_PWR_EN# GPDRE = BIT(3); - // H_PECI - GPDRF = BIT(6); + GPDRF = 0; // H_PROCHOT_EC# GPDRG = BIT(6); GPDRH = 0; @@ -172,7 +171,7 @@ void gpio_init() { // TP_DATA GPCRF5 = GPIO_ALT; // H_PECI - GPCRF6 = GPIO_ALT; + GPCRF6 = GPIO_IN | GPIO_DOWN; //TODO: CC_EN GPCRF7 = GPIO_IN | GPIO_UP; // VCCIN_AUX_PG diff --git a/src/board/system76/galp5/board.mk b/src/board/system76/galp5/board.mk index 3c40b2f4c..ea95ed4b5 100644 --- a/src/board/system76/galp5/board.mk +++ b/src/board/system76/galp5/board.mk @@ -8,6 +8,7 @@ CONFIG_EC_ITE_IT5570E=y # Enable eSPI CONFIG_BUS_ESPI=y +CONFIG_PECI_OVER_ESPI=y # Include keyboard KEYBOARD=14in_83 diff --git a/src/board/system76/galp5/gpio.c b/src/board/system76/galp5/gpio.c index 40f551333..ffab9f1cd 100644 --- a/src/board/system76/galp5/gpio.c +++ b/src/board/system76/galp5/gpio.c @@ -69,8 +69,7 @@ void gpio_init() { // PWR_BTN#, SMI# GPDRD = BIT(5) | BIT(4); GPDRE = 0; - // H_PECI - GPDRF = BIT(6); + GPDRF = 0; // H_PROCHOT_EC GPDRG = BIT(6); GPDRH = 0; @@ -173,7 +172,7 @@ void gpio_init() { // TP_DATA GPCRF5 = GPIO_ALT | GPIO_UP; // H_PECI - GPCRF6 = GPIO_ALT; + GPCRF6 = GPIO_IN | GPIO_DOWN; // CC_EN: TODO! GPCRF7 = GPIO_IN | GPIO_UP; // dGPU_GPIO8_OVERT diff --git a/src/board/system76/lemp10/board.mk b/src/board/system76/lemp10/board.mk index f052ed2c5..92683f1bb 100644 --- a/src/board/system76/lemp10/board.mk +++ b/src/board/system76/lemp10/board.mk @@ -8,6 +8,7 @@ CONFIG_EC_ITE_IT5570E=y # Enable eSPI CONFIG_BUS_ESPI=y +CONFIG_PECI_OVER_ESPI=y # Include keyboard KEYBOARD=14in_83 diff --git a/src/board/system76/lemp10/gpio.c b/src/board/system76/lemp10/gpio.c index 387868a24..b28ea8166 100644 --- a/src/board/system76/lemp10/gpio.c +++ b/src/board/system76/lemp10/gpio.c @@ -67,8 +67,7 @@ void gpio_init() { GPDRD = BIT(5) | BIT(4); // USB_PWR_EN# GPDRE = BIT(3); - // H_PECI - GPDRF = BIT(6); + GPDRF = 0; GPDRG = 0; GPDRH = 0; GPDRI = 0; @@ -170,7 +169,7 @@ void gpio_init() { // TP_DATA GPCRF5 = GPIO_ALT | GPIO_UP; // H_PECI - GPCRF6 = GPIO_ALT; + GPCRF6 = GPIO_IN | GPIO_DOWN; // CPU_C10_GATE# GPCRF7 = GPIO_IN | GPIO_DOWN; // VCCIN_AUX_PG