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

[Platform] Add Ingrasys S9130-32X and S9230-64X with Nephos Switch ASIC #1245

Merged
merged 2 commits into from
Dec 22, 2017
Merged
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,6 @@
[submodule "platform/p4/SAI-P4-BM"]
path = platform/p4/SAI-P4-BM
url = https://github.com/Mellanox/SAI-P4-BM.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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ The SONiC installer contains all docker images needed. SONiC uses one image for
- PLATFORM=mellanox
- PLATFORM=cavium
- PLATFORM=centec
- PLATFORM=nephos
- PLATFORM=p4
- PLATFORM=vs

Expand Down Expand Up @@ -96,9 +97,11 @@ This may take a while, but it is a one-time action, so please be patient.
- docker-orchagent-brcm.gz: docker image for SWitch State Service (SWSS) on Broadcom platform (gzip tar archive)
- docker-orchagent-cavm.gz: docker image for SWitch State Service (SWSS) on Cavium platform (gzip tar archive)
- docker-orchagent-mlnx.gz: docker image for SWitch State Service (SWSS) on Mellanox platform (gzip tar archive)
- docker-orchagent-nephos.gz: docker image for SWitch State Service (SWSS) on Nephos platform (gzip tar archive)
- docker-syncd-brcm.gz: docker image for the daemon to sync database and Broadcom switch ASIC (gzip tar archive)
- docker-syncd-cavm.gz: docker image for the daemon to sync database and Cavium switch ASIC (gzip tar archive)
- docker-syncd-mlnx.gz: docker image for the daemon to sync database and Mellanox switch ASIC (gzip tar archive)
- docker-syncd-nephos.gz: docker image for the daemon to sync database and Nephos switch ASIC (gzip tar archive)
- docker-sonic-p4.gz: docker image for all-in-one for p4 software switch (gzip tar archive)
- docker-sonic-vs.gz: docker image for all-in-one for software virtual switch (gzip tar archive)

Expand Down
3 changes: 3 additions & 0 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,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 index
Ethernet0 0,1,2,3 Ethernet1/1 0
Ethernet4 4,5,6,7 Ethernet2/1 1
Ethernet8 8,9,10,11 Ethernet3/1 2
Ethernet12 12,13,14,15 Ethernet4/1 3
Ethernet16 16,17,18,19 Ethernet5/1 4
Ethernet20 20,21,22,23 Ethernet6/1 5
Ethernet24 24,25,26,27 Ethernet7/1 6
Ethernet28 28,29,30,31 Ethernet8/1 7
Ethernet32 32,33,34,35 Ethernet9/1 8
Ethernet36 36,37,38,39 Ethernet10/1 9
Ethernet40 40,41,42,43 Ethernet11/1 10
Ethernet44 44,45,46,47 Ethernet12/1 11
Ethernet48 48,49,50,51 Ethernet13/1 12
Ethernet52 52,53,54,55 Ethernet14/1 13
Ethernet56 56,57,58,59 Ethernet15/1 14
Ethernet60 60,61,62,63 Ethernet16/1 15
Ethernet64 64,65,66,67 Ethernet17/1 16
Ethernet68 68,69,70,71 Ethernet18/1 17
Ethernet72 72,73,74,75 Ethernet19/1 18
Ethernet76 76,77,78,79 Ethernet20/1 19
Ethernet80 80,81,82,83 Ethernet21/1 20
Ethernet84 84,85,86,87 Ethernet22/1 21
Ethernet88 88,89,90,91 Ethernet23/1 22
Ethernet92 92,93,94,95 Ethernet24/1 23
Ethernet96 96,97,98,99 Ethernet25/1 24
Ethernet100 100,101,102,103 Ethernet26/1 25
Ethernet104 104,105,106,107 Ethernet27/1 26
Ethernet108 108,109,110,111 Ethernet28/1 27
Ethernet112 112,113,114,115 Ethernet29/1 28
Ethernet116 116,117,118,119 Ethernet30/1 29
Ethernet120 120,121,122,123 Ethernet31/1 30
Ethernet124 124,125,126,127 Ethernet32/1 31
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/platform/led_proc_init.nps
SAI_DSH_CONFIG_FILE=/usr/share/sonic/hwsku/port_config.nps
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
20 changes: 20 additions & 0 deletions device/ingrasys/x86_64-ingrasys_s9130_32x-r0/led_proc_init.nps
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#This configuration file is for customer init value feature. Please refer to mtk_cfg.h/mtk_cfg.c for detail.
#1. The lines beginning with # are comment lines. The lines beginning with number are the setting lines.
#2. There are five parameters which can be set.
# 1) the first is unit.
# 2) the second is NPS_CFG_TYPE_XXX. Refer to NPS_CFG_TYPE_T.
# 3) the 3-5 are {param0, param1, value} pairs. Refer to NPS_CFG_VALUE_T. Support HEX format.
# 4) the (unit, NPS_CFG_TYPE_XXX, param0, param1) group is the key to get the correspingding value.
# There should be no same (unit, NPS_CFG_TYPE_XXX, param0, param1) group.
#3. User must follow correct format to apply the setting. Please refer to below commentted example(#0 NPS_CFG_TYPE_L2_ADDR_MODE 0 0 1);
#4. Usage under the linux shell:
# 1) ./image-path/image-name -c cfg-path/NPS_Ari_EVB_24.cfg : mamually specify directory path if they are not in current work dirctory.
# 2) ./image-name -c NPS_Ari_EVB_24.cfg : the image and the NPS_Ari_EVB_24.cfg are in the current work directory.

#unit NPS_CFG_TYPE_XXX param0 param1 value
#---- ---------------- ------ ------ -----
0 NPS_CFG_TYPE_USE_UNIT_PORT 0 0 1
0 NPS_CFG_TYPE_LED_CFG 0 0 1
0 NPS_CFG_TYPE_CPI_PORT_MODE 129 0 0
0 NPS_CFG_TYPE_CPI_PORT_MODE 130 0 0
0 NPS_CFG_TYPE_USER_BUF_CTRL 0 0 1
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