diff options
author | Shon Wang <shon.wang@quanta.corp-partner.google.com> | 2023-08-30 14:34:08 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-09-05 12:49:31 +0000 |
commit | 6b69af8f774bb4131b61227cdb0bc30ff9025e01 (patch) | |
tree | 516c06972f47535d1fd786529229e5fe32f51168 /src/mainboard/google/brya/variants/yavilla | |
parent | 730c3ba6d81aa26b6c3438a613fe964fc9e4ea3f (diff) |
mb/google/nissa/var/yavilla: Disable SUSCLK based on fw_config
Disable SUSCLK for MT7922 based on FW_CONFIG to avoid power leakage.
SAR_ID_0 : Yaviks_Gfp2
SAR_ID_1 : Yaviks & Yavilla_MT7921
SAR_ID_2 : Yahiko_Gfp2
SAR_ID_3 : Yavilla_MT7922
BUG=b:298138654
BRANCH=firmware-nissa-15217.B
TEST=emerge-nissa coreboot
Change-Id: I2f191683d0623aa5dce815998a24fddce2a36b2c
Signed-off-by: Shon Wang <shon.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77559
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
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/google/brya/variants/yavilla')
-rw-r--r-- | src/mainboard/google/brya/variants/yavilla/fw_config.c | 11 | ||||
-rw-r--r-- | src/mainboard/google/brya/variants/yavilla/overridetree.cb | 3 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/mainboard/google/brya/variants/yavilla/fw_config.c b/src/mainboard/google/brya/variants/yavilla/fw_config.c index 7231885d2a..0f08a43b83 100644 --- a/src/mainboard/google/brya/variants/yavilla/fw_config.c +++ b/src/mainboard/google/brya/variants/yavilla/fw_config.c @@ -66,6 +66,11 @@ static const struct pad_config stylus_disable_pads[] = { PAD_NC_LOCK(GPP_F15, 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_probe(FW_CONFIG(DB_USB, DB_1C_LTE))) { @@ -88,5 +93,9 @@ void fw_config_gpio_padbased_override(struct pad_config *padbased_table) gpio_padbased_override(padbased_table, stylus_disable_pads, ARRAY_SIZE(stylus_disable_pads)); } - + 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/yavilla/overridetree.cb b/src/mainboard/google/brya/variants/yavilla/overridetree.cb index 86e784e42d..6d2b47f918 100644 --- a/src/mainboard/google/brya/variants/yavilla/overridetree.cb +++ b/src/mainboard/google/brya/variants/yavilla/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 |