mb/google/dedede/var/cret: Enable/disable LTE function based on FW_CONFIG
Enable/disable LTE function based on LTE bit of FW_CONFIG. The LTE function settings are included GPIO settings, USB port settings and power off sequence. BUG=b:187797408 BRANCH=dedede TEST=Build and test the change on cret. Signed-off-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com> Change-Id: Ib926e99aaf9df433a7cff71180ee55431d69f718 Reviewed-on: https://review.coreboot.org/c/coreboot/+/54057 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
This commit is contained in:
parent
2b97ea153a
commit
1e0f77fa03
|
@ -17,6 +17,10 @@ fw_config
|
||||||
option RT1015_I2C 2
|
option RT1015_I2C 2
|
||||||
option RT1015P_AUTO 3
|
option RT1015P_AUTO 3
|
||||||
end
|
end
|
||||||
|
field LTE 11
|
||||||
|
option LTE_ABSENT 0
|
||||||
|
option LTE_PRESENT 1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
chip soc/intel/jasperlake
|
chip soc/intel/jasperlake
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
#include <baseboard/gpio.h>
|
#include <baseboard/gpio.h>
|
||||||
#include <baseboard/variants.h>
|
#include <baseboard/variants.h>
|
||||||
|
#include <bootstate.h>
|
||||||
|
#include <fw_config.h>
|
||||||
|
|
||||||
/* Pad configuration in ramstage */
|
/* Pad configuration in ramstage */
|
||||||
static const struct pad_config override_gpio_table[] = {
|
static const struct pad_config override_gpio_table[] = {
|
||||||
|
@ -59,8 +61,21 @@ static const struct pad_config override_gpio_table[] = {
|
||||||
PAD_NC(GPP_G7, NONE),
|
PAD_NC(GPP_G7, NONE),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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)
|
const struct pad_config *variant_override_gpio_table(size_t *num)
|
||||||
{
|
{
|
||||||
*num = ARRAY_SIZE(override_gpio_table);
|
*num = ARRAY_SIZE(override_gpio_table);
|
||||||
return override_gpio_table;
|
return override_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);
|
||||||
|
|
|
@ -57,7 +57,9 @@ chip soc/intel/jasperlake
|
||||||
chip drivers/usb/acpi
|
chip drivers/usb/acpi
|
||||||
register "desc" = ""LTE""
|
register "desc" = ""LTE""
|
||||||
register "type" = "UPC_TYPE_INTERNAL"
|
register "type" = "UPC_TYPE_INTERNAL"
|
||||||
device usb 2.3 on end
|
device usb 2.3 on
|
||||||
|
probe LTE LTE_PRESENT
|
||||||
|
end
|
||||||
end
|
end
|
||||||
chip drivers/usb/acpi
|
chip drivers/usb/acpi
|
||||||
register "desc" = ""Camera (UFC)""
|
register "desc" = ""Camera (UFC)""
|
||||||
|
@ -82,7 +84,9 @@ chip soc/intel/jasperlake
|
||||||
register "enable_gpio" =
|
register "enable_gpio" =
|
||||||
"ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_A10)"
|
"ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_A10)"
|
||||||
register "enable_delay_ms" = "20"
|
register "enable_delay_ms" = "20"
|
||||||
device usb 3.3 on end
|
device usb 3.3 on
|
||||||
|
probe LTE LTE_PRESENT
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue