-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into as7926_40xfb
- Loading branch information
Showing
41 changed files
with
8,538 additions
and
2 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
device/accton/x86_64-accton_as9726_32d-r0/Accton-AS9726-32D/port_config.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# name lanes alias index speed | ||
Ethernet1 73,74,75,76,77,78,79,80 fourHundredGigE1 1 400000 | ||
Ethernet2 65,66,67,68,69,70,71,72 fourHundredGigE2 2 400000 | ||
Ethernet3 81,82,83,84,85,86,87,88 fourHundredGigE3 3 400000 | ||
Ethernet4 89,90,91,92,93,94,95,96 fourHundredGigE4 4 400000 | ||
Ethernet5 97,98,99,100,101,102,103,104 fourHundredGigE5 5 400000 | ||
Ethernet6 105,106,107,108,109,110,111,112 fourHundredGigE6 6 400000 | ||
Ethernet7 113,114,115,116,117,118,119,120 fourHundredGigE7 7 400000 | ||
Ethernet8 121,122,123,124,125,126,127,128 fourHundredGigE8 8 400000 | ||
Ethernet9 41,42,43,44,45,46,47,48 fourHundredGigE9 9 400000 | ||
Ethernet10 33,34,35,36,37,38,39,40 fourHundredGigE10 10 400000 | ||
Ethernet11 49,50,51,52,53,54,55,56 fourHundredGigE11 11 400000 | ||
Ethernet12 57,58,59,60,61,62,63,64 fourHundredGigE12 12 400000 | ||
Ethernet13 129,130,131,132,133,134,135,136 fourHundredGigE13 13 400000 | ||
Ethernet14 137,138,139,140,141,142,143,144 fourHundredGigE14 14 400000 | ||
Ethernet15 145,146,147,148,149,150,151,152 fourHundredGigE15 15 400000 | ||
Ethernet16 153,154,155,156,157,158,159,160 fourHundredGigE16 16 400000 | ||
Ethernet17 169,170,171,172,173,174,175,176 fourHundredGigE17 17 400000 | ||
Ethernet18 161,162,163,164,165,166,167,168 fourHundredGigE18 18 400000 | ||
Ethernet19 177,178,179,180,181,182,183,184 fourHundredGigE19 19 400000 | ||
Ethernet20 185,186,187,188,189,190,191,192 fourHundredGigE20 20 400000 | ||
Ethernet21 1,2,3,4,5,6,7,8 fourHundredGigE21 21 400000 | ||
Ethernet22 9,10,11,12,13,14,15,16 fourHundredGigE22 22 400000 | ||
Ethernet23 17,18,19,20,21,22,23,24 fourHundredGigE23 23 400000 | ||
Ethernet24 25,26,27,28,29,30,31,32 fourHundredGigE24 24 400000 | ||
Ethernet25 201,202,203,204,205,206,207,208 fourHundredGigE25 25 400000 | ||
Ethernet26 193,194,195,196,197,198,199,200 fourHundredGigE26 26 400000 | ||
Ethernet27 217,218,219,220,221,222,223,224 fourHundredGigE27 27 400000 | ||
Ethernet28 209,210,211,212,213,214,215,216 fourHundredGigE28 28 400000 | ||
Ethernet29 233,234,235,236,237,238,239,240 fourHundredGigE29 29 400000 | ||
Ethernet30 225,226,227,228,229,230,231,232 fourHundredGigE30 30 400000 | ||
Ethernet31 249,250,251,252,253,254,255,256 fourHundredGigE31 31 400000 | ||
Ethernet32 241,242,243,244,245,246,247,248 fourHundredGigE32 32 400000 | ||
Ethernet33 249 tenGigE33 33 10000 | ||
Ethernet34 250 tenGigE34 34 10000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Accton-AS9726-32D t1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
CONSOLE_PORT=0x3f8 | ||
CONSOLE_DEV=0 | ||
CONSOLE_SPEED=115200 |
13 changes: 13 additions & 0 deletions
13
device/accton/x86_64-accton_as9726_32d-r0/plugins/eeprom.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
try: | ||
from sonic_eeprom import eeprom_tlvinfo | ||
|
||
except ImportError as 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/1-0057/eeprom" | ||
super(board, self).__init__(self.eeprom_path, 0, '', True) |
61 changes: 61 additions & 0 deletions
61
device/accton/x86_64-accton_as9726_32d-r0/plugins/psuutil.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
# | ||
############################################################################# | ||
|
||
|
||
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 = { | ||
1: "9-0050", | ||
2: "9-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 |
Oops, something went wrong.