mb/prodrive/hermes: Prevent SGPIO cross-powering 5V rail
commita39a812e407e1749c0177e229902883f5237ade1
authorAngel Pons <th3fanbus@gmail.com>
Wed, 10 Aug 2022 21:37:08 +0000 (10 23:37 +0200)
committerMartin Roth <martin.roth@amd.corp-partner.google.com>
Fri, 7 Oct 2022 22:07:08 +0000 (7 22:07 +0000)
treefe1ad7643c90b9ddbd488466a18527a66b7ebcf2
parent3c3516b8746a695fb5d9f1fcaf939952c54229e3
mb/prodrive/hermes: Prevent SGPIO cross-powering 5V rail

The PCH's SGPIO pads are connected to a buffer chip that is powered from
the always-on +3V3_AUX rail. For some cursed reason, when the SGPIO pads
stay configured as SGPIO when a Poseidon system shuts down, voltage from
the +3V3_AUX-powered buffer chip will leak into the +5V rail through the
SATA backplane. Just pulling the SGPIO pads low before the system powers
off stops the +5V rail from being cross-powered.

This issue has only been observed in S5, but it's very likely other
sleep states are affected as well. Thus, always pull the SGPIO pins
low before entering ACPI S3 or deeper because the power supply will
turn off in these states as well.

TEST=Obtain a Poseidon system, verify that the +5V rail is cross-powered
     after going to S5. We measured 0.17V on our system, but voltages as
     high as 0.6V were measured on other systems. Verify that unplugging
     the SGPIO cable going to the SATA backplane results in the +5V rail
     voltage dropping to 0V, which indicates that the voltage leakage is
     exclusively coming from the SGPIO and SATA backplane. Finally, make
     sure that the +5V rail voltage drops to 0V after going into ACPI S5
     with this patch applied and the SGPIO cable connected.

Change-Id: Ic872903d5fcdd1c17e02b4c06d5ba29889fbc27d
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66616
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
src/mainboard/prodrive/hermes/smihandler.c [new file with mode: 0644]