1 /* SPDX-License-Identifier: GPL-2.0-or-later */
4 #include <amdblocks/smi.h>
5 #include <ec/google/chromeec/ec.h>
8 #include <variant/ec.h>
10 static const struct sci_source espi_sci_sources
[] = {
12 .scimap
= SMITYPE_ESPI_SCI_B
,
14 .direction
= SMI_SCI_LVL_HIGH
, /* enum smi_sci_lvl */
15 .level
= SMI_SCI_EDG
, /* enum smi_sci_dir */
19 void mainboard_ec_init(void)
21 const struct google_chromeec_event_info info
= {
22 .log_events
= MAINBOARD_EC_LOG_EVENTS
,
23 .sci_events
= MAINBOARD_EC_SCI_EVENTS
,
24 .s3_wake_events
= MAINBOARD_EC_S3_WAKE_EVENTS
,
25 .s5_wake_events
= MAINBOARD_EC_S5_WAKE_EVENTS
,
26 .s0ix_wake_events
= MAINBOARD_EC_S0IX_WAKE_EVENTS
,
29 google_chromeec_events_init(&info
, acpi_is_wakeup_s3());
31 /* Configure eSPI SCI events */
32 gpe_configure_sci(espi_sci_sources
, ARRAY_SIZE(espi_sci_sources
));