1 /* SPDX-License-Identifier: GPL-2.0-only */
7 #include <ec/google/chromeec/ec_commands.h>
9 #define EC_SCI_GPI 36 /* GPIO36 is EC_SCI# */
10 #define EC_SMI_GPI 34 /* GPIO34 is EC_SMI# */
12 #define MAINBOARD_EC_SCI_EVENTS \
13 (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED) |\
14 EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN) |\
15 EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_CONNECTED) |\
16 EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_DISCONNECTED) |\
17 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_LOW) |\
18 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_CRITICAL) |\
19 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY) |\
20 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_STATUS) |\
21 EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_THRESHOLD) |\
22 EC_HOST_EVENT_MASK(EC_HOST_EVENT_THROTTLE_START) |\
23 EC_HOST_EVENT_MASK(EC_HOST_EVENT_THROTTLE_STOP) |\
24 EC_HOST_EVENT_MASK(EC_HOST_EVENT_PD_MCU) |\
25 EC_HOST_EVENT_MASK(EC_HOST_EVENT_MKBP))
27 #define MAINBOARD_EC_SMI_EVENTS \
28 (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED))
30 /* EC can wake from S5 with lid or power button */
31 #define MAINBOARD_EC_S5_WAKE_EVENTS \
32 (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN) |\
33 EC_HOST_EVENT_MASK(EC_HOST_EVENT_POWER_BUTTON))
35 /* EC can wake from S3 with lid or power button or key press */
36 #define MAINBOARD_EC_S3_WAKE_EVENTS \
37 (MAINBOARD_EC_S5_WAKE_EVENTS |\
38 EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEY_PRESSED))
40 /* Log EC wake events plus EC shutdown events */
41 #define MAINBOARD_EC_LOG_EVENTS \
42 (EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_SHUTDOWN) |\
43 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_SHUTDOWN) |\
44 EC_HOST_EVENT_MASK(EC_HOST_EVENT_PANIC))