1 /* SPDX-License-Identifier: GPL-2.0-only */
4 #include <console/console.h>
5 #include <cpu/x86/smm.h>
6 #include <southbridge/intel/bd82x6x/pch.h>
7 #include <southbridge/intel/bd82x6x/me.h>
8 #include <northbridge/intel/sandybridge/sandybridge.h>
10 /* Include for SIO helper functions */
11 #include <superio/ite/common/ite.h>
12 #include <superio/ite/common/ite_gpio.h>
13 #include <superio/ite/it8772f/it8772f.h>
14 #define GPIO_DEV PNP_DEV(0x2e, IT8772F_GPIO)
17 * Change LED_POWER# (SIO GPIO 45) state based on sleep type.
19 void mainboard_smi_sleep(u8 slp_typ
)
21 printk(BIOS_DEBUG
, "SMI: sleep S%d\n", slp_typ
);
25 ite_gpio_setup(GPIO_DEV
, 45, ITE_GPIO_OUTPUT
, ITE_GPIO_ALT_FN_MODE
,
26 ITE_GPIO_POL_INVERT
| ITE_GPIO_PULLUP_ENABLE
);
27 ite_gpio_setup_led(GPIO_DEV
, 45, ITE_GPIO_LED_1
, ITE_LED_FREQ_1HZ
,
28 ITE_LED_CONTROL_DEFAULT
);
31 ite_gpio_setup(GPIO_DEV
, 45, ITE_GPIO_OUTPUT
, ITE_GPIO_SIMPLE_IO_MODE
,
32 ITE_GPIO_CONTROL_DEFAULT
);