Skip to content

Commit b945010

Browse files
kaiyu22jleveque
authored andcommitted
Add switch ASIC vendor and platform for Nephos (#1082)
- Add switch ASIC vendor: Nephos - Add Nephos platform: Ingrasys S9130-32X Signed-off-by: Sam Yang <[email protected]>
1 parent 24c8494 commit b945010

35 files changed

Lines changed: 787 additions & 1 deletion

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,6 @@
6969
[submodule "platform/broadcom/sonic-platform-modules-cel"]
7070
path = platform/broadcom/sonic-platform-modules-cel
7171
url = https://github.com/celestica-Inc/sonic-platform-modules-cel.git
72+
[submodule "platform/nephos/sonic-platform-modules-ingrasys"]
73+
path = platform/nephos/sonic-platform-modules-ingrasys
74+
url = https://github.com/Ingrasys-sonic/sonic-platform-modules-ingrasys-nephos.git

build_debian.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ sudo chroot $FILESYSTEM_ROOT update-initramfs -u
141141
## Install latest intel igb driver
142142
sudo cp target/debs/igb.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-4-amd64/kernel/drivers/net/ethernet/intel/igb/igb.ko
143143

144+
## Install latest intel ixgbe driver
145+
sudo cp target/debs/ixgbe.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-4-amd64/kernel/drivers/net/ethernet/intel/ixgbe/ixgbe.ko
146+
144147
## Install docker
145148
echo '[INFO] Install docker'
146149
## Install apparmor utils since they're missing and apparmor is enabled in the kernel
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# name lanes alias index
2+
Ethernet0 0,1,2,3 Ethernet1/1 1
3+
Ethernet4 4,5,6,7 Ethernet2/1 2
4+
Ethernet8 8,9,10,11 Ethernet3/1 3
5+
Ethernet12 12,13,14,15 Ethernet4/1 4
6+
Ethernet16 16,17,18,19 Ethernet5/1 5
7+
Ethernet20 20,21,22,23 Ethernet6/1 6
8+
Ethernet24 24,25,26,27 Ethernet7/1 7
9+
Ethernet28 28,29,30,31 Ethernet8/1 8
10+
Ethernet32 32,33,34,35 Ethernet9/1 9
11+
Ethernet36 36,37,38,39 Ethernet10/1 10
12+
Ethernet40 40,41,42,43 Ethernet11/1 11
13+
Ethernet44 44,45,46,47 Ethernet12/1 12
14+
Ethernet48 48,49,50,51 Ethernet13/1 13
15+
Ethernet52 52,53,54,55 Ethernet14/1 14
16+
Ethernet56 56,57,58,59 Ethernet15/1 15
17+
Ethernet60 60,61,62,63 Ethernet16/1 16
18+
Ethernet64 64,65,66,67 Ethernet17/1 17
19+
Ethernet68 68,69,70,71 Ethernet18/1 18
20+
Ethernet72 72,73,74,75 Ethernet19/1 19
21+
Ethernet76 76,77,78,79 Ethernet20/1 20
22+
Ethernet80 80,81,82,83 Ethernet21/1 21
23+
Ethernet84 84,85,86,87 Ethernet22/1 22
24+
Ethernet88 88,89,90,91 Ethernet23/1 23
25+
Ethernet92 92,93,94,95 Ethernet24/1 24
26+
Ethernet96 96,97,98,99 Ethernet25/1 25
27+
Ethernet100 100,101,102,103 Ethernet26/1 26
28+
Ethernet104 104,105,106,107 Ethernet27/1 27
29+
Ethernet108 108,109,110,111 Ethernet28/1 28
30+
Ethernet112 112,113,114,115 Ethernet29/1 29
31+
Ethernet116 116,117,118,119 Ethernet30/1 30
32+
Ethernet120 120,121,122,123 Ethernet31/1 31
33+
Ethernet124 124,125,126,127 Ethernet32/1 32
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
SAI_INIT_CONFIG_FILE=/etc/nps/tau-s9130-32x100G.cfg
2+
SAI_DSH_CONFIG_FILE=/etc/nps/tau-s9130-32x100G.dsh
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Configuration file generated by pwmconfig, changes will be lost
2+
INTERVAL=10
3+
DEVPATH=hwmon5=devices/pci0000:00/0000:00:1f.3/i2c-0/i2c-8/8-002f
4+
DEVNAME=hwmon5=w83795adg
5+
FCTEMPS=hwmon5/device/pwm2=hwmon1/temp1_input hwmon5/device/pwm1=hwmon1/temp1_input
6+
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
7+
# TODO: check the temp value with HW after board ready
8+
MINTEMP=hwmon5/device/pwm2=20 hwmon5/device/pwm1=20
9+
MAXTEMP=hwmon5/device/pwm2=60 hwmon5/device/pwm1=60
10+
MINSTART=hwmon5/device/pwm2=75 hwmon5/device/pwm1=75
11+
MINSTOP=hwmon5/device/pwm2=22 hwmon5/device/pwm1=22
12+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CONSOLE_PORT=0x3f8
2+
CONSOLE_DEV=0
3+
CONSOLE_SPEED=115200
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
<DeviceMiniGraph xmlns="Microsoft.Search.Autopilot.Evolution" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
2+
<CpgDec>
3+
<IsisRouters xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
4+
<PeeringSessions>
5+
<BGPSession>
6+
<StartRouter>OCPSCH0104001MS</StartRouter>
7+
<StartPeer>10.10.1.26</StartPeer>
8+
<EndRouter>OCPSCH01040GGLF</EndRouter>
9+
<EndPeer>10.10.1.25</EndPeer>
10+
<Multihop>1</Multihop>
11+
<HoldTime>10</HoldTime>
12+
<KeepAliveTime>3</KeepAliveTime>
13+
</BGPSession>
14+
<BGPSession>
15+
<StartRouter>OCPSCH0104002MS</StartRouter>
16+
<StartPeer>10.10.2.26</StartPeer>
17+
<EndRouter>OCPSCH01040GGLF</EndRouter>
18+
<EndPeer>10.10.2.25</EndPeer>
19+
<Multihop>1</Multihop>
20+
<HoldTime>10</HoldTime>
21+
<KeepAliveTime>3</KeepAliveTime>
22+
</BGPSession>
23+
</PeeringSessions>
24+
<Routers xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
25+
<a:BGPRouterDeclaration>
26+
<a:ASN>64536</a:ASN>
27+
<a:Hostname>OCPSCH01040GGLF</a:Hostname>
28+
<a:Peers>
29+
<BGPPeer>
30+
<Address>10.10.1.26</Address>
31+
<RouteMapIn i:nil="true"/>
32+
<RouteMapOut i:nil="true"/>
33+
</BGPPeer>
34+
<BGPPeer>
35+
<Address>10.10.2.26</Address>
36+
<RouteMapIn i:nil="true"/>
37+
<RouteMapOut i:nil="true"/>
38+
</BGPPeer>
39+
</a:Peers>
40+
<a:RouteMaps/>
41+
</a:BGPRouterDeclaration>
42+
<a:BGPRouterDeclaration>
43+
<a:ASN>64542</a:ASN>
44+
<a:Hostname>OCPSCH0104001MS</a:Hostname>
45+
<a:RouteMaps/>
46+
</a:BGPRouterDeclaration>
47+
<a:BGPRouterDeclaration>
48+
<a:ASN>64543</a:ASN>
49+
<a:Hostname>OCPSCH0104002MS</a:Hostname>
50+
<a:RouteMaps/>
51+
</a:BGPRouterDeclaration>
52+
</Routers>
53+
</CpgDec>
54+
<DpgDec>
55+
<DeviceDataPlaneInfo>
56+
<IPSecTunnels/>
57+
<LoopbackIPInterfaces xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
58+
<a:LoopbackIPInterface>
59+
<Name>HostIP</Name>
60+
<AttachTo>Loopback0</AttachTo>
61+
<a:Prefix xmlns:b="Microsoft.Search.Autopilot.NetMux">
62+
<b:IPPrefix>100.0.0.9/32</b:IPPrefix>
63+
</a:Prefix>
64+
<a:PrefixStr>100.0.0.9/32</a:PrefixStr>
65+
</a:LoopbackIPInterface>
66+
</LoopbackIPInterfaces>
67+
<ManagementIPInterfaces xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
68+
</ManagementIPInterfaces>
69+
<MplsInterfaces/>
70+
<MplsTeInterfaces/>
71+
<RsvpInterfaces/>
72+
<Hostname>OCPSCH01040GGLF</Hostname>
73+
<PortChannelInterfaces/>
74+
<VlanInterfaces/>
75+
<IPInterfaces>
76+
<IPInterface>
77+
<Name i:nil="true"/>
78+
<AttachTo>Ethernet0</AttachTo>
79+
<Prefix>10.10.1.25/30</Prefix>
80+
</IPInterface>
81+
<IPInterface>
82+
<Name i:nil="true"/>
83+
<AttachTo>Ethernet4</AttachTo>
84+
<Prefix>10.10.2.25/30</Prefix>
85+
</IPInterface>
86+
</IPInterfaces>
87+
<DataAcls/>
88+
<AclInterfaces/>
89+
<DownstreamSummaries/>
90+
<DownstreamSummarySet xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
91+
</DeviceDataPlaneInfo>
92+
</DpgDec>
93+
<PngDec>
94+
<DeviceInterfaceLinks>
95+
<DeviceLinkBase i:type="DeviceInterfaceLink">
96+
<Bandwidth>40000</Bandwidth>
97+
<ElementType>DeviceInterfaceLink</ElementType>
98+
<EndDevice>OCPSCH0104001MS</EndDevice>
99+
<EndPort>Ethernet24</EndPort>
100+
<StartDevice>OCPSCH01040GGLF</StartDevice>
101+
<StartPort>Ethernet0</StartPort>
102+
</DeviceLinkBase>
103+
<DeviceLinkBase i:type="DeviceInterfaceLink">
104+
<Bandwidth>40000</Bandwidth>
105+
<ElementType>DeviceInterfaceLink</ElementType>
106+
<EndDevice>OCPSCH0104002MS</EndDevice>
107+
<EndPort>Ethernet24</EndPort>
108+
<StartDevice>OCPSCH01040GGLF</StartDevice>
109+
<StartPort>Ethernet4</StartPort>
110+
</DeviceLinkBase>
111+
</DeviceInterfaceLinks>
112+
<Devices>
113+
<Device i:type="LeafRouter">
114+
<Hostname>OCPSCH01040GGLF</Hostname>
115+
<HwSku>INGRASYS-S9130-32X</HwSku>
116+
</Device>
117+
</Devices>
118+
</PngDec>
119+
<MetadataDeclaration>
120+
<Devices xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
121+
<a:DeviceMetadata>
122+
<a:Name>OCPSCH01040GGLF</a:Name>
123+
<a:Properties>
124+
<a:DeviceProperty>
125+
<a:Name>DhcpResources</a:Name>
126+
<a:Reference i:nil="true"/>
127+
<a:Value></a:Value>
128+
</a:DeviceProperty>
129+
<a:DeviceProperty>
130+
<a:Name>NtpResources</a:Name>
131+
<a:Reference i:nil="true"/>
132+
<a:Value>0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org</a:Value>
133+
</a:DeviceProperty>
134+
<a:DeviceProperty>
135+
<a:Name>SyslogResources</a:Name>
136+
<a:Reference i:nil="true"/>
137+
<a:Value></a:Value>
138+
</a:DeviceProperty>
139+
<a:DeviceProperty>
140+
<a:Name>ErspanDestinationIpv4</a:Name>
141+
<a:Reference i:nil="true"/>
142+
<a:Value>2.2.2.2</a:Value>
143+
</a:DeviceProperty>
144+
</a:Properties>
145+
</a:DeviceMetadata>
146+
</Devices>
147+
<Properties xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
148+
</MetadataDeclaration>
149+
<Hostname>OCPSCH01040GGLF</Hostname>
150+
<HwSku>INGRASYS-S9130-32X</HwSku>
151+
</DeviceMiniGraph>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env python
2+
3+
#############################################################################
4+
# Ingrasys S9130-32X
5+
#
6+
# Platform and model specific eeprom subclass, inherits from the base class,
7+
# and provides the followings:
8+
# - the eeprom format definition
9+
# - specific encoder/decoder if there is special need
10+
#############################################################################
11+
12+
try:
13+
from sonic_eeprom import eeprom_tlvinfo
14+
except ImportError, e:
15+
raise ImportError (str(e) + "- required module not found")
16+
17+
18+
class board(eeprom_tlvinfo.TlvInfoDecoder):
19+
20+
def __init__(self, name, path, cpld_root, ro):
21+
self.eeprom_path = "/sys/class/i2c-adapter/i2c-0/0-0055/eeprom"
22+
super(board, self).__init__(self.eeprom_path, 0, '', True)

0 commit comments

Comments
 (0)