OpenBIC
OpenSource Bridge-IC
plat_sensor_table.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_SENSOR_TABLE_H
18#define PLAT_SENSOR_TABLE_H
19
20#include <stdint.h>
21#include "sensor.h"
22
23#define INLET_TEP75_ADDR (0x92 >> 1)
24#define OUTLET_TEP75_ADDR (0x98 >> 1)
25#define FIO_ADDR (0x90 >> 1)
26#define HSC_ADM1278_ADDR (0x22 >> 1)
27#define HSC_MP5990_ADDR (0x16 >> 1)
28#define PVCCIN_ADDR (0xC0 >> 1)
29#define EHV_ADDR (0xC0 >> 1)
30#define FIVRA_ADDR (0xDC >> 1)
31#define INF_ADDR (0xDC >> 1)
32#define PVCCD0_ADDR (0xD4 >> 1)
33#define PVCCD1_ADDR (0xD4 >> 1)
34#define EVT_FIVRA_ADDR (0xC4 >> 1)
35#define EVT_PVCCD0_ADDR (0xE4 >> 1)
36#define CPU_PECI_ADDR 0x30
37#define SSD0_ADDR (0xD4 >> 1)
38#define SSD0_OFFSET 0x00
39
40#define TMP75_TEMP_OFFSET 0x0
41#define VR_TEMP_OFFSET 0x8D
42#define VR_VOL_OFFSET 0x8B
43#define VR_CUR_OFFSET 0x8C
44#define VR_PWR_OFFSET 0x96
45
46#define POLL_TIME_BAT3V 3600 // sec
47
48// Threshold sensor number definition
49#define SENSOR_NUM_MB_INLET_TEMP_C 0x1
50#define SENSOR_NUM_MB_OUTLET_TEMP_C 0x2
51#define SENSOR_NUM_FIO_FRONT_TEMP_C 0x3
52#define SENSOR_NUM_MB_SOC_CPU_TEMP_C 0x4
53#define SENSOR_NUM_MB_DIMMA0_TEMP_C 0x5
54#define SENSOR_NUM_MB_DIMMA1_TEMP_C 0x6
55#define SENSOR_NUM_MB_DIMMA2_TEMP_C 0x7
56#define SENSOR_NUM_MB_DIMMA3_TEMP_C 0x8
57#define SENSOR_NUM_MB_DIMMA4_TEMP_C 0x9
58#define SENSOR_NUM_MB_DIMMA5_TEMP_C 0xA
59#define SENSOR_NUM_MB_DIMMA6_TEMP_C 0xB
60#define SENSOR_NUM_MB_DIMMA7_TEMP_C 0xC
61#define SENSOR_NUM_MB_SSD0_TEMP_C 0xD
62#define SENSOR_NUM_MB_HSC_TEMP_C 0xE
63#define SENSOR_NUM_MB_VR_VCCIN_TEMP_C 0xF
64#define SENSOR_NUM_MB_VR_EHV_TEMP_C 0x10
65#define SENSOR_NUM_MB_VR_FIVRA_TEMP_C 0x11
66#define SENSOR_NUM_MB_VR_VCCINF_TEMP_C 0x12
67#define SENSOR_NUM_MB_VR_VCCD0_TEMP_C 0x13
68#define SENSOR_NUM_MB_VR_VCCD1_TEMP_C 0x14
69#define SENSOR_NUM_MB_SOC_THERMAL_MARGIN_C 0x15
70#define SENSOR_NUM_MB_SOC_TJMAX_C 0x16
71#define SENSOR_NUM_MB_ADC_P12V_STBY_VOLT_V 0x17
72#define SENSOR_NUM_MB_ADC_P3V_BAT_VOLT_V 0x18
73#define SENSOR_NUM_MB_ADC_P3V3_STBY_VOLT_V 0x19
74#define SENSOR_NUM_MB_ADC_P1V8_STBY_VOLT_V 0x1A
75#define SENSOR_NUM_MB_ADC_P1V05_STBY_VOLT_V 0x1B
76#define SENSOR_NUM_MB_HSC_INPUT_VOLT_V 0x1C
77#define SENSOR_NUM_MB_VR_VCCIN_VOLT_V 0x1D
78#define SENSOR_NUM_MB_VR_VCCINF_VOLT_V 0x1E
79#define SENSOR_NUM_MB_VR_FIVRA_VOLT_V 0x1F
80#define SENSOR_NUM_MB_VR_VCCD0_VOLT_V 0x20
81#define SENSOR_NUM_MB_VR_VCCD1_VOLT_V 0x21
82#define SENSOR_NUM_MB_VR_EHV_VOLT_V 0x22
83#define SENSOR_NUM_MB_ADC_VNN_VOLT_V 0x23
84#define SENSOR_NUM_MB_ADC_P5V_STBY_VOLT_V 0x24
85#define SENSOR_NUM_MB_ADC_P12V_DIMM_VOLT_V 0x25
86#define SENSOR_NUM_MB_ADC_P1V2_STBY_VOLT_V 0x26
87#define SENSOR_NUM_MB_ADC_P3V3_M2_VOLT_V 0x27
88#define SENSOR_NUM_MB_HSC_OUTPUT_CURR_A 0x28
89#define SENSOR_NUM_MB_VR_VCCIN_CURR_A 0x29
90#define SENSOR_NUM_MB_VR_EHV_CURR_A 0x2A
91#define SENSOR_NUM_MB_VR_FIVRA_CURR_A 0x2B
92#define SENSOR_NUM_MB_VR_VCCINF_CURR_A 0x2C
93#define SENSOR_NUM_MB_VR_VCCD0_CURR_A 0x2D
94#define SENSOR_NUM_MB_VR_VCCD1_CURR_A 0x2E
95#define SENSOR_NUM_MB_HSC_INPUT_PWR_W 0x2F
96#define SENSOR_NUM_MB_VR_VCCIN_PWR_W 0x30
97#define SENSOR_NUM_MB_VR_EHV_PWR_W 0x31
98#define SENSOR_NUM_MB_VR_FIVRA_PWR_W 0x32
99#define SENSOR_NUM_MB_VR_VCCINF_PWR_W 0x33
100#define SENSOR_NUM_MB_VR_VCCD0_PWR_W 0x34
101#define SENSOR_NUM_MB_VR_VCCD1_PWR_W 0x35
102#define SENSOR_NUM_MB_VR_DIMMA0_PMIC_PWR_W 0x36
103#define SENSOR_NUM_MB_VR_DIMMA1_PMIC_PWR_W 0x37
104#define SENSOR_NUM_MB_VR_DIMMA2_PMIC_PWR_W 0x38
105#define SENSOR_NUM_MB_VR_DIMMA3_PMIC_PWR_W 0x39
106#define SENSOR_NUM_MB_VR_DIMMA4_PMIC_PWR_W 0x3A
107#define SENSOR_NUM_MB_VR_DIMMA5_PMIC_PWR_W 0x3B
108#define SENSOR_NUM_MB_VR_DIMMA6_PMIC_PWR_W 0x3C
109#define SENSOR_NUM_MB_VR_DIMMA7_PMIC_PWR_W 0x3D
110#define SENSOR_NUM_MB_SOC_CPU_PWR_W 0x3E
111#define SENSOR_NUM_MB_TOTAL_DIMM_PWR_W 0x3F
112
113// Event-only sensor number definition
114#define SENSOR_NUM_SYSTEM_STATUS 0x10
115#define SENSOR_NUM_END_OF_POST 0x11
116#define SENSOR_NUM_CPU0_THERM_STATUS 0x1C
117#define SENSOR_NUM_POWER_ERROR 0x56
118#define SENSOR_NUM_PROC_FAIL 0x65
119#define SENSOR_NUM_VR_HOT 0xB2
120#define SENSOR_NUM_CPUDIMM_HOT 0xB3
121#define SENSOR_NUM_PMIC_ERROR 0xB4
122#define SENSOR_NUM_CATERR 0xEB
123
124typedef struct _dimm_pmic_mapping_cfg {
125 uint8_t dimm_sensor_num;
128
129uint8_t get_dimm_status(uint8_t dimm_index);
130
131#endif
Definition: plat_sensor_table.h:128
uint8_t mapping_pmic_sensor_num
Definition: plat_sensor_table.h:130
uint8_t dimm_sensor_num
Definition: plat_sensor_table.h:129
struct _dimm_pmic_mapping_cfg dimm_pmic_mapping_cfg
uint8_t get_dimm_status(uint8_t dimm_index)
Definition: plat_sensor_table.c:700