OpenBIC
OpenSource Bridge-IC
plat_fru.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_FRU_H
18#define PLAT_FRU_H
19
20enum {
32 // OTHER_FRU_ID,
34};
35
42};
43
44#define FRU_CFG_NUM MAX_FRU_ID
45
46#define SWB_FRU_PORT 0x05
47#define SWB_FRU_ADDR (0xA8 >> 1)
48#define SWB_FRU_MUX_ADDR (0xE0 >> 1)
49#define SWB_FRU_MUX_CHAN 7
50#define FIO_FRU_PORT 0x04
51#define FIO_FRU_ADDR (0xA2 >> 1)
52#define HSC_MODULE_FRU_PORT 0x05
53#define HSC_MODULE_FRU_ADDR (0xA2 >> 1)
54#define HSC_MODULE_FRU_MUX_ADDR (0xE0 >> 1)
55#define HSC_MODULE_FRU_MUX_CHAN 6
56
57#define NIC_FRU_ADDR (0xA0 >> 1)
58#define NIC0_FRU_PORT 0x00
59#define NIC1_FRU_PORT 0x01
60#define NIC2_FRU_PORT 0x02
61#define NIC3_FRU_PORT 0x03
62#define NIC4_FRU_PORT 0x0A
63#define NIC5_FRU_PORT 0x0B
64#define NIC6_FRU_PORT 0x0C
65#define NIC7_FRU_PORT 0x0D
66
67typedef struct {
68 char product_manufacturer[32];
69 char product_name[32];
70 char product_part_number[32];
71 char product_version[32];
73
74uint8_t check_nic_type_by_fru();
75bool get_first_nic_manufacturer(char *manufacturer, uint8_t manufacturer_size);
76
77#endif
@ FIO_FRU_ID
Definition: plat_fru.h:45
@ MAX_FRU_ID
Definition: plat_fru.h:46
uint8_t check_nic_type_by_fru()
Definition: plat_fru.c:199
@ NIC7_FRU_ID
Definition: plat_fru.h:31
@ NIC5_FRU_ID
Definition: plat_fru.h:29
@ NIC1_FRU_ID
Definition: plat_fru.h:25
@ NIC0_FRU_ID
Definition: plat_fru.h:24
@ NIC3_FRU_ID
Definition: plat_fru.h:27
@ HSC_MODULE_FRU_ID
Definition: plat_fru.h:23
@ NIC2_FRU_ID
Definition: plat_fru.h:26
@ NIC4_FRU_ID
Definition: plat_fru.h:28
@ NIC6_FRU_ID
Definition: plat_fru.h:30
@ SWB_FRU_ID
Definition: plat_fru.h:21
GT_NIC_CONFIG
Definition: plat_fru.h:36
@ NIC_CONFIG_POLLARA
Definition: plat_fru.h:41
@ NIC_CONFIG_THOR2
Definition: plat_fru.h:40
@ NIC_CONFIG_CX7
Definition: plat_fru.h:38
@ NIC_CONFIG_UNKNOWN
Definition: plat_fru.h:37
@ NIC_CONFIG_IB_CX7
Definition: plat_fru.h:39
bool get_first_nic_manufacturer(char *manufacturer, uint8_t manufacturer_size)
Definition: plat_fru.c:345
Definition: plat_fru.h:118