[devices]: New platform as7326-56x (#1524)
* Update sonic-platform-modules-accton to lastest Signed-off-by: roylee123 <roy_lee@accton.com> * Install sonic-platform-common package in platform-monitor docker for ledd (#1330) * Install sonic-platform-common package in platform-monitor docker for ledd * Specify Python wheel dependencies in docker-platform-monitor.mk; Remove explicit specifications from Dockerfile.j2 * Add related files for new platfrom as7326_56x. Signed-off-by: roy_lee <roy_lee@accton.com> * Validate sfputil.py and verified. Signed-off-by: roy_lee <roy_lee@accton.com> * Push submodule sonic-platform-modules-accton for as7326-56x validation. Signed-off-by: roy_lee <roy_lee@accton.com>
This commit is contained in:
parent
baa9d45343
commit
ebea937a7a
@ -0,0 +1,55 @@
|
||||
# name lanes alias index
|
||||
Ethernet0 41 twentyfiveGigE1 0
|
||||
Ethernet1 42 twentyfiveGigE2 1
|
||||
Ethernet2 43 twentyfiveGigE3 2
|
||||
Ethernet3 44 twentyfiveGigE4 3
|
||||
Ethernet4 49 twentyfiveGigE5 4
|
||||
Ethernet5 50 twentyfiveGigE6 5
|
||||
Ethernet6 51 twentyfiveGigE7 6
|
||||
Ethernet7 52 twentyfiveGigE8 7
|
||||
Ethernet8 53 twentyfiveGigE9 8
|
||||
Ethernet9 54 twentyfiveGigE10 9
|
||||
Ethernet10 55 twentyfiveGigE11 10
|
||||
Ethernet11 56 twentyfiveGigE12 11
|
||||
Ethernet12 65 twentyfiveGigE13 12
|
||||
Ethernet13 66 twentyfiveGigE14 13
|
||||
Ethernet14 67 twentyfiveGigE15 14
|
||||
Ethernet15 68 twentyfiveGigE16 15
|
||||
Ethernet16 33 twentyfiveGigE17 16
|
||||
Ethernet17 34 twentyfiveGigE18 17
|
||||
Ethernet18 35 twentyfiveGigE19 18
|
||||
Ethernet19 36 twentyfiveGigE20 19
|
||||
Ethernet20 37 twentyfiveGigE21 20
|
||||
Ethernet21 38 twentyfiveGigE22 21
|
||||
Ethernet22 39 twentyfiveGigE23 22
|
||||
Ethernet23 40 twentyfiveGigE24 23
|
||||
Ethernet24 69 twentyfiveGigE25 24
|
||||
Ethernet25 70 twentyfiveGigE26 25
|
||||
Ethernet26 71 twentyfiveGigE27 26
|
||||
Ethernet27 72 twentyfiveGigE28 27
|
||||
Ethernet28 81 twentyfiveGigE29 28
|
||||
Ethernet29 82 twentyfiveGigE30 29
|
||||
Ethernet30 83 twentyfiveGigE31 30
|
||||
Ethernet31 84 twentyfiveGigE32 31
|
||||
Ethernet32 85 twentyfiveGigE33 32
|
||||
Ethernet33 86 twentyfiveGigE34 33
|
||||
Ethernet34 87 twentyfiveGigE35 34
|
||||
Ethernet35 88 twentyfiveGigE36 35
|
||||
Ethernet36 97 twentyfiveGigE37 36
|
||||
Ethernet37 98 twentyfiveGigE38 37
|
||||
Ethernet38 99 twentyfiveGigE39 38
|
||||
Ethernet39 100 twentyfiveGigE40 39
|
||||
Ethernet40 101 twentyfiveGigE41 40
|
||||
Ethernet41 102 twentyfiveGigE42 41
|
||||
Ethernet42 103 twentyfiveGigE43 42
|
||||
Ethernet43 104 twentyfiveGigE44 43
|
||||
Ethernet44 105 twentyfiveGigE45 44
|
||||
Ethernet45 106 twentyfiveGigE46 45
|
||||
Ethernet46 107 twentyfiveGigE47 46
|
||||
Ethernet47 108 twentyfiveGigE48 47
|
||||
Ethernet48 5,6,7,8 hundredGigE49 48
|
||||
Ethernet52 1,2,3,4 hundredGigE50 52
|
||||
Ethernet56 109,110,111,112 hundredGigE51 56
|
||||
Ethernet60 21,22,23,24 hundredGigE52 60
|
||||
Ethernet64 9,10,11,12 hundredGigE53 64
|
||||
Ethernet68 117,118,119,120 hundredGigE54 68
|
@ -0,0 +1 @@
|
||||
SAI_INIT_CONFIG_FILE=/etc/bcm/td3-as7326-48x25G+8x100G.config.bcm
|
1
device/accton/x86_64-accton_as7326_56x-r0/installer.conf
Normal file
1
device/accton/x86_64-accton_as7326_56x-r0/installer.conf
Normal file
@ -0,0 +1 @@
|
||||
CONSOLE_SPEED=115200
|
79
device/accton/x86_64-accton_as7326_56x-r0/led_proc_init.soc
Executable file
79
device/accton/x86_64-accton_as7326_56x-r0/led_proc_init.soc
Executable file
@ -0,0 +1,79 @@
|
||||
# accton_as7326_56x 48x25G+8x100G SDK port LED macro init SOC
|
||||
s CMIC_LEDUP0_DATA_RAM 0
|
||||
s CMIC_LEDUP1_DATA_RAM 0
|
||||
|
||||
m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=63 REMAP_PORT_1=63 REMAP_PORT_2=63 REMAP_PORT_3=63
|
||||
m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=63 REMAP_PORT_5=63 REMAP_PORT_6=63 REMAP_PORT_7=63
|
||||
m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=27 REMAP_PORT_9=26 REMAP_PORT_10=25 REMAP_PORT_11=24
|
||||
m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=63 REMAP_PORT_13=63 REMAP_PORT_14=63 REMAP_PORT_15=63
|
||||
m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=63 REMAP_PORT_17=63 REMAP_PORT_18=63 REMAP_PORT_19=63
|
||||
m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=31 REMAP_PORT_21=30 REMAP_PORT_22=29 REMAP_PORT_23=28
|
||||
m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=15 REMAP_PORT_25=14 REMAP_PORT_26=13 REMAP_PORT_27=12
|
||||
m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=19 REMAP_PORT_29=18 REMAP_PORT_30=17 REMAP_PORT_31=16
|
||||
m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=63 REMAP_PORT_33=63 REMAP_PORT_34=63 REMAP_PORT_35=63
|
||||
m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=63 REMAP_PORT_37=63 REMAP_PORT_38=63 REMAP_PORT_39=63
|
||||
m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=35 REMAP_PORT_41=34 REMAP_PORT_42=33 REMAP_PORT_43=32
|
||||
m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=63 REMAP_PORT_45=63 REMAP_PORT_46=63 REMAP_PORT_47=63
|
||||
m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=23 REMAP_PORT_49=22 REMAP_PORT_50=21 REMAP_PORT_51=20
|
||||
m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=11 REMAP_PORT_53=10 REMAP_PORT_54=9 REMAP_PORT_55=8
|
||||
m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=7 REMAP_PORT_57=6 REMAP_PORT_58=5 REMAP_PORT_59=4
|
||||
m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=3 REMAP_PORT_61=2 REMAP_PORT_62=1 REMAP_PORT_63=0
|
||||
|
||||
m CMIC_LEDUP1_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=19 REMAP_PORT_1=18 REMAP_PORT_2=17 REMAP_PORT_3=16
|
||||
m CMIC_LEDUP1_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=23 REMAP_PORT_5=22 REMAP_PORT_6=21 REMAP_PORT_7=20
|
||||
m CMIC_LEDUP1_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=3 REMAP_PORT_9=2 REMAP_PORT_10=1 REMAP_PORT_11=0
|
||||
m CMIC_LEDUP1_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=63 REMAP_PORT_13=63 REMAP_PORT_14=63 REMAP_PORT_15=63
|
||||
m CMIC_LEDUP1_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=7 REMAP_PORT_17=6 REMAP_PORT_18=5 REMAP_PORT_19=4
|
||||
m CMIC_LEDUP1_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=11 REMAP_PORT_21=10 REMAP_PORT_22=9 REMAP_PORT_23=8
|
||||
m CMIC_LEDUP1_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=63 REMAP_PORT_25=63 REMAP_PORT_26=63 REMAP_PORT_27=63
|
||||
m CMIC_LEDUP1_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=63 REMAP_PORT_29=63 REMAP_PORT_30=63 REMAP_PORT_31=63
|
||||
m CMIC_LEDUP1_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=15 REMAP_PORT_33=14 REMAP_PORT_34=13 REMAP_PORT_35=12
|
||||
m CMIC_LEDUP1_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=27 REMAP_PORT_37=26 REMAP_PORT_38=25 REMAP_PORT_39=24
|
||||
m CMIC_LEDUP1_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=63 REMAP_PORT_41=63 REMAP_PORT_42=63 REMAP_PORT_43=63
|
||||
m CMIC_LEDUP1_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=63 REMAP_PORT_45=63 REMAP_PORT_46=63 REMAP_PORT_47=63
|
||||
m CMIC_LEDUP1_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=31 REMAP_PORT_49=30 REMAP_PORT_50=29 REMAP_PORT_51=28
|
||||
m CMIC_LEDUP1_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=35 REMAP_PORT_53=34 REMAP_PORT_54=33 REMAP_PORT_55=32
|
||||
m CMIC_LEDUP1_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=63 REMAP_PORT_57=63 REMAP_PORT_58=63 REMAP_PORT_59=63
|
||||
m CMIC_LEDUP1_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=63 REMAP_PORT_61=63 REMAP_PORT_62=63 REMAP_PORT_63=63
|
||||
|
||||
led 0 stop
|
||||
led 0 prog \
|
||||
02 FD 42 80 02 FF 42 00 02 FE 42 00 02 FA 42 7E \
|
||||
02 FB 42 24 06 F9 D2 00 74 1E 02 F9 42 03 67 AC \
|
||||
67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 \
|
||||
86 FE 67 C3 67 52 86 FE 06 FB D6 FE 74 1E 86 FC \
|
||||
3E FA 06 FE 88 4A 03 71 4C 67 84 57 67 84 57 67 \
|
||||
98 57 06 FE 88 80 4A 00 27 97 75 4F 90 4A 00 27 \
|
||||
4A 01 27 B7 97 71 69 77 42 06 F9 D6 FC 74 7C 02 \
|
||||
F9 4A 07 37 4E 07 02 FC 42 00 4E 07 06 F9 0A 07 \
|
||||
71 4F 77 42 16 FF 06 FD 17 4D DA 07 74 95 12 FF \
|
||||
52 00 86 FD 57 86 FF 57 16 FF 06 FD 07 4D DA 07 \
|
||||
74 A9 12 FF 52 00 86 FD 57 86 FF 57 06 FE C2 FC \
|
||||
98 98 12 F4 50 C2 FC 98 98 F2 F0 14 06 F4 C2 03 \
|
||||
88 77 D1 06 FE C2 FC 98 98 F2 E0 14 06 FE C2 03 \
|
||||
88 18 71 E2 80 18 71 DD 67 98 67 98 57 67 98 67 \
|
||||
84 57 80 18 71 EB 67 84 67 98 57 67 84 67 84 57 \
|
||||
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
led 0 start
|
||||
led auto on
|
||||
|
||||
led 1 stop
|
||||
led 1 prog \
|
||||
02 FD 42 80 02 FF 42 00 02 FE 42 00 02 FA 42 7E \
|
||||
02 FB 42 24 06 F9 D2 00 74 1E 02 F9 42 03 67 AC \
|
||||
67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 \
|
||||
86 FE 67 C3 67 52 86 FE 06 FB D6 FE 74 1E 86 FC \
|
||||
3E FA 06 FE 88 4A 03 71 4C 67 84 57 67 84 57 67 \
|
||||
98 57 06 FE 88 80 4A 00 27 97 75 4F 90 4A 00 27 \
|
||||
4A 01 27 B7 97 71 69 77 42 06 F9 D6 FC 74 7C 02 \
|
||||
F9 4A 07 37 4E 07 02 FC 42 00 4E 07 06 F9 0A 07 \
|
||||
71 4F 77 42 16 FF 06 FD 17 4D DA 07 74 95 12 FF \
|
||||
52 00 86 FD 57 86 FF 57 16 FF 06 FD 07 4D DA 07 \
|
||||
74 A9 12 FF 52 00 86 FD 57 86 FF 57 06 FE C2 FC \
|
||||
98 98 12 F4 50 C2 FC 98 98 F2 F0 14 06 F4 C2 03 \
|
||||
88 77 D1 06 FE C2 FC 98 98 F2 E0 14 06 FE C2 03 \
|
||||
88 18 71 E2 80 18 71 DD 67 98 67 98 57 67 98 67 \
|
||||
84 57 80 18 71 EB 67 84 67 98 57 67 84 67 84 57 \
|
||||
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
led 1 start
|
||||
led auto on
|
1184
device/accton/x86_64-accton_as7326_56x-r0/minigraph.xml
Normal file
1184
device/accton/x86_64-accton_as7326_56x-r0/minigraph.xml
Normal file
File diff suppressed because it is too large
Load Diff
21
device/accton/x86_64-accton_as7326_56x-r0/plugins/eeprom.py
Normal file
21
device/accton/x86_64-accton_as7326_56x-r0/plugins/eeprom.py
Normal file
@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
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 = "/sys/bus/i2c/devices/0-0056/eeprom"
|
||||
super(board, self).__init__(self.eeprom_path, 0, '', True)
|
61
device/accton/x86_64-accton_as7326_56x-r0/plugins/psuutil.py
Normal file
61
device/accton/x86_64-accton_as7326_56x-r0/plugins/psuutil.py
Normal file
@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
#############################################################################
|
||||
# Accton
|
||||
#
|
||||
# Module contains an implementation of SONiC PSU Base API and
|
||||
# provides the PSUs status which are available in the platform
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
import os.path
|
||||
|
||||
try:
|
||||
from sonic_psu.psu_base import PsuBase
|
||||
except ImportError as e:
|
||||
raise ImportError (str(e) + "- required module not found")
|
||||
|
||||
class PsuUtil(PsuBase):
|
||||
"""Platform-specific PSUutil class"""
|
||||
|
||||
def __init__(self):
|
||||
PsuBase.__init__(self)
|
||||
|
||||
self.psu_path = "/sys/bus/i2c/devices/"
|
||||
self.psu_presence = "/psu_present"
|
||||
self.psu_oper_status = "/psu_power_good"
|
||||
self.psu_mapping = {
|
||||
2: "13-0053",
|
||||
1: "17-0051",
|
||||
}
|
||||
|
||||
def get_num_psus(self):
|
||||
return len(self.psu_mapping)
|
||||
|
||||
def get_psu_status(self, index):
|
||||
if index is None:
|
||||
return False
|
||||
|
||||
status = 0
|
||||
node = self.psu_path + self.psu_mapping[index]+self.psu_oper_status
|
||||
try:
|
||||
with open(node, 'r') as power_status:
|
||||
status = int(power_status.read())
|
||||
except IOError:
|
||||
return False
|
||||
|
||||
return status == 1
|
||||
|
||||
def get_psu_presence(self, index):
|
||||
if index is None:
|
||||
return False
|
||||
|
||||
status = 0
|
||||
node = self.psu_path + self.psu_mapping[index] + self.psu_presence
|
||||
try:
|
||||
with open(node, 'r') as presence_status:
|
||||
status = int(presence_status.read())
|
||||
except IOError:
|
||||
return False
|
||||
|
||||
return status == 1
|
203
device/accton/x86_64-accton_as7326_56x-r0/plugins/sfputil.py
Normal file
203
device/accton/x86_64-accton_as7326_56x-r0/plugins/sfputil.py
Normal file
@ -0,0 +1,203 @@
|
||||
# sfputil.py
|
||||
#
|
||||
# Platform-specific SFP transceiver interface for SONiC
|
||||
#
|
||||
|
||||
try:
|
||||
import time
|
||||
from sonic_sfp.sfputilbase import SfpUtilBase
|
||||
except ImportError as e:
|
||||
raise ImportError("%s - required module not found" % str(e))
|
||||
|
||||
|
||||
class SfpUtil(SfpUtilBase):
|
||||
"""Platform-specific SfpUtil class"""
|
||||
|
||||
PORT_START = 0
|
||||
PORT_END = 81
|
||||
PORTS_IN_BLOCK = 82
|
||||
QSFP_PORT_START = 48
|
||||
QSFP_PORT_END = 82
|
||||
|
||||
BASE_VAL_PATH = "/sys/class/i2c-adapter/i2c-{0}/{1}-0050/"
|
||||
|
||||
_port_to_is_present = {}
|
||||
_port_to_lp_mode = {}
|
||||
|
||||
_port_to_eeprom_mapping = {}
|
||||
_cpld_mapping = {
|
||||
1: "12-0062",
|
||||
2: "18-0060",
|
||||
3: "19-0064",
|
||||
}
|
||||
|
||||
_port_to_i2c_mapping = {
|
||||
0: 42,
|
||||
1: 41,
|
||||
2: 44,
|
||||
3: 43,
|
||||
4: 47,
|
||||
5: 45,
|
||||
6: 46,
|
||||
7: 50,
|
||||
8: 48,
|
||||
9: 49,
|
||||
10: 51,
|
||||
11: 52,
|
||||
12: 53,
|
||||
13: 56,
|
||||
14: 55,
|
||||
15: 54,
|
||||
16: 58,
|
||||
17: 57,
|
||||
18: 59,
|
||||
19: 60,
|
||||
20: 61,
|
||||
21: 63,
|
||||
22: 62,
|
||||
23: 64,
|
||||
24: 66,
|
||||
25: 68,
|
||||
26: 65,
|
||||
27: 67,
|
||||
28: 69,
|
||||
29: 71,
|
||||
30: 72,
|
||||
31: 70,
|
||||
32: 74,
|
||||
33: 73,
|
||||
34: 76,
|
||||
35: 75,
|
||||
36: 77,
|
||||
37: 79,
|
||||
38: 78,
|
||||
39: 80,
|
||||
40: 81,
|
||||
41: 82,
|
||||
42: 84,
|
||||
43: 85,
|
||||
44: 83,
|
||||
45: 87,
|
||||
46: 88,
|
||||
47: 86,
|
||||
48: 25, #QSFP49
|
||||
49: 25,
|
||||
50: 25,
|
||||
51: 25,
|
||||
52: 26, #QSFP50
|
||||
53: 26,
|
||||
54: 26,
|
||||
55: 26,
|
||||
56: 27, #QSFP51
|
||||
57: 26,
|
||||
58: 26,
|
||||
59: 26,
|
||||
60: 28, #QSFP52
|
||||
61: 26,
|
||||
62: 26,
|
||||
63: 26,
|
||||
64: 29, #QSFP53
|
||||
65: 26,
|
||||
66: 26,
|
||||
67: 26,
|
||||
68: 30, #QSFP54
|
||||
69: 26,
|
||||
70: 26,
|
||||
71: 26,
|
||||
72: 31, #QSFP55
|
||||
73: 26,
|
||||
74: 26,
|
||||
75: 26,
|
||||
76: 32, #QSFP56
|
||||
77: 26,
|
||||
78: 26,
|
||||
79: 26,
|
||||
80: 22,
|
||||
81: 23}
|
||||
|
||||
@property
|
||||
def port_start(self):
|
||||
return self.PORT_START
|
||||
|
||||
@property
|
||||
def port_end(self):
|
||||
return self.PORT_END
|
||||
|
||||
@property
|
||||
def qsfp_port_start(self):
|
||||
return self.QSFP_PORT_START
|
||||
|
||||
@property
|
||||
def qsfp_port_end(self):
|
||||
return self.QSFP_PORT_END
|
||||
|
||||
@property
|
||||
def qsfp_ports(self):
|
||||
return range(self.QSFP_PORT_START, self.PORTS_IN_BLOCK + 1)
|
||||
|
||||
@property
|
||||
def port_to_eeprom_mapping(self):
|
||||
return self._port_to_eeprom_mapping
|
||||
|
||||
def __init__(self):
|
||||
eeprom_path = '/sys/bus/i2c/devices/{0}-0050/eeprom'
|
||||
for x in range(0, self.port_end+1):
|
||||
self.port_to_eeprom_mapping[x] = eeprom_path.format(
|
||||
self._port_to_i2c_mapping[x])
|
||||
|
||||
SfpUtilBase.__init__(self)
|
||||
|
||||
|
||||
# For port 48~51 are QSFP, here presumed they're all split to 4 lanes.
|
||||
def get_cage_num(self, port_num):
|
||||
cage_num = port_num
|
||||
if (port_num >= self.QSFP_PORT_START):
|
||||
cage_num = (port_num - self.QSFP_PORT_START)/4
|
||||
cage_num = cage_num + self.QSFP_PORT_START
|
||||
|
||||
return cage_num
|
||||
|
||||
# For cage 0~23 and 48~51 are at cpld2, others are at cpld3.
|
||||
def get_cpld_num(self, port_num):
|
||||
cpld_i = 1
|
||||
cage_num = self.get_cage_num(port_num)
|
||||
if (port_num > 29):
|
||||
cpld_i = 2
|
||||
return cpld_i
|
||||
|
||||
def get_presence(self, port_num):
|
||||
# Check for invalid port_num
|
||||
if port_num < self.port_start or port_num > self.port_end:
|
||||
return False
|
||||
|
||||
cage_num = self.get_cage_num(port_num)
|
||||
cpld_i = self.get_cpld_num(port_num)
|
||||
#print "[ROY] cpld:%d" % cpld_i
|
||||
|
||||
cpld_ps = self._cpld_mapping[cpld_i]
|
||||
path = "/sys/bus/i2c/devices/{0}/module_present_{1}"
|
||||
port_ps = path.format(cpld_ps, cage_num+1)
|
||||
|
||||
try:
|
||||
val_file = open(port_ps)
|
||||
except IOError as e:
|
||||
print "Error: unable to open file: %s" % str(e)
|
||||
return False
|
||||
|
||||
content = val_file.readline().rstrip()
|
||||
val_file.close()
|
||||
|
||||
# content is a string, either "0" or "1"
|
||||
if content == "1":
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def get_low_power_mode(self, port_num):
|
||||
raise NotImplementedError
|
||||
|
||||
def set_low_power_mode(self, port_num, lpmode):
|
||||
raise NotImplementedError
|
||||
|
||||
def reset(self, port_num):
|
||||
raise NotImplementedError
|
@ -17,6 +17,7 @@ $(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(DELL_S6000_PLATFORM_MODULE) \
|
||||
$(ACCTON_AS7816_64X_PLATFORM_MODULE) \
|
||||
$(ACCTON_AS7716_32X_PLATFORM_MODULE) \
|
||||
$(ACCTON_AS7312_54X_PLATFORM_MODULE) \
|
||||
$(ACCTON_AS7326_56X_PLATFORM_MODULE) \
|
||||
$(ACCTON_AS7716_32XB_PLATFORM_MODULE) \
|
||||
$(INVENTEC_D7032Q28B_PLATFORM_MODULE) \
|
||||
$(INVENTEC_D7054Q28B_PLATFORM_MODULE) \
|
||||
|
@ -5,6 +5,7 @@ ACCTON_AS5712_54X_PLATFORM_MODULE_VERSION = 1.1
|
||||
ACCTON_AS7816_64X_PLATFORM_MODULE_VERSION = 1.1
|
||||
ACCTON_AS7716_32X_PLATFORM_MODULE_VERSION = 1.1
|
||||
ACCTON_AS7312_54X_PLATFORM_MODULE_VERSION = 1.1
|
||||
ACCTON_AS7326_56X_PLATFORM_MODULE_VERSION = 1.1
|
||||
ACCTON_AS7716_32XB_PLATFORM_MODULE_VERSION = 1.1
|
||||
|
||||
export ACCTON_AS7712_32X_PLATFORM_MODULE_VERSION
|
||||
@ -12,6 +13,7 @@ export ACCTON_AS5712_54X_PLATFORM_MODULE_VERSION
|
||||
export ACCTON_AS7816_64X_PLATFORM_MODULE_VERSION
|
||||
export ACCTON_AS7716_32X_PLATFORM_MODULE_VERSION
|
||||
export ACCTON_AS7312_54X_PLATFORM_MODULE_VERSION
|
||||
export ACCTON_AS7326_56X_PLATFORM_MODULE_VERSION
|
||||
export ACCTON_AS7716_32XB_PLATFORM_MODULE_VERSION
|
||||
|
||||
ACCTON_AS7712_32X_PLATFORM_MODULE = sonic-platform-accton-as7712-32x_$(ACCTON_AS7712_32X_PLATFORM_MODULE_VERSION)_amd64.deb
|
||||
@ -36,6 +38,10 @@ ACCTON_AS7312_54X_PLATFORM_MODULE = sonic-platform-accton-as7312-54x_$(ACCTON_AS
|
||||
$(ACCTON_AS7312_54X_PLATFORM_MODULE)_PLATFORM = x86_64-accton_as7312_54x-r0
|
||||
$(eval $(call add_extra_package,$(ACCTON_AS7712_32X_PLATFORM_MODULE),$(ACCTON_AS7312_54X_PLATFORM_MODULE)))
|
||||
|
||||
ACCTON_AS7326_56X_PLATFORM_MODULE = sonic-platform-accton-as7326-56x_$(ACCTON_AS7326_56X_PLATFORM_MODULE_VERSION)_amd64.deb
|
||||
$(ACCTON_AS7326_56X_PLATFORM_MODULE)_PLATFORM = x86_64-accton_as7326_56x-r0
|
||||
$(eval $(call add_extra_package,$(ACCTON_AS7712_32X_PLATFORM_MODULE),$(ACCTON_AS7326_56X_PLATFORM_MODULE)))
|
||||
|
||||
ACCTON_AS7716_32XB_PLATFORM_MODULE = sonic-platform-accton-as7716-32xb_$(ACCTON_AS7716_32XB_PLATFORM_MODULE_VERSION)_amd64.deb
|
||||
$(ACCTON_AS7716_32XB_PLATFORM_MODULE)_PLATFORM = x86_64-accton_as7716_32xb-r0
|
||||
$(eval $(call add_extra_package,$(ACCTON_AS7712_32X_PLATFORM_MODULE),$(ACCTON_AS7716_32XB_PLATFORM_MODULE)))
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 296471b9cd538dd0d10bd7d9c6a7d05ffc0ba45a
|
||||
Subproject commit 406c4e675ea73d52827b520958c9956551a94e8e
|
Reference in New Issue
Block a user