diff --git a/src/mainboard/prodrive/hermes/smihandler.c b/src/mainboard/prodrive/hermes/smihandler.c new file mode 100644 index 0000000000..50b8e8b0a0 --- /dev/null +++ b/src/mainboard/prodrive/hermes/smihandler.c @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include +#include +#include +#include + +static const struct pad_config sgpio_table[] = { + PAD_CFG_GPO(GPP_F10, 0, DEEP), + PAD_CFG_GPO(GPP_F11, 0, DEEP), + PAD_CFG_GPO(GPP_F12, 0, DEEP), + PAD_CFG_GPO(GPP_F13, 0, DEEP), +}; + +void mainboard_smi_sleep(u8 slp_typ) +{ + /* + * Pull SGPIO pins low to prevent cross-powering the +5V rail + * through the SATA backplane when the power supply is off. + */ + if (slp_typ >= ACPI_S3) + gpio_configure_pads(sgpio_table, ARRAY_SIZE(sgpio_table)); +}