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][platform] Add to support as7926-40xfb platform (SFP refactor) #10648

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# name lanes alias index speed
Ethernet0 0,1 hundredGigE1 1 100000
Ethernet2 2,3 hundredGigE2 2 100000
Ethernet4 4,5 hundredGigE3 3 100000
Ethernet6 6,7 hundredGigE4 4 100000
Ethernet8 8,9 hundredGigE5 5 100000
Ethernet10 10,11 hundredGigE6 6 100000
Ethernet12 12,13 hundredGigE7 7 100000
Ethernet14 14,15 hundredGigE8 8 100000
Ethernet16 16,17 hundredGigE9 9 100000
Ethernet18 18,19 hundredGigE10 10 100000
Ethernet20 20,21 hundredGigE11 11 100000
Ethernet22 22,23 hundredGigE12 12 100000
Ethernet24 24,25 hundredGigE13 13 100000
Ethernet26 26,27 hundredGigE14 14 100000
Ethernet28 28,29 hundredGigE15 15 100000
Ethernet30 30,31 hundredGigE16 16 100000
Ethernet32 32,33 hundredGigE17 17 100000
Ethernet34 34,35 hundredGigE18 18 100000
Ethernet36 36,37 hundredGigE19 19 100000
Ethernet38 38,39 hundredGigE20 20 100000
Ethernet40 40,41 hundredGigE21 21 100000
Ethernet42 42,43 hundredGigE22 22 100000
Ethernet44 44,45 hundredGigE23 23 100000
Ethernet46 46,47 hundredGigE24 24 100000
Ethernet48 88,89 hundredGigE25 25 100000
Ethernet50 90,91 hundredGigE26 26 100000
Ethernet52 92,93 hundredGigE27 27 100000
Ethernet54 94,95 hundredGigE28 28 100000
Ethernet56 80,81 hundredGigE29 29 100000
Ethernet58 82,83 hundredGigE30 30 100000
Ethernet60 84,85 hundredGigE31 31 100000
Ethernet62 86,87 hundredGigE32 32 100000
Ethernet64 72,73 hundredGigE33 33 100000
Ethernet66 74,75 hundredGigE34 34 100000
Ethernet68 76,77 hundredGigE35 35 100000
Ethernet70 78,79 hundredGigE36 36 100000
Ethernet72 64,65 hundredGigE37 37 100000
Ethernet74 66,67 hundredGigE38 38 100000
Ethernet76 68,69 hundredGigE39 39 100000
Ethernet78 70,71 hundredGigE40 40 100000
Ethernet80 96,97 hundredGigE41 41 100000
Ethernet82 98,99 hundredGigE42 42 100000
Ethernet84 100,101 hundredGigE43 43 100000
Ethernet86 102,103 hundredGigE44 44 100000
Ethernet88 104,105 hundredGigE45 45 100000
Ethernet90 106,107 hundredGigE46 46 100000
Ethernet92 108,109 hundredGigE47 47 100000
Ethernet94 110,111 hundredGigE48 48 100000
Ethernet96 112,113 hundredGigE49 49 100000
Ethernet98 114,115 hundredGigE50 50 100000
Ethernet100 116,117 hundredGigE51 51 100000
Ethernet102 118,119 hundredGigE52 52 100000
Ethernet104 120,121 hundredGigE53 53 100000
Ethernet105 122 twentyfiveGigE54 54 25000
Ethernet106 123 twentyfiveGigE55 55 25000
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions device/accton/x86_64-accton_as7926_40xfb-r0/default_sku
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Accton-AS7926-40XFB t1
4 changes: 4 additions & 0 deletions device/accton/x86_64-accton_as7926_40xfb-r0/installer.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CONSOLE_PORT=0x3f8
CONSOLE_DEV=0
CONSOLE_SPEED=115200
ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="pcie_aspm=off intel_iommu=off modprobe.blacklist=ast,ipmi_msghandler,ipmi_ssif,ipmi_si,ipmi_devintf"
1 change: 1 addition & 0 deletions device/accton/x86_64-accton_as7926_40xfb-r0/platform_asic
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
broadcom
12 changes: 12 additions & 0 deletions device/accton/x86_64-accton_as7926_40xfb-r0/plugins/eeprom.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env python

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/devices/platform/as7926_40xfb_sys/eeprom"
super(board, self).__init__(self.eeprom_path, 0, '', True)
59 changes: 59 additions & 0 deletions device/accton/x86_64-accton_as7926_40xfb-r0/plugins/psuutil.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/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/devices/platform/as7926_40xfb_psu/psu"
self.psu_presence = "_present"
self.psu_oper_status = "_power_good"
self.psu_mapping = {
1: "1",
2: "2"
}

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
Loading