Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[device]: Add support for Mellanox MSN2100 #544

Merged
merged 2 commits into from
Apr 28, 2017
Merged
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
17 changes: 17 additions & 0 deletions device/mellanox/x86_64-mlnx_msn2100-r0/ACS-MSN2100/port_config.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# name lanes
Ethernet0 0,1,2,3
Ethernet4 4,5,6,7
Ethernet8 8,9,10,11
Ethernet12 12,13,14,15
Ethernet16 16,17,18,19
Ethernet20 20,21,22,23
Ethernet24 24,25,26,27
Ethernet28 28,29,30,31
Ethernet32 32,33,34,35
Ethernet36 36,37,38,39
Ethernet40 40,41,42,43
Ethernet44 44,45,46,47
Ethernet48 48,49,50,51
Ethernet52 52,53,54,55
Ethernet56 56,57,58,59
Ethernet60 60,61,62,63
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SAI_INIT_CONFIG_FILE=/usr/share/sai_2100.xml
1 change: 1 addition & 0 deletions device/mellanox/x86_64-mlnx_msn2100-r0/hw-management
1 change: 1 addition & 0 deletions device/mellanox/x86_64-mlnx_msn2100-r0/installer.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="acpi_enforce_resources=lax acpi=noirq"
578 changes: 578 additions & 0 deletions device/mellanox/x86_64-mlnx_msn2100-r0/minigraph.xml

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions device/mellanox/x86_64-mlnx_msn2100-r0/plugins/eeprom.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env python

#############################################################################
# Mellanox
#
# Platform and model specific eeprom subclass, inherits from the base class,
# and provides the followings:
# - the eeprom format definition
# - specific encoder/decoder if there is special need
#############################################################################

try:
import exceptions
import binascii
import time
import optparse
import warnings
import os
import sys
from sonic_eeprom import eeprom_base
from sonic_eeprom import eeprom_tlvinfo
import subprocess
except ImportError, e:
raise ImportError (str(e) + "- required module not found")

class board(eeprom_tlvinfo.TlvInfoDecoder):

_TLV_INFO_MAX_LEN = 256

def __init__(self, name, path, cpld_root, ro):
self.eeprom_path = "/bsp/eeprom/sys_eeprom"
super(board, self).__init__(self.eeprom_path, 0, '', True)

28 changes: 28 additions & 0 deletions device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfputil.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#! /usr/bin/python

try:
from sonic_sfp.sfputilbase import sfputilbase
except ImportError, e:
raise ImportError (str(e) + "- required module not found")


class sfputil(sfputilbase):
"""Platform specific sfputil class"""

port_start = 0
port_end = 15
ports_in_block = 16

eeprom_offset = 1

port_to_eeprom_mapping = {}

_qsfp_ports = range(0, ports_in_block + 1)

def __init__(self, port_num):
# Override port_to_eeprom_mapping for class initialization
eeprom_path = '/bsp/qsfp/qsfp{0}'
for x in range(0, self.port_end + 1):
self.port_to_eeprom_mapping[x] = eeprom_path.format(x + self.eeprom_offset)
sfputilbase.__init__(self, port_num)

21 changes: 21 additions & 0 deletions device/mellanox/x86_64-mlnx_msn2100-r0/sensors.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
bus "i2c-7" "i2c-1-mux (chan_id 5)"
chip "lm75-i2c-7-4a"
label temp1 "Ambient Port Temp"

bus "i2c-5" "i2c-1-mux (chan_id 3)"
chip "ucd9200-i2c-5-27"
label in1 "UCD1 vin"
label in2 "ASIC 3.3 vout"
label in3 "ASIC 1.2 vout"
label temp1 "UCD1 Temp"
label temp2 "UCD1 Temp2"

chip "ucd9200-i2c-5-41"
label in1 "UCD2 vin"
label in2 "ASIC Vcore vout"
label temp1 "UCD2 Temp1"
label temp2 "UCD2 Temp2"

bus "i2c-17" "i2c-1-mux (chan_id 7)"
chip "lm75-i2c-17-49"
label temp1 "Ambient Board Temp"