1 /* SPDX-License-Identifier: GPL-2.0-only */
7 #include <ec/google/chromeec/ec_commands.h>
8 #include <variant/ec.h>
10 #ifdef EC_ENABLE_MULTIPLE_DPTF_PROFILES
11 #define MAINBOARD_EC_SCI_EVENTS \
12 (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED) |\
13 EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN) |\
14 EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_CONNECTED) |\
15 EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_DISCONNECTED) |\
16 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_LOW) |\
17 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_CRITICAL) |\
18 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY) |\
19 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_STATUS) |\
20 EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_THRESHOLD) |\
21 EC_HOST_EVENT_MASK(EC_HOST_EVENT_THROTTLE_START) |\
22 EC_HOST_EVENT_MASK(EC_HOST_EVENT_THROTTLE_STOP) |\
23 EC_HOST_EVENT_MASK(EC_HOST_EVENT_PD_MCU) |\
24 EC_HOST_EVENT_MASK(EC_HOST_EVENT_MKBP) |\
25 EC_HOST_EVENT_MASK(EC_HOST_EVENT_MODE_CHANGE))
27 #define MAINBOARD_EC_SCI_EVENTS \
28 (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED) |\
29 EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN) |\
30 EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_CONNECTED) |\
31 EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_DISCONNECTED) |\
32 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_LOW) |\
33 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_CRITICAL) |\
34 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY) |\
35 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_STATUS) |\
36 EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_THRESHOLD) |\
37 EC_HOST_EVENT_MASK(EC_HOST_EVENT_THROTTLE_START) |\
38 EC_HOST_EVENT_MASK(EC_HOST_EVENT_THROTTLE_STOP) |\
39 EC_HOST_EVENT_MASK(EC_HOST_EVENT_PD_MCU) |\
40 EC_HOST_EVENT_MASK(EC_HOST_EVENT_MKBP))
43 #define MAINBOARD_EC_SMI_EVENTS \
44 (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED))
46 /* EC can wake from S5 with lid or power button */
47 #define MAINBOARD_EC_S5_WAKE_EVENTS \
48 (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN) |\
49 EC_HOST_EVENT_MASK(EC_HOST_EVENT_POWER_BUTTON))
51 /* EC can wake from S3 with lid or power button or key press */
52 #define MAINBOARD_EC_S3_WAKE_EVENTS \
53 (MAINBOARD_EC_S5_WAKE_EVENTS |\
54 EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEY_PRESSED))
56 /* Log EC wake events plus EC shutdown events */
57 #define MAINBOARD_EC_LOG_EVENTS \
58 (EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_SHUTDOWN) |\
59 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_SHUTDOWN)|\
60 EC_HOST_EVENT_MASK(EC_HOST_EVENT_PANIC))