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/it8772f/it8772f.h>
12 #define SUPERIO_DEV PNP_DEV(0x2e, 0)
15 * Change LED_POWER# (SIO GPIO 45) state based on sleep type.
17 void mainboard_smi_sleep(u8 slp_typ
)
19 printk(BIOS_DEBUG
, "SMI: sleep S%d\n", slp_typ
);
23 it8772f_gpio_led(SUPERIO_DEV
, 4 /* set */, (0x1 << 5) /* select */,
24 (0x1 << 5) /* polarity */, (0x1 << 5) /* 1 = pullup */,
25 (0x1 << 5) /* output */, 0x00, /* 0 = Alternate function */
26 SIO_GPIO_BLINK_GPIO45
, IT8772F_GPIO_BLINK_FREQUENCY_1_HZ
);
30 it8772f_gpio_led(SUPERIO_DEV
, 4 /* set */, (0x1 << 5) /* select */,
31 0x00 /* polarity: non-inverting */, 0x00 /* 0 = pulldown */,
32 (0x1 << 5) /* output */, (0x1 << 5) /* 1 = Simple IO function */,
33 SIO_GPIO_BLINK_GPIO45
, IT8772F_GPIO_BLINK_FREQUENCY_1_HZ
);