mb/google/brya/var/orisa: Update Type C DisplayPort HPD Configuration
[coreboot2.git] / src / soc / intel / braswell / xhci.c
blob24d2955b898294ca7bbb3d7d77e5c98c55ec5358
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <console/console.h>
4 #include <device/device.h>
5 #include <device/pci.h>
6 #include <device/pci_ids.h>
7 #include <reg_script.h>
9 #include <soc/iomap.h>
10 #include <soc/iosf.h>
11 #include <soc/pci_devs.h>
12 #include <soc/pm.h>
13 #include <soc/ramstage.h>
14 #include <soc/xhci.h>
16 #include "chip.h"
18 static void xhci_init(struct device *dev)
20 struct soc_intel_braswell_config *config = config_of(dev);
22 if (config->usb_comp_bg) {
23 struct reg_script ops[] = {
24 REG_IOSF_WRITE(IOSF_PORT_USBPHY, USBPHY_COMPBG, config->usb_comp_bg),
25 REG_SCRIPT_END
27 printk(BIOS_INFO, "Override USB2_COMPBG to: 0x%X\n", config->usb_comp_bg);
28 reg_script_run(ops);
32 static struct device_operations xhci_device_ops = {
33 .read_resources = pci_dev_read_resources,
34 .set_resources = pci_dev_set_resources,
35 .enable_resources = pci_dev_enable_resources,
36 .init = xhci_init,
37 .ops_pci = &soc_pci_ops,
40 static const struct pci_driver soc_xhci __pci_driver = {
41 .ops = &xhci_device_ops,
42 .vendor = PCI_VID_INTEL,
43 .device = XHCI_DEVID