Patrick Georgi merged this change.

View Change

Approvals: build bot (Jenkins): Verified Patrick Georgi: Looks good to me, approved Furquan Shaikh: Looks good to me, approved Shelley Chen: Looks good to me, approved
mb/google/hatch: Kohaku: Re-setup dual-routing of EMR_GARAGE_DET

The pinctrl driver in the linux kernel automatically turns off SCI
routing for all GPIOs exported via ACPI, so this patch sets up
dual-routing of the EMR_GARAGE_DET signal so that one can be used
for IRQs and one for the SCI wake.

Change-Id: Iadeb4502c5a98a72ba651bdcad626609656c196f
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34780
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Shelley Chen <shchen@google.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
---
M src/mainboard/google/hatch/variants/baseboard/gpio.c
M src/mainboard/google/hatch/variants/kohaku/gpio.c
M src/mainboard/google/hatch/variants/kohaku/overridetree.cb
3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/mainboard/google/hatch/variants/baseboard/gpio.c b/src/mainboard/google/hatch/variants/baseboard/gpio.c
index 5666d1c..38d44f3 100644
--- a/src/mainboard/google/hatch/variants/baseboard/gpio.c
+++ b/src/mainboard/google/hatch/variants/baseboard/gpio.c
@@ -30,7 +30,7 @@
PAD_CFG_GPI_INT(GPP_A6, NONE, PLTRST, LEVEL),
/* A7 : PP3300_SOC_A */
PAD_NC(GPP_A7, NONE),
- /* A8 : PEN_GARAGE_DET_L */
+ /* A8 : PEN_GARAGE_DET_L (wake) */
PAD_CFG_GPI_GPIO_DRIVER_SCI(GPP_A8, NONE, DEEP, LEVEL, NONE),
/* A9 : ESPI_CLK */
/* A10 : FPMCU_PCH_BOOT1 */
diff --git a/src/mainboard/google/hatch/variants/kohaku/gpio.c b/src/mainboard/google/hatch/variants/kohaku/gpio.c
index bc9df38..c157178 100644
--- a/src/mainboard/google/hatch/variants/kohaku/gpio.c
+++ b/src/mainboard/google/hatch/variants/kohaku/gpio.c
@@ -25,6 +25,8 @@
PAD_NC(GPP_A6, NONE),
/* A10 : PEN_RESET_ODL */
PAD_CFG_GPO(GPP_A10, 1, DEEP),
+ /* A16 : EMR_GARAGE_DET (notification) */
+ PAD_CFG_GPI_APIC(GPP_A16, NONE, PLTRST, LEVEL, NONE),
/* A17 : PIRQA# ==> NC */
PAD_NC(GPP_A17, NONE),
/* A18 : ISH_GP0 ==> NC */
diff --git a/src/mainboard/google/hatch/variants/kohaku/overridetree.cb b/src/mainboard/google/hatch/variants/kohaku/overridetree.cb
index 57429ad..13025c8 100644
--- a/src/mainboard/google/hatch/variants/kohaku/overridetree.cb
+++ b/src/mainboard/google/hatch/variants/kohaku/overridetree.cb
@@ -112,7 +112,8 @@
end
chip drivers/generic/gpio_keys
register "name" = ""PENH""
- register "gpio" = "ACPI_GPIO_INPUT_ACTIVE_LOW(GPP_A8)"
+ # GPP_A16 is the IRQ source, and GPP_A8 is the wake source
+ register "gpio" = "ACPI_GPIO_INPUT_ACTIVE_LOW(GPP_A16)"
register "key.wake" = "GPE0_DW0_08"
register "key.wakeup_event_action" = "EV_ACT_DEASSERTED"
register "key.dev_name" = ""EJCT""

To view, visit change 34780. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iadeb4502c5a98a72ba651bdcad626609656c196f
Gerrit-Change-Number: 34780
Gerrit-PatchSet: 2
Gerrit-Owner: Tim Wawrzynczak <twawrzynczak@chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan@google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Paul Fagerburg <pfagerburg@chromium.org>
Gerrit-Reviewer: Philip Chen <philipchen@google.com>
Gerrit-Reviewer: Shelley Chen <shchen@google.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak@chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged