summaryrefslogtreecommitdiff
path: root/src/mainboard/google/dedede/variants
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
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')
-rw-r--r--src/mainboard/google/dedede/variants/sasuke/Makefile.inc2
-rw-r--r--src/mainboard/google/dedede/variants/sasuke/gpio.c8
-rw-r--r--src/mainboard/google/dedede/variants/sasuke/overridetree.cb10
-rw-r--r--src/mainboard/google/dedede/variants/sasuke/variant.c23
4 files changed, 43 insertions, 0 deletions
diff --git a/src/mainboard/google/dedede/variants/sasuke/Makefile.inc b/src/mainboard/google/dedede/variants/sasuke/Makefile.inc
index eb2c9bc021..fd60a18b69 100644
--- a/src/mainboard/google/dedede/variants/sasuke/Makefile.inc
+++ b/src/mainboard/google/dedede/variants/sasuke/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/sasuke/gpio.c b/src/mainboard/google/dedede/variants/sasuke/gpio.c
index cdce7764e1..3654973bd7 100644
--- a/src/mainboard/google/dedede/variants/sasuke/gpio.c
+++ b/src/mainboard/google/dedede/variants/sasuke/gpio.c
@@ -5,9 +5,13 @@
/* Pad configuration in ramstage*/
static const struct pad_config gpio_table[] = {
+ /* A10 : WWAN_EN */
+ PAD_CFG_GPO(GPP_A10, 0, PLTRST),
/* A11 : TOUCH_RPT_EN ==> NC */
PAD_NC(GPP_A11, NONE),
+ /* B7 : PCIE_CLKREQ2_N ==> WWAN_SAR_DETECT_ODL*/
+ PAD_CFG_GPI_IRQ_WAKE(GPP_B7, NONE, DEEP, LEVEL, INVERT),
/* B8 : WLAN_CLKREQ_ODL ==> NC */
PAD_NC(GPP_B8, NONE),
@@ -16,6 +20,8 @@ static const struct pad_config gpio_table[] = {
/* C19 : AP_I2C_EMR_SCL ==> NC */
PAD_NC(GPP_C19, NONE),
+ /* D0 : WWAN_HOST_WAKE ==> WWAN_WDISABLE_L */
+ PAD_CFG_GPO(GPP_D0, 1, DEEP),
/* D1 : WLAN_PERST_L ==> NC */
PAD_NC(GPP_D1, NONE),
/* D3 : WLAN_PCIE_WAKE_ODL ==> NC */
@@ -53,6 +59,8 @@ static const struct pad_config gpio_table[] = {
PAD_NC(GPP_H6, NONE),
/* H7 : AP_I2C_CAM_SCL ==> NC */
PAD_NC(GPP_H7, NONE),
+ /* H17 : WWAN_RST_L */
+ PAD_CFG_GPO(GPP_H17, 1, PLTRST),
/* S2 : DMIC1_CLK ==> NC */
PAD_NC(GPP_S2, NONE),
diff --git a/src/mainboard/google/dedede/variants/sasuke/overridetree.cb b/src/mainboard/google/dedede/variants/sasuke/overridetree.cb
index 57cfbc7c4f..48a8e603ef 100644
--- a/src/mainboard/google/dedede/variants/sasuke/overridetree.cb
+++ b/src/mainboard/google/dedede/variants/sasuke/overridetree.cb
@@ -97,6 +97,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/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();
+}