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_IN_ADDR (0x9C >> 1)
24#define TMP75_OUT_ADDR (0x9E >> 1)
25#define HSC_ADDR (0x80 >> 1)
26#define MEDUSA_ADDR (0x88 >> 1)
27#define FAN_ADDR 0x00
28
29#define TMP75_TEMP_OFFSET 0x00
30#define HSC_VOL_OFFSET 0x88
31#define HSC_CUR_OFFSET 0x8C
32#define HSC_TEMP_OFFSET 0x8D
33#define HSC_PWR_OFFSET 0x97
34#define HSC_PEAK_IOUT_OFFSET 0xD0
35#define HSC_PEAK_PIN_OFFSET 0xDA
36#define HSC_EIN_EXT_OFFSET 0xDC
37
38#define MEDUSA_VOL_OUT_OFFSET 0x3A
39#define MEDUSA_VOL_IN_OFFSET 0x3A
40#define MEDUSA_CUR_OFFSET 0x40
41#define MEDUSA_PWR_OFFSET 0x46
42
43/* Temperature sensor number, 1 based */
44#define SENSOR_NUM_TEMP_TMP75_IN 0xD1
45#define SENSOR_NUM_TEMP_TMP75_OUT 0xD2
46#define SENSOR_NUM_TEMP_HSC 0xD3
47
48/* Voltage sensor number */
49#define SENSOR_NUM_VOL_P5V_STBY 0xD4
50#define SENSOR_NUM_VOL_P12V_STBY 0xD5
51#define SENSOR_NUM_VOL_P3V3_STBY 0xD6
52#define SENSOR_NUM_VOL_P5V_USB 0xE9
53#define SENSOR_NUM_VOL_P1V2_BIC_STBY 0xD9
54#define SENSOR_NUM_VOL_P1V0_STBY 0xDA
55#define SENSOR_NUM_VOL_MEDUSA_12V_IN 0xDB
56#define SENSOR_NUM_VOL_MEDUSA_12V_OUT 0xD7
57#define SENSOR_NUM_VOL_HSCIN 0xDC
58
59/* Power sensor number */
60#define SENSOR_NUM_PWR_MEDUSA_12V 0xD8
61#define SENSOR_NUM_PWR_HSCIN 0xDD
62
63/* Current sensor number */
64#define SENSOR_NUM_CUR_MEDUSA_IOUT 0xDF
65#define SENSOR_NUM_CUR_HSCOUT 0xDE
66#define SENSOR_NUM_CUR_P12V_FAN 0xE8
67
68#define SENSOR_NUM_HSC_EIN 0xEA
69#define SENSOR_NUM_HSC_PEAK_IOUT 0xEB
70#define SENSOR_NUM_HSC_PEAK_PIN 0xEC
71
72#define SENSOR_NUM_MEDUSA_VDELTA 0xED
73#define SENSOR_NUM_PDB_CL_VDELTA 0xEE
74#define SENSOR_NUM_PDB_BB_VDELTA 0xEF
75#define SENSOR_NUM_CUR_LEAKAGE 0xF0
76#define SENSOR_NUM_FAN_PWR 0xF1
77
78#define SAMPLE_COUNT_FAN_IOUT 100
79#define SENSOR_NUM_POWER_DETECT 0xE1
80#define SENSOR_NUM_BUTTON_DETECT 0xE2
81
82uint8_t plat_get_config_size();
83void load_sensor_config(void);
84
85#endif
void load_sensor_config(void)
Definition: sensor.c:1405
uint8_t plat_get_config_size()
Definition: sensor.c:1400