diff --git a/device/quanta/x86_64-quanta_ix4_bwde-r0/Quanta-IX4-64X/port_config.ini b/device/quanta/x86_64-quanta_ix4_bwde-r0/Quanta-IX4-64X/port_config.ini new file mode 100755 index 00000000000..16f15fc3af8 --- /dev/null +++ b/device/quanta/x86_64-quanta_ix4_bwde-r0/Quanta-IX4-64X/port_config.ini @@ -0,0 +1,65 @@ +# name lanes alias +Ethernet0 33,34,35,36 hundredGigE1 +Ethernet4 37,38,39,40 hundredGigE2 +Ethernet8 49,50,51,52 hundredGigE3 +Ethernet12 53,54,55,56 hundredGigE4 +Ethernet16 65,66,67,68 hundredGigE5 +Ethernet20 69,70,71,72 hundredGigE6 +Ethernet24 81,82,83,84 hundredGigE7 +Ethernet28 85,86,87,88 hundredGigE8 +Ethernet32 21,22,23,24 hundredGigE9 +Ethernet36 17,18,19,20 hundredGigE10 +Ethernet40 5,6,7,8 hundredGigE11 +Ethernet44 1,2,3,4 hundredGigE12 +Ethernet48 97,98,99,100 hundredGigE13 +Ethernet52 101,102,103,104 hundredGigE14 +Ethernet56 113,114,115,116 hundredGigE15 +Ethernet60 117,118,119,120 hundredGigE16 +Ethernet64 129,130,131,132 hundredGigE17 +Ethernet68 133,134,135,136 hundredGigE18 +Ethernet72 145,146,147,148 hundredGigE19 +Ethernet76 149,150,151,152 hundredGigE20 +Ethernet80 241,242,243,244 hundredGigE21 +Ethernet84 245,246,247,248 hundredGigE22 +Ethernet88 225,226,227,228 hundredGigE23 +Ethernet92 229,230,231,232 hundredGigE24 +Ethernet96 165,166,167,168 hundredGigE25 +Ethernet100 161,162,163,164 hundredGigE26 +Ethernet104 181,182,183,184 hundredGigE27 +Ethernet108 177,178,179,180 hundredGigE28 +Ethernet112 197,198,199,200 hundredGigE29 +Ethernet116 193,194,195,196 hundredGigE30 +Ethernet120 213,214,215,216 hundredGigE31 +Ethernet124 209,210,211,212 hundredGigE32 +Ethernet128 45,46,47,48 hundredGigE33 +Ethernet132 41,42,43,44 hundredGigE34 +Ethernet136 61,62,63,64 hundredGigE35 +Ethernet140 57,58,59,60 hundredGigE36 +Ethernet144 77,78,79,80 hundredGigE37 +Ethernet148 73,74,75,76 hundredGigE38 +Ethernet152 93,94,95,96 hundredGigE39 +Ethernet156 89,90,91,92 hundredGigE40 +Ethernet160 25,26,27,28 hundredGigE41 +Ethernet164 29,30,31,32 hundredGigE42 +Ethernet168 9,10,11,12 hundredGigE43 +Ethernet172 13,14,15,16 hundredGigE44 +Ethernet176 109,110,111,112 hundredGigE45 +Ethernet180 105,106,107,108 hundredGigE46 +Ethernet184 125,126,127,128 hundredGigE47 +Ethernet188 121,122,123,124 hundredGigE48 +Ethernet192 141,142,143,144 hundredGigE49 +Ethernet196 137,138,139,140 hundredGigE50 +Ethernet200 157,158,159,160 hundredGigE51 +Ethernet204 153,154,155,156 hundredGigE52 +Ethernet208 253,254,255,256 hundredGigE53 +Ethernet212 249,250,251,252 hundredGigE54 +Ethernet216 237,238,239,240 hundredGigE55 +Ethernet220 233,234,235,236 hundredGigE56 +Ethernet224 169,170,171,172 hundredGigE57 +Ethernet228 173,174,175,176 hundredGigE58 +Ethernet232 185,186,187,188 hundredGigE59 +Ethernet236 189,190,191,192 hundredGigE60 +Ethernet240 201,202,203,204 hundredGigE61 +Ethernet244 205,206,207,208 hundredGigE62 +Ethernet248 217,218,219,220 hundredGigE63 +Ethernet252 221,222,223,224 hundredGigE64 diff --git a/device/quanta/x86_64-quanta_ix4_bwde-r0/Quanta-IX4-64X/sai.profile b/device/quanta/x86_64-quanta_ix4_bwde-r0/Quanta-IX4-64X/sai.profile new file mode 100755 index 00000000000..81b57580b70 --- /dev/null +++ b/device/quanta/x86_64-quanta_ix4_bwde-r0/Quanta-IX4-64X/sai.profile @@ -0,0 +1 @@ +SAI_INIT_CONFIG_FILE=/etc/bcm/th2-ix4-64x100G.config.bcm diff --git a/device/quanta/x86_64-quanta_ix4_bwde-r0/installer.conf b/device/quanta/x86_64-quanta_ix4_bwde-r0/installer.conf new file mode 100755 index 00000000000..925a32fc0c3 --- /dev/null +++ b/device/quanta/x86_64-quanta_ix4_bwde-r0/installer.conf @@ -0,0 +1,3 @@ +CONSOLE_PORT=0x3f8 +CONSOLE_DEV=0 +CONSOLE_SPEED=115200 diff --git a/device/quanta/x86_64-quanta_ix4_bwde-r0/led_proc_init.soc b/device/quanta/x86_64-quanta_ix4_bwde-r0/led_proc_init.soc new file mode 100755 index 00000000000..db825206989 --- /dev/null +++ b/device/quanta/x86_64-quanta_ix4_bwde-r0/led_proc_init.soc @@ -0,0 +1,76 @@ +led 0 stop +sleep 1 +led 1 stop +sleep 1 +led 2 stop +sleep 1 +led 3 stop +sleep 4 + +led 0 prog \ +02 00 28 60 E1 67 27 75 0B 67 16 06 E1 80 D2 40 \ +74 02 86 E0 3A C0 28 32 00 32 01 B7 97 75 42 16 \ +E0 CA 1E 74 38 77 42 67 33 75 38 57 12 A0 F8 15 \ +1A 00 57 28 32 08 97 57 32 0F 87 32 0F 87 32 0F \ +87 57 67 5F 67 54 67 49 57 12 A0 FE E1 15 1A 03 \ +75 6A 77 6E 12 A0 FE E1 15 1A 02 75 6A 77 6E 12 \ +A0 FE E1 15 1A 01 75 6A 77 6E 32 0E 87 57 32 0F \ +87 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +sleep 1 + +led 1 prog \ +02 00 28 60 E1 67 27 75 0B 67 16 06 E1 80 D2 40 \ +74 02 86 E0 3A C0 28 32 00 32 01 B7 97 75 42 16 \ +E0 CA 1E 74 38 77 42 67 33 75 38 57 12 A0 F8 15 \ +1A 00 57 28 32 08 97 57 32 0F 87 32 0F 87 32 0F \ +87 57 67 5F 67 54 67 49 57 12 A0 FE E1 15 1A 03 \ +75 6A 77 6E 12 A0 FE E1 15 1A 02 75 6A 77 6E 12 \ +A0 FE E1 15 1A 01 75 6A 77 6E 32 0E 87 57 32 0F \ +87 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +sleep 1 + +led 2 prog \ +02 00 28 60 E1 67 27 75 0B 67 16 06 E1 80 D2 40 \ +74 02 86 E0 3A C0 28 32 00 32 01 B7 97 75 42 16 \ +E0 CA 1E 74 38 77 42 67 33 75 38 57 12 A0 F8 15 \ +1A 00 57 28 32 08 97 57 32 0F 87 32 0F 87 32 0F \ +87 57 67 5F 67 54 67 49 57 12 A0 FE E1 15 1A 03 \ +75 6A 77 6E 12 A0 FE E1 15 1A 02 75 6A 77 6E 12 \ +A0 FE E1 15 1A 01 75 6A 77 6E 32 0E 87 57 32 0F \ +87 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +sleep 1 + +led 3 prog \ +02 00 28 60 E1 67 27 75 0B 67 16 06 E1 80 D2 40 \ +74 02 86 E0 3A C0 28 32 00 32 01 B7 97 75 42 16 \ +E0 CA 1E 74 38 77 42 67 33 75 38 57 12 A0 F8 15 \ +1A 00 57 28 32 08 97 57 32 0F 87 32 0F 87 32 0F \ +87 57 67 5F 67 54 67 49 57 12 A0 FE E1 15 1A 03 \ +75 6A 77 6E 12 A0 FE E1 15 1A 02 75 6A 77 6E 12 \ +A0 FE E1 15 1A 01 75 6A 77 6E 32 0E 87 57 32 0F \ +87 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +sleep 4 + +led 0 auto on +sleep 1 +led 1 auto on +sleep 1 +led 2 auto on +sleep 1 +led 3 auto on +sleep 1 +led 0 start +sleep 1 +led 1 start +sleep 1 +led 2 start +sleep 1 +led 3 start +sleep 1 + +port ce enable=1 +sleep 1 diff --git a/device/quanta/x86_64-quanta_ix4_bwde-r0/minigraph.xml b/device/quanta/x86_64-quanta_ix4_bwde-r0/minigraph.xml new file mode 100755 index 00000000000..fd543151914 --- /dev/null +++ b/device/quanta/x86_64-quanta_ix4_bwde-r0/minigraph.xml @@ -0,0 +1,1074 @@ + + + + + + ARISTA01T0 + 10.0.0.33 + sonic + 10.0.0.32 + 1 + 180 + 60 + + + sonic + 10.0.0.0 + ARISTA01T2 + 10.0.0.1 + 1 + 180 + 60 + + + ARISTA02T0 + 10.0.0.35 + sonic + 10.0.0.34 + 1 + 180 + 60 + + + sonic + 10.0.0.2 + ARISTA02T2 + 10.0.0.3 + 1 + 180 + 60 + + + ARISTA03T0 + 10.0.0.37 + sonic + 10.0.0.36 + 1 + 180 + 60 + + + sonic + 10.0.0.4 + ARISTA03T2 + 10.0.0.5 + 1 + 180 + 60 + + + ARISTA04T0 + 10.0.0.39 + sonic + 10.0.0.38 + 1 + 180 + 60 + + + sonic + 10.0.0.6 + ARISTA04T2 + 10.0.0.7 + 1 + 180 + 60 + + + ARISTA05T0 + 10.0.0.41 + sonic + 10.0.0.40 + 1 + 180 + 60 + + + sonic + 10.0.0.8 + ARISTA05T2 + 10.0.0.9 + 1 + 180 + 60 + + + ARISTA06T0 + 10.0.0.43 + sonic + 10.0.0.42 + 1 + 180 + 60 + + + sonic + 10.0.0.10 + ARISTA06T2 + 10.0.0.11 + 1 + 180 + 60 + + + ARISTA07T0 + 10.0.0.45 + sonic + 10.0.0.44 + 1 + 180 + 60 + + + sonic + 10.0.0.12 + ARISTA07T2 + 10.0.0.13 + 1 + 180 + 60 + + + ARISTA08T0 + 10.0.0.47 + sonic + 10.0.0.46 + 1 + 180 + 60 + + + sonic + 10.0.0.14 + ARISTA08T2 + 10.0.0.15 + 1 + 180 + 60 + + + ARISTA09T0 + 10.0.0.49 + sonic + 10.0.0.48 + 1 + 180 + 60 + + + sonic + 10.0.0.16 + ARISTA09T2 + 10.0.0.17 + 1 + 180 + 60 + + + ARISTA10T0 + 10.0.0.51 + sonic + 10.0.0.50 + 1 + 180 + 60 + + + sonic + 10.0.0.18 + ARISTA10T2 + 10.0.0.19 + 1 + 180 + 60 + + + ARISTA11T0 + 10.0.0.53 + sonic + 10.0.0.52 + 1 + 180 + 60 + + + sonic + 10.0.0.20 + ARISTA11T2 + 10.0.0.21 + 1 + 180 + 60 + + + ARISTA12T0 + 10.0.0.55 + sonic + 10.0.0.54 + 1 + 180 + 60 + + + sonic + 10.0.0.22 + ARISTA12T2 + 10.0.0.23 + 1 + 180 + 60 + + + ARISTA13T0 + 10.0.0.57 + sonic + 10.0.0.56 + 1 + 180 + 60 + + + sonic + 10.0.0.24 + ARISTA13T2 + 10.0.0.25 + 1 + 180 + 60 + + + ARISTA14T0 + 10.0.0.59 + sonic + 10.0.0.58 + 1 + 180 + 60 + + + sonic + 10.0.0.26 + ARISTA14T2 + 10.0.0.27 + 1 + 180 + 60 + + + ARISTA15T0 + 10.0.0.61 + sonic + 10.0.0.60 + 1 + 180 + 60 + + + sonic + 10.0.0.28 + ARISTA15T2 + 10.0.0.29 + 1 + 180 + 60 + + + ARISTA16T0 + 10.0.0.63 + sonic + 10.0.0.62 + 1 + 180 + 60 + + + sonic + 10.0.0.30 + ARISTA16T2 + 10.0.0.31 + 1 + 180 + 60 + + + + + 65100 + sonic + + +
10.0.0.33
+ + +
+ +
10.0.0.1
+ + +
+ +
10.0.0.35
+ + +
+ +
10.0.0.3
+ + +
+ +
10.0.0.37
+ + +
+ +
10.0.0.5
+ + +
+ +
10.0.0.39
+ + +
+ +
10.0.0.7
+ + +
+ +
10.0.0.41
+ + +
+ +
10.0.0.9
+ + +
+ +
10.0.0.43
+ + +
+ +
10.0.0.11
+ + +
+ +
10.0.0.45
+ + +
+ +
10.0.0.13
+ + +
+ +
10.0.0.47
+ + +
+ +
10.0.0.15
+ + +
+ +
10.0.0.49
+ + +
+ +
10.0.0.17
+ + +
+ +
10.0.0.51
+ + +
+ +
10.0.0.19
+ + +
+ +
10.0.0.53
+ + +
+ +
10.0.0.21
+ + +
+ +
10.0.0.55
+ + +
+ +
10.0.0.23
+ + +
+ +
10.0.0.57
+ + +
+ +
10.0.0.25
+ + +
+ +
10.0.0.59
+ + +
+ +
10.0.0.27
+ + +
+ +
10.0.0.61
+ + +
+ +
10.0.0.29
+ + +
+ +
10.0.0.63
+ + +
+ +
10.0.0.31
+ + +
+
+ +
+ + 64001 + ARISTA01T0 + + + + 65200 + ARISTA01T2 + + + + 64002 + ARISTA02T0 + + + + 65200 + ARISTA02T2 + + + + 64003 + ARISTA03T0 + + + + 65200 + ARISTA03T2 + + + + 64004 + ARISTA04T0 + + + + 65200 + ARISTA04T2 + + + + 64005 + ARISTA05T0 + + + + 65200 + ARISTA05T2 + + + + 64006 + ARISTA06T0 + + + + 65200 + ARISTA06T2 + + + + 64007 + ARISTA07T0 + + + + 65200 + ARISTA07T2 + + + + 64008 + ARISTA08T0 + + + + 65200 + ARISTA08T2 + + + + 64009 + ARISTA09T0 + + + + 65200 + ARISTA09T2 + + + + 64010 + ARISTA10T0 + + + + 65200 + ARISTA10T2 + + + + 64011 + ARISTA11T0 + + + + 65200 + ARISTA11T2 + + + + 64012 + ARISTA12T0 + + + + 65200 + ARISTA12T2 + + + + 64013 + ARISTA13T0 + + + + 65200 + ARISTA13T2 + + + + 64014 + ARISTA14T0 + + + + 65200 + ARISTA14T2 + + + + 64015 + ARISTA15T0 + + + + 65200 + ARISTA15T2 + + + + 64016 + ARISTA16T0 + + + + 65200 + ARISTA16T2 + + +
+
+ + + + + + HostIP + Loopback0 + + 10.1.0.32/32 + + 10.1.0.32/32 + + + + + + + + sonic + + + + + + Ethernet0 + 10.0.0.0/31 + + + + Ethernet4 + 10.0.0.2/31 + + + + Ethernet8 + 10.0.0.4/31 + + + + Ethernet12 + 10.0.0.6/31 + + + + Ethernet16 + 10.0.0.8/31 + + + + Ethernet20 + 10.0.0.10/31 + + + + Ethernet24 + 10.0.0.12/31 + + + + Ethernet28 + 10.0.0.14/31 + + + + Ethernet32 + 10.0.0.16/31 + + + + Ethernet36 + 10.0.0.18/31 + + + + Ethernet40 + 10.0.0.20/31 + + + + Ethernet44 + 10.0.0.22/31 + + + + Ethernet48 + 10.0.0.24/31 + + + + Ethernet52 + 10.0.0.26/31 + + + + Ethernet56 + 10.0.0.28/31 + + + + Ethernet60 + 10.0.0.30/31 + + + + Ethernet64 + 10.0.0.32/31 + + + + Ethernet68 + 10.0.0.34/31 + + + + Ethernet72 + 10.0.0.36/31 + + + + Ethernet76 + 10.0.0.38/31 + + + + Ethernet80 + 10.0.0.40/31 + + + + Ethernet84 + 10.0.0.42/31 + + + + Ethernet88 + 10.0.0.44/31 + + + + Ethernet92 + 10.0.0.46/31 + + + + Ethernet96 + 10.0.0.48/31 + + + + Ethernet100 + 10.0.0.50/31 + + + + Ethernet104 + 10.0.0.52/31 + + + + Ethernet108 + 10.0.0.54/31 + + + + Ethernet112 + 10.0.0.56/31 + + + + Ethernet116 + 10.0.0.58/31 + + + + Ethernet120 + 10.0.0.60/31 + + + + Ethernet124 + 10.0.0.62/31 + + + + + + + + + + + + DeviceInterfaceLink + sonic + Ethernet0 + ARISTA01T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet4 + ARISTA02T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet8 + ARISTA03T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet12 + ARISTA04T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet16 + ARISTA05T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet20 + ARISTA06T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet24 + ARISTA07T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet28 + ARISTA08T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet32 + ARISTA09T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet36 + ARISTA10T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet40 + ARISTA11T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet44 + ARISTA12T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet48 + ARISTA13T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet52 + ARISTA14T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet56 + ARISTA15T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet60 + ARISTA16T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet64 + ARISTA01T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet68 + ARISTA02T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet72 + ARISTA03T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet76 + ARISTA04T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet80 + ARISTA05T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet84 + ARISTA06T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet88 + ARISTA07T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet92 + ARISTA08T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet96 + ARISTA09T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet100 + ARISTA10T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet104 + ARISTA11T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet108 + ARISTA12T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet112 + ARISTA13T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet116 + ARISTA14T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet120 + ARISTA15T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet124 + ARISTA16T0 + Ethernet1 + + + + + sonic + Quanta-IX4-64X + + + + + + + sonic + + + DhcpResources + + + + + NtpResources + + 0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org + + + SyslogResources + + + + + + + + + sonic + Quanta-IX4-64X +
diff --git a/device/quanta/x86_64-quanta_ix4_bwde-r0/plugins/eeprom.py b/device/quanta/x86_64-quanta_ix4_bwde-r0/plugins/eeprom.py new file mode 100755 index 00000000000..2a35f3a22a1 --- /dev/null +++ b/device/quanta/x86_64-quanta_ix4_bwde-r0/plugins/eeprom.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python + +try: + import exceptions + import binascii + import time + import optparse + import warnings + import os + import sys + from sonic_eeprom import eeprom_base + from sonic_eeprom import eeprom_tlvinfo + import subprocess +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + +class board(eeprom_tlvinfo.TlvInfoDecoder): + _TLV_INFO_MAX_LEN = 256 + def __init__(self, name, path, cpld_root, ro): + self.eeprom_path = "/sys/bus/i2c/devices/18-0054/eeprom" + super(board, self).__init__(self.eeprom_path, 0, '', True) diff --git a/device/quanta/x86_64-quanta_ix4_bwde-r0/plugins/sfputil.py b/device/quanta/x86_64-quanta_ix4_bwde-r0/plugins/sfputil.py new file mode 100755 index 00000000000..f6b70c4c114 --- /dev/null +++ b/device/quanta/x86_64-quanta_ix4_bwde-r0/plugins/sfputil.py @@ -0,0 +1,203 @@ +#!/usr/bin/env python + +try: + import time + from sonic_sfp.sfputilbase import SfpUtilBase +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + + +class SfpUtil(SfpUtilBase): + """Platform specific SfpUtill class""" + + _port_start = 0 + _port_end = 63 + ports_in_block = 64 + + _port_to_eeprom_mapping = {} + port_to_i2c_mapping = { + 1 : 32, + 2 : 33, + 3 : 34, + 4 : 35, + 5 : 36, + 6 : 37, + 7 : 38, + 8 : 39, + 9 : 40, + 10 : 41, + 11 : 42, + 12 : 43, + 13 : 44, + 14 : 45, + 15 : 46, + 16 : 47, + 17 : 48, + 18 : 49, + 19 : 50, + 20 : 51, + 21 : 52, + 22 : 53, + 23 : 54, + 24 : 55, + 25 : 56, + 26 : 57, + 27 : 58, + 28 : 59, + 29 : 60, + 30 : 61, + 31 : 62, + 32 : 63, + 33 : 64, + 34 : 65, + 35 : 66, + 36 : 67, + 37 : 68, + 38 : 69, + 39 : 70, + 40 : 71, + 41 : 72, + 42 : 73, + 43 : 74, + 44 : 75, + 45 : 76, + 46 : 77, + 47 : 78, + 48 : 79, + 49 : 80, + 50 : 81, + 51 : 82, + 52 : 83, + 53 : 84, + 54 : 85, + 55 : 86, + 56 : 87, + 57 : 88, + 58 : 89, + 59 : 90, + 60 : 91, + 61 : 92, + 62 : 93, + 63 : 94, + 64 : 95, + } + + _qsfp_ports = range(0, ports_in_block + 1) + + def __init__(self): + eeprom_path = '/sys/bus/i2c/devices/{0}-0050/eeprom' + for x in range(0, self._port_end + 1): + port_eeprom_path = eeprom_path.format(self.port_to_i2c_mapping[x+1]) + self._port_to_eeprom_mapping[x] = port_eeprom_path + SfpUtilBase.__init__(self) + + def reset(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + try: + reg_file = open("/sys/class/cpld-qsfp28/port-"+str(port_num+1)+"/reset", "r+") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_value = 0 + reg_file.write(hex(reg_value)) + reg_file.close() + + # Sleep 2 second to allow it to settle + time.sleep(2) + + # Flip the value back write back to the register to take port out of reset + try: + reg_file = open("/sys/class/cpld-qsfp28/port-"+str(port_num+1)+"/reset", "r+") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_value = 1 + reg_file.write(hex(reg_value)) + reg_file.close() + + 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 + + try: + reg_file = open("/sys/class/cpld-qsfp28/port-"+str(port_num+1)+"/lpmode", "r+") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_value = int(reg_file.readline().rstrip()) + + # LPMode is active high; set or clear the bit accordingly + if lpmode is True: + reg_value = 1 + else: + reg_value = 0 + + reg_file.write(hex(reg_value)) + reg_file.close() + + return True + + 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 + + try: + reg_file = open("/sys/class/cpld-qsfp28/port-"+str(port_num+1)+"/lpmode") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_value = int(reg_file.readline().rstrip()) + + if reg_value == 0: + return False + + return True + + 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 + + #path = "/sys/class/cpld-qsfp28/port-{0}/module_present" + #port_ps = path.format(self.port_to_i2c_mapping[port_num+1]) + + try: + reg_file = open("/sys/class/cpld-qsfp28/port-"+str(port_num+1)+"/module_present") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_value = reg_file.readline().rstrip() + if reg_value == '1': + return True + + return False + + @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 + + diff --git a/installer/x86_64/install.sh b/installer/x86_64/install.sh index 91dd57a74ba..5d23b38e878 100755 --- a/installer/x86_64/install.sh +++ b/installer/x86_64/install.sh @@ -81,6 +81,11 @@ VAR_LOG_SIZE=4096 if [ "$install_env" != "build" ]; then onie_dev=$(blkid | grep ONIE-BOOT | head -n 1 | awk '{print $1}' | sed -e 's/:.*$//') blk_dev=$(echo $onie_dev | sed -e 's/[1-9][0-9]*$//' | sed -e 's/\([0-9]\)\(p\)/\1/') + + blk_suffix= + echo $blk_dev | grep -q mmcblk && blk_suffix="p" + echo $blk_dev | grep -q nvme0 && blk_suffix="p" + # Note: ONIE has no mount setting for / with device node, so below will be empty string cur_part=$(cat /proc/mounts | awk "{ if(\$2==\"/\") print \$1 }" | grep $blk_dev || true) @@ -200,7 +205,7 @@ create_demo_gpt_partition() echo "Partition #$demo_part is available" # Create new partition - echo "Creating new $demo_volume_label partition ${blk_dev}$demo_part ..." + echo "Creating new $demo_volume_label partition ${blk_dev}${blk_suffix}$demo_part ..." if [ "$demo_type" = "DIAG" ] ; then # set the GPT 'system partition' attribute bit for the DIAG @@ -399,6 +404,7 @@ image_dir="image-$image_version" if [ "$install_env" = "onie" ]; then eval $create_demo_partition $blk_dev demo_dev=$(echo $blk_dev | sed -e 's/\(mmcblk[0-9]\)/\1p/')$demo_part + demo_dev=$(echo $blk_dev | sed -e 's/\(nvme[0-9]n[0-9]\)/\1p/')$demo_part # Make filesystem mkfs.ext4 -L $demo_volume_label $demo_dev diff --git a/platform/broadcom/one-image.mk b/platform/broadcom/one-image.mk index 001d7486101..1ba48586aee 100755 --- a/platform/broadcom/one-image.mk +++ b/platform/broadcom/one-image.mk @@ -26,6 +26,7 @@ $(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(DELL_S6000_PLATFORM_MODULE) \ $(DELTA_AG9064_PLATFORM_MODULE) \ $(DELTA_AG5648_PLATFORM_MODULE) \ $(QUANTA_IX1B_32X_PLATFORM_MODULE) \ + $(QUANTA_IX4_64X_PLATFORM_MODULE) \ $(MITAC_LY1200_32X_PLATFORM_MODULE) $(SONIC_ONE_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_IMAGES) SONIC_INSTALLERS += $(SONIC_ONE_IMAGE) diff --git a/platform/broadcom/platform-modules-quanta.mk b/platform/broadcom/platform-modules-quanta.mk index fe4ebe40567..6e75f5eea4f 100755 --- a/platform/broadcom/platform-modules-quanta.mk +++ b/platform/broadcom/platform-modules-quanta.mk @@ -1,8 +1,10 @@ # Quanta Platform modules QUANTA_IX1B_32X_PLATFORM_MODULE_VERSION = 1.0 +QUANTA_IX4_64X_PLATFORM_MODULE_VERSION = 1.0 export QUANTA_IX1B_32X_PLATFORM_MODULE_VERSION +export QUANTA_IX4_64X_PLATFORM_MODULE_VERSION QUANTA_IX1B_32X_PLATFORM_MODULE = sonic-platform-quanta-ix1b-32x_$(QUANTA_IX1B_32X_PLATFORM_MODULE_VERSION)_amd64.deb $(QUANTA_IX1B_32X_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-quanta @@ -10,4 +12,6 @@ $(QUANTA_IX1B_32X_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_C $(QUANTA_IX1B_32X_PLATFORM_MODULE)_PLATFORM = x86_64-quanta_ix1b_32x-r0 SONIC_DPKG_DEBS += $(QUANTA_IX1B_32X_PLATFORM_MODULE) - +QUANTA_IX4_64X_PLATFORM_MODULE = sonic-platform-quanta-ix4-64x_$(QUANTA_IX4_64X_PLATFORM_MODULE_VERSION)_amd64.deb +$(QUANTA_IX4_64X_PLATFORM_MODULE)_PLATFORM = x86_64-quanta_ix4_bwde-r0 +$(eval $(call add_extra_package,$(QUANTA_IX1B_32X_PLATFORM_MODULE),$(QUANTA_IX4_64X_PLATFORM_MODULE))) diff --git a/platform/broadcom/sonic-platform-modules-quanta b/platform/broadcom/sonic-platform-modules-quanta index 2a300312a08..336c4a5f2f1 160000 --- a/platform/broadcom/sonic-platform-modules-quanta +++ b/platform/broadcom/sonic-platform-modules-quanta @@ -1 +1 @@ -Subproject commit 2a300312a084cd96cdd3657020b5e207adc04559 +Subproject commit 336c4a5f2f10829d4c73656380e58436e6114476