OpenBIC
OpenSource Bridge-IC
plat_sensor_table.c File Reference
#include <string.h>
#include "ast_adc.h"
#include "sensor.h"
#include "pmbus.h"
#include "intel_peci.h"
#include "hal_gpio.h"
#include "plat_class.h"
#include "plat_gpio.h"
#include "plat_i2c.h"
#include "plat_i3c.h"
#include "plat_dimm.h"
#include "plat_sensor_table.h"
#include "plat_hook.h"
#include <logging/log.h>
Include dependency graph for plat_sensor_table.c:

Functions

 LOG_MODULE_REGISTER (plat_sensor_table)
 
uint8_t pal_get_extend_sensor_config ()
 
void pal_extend_sensor_config ()
 
uint8_t get_dimm_status (uint8_t dimm_index)
 

Variables

dimm_pmic_mapping_cfg dimm_pmic_map_table []
 
sensor_cfg plat_sensor_config []
 
sensor_cfg adm1278_sensor_config_table []
 
sensor_cfg mp5990_sensor_config_table []
 
const int SENSOR_CONFIG_SIZE = ARRAY_SIZE(plat_sensor_config)
 

Function Documentation

◆ get_dimm_status()

uint8_t get_dimm_status ( uint8_t  dimm_index)

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_sensor_table  )

◆ pal_extend_sensor_config()

void pal_extend_sensor_config ( void  )

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.

◆ pal_get_extend_sensor_config()

uint8_t pal_get_extend_sensor_config ( void  )

Variable Documentation

◆ adm1278_sensor_config_table

sensor_cfg adm1278_sensor_config_table[]
Initial value:
= {
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, NULL, NULL, NULL, NULL,
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, NULL, NULL, NULL, NULL,
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, NULL, NULL, NULL, NULL,
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, NULL, NULL, NULL, NULL,
}
#define I2C_BUS2
Definition: plat_i2c.h:25
@ PMBUS_READ_IOUT
Definition: pmbus.h:118
@ PMBUS_READ_TEMPERATURE_1
Definition: pmbus.h:119
@ PMBUS_READ_PIN
Definition: pmbus.h:129
@ PMBUS_READ_VIN
Definition: pmbus.h:114
@ ENABLE_SENSOR_POLLING
Definition: sensor.h:197
@ SENSOR_INIT_STATUS
Definition: sensor.h:241
#define POLL_TIME_DEFAULT
Definition: sensor.h:48
@ sensor_dev_adm1278
Definition: sensor.h:122
#define SAMPLE_COUNT_DEFAULT
Definition: sensor.h:46
adm1278_init_arg adm1278_init_args[]
Definition: plat_hook.c:44
bool stby_access(uint8_t sensor_number)
Definition: sensor.c:1119
#define SENSOR_NUM_MB_HSC_TEMP_C
Definition: plat_sensor_table.h:62
#define SENSOR_NUM_MB_HSC_INPUT_VOLT_V
Definition: plat_sensor_table.h:76
#define SENSOR_NUM_MB_HSC_OUTPUT_CURR_A
Definition: plat_sensor_table.h:88
#define HSC_ADM1278_ADDR
Definition: plat_sensor_table.h:26
#define SENSOR_NUM_MB_HSC_INPUT_PWR_W
Definition: plat_sensor_table.h:95

◆ dimm_pmic_map_table

dimm_pmic_mapping_cfg dimm_pmic_map_table[]
Initial value:
= {
}
#define SENSOR_NUM_MB_VR_DIMMA4_PMIC_PWR_W
Definition: plat_sensor_table.h:106
#define SENSOR_NUM_MB_DIMMA6_TEMP_C
Definition: plat_sensor_table.h:59
#define SENSOR_NUM_MB_DIMMA2_TEMP_C
Definition: plat_sensor_table.h:55
#define SENSOR_NUM_MB_VR_DIMMA0_PMIC_PWR_W
Definition: plat_sensor_table.h:102
#define SENSOR_NUM_MB_VR_DIMMA7_PMIC_PWR_W
Definition: plat_sensor_table.h:109
#define SENSOR_NUM_MB_DIMMA0_TEMP_C
Definition: plat_sensor_table.h:53
#define SENSOR_NUM_MB_DIMMA1_TEMP_C
Definition: plat_sensor_table.h:54
#define SENSOR_NUM_MB_VR_DIMMA2_PMIC_PWR_W
Definition: plat_sensor_table.h:104
#define SENSOR_NUM_MB_VR_DIMMA5_PMIC_PWR_W
Definition: plat_sensor_table.h:107
#define SENSOR_NUM_MB_VR_DIMMA1_PMIC_PWR_W
Definition: plat_sensor_table.h:103
#define SENSOR_NUM_MB_VR_DIMMA3_PMIC_PWR_W
Definition: plat_sensor_table.h:105
#define SENSOR_NUM_MB_DIMMA4_TEMP_C
Definition: plat_sensor_table.h:57
#define SENSOR_NUM_MB_DIMMA5_TEMP_C
Definition: plat_sensor_table.h:58
#define SENSOR_NUM_MB_DIMMA7_TEMP_C
Definition: plat_sensor_table.h:60
#define SENSOR_NUM_MB_DIMMA3_TEMP_C
Definition: plat_sensor_table.h:56
#define SENSOR_NUM_MB_VR_DIMMA6_PMIC_PWR_W
Definition: plat_sensor_table.h:108

◆ mp5990_sensor_config_table

◆ plat_sensor_config

sensor_cfg plat_sensor_config[]

◆ SENSOR_CONFIG_SIZE

const int SENSOR_CONFIG_SIZE = ARRAY_SIZE(plat_sensor_config)