coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
xhci.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef _BROADWELL_XHCI_H_
4 #define _BROADWELL_XHCI_H_
5 
6 /* XHCI PCI Registers */
7 #define XHCI_PWR_CTL_STS 0x74
8 #define XHCI_PWR_CTL_SET_MASK 0x3
9 #define XHCI_PWR_CTL_SET_D0 0x0
10 #define XHCI_PWR_CTL_SET_D3 0x3
11 #define XHCI_PWR_CTL_ENABLE_PME (1 << 8)
12 #define XHCI_PWR_CTL_STATUS_PME (1 << 15)
13 #define XHCI_USB2PR 0xd0
14 #define XHCI_USB2PRM 0xd4
15 #define XHCI_USB2PR_HCSEL 0x7fff
16 #define XHCI_USB3PR 0xd8
17 #define XHCI_USB3PR_SSEN 0x3f
18 #define XHCI_USB3PRM 0xdc
19 #define XHCI_USB3FUS 0xe0
20 #define XHCI_USB3FUS_SS_MASK 3
21 #define XHCI_USB3FUS_SS_SHIFT 3
22 #define XHCI_USB3PDO 0xe8
23 
24 /* XHCI Memory Registers */
25 #define XHCI_USB3_PORTSC(port) (0x530 + (port * 0x10))
26 #define XHCI_USB3_PORTSC_CHST (0x7f << 17)
27 #define XHCI_USB3_PORTSC_WCE (1 << 25) /* Wake on Connect */
28 #define XHCI_USB3_PORTSC_WDE (1 << 26) /* Wake on Disconnect */
29 #define XHCI_USB3_PORTSC_WOE (1 << 27) /* Wake on Overcurrent */
30 #define XHCI_USB3_PORTSC_WRC (1 << 19) /* Warm Reset Complete */
31 #define XHCI_USB3_PORTSC_LWS (1 << 16) /* Link Write Strobe */
32 #define XHCI_USB3_PORTSC_PED (1 << 1) /* Port Enabled/Disabled */
33 #define XHCI_USB3_PORTSC_WPR (1 << 31) /* Warm Port Reset */
34 #define XHCI_USB3_PORTSC_PLS (0xf << 5) /* Port Link State */
35 #define XHCI_PLSR_DISABLED (4 << 5) /* Port is disabled */
36 #define XHCI_PLSR_RXDETECT (5 << 5) /* Port is disconnected */
37 #define XHCI_PLSR_POLLING (7 << 5) /* Port is polling */
38 #define XHCI_PLSW_ENABLE (5 << 5) /* Transition from disabled */
39 
41 
42 #endif
u32 pci_devfn_t
Definition: pci_type.h:8
void usb_xhci_sleep_prepare(pci_devfn_t dev, u8 slp_typ)
uint8_t u8
Definition: stdint.h:45