mb/google/myst: Enable eSPI SCI events
Enable EC SCI events for eSPI. BUG=b:275894894 TEST=builds Signed-off-by: Jon Murphy <jpmurphy@google.com> Change-Id: I8fd858c484f6fcf952bcb4f756ba2e4728091d8b Reviewed-on: https://review.coreboot.org/c/coreboot/+/74101 Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
This commit is contained in:
parent
99330648cc
commit
9a2d0e6bc2
|
@ -1,9 +1,21 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||||
|
|
||||||
#include <acpi/acpi.h>
|
#include <acpi/acpi.h>
|
||||||
|
#include <amdblocks/smi.h>
|
||||||
#include <ec/google/chromeec/ec.h>
|
#include <ec/google/chromeec/ec.h>
|
||||||
|
#include <gpio.h>
|
||||||
|
#include <soc/smi.h>
|
||||||
#include <variant/ec.h>
|
#include <variant/ec.h>
|
||||||
|
|
||||||
|
static const struct sci_source espi_sci_sources[] = {
|
||||||
|
{
|
||||||
|
.scimap = SMITYPE_ESPI_SCI_B,
|
||||||
|
.gpe = EC_SCI_GPI,
|
||||||
|
.direction = SMI_SCI_LVL_HIGH, /* enum smi_sci_lvl */
|
||||||
|
.level = SMI_SCI_EDG, /* enum smi_sci_dir */
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void mainboard_ec_init(void)
|
void mainboard_ec_init(void)
|
||||||
{
|
{
|
||||||
const struct google_chromeec_event_info info = {
|
const struct google_chromeec_event_info info = {
|
||||||
|
@ -15,4 +27,7 @@ void mainboard_ec_init(void)
|
||||||
};
|
};
|
||||||
|
|
||||||
google_chromeec_events_init(&info, acpi_is_wakeup_s3());
|
google_chromeec_events_init(&info, acpi_is_wakeup_s3());
|
||||||
|
|
||||||
|
/* Configure eSPI SCI events */
|
||||||
|
gpe_configure_sci(espi_sci_sources, ARRAY_SIZE(espi_sci_sources));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||||
|
|
||||||
|
#include <amdblocks/acpimmio.h>
|
||||||
#include <amdblocks/amd_pci_util.h>
|
#include <amdblocks/amd_pci_util.h>
|
||||||
#include <baseboard/variants.h>
|
#include <baseboard/variants.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
|
@ -37,6 +38,10 @@ static void mainboard_init(void *chip_info)
|
||||||
static void mainboard_enable(struct device *dev)
|
static void mainboard_enable(struct device *dev)
|
||||||
{
|
{
|
||||||
printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n");
|
printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n");
|
||||||
|
|
||||||
|
/* TODO: b/184678786 - Move into espi_config */
|
||||||
|
/* Unmask eSPI IRQ 1 (Keyboard) */
|
||||||
|
pm_write32(PM_ESPI_INTR_CTRL, PM_ESPI_DEV_INTR_MASK & ~(BIT(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
struct chip_operations mainboard_ops = {
|
struct chip_operations mainboard_ops = {
|
||||||
|
|
Loading…
Reference in New Issue