OpenBIC
OpenSource Bridge-IC
plat_class.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_CLASS_H
18#define PLAT_CLASS_H
19
20#include <stdbool.h>
21#include <stdint.h>
22
23/* ADC channel number */
28};
29
30typedef enum {
41
42typedef enum {
48
49typedef enum {
54
55typedef enum {
61
80};
81
82bool get_adc_voltage(int channel, float *voltage);
84uint8_t get_hsc_type();
85uint8_t get_vr_type();
88
89#endif
@ VR_UNKNOWN
Definition: plat_class.h:95
int init_platform_config()
Definition: expansion_board.c:43
GT_STAGE_REVISION_ID
Definition: plat_class.h:30
@ GT_STAGE_PVT2_OP1
Definition: plat_class.h:37
@ GT_STAGE_MP
Definition: plat_class.h:39
@ GT_STAGE_PVT
Definition: plat_class.h:35
@ GT_STAGE_EVT2
Definition: plat_class.h:33
@ GT_STAGE_PVT2_OP2
Definition: plat_class.h:36
@ GT_STAGE_PO
Definition: plat_class.h:31
@ GT_STAGE_PILOT
Definition: plat_class.h:38
@ GT_STAGE_DVT
Definition: plat_class.h:34
@ GT_STAGE_EVT
Definition: plat_class.h:32
gt_hsc_type_t
Definition: plat_class.h:55
@ HSC_MP5990
Definition: plat_class.h:57
@ HSC_LTC4286
Definition: plat_class.h:59
@ HSC_LTC4282
Definition: plat_class.h:58
@ HSC_UNKNOWN
Definition: plat_class.h:56
uint8_t get_power_moniter_ic_type()
Definition: plat_class.c:115
GT_STAGE_REVISION_ID get_stage_by_rev_id()
Definition: plat_class.c:99
uint8_t get_hsc_type()
Definition: plat_class.c:105
GT_FIRMWARE_COMPONENT
Definition: plat_class.h:62
@ GT_COMPNT_PEX2
Definition: plat_class.h:68
@ GT_COMPNT_VR1
Definition: plat_class.h:64
@ GT_COMPNT_CPLD
Definition: plat_class.h:70
@ GT_COMPNT_NIC3
Definition: plat_class.h:74
@ GT_COMPNT_NIC2
Definition: plat_class.h:73
@ GT_COMPNT_NIC1
Definition: plat_class.h:72
@ GT_COMPNT_PEX3
Definition: plat_class.h:69
@ GT_COMPNT_NIC4
Definition: plat_class.h:75
@ GT_COMPNT_NIC7
Definition: plat_class.h:78
@ GT_COMPNT_NIC5
Definition: plat_class.h:76
@ GT_COMPNT_MAX
Definition: plat_class.h:79
@ GT_COMPNT_PEX1
Definition: plat_class.h:67
@ GT_COMPNT_VR0
Definition: plat_class.h:63
@ GT_COMPNT_BIC
Definition: plat_class.h:65
@ GT_COMPNT_NIC6
Definition: plat_class.h:77
@ GT_COMPNT_PEX0
Definition: plat_class.h:66
@ GT_COMPNT_NIC0
Definition: plat_class.h:71
uint8_t get_vr_type()
Definition: plat_class.c:110
gt_vr_type_t
Definition: plat_class.h:42
@ VR_INF_XDPE12284
Definition: plat_class.h:45
@ VR_RNS_ISL69259
Definition: plat_class.h:44
@ VR_MPS_MPS2971
Definition: plat_class.h:46
gt_power_monitor_ic_type_t
Definition: plat_class.h:49
@ POWER_IC_ISL28022
Definition: plat_class.h:51
@ POWER_IC_INA230
Definition: plat_class.h:52
@ POWER_IC_UNKNOWN
Definition: plat_class.h:50
bool get_adc_voltage(int channel, float *voltage)
Definition: plat_class.c:58
GT_COMPONENT_TYPE_ADC_CHANNEL
Definition: plat_class.h:24
@ POWER_IC_TYPE_ADC_CHANNEL
Definition: plat_class.h:27
@ VR_TYPE_ADC_CHANNEL
Definition: plat_class.h:26
@ HSC_TYPE_ADC_CHANNEL
Definition: plat_class.h:25