From d4475fc6f9e511a88bcdc4354ee61f3b70816a7f Mon Sep 17 00:00:00 2001 From: Seunghwan Kim Date: Fri, 15 Jun 2018 13:30:42 +0900 Subject: mb/google/poppy/variants/nautilus: Clear GPP_D0 when entering S5 Nautilus 2nd SKU has a leakage voltage at GPP_D0 in S5 state. We need to set this to LOW when entering S5 for clear the leakage. BUG=None BRANCH=poppy TEST=Verified the leakage is gone after update coreboot Change-Id: I054e707b2bc2e63d6f99cd2fd8a57be20615f111 Signed-off-by: Seunghwan Kim Reviewed-on: https://review.coreboot.org/27148 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- .../google/poppy/variants/nautilus/Makefile.inc | 2 ++ .../google/poppy/variants/nautilus/smihandler.c | 28 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 src/mainboard/google/poppy/variants/nautilus/smihandler.c diff --git a/src/mainboard/google/poppy/variants/nautilus/Makefile.inc b/src/mainboard/google/poppy/variants/nautilus/Makefile.inc index 2167282cc8..dba5ca68cb 100644 --- a/src/mainboard/google/poppy/variants/nautilus/Makefile.inc +++ b/src/mainboard/google/poppy/variants/nautilus/Makefile.inc @@ -10,3 +10,5 @@ romstage-y += memory.c ramstage-y += gpio.c ramstage-y += nhlt.c ramstage-y += mainboard.c + +smm-$(CONFIG_HAVE_SMI_HANDLER) += smihandler.c diff --git a/src/mainboard/google/poppy/variants/nautilus/smihandler.c b/src/mainboard/google/poppy/variants/nautilus/smihandler.c new file mode 100644 index 0000000000..e355b01453 --- /dev/null +++ b/src/mainboard/google/poppy/variants/nautilus/smihandler.c @@ -0,0 +1,28 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2018 Google Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include +#include + +#define LTE3_PWROFF_L GPP_D0 + +void variant_smi_sleep(u8 slp_typ) +{ + if (slp_typ == ACPI_S5) { + /* Turn off LTE module */ + gpio_set(LTE3_PWROFF_L, 0); + } +} -- cgit v1.2.3