Paul Fagerburg has submitted this change. ( https://review.coreboot.org/c/coreboot/+/63191 )
Change subject: mb/google/brya/variants/baseboard/brask: Turn off NFC power in S0ix ......................................................................
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 --- M src/mainboard/google/brya/variants/brask/include/variant/gpio.h M src/mainboard/google/brya/variants/brask/variant.c 2 files changed, 12 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Eric Lai: Looks good to me, approved
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 27c87b3..4c28cc9 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 04105db..3f1796e 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); +}