From e7821e8de00fa673f75d620fa320ce7629ef2ce1 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Thu, 16 Sep 2021 19:58:20 -0700 Subject: mb/google/dedede: Clean up LTE device enabling On some dedede variants, USB port 2.3/3.3 might be connected to either LTE device or Type-A external port depending upon FW_CONFIG. Commit 856b579 ("mb/google/dedede/var/kracko: Update LTE USB port configuration") enabled Type-A external port by default in override tree and updated the config dynamically for LTE USB device if FW_CONFIG indicated support for it. This was required because sconfig lacked the support for multiple override devices. Commit b9c22e0 ("util/sconfig: Compare probe conditions for override device match") fixed this behavior in sconfig and now we can add multiple override devices using different FW_CONFIG probe statements in override tree. Hence, this change moves the LTE USB device to override tree for metaknight, kracko and drawcia variants. In addition to that, drawcia needs to be update reset_gpio depending upon board_id. Thus, alias `lte_usb2` is used in drawcia override tree to fix the reset_gpio for older boards i.e. board_id <= 9. Change-Id: Ie5b205594680d9c2b8543c5c99325d95620cafd2 Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/c/coreboot/+/57742 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak Reviewed-by: Karthik Ramasubramanian --- .../google/dedede/variants/metaknight/Makefile.inc | 1 - .../dedede/variants/metaknight/overridetree.cb | 27 ++++++++++++++++++---- .../google/dedede/variants/metaknight/ramstage.c | 11 --------- 3 files changed, 23 insertions(+), 16 deletions(-) delete mode 100644 src/mainboard/google/dedede/variants/metaknight/ramstage.c (limited to 'src/mainboard/google/dedede/variants/metaknight') diff --git a/src/mainboard/google/dedede/variants/metaknight/Makefile.inc b/src/mainboard/google/dedede/variants/metaknight/Makefile.inc index 2479ae9e66..67a7ab235a 100644 --- a/src/mainboard/google/dedede/variants/metaknight/Makefile.inc +++ b/src/mainboard/google/dedede/variants/metaknight/Makefile.inc @@ -1,6 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only ramstage-y += gpio.c -ramstage-y += ramstage.c smm-y += variant.c diff --git a/src/mainboard/google/dedede/variants/metaknight/overridetree.cb b/src/mainboard/google/dedede/variants/metaknight/overridetree.cb index d4c9ecaf4d..725750b654 100644 --- a/src/mainboard/google/dedede/variants/metaknight/overridetree.cb +++ b/src/mainboard/google/dedede/variants/metaknight/overridetree.cb @@ -109,12 +109,24 @@ chip soc/intel/jasperlake chip drivers/usb/acpi device usb 0.0 on chip drivers/usb/acpi - register "desc" = ""Multi-use Port"" + register "desc" = ""LTE"" + register "type" = "UPC_TYPE_INTERNAL" + register "group" = "ACPI_PLD_GROUP(2, 2)" + 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 2.3 on + probe DB_PORTS DB_PORTS_LTE_HDMI + end + end + chip drivers/usb/acpi + register "desc" = ""Right Type-A Port"" register "type" = "UPC_TYPE_A" register "group" = "ACPI_PLD_GROUP(2, 2)" device usb 2.3 on probe DB_PORTS DB_PORTS_1A_HDMI - probe DB_PORTS DB_PORTS_LTE_HDMI end end chip drivers/usb/acpi @@ -128,12 +140,19 @@ chip soc/intel/jasperlake device usb 2.6 on end end chip drivers/usb/acpi - register "desc" = ""Multi-use Port"" + register "desc" = ""LTE"" + register "type" = "UPC_TYPE_INTERNAL" + register "group" = "ACPI_PLD_GROUP(2, 2)" + device usb 3.3 on + probe DB_PORTS DB_PORTS_LTE_HDMI + end + end + chip drivers/usb/acpi + register "desc" = ""Right Type-A Port"" register "type" = "UPC_TYPE_USB3_A" register "group" = "ACPI_PLD_GROUP(2, 2)" device usb 3.3 on probe DB_PORTS DB_PORTS_1A_HDMI - probe DB_PORTS DB_PORTS_LTE_HDMI end end end diff --git a/src/mainboard/google/dedede/variants/metaknight/ramstage.c b/src/mainboard/google/dedede/variants/metaknight/ramstage.c deleted file mode 100644 index 0faaec140a..0000000000 --- a/src/mainboard/google/dedede/variants/metaknight/ramstage.c +++ /dev/null @@ -1,11 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ - -#include - -static struct acpi_gpio lte_reset_gpio = ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_H17); -static struct acpi_gpio lte_enable_gpio = ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_A10); - -void variant_devtree_update(void) -{ - update_lte_device(<e_reset_gpio, <e_enable_gpio); -} -- cgit v1.2.3