diff options
author | Alan Huang <alan-huang@quanta.corp-partner.google.com> | 2022-03-29 19:08:23 +0800 |
---|---|---|
committer | Paul Fagerburg <pfagerburg@chromium.org> | 2022-04-01 13:45:38 +0000 |
commit | 47b7904d78ff2f0eb002edea99a3b761ccde962b (patch) | |
tree | 4726da4a3f5301100c6c369d2150dea7f270eb78 | |
parent | 0c6298761b3800c88d781770286aea7194fd5bc0 (diff) |
mb/google/brya/variants/baseboard/brask: Turn off NFC power in S0ix
Turn off the NFC power which is controlled by GPP_D3 to save power in
S0ix states. For an USB device, the S0ix hook is needed for the on/off
operations to take place.
BUG=b:202737385
BRANCH=firmware-brya-14505.B
TEST=measure the voltage of GPP_D3 in S0ix states
Signed-off-by: Alan Huang <alan-huang@quanta.corp-partner.google.com>
Change-Id: I69588c82dfde1744c45c7aff3ac05b80bb16a8f3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63191
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
-rw-r--r-- | src/mainboard/google/brya/variants/brask/include/variant/gpio.h | 2 | ||||
-rw-r--r-- | src/mainboard/google/brya/variants/brask/variant.c | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/mainboard/google/brya/variants/brask/include/variant/gpio.h b/src/mainboard/google/brya/variants/brask/include/variant/gpio.h index 27c87b3fe7..4c28cc90fb 100644 --- a/src/mainboard/google/brya/variants/brask/include/variant/gpio.h +++ b/src/mainboard/google/brya/variants/brask/include/variant/gpio.h @@ -5,4 +5,6 @@ #include <baseboard/gpio.h> +#define NFC_POWER GPP_D3 + #endif /* __MAINBOARD_GPIO_H__ */ diff --git a/src/mainboard/google/brya/variants/brask/variant.c b/src/mainboard/google/brya/variants/brask/variant.c index 04105db2ea..3f1796edb2 100644 --- a/src/mainboard/google/brya/variants/brask/variant.c +++ b/src/mainboard/google/brya/variants/brask/variant.c @@ -3,9 +3,19 @@ #include <chip.h> #include <fw_config.h> #include <baseboard/variants.h> +#include <variant/gpio.h> +#include <acpi/acpigen.h> void variant_update_soc_chip_config(struct soc_intel_alderlake_config *config) { config->cnvi_bt_audio_offload = fw_config_probe(FW_CONFIG(AUDIO, NAU88L25B_I2S)); } + +void variant_generate_s0ix_hook(enum s0ix_entry entry) +{ + if (entry == S0IX_ENTRY) + acpigen_soc_clear_tx_gpio(NFC_POWER); + else if (entry == S0IX_EXIT) + acpigen_soc_set_tx_gpio(NFC_POWER); +} |