OpenBIC
OpenSource Bridge-IC
plat_class.h
Go to the documentation of this file.
1#ifndef PLAT_CLASS_H
2#define PLAT_CLASS_H
3
4#include <stdbool.h>
5#include <stdint.h>
6
7#define AST1030_ADC_BASE_ADDR 0x7e6e9000
8
9enum SLOT_EID {
10 SLOT1_EID = 0x0A,
11 SLOT2_EID = 0x14,
12 SLOT3_EID = 0x1E,
13 SLOT4_EID = 0x28,
14 SLOT5_EID = 0x32,
15 SLOT6_EID = 0x3C,
16 SLOT7_EID = 0x46,
17 SLOT8_EID = 0x50,
18};
19
21 SLOT1_PID = 0x0000,
22 SLOT2_PID = 0x0005,
23 SLOT3_PID = 0x000A,
24 SLOT4_PID = 0x000F,
25 SLOT5_PID = 0x0014,
26 SLOT6_PID = 0x0019,
27 SLOT7_PID = 0x001E,
28 SLOT8_PID = 0x0023,
29};
30
37};
38
44};
45
50};
51
57};
58
59bool get_adc_voltage(int channel, float *voltage);
60bool get_board_rev(uint8_t *board_rev);
61uint8_t get_slot_eid();
62uint8_t get_slot_id();
63bool get_blade_config(uint8_t *blade_config);
65uint8_t get_retimer_type();
67
68#endif
int init_platform_config()
Definition: expansion_board.c:43
bool get_adc_voltage(int channel, float *voltage)
Definition: plat_class.c:58
RETIMER_TYPE
Definition: plat_class.h:44
ADC_CHANNEL
Definition: plat_class.c:80
@ NUMBER_OF_ADC_CHANNEL
Definition: plat_class.h:27
BLADE_CONFIG
Definition: plat_class.h:46
@ BLADE_CONFIG_T1C
Definition: plat_class.h:48
@ BLADE_CONFIG_UNKNOWN
Definition: plat_class.h:49
@ BLADE_CONFIG_T1M
Definition: plat_class.h:47
uint8_t get_slot_id()
Definition: plat_class.c:78
bool get_board_rev(uint8_t *board_rev)
Definition: plat_class.c:109
void init_retimer_type()
Definition: plat_class.c:246
@ RETIMER_TYPE_BROADCOM
Definition: plat_class.h:56
@ RETIMER_TYPE_NO_RETIMER
Definition: plat_class.h:54
@ RETIMER_TYPE_KANDOU
Definition: plat_class.h:55
@ RETIMER_TYPE_ASTERALABS
Definition: plat_class.h:53
uint8_t get_retimer_type()
Definition: plat_class.c:241
bool get_blade_config(uint8_t *blade_config)
Definition: plat_class.c:89
BOARD_REV_ID
Definition: plat_class.h:31
@ BOARD_REV_PVT
Definition: plat_class.h:35
@ BOARD_REV_POC
Definition: plat_class.h:32
@ BOARD_REV_MP
Definition: plat_class.h:36
@ BOARD_REV_EVT
Definition: plat_class.h:33
@ BOARD_REV_DVT
Definition: plat_class.h:34
uint8_t get_slot_eid()
Definition: plat_class.c:73
SLOT_EID
Definition: plat_class.h:9
@ SLOT8_EID
Definition: plat_class.h:17
@ SLOT3_EID
Definition: plat_class.h:12
@ SLOT1_EID
Definition: plat_class.h:10
@ SLOT6_EID
Definition: plat_class.h:15
@ SLOT7_EID
Definition: plat_class.h:16
@ SLOT5_EID
Definition: plat_class.h:14
@ SLOT4_EID
Definition: plat_class.h:13
@ SLOT2_EID
Definition: plat_class.h:11
@ ADC_CHANNEL_12
Definition: plat_class.h:41
@ ADC_CHANNEL_13
Definition: plat_class.h:42
@ ADC_CHANNEL_2
Definition: plat_class.h:40
SLOT_PID
Definition: plat_class.h:20
@ SLOT4_PID
Definition: plat_class.h:24
@ SLOT2_PID
Definition: plat_class.h:22
@ SLOT5_PID
Definition: plat_class.h:25
@ SLOT8_PID
Definition: plat_class.h:28
@ SLOT1_PID
Definition: plat_class.h:21
@ SLOT6_PID
Definition: plat_class.h:26
@ SLOT7_PID
Definition: plat_class.h:27
@ SLOT3_PID
Definition: plat_class.h:23