1 /* SPDX-License-Identifier: GPL-2.0-only */
8 #include <ec/google/chromeec/ec_commands.h>
10 #define MAINBOARD_EC_SCI_EVENTS \
11 (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED) |\
12 EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN) |\
13 EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_CONNECTED) |\
14 EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_DISCONNECTED) |\
15 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_LOW) |\
16 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_CRITICAL) |\
17 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY) |\
18 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_STATUS) |\
19 EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_THRESHOLD) |\
20 EC_HOST_EVENT_MASK(EC_HOST_EVENT_THROTTLE_START) |\
21 EC_HOST_EVENT_MASK(EC_HOST_EVENT_THROTTLE_STOP) |\
22 EC_HOST_EVENT_MASK(EC_HOST_EVENT_MKBP) |\
23 EC_HOST_EVENT_MASK(EC_HOST_EVENT_PD_MCU) |\
24 EC_HOST_EVENT_MASK(EC_HOST_EVENT_MODE_CHANGE))
26 #define MAINBOARD_EC_SMI_EVENTS \
27 (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED))
29 /* EC can wake from S5 with lid or power button */
30 #define MAINBOARD_EC_S5_WAKE_EVENTS \
31 (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN) |\
32 EC_HOST_EVENT_MASK(EC_HOST_EVENT_POWER_BUTTON))
34 /* EC can wake from S3 with lid or power button or key press or MKBP */
35 #define MAINBOARD_EC_S3_WAKE_EVENTS \
36 (MAINBOARD_EC_S5_WAKE_EVENTS |\
37 EC_HOST_EVENT_MASK(EC_HOST_EVENT_DEVICE) |\
38 EC_HOST_EVENT_MASK(EC_HOST_EVENT_MKBP) |\
39 EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEY_PRESSED))
41 /* Log EC wake events plus EC shutdown events */
42 #define MAINBOARD_EC_LOG_EVENTS \
43 (EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_SHUTDOWN) |\
44 EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_SHUTDOWN) |\
45 EC_HOST_EVENT_MASK(EC_HOST_EVENT_PANIC))
47 /* EC device events to enable and log in S3 */
48 #define MAINBOARD_EC_S3_DEVICE_EVENTS \
49 (EC_DEVICE_EVENT_MASK(EC_DEVICE_EVENT_TRACKPAD) |\
50 EC_DEVICE_EVENT_MASK(EC_DEVICE_EVENT_DSP))
53 * ACPI related definitions for ASL code.
56 /* Enable EC backed Keyboard Backlight in ACPI */
57 #define EC_ENABLE_KEYBOARD_BACKLIGHT
59 /* Enable EC backed PD MCU device in ACPI */
60 #define EC_ENABLE_PD_MCU_DEVICE
62 /* Enable LID switch and provide wake pin for EC */
63 #define EC_ENABLE_LID_SWITCH
64 #define EC_ENABLE_WAKE_PIN GPE_EC_WAKE
66 /* Enable Tablet switch */
67 #define EC_ENABLE_TBMC_DEVICE
69 #define SIO_EC_MEMMAP_ENABLE /* EC Memory Map Resources */
70 #define SIO_EC_HOST_ENABLE /* EC Host Interface Resources */
71 #define SIO_EC_ENABLE_PS2K /* Enable PS/2 Keyboard */