OpenBIC
OpenSource Bridge-IC
plat_class.h File Reference
#include "hal_i2c.h"
Include dependency graph for plat_class.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PCIE_CARD_INFO
 

Macros

#define CPLD_BUS   I2C_BUS10
 
#define CPLD_ADDR   (0xA0 >> 1)
 
#define CPLD_SSD_POWER_FAULT_REG   0x0F
 
#define CPLD_SSD_POWER_GOOD_TIMEOUT   0x10
 
#define SSD_COUNT   4
 
#define E1S_PRESENT   0x00
 
#define E1S_NOT_PRESENT   0x01
 
#define E1S_0_1_PRESENT   0x03
 
#define E1S_0_PRESENT   0x07
 
#define NIC_PRESENT   0x09
 
#define E1S_1_PRESENT   0x0B
 
#define CXL_PRESENT   0x0E
 
#define NO_DEVICE_PRESENT   0x0F
 
#define PCIE_CARD_POWER_GOOD_BIT   BIT(0)
 

Enumerations

enum  BOARD_REVERSION {
  REV_EVT1 , REV_EVT2 , REV_DVT , REV_PVT ,
  REV_MP , REV_PRE_DVT , REV_UNKNOWN = 0xFF
}
 
enum  CARD_INFO_INDEX {
  CARD_1_INDEX , CARD_2_INDEX , CARD_3_INDEX , CARD_4_INDEX ,
  CARD_5_INDEX , CARD_6_INDEX , CARD_7_INDEX , CARD_8_INDEX ,
  CARD_9_INDEX , CARD_10_INDEX , CARD_11_INDEX , CARD_12_INDEX ,
  CARD_13_INDEX , CARD_14_INDEX , CARD_INDEX_MAX
}
 
enum  CXL_CARD_ID {
  CXL_CARD_1 , CXL_CARD_2 , CXL_CARD_3 , CXL_CARD_4 ,
  CXL_CARD_5 , CXL_CARD_6 , CXL_CARD_7 , CXL_CARD_8 ,
  CXL_CARD_MAX
}
 
enum  PCIE_DEVICE_ID {
  PCIE_DEVICE_ID1 , PCIE_DEVICE_ID2 , PCIE_DEVICE_ID3 , PCIE_DEVICE_ID1 ,
  PCIE_DEVICE_ID2 , PCIE_DEVICE_ID3
}
 
enum  PCIE_CARD_TYPE {
  E1S_CARD , E1S_0_CARD , E1S_1_CARD , E1S_0_1_CARD ,
  NIC_CARD , CXL_CARD , CARD_NOT_PRESENT , UNKNOWN_CARD = 0xFF
}
 

Functions

void check_pcie_card_type ()
 
uint8_t prsnt_status_to_card_type (uint8_t presence_status)
 
int get_pcie_card_type (uint8_t card_id, uint8_t *card_type)
 
int get_pcie_device_type (uint8_t card_id, uint8_t device_id, uint8_t *device_type)
 
int pcie_card_id_to_cxl_id (uint8_t pcie_card_id, uint8_t *cxl_id)
 
int cxl_id_to_pcie_card_id (uint8_t cxl_id, uint8_t *pcie_card_id)
 
bool is_cxl_present ()
 
uint8_t get_board_revision ()
 
int get_pcie_card_power_status (uint8_t pcie_card_id)
 
int init_platform_config ()
 
void set_reset_smb4_mux_pin ()
 
void init_accl_presence_check_work ()
 

Variables

struct PCIE_CARD_INFO pcie_card_info [CARD_INDEX_MAX]
 

Macro Definition Documentation

◆ CPLD_ADDR

#define CPLD_ADDR   (0xA0 >> 1)

◆ CPLD_BUS

#define CPLD_BUS   I2C_BUS10

◆ CPLD_SSD_POWER_FAULT_REG

#define CPLD_SSD_POWER_FAULT_REG   0x0F

◆ CPLD_SSD_POWER_GOOD_TIMEOUT

#define CPLD_SSD_POWER_GOOD_TIMEOUT   0x10

◆ CXL_PRESENT

#define CXL_PRESENT   0x0E

◆ E1S_0_1_PRESENT

#define E1S_0_1_PRESENT   0x03

◆ E1S_0_PRESENT

#define E1S_0_PRESENT   0x07

◆ E1S_1_PRESENT

#define E1S_1_PRESENT   0x0B

◆ E1S_NOT_PRESENT

#define E1S_NOT_PRESENT   0x01

◆ E1S_PRESENT

#define E1S_PRESENT   0x00

◆ NIC_PRESENT

#define NIC_PRESENT   0x09

◆ NO_DEVICE_PRESENT

#define NO_DEVICE_PRESENT   0x0F

◆ PCIE_CARD_POWER_GOOD_BIT

#define PCIE_CARD_POWER_GOOD_BIT   BIT(0)

◆ SSD_COUNT

#define SSD_COUNT   4

Enumeration Type Documentation

◆ BOARD_REVERSION

Enumerator
REV_EVT1 
REV_EVT2 
REV_DVT 
REV_PVT 
REV_MP 
REV_PRE_DVT 
REV_UNKNOWN 

◆ CARD_INFO_INDEX

Enumerator
CARD_1_INDEX 
CARD_2_INDEX 
CARD_3_INDEX 
CARD_4_INDEX 
CARD_5_INDEX 
CARD_6_INDEX 
CARD_7_INDEX 
CARD_8_INDEX 
CARD_9_INDEX 
CARD_10_INDEX 
CARD_11_INDEX 
CARD_12_INDEX 
CARD_13_INDEX 
CARD_14_INDEX 
CARD_INDEX_MAX 

◆ CXL_CARD_ID

Enumerator
CXL_CARD_1 
CXL_CARD_2 
CXL_CARD_3 
CXL_CARD_4 
CXL_CARD_5 
CXL_CARD_6 
CXL_CARD_7 
CXL_CARD_8 
CXL_CARD_MAX 

◆ PCIE_CARD_TYPE

Enumerator
E1S_CARD 
E1S_0_CARD 
E1S_1_CARD 
E1S_0_1_CARD 
NIC_CARD 
CXL_CARD 
CARD_NOT_PRESENT 
UNKNOWN_CARD 

◆ PCIE_DEVICE_ID

Enumerator
PCIE_DEVICE_ID1 
PCIE_DEVICE_ID2 
PCIE_DEVICE_ID3 
PCIE_DEVICE_ID1 
PCIE_DEVICE_ID2 
PCIE_DEVICE_ID3 

Function Documentation

◆ check_pcie_card_type()

void check_pcie_card_type ( )
Here is the call graph for this function:

◆ cxl_id_to_pcie_card_id()

int cxl_id_to_pcie_card_id ( uint8_t  cxl_id,
uint8_t *  pcie_card_id 
)

◆ get_board_revision()

uint8_t get_board_revision ( )

◆ get_pcie_card_power_status()

int get_pcie_card_power_status ( uint8_t  pcie_card_id)
Here is the call graph for this function:

◆ get_pcie_card_type()

int get_pcie_card_type ( uint8_t  card_id,
uint8_t *  card_type 
)

◆ get_pcie_device_type()

int get_pcie_device_type ( uint8_t  card_id,
uint8_t  device_id,
uint8_t *  device_type 
)

◆ init_accl_presence_check_work()

void init_accl_presence_check_work ( )
Here is the call graph for this function:

◆ init_platform_config()

int init_platform_config ( )

◆ is_cxl_present()

bool is_cxl_present ( )

◆ pcie_card_id_to_cxl_id()

int pcie_card_id_to_cxl_id ( uint8_t  pcie_card_id,
uint8_t *  cxl_id 
)

◆ prsnt_status_to_card_type()

uint8_t prsnt_status_to_card_type ( uint8_t  presence_status)

◆ set_reset_smb4_mux_pin()

void set_reset_smb4_mux_pin ( )
Here is the call graph for this function:

Variable Documentation

◆ pcie_card_info

struct PCIE_CARD_INFO pcie_card_info[CARD_INDEX_MAX]
extern