summaryrefslogtreecommitdiff
path: root/src/mainboard/google/dedede/variants/sasuke/variant.c
diff options
context:
space:
mode:
authorSeunghwan Kim <sh_.kim@samsung.corp-partner.google.com>2021-01-06 17:26:35 +0900
committerPatrick Georgi <pgeorgi@google.com>2021-01-19 09:05:35 +0000
commit14d0a6a982d4d53705355ad31d0eeb960d33194c (patch)
treec3e4f56881930d7d6a6c224a07ffcfc0423e4756 /src/mainboard/google/dedede/variants/sasuke/variant.c
parent5aa09de155779a22d24759c97eb4ae8bcf6d7eb7 (diff)
mb/google/dedede/var/sasuke: Add LTE modem support
This change enables LTE modem for sasuke. - Add LTE modem device into devicetree - Add GPIO control for LTE modem power on and off BUG=177177967 TEST=Built and verified modem device existence with lsusb Change-Id: I34ba8ab00b73f24d1786ab014e9981b172a63a27 Signed-off-by: Seunghwan Kim <sh_.kim@samsung.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/49163 Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/dedede/variants/sasuke/variant.c')
-rw-r--r--src/mainboard/google/dedede/variants/sasuke/variant.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/mainboard/google/dedede/variants/sasuke/variant.c b/src/mainboard/google/dedede/variants/sasuke/variant.c
new file mode 100644
index 0000000000..22caa069d3
--- /dev/null
+++ b/src/mainboard/google/dedede/variants/sasuke/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();
+}