Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions fboss/lib/bsp/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ cpp_library(
"//fboss/lib/bsp/tahansb800bc:tahansb800bc_bsp",
"//fboss/lib/bsp/wedge800bact:wedge800bact_bsp",
"//fboss/lib/bsp/wedge800cact:wedge800cact_bsp",
"//fboss/lib/bsp/saintpaul:saintpaul_bsp",
"//fboss/lib/fpga:fpga_device",
"//fboss/lib/fpga:multi_pim_container",
"//fboss/lib/i2c:i2c_controller_stats-cpp2-types",
Expand Down
2 changes: 2 additions & 0 deletions fboss/lib/bsp/bspmapping/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ const std::map<PlatformType, folly::StringPiece> kHardwareNameMap = {
kPortMappingLadakh800bclsCsv},
{facebook::fboss::PlatformType::PLATFORM_ICECUBE800BANW,
kPortMappingIcecube800banwCsv},
{facebook::fboss::PlatformType::PLATFORM_SAINTPAUL,
kPortMappingSaintpaulCsv},
};

// Helper function to generate PHY CSV filename from regular CSV filename
Expand Down
2 changes: 2 additions & 0 deletions fboss/lib/bsp/bspmapping/Parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ inline constexpr folly::StringPiece kPortMappingLadakh800bclsCsv{
"Ladakh800bcls_BspMapping.csv"};
inline constexpr folly::StringPiece kPortMappingIcecube800banwCsv{
"Icecube800banw_BspMapping.csv"};
inline constexpr folly::StringPiece kPortMappingSaintpaulCsv{
"Saintpaul_BspMapping.csv"};

class Parser {
public:
Expand Down
35 changes: 35 additions & 0 deletions fboss/lib/bsp/bspmapping/input/Saintpaul_BspMapping.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
TcvrId,TcvrLaneIdList,PimId,AccessControllerId,AccessControlType,ResetPath,ResetMask,ResetHoldHi,PresentPath,PresentMask,PresentHoldHi,IoControllerId,IoControlType,IoPath,LedId,LedBluePath,LedYellowPath
1,1 2 3 4 5 6 7 8,1,1,CPLD,/run/devmap/xcvrs/xcvr_ctrl_1/xcvr_reset_1,1,1,/run/devmap/xcvrs/xcvr_ctrl_1/xcvr_present_1,1,0,1,I2C,/run/devmap/xcvrs/xcvr_io_1,1,/sys/class/leds/port1_led1:blue:status,/sys/class/leds/port1_led1:amber:status
2,1 2 3 4 5 6 7 8,1,2,CPLD,/run/devmap/xcvrs/xcvr_ctrl_2/xcvr_reset_2,1,1,/run/devmap/xcvrs/xcvr_ctrl_2/xcvr_present_2,1,0,2,I2C,/run/devmap/xcvrs/xcvr_io_2,2,/sys/class/leds/port2_led1:blue:status,/sys/class/leds/port2_led1:amber:status
3,1 2 3 4 5 6 7 8,1,3,CPLD,/run/devmap/xcvrs/xcvr_ctrl_3/xcvr_reset_3,1,1,/run/devmap/xcvrs/xcvr_ctrl_3/xcvr_present_3,1,0,3,I2C,/run/devmap/xcvrs/xcvr_io_3,3,/sys/class/leds/port3_led1:blue:status,/sys/class/leds/port3_led1:amber:status
4,1 2 3 4 5 6 7 8,1,4,CPLD,/run/devmap/xcvrs/xcvr_ctrl_4/xcvr_reset_4,1,1,/run/devmap/xcvrs/xcvr_ctrl_4/xcvr_present_4,1,0,4,I2C,/run/devmap/xcvrs/xcvr_io_4,4,/sys/class/leds/port4_led1:blue:status,/sys/class/leds/port4_led1:amber:status
5,1 2 3 4 5 6 7 8,1,5,CPLD,/run/devmap/xcvrs/xcvr_ctrl_5/xcvr_reset_5,1,1,/run/devmap/xcvrs/xcvr_ctrl_5/xcvr_present_5,1,0,5,I2C,/run/devmap/xcvrs/xcvr_io_5,5,/sys/class/leds/port5_led1:blue:status,/sys/class/leds/port5_led1:amber:status
6,1 2 3 4 5 6 7 8,1,6,CPLD,/run/devmap/xcvrs/xcvr_ctrl_6/xcvr_reset_6,1,1,/run/devmap/xcvrs/xcvr_ctrl_6/xcvr_present_6,1,0,6,I2C,/run/devmap/xcvrs/xcvr_io_6,6,/sys/class/leds/port6_led1:blue:status,/sys/class/leds/port6_led1:amber:status
7,1 2 3 4 5 6 7 8,1,7,CPLD,/run/devmap/xcvrs/xcvr_ctrl_7/xcvr_reset_7,1,1,/run/devmap/xcvrs/xcvr_ctrl_7/xcvr_present_7,1,0,7,I2C,/run/devmap/xcvrs/xcvr_io_7,7,/sys/class/leds/port7_led1:blue:status,/sys/class/leds/port7_led1:amber:status
8,1 2 3 4 5 6 7 8,1,8,CPLD,/run/devmap/xcvrs/xcvr_ctrl_8/xcvr_reset_8,1,1,/run/devmap/xcvrs/xcvr_ctrl_8/xcvr_present_8,1,0,8,I2C,/run/devmap/xcvrs/xcvr_io_8,8,/sys/class/leds/port8_led1:blue:status,/sys/class/leds/port8_led1:amber:status
9,1 2 3 4 5 6 7 8,1,9,CPLD,/run/devmap/xcvrs/xcvr_ctrl_9/xcvr_reset_9,1,1,/run/devmap/xcvrs/xcvr_ctrl_9/xcvr_present_9,1,0,9,I2C,/run/devmap/xcvrs/xcvr_io_9,9,/sys/class/leds/port9_led1:blue:status,/sys/class/leds/port9_led1:amber:status
10,1 2 3 4 5 6 7 8,1,10,CPLD,/run/devmap/xcvrs/xcvr_ctrl_10/xcvr_reset_10,1,1,/run/devmap/xcvrs/xcvr_ctrl_10/xcvr_present_10,1,0,10,I2C,/run/devmap/xcvrs/xcvr_io_10,10,/sys/class/leds/port10_led1:blue:status,/sys/class/leds/port10_led1:amber:status
11,1 2 3 4 5 6 7 8,1,11,CPLD,/run/devmap/xcvrs/xcvr_ctrl_11/xcvr_reset_11,1,1,/run/devmap/xcvrs/xcvr_ctrl_11/xcvr_present_11,1,0,11,I2C,/run/devmap/xcvrs/xcvr_io_11,11,/sys/class/leds/port11_led1:blue:status,/sys/class/leds/port11_led1:amber:status
12,1 2 3 4 5 6 7 8,1,12,CPLD,/run/devmap/xcvrs/xcvr_ctrl_12/xcvr_reset_12,1,1,/run/devmap/xcvrs/xcvr_ctrl_12/xcvr_present_12,1,0,12,I2C,/run/devmap/xcvrs/xcvr_io_12,12,/sys/class/leds/port12_led1:blue:status,/sys/class/leds/port12_led1:amber:status
13,1 2 3 4 5 6 7 8,1,13,CPLD,/run/devmap/xcvrs/xcvr_ctrl_13/xcvr_reset_13,1,1,/run/devmap/xcvrs/xcvr_ctrl_13/xcvr_present_13,1,0,13,I2C,/run/devmap/xcvrs/xcvr_io_13,13,/sys/class/leds/port13_led1:blue:status,/sys/class/leds/port13_led1:amber:status
14,1 2 3 4 5 6 7 8,1,14,CPLD,/run/devmap/xcvrs/xcvr_ctrl_14/xcvr_reset_14,1,1,/run/devmap/xcvrs/xcvr_ctrl_14/xcvr_present_14,1,0,14,I2C,/run/devmap/xcvrs/xcvr_io_14,14,/sys/class/leds/port14_led1:blue:status,/sys/class/leds/port14_led1:amber:status
15,1 2 3 4 5 6 7 8,1,15,CPLD,/run/devmap/xcvrs/xcvr_ctrl_15/xcvr_reset_15,1,1,/run/devmap/xcvrs/xcvr_ctrl_15/xcvr_present_15,1,0,15,I2C,/run/devmap/xcvrs/xcvr_io_15,15,/sys/class/leds/port15_led1:blue:status,/sys/class/leds/port15_led1:amber:status
16,1 2 3 4 5 6 7 8,1,16,CPLD,/run/devmap/xcvrs/xcvr_ctrl_16/xcvr_reset_16,1,1,/run/devmap/xcvrs/xcvr_ctrl_16/xcvr_present_16,1,0,16,I2C,/run/devmap/xcvrs/xcvr_io_16,16,/sys/class/leds/port16_led1:blue:status,/sys/class/leds/port16_led1:amber:status
17,1 2 3 4 5 6 7 8,1,17,CPLD,/run/devmap/xcvrs/xcvr_ctrl_17/xcvr_reset_17,1,1,/run/devmap/xcvrs/xcvr_ctrl_17/xcvr_present_17,1,0,17,I2C,/run/devmap/xcvrs/xcvr_io_17,17,/sys/class/leds/port17_led1:blue:status,/sys/class/leds/port17_led1:amber:status
18,1 2 3 4 5 6 7 8,1,18,CPLD,/run/devmap/xcvrs/xcvr_ctrl_18/xcvr_reset_18,1,1,/run/devmap/xcvrs/xcvr_ctrl_18/xcvr_present_18,1,0,18,I2C,/run/devmap/xcvrs/xcvr_io_18,18,/sys/class/leds/port18_led1:blue:status,/sys/class/leds/port18_led1:amber:status
19,1 2 3 4 5 6 7 8,1,19,CPLD,/run/devmap/xcvrs/xcvr_ctrl_19/xcvr_reset_19,1,1,/run/devmap/xcvrs/xcvr_ctrl_19/xcvr_present_19,1,0,19,I2C,/run/devmap/xcvrs/xcvr_io_19,19,/sys/class/leds/port19_led1:blue:status,/sys/class/leds/port19_led1:amber:status
20,1 2 3 4 5 6 7 8,1,20,CPLD,/run/devmap/xcvrs/xcvr_ctrl_20/xcvr_reset_20,1,1,/run/devmap/xcvrs/xcvr_ctrl_20/xcvr_present_20,1,0,20,I2C,/run/devmap/xcvrs/xcvr_io_20,20,/sys/class/leds/port20_led1:blue:status,/sys/class/leds/port20_led1:amber:status
21,1 2 3 4 5 6 7 8,1,21,CPLD,/run/devmap/xcvrs/xcvr_ctrl_21/xcvr_reset_21,1,1,/run/devmap/xcvrs/xcvr_ctrl_21/xcvr_present_21,1,0,21,I2C,/run/devmap/xcvrs/xcvr_io_21,21,/sys/class/leds/port21_led1:blue:status,/sys/class/leds/port21_led1:amber:status
22,1 2 3 4 5 6 7 8,1,22,CPLD,/run/devmap/xcvrs/xcvr_ctrl_22/xcvr_reset_22,1,1,/run/devmap/xcvrs/xcvr_ctrl_22/xcvr_present_22,1,0,22,I2C,/run/devmap/xcvrs/xcvr_io_22,22,/sys/class/leds/port22_led1:blue:status,/sys/class/leds/port22_led1:amber:status
23,1 2 3 4 5 6 7 8,1,23,CPLD,/run/devmap/xcvrs/xcvr_ctrl_23/xcvr_reset_23,1,1,/run/devmap/xcvrs/xcvr_ctrl_23/xcvr_present_23,1,0,23,I2C,/run/devmap/xcvrs/xcvr_io_23,23,/sys/class/leds/port23_led1:blue:status,/sys/class/leds/port23_led1:amber:status
24,1 2 3 4 5 6 7 8,1,24,CPLD,/run/devmap/xcvrs/xcvr_ctrl_24/xcvr_reset_24,1,1,/run/devmap/xcvrs/xcvr_ctrl_24/xcvr_present_24,1,0,24,I2C,/run/devmap/xcvrs/xcvr_io_24,24,/sys/class/leds/port24_led1:blue:status,/sys/class/leds/port24_led1:amber:status
25,1 2 3 4 5 6 7 8,1,25,CPLD,/run/devmap/xcvrs/xcvr_ctrl_25/xcvr_reset_25,1,1,/run/devmap/xcvrs/xcvr_ctrl_25/xcvr_present_25,1,0,25,I2C,/run/devmap/xcvrs/xcvr_io_25,25,/sys/class/leds/port25_led1:blue:status,/sys/class/leds/port25_led1:amber:status
26,1 2 3 4 5 6 7 8,1,26,CPLD,/run/devmap/xcvrs/xcvr_ctrl_26/xcvr_reset_26,1,1,/run/devmap/xcvrs/xcvr_ctrl_26/xcvr_present_26,1,0,26,I2C,/run/devmap/xcvrs/xcvr_io_26,26,/sys/class/leds/port26_led1:blue:status,/sys/class/leds/port26_led1:amber:status
27,1 2 3 4 5 6 7 8,1,27,CPLD,/run/devmap/xcvrs/xcvr_ctrl_27/xcvr_reset_27,1,1,/run/devmap/xcvrs/xcvr_ctrl_27/xcvr_present_27,1,0,27,I2C,/run/devmap/xcvrs/xcvr_io_27,27,/sys/class/leds/port27_led1:blue:status,/sys/class/leds/port27_led1:amber:status
28,1 2 3 4 5 6 7 8,1,28,CPLD,/run/devmap/xcvrs/xcvr_ctrl_28/xcvr_reset_28,1,1,/run/devmap/xcvrs/xcvr_ctrl_28/xcvr_present_28,1,0,28,I2C,/run/devmap/xcvrs/xcvr_io_28,28,/sys/class/leds/port28_led1:blue:status,/sys/class/leds/port28_led1:amber:status
29,1 2 3 4 5 6 7 8,1,29,CPLD,/run/devmap/xcvrs/xcvr_ctrl_29/xcvr_reset_29,1,1,/run/devmap/xcvrs/xcvr_ctrl_29/xcvr_present_29,1,0,29,I2C,/run/devmap/xcvrs/xcvr_io_29,29,/sys/class/leds/port29_led1:blue:status,/sys/class/leds/port29_led1:amber:status
30,1 2 3 4 5 6 7 8,1,30,CPLD,/run/devmap/xcvrs/xcvr_ctrl_30/xcvr_reset_30,1,1,/run/devmap/xcvrs/xcvr_ctrl_30/xcvr_present_30,1,0,30,I2C,/run/devmap/xcvrs/xcvr_io_30,30,/sys/class/leds/port30_led1:blue:status,/sys/class/leds/port30_led1:amber:status
31,1 2 3 4 5 6 7 8,1,31,CPLD,/run/devmap/xcvrs/xcvr_ctrl_31/xcvr_reset_31,1,1,/run/devmap/xcvrs/xcvr_ctrl_31/xcvr_present_31,1,0,31,I2C,/run/devmap/xcvrs/xcvr_io_31,31,/sys/class/leds/port31_led1:blue:status,/sys/class/leds/port31_led1:amber:status
32,1 2 3 4 5 6 7 8,1,32,CPLD,/run/devmap/xcvrs/xcvr_ctrl_32/xcvr_reset_32,1,1,/run/devmap/xcvrs/xcvr_ctrl_32/xcvr_present_32,1,0,32,I2C,/run/devmap/xcvrs/xcvr_io_32,32,/sys/class/leds/port32_led1:blue:status,/sys/class/leds/port32_led1:amber:status
33,1 2 3 4,1,33,CPLD,/run/devmap/xcvrs/xcvr_ctrl_33/xcvr_reset_33,1,1,/run/devmap/xcvrs/xcvr_ctrl_33/xcvr_present_33,1,0,33,I2C,/run/devmap/xcvrs/xcvr_io_33,33,/sys/class/leds/port33_led1:blue:status,/sys/class/leds/port33_led1:amber:status
34,1 2 3 4,1,34,CPLD,/run/devmap/xcvrs/xcvr_ctrl_34/xcvr_reset_34,1,1,/run/devmap/xcvrs/xcvr_ctrl_34/xcvr_present_34,1,0,34,I2C,/run/devmap/xcvrs/xcvr_io_34,34,/sys/class/leds/port34_led1:blue:status,/sys/class/leds/port34_led1:amber:status
4 changes: 4 additions & 0 deletions fboss/lib/bsp/bspmapping/test/ParserTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ TEST(ParserTest, GetNameForTests) {
facebook::fboss::Parser::getNameFor(
facebook::fboss::PlatformType::PLATFORM_ICECUBE800BANW),
"icecube800banw");
EXPECT_EQ(
facebook::fboss::Parser::getNameFor(
facebook::fboss::PlatformType::PLATFORM_SAINTPAUL),
"saintpaul");
}

TEST(ParserTest, GetTransceiverConfigRowFromCsvLine) {
Expand Down
19 changes: 19 additions & 0 deletions fboss/lib/bsp/saintpaul/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# @autodeps
load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library")

oncall("fboss_optics_phy")

cpp_library(
name = "saintpaul_bsp",
srcs = [
"SaintpaulBspPlatformMapping.cpp",
],
headers = [
"SaintpaulBspPlatformMapping.h",
],
exported_deps = [
"//fboss/lib/bsp:bsp_platform_mapping-cpp2-types",
"//fboss/lib/bsp:bsp_platform_mapping_lib",
"//thrift/lib/cpp2/protocol:protocol",
],
)
Loading
Loading