Skip to content

Commit

Permalink
tgl-u: Use PECI-over-eSPI implementation
Browse files Browse the repository at this point in the history
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 <tcrawford@system76.com>
  • Loading branch information
crawfxrd committed Oct 10, 2023
1 parent a3fb9e1 commit 5e772f2
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/board/system76/darp7/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions src/board/system76/darp7/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/board/system76/galp5/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions src/board/system76/galp5/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/board/system76/lemp10/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions src/board/system76/lemp10/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5e772f2

Please sign in to comment.