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/* define config for sensors */
23#define TMP75_MB_ADDR (0x92 >> 1)
24#define TMP75_ASIC_ADDR (0x98 >> 1)
25#define ASIC_ADDR (0x00 >> 1) // TBU
26#define INA233_12V_ADDR (0x8A >> 1)
27#define INA233_3V3_ADDR (0x80 >> 1)
28#define VR_A0V9_ADDR (0xC8 >> 1)
29#define VR_A0V8_ADDR (0xC8 >> 1)
30#define VR_D0V8_ADDR (0xB0 >> 1)
31#define VR_VDDQAB_ADDR (0xB0 >> 1)
32#define VR_VDDQCD_ADDR (0xB4 >> 1)
33
34#define ASIC_OFFSET 0x00 // TBU
35#define TMP75_TEMP_OFFSET 0x00
36#define VR_PAGE_OFFSET 0x00
37#define SMBUS_VOL_CMD 0x8B
38#define SMBUS_CUR_CMD 0x8C
39#define SMBUS_TEMP_CMD 0x8D
40#define SMBUS_PWR_CMD 0x96
41
42#define CHIP_TEMP_OFFSET 0x00
43#define DIMM_TEMP_OFFSET 0x01
44
45#define DIMMA_SPD_ADDR 0x50
46#define DIMMB_SPD_ADDR 0x51
47#define DIMMC_SPD_ADDR 0x52
48#define DIMMD_SPD_ADDR 0x53
49
50/* threshold sensor number, 1 based */
51#define SENSOR_NUM_TEMP_TMP75 0x50
52#define SENSOR_NUM_TEMP_CXL 0x51
53#define SENSOR_NUM_TEMP_DIMMA 0x53
54#define SENSOR_NUM_TEMP_DIMMB 0x54
55#define SENSOR_NUM_TEMP_DIMMC 0x55
56#define SENSOR_NUM_POWER_ERROR 0x56
57#define SENSOR_NUM_TEMP_DIMMD 0x57
58#define SENSOR_NUM_TEMP_VR0V9A 0x58
59#define SENSOR_NUM_TEMP_VR0V8A 0x59
60#define SENSOR_NUM_TEMP_VR0V8D 0x5A
61#define SENSOR_NUM_TEMP_VRVDDQAB 0x5B
62#define SENSOR_NUM_TEMP_VRVDDQCD 0x5C
63
64#define SENSOR_NUM_VOL_STBY12V 0x5D
65#define SENSOR_NUM_VOL_STBY3V3 0x5E
66#define SENSOR_NUM_VOL_STBY5V 0x5F
67#define SENSOR_NUM_VOL_STBY1V2 0x60
68#define SENSOR_NUM_VOL_ASIC_1V8 0x61
69#define SENSOR_NUM_VOL_VR0V9A 0x62
70#define SENSOR_NUM_VOL_VR0V8A 0x64
71#define SENSOR_NUM_VOL_VR0V8D 0x65
72#define SENSOR_NUM_VOL_VRVDDQAB 0x66
73#define SENSOR_NUM_VOL_VRVDDQCD 0x67
74#define SENSOR_NUM_VOL_PVPP_AB 0x68
75#define SENSOR_NUM_VOL_PVPP_CD 0x69
76#define SENSOR_NUM_VOL_PVTT_AB 0x6A
77#define SENSOR_NUM_VOL_PVTT_CD 0x6B
78
79#define SENSOR_NUM_CUR_STBY12V 0x6C
80#define SENSOR_NUM_CUR_STBY3V3 0x6D
81#define SENSOR_NUM_CUR_VR0V9A 0x6E
82#define SENSOR_NUM_CUR_VR0V8A 0x6F
83#define SENSOR_NUM_CUR_VR0V8D 0x70
84#define SENSOR_NUM_CUR_VRVDDQAB 0x71
85#define SENSOR_NUM_CUR_VRVDDQCD 0x72
86
87#define SENSOR_NUM_VR_ALERT 0x72
88
89#define SENSOR_NUM_PWR_STBY12V 0x73
90#define SENSOR_NUM_PWR_STBY3V3 0x74
91#define SENSOR_NUM_PWR_VR0V9A 0x75
92#define SENSOR_NUM_PWR_VR0V8A 0x76
93#define SENSOR_NUM_PWR_VR0V8D 0x77
94#define SENSOR_NUM_PWR_VRVDDQAB 0x78
95#define SENSOR_NUM_PWR_VRVDDQCD 0x79
96
97extern uint8_t plat_get_config_size();
98extern void load_sensor_config(void);
99int check_vr_type(void);
100
101enum {
106};
107
108#endif
void load_sensor_config(void)
Definition: sensor.c:1405
uint8_t plat_get_config_size()
Definition: sensor.c:1400
@ PWR_INA233
Definition: plat_sensor_table.h:213
@ VR_INF
Definition: plat_sensor_table.h:125
@ VR_RNS
Definition: plat_sensor_table.h:126
int check_vr_type(void)
Definition: plat_sensor_table.c:324
@ PWR_SGY
Definition: plat_sensor_table.h:105