| 1 |
#ifndef __FSPUSB_H__ |
| 2 |
#define __FSPUSB_H__ |
| 3 |
|
| 4 |
#include <FspUpd.h> |
| 5 |
|
| 6 |
#define FSP_USB_STRUCT_MAJOR_VERSION 0xf |
| 7 |
#define FSP_USB_STRUCT_MINOR_VERSION 0x2 |
| 8 |
|
| 9 |
#define USB2_PORT_COUNT 8 |
| 10 |
#define USB3_PORT_COUNT 3 |
| 11 |
#define USBC_COMBO_PHY_COUNT 3 |
| 12 |
|
| 13 |
struct fch_usb2_phy { |
| 14 |
uint8_t compdistune; |
| 15 |
uint8_t pllbtune; |
| 16 |
uint8_t pllitune; |
| 17 |
uint8_t pllptune; |
| 18 |
uint8_t sqrxtune; |
| 19 |
uint8_t txfslstune; |
| 20 |
uint8_t txpreempamptune; |
| 21 |
uint8_t txpreemppulsetune; |
| 22 |
uint8_t txrisetune; |
| 23 |
uint8_t txvreftune; |
| 24 |
uint8_t txhsxvtune; |
| 25 |
uint8_t txrestune; |
| 26 |
} __packed; |
| 27 |
|
| 28 |
struct fch_usb3_phy { |
| 29 |
uint8_t tx_term_ctrl; |
| 30 |
uint8_t rx_term_ctrl; |
| 31 |
uint8_t tx_vboost_lvl_en; |
| 32 |
uint8_t tx_vboost_lvl; |
| 33 |
} __packed; |
| 34 |
|
| 35 |
#define USB0_PORT0 0 |
| 36 |
#define USB0_PORT1 1 |
| 37 |
#define USB0_PORT2 1 |
| 38 |
#define USB0_PORT3 3 |
| 39 |
#define USB1_PORT0 (0<<2) |
| 40 |
#define USB1_PORT1 (1<<2) |
| 41 |
#define USB1_PORT2 (1<<2) |
| 42 |
#define USB1_PORT3 (3<<2) |
| 43 |
|
| 44 |
#define USB_COMBO_PHY_MODE_USB_C 0 |
| 45 |
#define USB_COMBO_PHY_MODE_USB_ONLY 1 |
| 46 |
#define USB_COMBO_PHY_MODE_USB_DPM 2 |
| 47 |
#define USB_COMBO_PHY_MODE_USB_DPP 3 |
| 48 |
|
| 49 |
struct usb_phy_config { |
| 50 |
uint8_t Version_Major; |
| 51 |
uint8_t Version_Minor; |
| 52 |
uint8_t TableLength; |
| 53 |
uint8_t Reserved0; |
| 54 |
struct fch_usb2_phy Usb2PhyPort[USB2_PORT_COUNT]; |
| 55 |
struct fch_usb3_phy Usb3PhyPort[USB3_PORT_COUNT]; |
| 56 |
uint8_t ComboPhyStaticConfig[USBC_COMBO_PHY_COUNT]; |
| 57 |
uint8_t Reserved1[5]; |
| 58 |
} __packed; |
| 59 |
|
| 60 |
#endif |