From c3e36ea20b08abcd383d8788484e9f978d0569f2 Mon Sep 17 00:00:00 2001 From: Tony Huang Date: Mon, 12 Sep 2022 11:00:07 +0800 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/67528 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak Reviewed-by: Karthik Ramasubramanian --- src/mainboard/google/dedede/variants/shotzo/Makefile.inc | 1 + src/mainboard/google/dedede/variants/shotzo/variant.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 src/mainboard/google/dedede/variants/shotzo/variant.c (limited to 'src') 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 +#include +#include + +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); +} -- cgit v1.2.3