fsm/src/fm10k/IES_CONFIGURATIONS.h
DataHoarder 704df5b09d
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
Implement data-driven YAML switch/port/vlan configuration
Implemented extra missing fields, added VPD hash match

Add extra configuration required for external port tagging, maybe do it via config
2021-11-13 00:18:13 +01:00

662 lines
44 KiB
C++

#include "IES.h"
#include <unordered_map>
#include <vector>
#include "IES_SDK.h"
#define SPEED_100G "100000"
#define SPEED_50G "50000"
#define SPEED_40G "40000"
#define SPEED_25G "25000"
#define SPEED_10G "10000"
namespace FM10K {
namespace IES_Static {
using TlvType = FM10K::IES::TlvType;
static std::unordered_map<std::string, std::vector<std::pair<std::string, std::pair<TlvType, std::string>>>> knownConfigurations = {
{"FM10840_B0_2x100G", {
{"api.platform.config.numSwitches", {TlvType::Integer, "1"}},
{"api.platform.config.platformName", {TlvType::Text, "rrc_2x100gm"}},
//{"api.platform.config.debug", {TlvType::Text, "CONFIG,MOD_STATE,MOD_LED,MOD_INTR,MOD_TYPE,PLAT_LOG"}},
//{"api.platform.lib.config.debug", {TlvType::Text, "I2C_RW,I2C_MUX,PORT_LED"}},
{"api.platform.config.switch.0.switchNumber", {TlvType::Integer, "0"}},
{"api.platform.config.switch.0.uioDevName", {TlvType::Text, "/dev/uio0"}},
{"api.platform.config.switch.0.resource4DevName", {TlvType::Text, ""}},
{"api.platform.config.switch.0.msiEnabled", {TlvType::Boolean, "true"}},
{"api.platform.config.switch.0.ledPollPeriodMsec", {TlvType::Integer, "200"}},
{"api.platform.config.switch.0.ledBlinkMode", {TlvType::Text, "HW_ASSISTED"}},
{"api.platform.config.switch.0.i2cClkDivider", {TlvType::Integer, "52"}},
{"api.platform.config.switch.0.i2cResetGpio", {TlvType::Integer, "5"}},
{"api.platform.config.switch.0.xcvrPollPeriodMsec", {TlvType::Integer, "1000"}},
{"api.platform.config.switch.0.numPorts", {TlvType::Integer, "7"}},
{"api.platform.config.switch.0.cpuPort", {TlvType::Integer, "6"}},
{"api.platform.config.switch.0.bootCfg.mgmtPep", {TlvType::Integer, "-1"}},
{"api.platform.config.switch.0.bootCfg.pep.0.mode", {TlvType::Boolean, "0"}},
{"api.platform.config.switch.0.bootCfg.pep.2.mode", {TlvType::Boolean, "0"}},
{"api.platform.config.switch.0.bootCfg.pep.4.mode", {TlvType::Boolean, "0"}},
{"api.platform.config.switch.0.bootCfg.pep.6.mode", {TlvType::Boolean, "0"}},
{"api.platform.config.switch.0.bootCfg.pep.0.enable", {TlvType::Boolean, "1"}},
{"api.platform.config.switch.0.bootCfg.pep.2.enable", {TlvType::Boolean, "1"}},
{"api.platform.config.switch.0.bootCfg.pep.4.enable", {TlvType::Boolean, "1"}},
{"api.platform.config.switch.0.bootCfg.pep.6.enable", {TlvType::Boolean, "1"}},
{"api.platform.config.switch.0.bootCfg.pep.8.enable", {TlvType::Boolean, "0"}},
{"api.platform.config.switch.0.bootCfg.pep.0.bar4Allowed", {TlvType::Boolean, "1"}},
{"api.platform.config.switch.0.bootCfg.pep.2.bar4Allowed", {TlvType::Boolean, "1"}},
{"api.platform.config.switch.0.bootCfg.pep.4.bar4Allowed", {TlvType::Boolean, "1"}},
{"api.platform.config.switch.0.bootCfg.pep.6.bar4Allowed", {TlvType::Boolean, "1"}},
{"api.platform.config.switch.0.portIndex.0.portMapping", {TlvType::Text, "\"LOG=0 PCIE=8\""}},
{"api.platform.config.switch.0.portIndex.1.lane.0.portMapping", {TlvType::Text, "\"LOG=1 EPL=1 LANE=0\""}},
{"api.platform.config.switch.0.portIndex.1.lane.1.portMapping", {TlvType::Text, "\"LOG=1 EPL=1 LANE=1\""}},
{"api.platform.config.switch.0.portIndex.1.lane.2.portMapping", {TlvType::Text, "\"LOG=1 EPL=1 LANE=2\""}},
{"api.platform.config.switch.0.portIndex.1.lane.3.portMapping", {TlvType::Text, "\"LOG=1 EPL=1 LANE=3\""}},
{"api.platform.config.switch.0.portIndex.2.lane.0.portMapping", {TlvType::Text, "\"LOG=2 EPL=7 LANE=0\""}},
{"api.platform.config.switch.0.portIndex.2.lane.1.portMapping", {TlvType::Text, "\"LOG=2 EPL=7 LANE=1\""}},
{"api.platform.config.switch.0.portIndex.2.lane.2.portMapping", {TlvType::Text, "\"LOG=2 EPL=7 LANE=2\""}},
{"api.platform.config.switch.0.portIndex.2.lane.3.portMapping", {TlvType::Text, "\"LOG=2 EPL=7 LANE=3\""}},
{"api.platform.config.switch.0.portIndex.3.portMapping", {TlvType::Text, "\"LOG=3 PCIE=0\""}},
{"api.platform.config.switch.0.portIndex.4.portMapping", {TlvType::Text, "\"LOG=4 PCIE=2\""}},
{"api.platform.config.switch.0.portIndex.5.portMapping", {TlvType::Text, "\"LOG=5 PCIE=4\""}},
{"api.platform.config.switch.0.portIndex.6.portMapping", {TlvType::Text, "\"LOG=6 PCIE=6\""}},
{"api.platform.config.switch.0.port.default.interfaceType", {TlvType::Text, "NONE"}},
{"api.platform.config.switch.0.portIndex.1.interfaceType", {TlvType::Text, "QSFP_LANE0"}},
{"api.platform.config.switch.0.portIndex.2.interfaceType", {TlvType::Text, "QSFP_LANE0"}},
{"api.platform.config.switch.0.portIndex.0.speed", {TlvType::Integer, SPEED_10G}},
{"api.platform.config.switch.0.portIndex.1.speed", {TlvType::Integer, SPEED_100G}},
{"api.platform.config.switch.0.portIndex.2.speed", {TlvType::Integer, SPEED_100G}},
{"api.platform.config.switch.0.portIndex.3.speed", {TlvType::Integer, SPEED_50G}},
{"api.platform.config.switch.0.portIndex.4.speed", {TlvType::Integer, SPEED_50G}},
{"api.platform.config.switch.0.portIndex.5.speed", {TlvType::Integer, SPEED_50G}}, //? second PCIe group
{"api.platform.config.switch.0.portIndex.6.speed", {TlvType::Integer, SPEED_50G}}, //? second PCIe group
{"api.platform.config.switch.0.port.default.ethernetMode", {TlvType::Text, "DISABLED"}},
{"api.platform.config.switch.0.portIndex.1.ethernetMode", {TlvType::Text, "AUTODETECT"}},
{"api.platform.config.switch.0.portIndex.2.ethernetMode", {TlvType::Text, "AUTODETECT"}},
{"api.platform.config.switch.0.port.default.capability", {TlvType::Text, "NONE"}},
{"api.platform.config.switch.0.portIndex.1.capability",{TlvType::Text, "LAG,ROUTE,10G,25G,40G,100G,SW_LED"}},
{"api.platform.config.switch.0.portIndex.2.capability", {TlvType::Text, "LAG,ROUTE,10G,25G,40G,100G,SW_LED"}},
{"api.platform.config.switch.0.port.default.lanePolarity", {TlvType::Text, "INVERT_NONE"}},
{"api.platform.config.switch.0.port.default.preCursorCopper", {TlvType::Integer, "0"}},
{"api.platform.config.switch.0.sharedLibraryName", {TlvType::Text, "libLTStdPlatform.so"}},
{"api.platform.config.switch.0.sharedLibrary.disable", {TlvType::Text, "GetPortIntrPending,EnablePortIntr"}},
{"api.platform.lib.config.bus0.i2cDevName", {TlvType::Text, "switchI2C"}},
{"api.platform.lib.config.pcaMux.count", {TlvType::Integer, "1"}},
{"api.platform.lib.config.pcaMux.0.model", {TlvType::Text, "PCA9545"}},
{"api.platform.lib.config.pcaMux.0.addr", {TlvType::Integer, "0x58"}},
{"api.platform.lib.config.pcaMux.0.bus", {TlvType::Integer, "0"}},
{"api.platform.lib.config.pcaIo.count", {TlvType::Integer, "6"}},
{"api.platform.lib.config.pcaIo.0.model", {TlvType::Text, "PCA9538"}},
{"api.platform.lib.config.pcaIo.0.bus", {TlvType::Integer, "0"}},
{"api.platform.lib.config.pcaIo.0.addr", {TlvType::Integer, "0x60"}},
{"api.platform.lib.config.pcaIo.1.model", {TlvType::Text, "PCA9538"}},
{"api.platform.lib.config.pcaIo.1.bus", {TlvType::Integer, "0"}},
{"api.platform.lib.config.pcaIo.1.addr", {TlvType::Integer, "0x61"}},
{"api.platform.lib.config.pcaIo.2.model", {TlvType::Text, "PCA9538"}},
{"api.platform.lib.config.pcaIo.2.bus", {TlvType::Integer, "0"}},
{"api.platform.lib.config.pcaIo.2.addr", {TlvType::Integer, "0x62"}},
{"api.platform.lib.config.pcaIo.3.model", {TlvType::Text, "PCA9538"}},
{"api.platform.lib.config.pcaIo.3.bus", {TlvType::Integer, "0"}},
{"api.platform.lib.config.pcaIo.3.addr", {TlvType::Integer, "0x64"}},
{"api.platform.lib.config.pcaIo.4.model", {TlvType::Text, "PCA9538"}},
{"api.platform.lib.config.pcaIo.4.bus", {TlvType::Integer, "0"}},
{"api.platform.lib.config.pcaIo.4.addr", {TlvType::Integer, "0x65"}},
{"api.platform.lib.config.pcaIo.5.model", {TlvType::Text, "PCA9538"}},
{"api.platform.lib.config.pcaIo.5.bus", {TlvType::Integer, "0"}},
{"api.platform.lib.config.pcaIo.5.addr", {TlvType::Integer, "0x66"}},
{"api.platform.lib.config.xcvrState.default.modPrsL.pin", {TlvType::Integer, "2"}},
{"api.platform.lib.config.xcvrState.default.intL.pin", {TlvType::Integer, "1"}},
{"api.platform.lib.config.xcvrState.default.resetL.pin", {TlvType::Integer, "3"}},
{"api.platform.lib.config.xcvrState.default.lpMode.pin", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.count", {TlvType::Integer, "4"}},
{"api.platform.config.switch.0.portIndex.1.hwResourceId", {TlvType::Integer, "0"}},
{"api.platform.config.switch.0.portIndex.2.hwResourceId", {TlvType::Integer, "1"}},
{"api.platform.lib.config.hwResourceId.0.interfaceType", {TlvType::Text, "QSFP"}},
{"api.platform.lib.config.hwResourceId.0.xcvrI2C.busSelType", {TlvType::Text, "PCAMUX"}},
{"api.platform.lib.config.hwResourceId.0.xcvrI2C.pcaMux.index", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.0.xcvrI2C.pcaMux.value", {TlvType::Integer, "1"}},
{"api.platform.lib.config.hwResourceId.0.xcvrState.pcaIo.index", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.0.xcvrState.pcaIo.basePin", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.0.xcvrState.pcaIo.modPrsL.pin", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.0.xcvrState.pcaIo.intL.pin", {TlvType::Integer, "1"}},
{"api.platform.lib.config.hwResourceId.0.xcvrState.pcaIo.resetL.pin", {TlvType::Integer, "4"}},
{"api.platform.lib.config.hwResourceId.0.xcvrState.pcaIo.lpMode.pin", {TlvType::Integer, "5"}},
{"api.platform.lib.config.hwResourceId.0.portLed.0.type", {TlvType::Text, "PCA"}},
{"api.platform.lib.config.hwResourceId.0.portLed.0.pcaIo.index", {TlvType::Integer, "2"}},
{"api.platform.lib.config.hwResourceId.0.portLed.0.0.pcaIo.pin", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.0.portLed.0.0.pcaIo.usage", {TlvType::Text, "LINK,10G"}},
{"api.platform.lib.config.hwResourceId.0.portLed.0.1.pcaIo.pin", {TlvType::Integer, "1"}},
{"api.platform.lib.config.hwResourceId.0.portLed.0.1.pcaIo.usage", {TlvType::Text, "LINK,40G"}},
{"api.platform.lib.config.hwResourceId.0.portLed.0.2.pcaIo.pin", {TlvType::Integer, "2"}},
{"api.platform.lib.config.hwResourceId.0.portLed.0.2.pcaIo.usage", {TlvType::Text, "LINK,25G"}},
{"api.platform.lib.config.hwResourceId.0.portLed.0.3.pcaIo.pin", {TlvType::Integer, "3"}},
{"api.platform.lib.config.hwResourceId.0.portLed.0.3.pcaIo.usage",{TlvType::Text, "LINK,100G"}},
{"api.platform.lib.config.hwResourceId.0.portLed.1.type", {TlvType::Text, "PCA"}},
{"api.platform.lib.config.hwResourceId.0.portLed.1.pcaIo.index", {TlvType::Integer, "2"}},
{"api.platform.lib.config.hwResourceId.0.portLed.1.0.pcaIo.pin", {TlvType::Integer, "4"}},
{"api.platform.lib.config.hwResourceId.0.portLed.1.0.pcaIo.usage", {TlvType::Text, "LINK,10G"}},
{"api.platform.lib.config.hwResourceId.0.portLed.1.1.pcaIo.pin", {TlvType::Integer, "5"}},
{"api.platform.lib.config.hwResourceId.0.portLed.1.1.pcaIo.usage", {TlvType::Text, "LINK,25G"}},
{"api.platform.lib.config.hwResourceId.0.portLed.2.type", {TlvType::Text, "PCA"}},
{"api.platform.lib.config.hwResourceId.0.portLed.2.pcaIo.index", {TlvType::Integer, "2"}},
{"api.platform.lib.config.hwResourceId.0.portLed.2.0.pcaIo.pin", {TlvType::Integer, "6"}},
{"api.platform.lib.config.hwResourceId.0.portLed.2.0.pcaIo.usage", {TlvType::Text, "LINK,10G"}},
{"api.platform.lib.config.hwResourceId.0.portLed.2.1.pcaIo.pin", {TlvType::Integer, "7"}},
{"api.platform.lib.config.hwResourceId.0.portLed.2.1.pcaIo.usage", {TlvType::Text, "LINK,25G"}},
{"api.platform.lib.config.hwResourceId.0.portLed.3.type", {TlvType::Text, "PCA"}},
{"api.platform.lib.config.hwResourceId.0.portLed.3.pcaIo.index", {TlvType::Integer, "4"}},
{"api.platform.lib.config.hwResourceId.0.portLed.3.0.pcaIo.pin", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.0.portLed.3.0.pcaIo.usage", {TlvType::Text, "LINK,10G"}},
{"api.platform.lib.config.hwResourceId.0.portLed.3.1.pcaIo.pin", {TlvType::Integer, "1"}},
{"api.platform.lib.config.hwResourceId.0.portLed.3.1.pcaIo.usage", {TlvType::Text, "LINK,25G"}},
{"api.platform.lib.config.hwResourceId.1.interfaceType", {TlvType::Text, "QSFP"}},
{"api.platform.lib.config.hwResourceId.1.xcvrI2C.busSelType", {TlvType::Text, "PCAMUX"}},
{"api.platform.lib.config.hwResourceId.1.xcvrI2C.pcaMux.index", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.1.xcvrI2C.pcaMux.value", {TlvType::Integer, "2"}},
{"api.platform.lib.config.hwResourceId.1.xcvrState.pcaIo.index", {TlvType::Integer, "1"}},
{"api.platform.lib.config.hwResourceId.1.xcvrState.pcaIo.basePin", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.1.xcvrState.pcaIo.modPrsL.pin", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.1.xcvrState.pcaIo.intL.pin", {TlvType::Integer, "1"}},
{"api.platform.lib.config.hwResourceId.1.xcvrState.pcaIo.resetL.pin", {TlvType::Integer, "4"}},
{"api.platform.lib.config.hwResourceId.1.xcvrState.pcaIo.lpMode.pin", {TlvType::Integer, "5"}},
{"api.platform.lib.config.hwResourceId.1.portLed.0.type", {TlvType::Text, "PCA"}},
{"api.platform.lib.config.hwResourceId.1.portLed.0.pcaIo.index", {TlvType::Integer, "5"}},
{"api.platform.lib.config.hwResourceId.1.portLed.0.0.pcaIo.pin", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.1.portLed.0.0.pcaIo.usage", {TlvType::Text, "LINK,10G"}},
{"api.platform.lib.config.hwResourceId.1.portLed.0.1.pcaIo.pin", {TlvType::Integer, "1"}},
{"api.platform.lib.config.hwResourceId.1.portLed.0.1.pcaIo.usage", {TlvType::Text, "LINK,40G"}},
{"api.platform.lib.config.hwResourceId.1.portLed.0.2.pcaIo.pin", {TlvType::Integer, "2"}},
{"api.platform.lib.config.hwResourceId.1.portLed.0.2.pcaIo.usage", {TlvType::Text, "LINK,25G"}},
{"api.platform.lib.config.hwResourceId.1.portLed.0.3.pcaIo.pin", {TlvType::Integer, "3"}},
{"api.platform.lib.config.hwResourceId.1.portLed.0.3.pcaIo.usage", {TlvType::Text, "LINK,100G"}},
{"api.platform.lib.config.hwResourceId.1.portLed.1.type", {TlvType::Text, "PCA"}},
{"api.platform.lib.config.hwResourceId.1.portLed.1.pcaIo.index", {TlvType::Integer, "5"}},
{"api.platform.lib.config.hwResourceId.1.portLed.1.0.pcaIo.pin", {TlvType::Integer, "4"}},
{"api.platform.lib.config.hwResourceId.1.portLed.1.0.pcaIo.usage", {TlvType::Text, "LINK,10G"}},
{"api.platform.lib.config.hwResourceId.1.portLed.1.1.pcaIo.pin", {TlvType::Integer, "5"}},
{"api.platform.lib.config.hwResourceId.1.portLed.1.1.pcaIo.usage", {TlvType::Text, "LINK,25G"}},
{"api.platform.lib.config.hwResourceId.1.portLed.2.type", {TlvType::Text, "PCA"}},
{"api.platform.lib.config.hwResourceId.1.portLed.2.pcaIo.index", {TlvType::Integer, "5"}},
{"api.platform.lib.config.hwResourceId.1.portLed.2.0.pcaIo.pin", {TlvType::Integer, "6"}},
{"api.platform.lib.config.hwResourceId.1.portLed.2.0.pcaIo.usage", {TlvType::Text, "LINK,10G"}},
{"api.platform.lib.config.hwResourceId.1.portLed.2.1.pcaIo.pin", {TlvType::Integer, "7"}},
{"api.platform.lib.config.hwResourceId.1.portLed.2.1.pcaIo.usage", {TlvType::Text, "LINK,25G"}},
{"api.platform.lib.config.hwResourceId.1.portLed.3.type", {TlvType::Text, "PCA"}},
{"api.platform.lib.config.hwResourceId.1.portLed.3.pcaIo.index", {TlvType::Integer, "4"}},
{"api.platform.lib.config.hwResourceId.1.portLed.3.0.pcaIo.pin", {TlvType::Integer, "2"}},
{"api.platform.lib.config.hwResourceId.1.portLed.3.0.pcaIo.usage", {TlvType::Text, "LINK,10G"}},
{"api.platform.lib.config.hwResourceId.1.portLed.3.1.pcaIo.pin", {TlvType::Integer, "3"}},
{"api.platform.lib.config.hwResourceId.1.portLed.3.1.pcaIo.usage", {TlvType::Text, "LINK,25G"}},
{"api.platform.lib.config.hwResourceId.2.type", {TlvType::Text, "VRM"}},
{"api.platform.lib.config.hwResourceId.2.vrm.busSelType", {TlvType::Text, "PCAMUX"}},
{"api.platform.lib.config.hwResourceId.2.vrm.bus", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.2.vrm.model", {TlvType::Text, "IR"}},
{"api.platform.lib.config.hwResourceId.2.vrm.addr", {TlvType::Integer, "0x08"}},
{"api.platform.lib.config.hwResourceId.2.vrm.pcaMux.index", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.2.vrm.pcaMux.value", {TlvType::Integer, "0x04"}},
{"api.platform.config.switch.0.VDDS.hwResourceId", {TlvType::Integer, "2"}},
{"api.platform.lib.config.hwResourceId.3.type", {TlvType::Text, "VRM"}},
{"api.platform.lib.config.hwResourceId.3.vrm.busSelType", {TlvType::Text, "PCAMUX"}},
{"api.platform.lib.config.hwResourceId.3.vrm.bus", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.3.vrm.model", {TlvType::Text, "IR"}},
{"api.platform.lib.config.hwResourceId.3.vrm.addr", {TlvType::Integer, "0x08"}},
{"api.platform.lib.config.hwResourceId.3.vrm.pcaMux.index", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.3.vrm.pcaMux.value", {TlvType::Integer, "0x04"}},
{"api.platform.config.switch.0.VDDF.hwResourceId", {TlvType::Integer, "259"}},
}},
{"FM10840_B0_8x25G", {
{"api.platform.config.numSwitches", {TlvType::Integer, "1"}},
{"api.platform.config.platformName", {TlvType::Text, "rrc_2x100gm"}},
{"api.platform.config.switch.0.switchNumber", {TlvType::Integer, "0"}},
{"api.platform.config.switch.0.uioDevName", {TlvType::Text, "/dev/uio0"}},
{"api.platform.config.switch.0.resource4DevName", {TlvType::Text, ""}},
{"api.platform.config.switch.0.msiEnabled", {TlvType::Boolean, "true"}},
{"api.platform.config.switch.0.ledPollPeriodMsec", {TlvType::Integer, "200"}},
{"api.platform.config.switch.0.ledBlinkMode", {TlvType::Text, "HW_ASSISTED"}},
{"api.platform.config.switch.0.i2cClkDivider", {TlvType::Integer, "52"}},
{"api.platform.config.switch.0.i2cResetGpio", {TlvType::Integer, "5"}},
{"api.platform.config.switch.0.xcvrPollPeriodMsec", {TlvType::Integer, "1000"}},
{"api.platform.config.switch.0.numPorts", {TlvType::Integer, "13"}},
{"api.platform.config.switch.0.cpuPort", {TlvType::Integer, "12"}},
{"api.platform.config.switch.0.bootCfg.mgmtPep", {TlvType::Integer, "-1"}},
{"api.platform.config.switch.0.bootCfg.pep.0.mode", {TlvType::Boolean, "0"}},
{"api.platform.config.switch.0.bootCfg.pep.2.mode", {TlvType::Boolean, "0"}},
{"api.platform.config.switch.0.bootCfg.pep.4.mode", {TlvType::Boolean, "0"}},
{"api.platform.config.switch.0.bootCfg.pep.6.mode", {TlvType::Boolean, "0"}},
{"api.platform.config.switch.0.bootCfg.pep.0.enable", {TlvType::Boolean, "1"}},
{"api.platform.config.switch.0.bootCfg.pep.2.enable", {TlvType::Boolean, "1"}},
{"api.platform.config.switch.0.bootCfg.pep.4.enable", {TlvType::Boolean, "1"}},
{"api.platform.config.switch.0.bootCfg.pep.6.enable", {TlvType::Boolean, "1"}},
{"api.platform.config.switch.0.bootCfg.pep.8.enable", {TlvType::Boolean, "0"}},
{"api.platform.config.switch.0.bootCfg.pep.0.bar4Allowed", {TlvType::Boolean, "1"}},
{"api.platform.config.switch.0.bootCfg.pep.2.bar4Allowed", {TlvType::Boolean, "1"}},
{"api.platform.config.switch.0.bootCfg.pep.4.bar4Allowed", {TlvType::Boolean, "1"}},
{"api.platform.config.switch.0.bootCfg.pep.6.bar4Allowed", {TlvType::Boolean, "1"}},
{"api.platform.config.switch.0.portIndex.0.portMapping", {TlvType::Text, "\"LOG=0 PCIE=8\""}},
{"api.platform.config.switch.0.portIndex.1.portMapping", {TlvType::Text, "\"LOG=1 EPL=1 LANE=0\""}},
{"api.platform.config.switch.0.portIndex.2.portMapping", {TlvType::Text, "\"LOG=2 EPL=1 LANE=1\""}},
{"api.platform.config.switch.0.portIndex.3.portMapping", {TlvType::Text, "\"LOG=3 EPL=1 LANE=2\""}},
{"api.platform.config.switch.0.portIndex.4.portMapping", {TlvType::Text, "\"LOG=4 EPL=1 LANE=3\""}},
{"api.platform.config.switch.0.portIndex.5.portMapping", {TlvType::Text, "\"LOG=5 EPL=7 LANE=0\""}},
{"api.platform.config.switch.0.portIndex.6.portMapping", {TlvType::Text, "\"LOG=6 EPL=7 LANE=1\""}},
{"api.platform.config.switch.0.portIndex.7.portMapping", {TlvType::Text, "\"LOG=7 EPL=7 LANE=2\""}},
{"api.platform.config.switch.0.portIndex.8.portMapping", {TlvType::Text, "\"LOG=8 EPL=7 LANE=3\""}},
{"api.platform.config.switch.0.portIndex.9.portMapping", {TlvType::Text, "\"LOG=9 PCIE=0\""}},
{"api.platform.config.switch.0.portIndex.10.portMapping", {TlvType::Text, "\"LOG=10 PCIE=2\""}},
{"api.platform.config.switch.0.portIndex.11.portMapping", {TlvType::Text, "\"LOG=11 PCIE=4\""}},
{"api.platform.config.switch.0.portIndex.12.portMapping", {TlvType::Text, "\"LOG=12 PCIE=6\""}},
{"api.platform.config.switch.0.port.default.interfaceType", {TlvType::Text, "NONE"}},
{"api.platform.config.switch.0.portIndex.1.interfaceType", {TlvType::Text, "QSFP_LANE0"}},
{"api.platform.config.switch.0.portIndex.2.interfaceType", {TlvType::Text, "QSFP_LANE1"}},
{"api.platform.config.switch.0.portIndex.3.interfaceType", {TlvType::Text, "QSFP_LANE2"}},
{"api.platform.config.switch.0.portIndex.4.interfaceType", {TlvType::Text, "QSFP_LANE3"}},
{"api.platform.config.switch.0.portIndex.5.interfaceType", {TlvType::Text, "QSFP_LANE0"}},
{"api.platform.config.switch.0.portIndex.6.interfaceType", {TlvType::Text, "QSFP_LANE1"}},
{"api.platform.config.switch.0.portIndex.7.interfaceType", {TlvType::Text, "QSFP_LANE2"}},
{"api.platform.config.switch.0.portIndex.8.interfaceType", {TlvType::Text, "QSFP_LANE3"}},
{"api.platform.config.switch.0.portIndex.0.speed", {TlvType::Integer, SPEED_10G}},
{"api.platform.config.switch.0.portIndex.1.speed", {TlvType::Integer, SPEED_25G}},
{"api.platform.config.switch.0.portIndex.2.speed", {TlvType::Integer, SPEED_25G}},
{"api.platform.config.switch.0.portIndex.3.speed", {TlvType::Integer, SPEED_25G}},
{"api.platform.config.switch.0.portIndex.4.speed", {TlvType::Integer, SPEED_25G}},
{"api.platform.config.switch.0.portIndex.5.speed", {TlvType::Integer, SPEED_25G}},
{"api.platform.config.switch.0.portIndex.6.speed", {TlvType::Integer, SPEED_25G}},
{"api.platform.config.switch.0.portIndex.7.speed", {TlvType::Integer, SPEED_25G}},
{"api.platform.config.switch.0.portIndex.8.speed", {TlvType::Integer, SPEED_25G}},
{"api.platform.config.switch.0.portIndex.9.speed", {TlvType::Integer, SPEED_50G}},
{"api.platform.config.switch.0.portIndex.10.speed", {TlvType::Integer, SPEED_50G}},
{"api.platform.config.switch.0.portIndex.11.speed", {TlvType::Integer, SPEED_50G}}, //? second PCIe group
{"api.platform.config.switch.0.portIndex.12.speed", {TlvType::Integer, SPEED_50G}}, //? second PCIe group
{"api.platform.config.switch.0.port.default.ethernetMode", {TlvType::Text, "DISABLED"}},
{"api.platform.config.switch.0.portIndex.1.ethernetMode", {TlvType::Text, "AUTODETECT"}},
{"api.platform.config.switch.0.portIndex.2.ethernetMode", {TlvType::Text, "AUTODETECT"}},
{"api.platform.config.switch.0.portIndex.3.ethernetMode", {TlvType::Text, "AUTODETECT"}},
{"api.platform.config.switch.0.portIndex.4.ethernetMode", {TlvType::Text, "AUTODETECT"}},
{"api.platform.config.switch.0.portIndex.5.ethernetMode", {TlvType::Text, "AUTODETECT"}},
{"api.platform.config.switch.0.portIndex.6.ethernetMode", {TlvType::Text, "AUTODETECT"}},
{"api.platform.config.switch.0.portIndex.7.ethernetMode", {TlvType::Text, "AUTODETECT"}},
{"api.platform.config.switch.0.portIndex.8.ethernetMode", {TlvType::Text, "AUTODETECT"}},
{"api.platform.config.switch.0.port.default.capability", {TlvType::Text, "NONE"}},
{"api.platform.config.switch.0.portIndex.1.capability",{TlvType::Text, "LAG,ROUTE,10G,25G,SW_LED"}},
{"api.platform.config.switch.0.portIndex.2.capability",{TlvType::Text, "LAG,ROUTE,10G,25G,SW_LED"}},
{"api.platform.config.switch.0.portIndex.3.capability",{TlvType::Text, "LAG,ROUTE,10G,25G,SW_LED"}},
{"api.platform.config.switch.0.portIndex.4.capability",{TlvType::Text, "LAG,ROUTE,10G,25G,SW_LED"}},
{"api.platform.config.switch.0.portIndex.5.capability",{TlvType::Text, "LAG,ROUTE,10G,25G,SW_LED"}},
{"api.platform.config.switch.0.portIndex.6.capability",{TlvType::Text, "LAG,ROUTE,10G,25G,SW_LED"}},
{"api.platform.config.switch.0.portIndex.7.capability",{TlvType::Text, "LAG,ROUTE,10G,25G,SW_LED"}},
{"api.platform.config.switch.0.portIndex.8.capability",{TlvType::Text, "LAG,ROUTE,10G,25G,SW_LED"}},
{"api.platform.config.switch.0.port.default.lanePolarity", {TlvType::Text, "INVERT_NONE"}},
{"api.platform.config.switch.0.port.default.preCursorCopper", {TlvType::Integer, "0"}},
{"api.platform.config.switch.0.sharedLibraryName", {TlvType::Text, "libLTStdPlatform.so"}},
{"api.platform.config.switch.0.sharedLibrary.disable", {TlvType::Text, "GetPortIntrPending,EnablePortIntr"}},
{"api.platform.lib.config.bus0.i2cDevName", {TlvType::Text, "switchI2C"}},
{"api.platform.lib.config.pcaMux.count", {TlvType::Integer, "1"}},
{"api.platform.lib.config.pcaMux.0.model", {TlvType::Text, "PCA9545"}},
{"api.platform.lib.config.pcaMux.0.addr", {TlvType::Integer, "0x58"}},
{"api.platform.lib.config.pcaMux.0.bus", {TlvType::Integer, "0"}},
{"api.platform.lib.config.pcaIo.count", {TlvType::Integer, "6"}},
{"api.platform.lib.config.pcaIo.0.model", {TlvType::Text, "PCA9538"}},
{"api.platform.lib.config.pcaIo.0.bus", {TlvType::Integer, "0"}},
{"api.platform.lib.config.pcaIo.0.addr", {TlvType::Integer, "0x60"}},
{"api.platform.lib.config.pcaIo.1.model", {TlvType::Text, "PCA9538"}},
{"api.platform.lib.config.pcaIo.1.bus", {TlvType::Integer, "0"}},
{"api.platform.lib.config.pcaIo.1.addr", {TlvType::Integer, "0x61"}},
{"api.platform.lib.config.pcaIo.2.model", {TlvType::Text, "PCA9538"}},
{"api.platform.lib.config.pcaIo.2.bus", {TlvType::Integer, "0"}},
{"api.platform.lib.config.pcaIo.2.addr", {TlvType::Integer, "0x62"}},
{"api.platform.lib.config.pcaIo.3.model", {TlvType::Text, "PCA9538"}},
{"api.platform.lib.config.pcaIo.3.bus", {TlvType::Integer, "0"}},
{"api.platform.lib.config.pcaIo.3.addr", {TlvType::Integer, "0x64"}},
{"api.platform.lib.config.pcaIo.4.model", {TlvType::Text, "PCA9538"}},
{"api.platform.lib.config.pcaIo.4.bus", {TlvType::Integer, "0"}},
{"api.platform.lib.config.pcaIo.4.addr", {TlvType::Integer, "0x65"}},
{"api.platform.lib.config.pcaIo.5.model", {TlvType::Text, "PCA9538"}},
{"api.platform.lib.config.pcaIo.5.bus", {TlvType::Integer, "0"}},
{"api.platform.lib.config.pcaIo.5.addr", {TlvType::Integer, "0x66"}},
{"api.platform.lib.config.xcvrState.default.modPrsL.pin", {TlvType::Integer, "2"}},
{"api.platform.lib.config.xcvrState.default.intL.pin", {TlvType::Integer, "1"}},
{"api.platform.lib.config.xcvrState.default.resetL.pin", {TlvType::Integer, "3"}},
{"api.platform.lib.config.xcvrState.default.lpMode.pin", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.count", {TlvType::Integer, "4"}},
{"api.platform.config.switch.0.portIndex.1.hwResourceId", {TlvType::Integer, "0"}},
{"api.platform.config.switch.0.portIndex.2.hwResourceId", {TlvType::Integer, "0"}},
{"api.platform.config.switch.0.portIndex.3.hwResourceId", {TlvType::Integer, "0"}},
{"api.platform.config.switch.0.portIndex.4.hwResourceId", {TlvType::Integer, "0"}},
{"api.platform.config.switch.0.portIndex.5.hwResourceId", {TlvType::Integer, "1"}},
{"api.platform.config.switch.0.portIndex.6.hwResourceId", {TlvType::Integer, "1"}},
{"api.platform.config.switch.0.portIndex.7.hwResourceId", {TlvType::Integer, "1"}},
{"api.platform.config.switch.0.portIndex.8.hwResourceId", {TlvType::Integer, "1"}},
{"api.platform.lib.config.hwResourceId.0.interfaceType", {TlvType::Text, "QSFP"}},
{"api.platform.lib.config.hwResourceId.0.xcvrI2C.busSelType", {TlvType::Text, "PCAMUX"}},
{"api.platform.lib.config.hwResourceId.0.xcvrI2C.pcaMux.index", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.0.xcvrI2C.pcaMux.value", {TlvType::Integer, "1"}},
{"api.platform.lib.config.hwResourceId.0.xcvrState.pcaIo.index", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.0.xcvrState.pcaIo.basePin", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.0.xcvrState.pcaIo.modPrsL.pin", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.0.xcvrState.pcaIo.intL.pin", {TlvType::Integer, "1"}},
{"api.platform.lib.config.hwResourceId.0.xcvrState.pcaIo.resetL.pin", {TlvType::Integer, "4"}},
{"api.platform.lib.config.hwResourceId.0.xcvrState.pcaIo.lpMode.pin", {TlvType::Integer, "5"}},
{"api.platform.lib.config.hwResourceId.0.portLed.0.type", {TlvType::Text, "PCA"}},
{"api.platform.lib.config.hwResourceId.0.portLed.0.pcaIo.index", {TlvType::Integer, "2"}},
{"api.platform.lib.config.hwResourceId.0.portLed.0.0.pcaIo.pin", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.0.portLed.0.0.pcaIo.usage", {TlvType::Text, "LINK,10G"}},
{"api.platform.lib.config.hwResourceId.0.portLed.0.1.pcaIo.pin", {TlvType::Integer, "1"}},
{"api.platform.lib.config.hwResourceId.0.portLed.0.1.pcaIo.usage", {TlvType::Text, "LINK,40G"}},
{"api.platform.lib.config.hwResourceId.0.portLed.0.2.pcaIo.pin", {TlvType::Integer, "2"}},
{"api.platform.lib.config.hwResourceId.0.portLed.0.2.pcaIo.usage", {TlvType::Text, "LINK,25G"}},
{"api.platform.lib.config.hwResourceId.0.portLed.0.3.pcaIo.pin", {TlvType::Integer, "3"}},
{"api.platform.lib.config.hwResourceId.0.portLed.0.3.pcaIo.usage",{TlvType::Text, "LINK,100G"}},
{"api.platform.lib.config.hwResourceId.0.portLed.1.type", {TlvType::Text, "PCA"}},
{"api.platform.lib.config.hwResourceId.0.portLed.1.pcaIo.index", {TlvType::Integer, "2"}},
{"api.platform.lib.config.hwResourceId.0.portLed.1.0.pcaIo.pin", {TlvType::Integer, "4"}},
{"api.platform.lib.config.hwResourceId.0.portLed.1.0.pcaIo.usage", {TlvType::Text, "LINK,10G"}},
{"api.platform.lib.config.hwResourceId.0.portLed.1.1.pcaIo.pin", {TlvType::Integer, "5"}},
{"api.platform.lib.config.hwResourceId.0.portLed.1.1.pcaIo.usage", {TlvType::Text, "LINK,25G"}},
{"api.platform.lib.config.hwResourceId.0.portLed.2.type", {TlvType::Text, "PCA"}},
{"api.platform.lib.config.hwResourceId.0.portLed.2.pcaIo.index", {TlvType::Integer, "2"}},
{"api.platform.lib.config.hwResourceId.0.portLed.2.0.pcaIo.pin", {TlvType::Integer, "6"}},
{"api.platform.lib.config.hwResourceId.0.portLed.2.0.pcaIo.usage", {TlvType::Text, "LINK,10G"}},
{"api.platform.lib.config.hwResourceId.0.portLed.2.1.pcaIo.pin", {TlvType::Integer, "7"}},
{"api.platform.lib.config.hwResourceId.0.portLed.2.1.pcaIo.usage", {TlvType::Text, "LINK,25G"}},
{"api.platform.lib.config.hwResourceId.0.portLed.3.type", {TlvType::Text, "PCA"}},
{"api.platform.lib.config.hwResourceId.0.portLed.3.pcaIo.index", {TlvType::Integer, "4"}},
{"api.platform.lib.config.hwResourceId.0.portLed.3.0.pcaIo.pin", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.0.portLed.3.0.pcaIo.usage", {TlvType::Text, "LINK,10G"}},
{"api.platform.lib.config.hwResourceId.0.portLed.3.1.pcaIo.pin", {TlvType::Integer, "1"}},
{"api.platform.lib.config.hwResourceId.0.portLed.3.1.pcaIo.usage", {TlvType::Text, "LINK,25G"}},
{"api.platform.lib.config.hwResourceId.1.interfaceType", {TlvType::Text, "QSFP"}},
{"api.platform.lib.config.hwResourceId.1.xcvrI2C.busSelType", {TlvType::Text, "PCAMUX"}},
{"api.platform.lib.config.hwResourceId.1.xcvrI2C.pcaMux.index", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.1.xcvrI2C.pcaMux.value", {TlvType::Integer, "2"}},
{"api.platform.lib.config.hwResourceId.1.xcvrState.pcaIo.index", {TlvType::Integer, "1"}},
{"api.platform.lib.config.hwResourceId.1.xcvrState.pcaIo.basePin", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.1.xcvrState.pcaIo.modPrsL.pin", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.1.xcvrState.pcaIo.intL.pin", {TlvType::Integer, "1"}},
{"api.platform.lib.config.hwResourceId.1.xcvrState.pcaIo.resetL.pin", {TlvType::Integer, "4"}},
{"api.platform.lib.config.hwResourceId.1.xcvrState.pcaIo.lpMode.pin", {TlvType::Integer, "5"}},
{"api.platform.lib.config.hwResourceId.1.portLed.0.type", {TlvType::Text, "PCA"}},
{"api.platform.lib.config.hwResourceId.1.portLed.0.pcaIo.index", {TlvType::Integer, "5"}},
{"api.platform.lib.config.hwResourceId.1.portLed.0.0.pcaIo.pin", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.1.portLed.0.0.pcaIo.usage", {TlvType::Text, "LINK,10G"}},
{"api.platform.lib.config.hwResourceId.1.portLed.0.1.pcaIo.pin", {TlvType::Integer, "1"}},
{"api.platform.lib.config.hwResourceId.1.portLed.0.1.pcaIo.usage", {TlvType::Text, "LINK,40G"}},
{"api.platform.lib.config.hwResourceId.1.portLed.0.2.pcaIo.pin", {TlvType::Integer, "2"}},
{"api.platform.lib.config.hwResourceId.1.portLed.0.2.pcaIo.usage", {TlvType::Text, "LINK,25G"}},
{"api.platform.lib.config.hwResourceId.1.portLed.0.3.pcaIo.pin", {TlvType::Integer, "3"}},
{"api.platform.lib.config.hwResourceId.1.portLed.0.3.pcaIo.usage", {TlvType::Text, "LINK,100G"}},
{"api.platform.lib.config.hwResourceId.1.portLed.1.type", {TlvType::Text, "PCA"}},
{"api.platform.lib.config.hwResourceId.1.portLed.1.pcaIo.index", {TlvType::Integer, "5"}},
{"api.platform.lib.config.hwResourceId.1.portLed.1.0.pcaIo.pin", {TlvType::Integer, "4"}},
{"api.platform.lib.config.hwResourceId.1.portLed.1.0.pcaIo.usage", {TlvType::Text, "LINK,10G"}},
{"api.platform.lib.config.hwResourceId.1.portLed.1.1.pcaIo.pin", {TlvType::Integer, "5"}},
{"api.platform.lib.config.hwResourceId.1.portLed.1.1.pcaIo.usage", {TlvType::Text, "LINK,25G"}},
{"api.platform.lib.config.hwResourceId.1.portLed.2.type", {TlvType::Text, "PCA"}},
{"api.platform.lib.config.hwResourceId.1.portLed.2.pcaIo.index", {TlvType::Integer, "5"}},
{"api.platform.lib.config.hwResourceId.1.portLed.2.0.pcaIo.pin", {TlvType::Integer, "6"}},
{"api.platform.lib.config.hwResourceId.1.portLed.2.0.pcaIo.usage", {TlvType::Text, "LINK,10G"}},
{"api.platform.lib.config.hwResourceId.1.portLed.2.1.pcaIo.pin", {TlvType::Integer, "7"}},
{"api.platform.lib.config.hwResourceId.1.portLed.2.1.pcaIo.usage", {TlvType::Text, "LINK,25G"}},
{"api.platform.lib.config.hwResourceId.1.portLed.3.type", {TlvType::Text, "PCA"}},
{"api.platform.lib.config.hwResourceId.1.portLed.3.pcaIo.index", {TlvType::Integer, "4"}},
{"api.platform.lib.config.hwResourceId.1.portLed.3.0.pcaIo.pin", {TlvType::Integer, "2"}},
{"api.platform.lib.config.hwResourceId.1.portLed.3.0.pcaIo.usage", {TlvType::Text, "LINK,10G"}},
{"api.platform.lib.config.hwResourceId.1.portLed.3.1.pcaIo.pin", {TlvType::Integer, "3"}},
{"api.platform.lib.config.hwResourceId.1.portLed.3.1.pcaIo.usage", {TlvType::Text, "LINK,25G"}},
{"api.platform.lib.config.hwResourceId.2.type", {TlvType::Text, "VRM"}},
{"api.platform.lib.config.hwResourceId.2.vrm.busSelType", {TlvType::Text, "PCAMUX"}},
{"api.platform.lib.config.hwResourceId.2.vrm.bus", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.2.vrm.model", {TlvType::Text, "IR"}},
{"api.platform.lib.config.hwResourceId.2.vrm.addr", {TlvType::Integer, "0x08"}},
{"api.platform.lib.config.hwResourceId.2.vrm.pcaMux.index", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.2.vrm.pcaMux.value", {TlvType::Integer, "0x04"}},
{"api.platform.config.switch.0.VDDS.hwResourceId", {TlvType::Integer, "2"}},
{"api.platform.lib.config.hwResourceId.3.type", {TlvType::Text, "VRM"}},
{"api.platform.lib.config.hwResourceId.3.vrm.busSelType", {TlvType::Text, "PCAMUX"}},
{"api.platform.lib.config.hwResourceId.3.vrm.bus", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.3.vrm.model", {TlvType::Text, "IR"}},
{"api.platform.lib.config.hwResourceId.3.vrm.addr", {TlvType::Integer, "0x08"}},
{"api.platform.lib.config.hwResourceId.3.vrm.pcaMux.index", {TlvType::Integer, "0"}},
{"api.platform.lib.config.hwResourceId.3.vrm.pcaMux.value", {TlvType::Integer, "0x04"}},
{"api.platform.config.switch.0.VDDF.hwResourceId", {TlvType::Integer, "259"}},
}}
};
}
}
#undef SPEED_100G
#undef SPEED_50G
#undef SPEED_40G
#undef SPEED_25G
#undef SPEED_10G