[Ingrasys] Add platform support for S9280-64X with Barefoot ASIC

This commit is contained in:
sonic 2018-06-08 17:21:33 +08:00
parent 2afd4c0d11
commit 29b9d904f6
12 changed files with 770 additions and 1 deletions

View File

@ -0,0 +1,65 @@
# name lanes alias speed autoneg fec index
Ethernet0 0,1,2,3 Ethernet0 100000 0 0 0
Ethernet4 4,5,6,7 Ethernet4 100000 0 0 1
Ethernet8 8,9,10,11 Ethernet8 100000 0 0 2
Ethernet12 12,13,14,15 Ethernet12 100000 0 0 3
Ethernet16 16,17,18,19 Ethernet16 100000 0 0 4
Ethernet20 20,21,22,23 Ethernet20 100000 0 0 5
Ethernet24 24,25,26,27 Ethernet24 100000 0 0 6
Ethernet28 28,29,30,31 Ethernet28 100000 0 0 7
Ethernet32 32,33,34,35 Ethernet32 100000 0 0 8
Ethernet36 36,37,38,39 Ethernet36 100000 0 0 9
Ethernet40 40,41,42,43 Ethernet40 100000 0 0 10
Ethernet44 44,45,46,47 Ethernet44 100000 0 0 11
Ethernet48 48,49,50,51 Ethernet48 100000 0 0 12
Ethernet52 52,53,54,55 Ethernet52 100000 0 0 13
Ethernet56 56,57,58,59 Ethernet56 100000 0 0 14
Ethernet60 60,61,62,63 Ethernet60 100000 0 0 15
Ethernet64 64,65,66,67 Ethernet64 100000 0 0 16
Ethernet68 68,69,70,71 Ethernet68 100000 0 0 17
Ethernet72 72,73,74,75 Ethernet72 100000 0 0 18
Ethernet76 76,77,78,79 Ethernet76 100000 0 0 19
Ethernet80 80,81,82,83 Ethernet80 100000 0 0 20
Ethernet84 84,85,86,87 Ethernet84 100000 0 0 21
Ethernet88 88,89,90,91 Ethernet88 100000 0 0 22
Ethernet92 92,93,94,95 Ethernet92 100000 0 0 23
Ethernet96 96,97,98,99 Ethernet96 100000 0 0 24
Ethernet100 100,101,102,103 Ethernet100 100000 0 0 25
Ethernet104 104,105,106,107 Ethernet104 100000 0 0 26
Ethernet108 108,109,110,111 Ethernet108 100000 0 0 27
Ethernet112 112,113,114,115 Ethernet112 100000 0 0 28
Ethernet116 116,117,118,119 Ethernet116 100000 0 0 29
Ethernet120 120,121,122,123 Ethernet120 100000 0 0 30
Ethernet124 124,125,126,127 Ethernet124 100000 0 0 31
Ethernet128 128,129,130,131 Ethernet128 100000 0 0 32
Ethernet132 132,133,134,135 Ethernet132 100000 0 0 33
Ethernet136 136,137,138,139 Ethernet136 100000 0 0 34
Ethernet140 140,141,142,143 Ethernet140 100000 0 0 35
Ethernet144 144,145,146,147 Ethernet144 100000 0 0 36
Ethernet148 148,149,150,151 Ethernet148 100000 0 0 37
Ethernet152 152,153,154,155 Ethernet152 100000 0 0 38
Ethernet156 156,157,158,159 Ethernet156 100000 0 0 39
Ethernet160 160,161,162,163 Ethernet160 100000 0 0 40
Ethernet164 164,165,166,167 Ethernet164 100000 0 0 41
Ethernet168 168,169,170,171 Ethernet168 100000 0 0 42
Ethernet172 172,173,174,175 Ethernet172 100000 0 0 43
Ethernet176 176,177,178,179 Ethernet176 100000 0 0 44
Ethernet180 180,181,182,183 Ethernet180 100000 0 0 45
Ethernet184 184,185,186,187 Ethernet184 100000 0 0 46
Ethernet188 188,189,190,191 Ethernet188 100000 0 0 47
Ethernet192 192,193,194,195 Ethernet192 100000 0 0 48
Ethernet196 196,197,198,199 Ethernet196 100000 0 0 49
Ethernet200 200,201,202,203 Ethernet200 100000 0 0 50
Ethernet204 204,205,206,207 Ethernet204 100000 0 0 51
Ethernet208 208,209,210,211 Ethernet208 100000 0 0 52
Ethernet212 212,213,214,215 Ethernet212 100000 0 0 53
Ethernet216 216,217,218,219 Ethernet216 100000 0 0 54
Ethernet220 220,221,222,223 Ethernet220 100000 0 0 55
Ethernet224 224,225,226,227 Ethernet224 100000 0 0 56
Ethernet228 228,229,230,231 Ethernet228 100000 0 0 57
Ethernet232 232,233,234,235 Ethernet232 100000 0 0 58
Ethernet236 236,237,238,239 Ethernet236 100000 0 0 59
Ethernet240 240,241,242,243 Ethernet240 100000 0 0 60
Ethernet244 244,245,246,247 Ethernet244 100000 0 0 61
Ethernet248 248,249,250,251 Ethernet248 100000 0 0 62
Ethernet252 252,253,254,255 Ethernet252 100000 0 0 63

View File

@ -0,0 +1,33 @@
{
"chip_list": [
{
"id": "asic-0",
"chip_family": "Tofino",
"instance": 0,
"pcie_sysfs_prefix": "/sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0",
"pcie_domain": 0,
"pcie_bus": 5,
"pcie_fn": 0,
"pcie_dev": 0,
"pcie_int_mode": 1,
"sds_fw_path": "share/tofino_sds_fw/avago/firmware"
}
],
"instance": 0,
"p4_program_list": [
{
"id": "pgm-0",
"instance": 0,
"path": "switch",
"program-name": "switch",
"pd": "lib/tofinopd/switch/libpd.so",
"pd-thrift": "lib/tofinopd/switch/libpdthrift.so",
"table-config": "share/tofinopd/switch/context.json",
"tofino-bin": "share/tofinopd/switch/tofino.bin",
"switchapi": "lib/libswitchapi.so",
"switchsai": "lib/libswitchsai.so",
"agent0": "lib/platform/x86_64-ingrasys_s9280_64x-r0/libpltfm_mgr.so",
"switchapi_port_add": false
}
]
}

View File

@ -0,0 +1,9 @@
INTERVAL=10
DEVPATH=hwmon1=devices/pci0000:00/0000:00:1f.3/i2c-0/i2c-16/16-002f hwmon3=devices/pci0000:00/0000:00:1f.3/i2c-0/i2c-6/6-004e
DEVNAME=hwmon1=w83795adg
FCTEMPS=hwmon1/device/pwm2=hwmon3/temp1_input
FCFANS=hwmon1/device/pwm2=hwmon1/device/fan7_input hwmon1/device/pwm2=hwmon1/device/fan5_input hwmon1/device/pwm2=hwmon1/device/fan3_input hwmon1/device/pwm2=hwmon1/device/fan1_input
MINTEMP=hwmon1/device/pwm2=20
MAXTEMP=hwmon1/device/pwm2=60
MINSTART=hwmon1/device/pwm2=75
MINSTOP=hwmon1/device/pwm2=22

View File

@ -0,0 +1,3 @@
CONSOLE_PORT=0x3f8
CONSOLE_DEV=0
CONSOLE_SPEED=115200

View File

@ -0,0 +1,151 @@
<DeviceMiniGraph xmlns="Microsoft.Search.Autopilot.Evolution" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<CpgDec>
<IsisRouters xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
<PeeringSessions>
<BGPSession>
<StartRouter>OCPSCH0104001MS</StartRouter>
<StartPeer>10.10.1.26</StartPeer>
<EndRouter>OCPSCH01040GGLF</EndRouter>
<EndPeer>10.10.1.25</EndPeer>
<Multihop>1</Multihop>
<HoldTime>10</HoldTime>
<KeepAliveTime>3</KeepAliveTime>
</BGPSession>
<BGPSession>
<StartRouter>OCPSCH0104002MS</StartRouter>
<StartPeer>10.10.2.26</StartPeer>
<EndRouter>OCPSCH01040GGLF</EndRouter>
<EndPeer>10.10.2.25</EndPeer>
<Multihop>1</Multihop>
<HoldTime>10</HoldTime>
<KeepAliveTime>3</KeepAliveTime>
</BGPSession>
</PeeringSessions>
<Routers xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
<a:BGPRouterDeclaration>
<a:ASN>64536</a:ASN>
<a:Hostname>OCPSCH01040GGLF</a:Hostname>
<a:Peers>
<BGPPeer>
<Address>10.10.1.26</Address>
<RouteMapIn i:nil="true"/>
<RouteMapOut i:nil="true"/>
</BGPPeer>
<BGPPeer>
<Address>10.10.2.26</Address>
<RouteMapIn i:nil="true"/>
<RouteMapOut i:nil="true"/>
</BGPPeer>
</a:Peers>
<a:RouteMaps/>
</a:BGPRouterDeclaration>
<a:BGPRouterDeclaration>
<a:ASN>64542</a:ASN>
<a:Hostname>OCPSCH0104001MS</a:Hostname>
<a:RouteMaps/>
</a:BGPRouterDeclaration>
<a:BGPRouterDeclaration>
<a:ASN>64543</a:ASN>
<a:Hostname>OCPSCH0104002MS</a:Hostname>
<a:RouteMaps/>
</a:BGPRouterDeclaration>
</Routers>
</CpgDec>
<DpgDec>
<DeviceDataPlaneInfo>
<IPSecTunnels/>
<LoopbackIPInterfaces xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
<a:LoopbackIPInterface>
<Name>HostIP</Name>
<AttachTo>Loopback0</AttachTo>
<a:Prefix xmlns:b="Microsoft.Search.Autopilot.NetMux">
<b:IPPrefix>100.0.0.9/32</b:IPPrefix>
</a:Prefix>
<a:PrefixStr>100.0.0.9/32</a:PrefixStr>
</a:LoopbackIPInterface>
</LoopbackIPInterfaces>
<ManagementIPInterfaces xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
</ManagementIPInterfaces>
<MplsInterfaces/>
<MplsTeInterfaces/>
<RsvpInterfaces/>
<Hostname>OCPSCH01040GGLF</Hostname>
<PortChannelInterfaces/>
<VlanInterfaces/>
<IPInterfaces>
<IPInterface>
<Name i:nil="true"/>
<AttachTo>Ethernet0</AttachTo>
<Prefix>10.10.1.25/30</Prefix>
</IPInterface>
<IPInterface>
<Name i:nil="true"/>
<AttachTo>Ethernet4</AttachTo>
<Prefix>10.10.2.25/30</Prefix>
</IPInterface>
</IPInterfaces>
<DataAcls/>
<AclInterfaces/>
<DownstreamSummaries/>
<DownstreamSummarySet xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
</DeviceDataPlaneInfo>
</DpgDec>
<PngDec>
<DeviceInterfaceLinks>
<DeviceLinkBase i:type="DeviceInterfaceLink">
<Bandwidth>40000</Bandwidth>
<ElementType>DeviceInterfaceLink</ElementType>
<EndDevice>OCPSCH0104001MS</EndDevice>
<EndPort>Ethernet24</EndPort>
<StartDevice>OCPSCH01040GGLF</StartDevice>
<StartPort>Ethernet0</StartPort>
</DeviceLinkBase>
<DeviceLinkBase i:type="DeviceInterfaceLink">
<Bandwidth>40000</Bandwidth>
<ElementType>DeviceInterfaceLink</ElementType>
<EndDevice>OCPSCH0104002MS</EndDevice>
<EndPort>Ethernet24</EndPort>
<StartDevice>OCPSCH01040GGLF</StartDevice>
<StartPort>Ethernet4</StartPort>
</DeviceLinkBase>
</DeviceInterfaceLinks>
<Devices>
<Device i:type="LeafRouter">
<Hostname>OCPSCH01040GGLF</Hostname>
<HwSku>INGRASYS-S9280-64X</HwSku>
</Device>
</Devices>
</PngDec>
<MetadataDeclaration>
<Devices xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
<a:DeviceMetadata>
<a:Name>OCPSCH01040GGLF</a:Name>
<a:Properties>
<a:DeviceProperty>
<a:Name>DhcpResources</a:Name>
<a:Reference i:nil="true"/>
<a:Value></a:Value>
</a:DeviceProperty>
<a:DeviceProperty>
<a:Name>NtpResources</a:Name>
<a:Reference i:nil="true"/>
<a:Value>0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org</a:Value>
</a:DeviceProperty>
<a:DeviceProperty>
<a:Name>SyslogResources</a:Name>
<a:Reference i:nil="true"/>
<a:Value></a:Value>
</a:DeviceProperty>
<a:DeviceProperty>
<a:Name>ErspanDestinationIpv4</a:Name>
<a:Reference i:nil="true"/>
<a:Value>2.2.2.2</a:Value>
</a:DeviceProperty>
</a:Properties>
</a:DeviceMetadata>
</Devices>
<Properties xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
</MetadataDeclaration>
<Hostname>OCPSCH01040GGLF</Hostname>
<HwSku>INGRASYS-S9280-64X</HwSku>
</DeviceMiniGraph>

View File

@ -0,0 +1,22 @@
#!/usr/bin/env python
#############################################################################
# Ingrasys S9280-64X
#
# 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-0/0-0051/eeprom"
super(board, self).__init__(self.eeprom_path, 0, '', True)

View File

@ -0,0 +1,93 @@
#
# psuutil.py
# Platform-specific PSU status interface for SONiC
#
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"""
# TODO: need to check if the patch mapping correct
SYSFS_PSU_DIR = ["/sys/bus/i2c/devices/i2c-18/18-0050",
"/sys/bus/i2c/devices/i2c-17/17-0050"]
def __init__(self):
PsuBase.__init__(self)
# Get sysfs attribute
def get_attr_value(self, attr_path):
retval = 'ERR'
if (not os.path.isfile(attr_path)):
return retval
try:
with open(attr_path, 'r') as fd:
retval = fd.read()
except Exception as error:
logging.error("Unable to open ", attr_path, " file !")
retval = retval.rstrip('\r\n')
return retval
def get_num_psus(self):
"""
Retrieves the number of PSUs available on the device
:return: An integer, the number of PSUs available on the device
"""
MAX_PSUS = 2
return MAX_PSUS
def get_psu_status(self, index):
"""
Retrieves the oprational status of power supply unit (PSU) defined
by index <index>
:param index: An integer, index of the PSU of which to query status
:return: Boolean, True if PSU is operating properly, False if PSU is\
faulty
"""
status = 0
attr_file = 'psu_pg'
attr_path = self.SYSFS_PSU_DIR[index-1] +'/' + attr_file
attr_value = self.get_attr_value(attr_path)
if (attr_value != 'ERR'):
attr_value = int(attr_value, 16)
# Check for PSU status
if (attr_value == 1):
status = 1
return status
def get_psu_presence(self, index):
"""
Retrieves the presence status of power supply unit (PSU) defined
by index <index>
:param index: An integer, index of the PSU of which to query status
:return: Boolean, True if PSU is plugged, False if not
"""
status = 0
psu_absent = 0
attr_file ='psu_abs'
attr_path = self.SYSFS_PSU_DIR[index-1] +'/' + attr_file
attr_value = self.get_attr_value(attr_path)
if (attr_value != 'ERR'):
attr_value = int(attr_value, 16)
# Check for PSU presence
if (attr_value == 0):
status = 1
return status

View File

@ -0,0 +1,300 @@
# 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 = 63
PORTS_IN_BLOCK = 64
EEPROM_OFFSET = 41
CPLD1_PORTS = 12
CPLDx_PORTS = 13
#TODO: check init sequence for CPLD i2c bus
CPLD_OFFSET = 1
CPLD_PRES_BIT = 1
CPLD_RESET_BIT = 0
CPLD_LPMOD_BIT = 2
CPLDx_I2C_ADDR = "33"
EEPROM_I2C_ADDR = "50"
CPLD_PORT_STATUS_KEY = "cpld_qsfp_port_status"
CPLD_PORT_CONFIG_KEY = "cpld_qsfp_port_config"
CPLD_REG_PATH = "/sys/bus/i2c/devices/{0}-00{1}/{2}_{3}"
_port_to_eeprom_mapping = {}
#TODO: check the fp port to phy port mapping
_fp2phy_port_mapping = {
0: 0,
1: 1,
2: 4,
3: 5,
4: 8,
5: 9,
6: 12,
7: 13,
8: 16,
9: 17,
10: 20,
11: 21,
12: 24,
13: 25,
14: 28,
15: 29,
16: 32,
17: 33,
18: 36,
19: 37,
20: 40,
21: 41,
22: 44,
23: 45,
24: 48,
25: 49,
26: 52,
27: 53,
28: 56,
29: 57,
30: 60,
31: 61,
32: 2,
33: 3,
34: 6,
35: 7,
36: 10,
37: 11,
38: 14,
39: 15,
40: 18,
41: 19,
42: 22,
43: 23,
44: 26,
45: 27,
46: 30,
47: 31,
48: 34,
49: 35,
50: 38,
51: 39,
52: 42,
53: 43,
54: 46,
55: 47,
56: 50,
57: 51,
58: 54,
59: 55,
60: 58,
61: 59,
62: 62,
63: 63
}
@property
def port_start(self):
return self.PORT_START
@property
def port_end(self):
return self.PORT_END
@property
def qsfp_ports(self):
return range(0, self.PORTS_IN_BLOCK + 1)
@property
def port_to_eeprom_mapping(self):
return self._port_to_eeprom_mapping
def __init__(self):
# Override port_to_eeprom_mapping for class initialization
eeprom_path = "/sys/class/i2c-adapter/i2c-{0}/{0}-00{1}/eeprom"
for x in range(self.port_start, self.port_end + 1):
phy_port = self.fp2phy_port_num(x)
port_eeprom_path = eeprom_path.format(phy_port + self.EEPROM_OFFSET, self.EEPROM_I2C_ADDR)
self.port_to_eeprom_mapping[x] = port_eeprom_path
SfpUtilBase.__init__(self)
def qsfp_to_cpld_index(self, port_num):
if port_num < self.CPLD1_PORTS:
cpld_id = 0
cpld_port_index = port_num + 1
else:
cpld_id = 1 + (port_num - self.CPLD1_PORTS) / self.CPLDx_PORTS
cpld_port_index = ((port_num - self.CPLD1_PORTS) % self.CPLDx_PORTS) + 1
return cpld_id, cpld_port_index
def fp2phy_port_num(self, fp_port_num):
phy_port_num = self._fp2phy_port_mapping[fp_port_num]
return phy_port_num
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
# logic port to physical port mapping
port_num = self.fp2phy_port_num(port_num)
cpld_id, cpld_port_index = self.qsfp_to_cpld_index(port_num)
i2c_id = self.CPLD_OFFSET + cpld_id
reg_path = self.CPLD_REG_PATH.format(i2c_id, self.CPLDx_I2C_ADDR, \
self.CPLD_PORT_STATUS_KEY, cpld_port_index)
try:
reg_file = open(reg_path)
except IOError as e:
print "Error: unable to open file: %s" % str(e)
return False
# content is a string containing the status register value
content = reg_file.readline().rstrip()
reg_file.close()
reg_value = int(content, 16)
# mask for presence bit (bit 1)
mask = (1 << self.CPLD_PRES_BIT)
# 0 - presence, 1 - absence
if reg_value & mask == 0:
return True
return False
def get_low_power_mode(self, port_num):
# Check for invalid port_num
if port_num < self.port_start or port_num > self.port_end:
return False
# logic port to physical port mapping
port_num = self.fp2phy_port_num(port_num)
cpld_id, cpld_port_index = self.qsfp_to_cpld_index(port_num)
i2c_id = self.CPLD_OFFSET + cpld_id
reg_path = self.CPLD_REG_PATH.format(i2c_id, self.CPLDx_I2C_ADDR, \
self.CPLD_PORT_CONFIG_KEY, cpld_port_index)
try:
reg_file = open(reg_path)
except IOError as e:
print "Error: unable to open file: %s" % str(e)
return False
# content is a string containing the status register value
content = reg_file.readline().rstrip()
reg_file.close()
reg_value = int(content, 16)
# mask for lp_mod bit (bit 2)
mask = (1 << self.CPLD_LPMOD_BIT)
# 0 - disable, 1 - low power mode
if reg_value & mask == 0:
return False
return True
def set_low_power_mode(self, port_num, lpmode):
# Check for invalid port_num
if port_num < self.port_start or port_num > self.port_end:
return False
# logic port to physical port mapping
port_num = self.fp2phy_port_num(port_num)
cpld_id, cpld_port_index = self.qsfp_to_cpld_index(port_num)
i2c_id = self.CPLD_OFFSET + cpld_id
reg_path = self.CPLD_REG_PATH.format(i2c_id, self.CPLDx_I2C_ADDR, \
self.CPLD_PORT_CONFIG_KEY, cpld_port_index)
try:
reg_file = open(reg_path, "r+")
except IOError as e:
print "Error: unable to open file: %s" % str(e)
return False
# content is a string containing the status register value
content = reg_file.readline().rstrip()
reg_value = int(content, 16)
# mask for lp_mod bit (bit 2)
mask = (1 << self.CPLD_LPMOD_BIT)
# 1 - low power mode, 0 - high power mode
if lpmode is True:
reg_value = reg_value | mask
else:
reg_value = reg_value & ~mask
# convert value to hex string
content = hex(reg_value)
reg_file.seek(0)
reg_file.write(content)
reg_file.close()
return True
def reset(self, port_num):
# Check for invalid port_num
if port_num < self.port_start or port_num > self.port_end:
return False
# logic port to physical port mapping
port_num = self.fp2phy_port_num(port_num)
cpld_id, cpld_port_index = self.qsfp_to_cpld_index(port_num)
i2c_id = self.CPLD_OFFSET + cpld_id
reg_path = self.CPLD_REG_PATH.format(i2c_id, self.CPLDx_I2C_ADDR, \
self.CPLD_PORT_CONFIG_KEY, cpld_port_index)
# reset the port
try:
reg_file = open(reg_path, "r+")
except IOError as e:
print "Error: unable to open file: %s" % str(e)
return False
# content is a string containing the status register value
content = reg_file.readline().rstrip()
reg_value = int(content, 16)
# mask for reset bit (bit 0)
mask = (1 << self.CPLD_RESET_BIT)
# 1 - out of reset, 0 - reset
reg_value = reg_value & ~mask
reg_file.seek(0)
reg_file.write(hex(reg_value))
reg_file.close()
# Sleep 1 second to reset done
time.sleep(1)
# take the port out of reset
try:
reg_file = open(reg_path, "w")
except IOError as e:
print "Error: unable to open file: %s" % str(e)
return False
reg_value = reg_value | mask
reg_file.seek(0)
reg_file.write(hex(reg_value))
reg_file.close()
return True

View File

@ -0,0 +1,85 @@
# libsensors configuration file
chip "i350bb-*"
ignore loc1
chip "jc42-*"
bus "i2c-16" "i2c-mux-1 (chan_id 7)"
chip "w83795adg-*"
ignore in0
label in1 "VDD_CORE"
set in1_min 0.86 * 0.95
set in1_max 0.86 * 1.05
ignore in2
ignore in3
label in4 "3.3V"
compute in4 @/(0.3052), (0.3052)*@
set in4_min 3.3 * 0.95
set in4_max 3.3 * 1.05
label in5 "0.9V"
set in5_min 0.90 * 0.98
set in5_max 0.90 * 1.02
ignore in6
ignore in7
ignore in8
ignore in9
ignore in10
ignore in11
ignore in12
ignore in13
ignore in14
ignore in15
ignore in16
ignore in17
ignore in18
ignore in19
label fan1 "FANTRAY 1"
ignore fan2
label fan3 "FANTRAY 2"
ignore fan4
label fan5 "FANTRAY 3"
ignore fan6
label fan7 "FANTRAY 4"
ignore fan8
ignore temp1
ignore temp2
ignore temp3
ignore temp4
ignore temp5
ignore temp6
ignore intrusion0
chip "tmp75-i2c-*-4A"
label temp1 "BMC Board Temp"
set temp1_max 50
set temp1_max_hyst 45
bus "i2c-0" "SMBus I801 adapter at f000"
chip "tmp75-i2c-*-4F"
label temp1 "x86 CPU Board Temp"
set temp1_max 50
set temp1_max_hyst 45
bus "i2c-6" "i2c-0-mux (chan_id 5)"
chip "lm75-i2c-6-4D"
label temp1 "Rear Panel Temp"
set temp1_max 50
set temp1_max_hyst 45
chip "lm75-i2c-6-4E"
label temp1 "Rear MAC Temp"
set temp1_max 50
set temp1_max_hyst 45
chip "lm86-i2c-6-4C"
label temp1 "MB Temp"
set temp1_max 50
label temp2 "MAC Temp"
set temp2_max 70
bus "i2c-7" "i2c-0-mux (chan_id 6)"
chip "lm75-i2c-7-4D"
label temp1 "Front Panel Temp"
set temp1_max 50
set temp1_max_hyst 45
chip "lm75-i2c-7-4E"
label temp1 "Front MAC Temp"
set temp1_max 50
set temp1_max_hyst 45

View File

@ -7,5 +7,6 @@ $(SONIC_ONE_IMAGE)_INSTALLS += $(BFN_PLATFORM_MODULE)
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(BFN_MONTARA_PLATFORM_MODULE) $(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(BFN_MONTARA_PLATFORM_MODULE)
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(WNC_OSW1800_PLATFORM_MODULE) $(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(WNC_OSW1800_PLATFORM_MODULE)
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(INGRASYS_S9180_32X_PLATFORM_MODULE) $(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(INGRASYS_S9180_32X_PLATFORM_MODULE)
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(INGRASYS_S9280_64X_PLATFORM_MODULE)
$(SONIC_ONE_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_IMAGES) $(SONIC_ONE_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_IMAGES)
SONIC_INSTALLERS += $(SONIC_ONE_IMAGE) SONIC_INSTALLERS += $(SONIC_ONE_IMAGE)

View File

@ -1,11 +1,18 @@
# Ingrasys S9180-32X Platform modules # Ingrasys S9180-32X Platform modules
INGRASYS_S9180_32X_PLATFORM_MODULE_VERSION = 1.1.0 INGRASYS_S9180_32X_PLATFORM_MODULE_VERSION = 1.1.0
INGRASYS_S9280_64X_PLATFORM_MODULE_VERSION = 1.1.0
export INGRASYS_S9180_32X_PLATFORM_MODULE_VERSION export INGRASYS_S9180_32X_PLATFORM_MODULE_VERSION
export INGRASYS_S9280_64X_PLATFORM_MODULE_VERSION
INGRASYS_S9180_32X_PLATFORM_MODULE = sonic-platform-ingrasys-s9180-32x_$(INGRASYS_S9180_32X_PLATFORM_MODULE_VERSION)_amd64.deb INGRASYS_S9180_32X_PLATFORM_MODULE = sonic-platform-ingrasys-s9180-32x_$(INGRASYS_S9180_32X_PLATFORM_MODULE_VERSION)_amd64.deb
$(INGRASYS_S9180_32X_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-ingrasys $(INGRASYS_S9180_32X_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-ingrasys
$(INGRASYS_S9180_32X_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) $(INGRASYS_S9180_32X_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
$(INGRASYS_S9180_32X_PLATFORM_MODULE)_PLATFORM = x86_64-ingrasys_s9180_32x-r0 $(INGRASYS_S9180_32X_PLATFORM_MODULE)_PLATFORM = x86_64-ingrasys_s9180_32x-r0
SONIC_DPKG_DEBS += $(INGRASYS_S9180_32X_PLATFORM_MODULE) SONIC_DPKG_DEBS += $(INGRASYS_S9180_32X_PLATFORM_MODULE)
INGRASYS_S9280_64X_PLATFORM_MODULE = sonic-platform-ingrasys-s9280-64x_$(INGRASYS_S9280_64X_PLATFORM_MODULE_VERSION)_amd64.deb
$(INGRASYS_S9280_64X_PLATFORM_MODULE)_PLATFORM = x86_64-ingrasys_s9280_64x-r0
$(eval $(call add_extra_package,$(INGRASYS_S9180_32X_PLATFORM_MODULE),$(INGRASYS_S9280_64X_PLATFORM_MODULE)))

@ -1 +1 @@
Subproject commit c165fddbb8da8bb11efc3c6952cb98949f2cdc87 Subproject commit ac571d30dd599fa525866e1f65877856786e5c18