blob: a507956c856b82291dbfab060170e9777c62f946 [file] [log] [blame]
Angel Ponsae593872020-04-04 18:50:57 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Martin Roth5c354b92019-04-22 14:55:16 -06002
3#include <console/console.h>
4#include <device/device.h>
5#include <device/pci.h>
6#include <device/pci_ids.h>
7#include <device/pci_ops.h>
8#include <device/pci_ehci.h>
9#include <soc/acpi.h>
10#include <soc/pci_devs.h>
11#include <soc/southbridge.h>
12#include <amdblocks/acpimmio.h>
13
Marshall Dawsone0fd9a62019-07-09 18:12:03 -050014static void picasso_usb_init(struct device *dev)
Martin Roth5c354b92019-04-22 14:55:16 -060015{
Marshall Dawsone0fd9a62019-07-09 18:12:03 -050016 /* USB overcurrent configuration is programmed inside the FSP */
Martin Roth5c354b92019-04-22 14:55:16 -060017
Marshall Dawsone0fd9a62019-07-09 18:12:03 -050018 printk(BIOS_DEBUG, "%s\n", __func__);
Martin Roth5c354b92019-04-22 14:55:16 -060019}
20
21static struct pci_operations lops_pci = {
22 .set_subsystem = pci_dev_set_subsystem,
23};
24
25static struct device_operations usb_ops = {
Marshall Dawsone0fd9a62019-07-09 18:12:03 -050026 .read_resources = pci_dev_read_resources,
Martin Roth5c354b92019-04-22 14:55:16 -060027 .set_resources = pci_dev_set_resources,
28 .enable_resources = pci_dev_enable_resources,
Marshall Dawsone0fd9a62019-07-09 18:12:03 -050029 .init = picasso_usb_init,
Nico Hubera89c82e2017-09-14 15:40:28 +020030 .scan_bus = scan_static_bus,
Martin Roth5c354b92019-04-22 14:55:16 -060031 .acpi_name = soc_acpi_name,
32 .ops_pci = &lops_pci,
33};
34
35static const unsigned short pci_device_ids[] = {
Furquan Shaikha1cd7eb2020-04-15 23:58:22 -070036 PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_XHCI0,
37 PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_XHCI1,
38 PCI_DEVICE_ID_AMD_FAM17H_MODEL20H_XHCI0,
Martin Roth5c354b92019-04-22 14:55:16 -060039 0
40};
41
42static const struct pci_driver usb_0_driver __pci_driver = {
43 .ops = &usb_ops,
44 .vendor = PCI_VENDOR_ID_AMD,
45 .devices = pci_device_ids,
46};