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

Go to the source code of this file.

Macros

#define ADDR_TMP75_INLET   (0x92 >> 1)
 
#define ADDR_TMP75_OUTLET   (0x98 >> 1)
 
#define ADDR_TMP75_FIO   (0x90 >> 1)
 
#define ADDR_VR_CPU0   (0XEC >> 1)
 
#define ADDR_VR_SOC   (0XEC >> 1)
 
#define ADDR_VR_CPU1   (0XC6 >> 1)
 
#define ADDR_VR_PVDDIO   (0XC6 >> 1)
 
#define ADDR_VR_PVDD11   (0XE4 >> 1)
 
#define ADDR_X8_INA233   (0x8A >> 1)
 
#define ADDR_X16_INA233   (0x82 >> 1)
 
#define ADDR_E1S_BOOT_INA233   (0x8A >> 1)
 
#define ADDR_E1S_DATA_INA233   (0x80 >> 1)
 
#define ADDR_X8_RETIMER   (0x46 >> 1)
 
#define ADDR_X16_RETIMER   (0x40 >> 1)
 
#define ADDR_NVME   (0xD4 >> 1)
 
#define OFFSET_TMP75_TEMP   0x00
 
#define OFFSET_NVME_TEMP   0x00
 
#define NUM_SOC_PACKAGE_PWR   0x0055
 
#define UPDATE_INTERVAL_1S   1
 
#define UPDATE_INTERVAL_3S   3
 
#define UPDATA_INTERNAL_1HR   3600
 
#define VR_DEVICE_UNKNOWN   0xFF
 
#define SENSOR_NUM_MB_INA233_E1S_DATA_VOLT_V   0x0033
 
#define SENSOR_NUM_MB_INA233_X8_RTM_CURR_A   0x0045
 
#define SENSOR_NUM_MB_INA233_E1S_DATA_CURR_A   0x0048
 
#define SENSOR_NUM_MB_INA233_X8_RTM_PWR_W   0x0062
 
#define SENSOR_NUM_MB_INA233_E1S_DATA_PWR_W   0x0065
 

Enumerations

enum  SENSOR_THREAD_LIST {
  UBC_SENSOR_THREAD_ID = 0 , VR_SENSOR_THREAD_ID , TEMP_SENSOR_THREAD_ID , MAX_SENSOR_THREAD_ID ,
  TMP_SENSOR_THREAD_ID = 0 , ADC_SENSOR_THREAD_ID , INA233_SENSOR_THREAD_ID , VR_SENSOR_THREAD_ID ,
  DIMM_SENSOR_THREAD_ID , MAX_SENSOR_THREAD_ID , ADC_SENSOR_THREAD_ID = 0 , VR_SENSOR_THREAD_ID ,
  MB_TEMP_SENSOR_THREAD_ID , CPU_SENSOR_THREAD_ID , INA233_SENSOR_THREAD_ID , DIMM_SENSOR_THREAD_ID ,
  MAX_SENSOR_THREAD_ID , ADC_SENSOR_THREAD_ID = 0 , TMP_SENSOR_THREAD_ID , INA233_SENSOR_THREAD_ID ,
  VR_SENSOR_THREAD_ID , DIMM_SENSOR_THREAD_ID , ADC_MONITOR_SENSOR_THREAD_ID , MAX_SENSOR_THREAD_ID
}
 
enum  GET_VR_DEV_STATUS {
  GET_VR_DEV_SUCCESS = 0 , GET_VR_DEV_FAILED , GET_VR_DEV_SUCCESS = 0 , GET_VR_DEV_FAILED ,
  GET_VR_DEV_SUCCESS = 0 , GET_VR_DEV_FAILED
}
 

Functions

int plat_pldm_sensor_get_sensor_count (int thread_id)
 
uint8_t plat_pldm_sensor_get_vr_dev (uint8_t *vr_dev)
 
uint8_t plat_pldm_sensor_get_ina_dev ()
 
void plat_pldm_sensor_change_vr_dev ()
 
void plat_pldm_sensor_change_ssd_dev ()
 
void plat_pldm_sensor_change_cpu_bus ()
 
void plat_pldm_sensor_change_retimer_dev ()
 
void plat_pldm_sensor_change_ina_dev ()
 
void plat_init_pldm_sensor_table ()
 
void plat_init_pldm_disabled_sensors ()
 
void plat_pldm_sensor_change_dimm_dev ()
 
void plat_pldm_sensor_clear_vr_fault (uint8_t vr_addr, uint8_t vr_bus, uint8_t page_cnt)
 

Macro Definition Documentation

◆ ADDR_E1S_BOOT_INA233

#define ADDR_E1S_BOOT_INA233   (0x8A >> 1)

◆ ADDR_E1S_DATA_INA233

#define ADDR_E1S_DATA_INA233   (0x80 >> 1)

◆ ADDR_NVME

#define ADDR_NVME   (0xD4 >> 1)

◆ ADDR_TMP75_FIO

#define ADDR_TMP75_FIO   (0x90 >> 1)

◆ ADDR_TMP75_INLET

#define ADDR_TMP75_INLET   (0x92 >> 1)

◆ ADDR_TMP75_OUTLET

#define ADDR_TMP75_OUTLET   (0x98 >> 1)

◆ ADDR_VR_CPU0

#define ADDR_VR_CPU0   (0XEC >> 1)

◆ ADDR_VR_CPU1

#define ADDR_VR_CPU1   (0XC6 >> 1)

◆ ADDR_VR_PVDD11

#define ADDR_VR_PVDD11   (0XE4 >> 1)

◆ ADDR_VR_PVDDIO

#define ADDR_VR_PVDDIO   (0XC6 >> 1)

◆ ADDR_VR_SOC

#define ADDR_VR_SOC   (0XEC >> 1)

◆ ADDR_X16_INA233

#define ADDR_X16_INA233   (0x82 >> 1)

◆ ADDR_X16_RETIMER

#define ADDR_X16_RETIMER   (0x40 >> 1)

◆ ADDR_X8_INA233

#define ADDR_X8_INA233   (0x8A >> 1)

◆ ADDR_X8_RETIMER

#define ADDR_X8_RETIMER   (0x46 >> 1)

◆ NUM_SOC_PACKAGE_PWR

#define NUM_SOC_PACKAGE_PWR   0x0055

◆ OFFSET_NVME_TEMP

#define OFFSET_NVME_TEMP   0x00

◆ OFFSET_TMP75_TEMP

#define OFFSET_TMP75_TEMP   0x00

◆ SENSOR_NUM_MB_INA233_E1S_DATA_CURR_A

#define SENSOR_NUM_MB_INA233_E1S_DATA_CURR_A   0x0048

◆ SENSOR_NUM_MB_INA233_E1S_DATA_PWR_W

#define SENSOR_NUM_MB_INA233_E1S_DATA_PWR_W   0x0065

◆ SENSOR_NUM_MB_INA233_E1S_DATA_VOLT_V

#define SENSOR_NUM_MB_INA233_E1S_DATA_VOLT_V   0x0033

◆ SENSOR_NUM_MB_INA233_X8_RTM_CURR_A

#define SENSOR_NUM_MB_INA233_X8_RTM_CURR_A   0x0045

◆ SENSOR_NUM_MB_INA233_X8_RTM_PWR_W

#define SENSOR_NUM_MB_INA233_X8_RTM_PWR_W   0x0062

◆ UPDATA_INTERNAL_1HR

#define UPDATA_INTERNAL_1HR   3600

◆ UPDATE_INTERVAL_1S

#define UPDATE_INTERVAL_1S   1

◆ UPDATE_INTERVAL_3S

#define UPDATE_INTERVAL_3S   3

◆ VR_DEVICE_UNKNOWN

#define VR_DEVICE_UNKNOWN   0xFF

Enumeration Type Documentation

◆ GET_VR_DEV_STATUS

Enumerator
GET_VR_DEV_SUCCESS 
GET_VR_DEV_FAILED 
GET_VR_DEV_SUCCESS 
GET_VR_DEV_FAILED 
GET_VR_DEV_SUCCESS 
GET_VR_DEV_FAILED 

◆ SENSOR_THREAD_LIST

Enumerator
UBC_SENSOR_THREAD_ID 
VR_SENSOR_THREAD_ID 
TEMP_SENSOR_THREAD_ID 
MAX_SENSOR_THREAD_ID 
TMP_SENSOR_THREAD_ID 
ADC_SENSOR_THREAD_ID 
INA233_SENSOR_THREAD_ID 
VR_SENSOR_THREAD_ID 
DIMM_SENSOR_THREAD_ID 
MAX_SENSOR_THREAD_ID 
ADC_SENSOR_THREAD_ID 
VR_SENSOR_THREAD_ID 
MB_TEMP_SENSOR_THREAD_ID 
CPU_SENSOR_THREAD_ID 
INA233_SENSOR_THREAD_ID 
DIMM_SENSOR_THREAD_ID 
MAX_SENSOR_THREAD_ID 
ADC_SENSOR_THREAD_ID 
TMP_SENSOR_THREAD_ID 
INA233_SENSOR_THREAD_ID 
VR_SENSOR_THREAD_ID 
DIMM_SENSOR_THREAD_ID 
ADC_MONITOR_SENSOR_THREAD_ID 
MAX_SENSOR_THREAD_ID 

Function Documentation

◆ plat_init_pldm_disabled_sensors()

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

◆ plat_init_pldm_sensor_table()

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

◆ plat_pldm_sensor_change_cpu_bus()

void plat_pldm_sensor_change_cpu_bus ( )

◆ plat_pldm_sensor_change_dimm_dev()

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

◆ plat_pldm_sensor_change_ina_dev()

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

◆ plat_pldm_sensor_change_retimer_dev()

void plat_pldm_sensor_change_retimer_dev ( )

◆ plat_pldm_sensor_change_ssd_dev()

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

◆ plat_pldm_sensor_change_vr_dev()

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

◆ plat_pldm_sensor_clear_vr_fault()

void plat_pldm_sensor_clear_vr_fault ( uint8_t  vr_addr,
uint8_t  vr_bus,
uint8_t  page_cnt 
)
Here is the call graph for this function:

◆ plat_pldm_sensor_get_ina_dev()

uint8_t plat_pldm_sensor_get_ina_dev ( )
Here is the call graph for this function:

◆ plat_pldm_sensor_get_sensor_count()

int plat_pldm_sensor_get_sensor_count ( int  thread_id)

◆ plat_pldm_sensor_get_vr_dev()

uint8_t plat_pldm_sensor_get_vr_dev ( uint8_t *  vr_dev)