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 FRU_BOARD_PART_NUMBER_REG   0x60
 
#define FRU_BOARD_SERIAL_NUMBER_REG   0x61
 
#define FRU_BOARD_PRODUCT_NAME_REG   0x62
 
#define FRU_BOARD_CUSTOM_DATA_1_REG   0x63
 
#define FRU_BOARD_CUSTOM_DATA_2_REG   0x64
 
#define FRU_BOARD_CUSTOM_DATA_3_REG   0x65
 
#define FRU_BOARD_CUSTOM_DATA_4_REG   0x66
 
#define FRU_BOARD_CUSTOM_DATA_5_REG   0x67
 
#define FRU_BOARD_CUSTOM_DATA_6_REG   0x68
 
#define FRU_BOARD_CUSTOM_DATA_7_REG   0x69
 
#define FRU_BOARD_CUSTOM_DATA_8_REG   0x6A
 
#define FRU_BOARD_CUSTOM_DATA_9_REG   0x6B
 
#define FRU_BOARD_CUSTOM_DATA_10_REG   0x6C
 
#define FRU_PRODUCT_NAME_REG   0x70
 
#define FRU_PRODUCT_PART_NUMBER_REG   0x71
 
#define FRU_PRODUCT_PART_VERSION_REG   0x72
 
#define FRU_PRODUCT_SERIAL_NUMBER_REG   0x73
 
#define FRU_PRODUCT_ASSET_TAG_REG   0x74
 
#define FRU_PRODUCT_CUSTOM_DATA_1_REG   0x75
 
#define FRU_PRODUCT_CUSTOM_DATA_2_REG   0x76
 
#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_PWR_ALERT_THRESHOLD_TIME_REG   0x90
 
#define LEVEL_2_PWR_ALERT_THRESHOLD_TIME_REG   0x91
 
#define LEVEL_3_PWR_ALERT_THRESHOLD_TIME_REG   0x92
 
#define VR_POWER_READING_REG   0x93
 
#define MEDHA_SENSOR_VALUE_REG   0x94
 
#define POWER_CAPPING_METHOD_REG   0x95
 
#define MEDHA_POWER_SOURCE_REG   0x96
 
#define POLLING_RATE_TELEMETRY_REG   0x97
 
#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)
 
int get_cached_sensor_reading_by_sensor_number (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_power_capping_threshold_time_t
 
 plat_power_capping_method_t
 
 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

◆ FRU_BOARD_CUSTOM_DATA_10_REG

#define FRU_BOARD_CUSTOM_DATA_10_REG   0x6C

◆ FRU_BOARD_CUSTOM_DATA_1_REG

#define FRU_BOARD_CUSTOM_DATA_1_REG   0x63

◆ FRU_BOARD_CUSTOM_DATA_2_REG

#define FRU_BOARD_CUSTOM_DATA_2_REG   0x64

◆ FRU_BOARD_CUSTOM_DATA_3_REG

#define FRU_BOARD_CUSTOM_DATA_3_REG   0x65

◆ FRU_BOARD_CUSTOM_DATA_4_REG

#define FRU_BOARD_CUSTOM_DATA_4_REG   0x66

◆ FRU_BOARD_CUSTOM_DATA_5_REG

#define FRU_BOARD_CUSTOM_DATA_5_REG   0x67

◆ FRU_BOARD_CUSTOM_DATA_6_REG

#define FRU_BOARD_CUSTOM_DATA_6_REG   0x68

◆ FRU_BOARD_CUSTOM_DATA_7_REG

#define FRU_BOARD_CUSTOM_DATA_7_REG   0x69

◆ FRU_BOARD_CUSTOM_DATA_8_REG

#define FRU_BOARD_CUSTOM_DATA_8_REG   0x6A

◆ FRU_BOARD_CUSTOM_DATA_9_REG

#define FRU_BOARD_CUSTOM_DATA_9_REG   0x6B

◆ FRU_BOARD_PART_NUMBER_REG

#define FRU_BOARD_PART_NUMBER_REG   0x60

◆ FRU_BOARD_PRODUCT_NAME_REG

#define FRU_BOARD_PRODUCT_NAME_REG   0x62

◆ FRU_BOARD_SERIAL_NUMBER_REG

#define FRU_BOARD_SERIAL_NUMBER_REG   0x61

◆ FRU_PRODUCT_ASSET_TAG_REG

#define FRU_PRODUCT_ASSET_TAG_REG   0x74

◆ FRU_PRODUCT_CUSTOM_DATA_1_REG

#define FRU_PRODUCT_CUSTOM_DATA_1_REG   0x75

◆ FRU_PRODUCT_CUSTOM_DATA_2_REG

#define FRU_PRODUCT_CUSTOM_DATA_2_REG   0x76

◆ FRU_PRODUCT_NAME_REG

#define FRU_PRODUCT_NAME_REG   0x70

◆ FRU_PRODUCT_PART_NUMBER_REG

#define FRU_PRODUCT_PART_NUMBER_REG   0x71

◆ FRU_PRODUCT_PART_VERSION_REG

#define FRU_PRODUCT_PART_VERSION_REG   0x72

◆ FRU_PRODUCT_SERIAL_NUMBER_REG

#define FRU_PRODUCT_SERIAL_NUMBER_REG   0x73

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

#define LEVEL_1_PWR_ALERT_THRESHOLD_TIME_REG   0x90

◆ LEVEL_2_PWR_ALERT_THRESHOLD_TIME_REG

#define LEVEL_2_PWR_ALERT_THRESHOLD_TIME_REG   0x91

◆ LEVEL_3_PWR_ALERT_THRESHOLD_TIME_REG

#define LEVEL_3_PWR_ALERT_THRESHOLD_TIME_REG   0x92

◆ MEDHA_POWER_SOURCE_REG

#define MEDHA_POWER_SOURCE_REG   0x96

◆ MEDHA_SENSOR_VALUE_REG

#define MEDHA_SENSOR_VALUE_REG   0x94

◆ POLLING_RATE_TELEMETRY_REG

#define POLLING_RATE_TELEMETRY_REG   0x97

◆ POWER_CAPPING_METHOD_REG

#define POWER_CAPPING_METHOD_REG   0x95

◆ 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_cached_sensor_reading_by_sensor_number()

int get_cached_sensor_reading_by_sensor_number ( uint8_t  sensor_number)

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

plat_power_capping_method_t

◆ plat_power_capping_threshold_time_t

plat_power_capping_threshold_time_t

◆ 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