summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTao Xia <xiatao5@huaqin.corp-partner.google.com>2021-02-20 17:59:37 +0800
committerPatrick Georgi <pgeorgi@google.com>2021-02-24 11:29:20 +0000
commit096426b457a3522d6c005e0efe0be24b89dad232 (patch)
tree4f1e85b89cfae86e4abb572813bf7da4e15d35f7
parente747e8557e7c63df5e3664a82a5d2d2456bd9a30 (diff)
downloadcoreboot-096426b457a3522d6c005e0efe0be24b89dad232.tar.xz
mb/google/dedede/var/sasukette: Adding LTE module support into devicetree and
associated GPIO configuartion Adding LTE module support into devicetree and associated GPIO configuartion. BUG=b:177385043 BRANCH=dedede TEST=LTE function is OK Signed-off-by: Tao Xia <xiatao5@huaqin.corp-partner.google.com> Change-Id: I4d91045176fd6413ac6a5eed70289a5668e5b94f Reviewed-on: https://review.coreboot.org/c/coreboot/+/50985 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
-rw-r--r--src/mainboard/google/dedede/variants/sasukette/Makefile.inc2
-rw-r--r--src/mainboard/google/dedede/variants/sasukette/gpio.c9
-rw-r--r--src/mainboard/google/dedede/variants/sasukette/overridetree.cb10
-rw-r--r--src/mainboard/google/dedede/variants/sasukette/variant.c23
4 files changed, 44 insertions, 0 deletions
diff --git a/src/mainboard/google/dedede/variants/sasukette/Makefile.inc b/src/mainboard/google/dedede/variants/sasukette/Makefile.inc
index eb2c9bc021..fd60a18b69 100644
--- a/src/mainboard/google/dedede/variants/sasukette/Makefile.inc
+++ b/src/mainboard/google/dedede/variants/sasukette/Makefile.inc
@@ -1,3 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-or-later
ramstage-y += gpio.c
+
+smm-y += variant.c
diff --git a/src/mainboard/google/dedede/variants/sasukette/gpio.c b/src/mainboard/google/dedede/variants/sasukette/gpio.c
index 0f5b6d292b..d9b1307928 100644
--- a/src/mainboard/google/dedede/variants/sasukette/gpio.c
+++ b/src/mainboard/google/dedede/variants/sasukette/gpio.c
@@ -5,8 +5,17 @@
/* Pad configuration in ramstage*/
static const struct pad_config gpio_table[] = {
+ /* A10 : WWAN_EN */
+ PAD_CFG_GPO(GPP_A10, 1, PWROK),
+
+ /* B7 : PCIE_CLKREQ2_N ==> WWAN_SAR_DETECT_ODL*/
+ PAD_CFG_GPI_IRQ_WAKE(GPP_B7, NONE, DEEP, LEVEL, INVERT),
+
/* D15 : EN_PP3300_CAMERA */
PAD_CFG_GPO(GPP_D15, 1, PLTRST),
+
+ /* H17 : WWAN_RST_L */
+ PAD_CFG_GPO(GPP_H17, 0, PLTRST),
};
const struct pad_config *variant_override_gpio_table(size_t *num)
diff --git a/src/mainboard/google/dedede/variants/sasukette/overridetree.cb b/src/mainboard/google/dedede/variants/sasukette/overridetree.cb
index 6e69b33edf..2b310ce529 100644
--- a/src/mainboard/google/dedede/variants/sasukette/overridetree.cb
+++ b/src/mainboard/google/dedede/variants/sasukette/overridetree.cb
@@ -51,6 +51,16 @@ chip soc/intel/jasperlake
register "enable_delay_ms" = "20"
device usb 2.5 on end
end
+ chip drivers/usb/acpi
+ register "desc" = ""LTE""
+ register "type" = "UPC_TYPE_INTERNAL"
+ register "has_power_resource" = "1"
+ register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_H17)"
+ register "reset_off_delay_ms" = "20"
+ register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_A10)"
+ register "enable_delay_ms" = "20"
+ device usb 3.3 on end
+ end
end
end
end # USB xHCI
diff --git a/src/mainboard/google/dedede/variants/sasukette/variant.c b/src/mainboard/google/dedede/variants/sasukette/variant.c
new file mode 100644
index 0000000000..22caa069d3
--- /dev/null
+++ b/src/mainboard/google/dedede/variants/sasukette/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();
+}