| 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <acpi/acpi.h> |
| 4 | #include <cpu/x86/smm.h> |
| 5 | #include <intelblocks/gpio.h> |
| 6 | #include <intelblocks/smihandler.h> |
| 7 | #include <soc/gpio.h> |
| 8 | |
| 9 | static const struct pad_config sgpio_table[] = { |
| 10 | PAD_CFG_GPO(GPP_F10, 0, DEEP), |
| 11 | PAD_CFG_GPO(GPP_F11, 0, DEEP), |
| 12 | PAD_CFG_GPO(GPP_F12, 0, DEEP), |
| 13 | PAD_CFG_GPO(GPP_F13, 0, DEEP), |
| 14 | }; |
| 15 | |
| 16 | void mainboard_smi_sleep(u8 slp_typ) |
| 17 | { |
| 18 | /* |
| 19 | * Pull SGPIO pins low to prevent cross-powering the +5V rail |
| 20 | * through the SATA backplane when the power supply is off. |
| 21 | */ |
| 22 | if (slp_typ >= ACPI_S3) |
| 23 | gpio_configure_pads(sgpio_table, ARRAY_SIZE(sgpio_table)); |
| 24 | } |