OpenBIC
OpenSource Bridge-IC
plat_i2c_target.h File Reference
#include <drivers/i2c.h>
#include "hal_i2c_target.h"
Include dependency graph for plat_i2c_target.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _i2c_target_command_mapping
 
struct  _plat_sensor_reading_data_
 
struct  vr_level_t
 
struct  vr_controller_t
 
struct  _telemetry_info_
 
struct  voltage_rail_mapping_sensor
 

Macros

#define TARGET_ENABLE   1
 
#define TARGET_DISABLE   0
 
#define SENSOR_INIT_DATA_0_REG   0x00
 
#define SENSOR_INIT_DATA_1_REG   0x01
 
#define SENSOR_READING_0_REG   0x02
 
#define SENSOR_READING_1_REG   0x03
 
#define SENSOR_READING_2_REG   0x04
 
#define SENSOR_READING_3_REG   0x05
 
#define INVENTORY_IDS_REG   0x06
 
#define STRAP_CAPABILTITY_REG   0x08
 
#define WRITE_STRAP_PIN_VALUE_REG   0x09
 
#define I2C_BRIDGE_COMMAND_REG   0x40
 
#define I2C_BRIDGE_COMMAND_STATUS_REG   0x41
 
#define I2C_BRIDGE_COMMAND_RESPONSE_REG   0x42
 
#define CONTROL_VOL_VR_ASIC_P0V75_VDDPHY_HBM0246_REG   0x80
 
#define CONTROL_VOL_VR_ASIC_P0V75_VDDPHY_HBM1357_REG   0x81
 
#define CONTROL_VOL_VR_ASIC_P1V1_VDDQC_HBM0246_REG   0x82
 
#define CONTROL_VOL_VR_ASIC_P1V1_VDDQC_HBM1357_REG   0x83
 
#define CONTROL_VOL_VR_ASIC_P0V4_VDDQL_HBM0246_REG   0x84
 
#define CONTROL_VOL_VR_ASIC_P0V4_VDDQL_HBM1357_REG   0x85
 
#define CONTROL_VOL_VR_ASIC_P1V8_VPP_HBM0246_REG   0x86
 
#define CONTROL_VOL_VR_ASIC_P1V8_VPP_HBM1357_REG   0x87
 
#define CONTROL_VOL_VR_ASIC_P0V85_MEDHA0_VDD_REG   0x88
 
#define CONTROL_VOL_VR_ASIC_P0V85_MEDHA1_VDD_REG   0x89
 
#define LEVEL_1_2_3_PWR_ALERT_THRESHOLD_REG   0x90
 
#define LEVEL_1_2_3_PWR_ALERT_TIME_WINDOW_REG   0x91
 
#define VR_POWER_READING_REG   0x93
 
#define TRAY_INFO_REG   0x98
 
#define SET_SENSOR_POLLING_COMMAND_REG   0xF0
 

Typedefs

typedef struct _i2c_target_command_mapping i2c_target_command_mapping
 
typedef struct _plat_sensor_reading_data_ plat_sensor_reading_data
 
typedef struct _telemetry_info_ telemetry_info
 
typedef enum i2c_bridge_command_error i2c_bridge_command_error
 
typedef struct voltage_rail_mapping_sensor voltage_rail_mapping_sensor
 

Enumerations

enum  VR_INFO_TYPE { VR_THRESHOLD , VR_TIME_WINDOW , VR_INFO_TYPE_MAX }
 
enum  VR_PWR_CONTROLLER { MEDHA0 , MEDHA1 , VR_PWR_CONTROLLER_MAX }
 
enum  VR_ALERT_LEVEL { VR_ALERT_LEVEL_1 , VR_ALERT_LEVEL_2 , VR_ALERT_LEVEL_3 , VR_ALERT_MAX }
 
enum  i2c_bridge_command_error {
  I2C_BRIDGE_COMMAND_SUCCESS = 0 , I2C_BRIDGE_COMMAND_IN_PROCESS , I2C_BRIDGE_COMMAND_FAILURE , I2C_BRIDGE_COMMAND_SUCCESS = 0 ,
  I2C_BRIDGE_COMMAND_IN_PROCESS , I2C_BRIDGE_COMMAND_FAILURE
}
 

Functions

struct __attribute__ ((__packed__))
 
void plat_telemetry_table_init (void)
 
void update_sensor_reading_by_sensor_number (uint8_t sensor_number)
 
void update_strap_capability_table (void)
 
float get_sensor_reading_cache_as_float (uint8_t sensor_number)
 

Variables

 plat_inventory_ids
 
 plat_sensor_init_data
 
 sensor_entry
 
 plat_sensor_reading
 
 strap_entry
 
 plat_strap_capability
 
 plat_i2c_bridge_command_config
 
 plat_i2c_bridge_command_status
 
 plat_i2c_bridge_command_response_data
 
 plat_control_voltage
 
 plat_control_sensor_polling
 

Macro Definition Documentation

◆ CONTROL_VOL_VR_ASIC_P0V4_VDDQL_HBM0246_REG

#define CONTROL_VOL_VR_ASIC_P0V4_VDDQL_HBM0246_REG   0x84

◆ CONTROL_VOL_VR_ASIC_P0V4_VDDQL_HBM1357_REG

#define CONTROL_VOL_VR_ASIC_P0V4_VDDQL_HBM1357_REG   0x85

◆ CONTROL_VOL_VR_ASIC_P0V75_VDDPHY_HBM0246_REG

#define CONTROL_VOL_VR_ASIC_P0V75_VDDPHY_HBM0246_REG   0x80

◆ CONTROL_VOL_VR_ASIC_P0V75_VDDPHY_HBM1357_REG

#define CONTROL_VOL_VR_ASIC_P0V75_VDDPHY_HBM1357_REG   0x81

◆ CONTROL_VOL_VR_ASIC_P0V85_MEDHA0_VDD_REG

#define CONTROL_VOL_VR_ASIC_P0V85_MEDHA0_VDD_REG   0x88

◆ CONTROL_VOL_VR_ASIC_P0V85_MEDHA1_VDD_REG

#define CONTROL_VOL_VR_ASIC_P0V85_MEDHA1_VDD_REG   0x89

◆ CONTROL_VOL_VR_ASIC_P1V1_VDDQC_HBM0246_REG

#define CONTROL_VOL_VR_ASIC_P1V1_VDDQC_HBM0246_REG   0x82

◆ CONTROL_VOL_VR_ASIC_P1V1_VDDQC_HBM1357_REG

#define CONTROL_VOL_VR_ASIC_P1V1_VDDQC_HBM1357_REG   0x83

◆ CONTROL_VOL_VR_ASIC_P1V8_VPP_HBM0246_REG

#define CONTROL_VOL_VR_ASIC_P1V8_VPP_HBM0246_REG   0x86

◆ CONTROL_VOL_VR_ASIC_P1V8_VPP_HBM1357_REG

#define CONTROL_VOL_VR_ASIC_P1V8_VPP_HBM1357_REG   0x87

◆ I2C_BRIDGE_COMMAND_REG

#define I2C_BRIDGE_COMMAND_REG   0x40

◆ I2C_BRIDGE_COMMAND_RESPONSE_REG

#define I2C_BRIDGE_COMMAND_RESPONSE_REG   0x42

◆ I2C_BRIDGE_COMMAND_STATUS_REG

#define I2C_BRIDGE_COMMAND_STATUS_REG   0x41

◆ INVENTORY_IDS_REG

#define INVENTORY_IDS_REG   0x06

◆ LEVEL_1_2_3_PWR_ALERT_THRESHOLD_REG

#define LEVEL_1_2_3_PWR_ALERT_THRESHOLD_REG   0x90

◆ LEVEL_1_2_3_PWR_ALERT_TIME_WINDOW_REG

#define LEVEL_1_2_3_PWR_ALERT_TIME_WINDOW_REG   0x91

◆ SENSOR_INIT_DATA_0_REG

#define SENSOR_INIT_DATA_0_REG   0x00

◆ SENSOR_INIT_DATA_1_REG

#define SENSOR_INIT_DATA_1_REG   0x01

◆ SENSOR_READING_0_REG

#define SENSOR_READING_0_REG   0x02

◆ SENSOR_READING_1_REG

#define SENSOR_READING_1_REG   0x03

◆ SENSOR_READING_2_REG

#define SENSOR_READING_2_REG   0x04

◆ SENSOR_READING_3_REG

#define SENSOR_READING_3_REG   0x05

◆ SET_SENSOR_POLLING_COMMAND_REG

#define SET_SENSOR_POLLING_COMMAND_REG   0xF0

◆ STRAP_CAPABILTITY_REG

#define STRAP_CAPABILTITY_REG   0x08

◆ TARGET_DISABLE

#define TARGET_DISABLE   0

◆ TARGET_ENABLE

#define TARGET_ENABLE   1

◆ TRAY_INFO_REG

#define TRAY_INFO_REG   0x98

◆ VR_POWER_READING_REG

#define VR_POWER_READING_REG   0x93

◆ WRITE_STRAP_PIN_VALUE_REG

#define WRITE_STRAP_PIN_VALUE_REG   0x09

Typedef Documentation

◆ i2c_bridge_command_error

◆ i2c_target_command_mapping

◆ plat_sensor_reading_data

◆ telemetry_info

◆ voltage_rail_mapping_sensor

Enumeration Type Documentation

◆ i2c_bridge_command_error

Enumerator
I2C_BRIDGE_COMMAND_SUCCESS 
I2C_BRIDGE_COMMAND_IN_PROCESS 
I2C_BRIDGE_COMMAND_FAILURE 
I2C_BRIDGE_COMMAND_SUCCESS 
I2C_BRIDGE_COMMAND_IN_PROCESS 
I2C_BRIDGE_COMMAND_FAILURE 

◆ VR_ALERT_LEVEL

Enumerator
VR_ALERT_LEVEL_1 
VR_ALERT_LEVEL_2 
VR_ALERT_LEVEL_3 
VR_ALERT_MAX 

◆ VR_INFO_TYPE

Enumerator
VR_THRESHOLD 
VR_TIME_WINDOW 
VR_INFO_TYPE_MAX 

◆ VR_PWR_CONTROLLER

Enumerator
MEDHA0 
MEDHA1 
VR_PWR_CONTROLLER_MAX 

Function Documentation

◆ __attribute__()

struct __attribute__ ( (__packed__)  )

◆ get_sensor_reading_cache_as_float()

float get_sensor_reading_cache_as_float ( uint8_t  sensor_number)
Here is the call graph for this function:

◆ plat_telemetry_table_init()

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

◆ update_sensor_reading_by_sensor_number()

void update_sensor_reading_by_sensor_number ( uint8_t  sensor_number)
Here is the call graph for this function:

◆ update_strap_capability_table()

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

Variable Documentation

◆ plat_control_sensor_polling

plat_control_sensor_polling

◆ plat_control_voltage

plat_control_voltage

◆ plat_i2c_bridge_command_config

plat_i2c_bridge_command_config

◆ plat_i2c_bridge_command_response_data

plat_i2c_bridge_command_response_data

◆ plat_i2c_bridge_command_status

plat_i2c_bridge_command_status

◆ plat_inventory_ids

plat_inventory_ids

◆ plat_sensor_init_data

plat_sensor_init_data

◆ plat_sensor_reading

plat_sensor_reading

◆ plat_strap_capability

plat_strap_capability

◆ sensor_entry

sensor_entry

◆ strap_entry

strap_entry