blob: 076d3fe08c39f7682cb46b6a97cc46e735d5e971 [file] [log] [blame]
Angel Ponsaf4ecc22020-04-05 13:21:45 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Patrick Georgi04746fc2015-06-05 18:53:43 +02002
Furquan Shaikh76cedd22020-05-02 10:24:23 -07003#include <acpi/acpi.h>
Patrick Georgi04746fc2015-06-05 18:53:43 +02004#include <cpu/x86/smm.h>
5#include <soc/pm.h>
Angel Pons52e48b52021-01-28 17:03:19 +01006#include <southbridge/intel/lynxpoint/lp_gpio.h>
Patrick Georgi04746fc2015-06-05 18:53:43 +02007#include <soc/iomap.h>
Matt DeVillier0148fcb2016-12-17 17:13:23 -06008#include "onboard.h"
Patrick Georgi04746fc2015-06-05 18:53:43 +02009
Patrick Georgi04746fc2015-06-05 18:53:43 +020010/* gpi_sts is GPIO 47:32 */
11void mainboard_smi_gpi(u32 gpi_sts)
12{
13}
14
15void mainboard_smi_sleep(u8 slp_typ)
16{
17 /* Disable USB charging if required */
18 switch (slp_typ) {
Aaron Durbin30b0c7a2016-07-13 13:01:13 -050019 case ACPI_S3:
Matt DeVillier0148fcb2016-12-17 17:13:23 -060020 set_power_led(LED_BLINK);
21
22 /* Enable DCP mode */
Julius Wernercd49cce2019-03-05 16:53:33 -080023 if (CONFIG(BOARD_GOOGLE_TIDUS)) {
Matt DeVillier0148fcb2016-12-17 17:13:23 -060024 set_gpio(GPIO_USB_CTL_1, 0);
25 }
Patrick Georgi04746fc2015-06-05 18:53:43 +020026 break;
Aaron Durbin30b0c7a2016-07-13 13:01:13 -050027 case ACPI_S5:
Matt DeVillier0148fcb2016-12-17 17:13:23 -060028 set_power_led(LED_OFF);
Patrick Georgi04746fc2015-06-05 18:53:43 +020029 break;
30 }
31}