summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorTeddy Shih <teddyshih@ami.corp-partner.google.com>2022-01-24 11:34:26 +0800
committerFelix Held <felix-coreboot@felixheld.de>2022-02-15 17:26:57 +0000
commit49e669f955913c31ff526884d3973a6a7da7dca5 (patch)
treec5bfe95c4646db65217b4dc0da418f48cded2c8e /src/mainboard
parentbb052ced54903e8543cba74649ff412fbcb8e1c5 (diff)
mb/google/dedede/var/beadrix: Add LTE power off sequence
This change adds LTE power off sequence for beadrix. BUG=b:204882915 BRANCH=dedede TEST=FW_NAME=beadrix emerge-dedede coreboot Change-Id: I11370bf69438465d2230e2633044ba42685a152b Signed-off-by: Teddy Shih <teddyshih@ami.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/61329 Reviewed-by: Henry Sun <henrysun@google.com> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/dedede/variants/beadrix/Makefile.inc2
-rw-r--r--src/mainboard/google/dedede/variants/beadrix/variant.c23
2 files changed, 25 insertions, 0 deletions
diff --git a/src/mainboard/google/dedede/variants/beadrix/Makefile.inc b/src/mainboard/google/dedede/variants/beadrix/Makefile.inc
index e835c698be..11510200a5 100644
--- a/src/mainboard/google/dedede/variants/beadrix/Makefile.inc
+++ b/src/mainboard/google/dedede/variants/beadrix/Makefile.inc
@@ -3,3 +3,5 @@
romstage-y += memory.c
ramstage-y += gpio.c
+
+smm-y += variant.c
diff --git a/src/mainboard/google/dedede/variants/beadrix/variant.c b/src/mainboard/google/dedede/variants/beadrix/variant.c
new file mode 100644
index 0000000000..22caa069d3
--- /dev/null
+++ b/src/mainboard/google/dedede/variants/beadrix/variant.c
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <acpi/acpi.h>
+#include <baseboard/variants.h>
+#include <delay.h>
+#include <gpio.h>
+
+static void power_off_lte_module(void)
+{
+ gpio_output(GPP_H17, 0);
+ mdelay(20);
+ gpio_output(GPP_A10, 0);
+}
+
+void variant_smi_sleep(u8 slp_typ)
+{
+ /*
+ * Once the FW_CONFIG is provisioned, power off LTE module only under
+ * the situation where it is stuffed.
+ */
+ if (slp_typ == ACPI_S5)
+ power_off_lte_module();
+}