soc/amd/phoenix/xhci: add SCI sources for the two USB4 controllers
Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I95916e409b3fbd4941a861054733a34100244da9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/74657 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
/* TODO: Update for Phoenix */
|
|
||||||
|
|
||||||
#include <amdblocks/gpio.h>
|
#include <amdblocks/gpio.h>
|
||||||
#include <amdblocks/smi.h>
|
#include <amdblocks/smi.h>
|
||||||
#include <amdblocks/xhci.h>
|
#include <amdblocks/xhci.h>
|
||||||
@@ -24,6 +22,18 @@ static const struct sci_source xhci_sci_sources[] = {
|
|||||||
.gpe = XHCI_GEVENT,
|
.gpe = XHCI_GEVENT,
|
||||||
.direction = SMI_SCI_LVL_HIGH,
|
.direction = SMI_SCI_LVL_HIGH,
|
||||||
.level = SMI_SCI_EDG
|
.level = SMI_SCI_EDG
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.scimap = SMITYPE_XHC3_PME,
|
||||||
|
.gpe = XHCI_GEVENT,
|
||||||
|
.direction = SMI_SCI_LVL_HIGH,
|
||||||
|
.level = SMI_SCI_EDG
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.scimap = SMITYPE_XHC4_PME,
|
||||||
|
.gpe = XHCI_GEVENT,
|
||||||
|
.direction = SMI_SCI_LVL_HIGH,
|
||||||
|
.level = SMI_SCI_EDG
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -45,6 +55,16 @@ enum cb_err pci_xhci_get_wake_gpe(const struct device *dev, int *gpe)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dev->bus->dev->path.pci.devfn == PCIE_ABC_C_DEVFN) {
|
||||||
|
if (dev->path.pci.devfn == USB4_XHCI0_DEVFN) {
|
||||||
|
*gpe = xhci_sci_sources[2].gpe;
|
||||||
|
return CB_SUCCESS;
|
||||||
|
} else if (dev->path.pci.devfn == USB4_XHCI1_DEVFN) {
|
||||||
|
*gpe = xhci_sci_sources[3].gpe;
|
||||||
|
return CB_SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return CB_ERR_ARG;
|
return CB_ERR_ARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user