OpenBIC
OpenSource Bridge-IC
plat_dimm.h File Reference
#include "plat_i3c.h"
Include dependency graph for plat_dimm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  dimm_info
 

Macros

#define DIMM_SPD_A_G_ADDR   (0xA0 >> 1)
 
#define DIMM_SPD_B_H_ADDR   (0xA2 >> 1)
 
#define DIMM_SPD_C_I_ADDR   (0xA4 >> 1)
 
#define DIMM_SPD_D_J_ADDR   (0xA6 >> 1)
 
#define DIMM_SPD_E_K_ADDR   (0xA8 >> 1)
 
#define DIMM_SPD_F_L_ADDR   (0xAA >> 1)
 
#define DIMM_PMIC_A_G_ADDR   0x48
 
#define DIMM_PMIC_B_H_ADDR   0x49
 
#define DIMM_PMIC_C_I_ADDR   0x4A
 
#define DIMM_PMIC_D_J_ADDR   0x4B
 
#define DIMM_PMIC_E_K_ADDR   0x4C
 
#define DIMM_PMIC_F_L_ADDR   0x4D
 
#define CPLD_ADDR   0x21
 
#define MAX_LEN_I3C_GET_PMIC_ERR   47
 
#define MAX_LEN_I3C_GET_PMIC_PWR   1
 
#define MAX_LEN_I3C_GET_SPD_TEMP   2
 
#define DIMM_I3C_MUX_CONTROL_OFFSET   0x0C
 
#define I3C_MUX_BIC_TO_DIMMA_TO_F   0x02
 
#define I3C_MUX_BIC_TO_DIMMG_TO_L   0x03
 
#define I3C_MUX_CPU_TO_DIMM   0x00
 
#define DIMM_I3C_MUX_STATUS_OFFSET   0x0D
 
#define I3C_MUX_STATUS_ENABLE_FUNCTION_CHECK   7
 
#define I3C_MUX_STATUS_PD_SPD_1_REMOTE_EN   6
 
#define I3C_MUX_STATUS_PD_SPD_2_REMOTE_EN   5
 
#define I3C_MUX_STATUS_SPD_MASK   0x60
 
#define I3C_DIMM_MUTEX_TIMEOUT_MS   1000
 
#define GET_DIMM_INFO_TIME_MS   1000
 
#define GET_DIMM_INFO_STACK_SIZE   2304
 

Typedefs

typedef struct dimm_info dimm_info
 

Enumerations

enum  NUMBER_DIMM_TEMP {
  NUM_DIMM_A_TEMP = 0x0005 , NUM_DIMM_B_TEMP , NUM_DIMM_C_TEMP , NUM_DIMM_D_TEMP ,
  NUM_DIMM_E_TEMP , NUM_DIMM_F_TEMP , NUM_DIMM_G_TEMP , NUM_DIMM_H_TEMP ,
  NUM_DIMM_I_TEMP , NUM_DIMM_J_TEMP , NUM_DIMM_K_TEMP , NUM_DIMM_L_TEMP
}
 
enum  NUMBER_DIMM_PMIC_PWR {
  NUM_DIMM_A_PMIC_PWR = 0x0056 , NUM_DIMM_B_PMIC_PWR , NUM_DIMM_C_PMIC_PWR , NUM_DIMM_D_PMIC_PWR ,
  NUM_DIMM_E_PMIC_PWR , NUM_DIMM_F_PMIC_PWR , NUM_DIMM_G_PMIC_PWR , NUM_DIMM_H_PMIC_PWR ,
  NUM_DIMM_I_PMIC_PWR , NUM_DIMM_J_PMIC_PWR , NUM_DIMM_K_PMIC_PWR , NUM_DIMM_L_PMIC_PWR
}
 
enum  DIMM_ID {
  DIMM_ID_A0 = 0 , DIMM_ID_A2 , DIMM_ID_A3 , DIMM_ID_A4 ,
  DIMM_ID_A6 , DIMM_ID_A7 , DIMM_ID_UNKNOWN = 0xff , DIMM_ID_A0 = 0 ,
  DIMM_ID_A1 , DIMM_ID_A2 , DIMM_ID_A3 , DIMM_ID_A4 ,
  DIMM_ID_A5 , DIMM_ID_A6 , DIMM_ID_A7 , DIMM_ID_UNKNOWN = 0xff ,
  DIMM_ID_A , DIMM_ID_B , DIMM_ID_C , DIMM_ID_D ,
  DIMM_ID_E , DIMM_ID_F , DIMM_ID_G , DIMM_ID_H ,
  DIMM_ID_I , DIMM_ID_J , DIMM_ID_K , DIMM_ID_L ,
  DIMM_ID_MAX , DIMM_ID_UNKNOWN = 0xff
}
 
enum  DIMM_PRSNT_STATUS { DIMM_PRSNT , DIMM_NOT_PRSNT }
 
enum  DIMM_DEVICE_TYPE {
  DIMM_SPD = 0x00 , DIMM_SPD_NVM = 0x01 , DIMM_PMIC = 0x02 , DIMM_SPD = 0x00 ,
  DIMM_SPD_NVM = 0x01 , DIMM_PMIC = 0x02 , DIMM_SPD = 0x00 , DIMM_SPD_NVM = 0x01 ,
  DIMM_PMIC = 0x02
}
 

Functions

void start_get_dimm_info_thread ()
 
void get_dimm_info_handler ()
 
uint8_t sensor_num_map_dimm_id (uint8_t sensor_num)
 
int pal_get_spd_temp (uint8_t sensor_num, uint8_t *data)
 
int pal_get_pmic_pwr (uint8_t sensor_num, uint8_t *data)
 
void clear_unaccessible_dimm_data (uint8_t dimm_id)
 
int switch_i3c_dimm_mux (uint8_t i3c_ctrl_mux_data)
 
int check_i3c_dimm_mux (uint8_t *status_data)
 
int all_brocast_ccc (I3C_MSG *i3c_msg)
 
int init_dimm_prsnt_status ()
 
uint8_t get_dimm_present (uint8_t dimm_id)
 

Variables

struct k_mutex i3c_dimm_mutex
 
uint8_t spd_i3c_addr_list []
 
uint8_t pmic_i3c_addr_list []
 

Macro Definition Documentation

◆ CPLD_ADDR

#define CPLD_ADDR   0x21

◆ DIMM_I3C_MUX_CONTROL_OFFSET

#define DIMM_I3C_MUX_CONTROL_OFFSET   0x0C

◆ DIMM_I3C_MUX_STATUS_OFFSET

#define DIMM_I3C_MUX_STATUS_OFFSET   0x0D

◆ DIMM_PMIC_A_G_ADDR

#define DIMM_PMIC_A_G_ADDR   0x48

◆ DIMM_PMIC_B_H_ADDR

#define DIMM_PMIC_B_H_ADDR   0x49

◆ DIMM_PMIC_C_I_ADDR

#define DIMM_PMIC_C_I_ADDR   0x4A

◆ DIMM_PMIC_D_J_ADDR

#define DIMM_PMIC_D_J_ADDR   0x4B

◆ DIMM_PMIC_E_K_ADDR

#define DIMM_PMIC_E_K_ADDR   0x4C

◆ DIMM_PMIC_F_L_ADDR

#define DIMM_PMIC_F_L_ADDR   0x4D

◆ DIMM_SPD_A_G_ADDR

#define DIMM_SPD_A_G_ADDR   (0xA0 >> 1)

◆ DIMM_SPD_B_H_ADDR

#define DIMM_SPD_B_H_ADDR   (0xA2 >> 1)

◆ DIMM_SPD_C_I_ADDR

#define DIMM_SPD_C_I_ADDR   (0xA4 >> 1)

◆ DIMM_SPD_D_J_ADDR

#define DIMM_SPD_D_J_ADDR   (0xA6 >> 1)

◆ DIMM_SPD_E_K_ADDR

#define DIMM_SPD_E_K_ADDR   (0xA8 >> 1)

◆ DIMM_SPD_F_L_ADDR

#define DIMM_SPD_F_L_ADDR   (0xAA >> 1)

◆ GET_DIMM_INFO_STACK_SIZE

#define GET_DIMM_INFO_STACK_SIZE   2304

◆ GET_DIMM_INFO_TIME_MS

#define GET_DIMM_INFO_TIME_MS   1000

◆ I3C_DIMM_MUTEX_TIMEOUT_MS

#define I3C_DIMM_MUTEX_TIMEOUT_MS   1000

◆ I3C_MUX_BIC_TO_DIMMA_TO_F

#define I3C_MUX_BIC_TO_DIMMA_TO_F   0x02

◆ I3C_MUX_BIC_TO_DIMMG_TO_L

#define I3C_MUX_BIC_TO_DIMMG_TO_L   0x03

◆ I3C_MUX_CPU_TO_DIMM

#define I3C_MUX_CPU_TO_DIMM   0x00

◆ I3C_MUX_STATUS_ENABLE_FUNCTION_CHECK

#define I3C_MUX_STATUS_ENABLE_FUNCTION_CHECK   7

◆ I3C_MUX_STATUS_PD_SPD_1_REMOTE_EN

#define I3C_MUX_STATUS_PD_SPD_1_REMOTE_EN   6

◆ I3C_MUX_STATUS_PD_SPD_2_REMOTE_EN

#define I3C_MUX_STATUS_PD_SPD_2_REMOTE_EN   5

◆ I3C_MUX_STATUS_SPD_MASK

#define I3C_MUX_STATUS_SPD_MASK   0x60

◆ MAX_LEN_I3C_GET_PMIC_ERR

#define MAX_LEN_I3C_GET_PMIC_ERR   47

◆ MAX_LEN_I3C_GET_PMIC_PWR

#define MAX_LEN_I3C_GET_PMIC_PWR   1

◆ MAX_LEN_I3C_GET_SPD_TEMP

#define MAX_LEN_I3C_GET_SPD_TEMP   2

Typedef Documentation

◆ dimm_info

typedef struct dimm_info dimm_info

Enumeration Type Documentation

◆ DI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MP 
NUM_DIMM_J_TEMP 
NUM_DIMM_K_TEMP 
NUM_DIMM_L_TEMP 

Function Documentation

◆ all_brocast_ccc()

int all_brocast_ccc ( I3C_MSG i3c_msg)
Here is the call graph for this function:

◆ check_i3c_dimm_mux()

int check_i3c_dimm_mux ( uint8_t *  status_data)
Here is the call graph for this function:

◆ clear_unaccessible_dimm_data()

void clear_unaccessible_dimm_data ( uint8_t  dimm_id)

◆ get_dimm_info_handler()

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

◆ get_dimm_present()

uint8_t get_dimm_present ( uint8_t  dimm_id)

◆ init_dimm_prsnt_status()

int init_dimm_prsnt_status ( )
Here is the call graph for this function:

◆ pal_get_pmic_pwr()

int pal_get_pmic_pwr ( uint8_t  sensor_num,
uint8_t *  data 
)
Here is the call graph for this function:

◆ pal_get_spd_temp()

int pal_get_spd_temp ( uint8_t  sensor_num,
uint8_t *  data 
)
Here is the call graph for this function:

◆ sensor_num_map_dimm_id()

uint8_t sensor_num_map_dimm_id ( uint8_t  sensor_num)

◆ start_get_dimm_info_thread()

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

◆ switch_i3c_dimm_mux()

int switch_i3c_dimm_mux ( uint8_t  i3c_ctrl_mux_data)
Here is the call graph for this function:

Variable Documentation

◆ i3c_dimm_mutex

struct k_mutex i3c_dimm_mutex
extern

◆ pmic_i3c_addr_list

uint8_t pmic_i3c_addr_list[]
extern

◆ spd_i3c_addr_list

uint8_t spd_i3c_addr_list[]
extern