OpenBIC
OpenSource Bridge-IC
pmic.h File Reference
#include <stdio.h>
#include <stdint.h>
#include <string.h>
Include dependency graph for pmic.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _memory_write_read_req_
 

Macros

#define MAX_MEMORY_DATA   32
 
#define PMIC_WRITE_DATA_LEN   14
 
#define PMIC_READ_DATA_LEN   12
 
#define CMD_SMBUS_READ_MEMORY   0x47
 
#define CMD_SMBUS_WRITE_MEMORY   0x48
 
#define SET_DEV_REPORT_POWER   0x45
 
#define SET_DEV_REPORT_TOTAL   0xC2
 
#define PMIC_TOTAL_INDIV_ADDR_VAL   0x0000001A
 
#define PMIC_PWR_CURR_ADDR_VAL   0x0000001B
 
#define PMIC_ADC_ADDR_VAL   0x00000030
 
#define PMIC_SWA_ADDR_VAL   0x0000000C
 
#define PMIC_POR_ERROR_LOG_ADDR_VAL   0x00000005
 
#define PMIC_ENABLE_ADC_BIT   BIT(7)
 
#define PMIC_COMMAND_DELAY_MSEC   250
 
#define INTEL_ID   0x00000157
 
#define PMIC_ADDR_SIZE   0x1
 
#define PMIC_DATA_LEN   0x1
 
#define PMIC_TOTAL_POWER_MW   125
 

Typedefs

typedef struct _memory_write_read_req_ memory_write_read_req
 

Functions

uint8_t * compose_memory_write_read_req (uint8_t smbus_identifier, uint8_t smbus_address, uint32_t addr_value, uint8_t *write_data, uint8_t write_len)
 
int pmic_ipmb_transfer (int *total_pmic_power, uint8_t seq_source, uint8_t netFn, uint8_t command, uint8_t source_inft, uint8_t target_inft, uint16_t data_len, uint8_t *data)
 
int pal_set_pmic_error_flag (uint8_t dimm_id, uint8_t error_type)
 

Macro Definition Documentation

◆ CMD_SMBUS_READ_MEMORY

#define CMD_SMBUS_READ_MEMORY   0x47

◆ CMD_SMBUS_WRITE_MEMORY

#define CMD_SMBUS_WRITE_MEMORY   0x48

◆ INTEL_ID

#define INTEL_ID   0x00000157

◆ MAX_MEMORY_DATA

#define MAX_MEMORY_DATA   32

◆ PMIC_ADC_ADDR_VAL

#define PMIC_ADC_ADDR_VAL   0x00000030

◆ PMIC_ADDR_SIZE

#define PMIC_ADDR_SIZE   0x1

◆ PMIC_COMMAND_DELAY_MSEC

#define PMIC_COMMAND_DELAY_MSEC   250

◆ PMIC_DATA_LEN

#define PMIC_DATA_LEN   0x1

◆ PMIC_ENABLE_ADC_BIT

#define PMIC_ENABLE_ADC_BIT   BIT(7)

◆ PMIC_POR_ERROR_LOG_ADDR_VAL

#define PMIC_POR_ERROR_LOG_ADDR_VAL   0x00000005

◆ PMIC_PWR_CURR_ADDR_VAL

#define PMIC_PWR_CURR_ADDR_VAL   0x0000001B

◆ PMIC_READ_DATA_LEN

#define PMIC_READ_DATA_LEN   12

◆ PMIC_SWA_ADDR_VAL

#define PMIC_SWA_ADDR_VAL   0x0000000C

◆ PMIC_TOTAL_INDIV_ADDR_VAL

#define PMIC_TOTAL_INDIV_ADDR_VAL   0x0000001A

◆ PMIC_TOTAL_POWER_MW

#define PMIC_TOTAL_POWER_MW   125

◆ PMIC_WRITE_DATA_LEN

#define PMIC_WRITE_DATA_LEN   14

◆ SET_DEV_REPORT_POWER

#define SET_DEV_REPORT_POWER   0x45

◆ SET_DEV_REPORT_TOTAL

#define SET_DEV_REPORT_TOTAL   0xC2

Typedef Documentation

◆ memory_write_read_req

Function Documentation

◆ compose_memory_write_read_req()

uint8_t * compose_memory_write_read_req ( uint8_t  smbus_identifier,
uint8_t  smbus_address,
uint32_t  addr_value,
uint8_t *  write_data,
uint8_t  write_len 
)

◆ pal_set_pmic_error_flag()

int pal_set_pmic_error_flag ( uint8_t  dimm_id,
uint8_t  error_type 
)

◆ pmic_ipmb_transfer()

int pmic_ipmb_transfer ( int *  total_pmic_power,
uint8_t  seq_source,
uint8_t  netFn,
uint8_t  command,
uint8_t  source_inft,
uint8_t  target_inft,
uint16_t  data_len,
uint8_t *  data 
)
Here is the call graph for this function: