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
22/* SENSOR POLLING TIME(second) */
23#define POLL_TIME_BAT3V 3600
24
25/* SENSOR ADDRESS(7-bit)/OFFSET */
26#define TMP75_IN_ADDR (0x92 >> 1)
27#define TMP75_OUT_ADDR (0x94 >> 1)
28#define TMP75_FIO_ADDR (0x90 >> 1)
29#define SSD_ADDR (0xD4 >> 1)
30#define MPRO_ADDR (0x9E >> 1)
31
32#define ADM1278_ADDR (0x80 >> 1)
33#define LTC4282_ADDR (0x82 >> 1)
34#define TEMP_HSC_ADDR (0x98 >> 1)
35#define MP5990_ADDR (0xA0 >> 1)
36
37/* SENSOR OFFSET */
38#define TMP75_TEMP_OFFSET 0x00
39#define SSD_TEMP_OFFSET 0x00
40
41/* SENSOR NUMBER(1 based) - temperature */
42#define SENSOR_NUM_TEMP_TMP75_IN 0x1
43#define SENSOR_NUM_TEMP_TMP75_OUT 0x2
44#define SENSOR_NUM_TEMP_TMP75_FIO 0x3
45#define SENSOR_NUM_TEMP_CPU 0x4
46#define SENSOR_NUM_TEMP_SSD 0x5
47#define SENSOR_NUM_TEMP_HSC 0x6
48
49#define SENSOR_NUM_TEMP_DIMM_CH0 0x7
50#define SENSOR_NUM_TEMP_DIMM_CH1 0x8
51#define SENSOR_NUM_TEMP_DIMM_CH2 0x9
52#define SENSOR_NUM_TEMP_DIMM_CH3 0xA
53#define SENSOR_NUM_TEMP_DIMM_CH4 0xB
54#define SENSOR_NUM_TEMP_DIMM_CH5 0xC
55#define SENSOR_NUM_TEMP_DIMM_CH6 0xD
56#define SENSOR_NUM_TEMP_DIMM_CH7 0xE
57
58#define SENSOR_NUM_TEMP_PCP_VR 0xF
59#define SENSOR_NUM_TEMP_SOC_VR 0x10
60#define SENSOR_NUM_TEMP_VDDQ_DDR0123_VR 0x11
61#define SENSOR_NUM_TEMP_VDDQ_DDR4567_VR 0x12
62#define SENSOR_NUM_TEMP_D2D_VR 0x13
63#define SENSOR_NUM_TEMP_RC_DDR0_VR 0x14
64#define SENSOR_NUM_TEMP_RC_DDR1_VR 0x15
65#define SENSOR_NUM_TEMP_PCI_D_VR 0x16
66#define SENSOR_NUM_TEMP_PCI_A_VR 0x17
67
68/* SENSOR NUMBER(1 based) - voltage */
69#define SENSOR_NUM_VOL_HSCIN 0x18
70
71#define SENSOR_NUM_VOL_ADC0_P12V_STBY 0x19
72#define SENSOR_NUM_VOL_ADC1_SOC_RC_DDR0 0x1A
73#define SENSOR_NUM_VOL_ADC2_P3V3_STBY 0x1B
74#define SENSOR_NUM_VOL_ADC3_P0V75_PCP 0x1C
75#define SENSOR_NUM_VOL_ADC4_P3V_BAT 0x1D
76#define SENSOR_NUM_VOL_ADC5_P0V8_D2D 0x1E
77#define SENSOR_NUM_VOL_ADC8_EXT_VREF_ADC_S0 0x1F
78#define SENSOR_NUM_VOL_ADC9_P3V3_M2 0x20
79#define SENSOR_NUM_VOL_ADC10_P1V2_STBY 0x21
80#define SENSOR_NUM_VOL_ADC11_SOC_RC_DDR1 0x22
81#define SENSOR_NUM_VOL_ADC12_P12V_S0_DIMM0 0x23
82#define SENSOR_NUM_VOL_ADC13_P12V_S0_DIMM1 0x24
83#define SENSOR_NUM_VOL_ADC14_P5V_STBY 0x25
84
85#define SENSOR_NUM_VOL_PCP_VR 0x26
86#define SENSOR_NUM_VOL_SOC_VR 0x27
87#define SENSOR_NUM_VOL_VDDQ_DDR0123_VR 0x28
88#define SENSOR_NUM_VOL_VDDQ_DDR4567_VR 0x29
89#define SENSOR_NUM_VOL_D2D_VR 0x2A
90#define SENSOR_NUM_VOL_RC_DDR0_VR 0x2B
91#define SENSOR_NUM_VOL_RC_DDR1_VR 0x2C
92#define SENSOR_NUM_VOL_PCI_D_VR 0x2D
93#define SENSOR_NUM_VOL_PCI_A_VR 0x2E
94
95/* SENSOR NUMBER(1 based) - current */
96#define SENSOR_NUM_CUR_HSCOUT 0x2F
97#define SENSOR_NUM_CUR_PCP_VR 0x30
98#define SENSOR_NUM_CUR_SOC_VR 0x31
99#define SENSOR_NUM_CUR_VDDQ_DDR0123_VR 0x32
100#define SENSOR_NUM_CUR_VDDQ_DDR4567_VR 0x33
101#define SENSOR_NUM_CUR_D2D_VR 0x34
102#define SENSOR_NUM_CUR_RC_DDR0_VR 0x35
103#define SENSOR_NUM_CUR_RC_DDR1_VR 0x36
104#define SENSOR_NUM_CUR_PCI_D_VR 0x37
105#define SENSOR_NUM_CUR_PCI_A_VR 0x38
106
107/* SENSOR NUMBER(1 based) - power */
108#define SENSOR_NUM_PWR_CPU 0x39
109#define SENSOR_NUM_PWR_HSCIN 0x3A
110
111#define SENSOR_NUM_PWR_PCP_VR 0x3B
112#define SENSOR_NUM_PWR_SOC_VR 0x3C
113#define SENSOR_NUM_PWR_VDDQ_DDR0123_VR 0x3D
114#define SENSOR_NUM_PWR_VDDQ_DDR4567_VR 0x3E
115#define SENSOR_NUM_PWR_D2D_VR 0x3F
116#define SENSOR_NUM_PWR_RC_DDR0_VR 0x40
117#define SENSOR_NUM_PWR_RC_DDR1_VR 0x41
118#define SENSOR_NUM_PWR_PCI_D_VR 0x42
119#define SENSOR_NUM_PWR_PCI_A_VR 0x43
120
121#define SENSOR_NUM_PWR_DIMM_TOTAL 0x44 // temperary add
122
123#define SENSOR_NUM_PWR_DIMM_CH0 0x45
124#define SENSOR_NUM_PWR_DIMM_CH1 0x46
125#define SENSOR_NUM_PWR_DIMM_CH2 0x47
126#define SENSOR_NUM_PWR_DIMM_CH3 0x48
127#define SENSOR_NUM_PWR_DIMM_CH4 0x49
128#define SENSOR_NUM_PWR_DIMM_CH5 0x4A
129#define SENSOR_NUM_PWR_DIMM_CH6 0x4B
130#define SENSOR_NUM_PWR_DIMM_CH7 0x4C
131
132/* SENSOR NUMBER - sel */
133#define SENSOR_NUM_SYSTEM_STATUS 0x10
134#define SENSOR_NUM_POWER_ERROR 0x56
135#define SENSOR_NUM_PROC_FAIL 0x65
136#define SENSOR_NUM_VR_OCP 0x71
137#define SENSOR_NUM_VR_HOT 0xB2
138#define SENSOR_NUM_VR_FAULT 0xB3
139#define SENSOR_NUM_PMIC_ERROR 0xB4
140#define SENSOR_NUM_CPU_FAULT 0xC0
141#define SENSOR_NUM_CPU_SHD 0xC1
142
143uint8_t plat_get_config_size();
144void load_sensor_config(void);
145
146#endif
void load_sensor_config(void)
Definition: sensor.c:1405
uint8_t plat_get_config_size()
Definition: sensor.c:1400