payloads/edk2: Disable the CPU Timer Lib unless supported
[coreboot.git] / src / mainboard / intel / strago / ec.h
blob6e4d6798fe14b133b250462a3aa3db2821dd616c
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef MAINBOARD_EC_H
4 #define MAINBOARD_EC_H
6 #include <ec/ec.h>
7 #include <ec/google/chromeec/ec_commands.h>
9 /* GPIO_S0_000 is EC_SCI#, but it is bit 16 in GPE_STS */
10 #define EC_SCI_GPI 16
11 /* GPIO_S5_07 is EC_SMI#, but it is bit 19 in GPE_STS and ALT_GPIO_SMI. */
12 #define EC_SMI_GPI 19
14 #define MAINBOARD_EC_SCI_EVENTS \
15 (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED) |\
16 EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN) |\
17 EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_CONNECTED) |\
18 EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_DISCONNECTED) |\
19 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_LOW) |\
20 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_CRITICAL) |\
21 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY) |\
22 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_STATUS) |\
23 EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_THRESHOLD) |\
24 EC_HOST_EVENT_MASK(EC_HOST_EVENT_THROTTLE_START) |\
25 EC_HOST_EVENT_MASK(EC_HOST_EVENT_THROTTLE_STOP) |\
26 EC_HOST_EVENT_MASK(EC_HOST_EVENT_USB_CHARGER) |\
27 EC_HOST_EVENT_MASK(EC_HOST_EVENT_MKBP))
29 #define MAINBOARD_EC_SMI_EVENTS \
30 (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED))
32 /* EC can wake from S5 with lid or power button */
33 #define MAINBOARD_EC_S5_WAKE_EVENTS \
34 (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN) |\
35 EC_HOST_EVENT_MASK(EC_HOST_EVENT_POWER_BUTTON))
37 /* EC can wake from S3 with lid or power button or key press */
38 #define MAINBOARD_EC_S3_WAKE_EVENTS \
39 (MAINBOARD_EC_S5_WAKE_EVENTS |\
40 EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEY_PRESSED))
42 /* Log EC wake events plus EC shutdown events */
43 #define MAINBOARD_EC_LOG_EVENTS \
44 (EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_SHUTDOWN) |\
45 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_SHUTDOWN)|\
46 EC_HOST_EVENT_MASK(EC_HOST_EVENT_PANIC))
48 #endif