summaryrefslogtreecommitdiff
path: root/src/mainboard/google/rex
diff options
context:
space:
mode:
authorJeremy Compostella <jeremy.compostella@intel.com>2023-10-26 09:48:20 -0700
committerMatt DeVillier <matt.devillier@amd.corp-partner.google.com>2023-10-28 20:56:11 +0000
commitd4bf7211ca72a6fe579f2d4bfadd64a6b3ef3f2d (patch)
treeee292c53b9f6cebe44c1ad05bc1fd2b7391b0b9c /src/mainboard/google/rex
parent0ec65daf7dd45b23170c0c1c95bde011fe6a752e (diff)
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 <jeremy.compostella@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78684 Reviewed-by: Sukumar Ghorai <sukumar.ghorai@intel.com> Reviewed-by: Subrata Banik <subratabanik@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Diffstat (limited to 'src/mainboard/google/rex')
-rw-r--r--src/mainboard/google/rex/variants/rex0/fw_config.c9
1 files changed, 9 insertions, 0 deletions
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);
+ }
}