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>
This commit is contained in:
Alan Huang 2022-03-29 19:08:23 +08:00 committed by Paul Fagerburg
parent 0c6298761b
commit 47b7904d78
2 changed files with 12 additions and 0 deletions

View File

@ -5,4 +5,6 @@
#include <baseboard/gpio.h>
#define NFC_POWER GPP_D3
#endif /* __MAINBOARD_GPIO_H__ */

View File

@ -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);
}