Teddy Shih has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/62801 )
Change subject: mb/google/dedede/var/beadrix: Enable LTE function by FW_CONFIG option ......................................................................
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 --- M src/mainboard/google/dedede/variants/beadrix/gpio.c M src/mainboard/google/dedede/variants/beadrix/overridetree.cb 2 files changed, 18 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/01/62801/1
diff --git a/src/mainboard/google/dedede/variants/beadrix/gpio.c b/src/mainboard/google/dedede/variants/beadrix/gpio.c index 0732355..57573cc 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 @@ 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 7f2d62f..d5b37d4 100644 --- a/src/mainboard/google/dedede/variants/beadrix/overridetree.cb +++ b/src/mainboard/google/dedede/variants/beadrix/overridetree.cb @@ -97,7 +97,9 @@ 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