diff options
author | Tony Huang <tony-huang@quanta.corp-partner.google.com> | 2022-09-12 11:00:07 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-09-14 17:48:32 +0000 |
commit | c3e36ea20b08abcd383d8788484e9f978d0569f2 (patch) | |
tree | adbc30f3cef7fc58d07179ba1b973d4a4a6fdc00 /src/mainboard/google | |
parent | 8de4d27810b8530acd8418fd7511258eea4b055d (diff) |
mb/google/dedede/variants/shotzo: Turn off LAN power in S0ix
Turn off the LAN power which is controlled by GPP_A10 in S0ix states.
For an USB device, the S0ix hook is needed for the on/off operationas
to take place.
BUG=b:245426120
BRANCH=firmware-dedede-13606.B
TEST=emerge-shotzo coreboot
check LAN LED off in S0ix states
check LAN function ok after suspending 500 loops
check SSDT table has MS0X entry
Scope (\_SB)
{
Method (MS0X, 1, Serialized)
{
If ((Arg0 == One))
{
\_SB.PCI0.CTXS (0x41)
}
Else
{
\_SB.PCI0.STXS (0x41)
}
}
}
Change-Id: I3fcab4a73239b4f006839c0c81e9b4cc74047b77
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67528
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r-- | src/mainboard/google/dedede/variants/shotzo/Makefile.inc | 1 | ||||
-rw-r--r-- | src/mainboard/google/dedede/variants/shotzo/variant.c | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/mainboard/google/dedede/variants/shotzo/Makefile.inc b/src/mainboard/google/dedede/variants/shotzo/Makefile.inc index eb2c9bc021..655f3c8473 100644 --- a/src/mainboard/google/dedede/variants/shotzo/Makefile.inc +++ b/src/mainboard/google/dedede/variants/shotzo/Makefile.inc @@ -1,3 +1,4 @@ ## SPDX-License-Identifier: GPL-2.0-or-later ramstage-y += gpio.c +ramstage-y += variant.c diff --git a/src/mainboard/google/dedede/variants/shotzo/variant.c b/src/mainboard/google/dedede/variants/shotzo/variant.c new file mode 100644 index 0000000000..05de15e98c --- /dev/null +++ b/src/mainboard/google/dedede/variants/shotzo/variant.c @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <acpi/acpigen.h> +#include <baseboard/variants.h> +#include <variant/gpio.h> + +void variant_generate_s0ix_hook(enum s0ix_entry entry) +{ + if (entry == S0IX_ENTRY) + acpigen_soc_clear_tx_gpio(GPP_A10); + else if (entry == S0IX_EXIT) + acpigen_soc_set_tx_gpio(GPP_A10); +} |