summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorWisley Chen <wisley.chen@quanta.corp-partner.google.com>2023-08-22 16:03:05 +0800
committerMartin L Roth <gaumless@gmail.com>2023-08-26 21:11:00 +0000
commit8e42ebeea2c3046c9951bf6d79ca13aa0d27b56e (patch)
tree6e35be1c7af3a856c9742937cfab3d3735ccc09b /src/mainboard
parentb792f6a2b92e7b60c3c9216e6926d36b7dd94c8a (diff)
mb/google/nissa/var/yaviks: Disable SUSCLK based on fw_config
Disable SUSCLK for MT7922 based on FW_CONFIG to avoid power leakage. BUG=b:296511904, b:294456574 BRANCH=firmware-nissa-15217.B TEST=build and verified by EE Change-Id: I9a6bf0ab7cc77f95e0d64f1380eac9e022fc08e4 Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77383 Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/brya/variants/yaviks/fw_config.c11
-rw-r--r--src/mainboard/google/brya/variants/yaviks/overridetree.cb3
2 files changed, 14 insertions, 0 deletions
diff --git a/src/mainboard/google/brya/variants/yaviks/fw_config.c b/src/mainboard/google/brya/variants/yaviks/fw_config.c
index c0f0d8ca5e..c889c43cdf 100644
--- a/src/mainboard/google/brya/variants/yaviks/fw_config.c
+++ b/src/mainboard/google/brya/variants/yaviks/fw_config.c
@@ -61,6 +61,11 @@ static const struct pad_config sd_disable_pads[] = {
PAD_NC_LOCK(GPP_H13, NONE, LOCK_CONFIG),
};
+static const struct pad_config disable_wifi_pch_susclk[] = {
+ /* GPD8 ==> NC */
+ PAD_NC(GPD8, NONE),
+};
+
void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
{
if (fw_config_is_provisioned() && !fw_config_probe(FW_CONFIG(STORAGE, STORAGE_EMMC))) {
@@ -83,4 +88,10 @@ void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
gpio_padbased_override(padbased_table, sd_disable_pads,
ARRAY_SIZE(sd_disable_pads));
}
+ /* SAR_ID_3 for MT7922 */
+ if (fw_config_probe(FW_CONFIG(WIFI_SAR_ID, SAR_ID_3))) {
+ printk(BIOS_INFO, "Disable PCH SUSCLK.\n");
+ gpio_padbased_override(padbased_table, disable_wifi_pch_susclk,
+ ARRAY_SIZE(disable_wifi_pch_susclk));
+ }
}
diff --git a/src/mainboard/google/brya/variants/yaviks/overridetree.cb b/src/mainboard/google/brya/variants/yaviks/overridetree.cb
index 2dc7ddf590..fff0627d2e 100644
--- a/src/mainboard/google/brya/variants/yaviks/overridetree.cb
+++ b/src/mainboard/google/brya/variants/yaviks/overridetree.cb
@@ -7,6 +7,9 @@ fw_config
end
field WIFI_SAR_ID 2 3
option SAR_ID_0 0
+ option SAR_ID_1 1
+ option SAR_ID_2 2
+ option SAR_ID_3 3
end
field STYLUS 9
option STYLUS_ABSENT 0