1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <device/pci_type.h>
4 #include <intelblocks/xhci.h>
5 #include <soc/pci_devs.h>
8 #define PCH_XHCI_USB2_PORT_STATUS_REG 0x480
9 #define PCH_XHCI_USB3_PORT_STATUS_REG 0x520
10 #define PCH_XHCI_USB2_PORT_NUM 10
11 #define PCH_XHCI_USB3_PORT_NUM 4
13 #define TCSS_XHCI_USB2_PORT_STATUS_REG 0x480
14 #define TCSS_XHCI_USB3_PORT_STATUS_REG 0x490
15 #define TCSS_XHCI_USB2_PORT_NUM 1
16 #define TCSS_XHCI_USB3_PORT_NUM 4
18 static const struct xhci_usb_info pch_usb_info
= {
19 .usb2_port_status_reg
= PCH_XHCI_USB2_PORT_STATUS_REG
,
20 .num_usb2_ports
= PCH_XHCI_USB2_PORT_NUM
,
21 .usb3_port_status_reg
= PCH_XHCI_USB3_PORT_STATUS_REG
,
22 .num_usb3_ports
= PCH_XHCI_USB3_PORT_NUM
,
25 static const struct xhci_usb_info tcss_usb_info
= {
26 .usb2_port_status_reg
= TCSS_XHCI_USB2_PORT_STATUS_REG
,
27 .num_usb2_ports
= TCSS_XHCI_USB2_PORT_NUM
,
28 .usb3_port_status_reg
= TCSS_XHCI_USB3_PORT_STATUS_REG
,
29 .num_usb3_ports
= TCSS_XHCI_USB3_PORT_NUM
,
32 const struct xhci_usb_info
*soc_get_xhci_usb_info(pci_devfn_t xhci_dev
)
34 if (xhci_dev
== PCH_DEVFN_XHCI
)
36 else if (xhci_dev
== SA_DEVFN_TCSS_XHCI
)
37 return &tcss_usb_info
;