mainboard/intel/avenuecity_crb: Update full IIO configuration
[coreboot2.git] / src / mainboard / samsung / stumpy / smihandler.c
blob0b6e133558564dada8581f8b37c383c8225a4c4e
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <acpi/acpi.h>
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);
22 switch (slp_typ) {
23 case ACPI_S3:
24 case ACPI_S4:
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);
29 break;
30 case ACPI_S5:
31 ite_gpio_setup(GPIO_DEV, 45, ITE_GPIO_OUTPUT, ITE_GPIO_SIMPLE_IO_MODE,
32 ITE_GPIO_CONTROL_DEFAULT);
33 break;
34 default:
35 break;