Skip to content

Commit 50bbe27

Browse files
PegaSwitchmshych
authored andcommitted
Pegatron common_bde: add two platforms to support ONIE.
Add below model support into pegatron_common_bde: 1. Pegatron_fn8656_bnf: with Nephos Leo NP8579 x1 48x50GbE/100GbE DSFP ports and 8x400GbE QSFP-DD ports 2. Pegatron_fn8032_bnf-r1 with Nephos Leo NP8579 x1 32x400GbE QSFP-DD ports The CPU is a Intel Broadwell-DE D1627 Signed-off-by: Wolf Lin <Wolf_Lin@pegatroncorp.com>
1 parent 2a477e8 commit 50bbe27

4 files changed

Lines changed: 154 additions & 0 deletions

File tree

machine/pegatron/pegatron_common_bde/INSTALL

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ detection, please refer to ``rootconf/sysroot-lib-onie/gen-config-platform``
3333
1x100GbE QSFP28 port, 1xSFP+ port and
3434
eight 25GbE SFP28 (port 1-6: eCPRI/CPRI, port 7-8 eCPRI)
3535

36+
- Pegatron_fn8656_bnf
37+
48x50GbE/100GbE DSFP ports, 8x400GbE QSFP-DD ports
38+
3639
Specification
3740
===============
3841
- Modularized CPU board design
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
From 000db99a9ffa89ccada5f00627daf5a82f6b1c46 Mon Sep 17 00:00:00 2001
2+
From: Wolf Lin <Wolf_Lin@pegatroncorp.com>
3+
Date: Wed, 17 Nov 2021 10:05:19 +0800
4+
Subject: [PATCH] Add 'fn8032_bnf-r1' platform support.
5+
6+
---
7+
miscutils/mb_detect.c | 43 ++++++++++++++++++++++++++++++++++++++++++-
8+
1 file changed, 42 insertions(+), 1 deletion(-)
9+
10+
diff --git a/miscutils/mb_detect.c b/miscutils/mb_detect.c
11+
index 2d79dd4..f209220 100644
12+
--- a/miscutils/mb_detect.c
13+
+++ b/miscutils/mb_detect.c
14+
@@ -189,6 +189,32 @@ static int find_i2c_busses(char* adapter_name)
15+
return dev_bus;
16+
}
17+
18+
+static int find_cpu_model(char* cpu_model)
19+
+{
20+
+ const char *const cpu_info_path = "/proc/cpuinfo";
21+
+ char name[128];
22+
+ char *pos;
23+
+ FILE *fp;
24+
+ int ret = 0;
25+
+
26+
+ fp = fopen(cpu_info_path, "r");
27+
+ if (fp != NULL) {
28+
+ while (fgets(name, sizeof(name), fp)) {
29+
+ pos = strstr(name, "model name");
30+
+ if (pos == NULL)
31+
+ continue;
32+
+
33+
+ pos = strstr(name, cpu_model);
34+
+ if (pos != NULL)
35+
+ ret = 1;
36+
+ break;
37+
+ }
38+
+ fclose(fp);
39+
+ }
40+
+
41+
+ return ret;
42+
+}
43+
+
44+
static int fan_status_get_from_i2c (u8 *type)
45+
{
46+
u32 status = 0;
47+
@@ -336,6 +362,21 @@ static int bmc_chip_info_get (SysBoardInfo *bdinfo)
48+
return 0;
49+
}
50+
51+
+static int cpu_info_get (SysBoardInfo *bdinfo)
52+
+{
53+
+ u32 machine_rev = 0;
54+
+ int ret;
55+
+
56+
+ if (bdinfo->motherboard_id == 0x08) {
57+
+ ret = find_cpu_model("D-1627");
58+
+ if (ret)
59+
+ machine_rev = 1;
60+
+ bdinfo->machine_rev = machine_rev;
61+
+ }
62+
+
63+
+ return 0;
64+
+}
65+
+
66+
/*
67+
* This macro defines the mbdetect command line command.
68+
*/
69+
@@ -461,7 +502,7 @@ s32 sys_board_info_get(SysBoardInfo *bdinfo)
70+
71+
bmc_chip_info_get(bdinfo);
72+
fan_status_info_get(bdinfo);
73+
-
74+
+ cpu_info_get(bdinfo);
75+
return 0;
76+
}
77+
78+
--
79+
2.25.1
80+
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
From 45940566364253368751c7551221522be1af3c91 Mon Sep 17 00:00:00 2001
2+
From: Wolf Lin <Wolf_Lin@pegatroncorp.com>
3+
Date: Wed, 17 Nov 2021 10:04:16 +0800
4+
Subject: [PATCH] Add 'fn8656_bnf' platform support.
5+
6+
---
7+
include/mb_detect.h | 1 +
8+
miscutils/mb_detect.c | 6 ++++--
9+
miscutils/sys_eeprom_i2c.c | 8 ++++++++
10+
3 files changed, 13 insertions(+), 2 deletions(-)
11+
12+
diff --git a/include/mb_detect.h b/include/mb_detect.h
13+
index 8ea1a92..37410c1 100644
14+
--- a/include/mb_detect.h
15+
+++ b/include/mb_detect.h
16+
@@ -41,6 +41,7 @@ enum {
17+
GEMINI,
18+
GEMINIWITHBMC,
19+
FHGW,
20+
+ CORVETTE,
21+
MB_LAST
22+
};
23+
24+
diff --git a/miscutils/mb_detect.c b/miscutils/mb_detect.c
25+
index 98271c0..2d79dd4 100644
26+
--- a/miscutils/mb_detect.c
27+
+++ b/miscutils/mb_detect.c
28+
@@ -14,7 +14,8 @@ SysBoardInfo sysBoardInfo[] = {
29+
{ 0x08, "astonMartin(BMC)", "FN8032_BAF\0", "fn8032_baf\0", 0, 1 },
30+
{ 0x09, "gemini", "FM6256_BNF\0", "fm6256_bnf\0", 0, 0 },
31+
{ 0x09, "gemini(BMC)", "FM6256_BAF\0", "fm6256_baf\0", 0, 1 },
32+
- { 0x0A, "fhgw", "DM6209_7\0", "dm6209_7\0", 0, 0 }
33+
+ { 0x0A, "fhgw", "DM6209_7\0", "dm6209_7\0", 0, 0 },
34+
+ { 0x0B, "corvette", "FN8656_BNF\0", "fn8656_bnf\0", 0, 0 }
35+
};
36+
37+
static u32 mb_id_get_from_cpld(int cpld)
38+
@@ -414,7 +415,8 @@ u32 bmc_is_available(void)
39+
s32 rv = 0;
40+
u32 board_id = mb_id_get();
41+
42+
- if (board_id < 0x08)
43+
+ if ( (board_id < 0x08) ||
44+
+ (board_id == 0x0B) )
45+
return 0;
46+
47+
//Detect BMC is available now or not.
48+
diff --git a/miscutils/sys_eeprom_i2c.c b/miscutils/sys_eeprom_i2c.c
49+
index 3b9dfd4..335c361 100644
50+
--- a/miscutils/sys_eeprom_i2c.c
51+
+++ b/miscutils/sys_eeprom_i2c.c
52+
@@ -79,6 +79,14 @@ struct mb_info mb_i2c_info[] = {
53+
.wp_disable = 0x01,
54+
.wp_enable = 0x03
55+
},
56+
+ {
57+
+ .motherboard_id = 0xB, /* Corvette */
58+
+ .mux = {.addr = 0x73, .channel = 0},
59+
+ .eeprom_addr = 0x74,
60+
+ .eeprom_offset = 0x01,
61+
+ .wp_disable = 0xfd,
62+
+ .wp_enable = 0x02
63+
+ },
64+
{
65+
.motherboard_id = 0xff,
66+
.mux = {.addr = 0xff, .channel = 0xff},
67+
--
68+
2.25.1
69+

machine/pegatron/pegatron_common_bde/busybox/patches/series

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ onie-syseeprom-support-ipmi.patch
1010
change-the-platform-name-in-multiple-platforms.patch
1111
enhance-mbdetect-command-to-generate-onieid-by-hardware.patch
1212
add-dm6209-7-platform-support.patch
13+
add-fn8656-bnf-platform.patch
14+
add-fn8032-bnf-r1-platform-support.patch

0 commit comments

Comments
 (0)