mb/google/brya: Create rull variant
[coreboot2.git] / src / mainboard / google / skyrim / ec.c
blob060119dc3c994d055cd131adf2a6184b952f7744
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <acpi/acpi.h>
4 #include <amdblocks/smi.h>
5 #include <ec/google/chromeec/ec.h>
6 #include <gpio.h>
7 #include <soc/smi.h>
8 #include <variant/ec.h>
10 static const struct sci_source espi_sci_sources[] = {
12 .scimap = SMITYPE_ESPI_SCI_B,
13 .gpe = EC_SCI_GPI,
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));