From 64b82be3e3a7c6682b9b22b2ec5b5396f3e21512 Mon Sep 17 00:00:00 2001 From: Maulik V Vaghela Date: Wed, 27 Feb 2019 12:06:26 +0530 Subject: mb/google/hatch: Add GPIO programming for GPP_C0 to GPP_C7 coreboot did not program all GPIOs from C0 to C7 correctly which are SMBUS GPIO. Some of the GPIOs are left in default mode which is native function but we need to configure as GPIO mode and provide proper configuration as per schematic. After fixing GPIO, CSME power gating issue also gets fixed since SMBUS was not getting idle due to GPIO configuration and CSME was not getting power gated due to SMBUS. BUG=b:123702553 BRANCH=none TEST=Check on hatch board. CSME was not getting power gated for s0ix. After applying this patch CSME is power gated now Change-Id: I5c6b9310dcc7bade0023abd5524781ce71df28be Signed-off-by: Maulik V Vaghela Reviewed-on: https://review.coreboot.org/c/31640 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/mainboard/google/hatch/variants/baseboard/gpio.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/mainboard/google/hatch/variants/baseboard/gpio.c b/src/mainboard/google/hatch/variants/baseboard/gpio.c index b88f459b0d..857204e34e 100644 --- a/src/mainboard/google/hatch/variants/baseboard/gpio.c +++ b/src/mainboard/google/hatch/variants/baseboard/gpio.c @@ -45,10 +45,22 @@ static const struct pad_config gpio_table[] = { PAD_CFG_NF(GPP_B17, NONE, DEEP, NF1), /* H1_SLAVE_SPI_MOSI_R */ PAD_CFG_NF(GPP_B18, NONE, DEEP, NF1), - /* TOUCHSCREEN_DIS_L */ - PAD_CFG_GPO(GPP_C4, 0, DEEP), + /* GPP_C0 => NC */ + PAD_NC(GPP_C0, NONE), /* PCIE_14_WLAN_WAKE_ODL */ PAD_CFG_GPI_SCI_LOW(GPP_C1, NONE, DEEP, EDGE_SINGLE), + /* GPP_C2 => NC */ + PAD_NC(GPP_C2, NONE), + /* WLAN_OFF_L */ + PAD_CFG_GPO(GPP_C3, 1, DEEP), + /* TOUCHSCREEN_DIS_L */ + PAD_CFG_GPO(GPP_C4, 1, DEEP), + /* GPP_C5 => NC */ + PAD_NC(GPP_C5, NONE), + /* PEN_PDCT_OD_L */ + PAD_CFG_GPI(GPP_C6, NONE, DEEP), + /* PEN_IRQ_OD_L */ + PAD_CFG_GPI_APIC(GPP_C7, NONE, DEEP, LEVEL, NONE), /* GPP_C10_TP */ PAD_NC(GPP_C10, DN_20K), /* GPP_C11_TP */ -- cgit v1.2.3