From 5430d013bf78aef220092b1bb5e3ce069753b0e4 Mon Sep 17 00:00:00 2001 From: Shelley Chen Date: Wed, 2 May 2018 15:49:41 -0700 Subject: mb/google/poppy/variants/nami: Invert polarity of EMR_GARAGE_DET# This gpio should be active low, but is not currently configured that way. Changing gpio configuration to reflect that. BUG=b:73121017, b:77941823 BRANCH=None TEST=iotools mmio_read32 0xfdae0588 (GPP_E1) Make sure that when pen is ejected, gpio is low and when pen is inserted, gpio is high. Also tested that wake upon pen eject is working. Change-Id: Ic49eea6412c3378dca39a3338b43df12bc27037d Signed-off-by: Shelley Chen Reviewed-on: https://review.coreboot.org/26017 Reviewed-by: Furquan Shaikh Tested-by: build bot (Jenkins) --- src/mainboard/google/poppy/variants/nami/devicetree.cb | 6 +++--- src/mainboard/google/poppy/variants/nami/gpio.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mainboard/google/poppy/variants/nami/devicetree.cb b/src/mainboard/google/poppy/variants/nami/devicetree.cb index 0eba56e0da..1cc2a5e3bc 100644 --- a/src/mainboard/google/poppy/variants/nami/devicetree.cb +++ b/src/mainboard/google/poppy/variants/nami/devicetree.cb @@ -301,11 +301,11 @@ chip soc/intel/skylake end chip drivers/generic/gpio_keys register "name" = ""PENH"" - register "gpio" = "ACPI_GPIO_INPUT_ACTIVE_LOW(GPP_E8)" - register "key.dev_name" = ""EJCT"" + register "gpio" = "ACPI_GPIO_INPUT_ACTIVE_HIGH(GPP_E8)" + register "key.dev_name" = ""INST"" register "key.linux_code" = "SW_PEN_INSERTED" register "key.linux_input_type" = "EV_SW" - register "key.label" = ""pen_eject"" + register "key.label" = ""pen_insert"" device generic 0 on end end end # I2C #2 diff --git a/src/mainboard/google/poppy/variants/nami/gpio.c b/src/mainboard/google/poppy/variants/nami/gpio.c index 927a530a2c..6398d2d046 100644 --- a/src/mainboard/google/poppy/variants/nami/gpio.c +++ b/src/mainboard/google/poppy/variants/nami/gpio.c @@ -210,8 +210,8 @@ static const struct pad_config gpio_table[] = { /* E0 : SATAXPCI0 ==> H1_PCH_INT_ODL */ PAD_CFG_GPI_APIC_INVERT(GPP_E0, NONE, PLTRST), - /* E1 : SATAXPCIE1 ==> PEN_EJECT_ODL - for wake event */ - PAD_CFG_GPI_ACPI_SCI(GPP_E1, NONE, DEEP, NONE), + /* E1 : SATAXPCIE1 ==> EMR_GARAGE_DET# - for wake event */ + PAD_CFG_GPI_ACPI_SCI(GPP_E1, NONE, DEEP, INVERT), /* E2 : SATAXPCIE2 ==> WLAN_OFF# */ PAD_CFG_GPO(GPP_E2, 1, DEEP), /* E3 : CPU_GP0 ==> TRACKPAD_INT# */ @@ -224,7 +224,7 @@ static const struct pad_config gpio_table[] = { PAD_CFG_NC(GPP_E6), /* E7 : CPU_GP1 ==> TOUCHSCREEN_INT# */ PAD_CFG_GPI_APIC(GPP_E7, NONE, PLTRST), - /* E8 : SATALED# ==> PEN_EJECT_ODL - for notification */ + /* E8 : SATALED# ==> EMR_GARAGE_DET# - for notification */ PAD_CFG_GPI_GPIO_DRIVER(GPP_E8, NONE, DEEP), /* E9 : USB2_OCO# ==> USB_C0_OC# */ PAD_CFG_NF(GPP_E9, NONE, DEEP, NF1), -- cgit v1.2.3