[platform]: add eeprom/sfputil support for z9100 (#342)
This commit is contained in:
parent
b9b7d7a295
commit
7e1adeeb22
@ -0,0 +1,33 @@
|
|||||||
|
# name lanes alias
|
||||||
|
Ethernet0 49,50,51,52 hundredGigE1/1
|
||||||
|
Ethernet4 53,54,55,56 hundredGigE1/2
|
||||||
|
Ethernet8 57,58,59,60 hundredGigE1/3
|
||||||
|
Ethernet12 61,62,63,64 hundredGigE1/4
|
||||||
|
Ethernet16 65,66,67,68 hundredGigE1/5
|
||||||
|
Ethernet20 69,70,71,72 hundredGigE1/6
|
||||||
|
Ethernet24 73,74,75,76 hundredGigE1/7
|
||||||
|
Ethernet28 77,78,79,80 hundredGigE1/8
|
||||||
|
Ethernet32 37,38,39,40 hundredGigE1/9
|
||||||
|
Ethernet36 33,34,35,36 hundredGigE1/10
|
||||||
|
Ethernet40 45,46,47,48 hundredGigE1/11
|
||||||
|
Ethernet44 41,42,43,44 hundredGigE1/12
|
||||||
|
Ethernet48 81,82,83,84 hundredGigE1/13
|
||||||
|
Ethernet52 85,86,87,88 hundredGigE1/14
|
||||||
|
Ethernet56 89,90,91,92 hundredGigE1/15
|
||||||
|
Ethernet60 93,94,95,96 hundredGigE1/16
|
||||||
|
Ethernet64 97,98,99,100 hundredGigE1/17
|
||||||
|
Ethernet68 101,102,103,104 hundredGigE1/18
|
||||||
|
Ethernet72 105,106,107,108 hundredGigE1/19
|
||||||
|
Ethernet76 109,110,111,112 hundredGigE1/20
|
||||||
|
Ethernet80 21,22,23,24 hundredGigE1/21
|
||||||
|
Ethernet84 17,18,19,20 hundredGigE1/22
|
||||||
|
Ethernet88 29,30,31,32 hundredGigE1/23
|
||||||
|
Ethernet92 25,26,27,28 hundredGigE1/24
|
||||||
|
Ethernet96 117,118,119,120 hundredGigE1/25
|
||||||
|
Ethernet100 113,114,115,116 hundredGigE1/26
|
||||||
|
Ethernet104 125,126,127,128 hundredGigE1/27
|
||||||
|
Ethernet108 121,122,123,124 hundredGigE1/28
|
||||||
|
Ethernet112 5,6,7,8 hundredGigE1/29
|
||||||
|
Ethernet116 1,2,3,4 hundredGigE1/30
|
||||||
|
Ethernet120 13,14,15,16 hundredGigE1/31
|
||||||
|
Ethernet124 9,10,11,12 hundredGigE1/32
|
@ -0,0 +1 @@
|
|||||||
|
SAI_INIT_CONFIG_FILE=/etc/bcm/th-z9100-32x100G.config.bcm
|
23
device/dell/x86_64-dell_z9100_c2538-r0/plugins/eeprom.py
Normal file
23
device/dell/x86_64-dell_z9100_c2538-r0/plugins/eeprom.py
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
# Dell Z9100
|
||||||
|
#
|
||||||
|
# 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:
|
||||||
|
from sonic_eeprom import eeprom_tlvinfo
|
||||||
|
except ImportError, e:
|
||||||
|
raise ImportError (str(e) + "- required module not found")
|
||||||
|
|
||||||
|
|
||||||
|
class board(eeprom_tlvinfo.TlvInfoDecoder):
|
||||||
|
|
||||||
|
def __init__(self, name, path, cpld_root, ro):
|
||||||
|
self.eeprom_path = "/sys/class/i2c-adapter/i2c-2/2-0050/eeprom"
|
||||||
|
super(board, self).__init__(self.eeprom_path, 0, '', True)
|
||||||
|
|
60
device/dell/x86_64-dell_z9100_c2538-r0/plugins/sfputil.py
Normal file
60
device/dell/x86_64-dell_z9100_c2538-r0/plugins/sfputil.py
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
#!/usr/bin/env 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 = 31
|
||||||
|
ports_in_block = 32
|
||||||
|
|
||||||
|
port_to_eeprom_mapping = {}
|
||||||
|
port_to_i2c_mapping = {
|
||||||
|
0: 18,
|
||||||
|
1: 19,
|
||||||
|
2: 20,
|
||||||
|
3: 21,
|
||||||
|
4: 22,
|
||||||
|
5: 23,
|
||||||
|
6: 24,
|
||||||
|
7: 25,
|
||||||
|
8: 26,
|
||||||
|
9: 27,
|
||||||
|
10: 28,
|
||||||
|
11: 29,
|
||||||
|
12: 31,
|
||||||
|
13: 30,
|
||||||
|
14: 33,
|
||||||
|
15: 32,
|
||||||
|
16: 34,
|
||||||
|
17: 35,
|
||||||
|
18: 36,
|
||||||
|
19: 37,
|
||||||
|
20: 38,
|
||||||
|
21: 39,
|
||||||
|
22: 40,
|
||||||
|
23: 41,
|
||||||
|
24: 42,
|
||||||
|
25: 43,
|
||||||
|
26: 44,
|
||||||
|
27: 45,
|
||||||
|
28: 46,
|
||||||
|
29: 47,
|
||||||
|
30: 48,
|
||||||
|
31: 49
|
||||||
|
}
|
||||||
|
|
||||||
|
_qsfp_ports = range(0, ports_in_block + 1)
|
||||||
|
|
||||||
|
def __init__(self, port_num):
|
||||||
|
# Override port_to_eeprom_mapping for class initialization
|
||||||
|
eeprom_path = '/sys/class/i2c-adapter/i2c-{0}/{0}-0050/eeprom'
|
||||||
|
for x in range(0, self.port_end + 1):
|
||||||
|
port_eeprom_path = eeprom_path.format(self.port_to_i2c_mapping[x])
|
||||||
|
self.port_to_eeprom_mapping[x] = port_eeprom_path
|
||||||
|
sfputilbase.__init__(self, port_num)
|
Reference in New Issue
Block a user