soc/intel/ptl: Update ME specification version to 21
[coreboot.git] / src / mainboard / google / eve / smihandler.c
blob676e9091d3b979a5a2bba8e77dba24da7fb87387
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <cpu/x86/smm.h>
4 #include <ec/google/chromeec/smm.h>
5 #include <gpio.h>
6 #include <intelblocks/smihandler.h>
7 #include "ec.h"
8 #include "gpio.h"
10 void mainboard_smi_espi_handler(void)
12 chromeec_smi_process_events();
15 static void mainboard_gpio_smi_sleep(u8 slp_typ)
17 /* Power down the rails on any sleep type */
18 gpio_set(EN_PP3300_DX_CAM, 0);
20 /* Assert TOUSHCREEN_STOP_L */
21 gpio_set(GPP_E11, 0);
23 /* Turn off touchscreen power */
24 gpio_set(GPP_C22, 0);
27 void mainboard_smi_sleep(u8 slp_typ)
29 chromeec_smi_sleep(slp_typ, MAINBOARD_EC_S3_WAKE_EVENTS,
30 MAINBOARD_EC_S5_WAKE_EVENTS);
31 chromeec_smi_device_event_sleep(slp_typ,
32 MAINBOARD_EC_S3_DEVICE_EVENTS, 0);
33 mainboard_gpio_smi_sleep(slp_typ);
36 int mainboard_smi_apmc(u8 apmc)
38 chromeec_smi_apmc(apmc, MAINBOARD_EC_SCI_EVENTS,
39 MAINBOARD_EC_SMI_EVENTS);
40 return 0;