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_USB_CHARGER) |\
24 EC_HOST_EVENT_MASK(EC_HOST_EVENT_PD_MCU) |\
25 EC_HOST_EVENT_MASK(EC_HOST_EVENT_MKBP) |\
26 EC_HOST_EVENT_MASK(EC_HOST_EVENT_MODE_CHANGE))
28 #define MAINBOARD_EC_SCI_EVENTS \
29 (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED) |\
30 EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN) |\
31 EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_CONNECTED) |\
32 EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_DISCONNECTED) |\
33 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_LOW) |\
34 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_CRITICAL) |\
35 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY) |\
36 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_STATUS) |\
37 EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_THRESHOLD) |\
38 EC_HOST_EVENT_MASK(EC_HOST_EVENT_THROTTLE_START) |\
39 EC_HOST_EVENT_MASK(EC_HOST_EVENT_THROTTLE_STOP) |\
40 EC_HOST_EVENT_MASK(EC_HOST_EVENT_USB_CHARGER) |\
41 EC_HOST_EVENT_MASK(EC_HOST_EVENT_PD_MCU) |\
42 EC_HOST_EVENT_MASK(EC_HOST_EVENT_MKBP))
45 #define MAINBOARD_EC_SMI_EVENTS \
46 (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED))
48 /* EC can wake from S5 with lid or power button */
49 #define MAINBOARD_EC_S5_WAKE_EVENTS \
50 (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN) |\
51 EC_HOST_EVENT_MASK(EC_HOST_EVENT_POWER_BUTTON))
53 /* EC can wake from S3 with lid or power button or key press */
54 #define MAINBOARD_EC_S3_WAKE_EVENTS \
55 (MAINBOARD_EC_S5_WAKE_EVENTS |\
56 EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEY_PRESSED))
58 /* Log EC wake events plus EC shutdown events */
59 #define MAINBOARD_EC_LOG_EVENTS \
60 (EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_SHUTDOWN) |\
61 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_SHUTDOWN)|\
62 EC_HOST_EVENT_MASK(EC_HOST_EVENT_PANIC))