coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
usb.h File Reference
#include <stdint.h>
Include dependency graph for usb.h:

Go to the source code of this file.

Data Structures

struct  usb2_port_config
 
struct  usb3_port_config
 

Macros

#define USB2_EMP_OFF   0
 
#define USB2_DE_EMP_ON   1
 
#define USB2_PRE_EMP_ON   2
 
#define USB2_FULL_BIT_PRE_EMP   0
 
#define USB2_HALF_BIT_PRE_EMP   1
 
#define USB2_BIAS_0MV   0
 
#define USB2_BIAS_11MV   1
 
#define USB2_BIAS_17MV   2
 
#define USB2_BIAS_28MV   3
 
#define USB2_BIAS_28MV2   4
 
#define USB2_BIAS_39MV   5
 
#define USB2_BIAS_45MV   6
 
#define USB2_BIAS_56MV   7
 
#define USB2_PORT_EMPTY
 
#define USB2_PORT_MAX(pin)
 
#define USB2_PORT_LONG(pin)
 
#define USB2_PORT_MID(pin)
 
#define USB2_PORT_SHORT(pin)
 
#define USB2_PORT_TYPE_C(pin)
 
#define USB2_PORT_BC12_MUX(pin)
 
#define USB2_PORT_FLEX(pin)
 
#define USB2_PORT_DOCKING_LONG(pin)
 
#define USB2_PORT_DOCKING_SHORT(pin)
 
#define USB2_PORT_DETACHABLE_TABLET(pin)
 
#define USB3_PORT_EMPTY
 
#define USB3_PORT_DEFAULT(pin)
 
#define USB_PORT_WAKE_ENABLE(x)   (1 << ((x) - 1))
 

Enumerations

enum  {
  OC0 , OC1 , OC2 , OC3 ,
  OC4 , OC5 , OC_SKIP = 8
}
 

Macro Definition Documentation

◆ USB2_BIAS_0MV

#define USB2_BIAS_0MV   0

Definition at line 15 of file usb.h.

◆ USB2_BIAS_11MV

#define USB2_BIAS_11MV   1

Definition at line 16 of file usb.h.

◆ USB2_BIAS_17MV

#define USB2_BIAS_17MV   2

Definition at line 17 of file usb.h.

◆ USB2_BIAS_28MV

#define USB2_BIAS_28MV   3

Definition at line 18 of file usb.h.

◆ USB2_BIAS_28MV2

#define USB2_BIAS_28MV2   4

Definition at line 19 of file usb.h.

◆ USB2_BIAS_39MV

#define USB2_BIAS_39MV   5

Definition at line 20 of file usb.h.

◆ USB2_BIAS_45MV

#define USB2_BIAS_45MV   6

Definition at line 21 of file usb.h.

◆ USB2_BIAS_56MV

#define USB2_BIAS_56MV   7

Definition at line 22 of file usb.h.

◆ USB2_DE_EMP_ON

#define USB2_DE_EMP_ON   1

Definition at line 9 of file usb.h.

◆ USB2_EMP_OFF

#define USB2_EMP_OFF   0

Definition at line 8 of file usb.h.

◆ USB2_FULL_BIT_PRE_EMP

#define USB2_FULL_BIT_PRE_EMP   0

Definition at line 12 of file usb.h.

◆ USB2_HALF_BIT_PRE_EMP

#define USB2_HALF_BIT_PRE_EMP   1

Definition at line 13 of file usb.h.

◆ USB2_PORT_BC12_MUX

#define USB2_PORT_BC12_MUX (   pin)
Value:
{ \
.enable = 1, \
.ocpin = pin, \
.tx_bias = USB2_BIAS_0MV, \
.tx_emp_enable = USB2_PRE_EMP_ON, \
.pre_emp_bias = USB2_BIAS_56MV, \
.pre_emp_bit = USB2_HALF_BIT_PRE_EMP, \
}
#define USB2_HALF_BIT_PRE_EMP
Definition: usb.h:13
#define USB2_BIAS_56MV
Definition: usb.h:22
#define USB2_PRE_EMP_ON
Definition: usb.h:10
#define USB2_BIAS_0MV
Definition: usb.h:15

Definition at line 113 of file usb.h.

◆ USB2_PORT_DETACHABLE_TABLET

#define USB2_PORT_DETACHABLE_TABLET (   pin)
Value:
{ \
.enable = 1, \
.ocpin = pin, \
.tx_bias = USB2_BIAS_56MV, \
.tx_emp_enable = USB2_PRE_EMP_ON, \
.pre_emp_bias = USB2_BIAS_56MV, \
.pre_emp_bit = USB2_HALF_BIT_PRE_EMP, \
}

Definition at line 153 of file usb.h.

◆ USB2_PORT_DOCKING_LONG

#define USB2_PORT_DOCKING_LONG (   pin)
Value:
{ \
.enable = 1, \
.ocpin = pin, \
.tx_bias = USB2_BIAS_0MV, \
.tx_emp_enable = USB2_PRE_EMP_ON, \
.pre_emp_bias = USB2_BIAS_56MV, \
.pre_emp_bit = USB2_HALF_BIT_PRE_EMP, \
}

Definition at line 133 of file usb.h.

◆ USB2_PORT_DOCKING_SHORT

#define USB2_PORT_DOCKING_SHORT (   pin)
Value:
{ \
.enable = 1, \
.ocpin = pin, \
.tx_bias = USB2_BIAS_17MV, \
.tx_emp_enable = USB2_PRE_EMP_ON | USB2_DE_EMP_ON, \
.pre_emp_bias = USB2_BIAS_45MV, \
.pre_emp_bit = USB2_FULL_BIT_PRE_EMP, \
}
#define USB2_DE_EMP_ON
Definition: usb.h:9
#define USB2_BIAS_45MV
Definition: usb.h:21
#define USB2_BIAS_17MV
Definition: usb.h:17
#define USB2_FULL_BIT_PRE_EMP
Definition: usb.h:12

Definition at line 143 of file usb.h.

◆ USB2_PORT_EMPTY

#define USB2_PORT_EMPTY
Value:
{ \
.enable = 0, \
.ocpin = OC_SKIP, \
.tx_bias = USB2_BIAS_0MV, \
.tx_emp_enable = USB2_EMP_OFF, \
.pre_emp_bias = USB2_BIAS_0MV, \
.pre_emp_bit = USB2_HALF_BIT_PRE_EMP, \
}
@ OC_SKIP
Definition: usb.h:48
#define USB2_EMP_OFF
Definition: usb.h:8

Definition at line 44 of file usb.h.

◆ USB2_PORT_FLEX

#define USB2_PORT_FLEX (   pin)
Value:
{ \
.enable = 1, \
.ocpin = pin, \
.tx_bias = USB2_BIAS_0MV, \
.tx_emp_enable = USB2_PRE_EMP_ON, \
.pre_emp_bias = USB2_BIAS_56MV, \
.pre_emp_bit = USB2_HALF_BIT_PRE_EMP, \
}

Definition at line 123 of file usb.h.

◆ USB2_PORT_LONG

#define USB2_PORT_LONG (   pin)
Value:
{ \
.enable = 1, \
.ocpin = pin, \
.tx_bias = USB2_BIAS_39MV, \
.tx_emp_enable = USB2_PRE_EMP_ON, \
.pre_emp_bias = USB2_BIAS_56MV, \
.pre_emp_bit = USB2_HALF_BIT_PRE_EMP, \
}
#define USB2_BIAS_39MV
Definition: usb.h:20

Definition at line 73 of file usb.h.

◆ USB2_PORT_MAX

#define USB2_PORT_MAX (   pin)
Value:
{ \
.enable = 1, \
.ocpin = pin, \
.tx_bias = USB2_BIAS_56MV, \
.tx_emp_enable = USB2_PRE_EMP_ON, \
.pre_emp_bias = USB2_BIAS_56MV, \
.pre_emp_bit = USB2_HALF_BIT_PRE_EMP, \
}

Definition at line 63 of file usb.h.

◆ USB2_PORT_MID

#define USB2_PORT_MID (   pin)
Value:
{ \
.enable = 1, \
.ocpin = pin, \
.tx_bias = USB2_BIAS_0MV, \
.tx_emp_enable = USB2_PRE_EMP_ON, \
.pre_emp_bias = USB2_BIAS_56MV, \
.pre_emp_bit = USB2_HALF_BIT_PRE_EMP, \
}

Definition at line 83 of file usb.h.

◆ USB2_PORT_SHORT

#define USB2_PORT_SHORT (   pin)
Value:
{ \
.enable = 1, \
.ocpin = pin, \
.tx_bias = USB2_BIAS_39MV, \
.tx_emp_enable = USB2_PRE_EMP_ON | USB2_DE_EMP_ON, \
.pre_emp_bias = USB2_BIAS_39MV, \
.pre_emp_bit = USB2_FULL_BIT_PRE_EMP, \
}

Definition at line 93 of file usb.h.

◆ USB2_PORT_TYPE_C

#define USB2_PORT_TYPE_C (   pin)
Value:
{ \
.enable = 1, \
.ocpin = pin, \
.tx_bias = USB2_BIAS_0MV, \
.tx_emp_enable = USB2_PRE_EMP_ON, \
.pre_emp_bias = USB2_BIAS_56MV, \
.pre_emp_bit = USB2_HALF_BIT_PRE_EMP, \
}

Definition at line 103 of file usb.h.

◆ USB2_PRE_EMP_ON

#define USB2_PRE_EMP_ON   2

Definition at line 10 of file usb.h.

◆ USB3_PORT_DEFAULT

#define USB3_PORT_DEFAULT (   pin)
Value:
{ \
.enable = 1, \
.ocpin = pin, \
.tx_de_emp = 0x29, \
.tx_downscale_amp = 0x00, \
}

Definition at line 176 of file usb.h.

◆ USB3_PORT_EMPTY

#define USB3_PORT_EMPTY
Value:
{ \
.enable = 0, \
.ocpin = OC_SKIP, \
.tx_de_emp = 0x00, \
.tx_downscale_amp = 0x00, \
}

Definition at line 169 of file usb.h.

◆ USB_PORT_WAKE_ENABLE

#define USB_PORT_WAKE_ENABLE (   x)    (1 << ((x) - 1))

Definition at line 188 of file usb.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
OC0 
OC1 
OC2 
OC3 
OC4 
OC5 
OC_SKIP 

Definition at line 34 of file usb.h.