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

Functions

 LOG_MODULE_REGISTER (plat_sensor_table)
 
void load_sensor_config (void)
 
void check_vr_type (uint8_t index)
 
void pal_extend_sensor_config ()
 
bool pal_is_time_to_poll (uint8_t sensor_num, int poll_time)
 
uint8_t get_hsc_pwr_reading (int *reading)
 
bool disable_dimm_pmic_sensor (uint8_t sensor_num)
 

Variables

sensor_poll_time_cfg diff_poll_time_sensor_table []
 
dimm_pmic_mapping_cfg dimm_pmic_map_table []
 
sensor_cfg plat_sensor_config []
 
const int SENSOR_CONFIG_SIZE = ARRAY_SIZE(plat_sensor_config)
 

Function Documentation

◆ check_vr_type()

void check_vr_type ( uint8_t  index)

◆ disable_dimm_pmic_sensor()

bool disable_dimm_pmic_sensor ( uint8_t  sensor_num)
Here is the call graph for this function:

◆ get_hsc_pwr_reading()

uint8_t get_hsc_pwr_reading ( int *  reading)
Here is the call graph for this function:

◆ load_sensor_config()

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

◆ 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.

Here is the call graph for this function:

◆ pal_is_time_to_poll()

bool pal_is_time_to_poll ( uint8_t  sensor_num,
int  poll_time 
)

Variable Documentation

◆ diff_poll_time_sensor_table

sensor_poll_time_cfg diff_poll_time_sensor_table[]
Initial value:
= {
}
#define SENSOR_NUM_VOL_BAT3V
Definition: plat_sensor_table.h:77

◆ dimm_pmic_map_table

dimm_pmic_mapping_cfg dimm_pmic_map_table[]
Initial value:
= {
}
#define SENSOR_NUM_PWR_DIMMC_PMIC
Definition: plat_sensor_table.h:107
#define SENSOR_NUM_TEMP_DIMM_E
Definition: plat_sensor_table.h:67
#define SENSOR_NUM_TEMP_DIMM_A
Definition: plat_sensor_table.h:65
#define SENSOR_NUM_PWR_DIMMA_PMIC
Definition: plat_sensor_table.h:106
#define SENSOR_NUM_TEMP_DIMM_G
Definition: plat_sensor_table.h:68
#define SENSOR_NUM_PWR_DIMMG_PMIC
Definition: plat_sensor_table.h:109
#define SENSOR_NUM_PWR_DIMME_PMIC
Definition: plat_sensor_table.h:108
#define SENSOR_NUM_TEMP_DIMM_C
Definition: plat_sensor_table.h:66

◆ plat_sensor_config

sensor_cfg plat_sensor_config[]

◆ SENSOR_CONFIG_SIZE

const int SENSOR_CONFIG_SIZE = ARRAY_SIZE(plat_sensor_config)