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
 
struct  tcss_port_config
 

Macros

#define USB2_EMP_OFF   0
 
#define USB2_DE_EMP_ON   1
 
#define USB2_PRE_EMP_ON   2
 
#define USB2_DE_EMP_ON_PRE_EMP_ON   3
 
#define USB2_FULL_BIT_PRE_EMP   0
 
#define USB2_HALF_BIT_PRE_EMP   1
 
#define USB2_BIAS_0MV   0
 
#define USB2_BIAS_11P25MV   1
 
#define USB2_BIAS_16P9MV   2
 
#define USB2_BIAS_28P15MV   3
 
#define USB2_BIAS_39P35MV   5
 
#define USB2_BIAS_45MV   6
 
#define USB2_BIAS_56P3MV   7
 
#define USB2_PORT_EMPTY
 
#define USB2_PORT_LONG(pin)
 
#define USB2_PORT_MID(pin)
 
#define USB2_PORT_SHORT(pin)
 
#define USB2_PORT_MAX(pin)
 
#define USB2_PORT_MAX_TYPE_C(pin)
 
#define USB2_PORT_TYPE_C(pin)
 
#define USB3_PORT_EMPTY
 
#define USB3_PORT_DEFAULT(pin)
 
#define TCSS_PORT_EMPTY
 
#define TCSS_PORT_DEFAULT(pin)
 

Enumerations

enum  {
  OC0 = 0 , OC1 , OC2 , OC3 ,
  OC4 , OC5 , OC6 , OC7 ,
  OCMAX , OC_SKIP = 0xff
}
 

Macro Definition Documentation

◆ TCSS_PORT_DEFAULT

#define TCSS_PORT_DEFAULT (   pin)
Value:
{ \
.enable = 1, \
.ocpin = (pin), \
}

Definition at line 161 of file usb.h.

◆ TCSS_PORT_EMPTY

#define TCSS_PORT_EMPTY
Value:
{ \
.enable = 0, \
.ocpin = OC_SKIP, \
}
@ OC_SKIP
Definition: usb.h:48

Definition at line 156 of file usb.h.

◆ USB2_BIAS_0MV

#define USB2_BIAS_0MV   0

Definition at line 19 of file usb.h.

◆ USB2_BIAS_11P25MV

#define USB2_BIAS_11P25MV   1

Definition at line 20 of file usb.h.

◆ USB2_BIAS_16P9MV

#define USB2_BIAS_16P9MV   2

Definition at line 21 of file usb.h.

◆ USB2_BIAS_28P15MV

#define USB2_BIAS_28P15MV   3

Definition at line 22 of file usb.h.

◆ USB2_BIAS_39P35MV

#define USB2_BIAS_39P35MV   5

Definition at line 23 of file usb.h.

◆ USB2_BIAS_45MV

#define USB2_BIAS_45MV   6

Definition at line 24 of file usb.h.

◆ USB2_BIAS_56P3MV

#define USB2_BIAS_56P3MV   7

Definition at line 25 of file usb.h.

◆ USB2_DE_EMP_ON

#define USB2_DE_EMP_ON   1

Definition at line 10 of file usb.h.

◆ USB2_DE_EMP_ON_PRE_EMP_ON

#define USB2_DE_EMP_ON_PRE_EMP_ON   3

Definition at line 12 of file usb.h.

◆ USB2_EMP_OFF

#define USB2_EMP_OFF   0

Definition at line 9 of file usb.h.

◆ USB2_FULL_BIT_PRE_EMP

#define USB2_FULL_BIT_PRE_EMP   0

Definition at line 15 of file usb.h.

◆ USB2_HALF_BIT_PRE_EMP

#define USB2_HALF_BIT_PRE_EMP   1

Definition at line 16 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, \
}
#define USB2_HALF_BIT_PRE_EMP
Definition: usb.h:16
#define USB2_EMP_OFF
Definition: usb.h:9
#define USB2_BIAS_0MV
Definition: usb.h:19

Definition at line 58 of file usb.h.

◆ USB2_PORT_LONG

#define USB2_PORT_LONG (   pin)
Value:
{ \
.enable = 1, \
.ocpin = (pin), \
.tx_bias = USB2_BIAS_39P35MV, \
.tx_emp_enable = USB2_PRE_EMP_ON, \
.pre_emp_bias = USB2_BIAS_56P3MV, \
.pre_emp_bit = USB2_HALF_BIT_PRE_EMP, \
}
#define USB2_BIAS_39P35MV
Definition: usb.h:23
#define USB2_PRE_EMP_ON
Definition: usb.h:11
#define USB2_BIAS_56P3MV
Definition: usb.h:25

Definition at line 68 of file usb.h.

◆ USB2_PORT_MAX

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

Definition at line 98 of file usb.h.

◆ USB2_PORT_MAX_TYPE_C

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

Definition at line 108 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_DE_EMP_ON_PRE_EMP_ON, \
.pre_emp_bias = USB2_BIAS_45MV, \
.pre_emp_bit = USB2_FULL_BIT_PRE_EMP, \
}
#define USB2_BIAS_45MV
Definition: usb.h:24
#define USB2_DE_EMP_ON_PRE_EMP_ON
Definition: usb.h:12
#define USB2_FULL_BIT_PRE_EMP
Definition: usb.h:15

Definition at line 78 of file usb.h.

◆ USB2_PORT_SHORT

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

Definition at line 88 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_56P3MV, \
.pre_emp_bit = USB2_HALF_BIT_PRE_EMP, \
.type_c = 1, \
}

Definition at line 120 of file usb.h.

◆ USB2_PRE_EMP_ON

#define USB2_PRE_EMP_ON   2

Definition at line 11 of file usb.h.

◆ USB3_PORT_DEFAULT

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

Definition at line 144 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 137 of file usb.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
OC0 
OC1 
OC2 
OC3 
OC4 
OC5 
OC6 
OC7 
OCMAX 
OC_SKIP 

Definition at line 38 of file usb.h.