OpenBIC
OpenSource Bridge-IC
plat_class.h File Reference
#include <stdbool.h>
#include <stdint.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  _CARD_STATUS_
 

Macros

#define SYS_CLASS_1   1
 
#define SYS_CLASS_2   2
 
#define NUMBER_OF_ADC_CHANNEL   16
 
#define AST1030_ADC_BASE_ADDR   0x7e6e9000
 
#define I3C_BUS4   3
 

Typedefs

typedef struct _CARD_STATUS_ CARD_STATUS
 

Enumerations

enum  BIC_BOARD_REVISION {
  SYS_BOARD_POC = 0x0 , SYS_BOARD_EVT , SYS_BOARD_EVT2 , SYS_BOARD_EVT3_HOTSWAP ,
  SYS_BOARD_EVT3_EFUSE , SYS_BOARD_DVT_HOTSWAP , SYS_BOARD_DVT_EFUSE , SYS_BOARD_PVT_HOTSWAP ,
  SYS_BOARD_PVT_EFUSE , SYS_BOARD_MP_HOTSWAP , SYS_BOARD_MP_EFUSE , SYS_BOARD_MP_2_HOTSWAP ,
  SYS_BOARD_MP_2_EFUSE , SYS_BOARD_POC = 0x0 , SYS_BOARD_EVT , SYS_BOARD_DVT = 0x03 ,
  SYS_BOARD_PVT = 0x05 , SYS_BOARD_MP , SYS_BOARD_POC = 0x0 , SYS_BOARD_EVT ,
  SYS_BOARD_EVT2 , SYS_BOARD_DVT , SYS_BOARD_PVT , SYS_BOARD_PVT2 ,
  SYS_BOARD_PVT2_5 , SYS_BOARD_MP
}
 
enum  _1OU_CARD_TYPE_ {
  TYPE_1OU_SI_TEST_CARD = 0x0 , TYPE_1OU_EXP_WITH_6_M2 , TYPE_1OU_RAINBOW_FALLS , TYPE_1OU_VERNAL_FALLS_WITH_TI ,
  TYPE_1OU_VERNAL_FALLS_WITH_AST , TYPE_1OU_EXP_WITH_NIC = 0x07 , TYPE_1OU_ABSENT = 0xFE , TYPE_1OU_UNKNOWN = 0xFF ,
  TYPE_1OU_SI_TEST_CARD = 0x0 , TYPE_1OU_EXP_WITH_6_M2 , TYPE_1OU_RAINBOW_FALLS , TYPE_1OU_VERNAL_FALLS_WITH_TI ,
  TYPE_1OU_VERNAL_FALLS_WITH_AST , TYPE_1OU_KAHUNA_FALLS , TYPE_1OU_WAIMANO_FALLS , TYPE_1OU_EXP_WITH_NIC ,
  TYPE_1OU_ABSENT = 0xFE , TYPE_1OU_UNKNOWN = 0xFF , TYPE_1OU_SI_TEST_CARD = 0x0 , TYPE_1OU_EXP_WITH_6_M2 ,
  TYPE_1OU_RAINBOW_FALLS , TYPE_1OU_VERNAL_FALLS_WITH_TI , TYPE_1OU_VERNAL_FALLS_WITH_AST , TYPE_1OU_KAHUNA_FALLS ,
  TYPE_1OU_WAIMANO_FALLS , TYPE_1OU_EXP_WITH_NIC , TYPE_1OU_OLMSTED_POINT , TYPE_1OU_NIAGARA_FALLS = 0x09 ,
  TYPE_1OU_EXP_WITH_E1S , TYPE_1OU_ABSENT = 0xFE , TYPE_1OU_UNKNOWN = 0xFF , TYPE_1OU_SI_TEST_CARD = 0x0 ,
  TYPE_1OU_EXP_WITH_6_M2 , TYPE_1OU_RAINBOW_FALLS , TYPE_1OU_VERNAL_FALLS_WITH_TI , TYPE_1OU_VERNAL_FALLS_WITH_AST ,
  TYPE_1OU_KAHUNA_FALLS , TYPE_1OU_WAIMANO_FALLS , TYPE_1OU_EXP_WITH_NIC , TYPE_1OU_EXP_WITH_E1S ,
  TYPE_1OU_ABSENT = 0xFE , TYPE_1OU_UNKNOWN = 0xFF , TYPE_1OU_SI_TEST_CARD = 0x0 , TYPE_1OU_EXP_WITH_6_M2 ,
  TYPE_1OU_RAINBOW_FALLS , TYPE_1OU_VERNAL_FALLS_WITH_TI , TYPE_1OU_VERNAL_FALLS_WITH_AST , TYPE_1OU_KAHUNA_FALLS ,
  TYPE_1OU_WAIMANO_FALLS , TYPE_1OU_EXP_WITH_NIC , TYPE_1OU_EXP_WITH_E1S , TYPE_1OU_ABSENT = 0xFE ,
  TYPE_1OU_UNKNOWN = 0xFF , TYPE_1OU_SI_TEST_CARD = 0x0 , TYPE_1OU_EXP_WITH_6_M2 , TYPE_1OU_RAINBOW_FALLS ,
  TYPE_1OU_VERNAL_FALLS_WITH_TI , TYPE_1OU_VERNAL_FALLS_WITH_AST , TYPE_1OU_KAHUNA_FALLS , TYPE_1OU_WAIMANO_FALLS ,
  TYPE_1OU_EXP_WITH_NIC , TYPE_1OU_ABSENT = 0xFE , TYPE_1OU_UNKNOWN = 0xFF
}
 
enum  _2OU_CARD_TYPE_ {
  TYPE_2OU_EXP = 0x1 , TYPE_2OU_EXP_E1S = 0x2 , TYPE_2OU_HSM = 0x6 , TYPE_2OU_ABSENT = 0xFE ,
  TYPE_2OU_UNKNOWN = 0xFF , TYPE_2OU_DPV2_8 = 0x07 , TYPE_2OU_DPV2_16 = 0x70 , TYPE_2OU_ABSENT = 0xFE ,
  TYPE_2OU_UNKNOWN = 0xFF , TYPE_2OU_DPV2_8 = 0x07 , TYPE_2OU_DPV2_16 = 0x70 , TYPE_2OU_ABSENT = 0xFE ,
  TYPE_2OU_UNKNOWN = 0xFF , TYPE_2OU_DPV2_8 = 0x07 , TYPE_2OU_DPV2_16 = 0x70 , TYPE_2OU_ABSENT = 0xFE ,
  TYPE_2OU_UNKNOWN = 0xFF , TYPE_2OU_DPV2_8 = 0x07 , TYPE_2OU_DPV2_16 = 0x70 , TYPE_2OU_ABSENT = 0xFE ,
  TYPE_2OU_UNKNOWN = 0xFF , TYPE_2OU_DPV2_8 = 0x07 , TYPE_2OU_DPV2_16 = 0x70 , TYPE_2OU_ABSENT = 0xFE ,
  TYPE_2OU_UNKNOWN = 0xFF
}
 
enum  HSC_MODULE {
  HSC_MODULE_ADM1272 , HSC_MODULE_XDP710 , HSC_MODULE_UNKNOWN , HSC_MODULE_ADM1272 ,
  HSC_MODULE_LTC4286 , HSC_MODULE_UNKNOWN = 0xFF , HSC_MODULE_ADM1278 , HSC_MODULE_LTC4282 ,
  HSC_MODULE_MP5990 , HSC_MODULE_ADM1276 , HSC_MODULE_UNKNOWN = 0xFF , HSC_MODULE_ADM1278 ,
  HSC_MODULE_LTC4282 , HSC_MODULE_MP5990 , HSC_MODULE_LTC4286 = 0x04 , HSC_MODULE_UNKNOWN = 0xFF ,
  HSC_MODULE_ADM1278 = 0b00 , HSC_MODULE_MP5990 = 0b01 , HSC_MODULE_UNKNOWN , HSC_MODULE_ADM1278 = 0b00 ,
  HSC_MODULE_LTC4282 = 0b01 , HSC_MODULE_MP5990 = 0b10 , HSC_MODULE_UNKNOWN , HSC_MODULE_ADM1278 = 0b00 ,
  HSC_MODULE_LTC4282 = 0b01 , HSC_MODULE_MP5990 = 0b10 , HSC_MODULE_UNKNOWN , HSC_MODULE_MP5990 ,
  HSC_MODULE_RS31380R , HSC_MODULE_UNKNOWN = 0xFF
}
 
enum  I3C_HUB_TYPE {
  I3C_HUB_TYPE_RNS , I3C_HUB_TYPE_NXP , I3C_HUB_TYPE_UNKNOWN , I3C_HUB_TYPE_RNS ,
  I3C_HUB_TYPE_NXP , I3C_HUB_TYPE_UNKNOWN
}
 
enum  ADC_CHANNEL {
  CHANNEL_6 = 6 , CHANNEL_7 = 7 , CHANNEL_6 = 6 , CHANNEL_7 = 7 ,
  CHANNEL_6 = 6 , CHANNEL_7 = 7 , CHANNEL_6 = 6 , CHANNEL_6 = 6 ,
  CHANNEL_6 = 6 , CHANNEL_7 = 7 , CHANNEL_5 = 5 , NUMBER_OF_ADC_CHANNEL = 16 ,
  ADC_CHANNEL_2 = 2 , ADC_CHANNEL_12 = 12 , ADC_CHANNEL_13 = 13 , NUMBER_OF_ADC_CHANNEL = 16
}
 

Functions

uint8_t get_system_class ()
 
CARD_STATUS get_1ou_status ()
 
CARD_STATUS get_2ou_status ()
 
uint8_t get_hsc_module ()
 
bool get_adc_voltage (int channel, float *voltage)
 
uint8_t get_board_revision ()
 
void init_platform_config ()
 
uint16_t get_i3c_hub_type ()
 
uint16_t get_exp_i3c_hub_type ()
 
void init_i3c_hub_type ()
 

Macro Definition Documentation

◆ AST1030_ADC_BASE_ADDR

#define AST1030_ADC_BASE_ADDR   0x7e6e9000

◆ I3C_BUS4

#define I3C_BUS4   3

◆ NUMBER_OF_ADC_CHANNEL

#define NUMBER_OF_ADC_CHANNEL   16

◆ SYS_CLASS_1

#define SYS_CLASS_1   1

◆ SYS_CLASS_2

#define SYS_CLASS_2   2

Typedef Documentation

◆ CARD_STATUS

typedef struct _CARD_STATUS_ CARD_STATUS

Enumeration Type Documentation

◆ _1OU_CARD_TYPE_

Enumerator
TYPE_1OU_SI_TEST_CARD 
TYPE_1OU_EXP_WITH_6_M2 
TYPE_1OU_RAINBOW_FALLS 
TYPE_1OU_VERNAL_FALLS_WITH_TI 
TYPE_1OU_VERNAL_FALLS_WITH_AST 
TYPE_1OU_EXP_WITH_NIC 
TYPE_1OU_ABSENT 
TYPE_1OU_UNKNOWN 
TYPE_1OU_SI_TEST_CARD 
TYPE_1OU_EXP_WITH_6_M2 
TYPE_1OU_RAINBOW_FALLS 
TYPE_1OU_VERNAL_FALLS_WITH_TI 
TYPE_1OU_VERNAL_FALLS_WITH_AST 
TYPE_1OU_KAHUNA_FALLS 
TYPE_1OU_WAIMANO_FALLS 
TYPE_1OU_EXP_WITH_NIC 
TYPE_1OU_ABSENT 
TYPE_1OU_UNKNOWN 
TYPE_1OU_SI_TEST_CARD 
TYPE_1OU_EXP_WITH_6_M2 
TYPE_1OU_RAINBOW_FALLS 
TYPE_1OU_VERNAL_FALLS_WITH_TI 
TYPE_1OU_VERNAL_FALLS_WITH_AST 
TYPE_1OU_KAHUNA_FALLS 
TYPE_1OU_WAIMANO_FALLS 
TYPE_1OU_EXP_WITH_NIC 
TYPE_1OU_OLMSTED_POINT 
TYPE_1OU_NIAGARA_FALLS 
TYPE_1OU_EXP_WITH_E1S 
TYPE_1OU_ABSENT 
TYPE_1OU_UNKNOWN 
TYPE_1OU_SI_TEST_CARD 
TYPE_1OU_EXP_WITH_6_M2 
TYPE_1OU_RAINBOW_FALLS 
TYPE_1OU_V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8 
TYPE_2OU_DPV2_16 
TYPE_2OU_ABSENT 
TYPE_2OU_UNKNOWN 

◆ ADC_CHANNEL

Enumerator
CHANNEL_6 
CHANNEL_7 
CHANNEL_6 
CHANNEL_7 
CHANNEL_6 
CHANNEL_7 
CHANNEL_6 
CHANNEL_6 
CHANNEL_6 
CHANNEL_7 
CHANNEL_5 
NUMBER_OF_ADC_CHANNEL 
ADC_CHANNEL_2 
ADC_CHANNEL_12 
ADC_CHANNEL_13 
NUMBER_OF_ADC_CHANNEL 

◆ BIC_BOARD_REVISION

Enumerator
SYS_BOARD_POC 
SYS_BOARD_EVT 
SYS_BOARD_EVT2 
SYS_BOARD_EVT3_HOTSWAP 
SYS_BOARD_EVT3_EFUSE 
SYS_BOARD_DVT_HOTSWAP 
SYS_BOARD_DVT_EFUSE 
SYS_BOARD_PVT_HOTSWAP 
SYS_BOARD_PVT_EFUSE 
SYS_BOARD_MP_HOTSWAP 
SYS_BOARD_MP_EFUSE 
SYS_BOARD_MP_2_HOTSWAP 
SYS_BOARD_MP_2_EFUSE 
SYS_BOARD_POC 
SYS_BOARD_EVT 
SYS_BOARD_DVT 
SYS_BOARD_PVT 
SYS_BOARD_MP 
SYS_BOARD_POC 
SYS_BOARD_EVT 
SYS_BOARD_EVT2 
SYS_BOARD_DVT 
SYS_BOARD_PVT 
SYS_BOARD_PVT2 
SYS_BOARD_PVT2_5 
SYS_BOARD_MP 

◆ HSC_MODULE

enum HSC_MODULE
Enumerator
HSC_MODULE_ADM1272 
HSC_MODULE_XDP710 
HSC_MODULE_UNKNOWN 
HSC_MODULE_ADM1272 
HSC_MODULE_LTC4286 
HSC_MODULE_UNKNOWN 
HSC_MODULE_ADM1278 
HSC_MODULE_LTC4282 
HSC_MODULE_MP5990 
HSC_MODULE_ADM1276 
HSC_MODULE_UNKNOWN 
HSC_MODULE_ADM1278 
HSC_MODULE_LTC4282 
HSC_MODULE_MP5990 
HSC_MODULE_LTC4286 
HSC_MODULE_UNKNOWN 
HSC_MODULE_ADM1278 
HSC_MODULE_MP5990 
HSC_MODULE_UNKNOWN 
HSC_MODULE_ADM1278 
HSC_MODULE_LTC4282 
HSC_MODULE_MP5990 
HSC_MODULE_UNKNOWN 
HSC_MODULE_ADM1278 
HSC_MODULE_LTC4282 
HSC_MODULE_MP5990 
HSC_MODULE_UNKNOWN 
HSC_MODULE_MP5990 
HSC_MODULE_RS31380R 
HSC_MODULE_UNKNOWN 

◆ I3C_HUB_TYPE

Enumerator
I3C_HUB_TYPE_RNS 
I3C_HUB_TYPE_NXP 
I3C_HUB_TYPE_UNKNOWN 
I3C_HUB_TYPE_RNS 
I3C_HUB_TYPE_NXP 
I3C_HUB_TYPE_UNKNOWN 

Function Documentation

◆ get_1ou_status()

CARD_STATUS get_1ou_status ( )

◆ get_2ou_status()

CARD_STATUS get_2ou_status ( )

◆ get_adc_voltage()

bool get_adc_voltage ( int  channel,
float *  voltage 
)

◆ get_board_revision()

uint8_t get_board_revision ( )

◆ get_exp_i3c_hub_type()

uint16_t get_exp_i3c_hub_type ( )

◆ get_hsc_module()

uint8_t get_hsc_module ( )

◆ get_i3c_hub_type()

uint16_t get_i3c_hub_type ( )

◆ get_system_class()

uint8_t get_system_class ( )

◆ init_i3c_hub_type()

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

◆ init_platform_config()

void init_platform_config ( )