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

Add switch ASIC vendor and platform for Nephos #1082

Merged
merged 3 commits into from
Oct 28, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,6 @@
[submodule "platform/broadcom/sonic-platform-modules-cel"]
path = platform/broadcom/sonic-platform-modules-cel
url = https://github.com/celestica-Inc/sonic-platform-modules-cel.git
[submodule "platform/nephos/sonic-platform-modules-ingrasys"]
path = platform/nephos/sonic-platform-modules-ingrasys
url = https://github.com/Ingrasys-sonic/sonic-platform-modules-ingrasys-nephos.git
3 changes: 3 additions & 0 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ sudo chroot $FILESYSTEM_ROOT update-initramfs -u
## Install latest intel igb driver
sudo cp target/debs/igb.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-4-amd64/kernel/drivers/net/ethernet/intel/igb/igb.ko

## Install latest intel ixgbe driver
sudo cp target/debs/ixgbe.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-4-amd64/kernel/drivers/net/ethernet/intel/ixgbe/ixgbe.ko

## Install docker
echo '[INFO] Install docker'
## Install apparmor utils since they're missing and apparmor is enabled in the kernel
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# name lanes alias port
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change final column title from port to index.

Refer to https://github.com/Azure/SONiC/wiki/Porting-Guide.

Ethernet0 0,1,2,3 Ethernet1/1 1
Ethernet4 4,5,6,7 Ethernet2/1 2
Ethernet8 8,9,10,11 Ethernet3/1 3
Ethernet12 12,13,14,15 Ethernet4/1 4
Ethernet16 16,17,18,19 Ethernet5/1 5
Ethernet20 20,21,22,23 Ethernet6/1 6
Ethernet24 24,25,26,27 Ethernet7/1 7
Ethernet28 28,29,30,31 Ethernet8/1 8
Ethernet32 32,33,34,35 Ethernet9/1 9
Ethernet36 36,37,38,39 Ethernet10/1 10
Ethernet40 40,41,42,43 Ethernet11/1 11
Ethernet44 44,45,46,47 Ethernet12/1 12
Ethernet48 48,49,50,51 Ethernet13/1 13
Ethernet52 52,53,54,55 Ethernet14/1 14
Ethernet56 56,57,58,59 Ethernet15/1 15
Ethernet60 60,61,62,63 Ethernet16/1 16
Ethernet64 64,65,66,67 Ethernet17/1 17
Ethernet68 68,69,70,71 Ethernet18/1 18
Ethernet72 72,73,74,75 Ethernet19/1 19
Ethernet76 76,77,78,79 Ethernet20/1 20
Ethernet80 80,81,82,83 Ethernet21/1 21
Ethernet84 84,85,86,87 Ethernet22/1 22
Ethernet88 88,89,90,91 Ethernet23/1 23
Ethernet92 92,93,94,95 Ethernet24/1 24
Ethernet96 96,97,98,99 Ethernet25/1 25
Ethernet100 100,101,102,103 Ethernet26/1 26
Ethernet104 104,105,106,107 Ethernet27/1 27
Ethernet108 108,109,110,111 Ethernet28/1 28
Ethernet112 112,113,114,115 Ethernet29/1 29
Ethernet116 116,117,118,119 Ethernet30/1 30
Ethernet120 120,121,122,123 Ethernet31/1 31
Ethernet124 124,125,126,127 Ethernet32/1 32
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SAI_INIT_CONFIG_FILE=/etc/nps/tau-s9130-32x100G.cfg
SAI_DSH_CONFIG_FILE=/etc/nps/tau-s9130-32x100G.dsh
12 changes: 12 additions & 0 deletions device/ingrasys/x86_64-ingrasys_s9130_32x-r0/fancontrol
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Configuration file generated by pwmconfig, changes will be lost
INTERVAL=10
DEVPATH=hwmon5=devices/pci0000:00/0000:00:1f.3/i2c-0/i2c-8/8-002f
DEVNAME=hwmon5=w83795adg
FCTEMPS=hwmon5/device/pwm2=hwmon1/temp1_input hwmon5/device/pwm1=hwmon1/temp1_input
FCFANS=hwmon5/device/pwm2=hwmon5/device/fan8_input hwmon5/device/pwm2=hwmon5/device/fan7_input hwmon5/device/pwm2=hwmon5/device/fan6_input hwmon5/device/pwm2=hwmon5/device/fan5_input hwmon5/device/pwm1=hwmon5/device/fan4_input hwmon5/device/pwm1=hwmon5/device/fan3_input hwmon5/device/pwm1=hwmon5/device/fan2_input hwmon5/device/pwm1=hwmon5/device/fan1_input
# TODO: check the temp value with HW after board ready
MINTEMP=hwmon5/device/pwm2=20 hwmon5/device/pwm1=20
MAXTEMP=hwmon5/device/pwm2=60 hwmon5/device/pwm1=60
MINSTART=hwmon5/device/pwm2=75 hwmon5/device/pwm1=75
MINSTOP=hwmon5/device/pwm2=22 hwmon5/device/pwm1=22

3 changes: 3 additions & 0 deletions device/ingrasys/x86_64-ingrasys_s9130_32x-r0/installer.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CONSOLE_PORT=0x3f8
CONSOLE_DEV=0
CONSOLE_SPEED=115200
151 changes: 151 additions & 0 deletions device/ingrasys/x86_64-ingrasys_s9130_32x-r0/minigraph.xml
Original file line number Diff line number Diff line change
@@ -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-S9130-32X</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-S9130-32X</HwSku>
</DeviceMiniGraph>
22 changes: 22 additions & 0 deletions device/ingrasys/x86_64-ingrasys_s9130_32x-r0/plugins/eeprom.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env python

#############################################################################
# Ingrasys S9130-32X
#
# 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-0055/eeprom"
super(board, self).__init__(self.eeprom_path, 0, '', True)
Loading