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
22extern struct k_mutex vr_page_mutex;
23#define VR_PAGE_MUTEX_TIMEOUT_MS 1000
24
25/* define config for sensors */
26#define TMP75_IN_ADDR (0x92 >> 1)
27#define TMP75_OUT_ADDR (0x94 >> 1)
28#define TMP75_FIO_ADDR (0x90 >> 1)
29#define TMP431_ADDR (0x98 >> 1)
30#define TMP75_TEMP_OFFSET 0x00
31
32#define SSD0_ADDR (0xD4 >> 1)
33#define SSD0_OFFSET 0x00
34
35#define PCH_ADDR (0x2C >> 1)
36#define ME_SENSOR_NUM_TEMP_PCH 0x08
37#define CPU_PECI_ADDR 0x30
38
39#define VCCIN_VCCSA_ADDR (0xC0 >> 1)
40#define VCCIO_P3V3_STBY_ADDR (0xC4 >> 1)
41#define VDDQ_ABC_ADDR (0xC8 >> 1)
42#define VDDQ_DEF_ADDR (0xCC >> 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
48#define LTC4282_ADDR (0x80 >> 1)
49#define MPS_MP5990_ADDR (0x40 >> 1)
50
51/* YV3 DL sensor numbers */
52#define SENSOR_NUM_T_MB1 0x01
53#define SENSOR_NUM_T_MB2 0x02
54#define SENSOR_NUM_T_FIO 0x03
55#define SENSOR_NUM_NM_T_PCH 0x04
56#define SENSOR_NUM_T_CPU0 0x05
57#define SENSOR_NUM_T_CPU0_THERMAL_MARGIN 0x0D
58#define SENSOR_NUM_T_CPU0_TJMAX 0x25
59#define SENSOR_NUM_T_CPU0_PKG_PWR 0x1E
60
61#define SENSOR_NUM_NM_T_DIMMA 0x06
62#define SENSOR_NUM_NM_T_DIMMB 0x07
63#define SENSOR_NUM_NM_T_DIMMC 0x09
64#define SENSOR_NUM_NM_T_DIMMD 0x0A
65#define SENSOR_NUM_NM_T_DIMME 0x0B
66#define SENSOR_NUM_NM_T_DIMMF 0x0C
67
68#define SENSOR_NUM_T_DIMM_ABC_VR 0x14
69#define SENSOR_NUM_T_DIMM_DEF_VR 0x15
70#define SENSOR_NUM_CURR_DIMM_ABC_VR 0x35
71#define SENSOR_NUM_CURR_DIMM_DEF_VR 0x36
72#define SENSOR_NUM_V_DIMM_ABC_VR 0x2C
73#define SENSOR_NUM_V_DIMM_DEF_VR 0x2D
74#define SENSOR_NUM_PWR_DIMM_ABC_VR 0x3F
75#define SENSOR_NUM_PWR_DIMM_DEF_VR 0x42
76
77#define SENSOR_NUM_T_NVME0 0x1F
78#define SENSOR_NUM_T_NVME1 0x0E
79
80#define SENSOR_NUM_TEP_PVCCIN_VR 0x10
81#define SENSOR_NUM_CUR_PVCCIN_VR 0x31
82#define SENSOR_NUM_VOL_PVCCIN_VR 0x27
83#define SENSOR_NUM_PWR_PVCCIN_VR 0x3A
84
85#define SENSOR_NUM_TEP_PVCCSA_VR 0x11
86#define SENSOR_NUM_CUR_PVCCSA_VR 0x32
87#define SENSOR_NUM_VOL_PVCCSA_VR 0x28
88#define SENSOR_NUM_PWR_PVCCSA_VR 0x3C
89
90#define SENSOR_NUM_TEP_PVCCIO_VR 0x12
91#define SENSOR_NUM_CUR_PVCCIO_VR 0x33
92#define SENSOR_NUM_VOL_PVCCIO_VR 0x29
93#define SENSOR_NUM_PWR_PVCCIO_VR 0x3D
94
95#define SENSOR_NUM_TEP_P3V3_STBY_VR 0x13
96#define SENSOR_NUM_CUR_P3V3_STBY_VR 0x34
97#define SENSOR_NUM_VOL_P3V3_STBY_VR 0x2A
98#define SENSOR_NUM_PWR_P3V3_STBY_VR 0x3E
99
100#define SENSOR_NUM_HSC_TEMP 0x0F
101#define SENSOR_NUM_HSC_VIN 0x26
102#define SENSOR_NUM_HSC_COUT 0x30
103#define SENSOR_NUM_HSC_EIN 0x39
104#define SENSOR_NUM_HSC_PIN 0x2E
105
106/***********************ADC***********************/
107#define SENSOR_NUM_V_12 0x20
108#define SENSOR_NUM_V_3_3 0xFF
109#define SENSOR_NUM_V_3_3_S 0x22
110#define SENSOR_NUM_V_1_5 0x23
111#define SENSOR_NUM_V_BAT 0x21
112#define SENSOR_NUM_V_PCH 0x24
113
114/**********************Event**********************/
115
116#define SENSOR_NUM_SYS_STA 0x46
117#define SENSOR_NUM_POWER_ERR 0x56
118#define SENSOR_NUM_PROC_FAIL 0x65
119#define SENSOR_NUM_VR_HOT 0xB4
120#define SENSOR_NUM_CPUDIMM_HOT 0xB3
121#define SENSOR_NUM_NMI 0xEA
122#define SENSOR_NUM_CATERR 0xEB
123
124enum {
127};
128
129uint8_t plat_get_config_size();
130void load_sensor_config(void);
132
133#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
struct k_mutex vr_page_mutex
Definition: plat_sensor_table.c:38
@ VR_INF
Definition: plat_sensor_table.h:125
@ VR_RNS
Definition: plat_sensor_table.h:126