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>
This commit is contained in:
Teddy Shih 2022-03-15 14:57:28 +08:00 committed by Felix Held
parent 85a09ef99b
commit 2bd4c98c42
2 changed files with 18 additions and 1 deletions

View File

@ -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);

View File

@ -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