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 config for sensors */
24#define TMP75_IN_ADDR (0x92 >> 1)
25#define TMP75_OUT_ADDR (0x94 >> 1)
26#define TMP75_FIO_ADDR (0x90 >> 1)
27#define TMP431_ADDR (0x98 >> 1)
28#define TMP75_TEMP_OFFSET 0x00
29#define SSD0_ADDR (0xD4 >> 1)
30#define SSD0_OFFSET 0x00
31#define ADI_ADM1278_ADDR (0x80 >> 1)
32#define ADI_LTC4286_ADDR (0x84 >> 1)
33#define MPS_MP5990_ADDR (0x16 >> 1)
34#define MPS_MP5990_OFFSET_EFUSE_CFG 0xC4
35#define ADI_LTC4282_ADDR (0x88 >> 1)
36#define PCH_ADDR (0x2C >> 1)
37#define ME_SENSOR_NUM_TEMP_PCH 0x08
38#define PVCCD_HV_ADDR (0xC4 >> 1)
39#define PVCCINFAON_ADDR (0xEC >> 1)
40#define PVCCFA_EHV_ADDR (0xEC >> 1)
41#define PVCCIN_ADDR (0xC0 >> 1)
42#define PVCCFA_EHV_FIVRA_ADDR (0xC0 >> 1)
43#define VR_VOL_CMD 0x8B
44#define VR_CUR_CMD 0x8C
45#define VR_TEMP_CMD 0x8D
46#define VR_PWR_CMD 0x96
47#define SSD0_MUX_ADDR (0xE2 >> 1)
48#define SSD0_CHANNEL 2
49#define CPU_PECI_ADDR 0x30
50#define TEMP_CPU_MARGIN_INDEX 0x02
51#define TEMP_CPU_MARGIN_PARAM 0x00FF
52#define TEMP_CPU_TJMAX_INDEX 0x10
53#define TEMP_CPU_TJMAX_PARAM 0x0000
54#define TEMP_DIMM_INDEX 0x0E
55#define TEMP_DIMM_A0_PARAM 0x0000
56#define TEMP_DIMM_A2_PARAM 0x0002
57#define TEMP_DIMM_A3_PARAM 0x0003
58#define TEMP_DIMM_A4_PARAM 0x0004
59#define TEMP_DIMM_A6_PARAM 0x0006
60#define TEMP_DIMM_A7_PARAM 0x0007
61#define DPV2_16_ADDR 0x50
62
63/* threshold sensor number, 1 based */
64#define SENSOR_NUM_TEMP_TMP75_IN 0x01
65#define SENSOR_NUM_TEMP_TMP75_OUT 0x02
66#define SENSOR_NUM_TEMP_TMP75_FIO 0x03
67#define SENSOR_NUM_TEMP_PCH 0x04
68#define SENSOR_NUM_TEMP_CPU 0x05
69#define SENSOR_NUM_TEMP_DIMM_A0 0x06
70#define SENSOR_NUM_TEMP_DIMM_A2 0x07
71#define SENSOR_NUM_TEMP_DIMM_A3 0x09
72#define SENSOR_NUM_TEMP_DIMM_A4 0x0A
73#define SENSOR_NUM_TEMP_DIMM_A6 0x0B
74#define SENSOR_NUM_TEMP_DIMM_A7 0x0C
75#define SENSOR_NUM_TEMP_SSD0 0x0D
76#define SENSOR_NUM_TEMP_HSC 0x0E
77#define SENSOR_NUM_TEMP_CPU_MARGIN 0x14
78#define SENSOR_NUM_TEMP_CPU_TJMAX 0x15
79#define SENSOR_NUM_TEMP_PVCCIN 0x0F
80#define SENSOR_NUM_TEMP_PVCCFA_EHV_FIVRA 0x10
81#define SENSOR_NUM_TEMP_PVCCFA_EHV 0x11
82#define SENSOR_NUM_TEMP_PVCCD_HV 0x12
83#define SENSOR_NUM_TEMP_PVCCINFAON 0x13
84
85#define SENSOR_NUM_VOL_STBY12V 0x20
86#define SENSOR_NUM_VOL_BAT3V 0x21
87#define SENSOR_NUM_VOL_STBY3V 0x22
88#define SENSOR_NUM_VOL_STBY1V05 0x24
89#define SENSOR_NUM_VOL_STBY1V8 0x23
90#define SENSOR_NUM_VOL_STBY5V 0x25
91#define SENSOR_NUM_VOL_DIMM12V 0x26
92#define SENSOR_NUM_VOL_STBY1V2 0x27
93#define SENSOR_NUM_VOL_M2_3V3 0x28
94#define SENSOR_NUM_VOL_HSCIN 0x29
95#define SENSOR_NUM_VOL_PVCCIN 0x2A
96#define SENSOR_NUM_VOL_PVCCFA_EHV_FIVRA 0x2C
97#define SENSOR_NUM_VOL_PVCCFA_EHV 0x2D
98#define SENSOR_NUM_VOL_PVCCD_HV 0x2E
99#define SENSOR_NUM_VOL_PVCCINFAON 0x2F
100
101#define SENSOR_NUM_CUR_HSCOUT 0x30
102#define SENSOR_NUM_CUR_PVCCIN 0x31
103#define SENSOR_NUM_CUR_PVCCFA_EHV_FIVRA 0x32
104#define SENSOR_NUM_CUR_PVCCFA_EHV 0x33
105#define SENSOR_NUM_CUR_PVCCD_HV 0x34
106#define SENSOR_NUM_CUR_PVCCINFAON 0x35
107
108#define SENSOR_NUM_PWR_CPU 0x38
109#define SENSOR_NUM_PWR_HSCIN 0x39
110#define SENSOR_NUM_PWR_PVCCIN 0x3A
111#define SENSOR_NUM_PWR_PVCCFA_EHV_FIVRA 0x3C
112#define SENSOR_NUM_PWR_PVCCFA_EHV 0x3D
113#define SENSOR_NUM_PWR_PVCCD_HV 0x3E
114#define SENSOR_NUM_PWR_PVCCINFAON 0x3F
115#define SENSOR_NUM_PWR_DIMMA0_PMIC 0x1E
116#define SENSOR_NUM_PWR_DIMMA2_PMIC 0x1F
117#define SENSOR_NUM_PWR_DIMMA3_PMIC 0x36
118#define SENSOR_NUM_PWR_DIMMA4_PMIC 0x37
119#define SENSOR_NUM_PWR_DIMMA6_PMIC 0x42
120#define SENSOR_NUM_PWR_DIMMA7_PMIC 0x47
121
122#define SENSOR_NUM_SYSTEM_STATUS 0x10
123#define SENSOR_NUM_POWER_ERROR 0x56
124#define SENSOR_NUM_PROC_FAIL 0x65
125#define SENSOR_NUM_VR_HOT 0xB2
126#define SENSOR_NUM_CPUDIMM_HOT 0xB3
127#define SENSOR_NUM_PMIC_ERROR 0xB4
128#define SENSOR_NUM_CATERR 0xEB
129#define SENSOR_NUM_NMI 0xEA
130
131/* threshold sensor number, DPV2 */
132#define SENSOR_NUM_VOL_DPV2_12VIN 0x91
133#define SENSOR_NUM_VOL_DPV2_12VOUT 0x92
134#define SENSOR_NUM_CUR_DPV2OUT 0x93
135#define SENSOR_NUM_TEMP_DPV2_EFUSE 0x94
136#define SENSOR_NUM_PWR_DPV2 0x95
137
138#define POLL_TIME_BAT3V 3600 // sec
139
140typedef struct _dimm_pmic_mapping_cfg {
141 uint8_t dimm_sensor_num;
144
145uint8_t plat_get_config_size();
147void load_sensor_config(void);
149uint8_t get_dimm_status(uint8_t dimm_index);
150
151#endif
void load_sensor_config(void)
Definition: sensor.c:1405
uint8_t plat_get_config_size()
Definition: sensor.c:1400
uint8_t pal_get_extend_sensor_config(void)
Definition: sensor.c:1076
uint8_t sensor_num
Definition: storage_handler.h:6
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
bool disable_dimm_pmic_sensor(uint8_t sensor_num)
Definition: plat_sensor_table.c:389
uint8_t get_dimm_status(uint8_t dimm_index)
Definition: plat_sensor_table.c:700