1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <cpu/x86/smm.h>
4 #include <ec/google/chromeec/smm.h>
6 #include <intelblocks/smihandler.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 */
23 /* Turn off touchscreen power */
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
);