[arista]: Add platform support for DCS-7170-64C (#1718)

This commit is contained in:
byu343 2018-07-03 17:10:11 -07:00 committed by lguohan
parent f6fffda7bb
commit 73a2e64d9f
14 changed files with 282 additions and 0 deletions

3
.gitmodules vendored
View File

@ -77,3 +77,6 @@
[submodule "platform/broadcom/sonic-platform-modules-mitac"]
path = platform/broadcom/sonic-platform-modules-mitac
url = https://github.com/MiTAC-EBU/sonic-platform-modules-mitac.git
[submodule "platform/p4/sonic-platform-modules-arista"]
path = platform/p4/sonic-platform-modules-arista
url = https://github.com/aristanetworks/sonic

View File

@ -0,0 +1,67 @@
# name lanes alias port
Ethernet0 444,445,446,447 Ethernet1/1 1
Ethernet4 52,53,54,55 Ethernet2/1 2
Ethernet8 436,437,438,439 Ethernet3/1 3
Ethernet12 432,433,434,435 Ethernet4/1 4
Ethernet16 412,413,414,415 Ethernet5/1 5
Ethernet20 424,425,426,427 Ethernet6/1 6
Ethernet24 404,405,406,407 Ethernet7/1 7
Ethernet28 0,1,2,3 Ethernet8/1 8
Ethernet32 12,13,14,15 Ethernet9/1 9
Ethernet36 8,9,10,11 Ethernet10/1 10
Ethernet40 24,25,26,27 Ethernet11/1 11
Ethernet44 32,33,34,35 Ethernet12/1 12
Ethernet48 44,45,46,47 Ethernet13/1 13
Ethernet52 40,41,42,43 Ethernet14/1 14
Ethernet56 396,397,398,399 Ethernet15/1 15
Ethernet60 392,393,394,395 Ethernet16/1 16
Ethernet64 260,261,262,263 Ethernet17/1 17
Ethernet68 384,385,386,387 Ethernet18/1 18
Ethernet72 180,181,182,183 Ethernet19/1 19
Ethernet76 172,173,174,175 Ethernet20/1 20
Ethernet80 160,161,162,163 Ethernet21/1 21
Ethernet84 164,165,166,167 Ethernet22/1 22
Ethernet88 148,149,150,151 Ethernet23/1 23
Ethernet92 140,141,142,143 Ethernet24/1 24
Ethernet96 272,273,274,275 Ethernet25/1 25
Ethernet100 132,133,134,135 Ethernet26/1 26
Ethernet104 280,281,282,283 Ethernet27/1 27
Ethernet108 284,285,286,287 Ethernet28/1 28
Ethernet112 304,305,306,307 Ethernet29/1 29
Ethernet116 292,293,294,295 Ethernet30/1 30
Ethernet120 312,313,314,315 Ethernet31/1 31
Ethernet124 316,317,318,319 Ethernet32/1 32
Ethernet128 56,57,58,59 Ethernet33/1 33
Ethernet132 60,61,62,63 Ethernet34/1 34
Ethernet136 428,429,430,431 Ethernet35/1 35
Ethernet140 440,441,442,443 Ethernet36/1 36
Ethernet144 420,421,422,423 Ethernet37/1 37
Ethernet148 416,417,418,419 Ethernet38/1 38
Ethernet152 128,129,130,131 Ethernet39/1 39
Ethernet156 408,409,410,411 Ethernet40/1 40
Ethernet160 4,5,6,7 Ethernet41/1 41
Ethernet164 16,17,18,19 Ethernet42/1 42
Ethernet168 28,29,30,31 Ethernet43/1 43
Ethernet172 20,21,22,23 Ethernet44/1 44
Ethernet176 36,37,38,39 Ethernet45/1 45
Ethernet180 48,49,50,51 Ethernet46/1 46
Ethernet184 388,389,390,391 Ethernet47/1 47
Ethernet188 400,401,402,403 Ethernet48/1 48
Ethernet192 256,257,258,259 Ethernet49/1 49
Ethernet196 264,265,266,267 Ethernet50/1 50
Ethernet200 176,177,178,179 Ethernet51/1 51
Ethernet204 184,185,186,187 Ethernet52/1 52
Ethernet208 168,169,170,171 Ethernet53/1 53
Ethernet212 156,157,158,159 Ethernet54/1 54
Ethernet216 144,145,146,147 Ethernet55/1 55
Ethernet220 152,153,154,155 Ethernet56/1 56
Ethernet224 136,137,138,139 Ethernet57/1 57
Ethernet228 268,269,270,271 Ethernet58/1 58
Ethernet232 288,289,290,291 Ethernet59/1 59
Ethernet236 276,277,278,279 Ethernet60/1 60
Ethernet240 296,297,298,299 Ethernet61/1 61
Ethernet244 300,301,302,303 Ethernet62/1 62
Ethernet248 188,189,190,191 Ethernet63/1 63
Ethernet252 308,309,310,311 Ethernet64/1 64
Ethernet256 64 Ethernet65 65
Ethernet260 65 Ethernet66 66

View File

@ -0,0 +1,10 @@
INTERVAL=5
DEVPATH=hwmon1=devices/pci0000:00/0000:00:1c.0/0000:06:00.0/i2c-8/8-004c hwmon3=devices/pci0000:ff/0000:ff:0b.3/i2c-93/93-0060
DEVNAME=hwmon1=max6658 hwmon3=rook_cpld
FCTEMPS=hwmon3/pwm4=hwmon1/temp1_input hwmon3/pwm3=hwmon1/temp1_input hwmon3/pwm2=hwmon1/temp1_input hwmon3/pwm1=hwmon1/temp1_input
FCFANS=hwmon3/pwm4=hwmon3/fan4_input hwmon3/pwm3=hwmon3/fan3_input hwmon3/pwm2=hwmon3/fan2_input hwmon3/pwm1=hwmon3/fan1_input
MINTEMP=hwmon3/pwm4=50 hwmon3/pwm3=50 hwmon3/pwm2=50 hwmon3/pwm1=50
MINPWM=hwmon3/pwm4=128 hwmon3/pwm3=128 hwmon3/pwm2=128 hwmon3/pwm1=128
MAXTEMP=hwmon3/pwm4=60 hwmon3/pwm3=60 hwmon3/pwm2=60 hwmon3/pwm1=60
MINSTART=hwmon3/pwm4=128 hwmon3/pwm3=128 hwmon3/pwm2=128 hwmon3/pwm1=128
MINSTOP=hwmon3/pwm4=128 hwmon3/pwm3=128 hwmon3/pwm2=128 hwmon3/pwm1=128

View File

@ -0,0 +1,70 @@
<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>
</PeeringSessions>
<Routers xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
</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.1.0.1/32</b:IPPrefix>
</a:Prefix>
<a:PrefixStr>100.1.0.1/32</a:PrefixStr>
</a:LoopbackIPInterface>
</LoopbackIPInterfaces>
<ManagementIPInterfaces xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
<a:ManagementIPInterface>
<Name>ManagementIP1</Name>
<AttachTo>Management0</AttachTo>
<a:Prefix xmlns:b="Microsoft.Search.Autopilot.NetMux">
<b:IPPrefix>172.24.37.166/18</b:IPPrefix>
</a:Prefix>
<a:PrefixStr>172.24.37.166/18</a:PrefixStr>
</a:ManagementIPInterface>
</ManagementIPInterfaces>
<MplsInterfaces/>
<MplsTeInterfaces/>
<RsvpInterfaces/>
<Hostname>sonic</Hostname>
<PortChannelInterfaces/>
<VlanInterfaces/>
<IPInterfaces>
</IPInterfaces>
<DataAcls/>
<AclInterfaces/>
<DownstreamSummaries/>
<DownstreamSummarySet xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
</DeviceDataPlaneInfo>
</DpgDec>
<PngDec>
<DeviceInterfaceLinks>
</DeviceInterfaceLinks>
<Devices>
<Device i:type="LeafRouter">
<Hostname>sonic</Hostname>
<HwSku>Arista-7170-64C</HwSku>
</Device>
</Devices>
</PngDec>
<MetadataDeclaration>
<Devices xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
<Properties xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
</MetadataDeclaration>
<Hostname>sonic</Hostname>
<HwSku>Arista-7170-64C</HwSku>
</DeviceMiniGraph>

View File

@ -0,0 +1,8 @@
#!/usr/bin/env python
try:
import arista.utils.sonic_eeprom as arista_eeprom
except ImportError as e:
raise ImportError("%s - required module not found" % str(e))
board = arista_eeprom.getTlvInfoDecoder()

View File

@ -0,0 +1,8 @@
#!/usr/bin/env python
try:
import arista.utils.sonic_leds as arista_leds
except ImportError as e:
raise ImportError("%s - required module not found" % str(e))
LedControl = arista_leds.getLedControl()

View File

@ -0,0 +1,12 @@
# psuutil.py
#
# Platform-specific PSU interface for SONiC
#
try:
import arista.utils.sonic_psu as arista_psuutil
except ImportError as e:
raise ImportError("%s - required module not found" % str(e))
PsuUtil = arista_psuutil.getPsuUtil()

View File

@ -0,0 +1,8 @@
#!/usr/bin/env python
try:
import arista.utils.sonic_sfputil as arista_sfputil
except ImportError as e:
raise ImportError("%s - required module not found" % str(e))
SfpUtil = arista_sfputil.getSfpUtil()

View File

@ -0,0 +1,53 @@
# libsensors configuration file for DCS-7260CX3-64
# ------------------------------------------------
bus "i2c-6" "SCD 0000:06:00.0 SMBus master 0 bus 5"
bus "i2c-7" "SCD 0000:06:00.0 SMBus master 0 bus 6"
bus "i2c-8" "SCD 0000:06:00.0 SMBus master 0 bus 7"
bus "i2c-81" "SCD 0000:ff:0b.3 SMBus master 0 bus 0"
bus "i2c-93" "SCD 0000:ff:0b.3 SMBus master 3 bus 0"
bus "i2c-96" "SCD 0000:ff:0b.3 SMBus master 3 bus 3"
chip "max6658-i2c-8-4c"
label temp1 "Temp sensor near ASIC"
set temp1_max 100
set temp1_crit 110
ignore temp2
chip "dps1900-i2c-6-58"
label temp1 "PSU1 primary hotspot temp"
label temp2 "PSU1 inlet temp"
label temp3 "PSU1 exhaust temp"
# setting maximum and critical thresholds is not supported for this psu
# fault and warning limits defined internally by hardware
ignore fan2
ignore fan3
chip "dps1900-i2c-7-58"
label temp1 "PSU2 primary hotspot temp"
label temp2 "PSU2 inlet temp"
label temp3 "PSU2 exhaust temp"
# setting maximum and critical thresholds is not supported for this psu
# fault and warning limits defined internally by hardware
ignore fan2
ignore fan3
chip "max6658-i2c-81-4c"
label temp1 "Rear air temp1"
label temp2 "Rear air temp2"
set temp1_max 50
set temp1_crit 60
set temp2_max 50
set temp2_crit 60
chip "lm73-i2c-96-48"
label temp1 "Front air temp"
set temp1_max 65

View File

@ -169,6 +169,11 @@ platform_specific() {
aboot_machine=arista_7260cx3_64
flash_size=28000
fi
if [ "$sid" = "Alhambra" ] || [ "$sid" = "AlhambraSsd" ]; then
aboot_machine=arista_7170_64c
flash_size=28000
echo "hugepages=128" >> /tmp/append
fi
if [ "$platform" = "rook" ]; then
if [ -x /bin/readprefdl ]; then
readprefdl -f /tmp/.system-prefdl -d > /mnt/flash/.system-prefdl
@ -176,6 +181,7 @@ platform_specific() {
cp /etc/prefdl /mnt/flash/.system-prefdl
chmod a+r /mnt/flash/.system-prefdl
fi
echo "reassign_prefmem" >> /tmp/append
fi
if [ $flash_size -ge 28000 ]; then

12
platform/p4/one-aboot.mk Normal file
View File

@ -0,0 +1,12 @@
# sonic broadcom one image installer
SONIC_ONE_ABOOT_IMAGE = sonic-aboot-p4.swi
$(SONIC_ONE_ABOOT_IMAGE)_MACHINE = p4
$(SONIC_ONE_ABOOT_IMAGE)_IMAGE_TYPE = aboot
$(SONIC_ONE_ABOOT_IMAGE)_INSTALLS += $(ARISTA_PLATFORM_MODULE_DRIVERS) $(ARISTA_PLATFORM_MODULE_PYTHON2) $(ARISTA_PLATFORM_MODULE_PYTHON3) $(ARISTA_PLATFORM_MODULE)
# FIXME: this is a temporary workaround for testing the platform driver
$(SONIC_ONE_ABOOT_IMAGE)_DOCKERS += docker-platform-monitor.gz
# $(SONIC_ONE_ABOOT_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_IMAGES)
SONIC_INSTALLERS += $(SONIC_ONE_ABOOT_IMAGE)

View File

@ -0,0 +1,22 @@
# Arista Platform modules
ARISTA_PLATFORM_MODULE_VERSION = 1.0
export ARISTA_PLATFORM_MODULE_VERSION
ARISTA_PLATFORM_MODULE = sonic-platform-arista_$(ARISTA_PLATFORM_MODULE_VERSION)_amd64.deb
$(ARISTA_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-arista
$(ARISTA_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
SONIC_MAKE_DEBS += $(ARISTA_PLATFORM_MODULE)
ARISTA_PLATFORM_MODULE_PYTHON2 = python-sonic-platform-arista_$(ARISTA_PLATFORM_MODULE_VERSION)_all.deb
$(eval $(call add_extra_package,$(ARISTA_PLATFORM_MODULE),$(ARISTA_PLATFORM_MODULE_PYTHON2)))
ARISTA_PLATFORM_MODULE_PYTHON3 = python3-sonic-platform-arista_$(ARISTA_PLATFORM_MODULE_VERSION)_all.deb
$(eval $(call add_extra_package,$(ARISTA_PLATFORM_MODULE),$(ARISTA_PLATFORM_MODULE_PYTHON3)))
ARISTA_PLATFORM_MODULE_DRIVERS = drivers-sonic-platform-arista_$(ARISTA_PLATFORM_MODULE_VERSION)_amd64.deb
$(eval $(call add_extra_package,$(ARISTA_PLATFORM_MODULE),$(ARISTA_PLATFORM_MODULE_DRIVERS)))
export ARISTA_PLATFORM_MODULE ARISTA_PLATFORM_MODULE_PYTHON2 ARISTA_PLATFORM_MODULE_PYTHON3 ARISTA_PLATFORM_MODULE_DRIVERS

View File

@ -1,4 +1,6 @@
# include $(PLATFORM_PATH)/p4-softswitch.mk
include $(PLATFORM_PATH)/platform-modules-arista.mk
include $(PLATFORM_PATH)/one-aboot.mk
include $(PLATFORM_PATH)/tenjin.mk
include $(PLATFORM_PATH)/p4-hlir.mk
include $(PLATFORM_PATH)/p4c-bm.mk

@ -0,0 +1 @@
Subproject commit 02b22ae91135d4e4a9e11e06656dcff3056e2c7f