OpenBIC
OpenSource Bridge-IC
plat_pldm_sensor.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef PLAT_PLDM_SENSOR_H
18#define PLAT_PLDM_SENSOR_H
19
20#include "pdr.h"
21
22#define ADDR_TMP75_INLET (0x92 >> 1)
23#define ADDR_TMP461_CXL1 (0x98 >> 1)
24#define ADDR_TMP461_CXL2 (0x90 >> 1)
25#define ADDR_INA233_P12V_STBY (0x80 >> 1)
26#define ADDR_INA233_E1S (0x8A >> 1)
27#define ADDR_VR_P0V85_ASIC1 (0xC4 >> 1)
28#define ADDR_VR_P0V8_ASIC1 (0xB4 >> 1)
29#define ADDR_VR_PVDDQ_AB_ASIC1 (0xC4 >> 1)
30#define ADDR_VR_PVDDQ_CD_ASIC1 (0xB4 >> 1)
31#define ADDR_VR_P0V85_ASIC2 (0xEC >> 1)
32#define ADDR_VR_P0V8_ASIC2 (0xE4 >> 1)
33#define ADDR_VR_PVDDQ_AB_ASIC2 (0xEC >> 1)
34#define ADDR_VR_PVDDQ_CD_ASIC2 (0xE4 >> 1)
35#define ADDR_NVME (0xD4 >> 1)
36#define ADDR_MAX11617 (0x6A >> 1)
37#define ADDR_ADC128D818 (0x3A >> 1)
38
39#define OFFSET_TMP75_TEMP 0x00
40#define OFFSET_TMP461_TEMP 0x00
41#define OFFSET_NVME_TEMP 0x00
42
43#define SENSOR_ID_ASIC1_DIMM_A_TEMP 0x000C
44#define SENSOR_ID_ASIC1_DIMM_B_TEMP 0x000D
45#define SENSOR_ID_ASIC1_DIMM_C_TEMP 0x000E
46#define SENSOR_ID_ASIC1_DIMM_D_TEMP 0x000F
47#define SENSOR_ID_ASIC2_DIMM_A_TEMP 0x0010
48#define SENSOR_ID_ASIC2_DIMM_B_TEMP 0x0011
49#define SENSOR_ID_ASIC2_DIMM_C_TEMP 0x0012
50#define SENSOR_ID_ASIC2_DIMM_D_TEMP 0x0013
51
52#define UPDATE_INTERVAL_1S 1
53#define UPDATE_INTERVAL_3S 3
54#define UPDATE_INTERVAL_10S 10
55
56#define CXL_DIMM_MUTEX_WAITING_TIME_MS 100
57
66};
67
71};
72
73int plat_pldm_sensor_get_sensor_count(int thread_id);
76uint8_t plat_pldm_sensor_get_vr_dev(uint8_t *vr_dev);
78
79#endif
uint8_t eid
Definition: mctp_ctrl.h:1
GET_VR_DEV_STATUS
Definition: plat_pldm_sensor.h:228
@ GET_VR_DEV_FAILED
Definition: plat_pldm_sensor.h:230
@ GET_VR_DEV_SUCCESS
Definition: plat_pldm_sensor.h:229
int plat_pldm_sensor_get_sensor_count(int thread_id)
Definition: plat_pldm_sensor.c:9074
SENSOR_THREAD_LIST
Definition: plat_pldm_sensor.h:221
@ MAX_SENSOR_THREAD_ID
Definition: plat_pldm_sensor.h:225
@ VR_SENSOR_THREAD_ID
Definition: plat_pldm_sensor.h:223
void plat_pldm_sensor_get_pdr_numeric_sensor(int thread_id, int sensor_num, PDR_numeric_sensor *numeric_sensor_table)
Definition: plat_pldm_sensor.c:9097
uint8_t plat_pldm_sensor_get_vr_dev(uint8_t *vr_dev)
Definition: plat_pldm_sensor.c:6884
PDR_numeric_sensor * numeric_sensor_table
Definition: pdr.c:16
PDR_numeric_sensor
Definition: pdr.h:115
uint8_t sensor_num
Definition: storage_handler.h:6
@ TMP_SENSOR_THREAD_ID
Definition: plat_pldm_sensor.h:44
@ DIMM_SENSOR_THREAD_ID
Definition: plat_pldm_sensor.h:48
@ INA233_SENSOR_THREAD_ID
Definition: plat_pldm_sensor.h:46
@ ADC_SENSOR_THREAD_ID
Definition: plat_pldm_sensor.h:45
@ ADC_MONITOR_SENSOR_THREAD_ID
Definition: plat_pldm_sensor.h:64
void update_entity_name_with_eid(uint8_t eid)
Definition: plat_pldm_sensor.c:6535