OpenBIC
OpenSource Bridge-IC
plat_sensor_table.h File Reference
#include <stdint.h>
#include "sensor.h"
Include dependency graph for plat_sensor_table.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SENSOR_NUM_POWER_ERROR   0x56
 
#define SENSOR_NUM_SYSTEM_STATUS   0x10
 
#define EXPA_RETIMER_EEPROM_ADDR   (0xA0 >> 1)
 
#define EXPA_RETIMER_ADDR   (0x46 >> 1)
 
#define TMP75_EXPA_TEMP_ADDR   (0x94 >> 1)
 
#define TMP75_EXPB_TEMP_ADDR   (0x9A >> 1)
 
#define INA233_EXPA_E1S_0_ADDR   (0x98 >> 1)
 
#define INA233_EXPA_E1S_1_ADDR   (0x88 >> 1)
 
#define INA233_EXPA_E1S_2_ADDR   (0x8C >> 1)
 
#define INA233_EXPA_MAIN_ADDR   (0x9A >> 1)
 
#define INA233_EXPB_E1S_0_ADDR   (0x98 >> 1)
 
#define INA233_EXPB_E1S_1_ADDR   (0x92 >> 1)
 
#define INA233_EXPB_E1S_2_ADDR   (0x88 >> 1)
 
#define INA233_EXPB_E1S_3_ADDR   (0x82 >> 1)
 
#define INA233_EXPB_E1S_4_ADDR   (0x8A >> 1)
 
#define INA233_EXPB_MAIN_ADDR   (0x90 >> 1)
 
#define NVME_ADDR   (0xD4 >> 1)
 
#define TMP75_TEMP_OFFSET   0x00
 
#define NVME_TEMP_OFFSET   0x00
 
#define INA233_VOLT_OFFSET   0x8B
 
#define INA233_CURR_OFFSET   0x8C
 
#define INA233_PWR_OFFSET   0x96
 
#define SQ5220X_VOL_OFFSET   0x02
 
#define SQ5220X_PWR_OFFSET   0x03
 
#define SQ5220X_CUR_OFFSET   0x04
 
#define SENSOR_NUMBER_INTERVAL   0x30
 

Enumerations

enum  SENSOR_NUM {
  SENSOR_NUM_1OU_TEMP = 0x40 , SENSOR_NUM_1OU_E1S_SSD0_P12V_VOLT , SENSOR_NUM_1OU_E1S_SSD1_P12V_VOLT , SENSOR_NUM_1OU_E1S_SSD2_P12V_VOLT ,
  SENSOR_NUM_1OU_P12V_EDGE_VOLT = 0x46 , SENSOR_NUM_1OU_E1S_SSD0_P3V3_ADC_VOLT , SENSOR_NUM_1OU_E1S_SSD1_P3V3_ADC_VOLT , SENSOR_NUM_1OU_E1S_SSD2_P3V3_ADC_VOLT ,
  SENSOR_NUM_1OU_P3V3_STBY_ADC_VOLT = 0x4C , SENSOR_NUM_1OU_P1V8_ADC_VOLT , SENSOR_NUM_1OU_P0V9_ADC_VOLT , SENSOR_NUM_1OU_P1V2_ADC_VOLT ,
  SENSOR_NUM_1OU_E1S_SSD0_P12V_CURR , SENSOR_NUM_1OU_E1S_SSD1_P12V_CURR , SENSOR_NUM_1OU_E1S_SSD2_P12V_CURR , SENSOR_NUM_1OU_P12V_EDGE_CURR = 0x55 ,
  SENSOR_NUM_1OU_E1S_SSD0_P12V_PWR , SENSOR_NUM_1OU_E1S_SSD1_P12V_PWR , SENSOR_NUM_1OU_E1S_SSD2_P12V_PWR , SENSOR_NUM_1OU_P12V_EDGE_PWR = 0x5B ,
  SENSOR_NUM_1OU_E1S_SSD0_TEMP_C , SENSOR_NUM_1OU_E1S_SSD1_TEMP_C , SENSOR_NUM_1OU_E1S_SSD2_TEMP_C , SENSOR_NUM_1OU_RE_TIMER_TEMP_C = 0x61 ,
  SENSOR_NUM_2OU_TEMP = 0x70 , SENSOR_NUM_2OU_E1S_SSD0_P12V_VOLT , SENSOR_NUM_2OU_E1S_SSD1_P12V_VOLT , SENSOR_NUM_2OU_E1S_SSD2_P12V_VOLT ,
  SENSOR_NUM_2OU_E1S_SSD3_P12V_VOLT , SENSOR_NUM_2OU_E1S_SSD4_P12V_VOLT , SENSOR_NUM_2OU_MAIN_P12V_VOLT , SENSOR_NUM_2OU_E1S_SSD0_P3V3_ADC_VOLT ,
  SENSOR_NUM_2OU_E1S_SSD1_P3V3_ADC_VOLT , SENSOR_NUM_2OU_E1S_SSD2_P3V3_ADC_VOLT , SENSOR_NUM_2OU_E1S_SSD3_P3V3_ADC_VOLT , SENSOR_NUM_2OU_E1S_SSD4_P3V3_ADC_VOLT ,
  SENSOR_NUM_2OU_P3V3_STBY_ADC_VOLT , SENSOR_NUM_2OU_P1V8_STBY_ADC_VOLT , SENSOR_NUM_2OU_P1V2_STBY_ADC_VOLT = 0x7F , SENSOR_NUM_2OU_E1S_SSD0_P12V_CURR ,
  SENSOR_NUM_2OU_E1S_SSD1_P12V_CURR , SENSOR_NUM_2OU_E1S_SSD2_P12V_CURR , SENSOR_NUM_2OU_E1S_SSD3_P12V_CURR , SENSOR_NUM_2OU_E1S_SSD4_P12V_CURR ,
  SENSOR_NUM_2OU_MAIN_P12V_CURR , SENSOR_NUM_2OU_E1S_SSD0_P12V_PWR , SENSOR_NUM_2OU_E1S_SSD1_P12V_PWR , SENSOR_NUM_2OU_E1S_SSD2_P12V_PWR ,
  SENSOR_NUM_2OU_E1S_SSD3_P12V_PWR , SENSOR_NUM_2OU_E1S_SSD4_P12V_PWR , SENSOR_NUM_2OU_MAIN_P12V_PWR , SENSOR_NUM_2OU_E1S_SSD0_TEMP_C ,
  SENSOR_NUM_2OU_E1S_SSD1_TEMP_C , SENSOR_NUM_2OU_E1S_SSD2_TEMP_C , SENSOR_NUM_2OU_E1S_SSD3_TEMP_C , SENSOR_NUM_2OU_E1S_SSD4_TEMP_C ,
  SENSOR_NUM_3OU_TEMP = 0xA0 , SENSOR_NUM_3OU_E1S_SSD0_P12V_VOLT , SENSOR_NUM_3OU_E1S_SSD1_P12V_VOLT , SENSOR_NUM_3OU_E1S_SSD2_P12V_VOLT ,
  SENSOR_NUM_3OU_P12V_EDGE_VOLT = 0xA6 , SENSOR_NUM_3OU_E1S_SSD0_P3V3_ADC_VOLT , SENSOR_NUM_3OU_E1S_SSD1_P3V3_ADC_VOLT , SENSOR_NUM_3OU_E1S_SSD2_P3V3_ADC_VOLT ,
  SENSOR_NUM_3OU_P3V3_STBY_ADC_VOLT = 0xAC , SENSOR_NUM_3OU_P1V8_ADC_VOLT , SENSOR_NUM_3OU_P0V9_ADC_VOLT , SENSOR_NUM_3OU_P1V2_ADC_VOLT ,
  SENSOR_NUM_3OU_E1S_SSD0_P12V_CURR , SENSOR_NUM_3OU_E1S_SSD1_P12V_CURR , SENSOR_NUM_3OU_E1S_SSD2_P12V_CURR , SENSOR_NUM_3OU_P12V_EDGE_CURR = 0xB5 ,
  SENSOR_NUM_3OU_E1S_SSD0_P12V_PWR , SENSOR_NUM_3OU_E1S_SSD1_P12V_PWR , SENSOR_NUM_3OU_E1S_SSD2_P12V_PWR , SENSOR_NUM_3OU_P12V_EDGE_PWR = 0xBB ,
  SENSOR_NUM_3OU_E1S_SSD0_TEMP_C , SENSOR_NUM_3OU_E1S_SSD1_TEMP_C , SENSOR_NUM_3OU_E1S_SSD2_TEMP_C , SENSOR_NUM_3OU_RE_TIMER_TEMP_C = 0xC1 ,
  SENSOR_NUM_4OU_TEMP = 0xD0 , SENSOR_NUM_4OU_E1S_SSD0_P12V_VOLT , SENSOR_NUM_4OU_E1S_SSD1_P12V_VOLT , SENSOR_NUM_4OU_E1S_SSD2_P12V_VOLT ,
  SENSOR_NUM_4OU_E1S_SSD3_P12V_VOLT , SENSOR_NUM_4OU_E1S_SSD4_P12V_VOLT , SENSOR_NUM_4OU_MAIN_P12V_VOLT , SENSOR_NUM_4OU_E1S_SSD0_P3V3_ADC_VOLT ,
  SENSOR_NUM_4OU_E1S_SSD1_P3V3_ADC_VOLT , SENSOR_NUM_4OU_E1S_SSD2_P3V3_ADC_VOLT , SENSOR_NUM_4OU_E1S_SSD3_P3V3_ADC_VOLT , SENSOR_NUM_4OU_E1S_SSD4_P3V3_ADC_VOLT ,
  SENSOR_NUM_4OU_P3V3_STBY_ADC_VOLT , SENSOR_NUM_4OU_P1V8_STBY_ADC_VOLT , SENSOR_NUM_4OU_P1V2_STBY_ADC_VOLT = 0xDF , SENSOR_NUM_4OU_E1S_SSD0_P12V_CURR ,
  SENSOR_NUM_4OU_E1S_SSD1_P12V_CURR , SENSOR_NUM_4OU_E1S_SSD2_P12V_CURR , SENSOR_NUM_4OU_E1S_SSD3_P12V_CURR , SENSOR_NUM_4OU_E1S_SSD4_P12V_CURR ,
  SENSOR_NUM_4OU_MAIN_P12V_CURR , SENSOR_NUM_4OU_E1S_SSD0_P12V_PWR , SENSOR_NUM_4OU_E1S_SSD1_P12V_PWR , SENSOR_NUM_4OU_E1S_SSD2_P12V_PWR ,
  SENSOR_NUM_4OU_E1S_SSD3_P12V_PWR , SENSOR_NUM_4OU_E1S_SSD4_P12V_PWR , SENSOR_NUM_4OU_MAIN_P12V_PWR , SENSOR_NUM_4OU_E1S_SSD0_TEMP_C ,
  SENSOR_NUM_4OU_E1S_SSD1_TEMP_C , SENSOR_NUM_4OU_E1S_SSD2_TEMP_C , SENSOR_NUM_4OU_E1S_SSD3_TEMP_C , SENSOR_NUM_4OU_E1S_SSD4_TEMP_C
}
 
enum  POWER_MONITOR_TYPE { PWR_INA233 , PWR_SQ5220X }
 

Functions

void pal_change_sensor_config_number (void)
 
void pal_extend_sensor_config (void)
 
void load_sensor_config (void)
 
uint8_t pal_get_extend_sensor_config (void)
 
void change_ina233_sensor_addr (void)
 
void change_power_monitor_config_for_sq5220x (void)
 
int check_pwr_monitor_type (void)
 

Macro Definition Documentation

◆ EXPA_RETIMER_ADDR

#define EXPA_RETIMER_ADDR   (0x46 >> 1)

◆ EXPA_RETIMER_EEPROM_ADDR

#define EXPA_RETIMER_EEPROM_ADDR   (0xA0 >> 1)

◆ INA233_CURR_OFFSET

#define INA233_CURR_OFFSET   0x8C

◆ INA233_EXPA_E1S_0_ADDR

#define INA233_EXPA_E1S_0_ADDR   (0x98 >> 1)

◆ INA233_EXPA_E1S_1_ADDR

#define INA233_EXPA_E1S_1_ADDR   (0x88 >> 1)

◆ INA233_EXPA_E1S_2_ADDR

#define INA233_EXPA_E1S_2_ADDR   (0x8C >> 1)

◆ INA233_EXPA_MAIN_ADDR

#define INA233_EXPA_MAIN_ADDR   (0x9A >> 1)

◆ INA233_EXPB_E1S_0_ADDR

#define INA233_EXPB_E1S_0_ADDR   (0x98 >> 1)

◆ INA233_EXPB_E1S_1_ADDR

#define INA233_EXPB_E1S_1_ADDR   (0x92 >> 1)

◆ INA233_EXPB_E1S_2_ADDR

#define INA233_EXPB_E1S_2_ADDR   (0x88 >> 1)

◆ INA233_EXPB_E1S_3_ADDR

#define INA233_EXPB_E1S_3_ADDR   (0x82 >> 1)

◆ INA233_EXPB_E1S_4_ADDR

#define INA233_EXPB_E1S_4_ADDR   (0x8A >> 1)

◆ INA233_EXPB_MAIN_ADDR

#define INA233_EXPB_MAIN_ADDR   (0x90 >> 1)

◆ INA233_PWR_OFFSET

#define INA233_PWR_OFFSET   0x96

◆ INA233_VOLT_OFFSET

#define INA233_VOLT_OFFSET   0x8B

◆ NVME_ADDR

#define NVME_ADDR   (0xD4 >> 1)

◆ NVME_TEMP_OFFSET

#define NVME_TEMP_OFFSET   0x00

◆ SENSOR_NUM_POWER_ERROR

#define SENSOR_NUM_POWER_ERROR   0x56

◆ SENSOR_NUM_SYSTEM_STATUS

#define SENSOR_NUM_SYSTEM_STATUS   0x10

◆ SENSOR_NUMBER_INTERVAL

#define SENSOR_NUMBER_INTERVAL   0x30

◆ SQ5220X_CUR_OFFSET

#define SQ5220X_CUR_OFFSET   0x04

◆ SQ5220X_PWR_OFFSET

#define SQ5220X_PWR_OFFSET   0x03

◆ SQ5220X_VOL_OFFSET

#define SQ5220X_VOL_OFFSET   0x02

◆ TMP75_EXPA_TEMP_ADDR

#define TMP75_EXPA_TEMP_ADDR   (0x94 >> 1)

◆ TMP75_EXPB_TEMP_ADDR

#define TMP75_EXPB_TEMP_ADDR   (0x9A >> 1)

◆ TMP75_TEMP_OFFSET

#define TMP75_TEMP_OFFSET   0x00

Enumeration Type Documentation

◆ POWER_MONITOR_TYPE

Enumerator
PWR_INA233 
PWR_SQ5220X 

◆ SENSOR_NUM

enum SENSOR_NUM
Enumerator
SENSOR_NUM_1OU_TE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_E1S_SSD1_P12V_CURR 
SENSOR_NUM_4OU_E1S_SSD2_P12V_CURR 
SENSOR_NUM_4OU_E1S_SSD3_P12V_CURR 
SENSOR_NUM_4OU_E1S_SSD4_P12V_CURR 
SENSOR_NUM_4OU_MAIN_P12V_CURR 
SENSOR_NUM_4OU_E1S_SSD0_P12V_PWR 
SENSOR_NUM_4OU_E1S_SSD1_P12V_PWR 
SENSOR_NUM_4OU_E1S_SSD2_P12V_PWR 
SENSOR_NUM_4OU_E1S_SSD3_P12V_PWR 
SENSOR_NUM_4OU_E1S_SSD4_P12V_PWR 
SENSOR_NUM_4OU_MAIN_P12V_PWR 
SENSOR_NUM_4OU_E1S_SSD0_TEMP_C 
SENSOR_NUM_4OU_E1S_SSD1_TEMP_C 
SENSOR_NUM_4OU_E1S_SSD2_TEMP_C 
SENSOR_NUM_4OU_E1S_SSD3_TEMP_C 
SENSOR_NUM_4OU_E1S_SSD4_TEMP_C 

Function Documentation

◆ change_ina233_sensor_addr()

void change_ina233_sensor_addr ( void  )

◆ change_power_monitor_config_for_sq5220x()

void change_power_monitor_config_for_sq5220x ( void  )

◆ check_pwr_monitor_type()

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

◆ load_sensor_config()

void load_sensor_config ( void  )

◆ pal_change_sensor_config_number()

void pal_change_sensor_config_number ( void  )

◆ pal_extend_sensor_config()

void pal_extend_sensor_config ( )

EVT2 switch board has two configurations that will cause the need to load different sensor table.

1st : ISL69259(VR) + MPS5990(HSC) + ISL28022(Power monitor IC) 2nd : XDPE12284(VR) + LTC4282(HSC) + INA230(Power monitor IC)

Since the BOARD_ID pins were originally used to identify which configuration has no function in this stage, so the current configuration is identified by IC_DEVICE_ID which gets from the VR chip.

The way to identify different configurations by BOARD_ID will be added back in the next stage.

Here is the call graph for this function:

◆ pal_get_extend_sensor_config()

uint8_t pal_get_extend_sensor_config ( void  )