OpenBIC
OpenSource Bridge-IC
plat_sdr_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_SDR_TABLE_H
18#define PLAT_SDR_TABLE_H
19
20#include <stdint.h>
21
22#define MAX_SENSOR_SIZE 60
23
24/* ----- E1S ----- */
25#define INA231_POWER_SEN_FACTOR_RB 0xF0
26#define INA231_POWER_UCT 0x96
27
28#define INA231_VOLTAGE_UCT 0x2F
29#define INA231_VOLTAGE_LCT 0x25
30
31#define ADC_12V_SEN_FACTOR_M 0x3E
32#define ADC_12V_SEN_FACTOR_RB 0xD0
33#define ADC_12V_UCT 0xD4
34#define ADC_12V_LCT 0xAF
35
36#define ADC_3V3_SEN_FACTOR_M 0x11
37#define ADC_3V3_SEN_FACTOR_RB 0xD0
38#define ADC_3V3_UCT 0xCD
39#define ADC_3V3_LCT 0xB7
40
41#define INA231_VOL_SEN_FACTOR_M ADC_12V_SEN_FACTOR_M
42#define INA231_VOL_SEN_FACTOR_RB ADC_12V_SEN_FACTOR_RB
43#define INA231_VOL_UCT ADC_12V_UCT
44#define INA231_VOL_LCT ADC_12V_LCT
45
46#define HSC_VIN_SEN_FACTOR_M 0x06
47#define HSC_VIN_SEN_FACTOR_EXP_RB 0xE0
48
49#define HSC_IOUT_SEN_FACTOR_M 0x05
50#define HSC_IOUT_SEN_FACTOR_EXP_RB 0xE0
51
52#define HSC_PIN_SEN_FACTOR_M 0x06
53#define HSC_PIN_SEN_FACTOR_EXP_RB 0xF0
54
55#define HSC_T_SEN_FACTOR_M 0x01
56#define HSC_T_SEN_FACTOR_EXP_RB 0x00
57
58uint8_t plat_get_sdr_size();
59void load_sdr_table(void);
60
61#endif
uint8_t plat_get_sdr_size()
Definition: sdr.c:239
void load_sdr_table(void)
Definition: sdr.c:244