summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeunghwan Kim <sh_.kim@samsung.com>2018-06-15 13:30:42 +0900
committerFurquan Shaikh <furquan@google.com>2018-06-21 01:47:32 +0000
commitd4475fc6f9e511a88bcdc4354ee61f3b70816a7f (patch)
tree9e8d9a35fd80bcf710a08d6591549e1f504656b4
parente5a9e60fc5ca4a4cb000e6992090ab7b0acd9d05 (diff)
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 <sh_.kim@samsung.com> Reviewed-on: https://review.coreboot.org/27148 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
-rw-r--r--src/mainboard/google/poppy/variants/nautilus/Makefile.inc2
-rw-r--r--src/mainboard/google/poppy/variants/nautilus/smihandler.c28
2 files changed, 30 insertions, 0 deletions
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 <arch/acpi.h>
+#include <baseboard/variants.h>
+#include <gpio.h>
+
+#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);
+ }
+}