summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
authorTeddy Shih <teddyshih@ami.corp-partner.google.com>2022-03-15 14:57:28 +0800
committerFelix Held <felix-coreboot@felixheld.de>2022-03-23 14:59:31 +0000
commit2bd4c98c42c63883fc5bca9e687d5f5fb7776ccb (patch)
tree77b484ec70d6ca90f6f2cfba586a78fc88533b1b /src/mainboard/google
parent85a09ef99b56ec4e7398efd1d72b388d92435286 (diff)
mb/google/dedede/var/beadrix: Enable LTE function by FW_CONFIG option
Enable/disable LTE function based on LTE field of FW_CONFIG. 1. GPIO control 2. USB port setting BUG=b:213582491 BRANCH=dedede TEST=FW_NAME=beadrix emerge-dedede coreboot Change-Id: Icea44992e2e3195d1fd9a888f5ce4650f82280bb Signed-off-by: Teddy Shih <teddyshih@ami.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/62801 Reviewed-by: Henry Sun <henrysun@google.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/dedede/variants/beadrix/gpio.c15
-rw-r--r--src/mainboard/google/dedede/variants/beadrix/overridetree.cb4
2 files changed, 18 insertions, 1 deletions
diff --git a/src/mainboard/google/dedede/variants/beadrix/gpio.c b/src/mainboard/google/dedede/variants/beadrix/gpio.c
index 0732355657..57573ccd38 100644
--- a/src/mainboard/google/dedede/variants/beadrix/gpio.c
+++ b/src/mainboard/google/dedede/variants/beadrix/gpio.c
@@ -2,6 +2,8 @@
#include <baseboard/gpio.h>
#include <baseboard/variants.h>
+#include <bootstate.h>
+#include <fw_config.h>
/* Pad configuration in ramstage */
static const struct pad_config gpio_table[] = {
@@ -69,8 +71,21 @@ static const struct pad_config gpio_table[] = {
PAD_CFG_GPO(GPP_H17, 0, PLTRST),
};
+static const struct pad_config lte_disable_pads[] = {
+ PAD_NC(GPP_A10, NONE),
+ PAD_NC(GPP_D0, NONE),
+ PAD_NC(GPP_H17, NONE),
+};
+
const struct pad_config *variant_override_gpio_table(size_t *num)
{
*num = ARRAY_SIZE(gpio_table);
return gpio_table;
}
+
+static void fw_config_handle(void *unused)
+{
+ if (!fw_config_probe(FW_CONFIG(LTE, LTE_PRESENT)))
+ gpio_configure_pads(lte_disable_pads, ARRAY_SIZE(lte_disable_pads));
+}
+BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL);
diff --git a/src/mainboard/google/dedede/variants/beadrix/overridetree.cb b/src/mainboard/google/dedede/variants/beadrix/overridetree.cb
index 7f2d62fa42..d5b37d4550 100644
--- a/src/mainboard/google/dedede/variants/beadrix/overridetree.cb
+++ b/src/mainboard/google/dedede/variants/beadrix/overridetree.cb
@@ -97,7 +97,9 @@ chip soc/intel/jasperlake
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
+ device usb 3.3 on
+ probe LTE LTE_PRESENT
+ end
end
end
end