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
9
enum
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
20
enum
SLOT_PID
{
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
31
enum
BOARD_REV_ID
{
32
BOARD_REV_POC
= 0x00,
33
BOARD_REV_EVT
= 0x01,
34
BOARD_REV_DVT
= 0x03,
35
BOARD_REV_PVT
= 0x05,
36
BOARD_REV_MP
= 0x06,
37
};
38
39
enum
ADC_CHANNEL
{
40
ADC_CHANNEL_2
= 2,
41
ADC_CHANNEL_12
= 12,
42
ADC_CHANNEL_13
= 13,
43
NUMBER_OF_ADC_CHANNEL
= 16,
44
};
45
46
enum
BLADE_CONFIG
{
47
BLADE_CONFIG_T1M
= 0x00,
48
BLADE_CONFIG_T1C
= 0x10,
49
BLADE_CONFIG_UNKNOWN
= 0xff,
50
};
51
52
enum
RETIMER_TYPE
{
53
RETIMER_TYPE_ASTERALABS
,
54
RETIMER_TYPE_NO_RETIMER
,
55
RETIMER_TYPE_KANDOU
,
56
RETIMER_TYPE_BROADCOM
,
57
};
58
59
bool
get_adc_voltage
(
int
channel,
float
*voltage);
60
bool
get_board_rev
(uint8_t *board_rev);
61
uint8_t
get_slot_eid
();
62
uint8_t
get_slot_id
();
63
bool
get_blade_config
(uint8_t *blade_config);
64
void
init_platform_config
();
65
uint8_t
get_retimer_type
();
66
void
init_retimer_type
();
67
68
#endif
init_platform_config
int init_platform_config()
Definition:
expansion_board.c:43
get_adc_voltage
bool get_adc_voltage(int channel, float *voltage)
Definition:
plat_class.c:58
RETIMER_TYPE
RETIMER_TYPE
Definition:
plat_class.h:44
ADC_CHANNEL
ADC_CHANNEL
Definition:
plat_class.c:80
NUMBER_OF_ADC_CHANNEL
@ NUMBER_OF_ADC_CHANNEL
Definition:
plat_class.h:27
BLADE_CONFIG
BLADE_CONFIG
Definition:
plat_class.h:46
BLADE_CONFIG_T1C
@ BLADE_CONFIG_T1C
Definition:
plat_class.h:48
BLADE_CONFIG_UNKNOWN
@ BLADE_CONFIG_UNKNOWN
Definition:
plat_class.h:49
BLADE_CONFIG_T1M
@ BLADE_CONFIG_T1M
Definition:
plat_class.h:47
get_slot_id
uint8_t get_slot_id()
Definition:
plat_class.c:78
get_board_rev
bool get_board_rev(uint8_t *board_rev)
Definition:
plat_class.c:109
init_retimer_type
void init_retimer_type()
Definition:
plat_class.c:246
RETIMER_TYPE_BROADCOM
@ RETIMER_TYPE_BROADCOM
Definition:
plat_class.h:56
RETIMER_TYPE_NO_RETIMER
@ RETIMER_TYPE_NO_RETIMER
Definition:
plat_class.h:54
RETIMER_TYPE_KANDOU
@ RETIMER_TYPE_KANDOU
Definition:
plat_class.h:55
RETIMER_TYPE_ASTERALABS
@ RETIMER_TYPE_ASTERALABS
Definition:
plat_class.h:53
get_retimer_type
uint8_t get_retimer_type()
Definition:
plat_class.c:241
get_blade_config
bool get_blade_config(uint8_t *blade_config)
Definition:
plat_class.c:89
BOARD_REV_ID
BOARD_REV_ID
Definition:
plat_class.h:31
BOARD_REV_PVT
@ BOARD_REV_PVT
Definition:
plat_class.h:35
BOARD_REV_POC
@ BOARD_REV_POC
Definition:
plat_class.h:32
BOARD_REV_MP
@ BOARD_REV_MP
Definition:
plat_class.h:36
BOARD_REV_EVT
@ BOARD_REV_EVT
Definition:
plat_class.h:33
BOARD_REV_DVT
@ BOARD_REV_DVT
Definition:
plat_class.h:34
get_slot_eid
uint8_t get_slot_eid()
Definition:
plat_class.c:73
SLOT_EID
SLOT_EID
Definition:
plat_class.h:9
SLOT8_EID
@ SLOT8_EID
Definition:
plat_class.h:17
SLOT3_EID
@ SLOT3_EID
Definition:
plat_class.h:12
SLOT1_EID
@ SLOT1_EID
Definition:
plat_class.h:10
SLOT6_EID
@ SLOT6_EID
Definition:
plat_class.h:15
SLOT7_EID
@ SLOT7_EID
Definition:
plat_class.h:16
SLOT5_EID
@ SLOT5_EID
Definition:
plat_class.h:14
SLOT4_EID
@ SLOT4_EID
Definition:
plat_class.h:13
SLOT2_EID
@ SLOT2_EID
Definition:
plat_class.h:11
ADC_CHANNEL_12
@ ADC_CHANNEL_12
Definition:
plat_class.h:41
ADC_CHANNEL_13
@ ADC_CHANNEL_13
Definition:
plat_class.h:42
ADC_CHANNEL_2
@ ADC_CHANNEL_2
Definition:
plat_class.h:40
SLOT_PID
SLOT_PID
Definition:
plat_class.h:20
SLOT4_PID
@ SLOT4_PID
Definition:
plat_class.h:24
SLOT2_PID
@ SLOT2_PID
Definition:
plat_class.h:22
SLOT5_PID
@ SLOT5_PID
Definition:
plat_class.h:25
SLOT8_PID
@ SLOT8_PID
Definition:
plat_class.h:28
SLOT1_PID
@ SLOT1_PID
Definition:
plat_class.h:21
SLOT6_PID
@ SLOT6_PID
Definition:
plat_class.h:26
SLOT7_PID
@ SLOT7_PID
Definition:
plat_class.h:27
SLOT3_PID
@ SLOT3_PID
Definition:
plat_class.h:23
meta-facebook
yv4-sd
src
platform
plat_class.h
Generated by
1.9.2