From d4bf7211ca72a6fe579f2d4bfadd64a6b3ef3f2d Mon Sep 17 00:00:00 2001 From: Jeremy Compostella Date: Thu, 26 Oct 2023 09:48:20 -0700 Subject: mb/google/rex/var/rex0: Configure EN_WWAN_PWR GPIO based on CBI GPP_B17 (aka. EN_WWAN_PWR) should be kept low when the device does not have a WWAN module. TEST=Power consumption drops to 0 in S0iX Change-Id: I95150c20c98b037a47827a7b83e4373c6e9070e3 Signed-off-by: Jeremy Compostella Reviewed-on: https://review.coreboot.org/c/coreboot/+/78684 Reviewed-by: Sukumar Ghorai Reviewed-by: Subrata Banik Tested-by: build bot (Jenkins) Reviewed-by: Kapil Porwal --- src/mainboard/google/rex/variants/rex0/fw_config.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/mainboard') diff --git a/src/mainboard/google/rex/variants/rex0/fw_config.c b/src/mainboard/google/rex/variants/rex0/fw_config.c index 35a4fd9320..60dd6bf3c3 100644 --- a/src/mainboard/google/rex/variants/rex0/fw_config.c +++ b/src/mainboard/google/rex/variants/rex0/fw_config.c @@ -126,6 +126,10 @@ static const struct pad_config uwb_gspi1_disable_pads[] = { PAD_NC(GPP_F20, NONE), }; +static const struct pad_config wwan_disable_pads[] = { + PAD_CFG_GPO(GPP_B17, 0, DEEP) /* EN_WWAN_PWR */ +}; + void fw_config_gpio_padbased_override(struct pad_config *padbased_table) { if (!fw_config_is_provisioned()) { @@ -180,4 +184,9 @@ void fw_config_gpio_padbased_override(struct pad_config *padbased_table) printk(BIOS_INFO, "Disabling UWB (absent or misconfigured)\n"); GPIO_PADBASED_OVERRIDE(padbased_table, uwb_gspi1_disable_pads); } + + if (fw_config_probe(FW_CONFIG(CELLULAR, CELLULAR_ABSENT))) { + printk(BIOS_INFO, "Configure GPIOs for no cellular.\n"); + GPIO_PADBASED_OVERRIDE(padbased_table, wwan_disable_pads); + } } -- cgit v1.2.3