From d6a0d8cd97f30957bd2738a2e2a2d5e9de898b20 Mon Sep 17 00:00:00 2001 From: roy_lee Date: Mon, 28 Jan 2019 15:25:18 +0800 Subject: [PATCH 1/5] Add new minipack platform. Signed-off-by: roy_lee --- .../Accton-MINIPACK/port_config.ini | 33 + .../Accton-MINIPACK/sai.profile | 1 + .../th3-minipack-32x400w.config.bcm | 132 ++ .../x86_64-accton_minipack-r0/default_sku | 1 + .../x86_64-accton_minipack-r0/installer.conf | 1 + .../led_proc_init.soc | 103 ++ .../plugins/eeprom.py | 23 + .../plugins/psuutil.py | 61 + .../plugins/sfputil.py | 215 ++++ .../x86_64-accton_minipack-r0/sensors.conf | 23 + platform/broadcom/one-image.mk | 1 + platform/broadcom/platform-modules-accton.mk | 6 + .../debian/control | 4 + .../debian/rules | 2 +- .../minipack/classes/__init__.py | 0 .../minipack/modules/Makefile | 1 + .../minipack/modules/minipack_psensor.c | 1086 +++++++++++++++++ .../service/minipack-platform-init.service | 16 + .../minipack/setup.py | 16 + .../minipack/utils/README | 48 + .../minipack/utils/accton_bmc_query.py | 627 ++++++++++ .../minipack/utils/accton_minipack_util.py | 527 ++++++++ 22 files changed, 2926 insertions(+), 1 deletion(-) create mode 100644 device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/port_config.ini create mode 100644 device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/sai.profile create mode 100644 device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/th3-minipack-32x400w.config.bcm create mode 100644 device/accton/x86_64-accton_minipack-r0/default_sku create mode 100644 device/accton/x86_64-accton_minipack-r0/installer.conf create mode 100644 device/accton/x86_64-accton_minipack-r0/led_proc_init.soc create mode 100644 device/accton/x86_64-accton_minipack-r0/plugins/eeprom.py create mode 100644 device/accton/x86_64-accton_minipack-r0/plugins/psuutil.py create mode 100644 device/accton/x86_64-accton_minipack-r0/plugins/sfputil.py create mode 100644 device/accton/x86_64-accton_minipack-r0/sensors.conf create mode 100644 platform/broadcom/sonic-platform-modules-accton/minipack/classes/__init__.py create mode 100644 platform/broadcom/sonic-platform-modules-accton/minipack/modules/Makefile create mode 100755 platform/broadcom/sonic-platform-modules-accton/minipack/modules/minipack_psensor.c create mode 100644 platform/broadcom/sonic-platform-modules-accton/minipack/service/minipack-platform-init.service create mode 100644 platform/broadcom/sonic-platform-modules-accton/minipack/setup.py create mode 100644 platform/broadcom/sonic-platform-modules-accton/minipack/utils/README create mode 100755 platform/broadcom/sonic-platform-modules-accton/minipack/utils/accton_bmc_query.py create mode 100755 platform/broadcom/sonic-platform-modules-accton/minipack/utils/accton_minipack_util.py diff --git a/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/port_config.ini b/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/port_config.ini new file mode 100644 index 000000000000..fd2022dc2c9d --- /dev/null +++ b/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/port_config.ini @@ -0,0 +1,33 @@ +# name lanes alias +Ethernet0 49,50,51,52 fortyGigE1 +Ethernet4 53,54,55,56 fortyGigE2 +Ethernet8 57,58,59,60 fortyGigE3 +Ethernet12 61,62,63,64 fortyGigE4 +Ethernet16 65,66,67,68 fortyGigE5 +Ethernet20 69,70,71,72 fortyGigE6 +Ethernet24 73,74,75,76 fortyGigE7 +Ethernet28 77,78,79,80 fortyGigE8 +Ethernet32 33,34,35,36 fortyGigE9 +Ethernet36 37,38,39,40 fortyGigE10 +Ethernet40 41,42,43,44 fortyGigE11 +Ethernet44 45,46,47,48 fortyGigE12 +Ethernet48 81,82,83,84 fortyGigE13 +Ethernet52 85,86,87,88 fortyGigE14 +Ethernet56 89,90,91,92 fortyGigE15 +Ethernet60 93,94,95,96 fortyGigE16 +Ethernet64 97,98,99,100 fortyGigE17 +Ethernet68 101,102,103,104 fortyGigE18 +Ethernet72 105,106,107,108 fortyGigE19 +Ethernet76 109,110,111,112 fortyGigE20 +Ethernet80 17,18,19,20 fortyGigE21 +Ethernet84 21,22,23,24 fortyGigE22 +Ethernet88 25,26,27,28 fortyGigE23 +Ethernet92 29,30,31,32 fortyGigE24 +Ethernet96 113,114,115,116 fortyGigE25 +Ethernet100 117,118,119,120 fortyGigE26 +Ethernet104 121,122,123,124 fortyGigE27 +Ethernet108 125,126,127,128 fortyGigE28 +Ethernet112 1,2,3,4 fortyGigE29 +Ethernet116 5,6,7,8 fortyGigE30 +Ethernet120 9,10,11,12 fortyGigE31 +Ethernet124 13,14,15,16 fortyGigE32 diff --git a/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/sai.profile b/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/sai.profile new file mode 100644 index 000000000000..a283ada9e28f --- /dev/null +++ b/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/sai.profile @@ -0,0 +1 @@ +SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/th3-minipack-32x400w.config.bcm diff --git a/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/th3-minipack-32x400w.config.bcm b/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/th3-minipack-32x400w.config.bcm new file mode 100644 index 000000000000..54f3c366fdc4 --- /dev/null +++ b/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/th3-minipack-32x400w.config.bcm @@ -0,0 +1,132 @@ +os=unix +bcm_stat_flags=0 +parity_enable=0 +parity_correction=0 + +l2_mem_entries=163840 +l3_mem_entries=81920 +mmu_lossless=0 +lls_num_l2uc=12 +module_64ports=0 + +#SFI +serdes_if_type=9 + +port_init_cl72=0 +phy_an_c73=5 # TSCMOD_CL73_CL37 + +#sdk6.5.5 only supports 156(default) or 125 +#xgxs_lcpll_xtal_refclk=1 +tslam_dma_enable=1 +table_dma_enable=1 + +#for 32x40G ports for breakout mode +pbmp_oversubscribe=0x1fffffffe +pbmp_xport_xe=0x1fffffffe + +rate_ext_mdio_divisor=96 + +#QSFP+ 1 from WC0 +portmap_1=1:40 + +#QSFP+ 2 from WC1 +portmap_2=5:40 + +#QSFP+ 3 from WC2 +portmap_3=9:40 + +#QSFP+ 4 from WC3 +portmap_4=13:40 + +#QSFP+ 5 from WC4 +portmap_5=17:40 + +#QSFP+ 6 from WC5 +portmap_6=21:40 + +#QSFP+ 7 from WC6 +portmap_7=25:40 + +#QSFP+ 8 from WC7 +portmap_8=29:40 + +#QSFP+ 9 from WC8 +portmap_9=33:40 + +#QSFP+ 10 from WC9 +portmap_10=37:40 + +#QSFP+ 11 from WC10 +portmap_11=41:40 + +#QSFP+ 12 from WC11 +portmap_12=45:40 + +#QSFP+ 13 from WC12 +portmap_13=49:40 + +#QSFP+ 14 from WC13 +portmap_14=53:40 + +#QSFP+ 15 from WC14 +portmap_15=57:40 + +#QSFP+ 16 from WC15 +portmap_16=61:40 + +#QSFP+ 17 from WC16 +portmap_17=65:40 + +#QSFP+ 18 from WC17 +portmap_18=69:40 + +#QSFP+ 19 from WC18 +portmap_19=73:40 + +#QSFP+ 20 from WC19 +portmap_20=77:40 + +#QSFP+ 21 from WC20 +portmap_21=81:40 + +#QSFP+ 22 from WC21 +portmap_22=85:40 + +#QSFP+ 23 from WC22 +portmap_23=89:40 + +#QSFP+ 24 from WC23 +portmap_24=93:40 + +#QSFP+ 25 from WC24 +portmap_25=97:40 + +#QSFP+ 26 from WC25 +portmap_26=101:40 + +#QSFP+ 27 from WC26 +portmap_27=105:40 + +#QSFP+ 28 from WC27 +portmap_28=109:40 + +#QSFP+ 29 from WC28 +portmap_29=113:40 + +#QSFP+ 30 from WC29 +portmap_30=117:40 + +#QSFP+ 31 from WC30 +portmap_31=121:40 + +#QSFP+ 32 from WC31 +portmap_32=125:40 + +# L3 ECMP +# - In Trident2, VP LAGs share the same table as ECMP group table. +# The first N entries are reserved for VP LAGs, where N is the value of the +# config property "max_vp_lags". By default this was set to 256 +l3_max_ecmp_mode=1 +max_vp_lags=0 + +stable_size=0x2000000 diff --git a/device/accton/x86_64-accton_minipack-r0/default_sku b/device/accton/x86_64-accton_minipack-r0/default_sku new file mode 100644 index 000000000000..21ede3d5ad55 --- /dev/null +++ b/device/accton/x86_64-accton_minipack-r0/default_sku @@ -0,0 +1 @@ +Accton-MINIPACK t1 diff --git a/device/accton/x86_64-accton_minipack-r0/installer.conf b/device/accton/x86_64-accton_minipack-r0/installer.conf new file mode 100644 index 000000000000..3714ff053bb0 --- /dev/null +++ b/device/accton/x86_64-accton_minipack-r0/installer.conf @@ -0,0 +1 @@ +CONSOLE_SPEED=57600 diff --git a/device/accton/x86_64-accton_minipack-r0/led_proc_init.soc b/device/accton/x86_64-accton_minipack-r0/led_proc_init.soc new file mode 100644 index 000000000000..d4d5fff774ff --- /dev/null +++ b/device/accton/x86_64-accton_minipack-r0/led_proc_init.soc @@ -0,0 +1,103 @@ +# LED setting for active +# ----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- + +s CMIC_LEDUP0_DATA_RAM 0 +s CMIC_LEDUP1_DATA_RAM 0 + +m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_63=0 +m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_59=1 +m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_55=2 +m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_51=3 +m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_35=4 +m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_39=5 +m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_43=6 +m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_47=7 + +m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_31=8 +m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_27=9 +m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_23=10 +m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_19=11 +m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_3=12 +m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_7=13 +m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_11=14 +m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_15=15 + + +m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_62=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_61=62 +m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=61 +m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_58=60 +m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_57=59 +m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=58 +m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_54=57 +m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_53=56 +m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=55 +m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_50=54 +m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_49=53 +m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=52 +m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_46=51 +m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_45=50 +m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=49 +m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_42=48 +m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_41=47 +m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=46 +m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_38=45 +m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_37=44 +m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=43 +m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_34=42 +m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_33=41 +m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=40 +m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_30=39 +m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_29=38 +m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=37 +m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_26=36 +m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_25=35 +m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=34 +m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_22=33 +m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_21=32 +m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=31 +m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_18=30 +m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_17=29 +m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=28 +m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_14=27 +m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_13=26 +m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=25 +m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_10=24 +m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_9=23 +m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=22 +m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_6=21 +m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_5=20 +m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=19 +m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_2=18 +m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_1=17 +m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=16 + + +led 0 stop +led 0 prog \ + 02 F9 42 80 02 F7 42 00 02 F8 42 00 02 F4 42 90 02 \ + F3 42 10 67 6A 67 6A 67 38 67 6A 67 6A 67 6A 67 6A \ + 67 6A 67 6A 86 F8 06 F3 D6 F8 74 14 86 F0 3E F4 67 \ + 6A 57 67 7E 57 06 F8 88 80 4A 00 27 97 75 35 90 4A \ + 00 27 4A 01 27 B7 97 71 4F 77 32 06 F5 D6 F0 74 62 \ + 02 F5 4A 07 37 4E 07 02 F0 42 00 4E 07 02 F5 4A 07 \ + 71 32 77 35 16 F7 06 F9 17 4D DA 07 74 7B 12 F7 52 \ + 00 86 F9 57 86 F7 57 16 F7 06 F9 07 4D DA 07 74 8F \ + 12 F7 52 00 86 F9 57 86 F7 57 00 00 00 00 00 00 00 \ + 00 00 00 00 00 00 00 +led 0 start + +led 1 stop +led 1 prog \ + 02 F9 42 80 02 F7 42 00 02 F8 42 01 02 F4 42 90 02 \ + F3 42 11 67 6A 67 6A 67 38 67 6A 67 6A 67 6A 67 6A \ + 67 6A 67 6A 86 F8 06 F3 D6 F8 74 14 86 F0 3E F4 67 \ + 6A 57 67 7E 57 06 F8 88 80 4A 00 27 97 75 35 90 4A \ + 00 27 4A 01 27 B7 97 71 4F 77 32 06 F5 D6 F0 74 62 \ + 02 F5 4A 07 37 4E 07 02 F0 42 00 4E 07 02 F5 4A 07 \ + 71 32 77 35 16 F7 06 F9 17 4D DA 07 74 7B 12 F7 52 \ + 00 86 F9 57 86 F7 57 16 F7 06 F9 07 4D DA 07 74 8F \ + 12 F7 52 00 86 F9 57 86 F7 57 00 00 00 00 00 00 00 \ + 00 00 00 00 00 00 00 +led 1 start diff --git a/device/accton/x86_64-accton_minipack-r0/plugins/eeprom.py b/device/accton/x86_64-accton_minipack-r0/plugins/eeprom.py new file mode 100644 index 000000000000..d8ab41bd7d81 --- /dev/null +++ b/device/accton/x86_64-accton_minipack-r0/plugins/eeprom.py @@ -0,0 +1,23 @@ +#!/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/1-0057/eeprom" + if not os.path.exists(self.eeprom_path): + self.eeprom_path = "/sys/bus/i2c/devices/0-0057/eeprom" + super(board, self).__init__(self.eeprom_path, 0, '', True) diff --git a/device/accton/x86_64-accton_minipack-r0/plugins/psuutil.py b/device/accton/x86_64-accton_minipack-r0/plugins/psuutil.py new file mode 100644 index 000000000000..191654429e6b --- /dev/null +++ b/device/accton/x86_64-accton_minipack-r0/plugins/psuutil.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python + +############################################################################# +# Accton +# +# Module contains an implementation of SONiC PSU Base API and +# provides the PSUs status which are available in the platform +# +############################################################################# + +import os.path + +try: + from sonic_psu.psu_base import PsuBase +except ImportError as e: + raise ImportError (str(e) + "- required module not found") + +class PsuUtil(PsuBase): + """Platform-specific PSUutil class""" + + def __init__(self): + PsuBase.__init__(self) + + self.psu_path = "/sys/bus/i2c/devices/" + self.psu_presence = "/psu_present" + self.psu_oper_status = "/psu_power_good" + self.psu_mapping = { + 1: "35-0038", + 2: "36-003b", + } + + def get_num_psus(self): + return len(self.psu_mapping) + + def get_psu_status(self, index): + if index is None: + return False + + status = 0 + node = self.psu_path + self.psu_mapping[index]+self.psu_oper_status + try: + with open(node, 'r') as power_status: + status = int(power_status.read()) + except IOError: + return False + + return status == 1 + + def get_psu_presence(self, index): + if index is None: + return False + + status = 0 + node = self.psu_path + self.psu_mapping[index] + self.psu_presence + try: + with open(node, 'r') as presence_status: + status = int(presence_status.read()) + except IOError: + return False + + return status == 1 diff --git a/device/accton/x86_64-accton_minipack-r0/plugins/sfputil.py b/device/accton/x86_64-accton_minipack-r0/plugins/sfputil.py new file mode 100644 index 000000000000..73d4b6139c9e --- /dev/null +++ b/device/accton/x86_64-accton_minipack-r0/plugins/sfputil.py @@ -0,0 +1,215 @@ +# sfputil.py +# +# Platform-specific SFP transceiver interface for SONiC +# + +try: + import time + import os + from sonic_sfp.sfputilbase import SfpUtilBase +except ImportError as e: + raise ImportError("%s - required module not found" % str(e)) + + +class SfpUtil(SfpUtilBase): + """Platform-specific SfpUtil class""" + + PORT_START = 0 + PORT_END = 127 + PORTS_IN_BLOCK = 128 + QSFP_PORT_START = 0 + QSFP_PORT_END = 128 + + I2C_DEV_PATH = "/sys/bus/i2c/devices/" + BASE_VAL_PATH = "/sys/class/i2c-adapter/i2c-{0}/{1}-0050/" + BASE_OOM_PATH = "/sys/bus/i2c/devices/{0}-0050/" + CPLD_ADDRESS = ['-0062', '-0064'] + + _port_to_is_present = {} + _port_to_lp_mode = {} + + _port_to_eeprom_mapping = {} + _port_to_i2c_mapping = { + 0: [1, 2], + 1: [2, 3], + 2: [3, 4], + 3: [4, 5], + 4: [5, 6], + 5: [6, 7], + 6: [7, 8], + 7: [8, 9], + 8: [9, 10], + 9: [10, 11], + 10: [11, 12], + 11: [12, 13], + 12: [13, 14], + 13: [14, 15], + 14: [15, 16], + 15: [16, 17], + 16: [17, 18], + 17: [18, 19], + 18: [19, 20], + 19: [20, 21], + 20: [21, 22], + 21: [22, 23], + 22: [23, 24], + 23: [24, 25], + 24: [25, 26], + 25: [26, 27], + 26: [27, 28], + 27: [28, 29], + 28: [29, 30], + 29: [30, 31], + 30: [31, 32], + 31: [32, 33], + 32: [33, 34], + 33: [34, 35], + 34: [35, 36], + 35: [36, 37], + 36: [37, 38], + 37: [38, 39], + 38: [39, 40], + 39: [40, 41], + 40: [41, 42], + 41: [42, 43], + 42: [43, 44], + 43: [44, 45], + 44: [45, 46], + 45: [46, 47], + 46: [47, 48], + 47: [48, 49], + 48: [49, 50],#QSFP49 + 49: [49, 50], + 50: [49, 50], + 51: [49, 50], + 52: [50, 52],#QSFP50 + 53: [50, 52], + 54: [50, 52], + 55: [50, 52], + 56: [51, 54],#QSFP51 + 57: [51, 54], + 58: [51, 54], + 59: [51, 54], + 60: [52, 51],#QSFP52 + 61: [52, 51], + 62: [52, 51], + 63: [52, 51], + 64: [53, 53], #QSFP53 + 65: [53, 53], + 66: [53, 53], + 67: [53, 53], + 68: [54, 55],#QSFP54 + 69: [54, 55], + 70: [54, 55], + 71: [54, 55], + } + + @property + def port_start(self): + return self.PORT_START + + @property + def port_end(self): + return self.PORT_END + + @property + def qsfp_port_start(self): + return self.QSFP_PORT_START + + @property + def qsfp_port_end(self): + return self.QSFP_PORT_END + + @property + def qsfp_ports(self): + return range(self.QSFP_PORT_START, self.PORTS_IN_BLOCK + 1) + + @property + def port_to_eeprom_mapping(self): + return self._port_to_eeprom_mapping + + def __init__(self): + eeprom_path = self.BASE_OOM_PATH + "eeprom" + + for x in range(0, self.port_end+1): + self.port_to_eeprom_mapping[x] = eeprom_path.format( + self._port_to_i2c_mapping[x][1] + ) + + SfpUtilBase.__init__(self) + + def get_cpld_dev_path(self, port_num): + if port_num < 16: + cpld_num = 0 + else: + cpld_num = 1 + + #cpld can be at either bus 0 or bus 1. + cpld_path = self.I2C_DEV_PATH + str(0) + self.CPLD_ADDRESS[cpld_num] + if not os.path.exists(cpld_path): + cpld_path = self.I2C_DEV_PATH + str(1) + self.CPLD_ADDRESS[cpld_num] + return cpld_path + + 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 + + cpld_path = self.get_cpld_dev_path(port_num) + present_path = cpld_path + "/module_present_" + present_path += str(self._port_to_i2c_mapping[port_num][0]) + + self.__port_to_is_present = present_path + + try: + val_file = open(self.__port_to_is_present) + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + content = val_file.readline().rstrip() + val_file.close() + + # content is a string, either "0" or "1" + if content == "1": + return True + + return False + + def get_low_power_mode(self, port_num): + raise NotImplementedError + + def set_low_power_mode(self, port_num, lpmode): + raise NotImplementedError + + def reset(self, port_num): + if port_num < self.qsfp_port_start or port_num > self.qsfp_port_end: + return False + + cpld_path = self.get_cpld_dev_path(port_num) + _path = cpld_path + "/module_reset_" + _path += str(self._port_to_i2c_mapping[port_num][0]) + + try: + reg_file = open(_path, 'w') + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_file.seek(0) + reg_file.write('1') + time.sleep(1) + reg_file.seek(0) + reg_file.write('0') + reg_file.close() + + return True + + def get_transceiver_change_event(self): + """ + TODO: This function need to be implemented + when decide to support monitoring SFP(Xcvrd) + on this platform. + """ + raise NotImplementedError + diff --git a/device/accton/x86_64-accton_minipack-r0/sensors.conf b/device/accton/x86_64-accton_minipack-r0/sensors.conf new file mode 100644 index 000000000000..c0114ab68604 --- /dev/null +++ b/device/accton/x86_64-accton_minipack-r0/sensors.conf @@ -0,0 +1,23 @@ +# libsensors configuration file +# ------------------------------------------------ + +chip "cpr_4011_4mxx-i2c-*-3c" + label in1 "PSU1_VIN" + label in2 "PSU1_VOUT" + label curr1 "PSU1_IIN" + label curr2 "PSU1_IOUT" + label power1 "PSU1_PIN" + label power2 "PSU1_POUT" + label fan1 "PSU1_FAN" + label temp1 "PSU1_TEMP" + +chip "cpr_4011_4mxx-i2c-*-3f" + label in1 "PSU2_VIN" + label in2 "PSU2_VOUT" + label curr1 "PSU2_IIN" + label curr2 "PSU2_IOUT" + label power1 "PSU2_PIN" + label power2 "PSU2_POUT" + label fan1 "PSU2_FAN" + label temp1 "PSU2_TEMP" + diff --git a/platform/broadcom/one-image.mk b/platform/broadcom/one-image.mk index 61794979a753..171e344cd4f0 100644 --- a/platform/broadcom/one-image.mk +++ b/platform/broadcom/one-image.mk @@ -21,6 +21,7 @@ $(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(DELL_S6000_PLATFORM_MODULE) \ $(ACCTON_AS7326_56X_PLATFORM_MODULE) \ $(ACCTON_AS7716_32XB_PLATFORM_MODULE) \ $(ACCTON_AS6712_32X_PLATFORM_MODULE) \ + $(ACCTON_MINIPACK_PLATFORM_MODULE) \ $(INVENTEC_D7032Q28B_PLATFORM_MODULE) \ $(INVENTEC_D7054Q28B_PLATFORM_MODULE) \ $(INVENTEC_D7264Q28B_PLATFORM_MODULE) \ diff --git a/platform/broadcom/platform-modules-accton.mk b/platform/broadcom/platform-modules-accton.mk index 72c2453c5359..35bfe1abae82 100644 --- a/platform/broadcom/platform-modules-accton.mk +++ b/platform/broadcom/platform-modules-accton.mk @@ -8,6 +8,7 @@ ACCTON_AS7312_54X_PLATFORM_MODULE_VERSION = 1.1 ACCTON_AS7326_56X_PLATFORM_MODULE_VERSION = 1.1 ACCTON_AS7716_32XB_PLATFORM_MODULE_VERSION = 1.1 ACCTON_AS6712_32X_PLATFORM_MODULE_VERSION = 1.1 +ACCTON_MINIPACK_PLATFORM_MODULE_VERSION = 1.1 export ACCTON_AS7712_32X_PLATFORM_MODULE_VERSION export ACCTON_AS5712_54X_PLATFORM_MODULE_VERSION @@ -17,6 +18,7 @@ export ACCTON_AS7312_54X_PLATFORM_MODULE_VERSION export ACCTON_AS7326_56X_PLATFORM_MODULE_VERSION export ACCTON_AS7716_32XB_PLATFORM_MODULE_VERSION export ACCTON_AS6712_32X_PLATFORM_MODULE_VERSION +export ACCTON_MINIPACK_PLATFORM_MODULE_VERSION ACCTON_AS7712_32X_PLATFORM_MODULE = sonic-platform-accton-as7712-32x_$(ACCTON_AS7712_32X_PLATFORM_MODULE_VERSION)_amd64.deb $(ACCTON_AS7712_32X_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-accton @@ -52,4 +54,8 @@ ACCTON_AS6712_32X_PLATFORM_MODULE = sonic-platform-accton-as6712-32x_$(ACCTON_AS $(ACCTON_AS6712_32X_PLATFORM_MODULE)_PLATFORM = x86_64-accton_as6712_32x-r0 $(eval $(call add_extra_package,$(ACCTON_AS7712_32X_PLATFORM_MODULE),$(ACCTON_AS6712_32X_PLATFORM_MODULE))) +ACCTON_MINIPACK_PLATFORM_MODULE = sonic-platform-accton-minipack_$(ACCTON_MINIPACK_PLATFORM_MODULE_VERSION)_amd64.deb +$(ACCTON_MINIPACK_PLATFORM_MODULE)_PLATFORM = x86_64-accton_minipack-r0 +$(eval $(call add_extra_package,$(ACCTON_AS7712_32X_PLATFORM_MODULE),$(ACCTON_MINIPACK_PLATFORM_MODULE))) + SONIC_STRETCH_DEBS += $(ACCTON_AS7712_32X_PLATFORM_MODULE) diff --git a/platform/broadcom/sonic-platform-modules-accton/debian/control b/platform/broadcom/sonic-platform-modules-accton/debian/control index c2e4ccc795df..f92b3e520a03 100755 --- a/platform/broadcom/sonic-platform-modules-accton/debian/control +++ b/platform/broadcom/sonic-platform-modules-accton/debian/control @@ -36,3 +36,7 @@ Description: kernel modules for platform devices such as fan, led, sfp Package: sonic-platform-accton-as6712-32x Architecture: amd64 Description: kernel modules for platform devices such as fan, led, sfp + +Package: sonic-platform-accton-minipack +Architecture: amd64 +Description: kernel modules for platform devices such as fan, led, sfp diff --git a/platform/broadcom/sonic-platform-modules-accton/debian/rules b/platform/broadcom/sonic-platform-modules-accton/debian/rules index 2ac628b45cb3..94013fa18267 100755 --- a/platform/broadcom/sonic-platform-modules-accton/debian/rules +++ b/platform/broadcom/sonic-platform-modules-accton/debian/rules @@ -19,7 +19,7 @@ PACKAGE_PRE_NAME := sonic-platform-accton KVERSION ?= $(shell uname -r) KERNEL_SRC := /lib/modules/$(KVERSION) MOD_SRC_DIR:= $(shell pwd) -MODULE_DIRS:= as7712-32x as5712-54x as7816-64x as7716-32x as7716-32xb as7312-54x as7326-56x as6712-32x +MODULE_DIRS:= as7712-32x as5712-54x as7816-64x as7716-32x as7716-32xb as7312-54x as7326-56x as6712-32x minipack MODULE_DIR := modules UTILS_DIR := utils SERVICE_DIR := service diff --git a/platform/broadcom/sonic-platform-modules-accton/minipack/classes/__init__.py b/platform/broadcom/sonic-platform-modules-accton/minipack/classes/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/platform/broadcom/sonic-platform-modules-accton/minipack/modules/Makefile b/platform/broadcom/sonic-platform-modules-accton/minipack/modules/Makefile new file mode 100644 index 000000000000..607c2ce7607f --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-accton/minipack/modules/Makefile @@ -0,0 +1 @@ +obj-m:= minipack_psensor.o diff --git a/platform/broadcom/sonic-platform-modules-accton/minipack/modules/minipack_psensor.c b/platform/broadcom/sonic-platform-modules-accton/minipack/modules/minipack_psensor.c new file mode 100755 index 000000000000..658d78244ce0 --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-accton/minipack/modules/minipack_psensor.c @@ -0,0 +1,1086 @@ +/* + * A hwmon driver for the minipack. + * + * Copyright (C) 2018 Accton Technology Corporation. + * Roy Lee + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* + * This driver retrieves sensors' data through uart interface by opening + * an user-space tty device node. + * Designed pariticular for ethernet switch with BMC. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/*#define DEBUG*/ + +#ifdef DEBUG +#define DEBUG_INTR(fmt, ...) pr_err(fmt, ##__VA_ARGS__) +#else +#define DEBUG_INTR(fmt...) do { } while (0) +#endif +#define DEBUG_LEX(fmt, ...) do { } while (0) + + +#define DRVNAME "minipack_psensor" /*Platform Sensor*/ + +#define SENSOR_DATA_UPDATE_INTERVAL (9*HZ) +#define MAX_THERMAL_COUNT 8 +#define MAX_FAN_COUNT (8) +#define MAX_PSU_COUNT (4) +#define CHASSIS_PSU_CHAR_COUNT (2) /*2 for input and output.*/ +#define CHASSIS_LED_COUNT (2) +#define CHASSIS_PSU_VOUT_COUNT (1) /*V output only.*/ +#define CHASSIS_PSU_VOUT_INDEX (1) /*V output start index.*/ + + +#define ATTR_ALLOC_EXTRA 1 /*For last attribute which is NUll.*/ +#define ATTR_NAME_SIZE 24 +#define ATTR_NAME_OUTFIT_SIZE 12 +#define ATTR_MAX_LIST 8 + +#define TTY_DEVICE "/dev/ttyACM0" +#define TTY_PROMPT "@bmc-oob" +#define TTY_USER "root" +#define TTY_PASSWORD "0penBmc" +#define TTY_BAUDRATE (57600) +#define TTY_LOGIN_RETRY 10 +#define TTY_LOGIN_RETRY_INTV (200) +#define TTY_RETRY_INTERVAL (100) /*mini-seconds*/ +#define TTY_RESPONSE_INTERVAL (1000) /*mini-seconds*/ +#define TTY_PMBUS_INTERVAL (1800) /*mini-seconds*/ +#define MAXIMUM_TTY_BUFFER_LENGTH 1024 +#define MAXIMUM_TTY_STRING_LENGTH (MAXIMUM_TTY_BUFFER_LENGTH - 1) +#define TTY_CMD_RETRY 3 +#define TTY_RX_RETRY 3 +#define TTY_CMD_MAX_LEN (64) +#define TTY_READ_MAX_LEN (256) + +#define TTY_RESP_SEPARATOR '|' /*For the ease to debug*/ +#define MAX_ATTR_PATTERN (8) +#define MIN_FAN_RPM (0) +#define MAX_PSU_VOUT (12000*1005/1000) /*12 + 0.5%*/ +#define MIN_PSU_VOUT (12000*995/1000) /*12 - 0.5%*/ + +#define ATTR_TYPE_INDEX_GAP (100) + +enum sensor_type_e { + SENSOR_TYPE_THERMAL, + SENSOR_TYPE_FAN_RPM, + SENSOR_TYPE_FAN_RPM_DN, + SENSOR_TYPE_PSU1, + SENSOR_TYPE_PSU2, + SENSOR_TYPE_PSU3, + SENSOR_TYPE_PSU4, + SENSOR_TYPE_MAX, +}; + +enum sysfs_attributes_index { + INDEX_THRM_IN_START = SENSOR_TYPE_THERMAL *ATTR_TYPE_INDEX_GAP, + INDEX_FAN_RPM_START = SENSOR_TYPE_FAN_RPM *ATTR_TYPE_INDEX_GAP, + INDEX_FAN_RPM_START_DN = SENSOR_TYPE_FAN_RPM_DN*ATTR_TYPE_INDEX_GAP, + INDEX_PSU1_START = SENSOR_TYPE_PSU1 *ATTR_TYPE_INDEX_GAP, + INDEX_PSU2_START = SENSOR_TYPE_PSU2 *ATTR_TYPE_INDEX_GAP, + INDEX_PSU3_START = SENSOR_TYPE_PSU3 *ATTR_TYPE_INDEX_GAP, + INDEX_PSU4_START = SENSOR_TYPE_PSU4 *ATTR_TYPE_INDEX_GAP, + INDEX_NAME = SENSOR_TYPE_MAX *ATTR_TYPE_INDEX_GAP, +}; + +/* Pmbus reg defines are copied from drivers/hwmon/pmbus/pmbus.h*/ +#define PMBUS_READ_VIN 0x88 +#define PMBUS_READ_IIN 0x89 +#define PMBUS_READ_VOUT 0x8B +#define PMBUS_READ_IOUT 0x8C +#define PMBUS_READ_POUT 0x96 +#define PMBUS_READ_PIN 0x97 + +#define PMBUS_REG_START PMBUS_READ_VIN +#define PMBUS_REG_END PMBUS_READ_PIN + +enum psu_data_e { + PSU_DATA_VIN = 0, + PSU_DATA_VOUT, + PSU_DATA_IIN, + PSU_DATA_IOUT, + PSU_DATA_PIN, + PSU_DATA_POUT, + PSU_DATA_MAX, +}; + +struct pmbus_reg_t { + u8 addr; + bool power; /*power attribute is in unit of uW instead of mW.*/ +} pmbus_regs[] = { + [PSU_DATA_VIN ] = {PMBUS_READ_VIN, false}, + [PSU_DATA_VOUT] = {PMBUS_READ_VOUT, false}, + [PSU_DATA_IIN ] = {PMBUS_READ_IIN, false}, + [PSU_DATA_IOUT] = {PMBUS_READ_IOUT, false}, + [PSU_DATA_PIN ] = {PMBUS_READ_PIN, true}, + [PSU_DATA_POUT] = {PMBUS_READ_POUT, true}, +}; + +struct sensor_data { + int lm75_input[MAX_THERMAL_COUNT]; + int fan_rpm[MAX_FAN_COUNT]; + int fan_rpm_dn[MAX_FAN_COUNT]; + int psu_data [MAX_PSU_COUNT][PSU_DATA_MAX]; + int led_bright[CHASSIS_LED_COUNT]; +}; + +struct psensor { + struct psensor *next; + char name[ATTR_NAME_SIZE+1]; /* sysfs sensor name */ + struct sensor_device_attribute sensor_dev_attr; +}; + +struct minipack_data { + struct platform_device *pdev; + struct device *dev; + struct device *hwmon_dev; + struct mutex update_lock; + struct tty_struct *tty; + struct ktermios old_ktermios; + bool logged_in; + bool valid[SENSOR_TYPE_MAX]; + unsigned long last_updated[SENSOR_TYPE_MAX]; /* In jiffies */ + struct sensor_data sdata; + int num_attributes; + struct attribute_group group; +}; + +typedef ssize_t (*show_func)( struct device *dev, + struct device_attribute *attr, char *buf); +typedef ssize_t (*store_func)(struct device *dev, + struct device_attribute *attr, const char *buf, + size_t count); +static ssize_t show_name(struct device *dev, struct device_attribute *da, + char *buf); +static ssize_t _attr_show(struct device *dev, struct device_attribute *da, + char *buf); +static ssize_t show_fan_min(struct device *dev, struct device_attribute *da, + char *buf); +static ssize_t show_psu_vout_min(struct device *dev, struct device_attribute *da, + char *buf); +static ssize_t show_psu_vout_max(struct device *dev, struct device_attribute *da, + char *buf); +static int add_attr2group(struct minipack_data *data, struct attribute *attr); + + +struct attr_pattern { + int count; /*How many attr of this pattern*/ + int index_addon; /* For attribute naming, e.g. + * X of "fanX_input",start from a number but 0. + */ + char prefix[ATTR_NAME_OUTFIT_SIZE+1]; /*e.g. "temp"4_input*/ + char postfix[ATTR_NAME_OUTFIT_SIZE+1]; /*e.g. temp4"_input"*/ + umode_t mode; + show_func show; + store_func store; +}; + +struct sensor_set { + int total; /*How many attr of this type*/ + int start_index; + char *query; + u32 mdelay; /*TTY delay to read after sent.*/ + struct attr_pattern *ptn[MAX_ATTR_PATTERN]; +}; + + + +#define DECLARE_PSU_SENSOR_DEVICE_ATTR(index) \ +static struct attr_pattern psu##index##_vin = {CHASSIS_PSU_CHAR_COUNT, \ +CHASSIS_PSU_CHAR_COUNT*index, "in","_input", S_IRUGO, _attr_show, NULL}; \ +static struct attr_pattern psu##index##_curr = {CHASSIS_PSU_CHAR_COUNT, \ +CHASSIS_PSU_CHAR_COUNT*index, "curr","_input", S_IRUGO, _attr_show, NULL}; \ +static struct attr_pattern psu##index##_pwr = {CHASSIS_PSU_CHAR_COUNT, \ +CHASSIS_PSU_CHAR_COUNT*index, "power","_input", S_IRUGO, _attr_show, NULL}; \ +static struct attr_pattern psu##index##_vmax = {CHASSIS_PSU_VOUT_COUNT, \ +CHASSIS_PSU_CHAR_COUNT*index + 1, "in","_max", S_IRUGO, show_psu_vout_max, NULL};\ +static struct attr_pattern psu##index##_vmin = {CHASSIS_PSU_VOUT_COUNT, \ +CHASSIS_PSU_CHAR_COUNT*index + 1, "in","_min", S_IRUGO, show_psu_vout_min, NULL} + +#define DECLARE_PSU_ATTR(index) \ + &psu##index##_vin, &psu##index##_curr, &psu##index##_pwr, \ + &psu##index##_vmax, &psu##index##_vmin + + +DECLARE_PSU_SENSOR_DEVICE_ATTR(0); +DECLARE_PSU_SENSOR_DEVICE_ATTR(1); +DECLARE_PSU_SENSOR_DEVICE_ATTR(2); +DECLARE_PSU_SENSOR_DEVICE_ATTR(3); + + + +static char tty_cmd[SENSOR_TYPE_MAX][TTY_CMD_MAX_LEN] = { + "ls -v /sys/class/hwmon/hwmon*/temp1_input|head -n "\ + __stringify(MAX_THERMAL_COUNT)"| xargs cat\r", + "ls -v /sys/bus/i2c/devices/72-0033/fan*_input | xargs cat\r", + "ls -v /sys/bus/i2c/devices/64-0033/fan*_input | xargs cat\r", + "i2cdump -y -f -r "\ + __stringify(PMBUS_REG_START)"-" __stringify(PMBUS_REG_END)\ + " 49 0x59 w\r", + "i2cdump -y -f -r "\ + __stringify(PMBUS_REG_START)"-" __stringify(PMBUS_REG_END)\ + " 48 0x58 w\r", + "i2cdump -y -f -r "\ + __stringify(PMBUS_REG_START)"-" __stringify(PMBUS_REG_END)\ + " 57 0x59 w\r", + "i2cdump -y -f -r "\ + __stringify(PMBUS_REG_START)"-" __stringify(PMBUS_REG_END)\ + " 56 0x58 w\r", +}; + +static struct attr_pattern temp_in = +{ MAX_THERMAL_COUNT, 0, "temp","_input", + S_IRUGO, _attr_show, NULL +}; +static struct attr_pattern fan_in_up = +{ MAX_FAN_COUNT, 0, "fan","_input", + S_IRUGO, _attr_show, NULL +}; +static struct attr_pattern fan_min_up = +{ MAX_FAN_COUNT, 0, "fan","_min", + S_IRUGO, show_fan_min, NULL +}; +static struct attr_pattern fan_in_dw = +{ MAX_FAN_COUNT, MAX_FAN_COUNT, "fan","_input", + S_IRUGO, _attr_show, NULL +}; +static struct attr_pattern fan_min_dw = +{ MAX_FAN_COUNT, MAX_FAN_COUNT, "fan","_min", + S_IRUGO, show_fan_min, NULL +}; + +struct sensor_set model_ssets[SENSOR_TYPE_MAX] = +{ + { MAX_THERMAL_COUNT, INDEX_THRM_IN_START, tty_cmd[SENSOR_TYPE_THERMAL], + TTY_RESPONSE_INTERVAL, {&temp_in, NULL}, + }, + { MAX_FAN_COUNT, INDEX_FAN_RPM_START, tty_cmd[SENSOR_TYPE_FAN_RPM], + TTY_RESPONSE_INTERVAL, {&fan_in_up, &fan_min_up, NULL}, + }, + { MAX_FAN_COUNT, INDEX_FAN_RPM_START_DN, tty_cmd[SENSOR_TYPE_FAN_RPM_DN], + TTY_RESPONSE_INTERVAL, {&fan_in_dw, &fan_min_dw, NULL}, + }, + { PSU_DATA_MAX, INDEX_PSU1_START, tty_cmd[SENSOR_TYPE_PSU1], + TTY_PMBUS_INTERVAL, {DECLARE_PSU_ATTR(0), NULL}, + }, + { PSU_DATA_MAX, INDEX_PSU2_START, tty_cmd[SENSOR_TYPE_PSU2], + TTY_PMBUS_INTERVAL, {DECLARE_PSU_ATTR(1), NULL}, + }, + { PSU_DATA_MAX, INDEX_PSU3_START, tty_cmd[SENSOR_TYPE_PSU3], + TTY_PMBUS_INTERVAL, {DECLARE_PSU_ATTR(2), NULL}, + }, + { PSU_DATA_MAX, INDEX_PSU4_START, tty_cmd[SENSOR_TYPE_PSU4], + TTY_PMBUS_INTERVAL, {DECLARE_PSU_ATTR(3), NULL}, + }, +}; +static struct minipack_data *mp_data = NULL; + +/*-----------------------------------------------------------------------*/ + +static int _tty_wait(u32 mdelay) { + if (mdelay) { + msleep(mdelay); + } + return 0; +} + +static int _tty_open(struct file **fd) +{ + struct ktermios kt; + struct tty_struct *tty; + speed_t baudrate = 57600; + struct file *tty_fd = *fd; + + /*TTY must be not opened.*/ + if (tty_fd != NULL) { + return -EINVAL; + } + + tty_fd = filp_open(TTY_DEVICE, O_RDWR|O_NOCTTY|O_NDELAY, 0644); + if (IS_ERR(tty_fd)) { + DEBUG_INTR("Failed to open file(%s)\r\n", TTY_DEVICE); + return -ENOENT; + } else { + spin_lock(&tty_fd->f_lock); + tty = ((struct tty_file_private *)tty_fd ->private_data)->tty; + mp_data->old_ktermios = (tty->termios); + + kt = tty->termios; + tty_termios_encode_baud_rate(&kt, baudrate, baudrate); + kt.c_cflag = B57600 | CS8 | CLOCAL | CREAD; + kt.c_iflag = IGNPAR; + kt.c_oflag = 0; + kt.c_lflag = 0; + kt.c_cc[VMIN] = (unsigned char) + ((MAXIMUM_TTY_STRING_LENGTH > 0xFF) ? + 0xFF : MAXIMUM_TTY_STRING_LENGTH); + kt.c_cc[VTIME] = 0; + tty_set_termios(tty, &kt); + + mp_data->tty = tty ; + *fd = tty_fd; + return 0; + } + return -ENXIO; +} + +static int _tty_close(struct file **tty_fd) +{ + struct file *fd = *tty_fd; + + if(*tty_fd == NULL) { + return -EINVAL; + } + spin_unlock(&fd->f_lock); + filp_close(*tty_fd, 0); + *tty_fd = NULL; + + return 0; +} + +static int _tty_tx(struct file *tty_fd, const char *str) +{ + int rc; + + /*Sanity check*/ + if (tty_fd == NULL) + return -EINVAL; + if(!(tty_fd->f_op) || !(tty_fd->f_op->read) ||!(tty_fd->f_op->write)) { + return -EINVAL; + } + + rc = tty_fd->f_op->write(tty_fd, str, strlen(str)+1,0); + if (rc < 0) { + pr_err( "failed to write(%d)\n", rc); + return -EBUSY; + } + DEBUG_INTR("[TX]%s-%d, %d BYTES, write:\n\"%s\"\n", __func__, __LINE__,rc, str); + return rc; +} + +static int _tty_rx(struct file *tty_fd, char *buf, int max_len) +{ + int rc; + u32 timeout = 0; + + /*Sanity check*/ + if (tty_fd == NULL) + return -EINVAL; + if(!(tty_fd->f_op) || !(tty_fd->f_op->read) ||!(tty_fd->f_op->write)) { + return -EINVAL; + } + + /*Clear for remained data cause ambiguous string*/ + memset(buf, 0, max_len); + do { + rc = tty_fd->f_op->read(tty_fd, buf, max_len, 0); + if (rc == 0) { /*Buffer Empty, waits. */ + timeout++; + _tty_wait(TTY_RETRY_INTERVAL); + continue; + } else { + break; + } + } while (rc < 0 && timeout < TTY_RX_RETRY); + + if (timeout == TTY_RX_RETRY) { + rc = -EAGAIN; + } + DEBUG_INTR("[RX]%s-%d, %d BYTES, read:\n\"%s\"\n", __func__, __LINE__,rc, buf); + return rc; +} + +/*Clear Rx buffer by reading it out.*/ +static int _tty_clear_rxbuf(struct file *tty_fd, char* buf, size_t max_size) { + int rc, i; + mm_segment_t old_fs; + int retry = TTY_CMD_RETRY; + + if (tty_fd == NULL) { + return -EINVAL; + } + old_fs = get_fs(); + set_fs(KERNEL_DS); + i = 0; + do { + rc = tty_fd->f_op->read(tty_fd, buf, max_size, 0); + memset(buf, 0, max_size); + i++; + } while (rc > 0 && i < retry); + + set_fs(old_fs); + return rc; +} + +static int _tty_writeNread(struct file *tty_fd, + char *wr_p, char *rd_p, int rx_max_len, u32 mdelay) +{ + int rc; + mm_segment_t old_fs; + + /*Presumed file is opened!*/ + if (tty_fd == NULL) + return -EINVAL; + + if(!(tty_fd->f_op) || !(tty_fd->f_op->read) ||!(tty_fd->f_op->write)) { + pr_err("file %s cann't readable or writable?\n", TTY_DEVICE); + return -EINVAL; + } + + memset(rd_p, 0, rx_max_len); + old_fs = get_fs(); + set_fs(KERNEL_DS); + rc = _tty_tx(tty_fd, wr_p); + if (rc < 0) { + DEBUG_INTR( "failed to write(%d)\n", rc); + goto exit; + } + _tty_wait(mdelay); + rc = _tty_rx(tty_fd, rd_p, rx_max_len); + if (rc < 0) { + DEBUG_INTR("failed to read(%d)\n", rc); + goto exit; + } + +exit: + set_fs(old_fs); + return rc; +} + +static bool _is_logged_in(struct file *tty_fd, char* buf, size_t max_size) +{ + int i, ret; + + if (mp_data->logged_in) { + return true; + } + + _tty_clear_rxbuf(tty_fd, buf, max_size); + for (i = 0; i < TTY_LOGIN_RETRY; i++) { + ret = _tty_writeNread(tty_fd, "\r\r", buf, max_size, TTY_RETRY_INTERVAL); + if (ret < 0) { + DEBUG_INTR("%s-%d, failed ret:%d\n", __func__, __LINE__, ret); + continue; + } + + DEBUG_INTR("%s-%d, tty_buf:%s\n", __func__, __LINE__, buf); + /*Check if logined by comparing BMC's cmd prompt.*/ + if (strstr(buf, TTY_PROMPT) != NULL) { + mp_data->logged_in = true; + return true; + } else { + return false; + } + } + return false; + +} + +static int _tty_login(struct file *tty_fd, char* buf, size_t max_size) +{ + int i; + int ret = -EINVAL; + + if(!tty_fd) + return -EINVAL; + + for (i = 1; i <= TTY_LOGIN_RETRY; i++) { + if (_is_logged_in(tty_fd, buf, max_size)) + return 0; + + DEBUG_INTR("%s-%d, tty_buf:%s\n", __func__, __LINE__, buf); + if ((strstr(buf, "bmc") != NULL) && + (strstr(buf, "login:") != NULL)) + { + ret = _tty_writeNread(tty_fd, TTY_USER"\r", + buf, max_size, TTY_LOGIN_RETRY_INTV); + if (ret < 0) { + DEBUG_INTR("%s-%d, failed ret:%d\n", __func__, __LINE__, ret); + continue; + } + DEBUG_INTR("%s-%d, tty_buf:%s\n", __func__, __LINE__, buf); + if (strstr(buf, "Password:") != NULL) { + DEBUG_INTR("%s-%d, tty_buf:%s\n", __func__, __LINE__, buf); + ret = _tty_writeNread(tty_fd, TTY_PASSWORD"\r", buf, max_size, 0); + if (ret < 0) { + DEBUG_INTR("%s-%d, failed ret:%d\n", __func__, __LINE__, ret); + continue; + } + if (strstr(buf, TTY_PROMPT) != NULL) { + DEBUG_INTR("%s-%d, tty_buf:%s\n", __func__, __LINE__, buf); + return 0; + } + } + } + _tty_wait(TTY_RETRY_INTERVAL); + } + + dev_err(mp_data->dev, "Failed on %s ret:%d\n", __func__, ret); + return -EAGAIN; +} + +static int +bmc_transaction(char *cmd, char* resp, int max, u32 mdelay) +{ + u32 i; + struct file *tty_fd = NULL; + char *buf; + int buf_size = MAXIMUM_TTY_BUFFER_LENGTH; + int ret = 0; + + if(!cmd || !resp) + return -EINVAL; + + if (_tty_open(&tty_fd) != 0) { + DEBUG_INTR("ERROR: Cannot open TTY device\n"); + return -EAGAIN; + } + buf = (char *)kmalloc(buf_size, GFP_KERNEL); + if (!buf) { + ret = -ENOMEM; + goto exit; + } + if (_tty_login(tty_fd, buf, buf_size) != 0) { + dev_err(mp_data->dev, "Failed to login TTY device\n"); + _tty_close(&tty_fd); + ret = -ENOENT; + goto exit; + } + + i = 0; + do { + ret = _tty_writeNread(tty_fd, cmd, buf, buf_size, + mdelay+((i)*500)); + if (ret < 0) { + goto exit; + } + i++; + } while(strstr(buf, cmd) == NULL && i <= TTY_CMD_RETRY); + if (i > TTY_CMD_RETRY) { + ret = -ENOENT; + goto exit; + } + strncpy(resp, buf, max); +exit: + kfree(buf); + _tty_close(&tty_fd); + return ret; +} + +static void dev_attr_init(struct device_attribute *dev_attr, + const char *name, umode_t mode, + show_func show, store_func store) +{ + sysfs_attr_init(&dev_attr->attr); + dev_attr->attr.name = name; + dev_attr->attr.mode = mode; + dev_attr->show = show; + dev_attr->store = store; +} + +/*Allowcat sensor_device_attributes and adds them to a group.*/ +static int attributs_init(struct minipack_data *data) +{ + struct sensor_set *model = model_ssets; + char name[64] = {0}; + int start, pi, si, ai, num, ret, acc; + struct psensor *sensor; + struct sensor_device_attribute *sensor_dattr; + struct device_attribute *dev_attr; + + /*name*/ + sensor = devm_kzalloc(data->dev, sizeof(*sensor), GFP_KERNEL); + if (!sensor) + return -ENOENT; + sensor_dattr = &sensor->sensor_dev_attr; + dev_attr = &sensor_dattr->dev_attr; + snprintf(sensor->name, sizeof(sensor->name), "name"); + dev_attr_init(dev_attr, sensor->name, S_IRUGO, show_name, NULL); + sensor_dattr->index = INDEX_NAME; + ret = add_attr2group(data, &dev_attr->attr); + if (ret) + return ret; + + /*types*/ + for (si = 0; si < SENSOR_TYPE_MAX; si++) { + struct sensor_set *ss = model+si; + num = ss->total; + start = ss->start_index; + acc = start; + for (pi = 0; ss->ptn[pi]; pi++) + { + char *prefix, *postfix; + struct attr_pattern *ptn = ss->ptn[pi]; + prefix = ptn->prefix; + postfix = ptn->postfix; + for (ai = 0; ai < ptn->count ; ai++) { + u32 ptn_index = ai + ptn->index_addon + 1 ; + snprintf(name, sizeof(name), "%s%d%s",prefix, ptn_index, postfix); + sensor = devm_kzalloc(data->dev, sizeof(*sensor), GFP_KERNEL); + if (!sensor) + return -ENOENT; + + sensor_dattr = &sensor->sensor_dev_attr; + dev_attr = &sensor_dattr->dev_attr; + snprintf(sensor->name, sizeof(sensor->name), name); + dev_attr_init(dev_attr, sensor->name, ptn->mode, + ptn->show, ptn->store); + sensor_dattr->index = acc + ai; + + DEBUG_INTR("%s-%d, name:%s index:%d\n", __func__, __LINE__, + name, sensor_dattr->index); + ret = add_attr2group(data, &dev_attr->attr); + if (ret) + return ret; + } + acc += ptn->count; + } + } + + return 0 ; +} + +static void mp_data_init(struct minipack_data *data) +{ + +} + +static int extract_numbers(char *buf, int *out, int out_cnt) +{ + char *ptr; + int cnt, x; + + ptr = buf; + DEBUG_LEX("%s-%d, out_cnt (%d)\n", __func__, __LINE__, out_cnt); + /*replace non-digits into '|', for sscanf(%s)'s ease to handle it.*/ + for (x = 0; x < strlen(ptr); x++) { + if( (ptr[x]<'0' || ptr[x] >'9') && ptr[x] != '-') + ptr[x] = TTY_RESP_SEPARATOR; + } + + DEBUG_LEX("%s-%d, (%lu) resp:%s\n", __func__, __LINE__, strlen(ptr), ptr); + cnt = 0; + while (strchr(ptr, TTY_RESP_SEPARATOR)) + { + if (sscanf(ptr,"%d%s",out,ptr)) { + DEBUG_LEX("%s-%d, %d @(%d)\n", __func__, __LINE__, *(out), cnt); + cnt++; + out++; + if (cnt == out_cnt) { + return 0; + } + } else { + ptr++; + } + } + + return -EINVAL; +} + +static int extract_2byteHex(char *buf, int *out, int out_cnt) +{ + char tmp[TTY_READ_MAX_LEN]; + char *ptr; + int cnt, x; + long y; + + + if (strstr(buf, "XXXX") != NULL) { + return -ENODEV; + } + + ptr = buf; + /*replace non-hex into '|', for sscanf(%s)'s ease to handle it.*/ + for (x = 0; x < strlen(ptr); x++) { + if((ptr[x]>='0' && ptr[x] <= '9') || (ptr[x] >= 'a' && ptr[x] <= 'f')) + ; + else + ptr[x] = TTY_RESP_SEPARATOR; + } + + DEBUG_LEX("%s-%d, (%lu) resp:%s\n", __func__, __LINE__, strlen(ptr), ptr); + cnt = 0; + while (strchr(ptr, TTY_RESP_SEPARATOR)) + { + ptr++; + if (strlen(ptr) && *ptr == TTY_RESP_SEPARATOR) { + continue; + } + DEBUG_LEX("%s-%d, (%lu) :%s\n", __func__, __LINE__, strlen(ptr), ptr); + if (sscanf(ptr,"%4s",tmp)) { + if(!strchr(tmp, TTY_RESP_SEPARATOR)) { + DEBUG_LEX("%s-%d, %s @(%d)\n", __func__, __LINE__, tmp, cnt); + if (kstrtol(tmp, 16, &y) < 0) + return -EINVAL; + *out = (int)y; + cnt++; + out++; + if (cnt == out_cnt) { + return 0; + } + ptr += 4; + } + } else { + break; + } + } + + return -EINVAL; +} + +int pmbus_linear11(int in, bool power) { + int exponent; + int mantissa, val; + int data = in; + + exponent = ((short)data) >> 11; + mantissa = ((short)((data & 0x7ff) << 5)) >> 5; + + val = mantissa*1000; + if (power) + val *= 1000; + if (exponent >= 0) + val <<= exponent; + else + val >>= -exponent; + + return val; +} + +static int get_pmbus_regs_partial(int *in, int in_cnt, int *out, int *out_cnt) +{ + int i, j, k; + k = 0; + for (j = 0; j < ARRAY_SIZE(pmbus_regs); j++) { + for (i = 0; i < in_cnt; i++) { + if (i == (pmbus_regs[j].addr - PMBUS_REG_START)) { + *out = pmbus_linear11(in[i], pmbus_regs[j].power); + out++; + k++; + break; + } + } + } + if (k == 0) + return -EINVAL; + + *out_cnt = k; + return 0; +} + + +static int comm2BMC(enum sensor_type_e type, int *out, int out_cnt) +{ + char cmd[TTY_CMD_MAX_LEN], resp[TTY_READ_MAX_LEN]; + char *ptr; + int ret; + + if (out == NULL) + return -EINVAL; + if (out_cnt == 0) + return 0; + + snprintf(cmd, sizeof(cmd), model_ssets[type].query); + DEBUG_INTR("%s-%d, cmd:%s\n", __func__, __LINE__, cmd); + ret = bmc_transaction(cmd, resp, sizeof(resp)-1, model_ssets[type].mdelay); + if (ret < 0) { + return ret; + } + /*Strip off string of command just sent, if any.*/ + if (strstr(resp, cmd) != NULL) { + ptr = resp + strlen(cmd); + } else { + ptr = resp; + } + + switch (type) { + case SENSOR_TYPE_THERMAL: + case SENSOR_TYPE_FAN_RPM: + case SENSOR_TYPE_FAN_RPM_DN: + ret = extract_numbers(ptr, out, out_cnt); + break; + case SENSOR_TYPE_PSU1: + case SENSOR_TYPE_PSU2: + case SENSOR_TYPE_PSU3: + case SENSOR_TYPE_PSU4: + { + int reg[(PMBUS_REG_END - PMBUS_REG_START) +1]; + int total = (PMBUS_REG_END - PMBUS_REG_START) +1; + ret = extract_2byteHex(ptr, reg, total); + if(ret == 0) + get_pmbus_regs_partial(reg, total, out, &out_cnt); + break; + } + default: + return -EINVAL; + } + + return ret; +} + +static int get_type_data ( + struct sensor_data *data, enum sensor_type_e type, int index, + int **out, int *count) +{ + struct sensor_set *model = model_ssets; + + switch (type) { + case SENSOR_TYPE_THERMAL: + *out = &data->lm75_input[index]; + break; + case SENSOR_TYPE_FAN_RPM: + *out = &data->fan_rpm[index]; + break; + case SENSOR_TYPE_FAN_RPM_DN: + *out = &data->fan_rpm_dn[index]; + break; + case SENSOR_TYPE_PSU1: + case SENSOR_TYPE_PSU2: + case SENSOR_TYPE_PSU3: + case SENSOR_TYPE_PSU4: + *out = &data->psu_data[type-SENSOR_TYPE_PSU1][index]; + break; + default: + return -EINVAL; + } + *count = model[type].total; + return 0; +} + +static struct sensor_data* +update_data(struct device *dev, enum sensor_type_e type) { + struct minipack_data *data = mp_data; + bool *valid = &data->valid[type]; + unsigned long *last_updated = &data->last_updated[type]; + struct sensor_data* ret = NULL; + int *data_ptr = NULL; + int data_cnt, rc; + + mutex_lock(&data->update_lock); + if (time_after(jiffies, (*last_updated) + SENSOR_DATA_UPDATE_INTERVAL) + || !(*valid)) + { + rc = get_type_data(&data->sdata, type, 0, &data_ptr, &data_cnt); + if (rc < 0) + goto exit_err; + + DEBUG_INTR("%s-%d, type:%d cnt:%d\n", __func__, __LINE__, type, data_cnt); + rc = comm2BMC(type, data_ptr, data_cnt); + if (rc < 0) { + /*Clear data if failed.*/ + if (data_ptr != NULL) + memset(data_ptr, 0, sizeof(*data_ptr)*data_cnt); + /*Make it valid if no such device, to avoid frequenctly access.*/ + if (rc == -ENODEV) { + *valid = 1; + } else { + *valid = 0; + } + } else { + *valid = 1; + } + *last_updated = jiffies; + } + ret = &data->sdata; +exit_err: + mutex_unlock(&data->update_lock); + return ret; +} + +static ssize_t show_name(struct device *dev, struct device_attribute *da, + char *buf) +{ + return sprintf(buf, "%s\n", DRVNAME); +} + +static ssize_t _attr_show(struct device *dev, struct device_attribute *da, + char *buf) +{ + int index, count, rc; + struct sensor_device_attribute *attr = to_sensor_dev_attr(da); + struct sensor_data* data; + int *out = NULL; + enum sensor_type_e type; + + type = attr->index / ATTR_TYPE_INDEX_GAP; + + DEBUG_INTR("%s-%d, type:%d index:%d\n", __func__, __LINE__, type, attr->index); + data = update_data(dev, type); + if (data == NULL) + return -EINVAL; + + index = attr->index % ATTR_TYPE_INDEX_GAP; + rc = get_type_data(data, type, index, &out, &count); + if (rc < 0 || out == NULL) + return -EINVAL; + + if( index > count) + return -EINVAL; + + return sprintf(buf, "%d\n", *out); +} + +static ssize_t show_fan_min(struct device *dev, struct device_attribute *da, + char *buf) +{ + return sprintf(buf, "%d\n", MIN_FAN_RPM); +} + +static ssize_t show_psu_vout_max(struct device *dev, struct device_attribute *da, + char *buf) +{ + return sprintf(buf, "%d\n", MAX_PSU_VOUT); +} + +static ssize_t show_psu_vout_min(struct device *dev, struct device_attribute *da, + char *buf) +{ + return sprintf(buf, "%d\n", MIN_PSU_VOUT); +} + +static int add_attr2group(struct minipack_data *data, struct attribute *attr) +{ + int new_max_attrs = ++data->num_attributes + ATTR_ALLOC_EXTRA; + void *new_attrs = krealloc(data->group.attrs, + new_max_attrs * sizeof(void *), + GFP_KERNEL); + DEBUG_INTR("%s-%d, num_attr:%d\n", __func__, __LINE__, new_max_attrs); + if (!new_attrs) + return -ENOMEM; + data->group.attrs = new_attrs; + + + data->group.attrs[data->num_attributes-1] = attr; + data->group.attrs[data->num_attributes] = NULL; + + return 0; +} + +static int minipack_probe(struct platform_device *pdev) +{ + int status = -1; + + mp_data->dev = &pdev->dev; + status = attributs_init(mp_data); + DEBUG_INTR("%s-%d, status:%d\n", __func__, __LINE__, status); + if (status) { + goto exit; + } + + /* Register sysfs hooks */ + status = sysfs_create_group(&pdev->dev.kobj, &mp_data->group); + DEBUG_INTR("%s-%d, status:%d\n", __func__, __LINE__, status); + + if (status) { + goto exit_kfree; + } + + mp_data->hwmon_dev = hwmon_device_register(&pdev->dev); + if (IS_ERR(mp_data->hwmon_dev)) { + status = PTR_ERR(mp_data->hwmon_dev); + goto exit_remove; + } + dev_info(&pdev->dev, "minipack sensors found\n"); + return 0; + +exit_remove: + sysfs_remove_group(&pdev->dev.kobj, &mp_data->group); +exit_kfree: + kfree(mp_data->group.attrs); +exit: + return status; +} + +static int minipack_remove(struct platform_device *pdev) +{ + hwmon_device_unregister(mp_data->hwmon_dev); + sysfs_remove_group(&pdev->dev.kobj, &mp_data->group); + kfree(mp_data->group.attrs); + return 0; +} + +static struct platform_driver minipack_driver = { + .probe = minipack_probe, + .remove = minipack_remove, + .driver = { + .name = DRVNAME, + .owner = THIS_MODULE, + }, +}; + + +static int __init minipack_init(void) +{ + int ret; + + ret = platform_driver_register(&minipack_driver); + if (ret < 0) { + goto exit; + } + mp_data = kzalloc(sizeof(struct minipack_data), GFP_KERNEL); + if (!mp_data) { + ret = -ENOMEM; + platform_driver_unregister(&minipack_driver); + goto exit; + } + mutex_init(&mp_data->update_lock); + mp_data_init(mp_data); + + mp_data->pdev = platform_device_register_simple(DRVNAME, -1, NULL, 0); + if (IS_ERR(mp_data->pdev)) { + ret = PTR_ERR(mp_data->pdev); + platform_driver_unregister(&minipack_driver); + kfree(mp_data); + goto exit; + } +exit: + return ret; +} + +static void __exit minipack_exit(void) +{ + if (!mp_data) { + return; + } + platform_device_unregister(mp_data->pdev); + platform_driver_unregister(&minipack_driver); + kfree(mp_data); +} + +module_init(minipack_init); +module_exit(minipack_exit); + +MODULE_AUTHOR("Roy Lee "); +MODULE_DESCRIPTION("Minipack platform sensors driver"); +MODULE_LICENSE("GPL"); diff --git a/platform/broadcom/sonic-platform-modules-accton/minipack/service/minipack-platform-init.service b/platform/broadcom/sonic-platform-modules-accton/minipack/service/minipack-platform-init.service new file mode 100644 index 000000000000..50e62cfdc142 --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-accton/minipack/service/minipack-platform-init.service @@ -0,0 +1,16 @@ +[Unit] +Description=Accton MiniPack Platform Monitoring service +Before=pmon.service +After=sysinit.target +DefaultDependencies=no + +[Service] +ExecStartPre=/usr/local/bin/accton_minipack_util.py install +KillSignal=SIGKILL +SuccessExitStatus=SIGKILL + +# Resource Limitations +LimitCORE=infinity + +[Install] +WantedBy=multi-user.target diff --git a/platform/broadcom/sonic-platform-modules-accton/minipack/setup.py b/platform/broadcom/sonic-platform-modules-accton/minipack/setup.py new file mode 100644 index 000000000000..aca53ea12798 --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-accton/minipack/setup.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python + +import os +import sys +from setuptools import setup +os.listdir + +setup( + name='minipack', + version='1.0', + description='Module to initialize Accton MiniPack platforms', + + packages=['minipack'], + package_dir={'minipack': 'minipack/classes'}, +) + diff --git a/platform/broadcom/sonic-platform-modules-accton/minipack/utils/README b/platform/broadcom/sonic-platform-modules-accton/minipack/utils/README new file mode 100644 index 000000000000..bb52538deb3b --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-accton/minipack/utils/README @@ -0,0 +1,48 @@ +Copyright (C) 2019 Accton Networks, Inc. + +This program is free software: you can redistribute it and/or modify +It under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +Contents of this package: + module - Contains source code of kernel driver modules. + util - operational scripts. + +Sonic creates a docker container and run building process under it. +If user tries to built new drivers, please get into that docker and +dpkg-buildpackage for them. + +All Linux kernel code is licensed under the GPLv1. All other code is +licensed under the GPLv3. Please see the LICENSE file for copies of +both licenses. + +==================================================================== +The most of peripherals are accessed through BMC. +Only system eeprom and QSFP are directly accessed by CPU. + +System LED: + There are 2 system LEDs at the upper-left corner of front panel. + +Fan Control: + There are 16 fans inside 8 fan modules. + +Thermal sensers: + 8 temperature sensors are controlled by the lm75 kernel modules. + +PSUs: + There r42 power supplies slot at the back. + Once if a PSU is not plugged, the data of it is shown all 0's. + +There are 128 QSFP modules are equipped. +Before operating on PSU and QSFP+, please make sure it is well plugged. +Otherwise, operation is going to fail. + diff --git a/platform/broadcom/sonic-platform-modules-accton/minipack/utils/accton_bmc_query.py b/platform/broadcom/sonic-platform-modules-accton/minipack/utils/accton_bmc_query.py new file mode 100755 index 000000000000..a77841857e6c --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-accton/minipack/utils/accton_bmc_query.py @@ -0,0 +1,627 @@ +#!/usr/bin/env python +# +# Copyright (C) 2016 Accton Networks, Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Description: +# Due to adoption of optoe drivers, sideband signals of SFPs are moved +# into cpld drivers. Add a new dict, cpld_of_module, for mapping this +# attributes to corresponding cpld nodes. +# + + +""" +Usage: %(scriptName)s [options] command object + +options: + -h | --help : this help message + -d | --debug : run with debug mode + -f | --force : ignore error during installation or clean +command: + install : install drivers and generate related sysfs nodes + clean : uninstall drivers and remove related sysfs nodes + show : show all systen status + sff : dump SFP eeprom + set : change board setting with fan|led|sfp +""" + +import os +import commands +import sys, getopt +import logging +import re +import time +from collections import namedtuple + +PROJECT_NAME = 'as6712_32x' +version = '0.2.0' +verbose = False +DEBUG = False +args = [] +ALL_DEVICE = {} +DEVICE_NO = {'led':5, 'fan1':1, 'fan2':1,'fan3':1,'fan4':1,'fan5':1,'thermal':4, 'psu':2, 'sfp':32} + + +led_prefix ='/sys/devices/platform/as6712_32x_led/leds/accton_'+PROJECT_NAME+'_led::' +fan_prefix ='/sys/devices/platform/as6712_32x_' +hwmon_types = {'led': ['diag','fan','loc','psu1','psu2'], + 'fan1': ['fan'], + 'fan2': ['fan'], + 'fan3': ['fan'], + 'fan4': ['fan'], + 'fan5': ['fan'], + } +hwmon_nodes = {'led': ['brightness'] , + 'fan1': ['fan1_duty_cycle_percentage', 'fan1_fault', 'fan1_speed_rpm', 'fan1_direction', 'fanr1_fault', 'fanr1_speed_rpm'], + 'fan2': ['fan2_duty_cycle_percentage','fan2_fault', 'fan2_speed_rpm', 'fan2_direction', 'fanr2_fault', 'fanr2_speed_rpm'], + 'fan3': ['fan3_duty_cycle_percentage','fan3_fault', 'fan3_speed_rpm', 'fan3_direction', 'fanr3_fault', 'fanr3_speed_rpm'], + 'fan4': ['fan4_duty_cycle_percentage','fan4_fault', 'fan4_speed_rpm', 'fan4_direction', 'fanr4_fault', 'fanr4_speed_rpm'], + 'fan5': ['fan5_duty_cycle_percentage','fan5_fault', 'fan5_speed_rpm', 'fan5_direction', 'fanr5_fault', 'fanr5_speed_rpm'], + } +hwmon_prefix ={'led': led_prefix, + 'fan1': fan_prefix, + 'fan2': fan_prefix, + 'fan3': fan_prefix, + 'fan4': fan_prefix, + 'fan5': fan_prefix, + } + +i2c_prefix = '/sys/bus/i2c/devices/' +i2c_bus = {'thermal': ['38-0048','39-0049', '40-004a', '41-004b'] , + 'psu': ['35-0038','36-003b'], + 'sfp': ['-0050']} +i2c_nodes = { + 'thermal': ['hwmon/hwmon*/temp1_input'] , + 'psu': ['psu_present ', 'psu_power_good'] , + 'sfp': ['module_present_', 'sfp_tx_disable']} + +sfp_map = [ 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33 + ] + +#For sideband signals of SFP/QSFP modules. +bus_of_cpld = [0, 1] +cpld_of_module = {'-0062': list(range(0,16)), + '-0064': list(range(16,32)) } + + +mknod =[ +'echo as6712_32x_cpld1 0x60 > /sys/bus/i2c/devices/i2c-0/new_device', +'echo as6712_32x_cpld2 0x62 > /sys/bus/i2c/devices/i2c-0/new_device', +'echo as6712_32x_cpld3 0x64 > /sys/bus/i2c/devices/i2c-0/new_device', +'echo pca9548 0x70 > /sys/bus/i2c/devices/i2c-1/new_device', +'echo 24c02 0x57 > /sys/bus/i2c/devices/i2c-1/new_device', + +# PSU-1 +'echo as6712_32x_psu1 0x38 > /sys/bus/i2c/devices/i2c-35/new_device', +'echo cpr_4011_4mxx 0x3c > /sys/bus/i2c/devices/i2c-35/new_device', +#'echo as6712_32x_psu1 0x50 > /sys/bus/i2c/devices/i2c-35/new_device', +#'echo ym2401 0x58 > /sys/bus/i2c/devices/i2c-35/new_device', + +# PSU-2 +'echo as6712_32x_psu2 0x3b > /sys/bus/i2c/devices/i2c-36/new_device', +'echo cpr_4011_4mxx 0x3f > /sys/bus/i2c/devices/i2c-36/new_device', +#'echo as6712_32x_psu2 0x53 > /sys/bus/i2c/devices/i2c-36/new_device', +#'echo ym2401 0x5b > /sys/bus/i2c/devices/i2c-36/new_device', + +'echo lm75 0x48 > /sys/bus/i2c/devices/i2c-38/new_device', +'echo lm75 0x49 > /sys/bus/i2c/devices/i2c-39/new_device', +'echo lm75 0x4a > /sys/bus/i2c/devices/i2c-40/new_device', +'echo lm75 0x4b > /sys/bus/i2c/devices/i2c-41/new_device', +] + +mknod2 =[ +'echo as6712_32x_cpld1 0x60 > /sys/bus/i2c/devices/i2c-1/new_device', +'echo as6712_32x_cpld2 0x62 > /sys/bus/i2c/devices/i2c-1/new_device', +'echo as6712_32x_cpld3 0x64 > /sys/bus/i2c/devices/i2c-1/new_device', +'echo pca9548 0x70 > /sys/bus/i2c/devices/i2c-0/new_device', +'echo 24c02 0x57 > /sys/bus/i2c/devices/i2c-0/new_device', + +# PSU-1 +'echo as6712_32x_psu1 0x38 > /sys/bus/i2c/devices/i2c-35/new_device', +'echo cpr_4011_4mxx 0x3c > /sys/bus/i2c/devices/i2c-35/new_device', +#'echo as6712_32x_psu1 0x50 > /sys/bus/i2c/devices/i2c-35/new_device', +#'echo ym2401 0x58 > /sys/bus/i2c/devices/i2c-35/new_device', + +# PSU-2 +'echo as6712_32x_psu2 0x3b > /sys/bus/i2c/devices/i2c-36/new_device', +'echo cpr_4011_4mxx 0x3f > /sys/bus/i2c/devices/i2c-36/new_device', +#'echo as6712_32x_psu2 0x53 > /sys/bus/i2c/devices/i2c-36/new_device', +#'echo ym2401 0x5b > /sys/bus/i2c/devices/i2c-36/new_device', + +'echo lm75 0x48 > /sys/bus/i2c/devices/i2c-38/new_device', +'echo lm75 0x49 > /sys/bus/i2c/devices/i2c-39/new_device', +'echo lm75 0x4a > /sys/bus/i2c/devices/i2c-40/new_device', +'echo lm75 0x4b > /sys/bus/i2c/devices/i2c-41/new_device', +] + +FORCE = 0 + + + +if DEBUG == True: + print sys.argv[0] + print 'ARGV :', sys.argv[1:] + + +def main(): + global DEBUG + global args + global FORCE + + if len(sys.argv)<2: + show_help() + + options, args = getopt.getopt(sys.argv[1:], 'hdf', ['help', + 'debug', + 'force', + ]) + if DEBUG == True: + print options + print args + print len(sys.argv) + + for opt, arg in options: + if opt in ('-h', '--help'): + show_help() + elif opt in ('-d', '--debug'): + DEBUG = True + logging.basicConfig(filename= PROJECT_NAME+'.log', filemode='w',level=logging.DEBUG) + logging.basicConfig(level=logging.INFO) + elif opt in ('-f', '--force'): + FORCE = 1 + else: + logging.info('no option') + for arg in args: + if arg == 'install': + do_install() + elif arg == 'clean': + do_uninstall() + elif arg == 'show': + device_traversal() + elif arg == 'sff': + if len(args)!=2: + show_eeprom_help() + elif int(args[1]) ==0 or int(args[1]) > DEVICE_NO['sfp']: + show_eeprom_help() + else: + show_eeprom(args[1]) + return + elif arg == 'set': + if len(args)<3: + show_set_help() + else: + set_device(args[1:]) + return + else: + show_help() + + + return 0 + +def show_help(): + print __doc__ % {'scriptName' : sys.argv[0].split("/")[-1]} + sys.exit(0) + +def show_set_help(): + cmd = sys.argv[0].split("/")[-1]+ " " + args[0] + print cmd +" [led|sfp|fan]" + print " use \""+ cmd + " led 0-4 \" to set led color" + print " use \""+ cmd + " fan 0-100\" to set fan duty percetage" + print " use \""+ cmd + " sfp 1-32 {0|1}\" to set sfp# tx_disable" + sys.exit(0) + +def show_eeprom_help(): + cmd = sys.argv[0].split("/")[-1]+ " " + args[0] + print " use \""+ cmd + " 1-54 \" to dump sfp# eeprom" + sys.exit(0) + +def my_log(txt): + if DEBUG == True: + print "[ACCTON DBG]: "+txt + return + +def log_os_system(cmd, show): + logging.info('Run :'+cmd) + status = 1 + output = "" + status, output = commands.getstatusoutput(cmd) + my_log (cmd +"with result:" + str(status)) + my_log ("cmd:" + cmd) + my_log (" output:"+output) + if status: + logging.info('Failed :'+cmd) + if show: + print('Failed :'+cmd) + return status, output + +def driver_inserted(): + ret, lsmod = log_os_system("lsmod| grep accton", 0) + logging.info('mods:'+lsmod) + if len(lsmod) ==0: + return False + + + +kos = [ +'depmod -ae', +'modprobe i2c_dev', +'modprobe i2c_mux_pca954x', +'modprobe optoe', +'modprobe accton_as6712_32x_cpld', +'modprobe cpr_4011_4mxx', +#'modprobe ym2651y', +'modprobe accton_as6712_32x_fan', +'modprobe leds-accton_as6712_32x', +'modprobe accton_as6712_32x_psu'] + +def driver_install(): + global FORCE + for i in range(0,len(kos)): + status, output = log_os_system(kos[i], 1) + if status: + if FORCE == 0: + return status + return 0 + +def driver_uninstall(): + global FORCE + for i in range(0,len(kos)): + rm = kos[-(i+1)].replace("modprobe", "modprobe -rq") + rm = rm.replace("insmod", "rmmod") + status, output = log_os_system(rm, 1) + if status: + if FORCE == 0: + return status + return 0 + +def cpld_bus_check(): + tmp = "i2cget -y -f 0 0x60" + status, output = log_os_system(tmp, 0) + if status: + return 1 + else: + return 0 + +def i2c_order_check(): + # i2c bus 0 and 1 might be installed in different order. + # Here check if 0x70 is exist @ i2c-0 + tmp = "echo pca9548 0x70 > /sys/bus/i2c/devices/i2c-1/new_device" + status, output = log_os_system(tmp, 0) + if not device_exist(): + order = 1 + else: + order = 0 + tmp = "echo 0x70 > /sys/bus/i2c/devices/i2c-1/delete_device" + status, output = log_os_system(tmp, 0) + return order + +def device_install(): + global FORCE + + order = i2c_order_check() + # if 0x76 is not exist @i2c-0, use reversed bus order + if order: + for i in range(0,len(mknod2)): + #for pca932x need times to built new i2c buses + if mknod2[i].find('pca954') != -1: + time.sleep(2) + + status, output = log_os_system(mknod2[i], 1) + if status: + print output + if FORCE == 0: + return status + else: + for i in range(0,len(mknod)): + #for pca932x need times to built new i2c buses + if mknod[i].find('pca954') != -1: + time.sleep(2) + + status, output = log_os_system(mknod[i], 1) + if status: + print output + if FORCE == 0: + return status + + for i in range(0,len(sfp_map)): + status, output =log_os_system("echo optoe1 0x50 > /sys/bus/i2c/devices/i2c-"+str(sfp_map[i])+"/new_device", 1) + if status: + print output + if FORCE == 0: + return status + status, output =log_os_system("echo port"+str(i)+" > /sys/bus/i2c/devices/"+str(sfp_map[i])+"-0050/port_name", 1) + if status: + print output + if FORCE == 0: + return status + + return + +def device_uninstall(): + global FORCE + + status, output =log_os_system("ls /sys/bus/i2c/devices/0-0070", 0) + if status==0: + I2C_ORDER=1 + else: + I2C_ORDER=0 + + for i in range(0,len(sfp_map)): + target = "/sys/bus/i2c/devices/i2c-"+str(sfp_map[i])+"/delete_device" + status, output =log_os_system("echo 0x50 > "+ target, 1) + if status: + print output + if FORCE == 0: + return status + + if I2C_ORDER==0: + nodelist = mknod + else: + nodelist = mknod2 + + for i in range(len(nodelist)): + target = nodelist[-(i+1)] + temp = target.split() + del temp[1] + temp[-1] = temp[-1].replace('new_device', 'delete_device') + status, output = log_os_system(" ".join(temp), 1) + if status: + print output + if FORCE == 0: + return status + + return + +def system_ready(): + if driver_inserted() == False: + return False + if not device_exist(): + return False + return True + +def do_install(): + print "Checking system...." + if driver_inserted() == False: + print "No driver, installing...." + status = driver_install() + if status: + if FORCE == 0: + return status + else: + print PROJECT_NAME.upper()+" drivers detected...." + if not device_exist(): + print "No device, installing...." + status = device_install() + if status: + if FORCE == 0: + return status + else: + print PROJECT_NAME.upper()+" devices detected...." + return + +def do_uninstall(): + print "Checking system...." + if not device_exist(): + print PROJECT_NAME.upper() +" has no device installed...." + else: + print "Removing device...." + status = device_uninstall() + if status: + if FORCE == 0: + return status + + if driver_inserted()== False : + print PROJECT_NAME.upper() +" has no driver installed...." + else: + print "Removing installed driver...." + status = driver_uninstall() + if status: + if FORCE == 0: + return status + + return + +def devices_info(): + global DEVICE_NO + global ALL_DEVICE + global i2c_bus, hwmon_types + for key in DEVICE_NO: + ALL_DEVICE[key]= {} + for i in range(0,DEVICE_NO[key]): + ALL_DEVICE[key][key+str(i+1)] = [] + + order = cpld_bus_check() + for key in i2c_bus: + buses = i2c_bus[key] + nodes = i2c_nodes[key] + for i in range(0,len(buses)): + for j in range(0,len(nodes)): + if 'fan' == key: + for k in range(0,DEVICE_NO[key]): + node = key+str(k+1) + path = i2c_prefix+ buses[i]+"/fan"+str(k+1)+"_"+ nodes[j] + my_log(node+": "+ path) + ALL_DEVICE[key][node].append(path) + elif 'sfp' == key: + for k in range(0,DEVICE_NO[key]): + for lk in cpld_of_module: + if k in cpld_of_module[lk]: + bus = bus_of_cpld[order] + node = key+str(k+1) + path = i2c_prefix + str(bus) + lk + "/"+ nodes[j] + str(k+1) + my_log(node+": "+ path) + ALL_DEVICE[key][node].append(path) + else: + node = key+str(i+1) + path = i2c_prefix+ buses[i]+"/"+ nodes[j] + my_log(node+": "+ path) + ALL_DEVICE[key][node].append(path) + + for key in hwmon_types: + itypes = hwmon_types[key] + nodes = hwmon_nodes[key] + for i in range(0,len(itypes)): + for j in range(0,len(nodes)): + node = key+"_"+itypes[i] + path = hwmon_prefix[key]+ itypes[i]+"/"+ nodes[j] + my_log(node+": "+ path) + ALL_DEVICE[key][ key+str(i+1)].append(path) + + #show dict all in the order + if DEBUG == True: + for i in sorted(ALL_DEVICE.keys()): + print(i+": ") + for j in sorted(ALL_DEVICE[i].keys()): + print(" "+j) + for k in (ALL_DEVICE[i][j]): + print(" "+" "+k) + return + +def show_eeprom(index): + if system_ready()==False: + print("System's not ready.") + print("Please install first!") + return + + if len(ALL_DEVICE)==0: + devices_info() + node = ALL_DEVICE['sfp'] ['sfp'+str(index)][0] + node = node.replace(node.split("/")[-1], 'eeprom') + # check if got hexdump command in current environment + ret, log = log_os_system("which hexdump", 0) + ret, log2 = log_os_system("which busybox hexdump", 0) + if len(log): + hex_cmd = 'hexdump' + elif len(log2): + hex_cmd = ' busybox hexdump' + else: + log = 'Failed : no hexdump cmd!!' + logging.info(log) + print log + return 1 + + print node + ":" + ret, log = log_os_system("cat "+node+"| "+hex_cmd+" -C", 1) + if ret==0: + print log + else: + print "**********device no found**********" + return + +def set_device(args): + global DEVICE_NO + global ALL_DEVICE + if system_ready()==False: + print("System's not ready.") + print("Please install first!") + return + + if len(ALL_DEVICE)==0: + devices_info() + + if args[0]=='led': + if int(args[1])>4: + show_set_help() + return + #print ALL_DEVICE['led'] + for i in range(0,len(ALL_DEVICE['led'])): + for k in (ALL_DEVICE['led']['led'+str(i+1)]): + ret, log = log_os_system("echo "+args[1]+" >"+k, 1) + if ret: + return ret + elif args[0]=='fan': + if int(args[1])>100: + show_set_help() + return + #print ALL_DEVICE['fan'] + #fan1~6 is all fine, all fan share same setting + node = ALL_DEVICE['fan1'] ['fan11'][0] + node = node.replace(node.split("/")[-1], 'fan1_duty_cycle_percentage') + ret, log = log_os_system("cat "+ node, 1) + if ret==0: + print ("Previous fan duty: " + log.strip() +"%") + ret, log = log_os_system("echo "+args[1]+" >"+node, 1) + if ret==0: + print ("Current fan duty: " + args[1] +"%") + return ret + elif args[0]=='sfp': + if int(args[1])> DEVICE_NO[args[0]] or int(args[1])==0: + show_set_help() + return + if len(args)<2: + show_set_help() + return + + if int(args[2])>1: + show_set_help() + return + + #print ALL_DEVICE[args[0]] + for i in range(0,len(ALL_DEVICE[args[0]])): + for j in ALL_DEVICE[args[0]][args[0]+str(args[1])]: + if j.find('tx_disable')!= -1: + ret, log = log_os_system("echo "+args[2]+" >"+ j, 1) + if ret: + return ret + + return + +#get digits inside a string. +#Ex: 31 for "sfp31" +def get_value(input): + digit = re.findall('\d+', input) + return int(digit[0]) + +def device_traversal(): + if system_ready()==False: + print("System's not ready.") + print("Please install first!") + return + + if len(ALL_DEVICE)==0: + devices_info() + for i in sorted(ALL_DEVICE.keys()): + print("============================================") + print(i.upper()+": ") + print("============================================") + + for j in sorted(ALL_DEVICE[i].keys(), key=get_value): + print " "+j+":", + for k in (ALL_DEVICE[i][j]): + ret, log = log_os_system("cat "+k, 0) + func = k.split("/")[-1].strip() + func = re.sub(j+'_','',func,1) + func = re.sub(i.lower()+'_','',func,1) + if ret==0: + print func+"="+log+" ", + else: + print func+"="+"X"+" ", + print + print("----------------------------------------------------------------") + + + print + return + +def device_exist(): + ret1, log = log_os_system("ls "+i2c_prefix+"*0070", 0) + ret2, log = log_os_system("ls "+i2c_prefix+"i2c-2", 0) + return not(ret1 or ret2) + +if __name__ == "__main__": + main() diff --git a/platform/broadcom/sonic-platform-modules-accton/minipack/utils/accton_minipack_util.py b/platform/broadcom/sonic-platform-modules-accton/minipack/utils/accton_minipack_util.py new file mode 100755 index 000000000000..c7bc0298d7d1 --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-accton/minipack/utils/accton_minipack_util.py @@ -0,0 +1,527 @@ +#!/usr/bin/env python +# +# Copyright (C) 2016 Accton Networks, Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Description: +# Due to adoption of optoe drivers, sideband signals of SFPs are moved +# into cpld drivers. Add a new dict, cpld_of_module, for mapping this +# attributes to corresponding cpld nodes. +# + + +""" +Usage: %(scriptName)s [options] command object + +options: + -h | --help : this help message + -d | --debug : run with debug mode + -f | --force : ignore error during installation or clean +command: + install : install drivers and generate related sysfs nodes + clean : uninstall drivers and remove related sysfs nodes + show : show all systen status + sff : dump SFP eeprom + set : change board setting with fan|led|sfp +""" + +import os +import commands +import sys, getopt +import logging +import re +import time +from collections import namedtuple + +PROJECT_NAME = 'minipack' +version = '0.2.0' +verbose = False +DEBUG = False +args = [] +ALL_DEVICE = {} +DEVICE_NO = {'led':5, 'fan1':1, 'fan2':1,'fan3':1,'fan4':1,'fan5':1,'thermal':4, 'psu':2, 'sfp':32} + + +led_prefix ='' +fan_prefix ='' +hwmon_types = {'led': ['diag','fan','loc','psu1','psu2'], + 'fan1': ['fan'], + 'fan2': ['fan'], + 'fan3': ['fan'], + 'fan4': ['fan'], + 'fan5': ['fan'], + } +hwmon_nodes = {'led': ['brightness'] , + 'fan1': ['fan1_duty_cycle_percentage', 'fan1_fault', 'fan1_speed_rpm', 'fan1_direction', 'fanr1_fault', 'fanr1_speed_rpm'], + 'fan2': ['fan2_duty_cycle_percentage','fan2_fault', 'fan2_speed_rpm', 'fan2_direction', 'fanr2_fault', 'fanr2_speed_rpm'], + 'fan3': ['fan3_duty_cycle_percentage','fan3_fault', 'fan3_speed_rpm', 'fan3_direction', 'fanr3_fault', 'fanr3_speed_rpm'], + 'fan4': ['fan4_duty_cycle_percentage','fan4_fault', 'fan4_speed_rpm', 'fan4_direction', 'fanr4_fault', 'fanr4_speed_rpm'], + 'fan5': ['fan5_duty_cycle_percentage','fan5_fault', 'fan5_speed_rpm', 'fan5_direction', 'fanr5_fault', 'fanr5_speed_rpm'], + } +hwmon_prefix ={'led': led_prefix, + 'fan1': fan_prefix, + 'fan2': fan_prefix, + 'fan3': fan_prefix, + 'fan4': fan_prefix, + 'fan5': fan_prefix, + } + +i2c_prefix = '/sys/bus/i2c/devices/' +i2c_bus = {'thermal': ['38-0048','39-0049', '40-004a', '41-004b'] , + 'psu': ['35-0038','36-003b'], + 'sfp': ['-0050']} +i2c_nodes = { + 'thermal': ['hwmon/hwmon*/temp1_input'] , + 'psu': ['psu_present ', 'psu_power_good'] , + 'sfp': ['module_present_', 'sfp_tx_disable']} + +sfp_map = [ 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33 + ] + +#For sideband signals of SFP/QSFP modules. +cpld_of_module = {'-0062': list(range(0,16)), + '-0064': list(range(16,32)) } + + +mknod =[ +'echo pca9548 0x77 > /sys/bus/i2c/devices/i2c-1/new_device', +'echo 24c02 0x57 > /sys/bus/i2c/devices/i2c-1/new_device', +] + +FORCE = 0 + + + +if DEBUG == True: + print sys.argv[0] + print 'ARGV :', sys.argv[1:] + + +def main(): + global DEBUG + global args + global FORCE + + if len(sys.argv)<2: + show_help() + + options, args = getopt.getopt(sys.argv[1:], 'hdf', ['help', + 'debug', + 'force', + ]) + if DEBUG == True: + print options + print args + print len(sys.argv) + + for opt, arg in options: + if opt in ('-h', '--help'): + show_help() + elif opt in ('-d', '--debug'): + DEBUG = True + logging.basicConfig(filename= PROJECT_NAME+'.log', filemode='w',level=logging.DEBUG) + logging.basicConfig(level=logging.INFO) + elif opt in ('-f', '--force'): + FORCE = 1 + else: + logging.info('no option') + for arg in args: + if arg == 'install': + do_install() + elif arg == 'clean': + do_uninstall() + elif arg == 'show': + device_traversal() + elif arg == 'sff': + if len(args)!=2: + show_eeprom_help() + elif int(args[1]) ==0 or int(args[1]) > DEVICE_NO['sfp']: + show_eeprom_help() + else: + show_eeprom(args[1]) + return + elif arg == 'set': + if len(args)<3: + show_set_help() + else: + set_device(args[1:]) + return + else: + show_help() + + + return 0 + +def show_help(): + print __doc__ % {'scriptName' : sys.argv[0].split("/")[-1]} + sys.exit(0) + +def show_set_help(): + cmd = sys.argv[0].split("/")[-1]+ " " + args[0] + print cmd +" [led|sfp|fan]" + print " use \""+ cmd + " led 0-4 \" to set led color" + print " use \""+ cmd + " fan 0-100\" to set fan duty percetage" + print " use \""+ cmd + " sfp 1-32 {0|1}\" to set sfp# tx_disable" + sys.exit(0) + +def show_eeprom_help(): + cmd = sys.argv[0].split("/")[-1]+ " " + args[0] + print " use \""+ cmd + " 1-54 \" to dump sfp# eeprom" + sys.exit(0) + +def my_log(txt): + if DEBUG == True: + print "[ACCTON DBG]: "+txt + return + +def log_os_system(cmd, show): + logging.info('Run :'+cmd) + status = 1 + output = "" + status, output = commands.getstatusoutput(cmd) + my_log (cmd +"with result:" + str(status)) + my_log ("cmd:" + cmd) + my_log (" output:"+output) + if status: + logging.info('Failed :'+cmd) + if show: + print('Failed :'+cmd) + return status, output + +def driver_inserted(): + ret, lsmod = log_os_system("lsmod| grep accton", 0) + logging.info('mods:'+lsmod) + if len(lsmod) ==0: + return False + + + +kos = [ +'depmod -ae', +'modprobe i2c_dev', +'modprobe i2c_mux_pca954x', +'modprobe optoe', +'modprobe minipack_psensor'] + +def driver_install(): + global FORCE + for i in range(0,len(kos)): + status, output = log_os_system(kos[i], 1) + if status: + if FORCE == 0: + return status + return 0 + +def driver_uninstall(): + global FORCE + for i in range(0,len(kos)): + rm = kos[-(i+1)].replace("modprobe", "modprobe -rq") + rm = rm.replace("insmod", "rmmod") + status, output = log_os_system(rm, 1) + if status: + if FORCE == 0: + return status + return 0 + +def device_install(): + global FORCE + for i in range(0,len(mknod)): + #for pca932x need times to built new i2c buses + if mknod[i].find('pca954') != -1: + time.sleep(2) + + status, output = log_os_system(mknod[i], 1) + if status: + print output + if FORCE == 0: + return status + + for i in range(0,len(sfp_map)): + status, output =log_os_system("echo optoe1 0x50 > /sys/bus/i2c/devices/i2c-"+str(sfp_map[i])+"/new_device", 1) + if status: + print output + if FORCE == 0: + return status + status, output =log_os_system("echo port"+str(i)+" > /sys/bus/i2c/devices/"+str(sfp_map[i])+"-0050/port_name", 1) + if status: + print output + if FORCE == 0: + return status + + return + +def device_uninstall(): + global FORCE + + for i in range(0,len(sfp_map)): + target = "/sys/bus/i2c/devices/i2c-"+str(sfp_map[i])+"/delete_device" + status, output =log_os_system("echo 0x50 > "+ target, 1) + if status: + print output + if FORCE == 0: + return status + + nodelist = mknod + for i in range(len(nodelist)): + target = nodelist[-(i+1)] + temp = target.split() + del temp[1] + temp[-1] = temp[-1].replace('new_device', 'delete_device') + status, output = log_os_system(" ".join(temp), 1) + if status: + print output + if FORCE == 0: + return status + + return + +def system_ready(): + if driver_inserted() == False: + return False + if not device_exist(): + return False + return True + +def do_install(): + print "Checking system...." + if driver_inserted() == False: + print "No driver, installing...." + status = driver_install() + if status: + if FORCE == 0: + return status + else: + print PROJECT_NAME.upper()+" drivers detected...." + if not device_exist(): + print "No device, installing...." + status = device_install() + if status: + if FORCE == 0: + return status + else: + print PROJECT_NAME.upper()+" devices detected...." + return + +def do_uninstall(): + print "Checking system...." + if not device_exist(): + print PROJECT_NAME.upper() +" has no device installed...." + else: + print "Removing device...." + status = device_uninstall() + if status: + if FORCE == 0: + return status + + if driver_inserted()== False : + print PROJECT_NAME.upper() +" has no driver installed...." + else: + print "Removing installed driver...." + status = driver_uninstall() + if status: + if FORCE == 0: + return status + + return + +def devices_info(): + global DEVICE_NO + global ALL_DEVICE + global i2c_bus, hwmon_types + for key in DEVICE_NO: + ALL_DEVICE[key]= {} + for i in range(0,DEVICE_NO[key]): + ALL_DEVICE[key][key+str(i+1)] = [] + + for key in i2c_bus: + buses = i2c_bus[key] + nodes = i2c_nodes[key] + for i in range(0,len(buses)): + for j in range(0,len(nodes)): + if 'fan' == key: + for k in range(0,DEVICE_NO[key]): + node = key+str(k+1) + path = i2c_prefix+ buses[i]+"/fan"+str(k+1)+"_"+ nodes[j] + my_log(node+": "+ path) + ALL_DEVICE[key][node].append(path) + elif 'sfp' == key: + for k in range(0,DEVICE_NO[key]): + bus = 1 + node = key+str(k+1) + path = i2c_prefix + str(bus) + lk + "/"+ nodes[j] + str(k+1) + my_log(node+": "+ path) + ALL_DEVICE[key][node].append(path) + else: + node = key+str(i+1) + path = i2c_prefix+ buses[i]+"/"+ nodes[j] + my_log(node+": "+ path) + ALL_DEVICE[key][node].append(path) + + for key in hwmon_types: + itypes = hwmon_types[key] + nodes = hwmon_nodes[key] + for i in range(0,len(itypes)): + for j in range(0,len(nodes)): + node = key+"_"+itypes[i] + path = hwmon_prefix[key]+ itypes[i]+"/"+ nodes[j] + my_log(node+": "+ path) + ALL_DEVICE[key][ key+str(i+1)].append(path) + + #show dict all in the order + if DEBUG == True: + for i in sorted(ALL_DEVICE.keys()): + print(i+": ") + for j in sorted(ALL_DEVICE[i].keys()): + print(" "+j) + for k in (ALL_DEVICE[i][j]): + print(" "+" "+k) + return + +def show_eeprom(index): + if system_ready()==False: + print("System's not ready.") + print("Please install first!") + return + + if len(ALL_DEVICE)==0: + devices_info() + node = ALL_DEVICE['sfp'] ['sfp'+str(index)][0] + node = node.replace(node.split("/")[-1], 'eeprom') + # check if got hexdump command in current environment + ret, log = log_os_system("which hexdump", 0) + ret, log2 = log_os_system("which busybox hexdump", 0) + if len(log): + hex_cmd = 'hexdump' + elif len(log2): + hex_cmd = ' busybox hexdump' + else: + log = 'Failed : no hexdump cmd!!' + logging.info(log) + print log + return 1 + + print node + ":" + ret, log = log_os_system("cat "+node+"| "+hex_cmd+" -C", 1) + if ret==0: + print log + else: + print "**********device no found**********" + return + +def set_device(args): + global DEVICE_NO + global ALL_DEVICE + if system_ready()==False: + print("System's not ready.") + print("Please install first!") + return + + if len(ALL_DEVICE)==0: + devices_info() + + if args[0]=='led': + if int(args[1])>4: + show_set_help() + return + #print ALL_DEVICE['led'] + for i in range(0,len(ALL_DEVICE['led'])): + for k in (ALL_DEVICE['led']['led'+str(i+1)]): + ret, log = log_os_system("echo "+args[1]+" >"+k, 1) + if ret: + return ret + elif args[0]=='fan': + if int(args[1])>100: + show_set_help() + return + #print ALL_DEVICE['fan'] + #fan1~6 is all fine, all fan share same setting + node = ALL_DEVICE['fan1'] ['fan11'][0] + node = node.replace(node.split("/")[-1], 'fan1_duty_cycle_percentage') + ret, log = log_os_system("cat "+ node, 1) + if ret==0: + print ("Previous fan duty: " + log.strip() +"%") + ret, log = log_os_system("echo "+args[1]+" >"+node, 1) + if ret==0: + print ("Current fan duty: " + args[1] +"%") + return ret + elif args[0]=='sfp': + if int(args[1])> DEVICE_NO[args[0]] or int(args[1])==0: + show_set_help() + return + if len(args)<2: + show_set_help() + return + + if int(args[2])>1: + show_set_help() + return + + #print ALL_DEVICE[args[0]] + for i in range(0,len(ALL_DEVICE[args[0]])): + for j in ALL_DEVICE[args[0]][args[0]+str(args[1])]: + if j.find('tx_disable')!= -1: + ret, log = log_os_system("echo "+args[2]+" >"+ j, 1) + if ret: + return ret + + return + +#get digits inside a string. +#Ex: 31 for "sfp31" +def get_value(input): + digit = re.findall('\d+', input) + return int(digit[0]) + +def device_traversal(): + if system_ready()==False: + print("System's not ready.") + print("Please install first!") + return + + if len(ALL_DEVICE)==0: + devices_info() + for i in sorted(ALL_DEVICE.keys()): + print("============================================") + print(i.upper()+": ") + print("============================================") + + for j in sorted(ALL_DEVICE[i].keys(), key=get_value): + print " "+j+":", + for k in (ALL_DEVICE[i][j]): + ret, log = log_os_system("cat "+k, 0) + func = k.split("/")[-1].strip() + func = re.sub(j+'_','',func,1) + func = re.sub(i.lower()+'_','',func,1) + if ret==0: + print func+"="+log+" ", + else: + print func+"="+"X"+" ", + print + print("----------------------------------------------------------------") + + + print + return + +def device_exist(): + ret1, log = log_os_system("ls "+i2c_prefix+"*0070", 0) + ret2, log = log_os_system("ls "+i2c_prefix+"i2c-2", 0) + return not(ret1 or ret2) + +if __name__ == "__main__": + main() From f7f20dc106f793c097c508e0ecb1bb46ff8f7ca5 Mon Sep 17 00:00:00 2001 From: roy_lee Date: Mon, 25 Feb 2019 15:48:22 +0800 Subject: [PATCH 2/5] Update device/plugins and accton_util. Signed-off-by: roy_lee --- .../plugins/eeprom.py | 4 +- .../plugins/psuutil.py | 20 +- .../plugins/sfputil.py | 300 +++++++----------- .../minipack/utils/accton_minipack_util.py | 114 +++---- 4 files changed, 182 insertions(+), 256 deletions(-) diff --git a/device/accton/x86_64-accton_minipack-r0/plugins/eeprom.py b/device/accton/x86_64-accton_minipack-r0/plugins/eeprom.py index d8ab41bd7d81..c1ac366fc3fa 100644 --- a/device/accton/x86_64-accton_minipack-r0/plugins/eeprom.py +++ b/device/accton/x86_64-accton_minipack-r0/plugins/eeprom.py @@ -18,6 +18,4 @@ 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/1-0057/eeprom" - if not os.path.exists(self.eeprom_path): - self.eeprom_path = "/sys/bus/i2c/devices/0-0057/eeprom" - super(board, self).__init__(self.eeprom_path, 0, '', True) + super(board, self).__init__(self.eeprom_path, 0x200, '', True) diff --git a/device/accton/x86_64-accton_minipack-r0/plugins/psuutil.py b/device/accton/x86_64-accton_minipack-r0/plugins/psuutil.py index 191654429e6b..99e1bbae9377 100644 --- a/device/accton/x86_64-accton_minipack-r0/plugins/psuutil.py +++ b/device/accton/x86_64-accton_minipack-r0/plugins/psuutil.py @@ -21,41 +21,37 @@ class PsuUtil(PsuBase): def __init__(self): PsuBase.__init__(self) - self.psu_path = "/sys/bus/i2c/devices/" - self.psu_presence = "/psu_present" - self.psu_oper_status = "/psu_power_good" - self.psu_mapping = { - 1: "35-0038", - 2: "36-003b", - } + self.num = 4 + self.psu_path = "/sys/bus/platform/devices/minipack_psensor/" + self.psu_voltage = "/in{0}_input" def get_num_psus(self): - return len(self.psu_mapping) + return self.num def get_psu_status(self, index): if index is None: return False status = 0 - node = self.psu_path + self.psu_mapping[index]+self.psu_oper_status + node = self.psu_path + self.psu_voltage.format(index*2-1) try: with open(node, 'r') as power_status: status = int(power_status.read()) except IOError: return False - return status == 1 + return status > 0 def get_psu_presence(self, index): if index is None: return False status = 0 - node = self.psu_path + self.psu_mapping[index] + self.psu_presence + node = self.psu_path + self.psu_voltage.format(index*2) try: with open(node, 'r') as presence_status: status = int(presence_status.read()) except IOError: return False - return status == 1 + return status > 0 diff --git a/device/accton/x86_64-accton_minipack-r0/plugins/sfputil.py b/device/accton/x86_64-accton_minipack-r0/plugins/sfputil.py index 73d4b6139c9e..e0d3c46ab3ae 100644 --- a/device/accton/x86_64-accton_minipack-r0/plugins/sfputil.py +++ b/device/accton/x86_64-accton_minipack-r0/plugins/sfputil.py @@ -1,209 +1,156 @@ -# sfputil.py -# -# Platform-specific SFP transceiver interface for SONiC -# +#!/usr/bin/env python try: import time - import os - from sonic_sfp.sfputilbase import SfpUtilBase -except ImportError as e: - raise ImportError("%s - required module not found" % str(e)) + from sonic_sfp.sfputilbase import SfpUtilBase +except ImportError, e: + raise ImportError (str(e) + "- required module not found") class SfpUtil(SfpUtilBase): - """Platform-specific SfpUtil class""" + """Platform specific SfpUtill class""" - PORT_START = 0 - PORT_END = 127 - PORTS_IN_BLOCK = 128 - QSFP_PORT_START = 0 - QSFP_PORT_END = 128 - - I2C_DEV_PATH = "/sys/bus/i2c/devices/" - BASE_VAL_PATH = "/sys/class/i2c-adapter/i2c-{0}/{1}-0050/" - BASE_OOM_PATH = "/sys/bus/i2c/devices/{0}-0050/" - CPLD_ADDRESS = ['-0062', '-0064'] - - _port_to_is_present = {} - _port_to_lp_mode = {} + _port_start = 0 + _port_end = 63 + ports_in_block = 64 _port_to_eeprom_mapping = {} - _port_to_i2c_mapping = { - 0: [1, 2], - 1: [2, 3], - 2: [3, 4], - 3: [4, 5], - 4: [5, 6], - 5: [6, 7], - 6: [7, 8], - 7: [8, 9], - 8: [9, 10], - 9: [10, 11], - 10: [11, 12], - 11: [12, 13], - 12: [13, 14], - 13: [14, 15], - 14: [15, 16], - 15: [16, 17], - 16: [17, 18], - 17: [18, 19], - 18: [19, 20], - 19: [20, 21], - 20: [21, 22], - 21: [22, 23], - 22: [23, 24], - 23: [24, 25], - 24: [25, 26], - 25: [26, 27], - 26: [27, 28], - 27: [28, 29], - 28: [29, 30], - 29: [30, 31], - 30: [31, 32], - 31: [32, 33], - 32: [33, 34], - 33: [34, 35], - 34: [35, 36], - 35: [36, 37], - 36: [37, 38], - 37: [38, 39], - 38: [39, 40], - 39: [40, 41], - 40: [41, 42], - 41: [42, 43], - 42: [43, 44], - 43: [44, 45], - 44: [45, 46], - 45: [46, 47], - 46: [47, 48], - 47: [48, 49], - 48: [49, 50],#QSFP49 - 49: [49, 50], - 50: [49, 50], - 51: [49, 50], - 52: [50, 52],#QSFP50 - 53: [50, 52], - 54: [50, 52], - 55: [50, 52], - 56: [51, 54],#QSFP51 - 57: [51, 54], - 58: [51, 54], - 59: [51, 54], - 60: [52, 51],#QSFP52 - 61: [52, 51], - 62: [52, 51], - 63: [52, 51], - 64: [53, 53], #QSFP53 - 65: [53, 53], - 66: [53, 53], - 67: [53, 53], - 68: [54, 55],#QSFP54 - 69: [54, 55], - 70: [54, 55], - 71: [54, 55], - } - - @property - def port_start(self): - return self.PORT_START - - @property - def port_end(self): - return self.PORT_END - - @property - def qsfp_port_start(self): - return self.QSFP_PORT_START - - @property - def qsfp_port_end(self): - return self.QSFP_PORT_END - - @property - def qsfp_ports(self): - return range(self.QSFP_PORT_START, self.PORTS_IN_BLOCK + 1) - - @property - def port_to_eeprom_mapping(self): - return self._port_to_eeprom_mapping + port_to_i2c_mapping = { + 61 : 25, + 62 : 26, + 63 : 27, + 64 : 28, + 55 : 29, + 56 : 30, + 53 : 31, + 54 : 32, + 9 : 33, + 10 : 34, + 11 : 35, + 12 : 36, + 1 : 37, + 2 : 38, + 3 : 39, + 4 : 40, + 6 : 41, + 5 : 42, + 8 : 43, + 7 : 44, + 13 : 45, + 14 : 46, + 15 : 47, + 16 : 48, + 17 : 49, + 18 : 50, + 19 : 51, + 20 : 52, + 25 : 53, + 26 : 54, + 27 : 55, + 28 : 56, + 29 : 57, + 30 : 58, + 31 : 59, + 32 : 60, + 21 : 61, + 22 : 62, + 23 : 63, + 24 : 64, + 41 : 65, + 42 : 66, + 43 : 67, + 44 : 68, + 33 : 69, + 34 : 70, + 35 : 71, + 36 : 72, + 45 : 73, + 46 : 74, + 47 : 75, + 48 : 76, + 37 : 77, + 38 : 78, + 39 : 79, + 40 : 80, + 57 : 81, + 58 : 82, + 59 : 83, + 60 : 84, + 49 : 85, + 50 : 86, + 51 : 87, + 52 : 88,} + + _qsfp_ports = range(0, ports_in_block + 1) def __init__(self): - eeprom_path = self.BASE_OOM_PATH + "eeprom" + eeprom_path = '/sys/bus/i2c/devices/{0}-0050/sfp_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) - for x in range(0, self.port_end+1): - self.port_to_eeprom_mapping[x] = eeprom_path.format( - self._port_to_i2c_mapping[x][1] - ) + def reset(self, port_num): + # Check for invalid port_num + if port_num < self._port_start or port_num > self._port_end: + return False + path = "/sys/bus/i2c/devices/19-0060/module_reset_{0}" + port_ps = path.format(port_num+1) + + try: + reg_file = open(port_ps, 'w') + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False - SfpUtilBase.__init__(self) + #HW will clear reset after set. + reg_file.seek(0) + reg_file.write('1') + reg_file.close() + return True - def get_cpld_dev_path(self, port_num): - if port_num < 16: - cpld_num = 0 - else: - cpld_num = 1 - - #cpld can be at either bus 0 or bus 1. - cpld_path = self.I2C_DEV_PATH + str(0) + self.CPLD_ADDRESS[cpld_num] - if not os.path.exists(cpld_path): - cpld_path = self.I2C_DEV_PATH + str(1) + self.CPLD_ADDRESS[cpld_num] - return cpld_path + def set_low_power_mode(self, port_nuM, lpmode): + raise NotImplementedError + + def get_low_power_mode(self, port_num): + raise NotImplementedError def get_presence(self, port_num): # Check for invalid port_num - if port_num < self.port_start or port_num > self.port_end: + if port_num < self._port_start or port_num > self._port_end: return False - cpld_path = self.get_cpld_dev_path(port_num) - present_path = cpld_path + "/module_present_" - present_path += str(self._port_to_i2c_mapping[port_num][0]) - - self.__port_to_is_present = present_path + path = "/sys/bus/i2c/devices/{0}-0050/sfp_is_present" + port_ps = path.format(self.port_to_i2c_mapping[port_num+1]) + try: - val_file = open(self.__port_to_is_present) + reg_file = open(port_ps) except IOError as e: - print "Error: unable to open file: %s" % str(e) + print "Error: unable to open file: %s" % str(e) return False - content = val_file.readline().rstrip() - val_file.close() - - # content is a string, either "0" or "1" - if content == "1": + reg_value = reg_file.readline().rstrip() + if reg_value == '1': return True return False - def get_low_power_mode(self, port_num): - raise NotImplementedError - - def set_low_power_mode(self, port_num, lpmode): - raise NotImplementedError - - def reset(self, port_num): - if port_num < self.qsfp_port_start or port_num > self.qsfp_port_end: - return False - - cpld_path = self.get_cpld_dev_path(port_num) - _path = cpld_path + "/module_reset_" - _path += str(self._port_to_i2c_mapping[port_num][0]) + @property + def port_start(self): + return self._port_start - try: - reg_file = open(_path, 'w') - except IOError as e: - print "Error: unable to open file: %s" % str(e) - return False + @property + def port_end(self): + return self._port_end + + @property + def qsfp_ports(self): + return range(0, self.ports_in_block + 1) - reg_file.seek(0) - reg_file.write('1') - time.sleep(1) - reg_file.seek(0) - reg_file.write('0') - reg_file.close() - - return True + @property + def port_to_eeprom_mapping(self): + return self._port_to_eeprom_mapping def get_transceiver_change_event(self): """ @@ -212,4 +159,3 @@ def get_transceiver_change_event(self): on this platform. """ raise NotImplementedError - diff --git a/platform/broadcom/sonic-platform-modules-accton/minipack/utils/accton_minipack_util.py b/platform/broadcom/sonic-platform-modules-accton/minipack/utils/accton_minipack_util.py index c7bc0298d7d1..7ef04c6e6f1e 100755 --- a/platform/broadcom/sonic-platform-modules-accton/minipack/utils/accton_minipack_util.py +++ b/platform/broadcom/sonic-platform-modules-accton/minipack/utils/accton_minipack_util.py @@ -34,7 +34,7 @@ clean : uninstall drivers and remove related sysfs nodes show : show all systen status sff : dump SFP eeprom - set : change board setting with fan|led|sfp + set : change board setting with led|sfp """ import os @@ -51,47 +51,26 @@ DEBUG = False args = [] ALL_DEVICE = {} -DEVICE_NO = {'led':5, 'fan1':1, 'fan2':1,'fan3':1,'fan4':1,'fan5':1,'thermal':4, 'psu':2, 'sfp':32} +DEVICE_NO = {'led':5, 'psu':2, 'sfp':32} led_prefix ='' -fan_prefix ='' -hwmon_types = {'led': ['diag','fan','loc','psu1','psu2'], - 'fan1': ['fan'], - 'fan2': ['fan'], - 'fan3': ['fan'], - 'fan4': ['fan'], - 'fan5': ['fan'], +hwmon_types = {'led': ['diag','loc'], } hwmon_nodes = {'led': ['brightness'] , - 'fan1': ['fan1_duty_cycle_percentage', 'fan1_fault', 'fan1_speed_rpm', 'fan1_direction', 'fanr1_fault', 'fanr1_speed_rpm'], - 'fan2': ['fan2_duty_cycle_percentage','fan2_fault', 'fan2_speed_rpm', 'fan2_direction', 'fanr2_fault', 'fanr2_speed_rpm'], - 'fan3': ['fan3_duty_cycle_percentage','fan3_fault', 'fan3_speed_rpm', 'fan3_direction', 'fanr3_fault', 'fanr3_speed_rpm'], - 'fan4': ['fan4_duty_cycle_percentage','fan4_fault', 'fan4_speed_rpm', 'fan4_direction', 'fanr4_fault', 'fanr4_speed_rpm'], - 'fan5': ['fan5_duty_cycle_percentage','fan5_fault', 'fan5_speed_rpm', 'fan5_direction', 'fanr5_fault', 'fanr5_speed_rpm'], } hwmon_prefix ={'led': led_prefix, - 'fan1': fan_prefix, - 'fan2': fan_prefix, - 'fan3': fan_prefix, - 'fan4': fan_prefix, - 'fan5': fan_prefix, } i2c_prefix = '/sys/bus/i2c/devices/' -i2c_bus = {'thermal': ['38-0048','39-0049', '40-004a', '41-004b'] , +i2c_bus = { 'psu': ['35-0038','36-003b'], 'sfp': ['-0050']} i2c_nodes = { - 'thermal': ['hwmon/hwmon*/temp1_input'] , 'psu': ['psu_present ', 'psu_power_good'] , 'sfp': ['module_present_', 'sfp_tx_disable']} -sfp_map = [ 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33 - ] +NO_QSFP = 128 #For sideband signals of SFP/QSFP modules. cpld_of_module = {'-0062': list(range(0,16)), @@ -99,8 +78,8 @@ mknod =[ -'echo pca9548 0x77 > /sys/bus/i2c/devices/i2c-1/new_device', -'echo 24c02 0x57 > /sys/bus/i2c/devices/i2c-1/new_device', +'echo pca9548 0x70 > /sys/bus/i2c/devices/i2c-1/new_device', +'echo 24c64 0x57 > /sys/bus/i2c/devices/i2c-1/new_device', ] FORCE = 0 @@ -173,9 +152,8 @@ def show_help(): def show_set_help(): cmd = sys.argv[0].split("/")[-1]+ " " + args[0] - print cmd +" [led|sfp|fan]" + print cmd +" [led|sfp]" print " use \""+ cmd + " led 0-4 \" to set led color" - print " use \""+ cmd + " fan 0-100\" to set fan duty percetage" print " use \""+ cmd + " sfp 1-32 {0|1}\" to set sfp# tx_disable" sys.exit(0) @@ -214,21 +192,21 @@ def driver_inserted(): kos = [ 'depmod -ae', 'modprobe i2c_dev', -'modprobe i2c_mux_pca954x', +'modprobe i2c_mux_pca954x force_deselect_on_exit=1', +#'modprobe i2c_mux_pca954x', 'modprobe optoe', 'modprobe minipack_psensor'] def driver_install(): - global FORCE for i in range(0,len(kos)): status, output = log_os_system(kos[i], 1) if status: if FORCE == 0: return status + status, output = log_os_system('ifconfig usb0 up', 1) return 0 def driver_uninstall(): - global FORCE for i in range(0,len(kos)): rm = kos[-(i+1)].replace("modprobe", "modprobe -rq") rm = rm.replace("insmod", "rmmod") @@ -238,26 +216,48 @@ def driver_uninstall(): return status return 0 +def sfp_map(index): + port = index + 1 + base = ((port-1)/8*8) + 10 + index = (port - 1) % 8 + index = 7 - index + if (index%2): + index = index -1 + else: + index = index +1 + bus = base + index + return bus + def device_install(): - global FORCE for i in range(0,len(mknod)): #for pca932x need times to built new i2c buses if mknod[i].find('pca954') != -1: - time.sleep(2) + time.sleep(1) status, output = log_os_system(mknod[i], 1) if status: print output if FORCE == 0: return status + + # initialize multiplexer for 8 PIMs + cmdl = "echo pca9548 0x%x > /sys/bus/i2c/devices/i2c-%d/new_device" + for pim in range(2, 10): + cmdm = cmdl % (0x72, pim) + status, output =log_os_system(cmdm, 1) + cmdm = cmdl % (0x71, pim) + status, output =log_os_system(cmdm, 1) - for i in range(0,len(sfp_map)): - status, output =log_os_system("echo optoe1 0x50 > /sys/bus/i2c/devices/i2c-"+str(sfp_map[i])+"/new_device", 1) + for i in range(0, NO_QSFP): + bus = sfp_map(i) + status, output =log_os_system( + "echo optoe1 0x50 > /sys/bus/i2c/devices/i2c-"+str(bus)+"/new_device", 1) if status: print output if FORCE == 0: return status - status, output =log_os_system("echo port"+str(i)+" > /sys/bus/i2c/devices/"+str(sfp_map[i])+"-0050/port_name", 1) + status, output =log_os_system( + "echo port"+str(i+1)+" > /sys/bus/i2c/devices/"+str(bus)+"-0050/port_name", 1) if status: print output if FORCE == 0: @@ -266,16 +266,23 @@ def device_install(): return def device_uninstall(): - global FORCE - - for i in range(0,len(sfp_map)): - target = "/sys/bus/i2c/devices/i2c-"+str(sfp_map[i])+"/delete_device" + for i in range(0,NO_QSFP): + bus = sfp_map(i) + target = "/sys/bus/i2c/devices/i2c-"+str(bus)+"/delete_device" status, output =log_os_system("echo 0x50 > "+ target, 1) if status: print output if FORCE == 0: return status + # Multiplexer for 8 PIMs + cmdl = "echo 0x%x > /sys/bus/i2c/devices/i2c-%d/delete_device" + for pim in range(2, 10): + cmdm = cmdl % (0x72, pim) + status, output =log_os_system(cmdm, 1) + cmdm = cmdl % (0x71, pim) + status, output =log_os_system(cmdm, 1) + nodelist = mknod for i in range(len(nodelist)): target = nodelist[-(i+1)] @@ -353,13 +360,7 @@ def devices_info(): nodes = i2c_nodes[key] for i in range(0,len(buses)): for j in range(0,len(nodes)): - if 'fan' == key: - for k in range(0,DEVICE_NO[key]): - node = key+str(k+1) - path = i2c_prefix+ buses[i]+"/fan"+str(k+1)+"_"+ nodes[j] - my_log(node+": "+ path) - ALL_DEVICE[key][node].append(path) - elif 'sfp' == key: + if 'sfp' == key: for k in range(0,DEVICE_NO[key]): bus = 1 node = key+str(k+1) @@ -444,21 +445,6 @@ def set_device(args): ret, log = log_os_system("echo "+args[1]+" >"+k, 1) if ret: return ret - elif args[0]=='fan': - if int(args[1])>100: - show_set_help() - return - #print ALL_DEVICE['fan'] - #fan1~6 is all fine, all fan share same setting - node = ALL_DEVICE['fan1'] ['fan11'][0] - node = node.replace(node.split("/")[-1], 'fan1_duty_cycle_percentage') - ret, log = log_os_system("cat "+ node, 1) - if ret==0: - print ("Previous fan duty: " + log.strip() +"%") - ret, log = log_os_system("echo "+args[1]+" >"+node, 1) - if ret==0: - print ("Current fan duty: " + args[1] +"%") - return ret elif args[0]=='sfp': if int(args[1])> DEVICE_NO[args[0]] or int(args[1])==0: show_set_help() From babadb5b520e686517654dbdbf427edd74c457ff Mon Sep 17 00:00:00 2001 From: roy_lee Date: Tue, 26 Feb 2019 11:42:07 +0800 Subject: [PATCH 3/5] Add 2 parameters for adjustable printing and polling interval. Signed-off-by: roy_lee --- .../minipack/modules/minipack_psensor.c | 45 ++++++++++++------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/platform/broadcom/sonic-platform-modules-accton/minipack/modules/minipack_psensor.c b/platform/broadcom/sonic-platform-modules-accton/minipack/modules/minipack_psensor.c index 658d78244ce0..3155b2b27c4f 100755 --- a/platform/broadcom/sonic-platform-modules-accton/minipack/modules/minipack_psensor.c +++ b/platform/broadcom/sonic-platform-modules-accton/minipack/modules/minipack_psensor.c @@ -40,19 +40,21 @@ #include -/*#define DEBUG*/ +#define DEBUG_BUF_LEN 256 +#define DEBUG_INTR(args...) \ + debug_print(__func__, __LINE__, 1, args) -#ifdef DEBUG -#define DEBUG_INTR(fmt, ...) pr_err(fmt, ##__VA_ARGS__) -#else -#define DEBUG_INTR(fmt...) do { } while (0) -#endif -#define DEBUG_LEX(fmt, ...) do { } while (0) +static unsigned int verbose = 0; +module_param(verbose, uint, S_IRUGO|S_IWUSR); +MODULE_PARM_DESC(verbose, "Print more information for debugging. Default is disabled."); + +static unsigned int poll_interval = 9; +module_param(poll_interval, uint, S_IRUGO|S_IWUSR); +MODULE_PARM_DESC(poll_interval, "Time interval for data polling, in unit of second."); #define DRVNAME "minipack_psensor" /*Platform Sensor*/ -#define SENSOR_DATA_UPDATE_INTERVAL (9*HZ) #define MAX_THERMAL_COUNT 8 #define MAX_FAN_COUNT (8) #define MAX_PSU_COUNT (4) @@ -308,6 +310,21 @@ static struct minipack_data *mp_data = NULL; /*-----------------------------------------------------------------------*/ +static void debug_print(const char *func, int line, int level, + const char *fmt, ...) +{ + va_list args; + char buf[DEBUG_BUF_LEN]; + if (verbose >= level) { + va_start(args, fmt); + vsnprintf(buf, sizeof(buf), fmt, args); + va_end(args); + pr_info("[DBG]%s#%d: %s\n", func, line, buf); + } +} + + + static int _tty_wait(u32 mdelay) { if (mdelay) { msleep(mdelay); @@ -382,7 +399,7 @@ static int _tty_tx(struct file *tty_fd, const char *str) rc = tty_fd->f_op->write(tty_fd, str, strlen(str)+1,0); if (rc < 0) { - pr_err( "failed to write(%d)\n", rc); + pr_info( "failed to write(%d)\n", rc); return -EBUSY; } DEBUG_INTR("[TX]%s-%d, %d BYTES, write:\n\"%s\"\n", __func__, __LINE__,rc, str); @@ -454,7 +471,7 @@ static int _tty_writeNread(struct file *tty_fd, return -EINVAL; if(!(tty_fd->f_op) || !(tty_fd->f_op->read) ||!(tty_fd->f_op->write)) { - pr_err("file %s cann't readable or writable?\n", TTY_DEVICE); + pr_info("file %s cann't readable or writable?\n", TTY_DEVICE); return -EINVAL; } @@ -682,19 +699,16 @@ static int extract_numbers(char *buf, int *out, int out_cnt) int cnt, x; ptr = buf; - DEBUG_LEX("%s-%d, out_cnt (%d)\n", __func__, __LINE__, out_cnt); /*replace non-digits into '|', for sscanf(%s)'s ease to handle it.*/ for (x = 0; x < strlen(ptr); x++) { if( (ptr[x]<'0' || ptr[x] >'9') && ptr[x] != '-') ptr[x] = TTY_RESP_SEPARATOR; } - DEBUG_LEX("%s-%d, (%lu) resp:%s\n", __func__, __LINE__, strlen(ptr), ptr); cnt = 0; while (strchr(ptr, TTY_RESP_SEPARATOR)) { if (sscanf(ptr,"%d%s",out,ptr)) { - DEBUG_LEX("%s-%d, %d @(%d)\n", __func__, __LINE__, *(out), cnt); cnt++; out++; if (cnt == out_cnt) { @@ -729,7 +743,6 @@ static int extract_2byteHex(char *buf, int *out, int out_cnt) ptr[x] = TTY_RESP_SEPARATOR; } - DEBUG_LEX("%s-%d, (%lu) resp:%s\n", __func__, __LINE__, strlen(ptr), ptr); cnt = 0; while (strchr(ptr, TTY_RESP_SEPARATOR)) { @@ -737,10 +750,8 @@ static int extract_2byteHex(char *buf, int *out, int out_cnt) if (strlen(ptr) && *ptr == TTY_RESP_SEPARATOR) { continue; } - DEBUG_LEX("%s-%d, (%lu) :%s\n", __func__, __LINE__, strlen(ptr), ptr); if (sscanf(ptr,"%4s",tmp)) { if(!strchr(tmp, TTY_RESP_SEPARATOR)) { - DEBUG_LEX("%s-%d, %s @(%d)\n", __func__, __LINE__, tmp, cnt); if (kstrtol(tmp, 16, &y) < 0) return -EINVAL; *out = (int)y; @@ -888,7 +899,7 @@ update_data(struct device *dev, enum sensor_type_e type) { int data_cnt, rc; mutex_lock(&data->update_lock); - if (time_after(jiffies, (*last_updated) + SENSOR_DATA_UPDATE_INTERVAL) + if (time_after(jiffies, (*last_updated) + (poll_interval*HZ)) || !(*valid)) { rc = get_type_data(&data->sdata, type, 0, &data_ptr, &data_cnt); From f6c0602e566653885f7b01b5f40ce0edc303f29c Mon Sep 17 00:00:00 2001 From: roy_lee Date: Wed, 27 Feb 2019 16:35:10 +0800 Subject: [PATCH 4/5] Validate sfputil and remove error on init.service. Signed-off-by: roy_lee --- .../plugins/sfputil.py | 197 ++---- .../x86_64-accton_minipack-r0/sensors.conf | 20 - .../service/minipack-platform-init.service | 10 +- .../minipack/utils/accton_bmc_query.py | 627 ------------------ .../minipack/utils/accton_minipack_util.py | 1 - 5 files changed, 69 insertions(+), 786 deletions(-) delete mode 100755 platform/broadcom/sonic-platform-modules-accton/minipack/utils/accton_bmc_query.py diff --git a/device/accton/x86_64-accton_minipack-r0/plugins/sfputil.py b/device/accton/x86_64-accton_minipack-r0/plugins/sfputil.py index e0d3c46ab3ae..16105acbf78a 100644 --- a/device/accton/x86_64-accton_minipack-r0/plugins/sfputil.py +++ b/device/accton/x86_64-accton_minipack-r0/plugins/sfputil.py @@ -1,157 +1,90 @@ -#!/usr/bin/env python +# sfputil.py +# +# Platform-specific SFP transceiver interface for SONiC +# try: import time - from sonic_sfp.sfputilbase import SfpUtilBase -except ImportError, e: - raise ImportError (str(e) + "- required module not found") + from sonic_sfp.sfputilbase import SfpUtilBase +except ImportError as e: + raise ImportError("%s - required module not found" % str(e)) class SfpUtil(SfpUtilBase): - """Platform specific SfpUtill class""" - - _port_start = 0 - _port_end = 63 - ports_in_block = 64 + """Platform-specific SfpUtil class""" + + PORT_START = 0 + PORT_END = 128 + + BASE_OOM_PATH = "/sys/bus/i2c/devices/{0}-0050/" + + _port_to_is_present = {} + _port_to_lp_mode = {} _port_to_eeprom_mapping = {} - port_to_i2c_mapping = { - 61 : 25, - 62 : 26, - 63 : 27, - 64 : 28, - 55 : 29, - 56 : 30, - 53 : 31, - 54 : 32, - 9 : 33, - 10 : 34, - 11 : 35, - 12 : 36, - 1 : 37, - 2 : 38, - 3 : 39, - 4 : 40, - 6 : 41, - 5 : 42, - 8 : 43, - 7 : 44, - 13 : 45, - 14 : 46, - 15 : 47, - 16 : 48, - 17 : 49, - 18 : 50, - 19 : 51, - 20 : 52, - 25 : 53, - 26 : 54, - 27 : 55, - 28 : 56, - 29 : 57, - 30 : 58, - 31 : 59, - 32 : 60, - 21 : 61, - 22 : 62, - 23 : 63, - 24 : 64, - 41 : 65, - 42 : 66, - 43 : 67, - 44 : 68, - 33 : 69, - 34 : 70, - 35 : 71, - 36 : 72, - 45 : 73, - 46 : 74, - 47 : 75, - 48 : 76, - 37 : 77, - 38 : 78, - 39 : 79, - 40 : 80, - 57 : 81, - 58 : 82, - 59 : 83, - 60 : 84, - 49 : 85, - 50 : 86, - 51 : 87, - 52 : 88,} - _qsfp_ports = range(0, ports_in_block + 1) + @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(self.PORT_START, self.PORT_END + 1) + + @property + def port_to_eeprom_mapping(self): + return self._port_to_eeprom_mapping + + def sfp_map(self, index): + port = index + 1 + base = ((port-1)/8*8) + 10 + index = (port - 1) % 8 + index = 7 - index + if (index%2): + index = index -1 + else: + index = index +1 + bus = base + index + return bus + def __init__(self): - eeprom_path = '/sys/bus/i2c/devices/{0}-0050/sfp_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 + eeprom_path = self.BASE_OOM_PATH + "eeprom" + + for x in range(0, self.port_end+1): + bus = self.sfp_map(x) + self.port_to_eeprom_mapping[x] = eeprom_path.format( + bus) + SfpUtilBase.__init__(self) - def reset(self, port_num): + 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/bus/i2c/devices/19-0060/module_reset_{0}" - port_ps = path.format(port_num+1) - - try: - reg_file = open(port_ps, 'w') - except IOError as e: - print "Error: unable to open file: %s" % str(e) + if port_num < self.port_start or port_num > self.port_end: return False - #HW will clear reset after set. - reg_file.seek(0) - reg_file.write('1') - reg_file.close() + eeprom_path = self.port_to_eeprom_mapping[port_num] + with open(eeprom_path) as f: + try: + content = f.read(1) + except IOError as e: + #Not print any error, for if any, treat as Not present. + return False return True - def set_low_power_mode(self, port_nuM, lpmode): + def get_low_power_mode(self, port_num): + raise NotImplementedError + + def set_low_power_mode(self, port_num, lpmode): raise NotImplementedError - def get_low_power_mode(self, port_num): + def reset(self, port_num): raise NotImplementedError - 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/bus/i2c/devices/{0}-0050/sfp_is_present" - port_ps = path.format(self.port_to_i2c_mapping[port_num+1]) - - - try: - reg_file = open(port_ps) - 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 - def get_transceiver_change_event(self): """ TODO: This function need to be implemented diff --git a/device/accton/x86_64-accton_minipack-r0/sensors.conf b/device/accton/x86_64-accton_minipack-r0/sensors.conf index c0114ab68604..966d2f11ad9a 100644 --- a/device/accton/x86_64-accton_minipack-r0/sensors.conf +++ b/device/accton/x86_64-accton_minipack-r0/sensors.conf @@ -1,23 +1,3 @@ # libsensors configuration file # ------------------------------------------------ -chip "cpr_4011_4mxx-i2c-*-3c" - label in1 "PSU1_VIN" - label in2 "PSU1_VOUT" - label curr1 "PSU1_IIN" - label curr2 "PSU1_IOUT" - label power1 "PSU1_PIN" - label power2 "PSU1_POUT" - label fan1 "PSU1_FAN" - label temp1 "PSU1_TEMP" - -chip "cpr_4011_4mxx-i2c-*-3f" - label in1 "PSU2_VIN" - label in2 "PSU2_VOUT" - label curr1 "PSU2_IIN" - label curr2 "PSU2_IOUT" - label power1 "PSU2_PIN" - label power2 "PSU2_POUT" - label fan1 "PSU2_FAN" - label temp1 "PSU2_TEMP" - diff --git a/platform/broadcom/sonic-platform-modules-accton/minipack/service/minipack-platform-init.service b/platform/broadcom/sonic-platform-modules-accton/minipack/service/minipack-platform-init.service index 50e62cfdc142..4a0f803b2711 100644 --- a/platform/broadcom/sonic-platform-modules-accton/minipack/service/minipack-platform-init.service +++ b/platform/broadcom/sonic-platform-modules-accton/minipack/service/minipack-platform-init.service @@ -5,12 +5,10 @@ After=sysinit.target DefaultDependencies=no [Service] -ExecStartPre=/usr/local/bin/accton_minipack_util.py install -KillSignal=SIGKILL -SuccessExitStatus=SIGKILL - -# Resource Limitations -LimitCORE=infinity +Type=oneshot +ExecStart=/usr/local/bin/accton_minipack_util.py install +ExecStop=/usr/local/bin/accton_minipack_util.py clean +RemainAfterExit=yes [Install] WantedBy=multi-user.target diff --git a/platform/broadcom/sonic-platform-modules-accton/minipack/utils/accton_bmc_query.py b/platform/broadcom/sonic-platform-modules-accton/minipack/utils/accton_bmc_query.py deleted file mode 100755 index a77841857e6c..000000000000 --- a/platform/broadcom/sonic-platform-modules-accton/minipack/utils/accton_bmc_query.py +++ /dev/null @@ -1,627 +0,0 @@ -#!/usr/bin/env python -# -# Copyright (C) 2016 Accton Networks, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -# Description: -# Due to adoption of optoe drivers, sideband signals of SFPs are moved -# into cpld drivers. Add a new dict, cpld_of_module, for mapping this -# attributes to corresponding cpld nodes. -# - - -""" -Usage: %(scriptName)s [options] command object - -options: - -h | --help : this help message - -d | --debug : run with debug mode - -f | --force : ignore error during installation or clean -command: - install : install drivers and generate related sysfs nodes - clean : uninstall drivers and remove related sysfs nodes - show : show all systen status - sff : dump SFP eeprom - set : change board setting with fan|led|sfp -""" - -import os -import commands -import sys, getopt -import logging -import re -import time -from collections import namedtuple - -PROJECT_NAME = 'as6712_32x' -version = '0.2.0' -verbose = False -DEBUG = False -args = [] -ALL_DEVICE = {} -DEVICE_NO = {'led':5, 'fan1':1, 'fan2':1,'fan3':1,'fan4':1,'fan5':1,'thermal':4, 'psu':2, 'sfp':32} - - -led_prefix ='/sys/devices/platform/as6712_32x_led/leds/accton_'+PROJECT_NAME+'_led::' -fan_prefix ='/sys/devices/platform/as6712_32x_' -hwmon_types = {'led': ['diag','fan','loc','psu1','psu2'], - 'fan1': ['fan'], - 'fan2': ['fan'], - 'fan3': ['fan'], - 'fan4': ['fan'], - 'fan5': ['fan'], - } -hwmon_nodes = {'led': ['brightness'] , - 'fan1': ['fan1_duty_cycle_percentage', 'fan1_fault', 'fan1_speed_rpm', 'fan1_direction', 'fanr1_fault', 'fanr1_speed_rpm'], - 'fan2': ['fan2_duty_cycle_percentage','fan2_fault', 'fan2_speed_rpm', 'fan2_direction', 'fanr2_fault', 'fanr2_speed_rpm'], - 'fan3': ['fan3_duty_cycle_percentage','fan3_fault', 'fan3_speed_rpm', 'fan3_direction', 'fanr3_fault', 'fanr3_speed_rpm'], - 'fan4': ['fan4_duty_cycle_percentage','fan4_fault', 'fan4_speed_rpm', 'fan4_direction', 'fanr4_fault', 'fanr4_speed_rpm'], - 'fan5': ['fan5_duty_cycle_percentage','fan5_fault', 'fan5_speed_rpm', 'fan5_direction', 'fanr5_fault', 'fanr5_speed_rpm'], - } -hwmon_prefix ={'led': led_prefix, - 'fan1': fan_prefix, - 'fan2': fan_prefix, - 'fan3': fan_prefix, - 'fan4': fan_prefix, - 'fan5': fan_prefix, - } - -i2c_prefix = '/sys/bus/i2c/devices/' -i2c_bus = {'thermal': ['38-0048','39-0049', '40-004a', '41-004b'] , - 'psu': ['35-0038','36-003b'], - 'sfp': ['-0050']} -i2c_nodes = { - 'thermal': ['hwmon/hwmon*/temp1_input'] , - 'psu': ['psu_present ', 'psu_power_good'] , - 'sfp': ['module_present_', 'sfp_tx_disable']} - -sfp_map = [ 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33 - ] - -#For sideband signals of SFP/QSFP modules. -bus_of_cpld = [0, 1] -cpld_of_module = {'-0062': list(range(0,16)), - '-0064': list(range(16,32)) } - - -mknod =[ -'echo as6712_32x_cpld1 0x60 > /sys/bus/i2c/devices/i2c-0/new_device', -'echo as6712_32x_cpld2 0x62 > /sys/bus/i2c/devices/i2c-0/new_device', -'echo as6712_32x_cpld3 0x64 > /sys/bus/i2c/devices/i2c-0/new_device', -'echo pca9548 0x70 > /sys/bus/i2c/devices/i2c-1/new_device', -'echo 24c02 0x57 > /sys/bus/i2c/devices/i2c-1/new_device', - -# PSU-1 -'echo as6712_32x_psu1 0x38 > /sys/bus/i2c/devices/i2c-35/new_device', -'echo cpr_4011_4mxx 0x3c > /sys/bus/i2c/devices/i2c-35/new_device', -#'echo as6712_32x_psu1 0x50 > /sys/bus/i2c/devices/i2c-35/new_device', -#'echo ym2401 0x58 > /sys/bus/i2c/devices/i2c-35/new_device', - -# PSU-2 -'echo as6712_32x_psu2 0x3b > /sys/bus/i2c/devices/i2c-36/new_device', -'echo cpr_4011_4mxx 0x3f > /sys/bus/i2c/devices/i2c-36/new_device', -#'echo as6712_32x_psu2 0x53 > /sys/bus/i2c/devices/i2c-36/new_device', -#'echo ym2401 0x5b > /sys/bus/i2c/devices/i2c-36/new_device', - -'echo lm75 0x48 > /sys/bus/i2c/devices/i2c-38/new_device', -'echo lm75 0x49 > /sys/bus/i2c/devices/i2c-39/new_device', -'echo lm75 0x4a > /sys/bus/i2c/devices/i2c-40/new_device', -'echo lm75 0x4b > /sys/bus/i2c/devices/i2c-41/new_device', -] - -mknod2 =[ -'echo as6712_32x_cpld1 0x60 > /sys/bus/i2c/devices/i2c-1/new_device', -'echo as6712_32x_cpld2 0x62 > /sys/bus/i2c/devices/i2c-1/new_device', -'echo as6712_32x_cpld3 0x64 > /sys/bus/i2c/devices/i2c-1/new_device', -'echo pca9548 0x70 > /sys/bus/i2c/devices/i2c-0/new_device', -'echo 24c02 0x57 > /sys/bus/i2c/devices/i2c-0/new_device', - -# PSU-1 -'echo as6712_32x_psu1 0x38 > /sys/bus/i2c/devices/i2c-35/new_device', -'echo cpr_4011_4mxx 0x3c > /sys/bus/i2c/devices/i2c-35/new_device', -#'echo as6712_32x_psu1 0x50 > /sys/bus/i2c/devices/i2c-35/new_device', -#'echo ym2401 0x58 > /sys/bus/i2c/devices/i2c-35/new_device', - -# PSU-2 -'echo as6712_32x_psu2 0x3b > /sys/bus/i2c/devices/i2c-36/new_device', -'echo cpr_4011_4mxx 0x3f > /sys/bus/i2c/devices/i2c-36/new_device', -#'echo as6712_32x_psu2 0x53 > /sys/bus/i2c/devices/i2c-36/new_device', -#'echo ym2401 0x5b > /sys/bus/i2c/devices/i2c-36/new_device', - -'echo lm75 0x48 > /sys/bus/i2c/devices/i2c-38/new_device', -'echo lm75 0x49 > /sys/bus/i2c/devices/i2c-39/new_device', -'echo lm75 0x4a > /sys/bus/i2c/devices/i2c-40/new_device', -'echo lm75 0x4b > /sys/bus/i2c/devices/i2c-41/new_device', -] - -FORCE = 0 - - - -if DEBUG == True: - print sys.argv[0] - print 'ARGV :', sys.argv[1:] - - -def main(): - global DEBUG - global args - global FORCE - - if len(sys.argv)<2: - show_help() - - options, args = getopt.getopt(sys.argv[1:], 'hdf', ['help', - 'debug', - 'force', - ]) - if DEBUG == True: - print options - print args - print len(sys.argv) - - for opt, arg in options: - if opt in ('-h', '--help'): - show_help() - elif opt in ('-d', '--debug'): - DEBUG = True - logging.basicConfig(filename= PROJECT_NAME+'.log', filemode='w',level=logging.DEBUG) - logging.basicConfig(level=logging.INFO) - elif opt in ('-f', '--force'): - FORCE = 1 - else: - logging.info('no option') - for arg in args: - if arg == 'install': - do_install() - elif arg == 'clean': - do_uninstall() - elif arg == 'show': - device_traversal() - elif arg == 'sff': - if len(args)!=2: - show_eeprom_help() - elif int(args[1]) ==0 or int(args[1]) > DEVICE_NO['sfp']: - show_eeprom_help() - else: - show_eeprom(args[1]) - return - elif arg == 'set': - if len(args)<3: - show_set_help() - else: - set_device(args[1:]) - return - else: - show_help() - - - return 0 - -def show_help(): - print __doc__ % {'scriptName' : sys.argv[0].split("/")[-1]} - sys.exit(0) - -def show_set_help(): - cmd = sys.argv[0].split("/")[-1]+ " " + args[0] - print cmd +" [led|sfp|fan]" - print " use \""+ cmd + " led 0-4 \" to set led color" - print " use \""+ cmd + " fan 0-100\" to set fan duty percetage" - print " use \""+ cmd + " sfp 1-32 {0|1}\" to set sfp# tx_disable" - sys.exit(0) - -def show_eeprom_help(): - cmd = sys.argv[0].split("/")[-1]+ " " + args[0] - print " use \""+ cmd + " 1-54 \" to dump sfp# eeprom" - sys.exit(0) - -def my_log(txt): - if DEBUG == True: - print "[ACCTON DBG]: "+txt - return - -def log_os_system(cmd, show): - logging.info('Run :'+cmd) - status = 1 - output = "" - status, output = commands.getstatusoutput(cmd) - my_log (cmd +"with result:" + str(status)) - my_log ("cmd:" + cmd) - my_log (" output:"+output) - if status: - logging.info('Failed :'+cmd) - if show: - print('Failed :'+cmd) - return status, output - -def driver_inserted(): - ret, lsmod = log_os_system("lsmod| grep accton", 0) - logging.info('mods:'+lsmod) - if len(lsmod) ==0: - return False - - - -kos = [ -'depmod -ae', -'modprobe i2c_dev', -'modprobe i2c_mux_pca954x', -'modprobe optoe', -'modprobe accton_as6712_32x_cpld', -'modprobe cpr_4011_4mxx', -#'modprobe ym2651y', -'modprobe accton_as6712_32x_fan', -'modprobe leds-accton_as6712_32x', -'modprobe accton_as6712_32x_psu'] - -def driver_install(): - global FORCE - for i in range(0,len(kos)): - status, output = log_os_system(kos[i], 1) - if status: - if FORCE == 0: - return status - return 0 - -def driver_uninstall(): - global FORCE - for i in range(0,len(kos)): - rm = kos[-(i+1)].replace("modprobe", "modprobe -rq") - rm = rm.replace("insmod", "rmmod") - status, output = log_os_system(rm, 1) - if status: - if FORCE == 0: - return status - return 0 - -def cpld_bus_check(): - tmp = "i2cget -y -f 0 0x60" - status, output = log_os_system(tmp, 0) - if status: - return 1 - else: - return 0 - -def i2c_order_check(): - # i2c bus 0 and 1 might be installed in different order. - # Here check if 0x70 is exist @ i2c-0 - tmp = "echo pca9548 0x70 > /sys/bus/i2c/devices/i2c-1/new_device" - status, output = log_os_system(tmp, 0) - if not device_exist(): - order = 1 - else: - order = 0 - tmp = "echo 0x70 > /sys/bus/i2c/devices/i2c-1/delete_device" - status, output = log_os_system(tmp, 0) - return order - -def device_install(): - global FORCE - - order = i2c_order_check() - # if 0x76 is not exist @i2c-0, use reversed bus order - if order: - for i in range(0,len(mknod2)): - #for pca932x need times to built new i2c buses - if mknod2[i].find('pca954') != -1: - time.sleep(2) - - status, output = log_os_system(mknod2[i], 1) - if status: - print output - if FORCE == 0: - return status - else: - for i in range(0,len(mknod)): - #for pca932x need times to built new i2c buses - if mknod[i].find('pca954') != -1: - time.sleep(2) - - status, output = log_os_system(mknod[i], 1) - if status: - print output - if FORCE == 0: - return status - - for i in range(0,len(sfp_map)): - status, output =log_os_system("echo optoe1 0x50 > /sys/bus/i2c/devices/i2c-"+str(sfp_map[i])+"/new_device", 1) - if status: - print output - if FORCE == 0: - return status - status, output =log_os_system("echo port"+str(i)+" > /sys/bus/i2c/devices/"+str(sfp_map[i])+"-0050/port_name", 1) - if status: - print output - if FORCE == 0: - return status - - return - -def device_uninstall(): - global FORCE - - status, output =log_os_system("ls /sys/bus/i2c/devices/0-0070", 0) - if status==0: - I2C_ORDER=1 - else: - I2C_ORDER=0 - - for i in range(0,len(sfp_map)): - target = "/sys/bus/i2c/devices/i2c-"+str(sfp_map[i])+"/delete_device" - status, output =log_os_system("echo 0x50 > "+ target, 1) - if status: - print output - if FORCE == 0: - return status - - if I2C_ORDER==0: - nodelist = mknod - else: - nodelist = mknod2 - - for i in range(len(nodelist)): - target = nodelist[-(i+1)] - temp = target.split() - del temp[1] - temp[-1] = temp[-1].replace('new_device', 'delete_device') - status, output = log_os_system(" ".join(temp), 1) - if status: - print output - if FORCE == 0: - return status - - return - -def system_ready(): - if driver_inserted() == False: - return False - if not device_exist(): - return False - return True - -def do_install(): - print "Checking system...." - if driver_inserted() == False: - print "No driver, installing...." - status = driver_install() - if status: - if FORCE == 0: - return status - else: - print PROJECT_NAME.upper()+" drivers detected...." - if not device_exist(): - print "No device, installing...." - status = device_install() - if status: - if FORCE == 0: - return status - else: - print PROJECT_NAME.upper()+" devices detected...." - return - -def do_uninstall(): - print "Checking system...." - if not device_exist(): - print PROJECT_NAME.upper() +" has no device installed...." - else: - print "Removing device...." - status = device_uninstall() - if status: - if FORCE == 0: - return status - - if driver_inserted()== False : - print PROJECT_NAME.upper() +" has no driver installed...." - else: - print "Removing installed driver...." - status = driver_uninstall() - if status: - if FORCE == 0: - return status - - return - -def devices_info(): - global DEVICE_NO - global ALL_DEVICE - global i2c_bus, hwmon_types - for key in DEVICE_NO: - ALL_DEVICE[key]= {} - for i in range(0,DEVICE_NO[key]): - ALL_DEVICE[key][key+str(i+1)] = [] - - order = cpld_bus_check() - for key in i2c_bus: - buses = i2c_bus[key] - nodes = i2c_nodes[key] - for i in range(0,len(buses)): - for j in range(0,len(nodes)): - if 'fan' == key: - for k in range(0,DEVICE_NO[key]): - node = key+str(k+1) - path = i2c_prefix+ buses[i]+"/fan"+str(k+1)+"_"+ nodes[j] - my_log(node+": "+ path) - ALL_DEVICE[key][node].append(path) - elif 'sfp' == key: - for k in range(0,DEVICE_NO[key]): - for lk in cpld_of_module: - if k in cpld_of_module[lk]: - bus = bus_of_cpld[order] - node = key+str(k+1) - path = i2c_prefix + str(bus) + lk + "/"+ nodes[j] + str(k+1) - my_log(node+": "+ path) - ALL_DEVICE[key][node].append(path) - else: - node = key+str(i+1) - path = i2c_prefix+ buses[i]+"/"+ nodes[j] - my_log(node+": "+ path) - ALL_DEVICE[key][node].append(path) - - for key in hwmon_types: - itypes = hwmon_types[key] - nodes = hwmon_nodes[key] - for i in range(0,len(itypes)): - for j in range(0,len(nodes)): - node = key+"_"+itypes[i] - path = hwmon_prefix[key]+ itypes[i]+"/"+ nodes[j] - my_log(node+": "+ path) - ALL_DEVICE[key][ key+str(i+1)].append(path) - - #show dict all in the order - if DEBUG == True: - for i in sorted(ALL_DEVICE.keys()): - print(i+": ") - for j in sorted(ALL_DEVICE[i].keys()): - print(" "+j) - for k in (ALL_DEVICE[i][j]): - print(" "+" "+k) - return - -def show_eeprom(index): - if system_ready()==False: - print("System's not ready.") - print("Please install first!") - return - - if len(ALL_DEVICE)==0: - devices_info() - node = ALL_DEVICE['sfp'] ['sfp'+str(index)][0] - node = node.replace(node.split("/")[-1], 'eeprom') - # check if got hexdump command in current environment - ret, log = log_os_system("which hexdump", 0) - ret, log2 = log_os_system("which busybox hexdump", 0) - if len(log): - hex_cmd = 'hexdump' - elif len(log2): - hex_cmd = ' busybox hexdump' - else: - log = 'Failed : no hexdump cmd!!' - logging.info(log) - print log - return 1 - - print node + ":" - ret, log = log_os_system("cat "+node+"| "+hex_cmd+" -C", 1) - if ret==0: - print log - else: - print "**********device no found**********" - return - -def set_device(args): - global DEVICE_NO - global ALL_DEVICE - if system_ready()==False: - print("System's not ready.") - print("Please install first!") - return - - if len(ALL_DEVICE)==0: - devices_info() - - if args[0]=='led': - if int(args[1])>4: - show_set_help() - return - #print ALL_DEVICE['led'] - for i in range(0,len(ALL_DEVICE['led'])): - for k in (ALL_DEVICE['led']['led'+str(i+1)]): - ret, log = log_os_system("echo "+args[1]+" >"+k, 1) - if ret: - return ret - elif args[0]=='fan': - if int(args[1])>100: - show_set_help() - return - #print ALL_DEVICE['fan'] - #fan1~6 is all fine, all fan share same setting - node = ALL_DEVICE['fan1'] ['fan11'][0] - node = node.replace(node.split("/")[-1], 'fan1_duty_cycle_percentage') - ret, log = log_os_system("cat "+ node, 1) - if ret==0: - print ("Previous fan duty: " + log.strip() +"%") - ret, log = log_os_system("echo "+args[1]+" >"+node, 1) - if ret==0: - print ("Current fan duty: " + args[1] +"%") - return ret - elif args[0]=='sfp': - if int(args[1])> DEVICE_NO[args[0]] or int(args[1])==0: - show_set_help() - return - if len(args)<2: - show_set_help() - return - - if int(args[2])>1: - show_set_help() - return - - #print ALL_DEVICE[args[0]] - for i in range(0,len(ALL_DEVICE[args[0]])): - for j in ALL_DEVICE[args[0]][args[0]+str(args[1])]: - if j.find('tx_disable')!= -1: - ret, log = log_os_system("echo "+args[2]+" >"+ j, 1) - if ret: - return ret - - return - -#get digits inside a string. -#Ex: 31 for "sfp31" -def get_value(input): - digit = re.findall('\d+', input) - return int(digit[0]) - -def device_traversal(): - if system_ready()==False: - print("System's not ready.") - print("Please install first!") - return - - if len(ALL_DEVICE)==0: - devices_info() - for i in sorted(ALL_DEVICE.keys()): - print("============================================") - print(i.upper()+": ") - print("============================================") - - for j in sorted(ALL_DEVICE[i].keys(), key=get_value): - print " "+j+":", - for k in (ALL_DEVICE[i][j]): - ret, log = log_os_system("cat "+k, 0) - func = k.split("/")[-1].strip() - func = re.sub(j+'_','',func,1) - func = re.sub(i.lower()+'_','',func,1) - if ret==0: - print func+"="+log+" ", - else: - print func+"="+"X"+" ", - print - print("----------------------------------------------------------------") - - - print - return - -def device_exist(): - ret1, log = log_os_system("ls "+i2c_prefix+"*0070", 0) - ret2, log = log_os_system("ls "+i2c_prefix+"i2c-2", 0) - return not(ret1 or ret2) - -if __name__ == "__main__": - main() diff --git a/platform/broadcom/sonic-platform-modules-accton/minipack/utils/accton_minipack_util.py b/platform/broadcom/sonic-platform-modules-accton/minipack/utils/accton_minipack_util.py index 7ef04c6e6f1e..3d09fdfe0c59 100755 --- a/platform/broadcom/sonic-platform-modules-accton/minipack/utils/accton_minipack_util.py +++ b/platform/broadcom/sonic-platform-modules-accton/minipack/utils/accton_minipack_util.py @@ -203,7 +203,6 @@ def driver_install(): if status: if FORCE == 0: return status - status, output = log_os_system('ifconfig usb0 up', 1) return 0 def driver_uninstall(): From c0b6f6e0707132738874678d90f10196bd3da428 Mon Sep 17 00:00:00 2001 From: roy_lee Date: Thu, 14 Mar 2019 14:25:16 +0800 Subject: [PATCH 5/5] Update BCM SDK related files. Signed-off-by: roy_lee --- .../config_16Q_FEC544_EVTA_100G.bcm | 1485 ++++++++++++++++ .../config_16Q_FEC544_EVTB_100G.bcm | 1487 +++++++++++++++++ .../Accton-MINIPACK/port_config.ini | 162 +- .../Accton-MINIPACK/sai.profile | 2 +- .../th3-minipack-32x400w.config.bcm | 132 -- .../x86_64-accton_minipack-r0/installer.conf | 3 + .../led_proc_init.soc | 104 +- .../x86_64-accton_minipack-r0/sensors.conf | 20 - 8 files changed, 3106 insertions(+), 289 deletions(-) create mode 100755 device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/config_16Q_FEC544_EVTA_100G.bcm create mode 100755 device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/config_16Q_FEC544_EVTB_100G.bcm mode change 100644 => 100755 device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/port_config.ini mode change 100644 => 100755 device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/sai.profile delete mode 100644 device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/th3-minipack-32x400w.config.bcm mode change 100644 => 100755 device/accton/x86_64-accton_minipack-r0/installer.conf mode change 100644 => 100755 device/accton/x86_64-accton_minipack-r0/led_proc_init.soc mode change 100644 => 100755 device/accton/x86_64-accton_minipack-r0/sensors.conf diff --git a/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/config_16Q_FEC544_EVTA_100G.bcm b/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/config_16Q_FEC544_EVTA_100G.bcm new file mode 100755 index 000000000000..9f4066cc736d --- /dev/null +++ b/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/config_16Q_FEC544_EVTA_100G.bcm @@ -0,0 +1,1485 @@ +pbmp_xport_xe.0=0x3ffffffffffffffffffffffffffffffffffffffe +ccm_dma_enable=0 +ccmdma_intr_enable=0 +ctr_evict_enable=0 +mem_cache_enable=0 +parity_correction=0 +parity_enable=0 +phy_enable=0 +phy_null=1 +pll_bypass=1 + +init_all_modules=0 +core_clock_frequency=1325 +dpr_clock_frequency=1000 +device_clock_frequency=1325 +port_flex_enable=1 + +#firmware load method, use fast load +load_firmware=0x2 + +serdes_lane_config_dfe=on +serdes_lane_config_media_type=backplane + +port_fec_1=3 +port_fec_2=3 +port_fec_3=3 +port_fec_4=3 +port_fec_5=3 +port_fec_6=3 +port_fec_7=3 +port_fec_8=3 +port_fec_9=3 +port_fec_10=3 +port_fec_11=3 +port_fec_12=3 +port_fec_13=3 +port_fec_14=3 +port_fec_15=3 +port_fec_16=3 +port_fec_20=3 +port_fec_21=3 +port_fec_22=3 +port_fec_23=3 +port_fec_24=3 +port_fec_25=3 +port_fec_26=3 +port_fec_27=3 +port_fec_28=3 +port_fec_29=3 +port_fec_30=3 +port_fec_31=3 +port_fec_32=3 +port_fec_33=3 +port_fec_34=3 +port_fec_35=3 +port_fec_40=3 +port_fec_41=3 +port_fec_42=3 +port_fec_43=3 +port_fec_44=3 +port_fec_45=3 +port_fec_46=3 +port_fec_47=3 +port_fec_48=3 +port_fec_49=3 +port_fec_50=3 +port_fec_51=3 +port_fec_52=3 +port_fec_53=3 +port_fec_54=3 +port_fec_55=3 +port_fec_60=3 +port_fec_61=3 +port_fec_62=3 +port_fec_63=3 +port_fec_64=3 +port_fec_65=3 +port_fec_66=3 +port_fec_67=3 +port_fec_68=3 +port_fec_69=3 +port_fec_70=3 +port_fec_71=3 +port_fec_72=3 +port_fec_73=3 +port_fec_74=3 +port_fec_75=3 +port_fec_80=3 +port_fec_81=3 +port_fec_82=3 +port_fec_83=3 +port_fec_84=3 +port_fec_85=3 +port_fec_86=3 +port_fec_87=3 +port_fec_88=3 +port_fec_89=3 +port_fec_90=3 +port_fec_91=3 +port_fec_92=3 +port_fec_93=3 +port_fec_94=3 +port_fec_95=3 +port_fec_100=3 +port_fec_101=3 +port_fec_102=3 +port_fec_103=3 +port_fec_104=3 +port_fec_105=3 +port_fec_106=3 +port_fec_107=3 +port_fec_108=3 +port_fec_109=3 +port_fec_110=3 +port_fec_111=3 +port_fec_112=3 +port_fec_113=3 +port_fec_114=3 +port_fec_115=3 +port_fec_120=3 +port_fec_121=3 +port_fec_122=3 +port_fec_123=3 +port_fec_124=3 +port_fec_125=3 +port_fec_126=3 +port_fec_127=3 +port_fec_128=3 +port_fec_129=3 +port_fec_130=3 +port_fec_131=3 +port_fec_132=3 +port_fec_133=3 +port_fec_134=3 +port_fec_135=3 +port_fec_140=3 +port_fec_141=3 +port_fec_142=3 +port_fec_143=3 +port_fec_144=3 +port_fec_145=3 +port_fec_146=3 +port_fec_147=3 +port_fec_148=3 +port_fec_149=3 +port_fec_150=3 +port_fec_151=3 +port_fec_152=3 +port_fec_153=3 +port_fec_154=3 +port_fec_155=3 + +dport_map_port_1=3 +dport_map_port_2=4 +dport_map_port_3=1 +dport_map_port_4=2 +portmap_1=1:100 +portmap_2=3:100 +portmap_3=5:100 +portmap_4=7:100 +phy_chain_rx_lane_map_physical{1.0}=0x32145670 +phy_chain_rx_lane_map_physical{2.0}=0x32145670 +phy_chain_rx_lane_map_physical{3.0}=0x32145670 +phy_chain_rx_lane_map_physical{4.0}=0x32145670 +phy_chain_rx_lane_map_physical{5.0}=0x32145670 +phy_chain_rx_lane_map_physical{6.0}=0x32145670 +phy_chain_rx_lane_map_physical{7.0}=0x32145670 +phy_chain_rx_lane_map_physical{8.0}=0x32145670 +phy_chain_tx_lane_map_physical{1.0}=0x32046751 +phy_chain_tx_lane_map_physical{2.0}=0x32046751 +phy_chain_tx_lane_map_physical{3.0}=0x32046751 +phy_chain_tx_lane_map_physical{4.0}=0x32046751 +phy_chain_tx_lane_map_physical{5.0}=0x32046751 +phy_chain_tx_lane_map_physical{6.0}=0x32046751 +phy_chain_tx_lane_map_physical{7.0}=0x32046751 +phy_chain_tx_lane_map_physical{8.0}=0x32046751 +serdes_core_rx_polarity_flip_physical{1}=0xA4 +serdes_core_rx_polarity_flip_physical{2}=0xA4 +serdes_core_rx_polarity_flip_physical{3}=0xA4 +serdes_core_rx_polarity_flip_physical{4}=0xA4 +serdes_core_rx_polarity_flip_physical{5}=0xA4 +serdes_core_rx_polarity_flip_physical{6}=0xA4 +serdes_core_rx_polarity_flip_physical{7}=0xA4 +serdes_core_rx_polarity_flip_physical{8}=0xA4 +serdes_core_tx_polarity_flip_physical{1}=0xE6 +serdes_core_tx_polarity_flip_physical{2}=0xE6 +serdes_core_tx_polarity_flip_physical{3}=0xE6 +serdes_core_tx_polarity_flip_physical{4}=0xE6 +serdes_core_tx_polarity_flip_physical{5}=0xE6 +serdes_core_tx_polarity_flip_physical{6}=0xE6 +serdes_core_tx_polarity_flip_physical{7}=0xE6 +serdes_core_tx_polarity_flip_physical{8}=0xE6 + +dport_map_port_5=19 +dport_map_port_6=20 +dport_map_port_7=17 +dport_map_port_8=18 +portmap_5=9:100 +portmap_6=11:100 +portmap_7=13:100 +portmap_8=15:100 +phy_chain_rx_lane_map_physical{9.0}=0x45673021 +phy_chain_rx_lane_map_physical{10.0}=0x45673021 +phy_chain_rx_lane_map_physical{11.0}=0x45673021 +phy_chain_rx_lane_map_physical{12.0}=0x45673021 +phy_chain_rx_lane_map_physical{13.0}=0x45673021 +phy_chain_rx_lane_map_physical{14.0}=0x45673021 +phy_chain_rx_lane_map_physical{15.0}=0x45673021 +phy_chain_rx_lane_map_physical{16.0}=0x45673021 +phy_chain_tx_lane_map_physical{9.0}=0x13240756 +phy_chain_tx_lane_map_physical{10.0}=0x13240756 +phy_chain_tx_lane_map_physical{11.0}=0x13240756 +phy_chain_tx_lane_map_physical{12.0}=0x13240756 +phy_chain_tx_lane_map_physical{13.0}=0x13240756 +phy_chain_tx_lane_map_physical{14.0}=0x13240756 +phy_chain_tx_lane_map_physical{15.0}=0x13240756 +phy_chain_tx_lane_map_physical{16.0}=0x13240756 +serdes_core_rx_polarity_flip_physical{9}=0x43 +serdes_core_rx_polarity_flip_physical{10}=0x43 +serdes_core_rx_polarity_flip_physical{11}=0x43 +serdes_core_rx_polarity_flip_physical{12}=0x43 +serdes_core_rx_polarity_flip_physical{13}=0x43 +serdes_core_rx_polarity_flip_physical{14}=0x43 +serdes_core_rx_polarity_flip_physical{15}=0x43 +serdes_core_rx_polarity_flip_physical{16}=0x43 +serdes_core_tx_polarity_flip_physical{9}=0x7A +serdes_core_tx_polarity_flip_physical{10}=0x7A +serdes_core_tx_polarity_flip_physical{11}=0x7A +serdes_core_tx_polarity_flip_physical{12}=0x7A +serdes_core_tx_polarity_flip_physical{13}=0x7A +serdes_core_tx_polarity_flip_physical{14}=0x7A +serdes_core_tx_polarity_flip_physical{15}=0x7A +serdes_core_tx_polarity_flip_physical{16}=0x7A + +dport_map_port_9=35 +dport_map_port_10=36 +dport_map_port_11=33 +dport_map_port_12=34 +portmap_9=17:100 +portmap_10=19:100 +portmap_11=21:100 +portmap_12=23:100 +phy_chain_rx_lane_map_physical{17.0}=0x01234576 +phy_chain_rx_lane_map_physical{18.0}=0x01234576 +phy_chain_rx_lane_map_physical{19.0}=0x01234576 +phy_chain_rx_lane_map_physical{20.0}=0x01234576 +phy_chain_rx_lane_map_physical{21.0}=0x01234576 +phy_chain_rx_lane_map_physical{22.0}=0x01234576 +phy_chain_rx_lane_map_physical{23.0}=0x01234576 +phy_chain_rx_lane_map_physical{24.0}=0x01234576 +phy_chain_tx_lane_map_physical{17.0}=0x67451032 +phy_chain_tx_lane_map_physical{18.0}=0x67451032 +phy_chain_tx_lane_map_physical{19.0}=0x67451032 +phy_chain_tx_lane_map_physical{20.0}=0x67451032 +phy_chain_tx_lane_map_physical{21.0}=0x67451032 +phy_chain_tx_lane_map_physical{22.0}=0x67451032 +phy_chain_tx_lane_map_physical{23.0}=0x67451032 +phy_chain_tx_lane_map_physical{24.0}=0x67451032 +serdes_core_rx_polarity_flip_physical{17}=0x2E +serdes_core_rx_polarity_flip_physical{18}=0x2E +serdes_core_rx_polarity_flip_physical{19}=0x2E +serdes_core_rx_polarity_flip_physical{20}=0x2E +serdes_core_rx_polarity_flip_physical{21}=0x2E +serdes_core_rx_polarity_flip_physical{22}=0x2E +serdes_core_rx_polarity_flip_physical{23}=0x2E +serdes_core_rx_polarity_flip_physical{24}=0x2E +serdes_core_tx_polarity_flip_physical{17}=0xD5 +serdes_core_tx_polarity_flip_physical{18}=0xD5 +serdes_core_tx_polarity_flip_physical{19}=0xD5 +serdes_core_tx_polarity_flip_physical{20}=0xD5 +serdes_core_tx_polarity_flip_physical{21}=0xD5 +serdes_core_tx_polarity_flip_physical{22}=0xD5 +serdes_core_tx_polarity_flip_physical{23}=0xD5 +serdes_core_tx_polarity_flip_physical{24}=0xD5 + +dport_map_port_13=51 +dport_map_port_14=52 +dport_map_port_15=49 +dport_map_port_16=50 +portmap_13=25:100 +portmap_14=27:100 +portmap_15=29:100 +portmap_16=31:100 +phy_chain_rx_lane_map_physical{25.0}=0x45017263 +phy_chain_rx_lane_map_physical{26.0}=0x45017263 +phy_chain_rx_lane_map_physical{27.0}=0x45017263 +phy_chain_rx_lane_map_physical{28.0}=0x45017263 +phy_chain_rx_lane_map_physical{29.0}=0x45017263 +phy_chain_rx_lane_map_physical{30.0}=0x45017263 +phy_chain_rx_lane_map_physical{31.0}=0x45017263 +phy_chain_rx_lane_map_physical{32.0}=0x45017263 +phy_chain_tx_lane_map_physical{25.0}=0x30126547 +phy_chain_tx_lane_map_physical{26.0}=0x30126547 +phy_chain_tx_lane_map_physical{27.0}=0x30126547 +phy_chain_tx_lane_map_physical{28.0}=0x30126547 +phy_chain_tx_lane_map_physical{29.0}=0x30126547 +phy_chain_tx_lane_map_physical{30.0}=0x30126547 +phy_chain_tx_lane_map_physical{31.0}=0x30126547 +phy_chain_tx_lane_map_physical{32.0}=0x30126547 +serdes_core_rx_polarity_flip_physical{25}=0x91 +serdes_core_rx_polarity_flip_physical{26}=0x91 +serdes_core_rx_polarity_flip_physical{27}=0x91 +serdes_core_rx_polarity_flip_physical{28}=0x91 +serdes_core_rx_polarity_flip_physical{29}=0x91 +serdes_core_rx_polarity_flip_physical{30}=0x91 +serdes_core_rx_polarity_flip_physical{31}=0x91 +serdes_core_rx_polarity_flip_physical{32}=0x91 +serdes_core_tx_polarity_flip_physical{25}=0x57 +serdes_core_tx_polarity_flip_physical{26}=0x57 +serdes_core_tx_polarity_flip_physical{27}=0x57 +serdes_core_tx_polarity_flip_physical{28}=0x57 +serdes_core_tx_polarity_flip_physical{29}=0x57 +serdes_core_tx_polarity_flip_physical{30}=0x57 +serdes_core_tx_polarity_flip_physical{31}=0x57 +serdes_core_tx_polarity_flip_physical{32}=0x57 + +dport_map_port_20=7 +dport_map_port_21=8 +dport_map_port_22=5 +dport_map_port_23=6 +portmap_20=33:100 +portmap_21=35:100 +portmap_22=37:100 +portmap_23=39:100 +phy_chain_rx_lane_map_physical{33.0}=0x56321074 +phy_chain_rx_lane_map_physical{34.0}=0x56321074 +phy_chain_rx_lane_map_physical{35.0}=0x56321074 +phy_chain_rx_lane_map_physical{36.0}=0x56321074 +phy_chain_rx_lane_map_physical{37.0}=0x56321074 +phy_chain_rx_lane_map_physical{38.0}=0x56321074 +phy_chain_rx_lane_map_physical{39.0}=0x56321074 +phy_chain_rx_lane_map_physical{40.0}=0x56321074 +phy_chain_tx_lane_map_physical{33.0}=0x56103247 +phy_chain_tx_lane_map_physical{34.0}=0x56103247 +phy_chain_tx_lane_map_physical{35.0}=0x56103247 +phy_chain_tx_lane_map_physical{36.0}=0x56103247 +phy_chain_tx_lane_map_physical{37.0}=0x56103247 +phy_chain_tx_lane_map_physical{38.0}=0x56103247 +phy_chain_tx_lane_map_physical{39.0}=0x56103247 +phy_chain_tx_lane_map_physical{40.0}=0x56103247 +serdes_core_rx_polarity_flip_physical{33}=0x96 +serdes_core_rx_polarity_flip_physical{34}=0x96 +serdes_core_rx_polarity_flip_physical{35}=0x96 +serdes_core_rx_polarity_flip_physical{36}=0x96 +serdes_core_rx_polarity_flip_physical{37}=0x96 +serdes_core_rx_polarity_flip_physical{38}=0x96 +serdes_core_rx_polarity_flip_physical{39}=0x96 +serdes_core_rx_polarity_flip_physical{40}=0x96 +serdes_core_tx_polarity_flip_physical{33}=0x15 +serdes_core_tx_polarity_flip_physical{34}=0x15 +serdes_core_tx_polarity_flip_physical{35}=0x15 +serdes_core_tx_polarity_flip_physical{36}=0x15 +serdes_core_tx_polarity_flip_physical{37}=0x15 +serdes_core_tx_polarity_flip_physical{38}=0x15 +serdes_core_tx_polarity_flip_physical{39}=0x15 +serdes_core_tx_polarity_flip_physical{40}=0x15 + +dport_map_port_24=23 +dport_map_port_25=24 +dport_map_port_26=21 +dport_map_port_27=22 +portmap_24=41:100 +portmap_25=43:100 +portmap_26=45:100 +portmap_27=47:100 +phy_chain_rx_lane_map_physical{41.0}=0x76543210 +phy_chain_rx_lane_map_physical{42.0}=0x76543210 +phy_chain_rx_lane_map_physical{43.0}=0x76543210 +phy_chain_rx_lane_map_physical{44.0}=0x76543210 +phy_chain_rx_lane_map_physical{45.0}=0x76543210 +phy_chain_rx_lane_map_physical{46.0}=0x76543210 +phy_chain_rx_lane_map_physical{47.0}=0x76543210 +phy_chain_rx_lane_map_physical{48.0}=0x76543210 +phy_chain_tx_lane_map_physical{41.0}=0x30125476 +phy_chain_tx_lane_map_physical{42.0}=0x30125476 +phy_chain_tx_lane_map_physical{43.0}=0x30125476 +phy_chain_tx_lane_map_physical{44.0}=0x30125476 +phy_chain_tx_lane_map_physical{45.0}=0x30125476 +phy_chain_tx_lane_map_physical{46.0}=0x30125476 +phy_chain_tx_lane_map_physical{47.0}=0x30125476 +phy_chain_tx_lane_map_physical{48.0}=0x30125476 +serdes_core_rx_polarity_flip_physical{41}=0x5A +serdes_core_rx_polarity_flip_physical{42}=0x5A +serdes_core_rx_polarity_flip_physical{43}=0x5A +serdes_core_rx_polarity_flip_physical{44}=0x5A +serdes_core_rx_polarity_flip_physical{45}=0x5A +serdes_core_rx_polarity_flip_physical{46}=0x5A +serdes_core_rx_polarity_flip_physical{47}=0x5A +serdes_core_rx_polarity_flip_physical{48}=0x5A +serdes_core_tx_polarity_flip_physical{41}=0x65 +serdes_core_tx_polarity_flip_physical{42}=0x65 +serdes_core_tx_polarity_flip_physical{43}=0x65 +serdes_core_tx_polarity_flip_physical{44}=0x65 +serdes_core_tx_polarity_flip_physical{45}=0x65 +serdes_core_tx_polarity_flip_physical{46}=0x65 +serdes_core_tx_polarity_flip_physical{47}=0x65 +serdes_core_tx_polarity_flip_physical{48}=0x65 + +dport_map_port_28=39 +dport_map_port_29=40 +dport_map_port_30=37 +dport_map_port_31=38 +portmap_28=49:100 +portmap_29=51:100 +portmap_30=53:100 +portmap_31=55:100 +phy_chain_rx_lane_map_physical{49.0}=0x61023547 +phy_chain_rx_lane_map_physical{50.0}=0x61023547 +phy_chain_rx_lane_map_physical{51.0}=0x61023547 +phy_chain_rx_lane_map_physical{52.0}=0x61023547 +phy_chain_rx_lane_map_physical{53.0}=0x61023547 +phy_chain_rx_lane_map_physical{54.0}=0x61023547 +phy_chain_rx_lane_map_physical{55.0}=0x61023547 +phy_chain_rx_lane_map_physical{56.0}=0x61023547 +phy_chain_tx_lane_map_physical{49.0}=0x07541263 +phy_chain_tx_lane_map_physical{50.0}=0x07541263 +phy_chain_tx_lane_map_physical{51.0}=0x07541263 +phy_chain_tx_lane_map_physical{52.0}=0x07541263 +phy_chain_tx_lane_map_physical{53.0}=0x07541263 +phy_chain_tx_lane_map_physical{54.0}=0x07541263 +phy_chain_tx_lane_map_physical{55.0}=0x07541263 +phy_chain_tx_lane_map_physical{56.0}=0x07541263 +serdes_core_rx_polarity_flip_physical{49}=0x41 +serdes_core_rx_polarity_flip_physical{50}=0x41 +serdes_core_rx_polarity_flip_physical{51}=0x41 +serdes_core_rx_polarity_flip_physical{52}=0x41 +serdes_core_rx_polarity_flip_physical{53}=0x41 +serdes_core_rx_polarity_flip_physical{54}=0x41 +serdes_core_rx_polarity_flip_physical{55}=0x41 +serdes_core_rx_polarity_flip_physical{56}=0x41 +serdes_core_tx_polarity_flip_physical{49}=0x99 +serdes_core_tx_polarity_flip_physical{50}=0x99 +serdes_core_tx_polarity_flip_physical{51}=0x99 +serdes_core_tx_polarity_flip_physical{52}=0x99 +serdes_core_tx_polarity_flip_physical{53}=0x99 +serdes_core_tx_polarity_flip_physical{54}=0x99 +serdes_core_tx_polarity_flip_physical{55}=0x99 +serdes_core_tx_polarity_flip_physical{56}=0x99 + +dport_map_port_32=55 +dport_map_port_33=56 +dport_map_port_34=53 +dport_map_port_35=54 +portmap_32=57:100 +portmap_33=59:100 +portmap_34=61:100 +portmap_35=63:100 +phy_chain_rx_lane_map_physical{57.0}=0x45601273 +phy_chain_rx_lane_map_physical{58.0}=0x45601273 +phy_chain_rx_lane_map_physical{59.0}=0x45601273 +phy_chain_rx_lane_map_physical{60.0}=0x45601273 +phy_chain_rx_lane_map_physical{61.0}=0x45601273 +phy_chain_rx_lane_map_physical{62.0}=0x45601273 +phy_chain_rx_lane_map_physical{63.0}=0x45601273 +phy_chain_rx_lane_map_physical{64.0}=0x45601273 +phy_chain_tx_lane_map_physical{57.0}=0x76231045 +phy_chain_tx_lane_map_physical{58.0}=0x76231045 +phy_chain_tx_lane_map_physical{59.0}=0x76231045 +phy_chain_tx_lane_map_physical{60.0}=0x76231045 +phy_chain_tx_lane_map_physical{61.0}=0x76231045 +phy_chain_tx_lane_map_physical{62.0}=0x76231045 +phy_chain_tx_lane_map_physical{63.0}=0x76231045 +phy_chain_tx_lane_map_physical{64.0}=0x76231045 +serdes_core_rx_polarity_flip_physical{57}=0x49 +serdes_core_rx_polarity_flip_physical{58}=0x49 +serdes_core_rx_polarity_flip_physical{59}=0x49 +serdes_core_rx_polarity_flip_physical{60}=0x49 +serdes_core_rx_polarity_flip_physical{61}=0x49 +serdes_core_rx_polarity_flip_physical{62}=0x49 +serdes_core_rx_polarity_flip_physical{63}=0x49 +serdes_core_rx_polarity_flip_physical{64}=0x49 +serdes_core_tx_polarity_flip_physical{57}=0x25 +serdes_core_tx_polarity_flip_physical{58}=0x25 +serdes_core_tx_polarity_flip_physical{59}=0x25 +serdes_core_tx_polarity_flip_physical{60}=0x25 +serdes_core_tx_polarity_flip_physical{61}=0x25 +serdes_core_tx_polarity_flip_physical{62}=0x25 +serdes_core_tx_polarity_flip_physical{63}=0x25 +serdes_core_tx_polarity_flip_physical{64}=0x25 + +dport_map_port_40=11 +dport_map_port_41=12 +dport_map_port_42=9 +dport_map_port_43=10 +portmap_40=65:100 +portmap_41=67:100 +portmap_42=69:100 +portmap_43=71:100 +phy_chain_rx_lane_map_physical{65.0}=0x73210645 +phy_chain_rx_lane_map_physical{66.0}=0x73210645 +phy_chain_rx_lane_map_physical{67.0}=0x73210645 +phy_chain_rx_lane_map_physical{68.0}=0x73210645 +phy_chain_rx_lane_map_physical{69.0}=0x73210645 +phy_chain_rx_lane_map_physical{70.0}=0x73210645 +phy_chain_rx_lane_map_physical{71.0}=0x73210645 +phy_chain_rx_lane_map_physical{72.0}=0x73210645 +phy_chain_tx_lane_map_physical{65.0}=0x45213076 +phy_chain_tx_lane_map_physical{66.0}=0x45213076 +phy_chain_tx_lane_map_physical{67.0}=0x45213076 +phy_chain_tx_lane_map_physical{68.0}=0x45213076 +phy_chain_tx_lane_map_physical{69.0}=0x45213076 +phy_chain_tx_lane_map_physical{70.0}=0x45213076 +phy_chain_tx_lane_map_physical{71.0}=0x45213076 +phy_chain_tx_lane_map_physical{72.0}=0x45213076 +serdes_core_rx_polarity_flip_physical{65}=0xFF +serdes_core_rx_polarity_flip_physical{66}=0xFF +serdes_core_rx_polarity_flip_physical{67}=0xFF +serdes_core_rx_polarity_flip_physical{68}=0xFF +serdes_core_rx_polarity_flip_physical{69}=0xFF +serdes_core_rx_polarity_flip_physical{70}=0xFF +serdes_core_rx_polarity_flip_physical{71}=0xFF +serdes_core_rx_polarity_flip_physical{72}=0xFF +serdes_core_tx_polarity_flip_physical{65}=0x12 +serdes_core_tx_polarity_flip_physical{66}=0x12 +serdes_core_tx_polarity_flip_physical{67}=0x12 +serdes_core_tx_polarity_flip_physical{68}=0x12 +serdes_core_tx_polarity_flip_physical{69}=0x12 +serdes_core_tx_polarity_flip_physical{70}=0x12 +serdes_core_tx_polarity_flip_physical{71}=0x12 +serdes_core_tx_polarity_flip_physical{72}=0x12 + +dport_map_port_44=27 +dport_map_port_45=28 +dport_map_port_46=25 +dport_map_port_47=26 +portmap_44=73:100 +portmap_45=75:100 +portmap_46=77:100 +portmap_47=79:100 +phy_chain_rx_lane_map_physical{73.0}=0x67543201 +phy_chain_rx_lane_map_physical{74.0}=0x67543201 +phy_chain_rx_lane_map_physical{75.0}=0x67543201 +phy_chain_rx_lane_map_physical{76.0}=0x67543201 +phy_chain_rx_lane_map_physical{77.0}=0x67543201 +phy_chain_rx_lane_map_physical{78.0}=0x67543201 +phy_chain_rx_lane_map_physical{79.0}=0x67543201 +phy_chain_rx_lane_map_physical{80.0}=0x67543201 +phy_chain_tx_lane_map_physical{73.0}=0x31025476 +phy_chain_tx_lane_map_physical{74.0}=0x31025476 +phy_chain_tx_lane_map_physical{75.0}=0x31025476 +phy_chain_tx_lane_map_physical{76.0}=0x31025476 +phy_chain_tx_lane_map_physical{77.0}=0x31025476 +phy_chain_tx_lane_map_physical{78.0}=0x31025476 +phy_chain_tx_lane_map_physical{79.0}=0x31025476 +phy_chain_tx_lane_map_physical{80.0}=0x31025476 +serdes_core_rx_polarity_flip_physical{73}=0x1A +serdes_core_rx_polarity_flip_physical{74}=0x1A +serdes_core_rx_polarity_flip_physical{75}=0x1A +serdes_core_rx_polarity_flip_physical{76}=0x1A +serdes_core_rx_polarity_flip_physical{77}=0x1A +serdes_core_rx_polarity_flip_physical{78}=0x1A +serdes_core_rx_polarity_flip_physical{79}=0x1A +serdes_core_rx_polarity_flip_physical{80}=0x1A +serdes_core_tx_polarity_flip_physical{73}=0xFA +serdes_core_tx_polarity_flip_physical{74}=0xFA +serdes_core_tx_polarity_flip_physical{75}=0xFA +serdes_core_tx_polarity_flip_physical{76}=0xFA +serdes_core_tx_polarity_flip_physical{77}=0xFA +serdes_core_tx_polarity_flip_physical{78}=0xFA +serdes_core_tx_polarity_flip_physical{79}=0xFA +serdes_core_tx_polarity_flip_physical{80}=0xFA + +dport_map_port_48=43 +dport_map_port_49=44 +dport_map_port_50=41 +dport_map_port_51=42 +portmap_48=81:100 +portmap_49=83:100 +portmap_50=85:100 +portmap_51=87:100 +phy_chain_rx_lane_map_physical{81.0}=0x70124356 +phy_chain_rx_lane_map_physical{82.0}=0x70124356 +phy_chain_rx_lane_map_physical{83.0}=0x70124356 +phy_chain_rx_lane_map_physical{84.0}=0x70124356 +phy_chain_rx_lane_map_physical{85.0}=0x70124356 +phy_chain_rx_lane_map_physical{86.0}=0x70124356 +phy_chain_rx_lane_map_physical{87.0}=0x70124356 +phy_chain_rx_lane_map_physical{88.0}=0x70124356 +phy_chain_tx_lane_map_physical{81.0}=0x67541203 +phy_chain_tx_lane_map_physical{82.0}=0x67541203 +phy_chain_tx_lane_map_physical{83.0}=0x67541203 +phy_chain_tx_lane_map_physical{84.0}=0x67541203 +phy_chain_tx_lane_map_physical{85.0}=0x67541203 +phy_chain_tx_lane_map_physical{86.0}=0x67541203 +phy_chain_tx_lane_map_physical{87.0}=0x67541203 +phy_chain_tx_lane_map_physical{88.0}=0x67541203 +serdes_core_rx_polarity_flip_physical{81}=0x6D +serdes_core_rx_polarity_flip_physical{82}=0x6D +serdes_core_rx_polarity_flip_physical{83}=0x6D +serdes_core_rx_polarity_flip_physical{84}=0x6D +serdes_core_rx_polarity_flip_physical{85}=0x6D +serdes_core_rx_polarity_flip_physical{86}=0x6D +serdes_core_rx_polarity_flip_physical{87}=0x6D +serdes_core_rx_polarity_flip_physical{88}=0x6D +serdes_core_tx_polarity_flip_physical{81}=0xE4 +serdes_core_tx_polarity_flip_physical{82}=0xE4 +serdes_core_tx_polarity_flip_physical{83}=0xE4 +serdes_core_tx_polarity_flip_physical{84}=0xE4 +serdes_core_tx_polarity_flip_physical{85}=0xE4 +serdes_core_tx_polarity_flip_physical{86}=0xE4 +serdes_core_tx_polarity_flip_physical{87}=0xE4 +serdes_core_tx_polarity_flip_physical{88}=0xE4 + +dport_map_port_52=59 +dport_map_port_53=60 +dport_map_port_54=57 +dport_map_port_55=58 +portmap_52=89:100 +portmap_53=91:100 +portmap_54=93:100 +portmap_55=95:100 +phy_chain_rx_lane_map_physical{89.0}=0x45017263 +phy_chain_rx_lane_map_physical{90.0}=0x45017263 +phy_chain_rx_lane_map_physical{91.0}=0x45017263 +phy_chain_rx_lane_map_physical{92.0}=0x45017263 +phy_chain_rx_lane_map_physical{93.0}=0x45017263 +phy_chain_rx_lane_map_physical{94.0}=0x45017263 +phy_chain_rx_lane_map_physical{95.0}=0x45017263 +phy_chain_rx_lane_map_physical{96.0}=0x45017263 +phy_chain_tx_lane_map_physical{89.0}=0x62310457 +phy_chain_tx_lane_map_physical{90.0}=0x62310457 +phy_chain_tx_lane_map_physical{91.0}=0x62310457 +phy_chain_tx_lane_map_physical{92.0}=0x62310457 +phy_chain_tx_lane_map_physical{93.0}=0x62310457 +phy_chain_tx_lane_map_physical{94.0}=0x62310457 +phy_chain_tx_lane_map_physical{95.0}=0x62310457 +phy_chain_tx_lane_map_physical{96.0}=0x62310457 +serdes_core_rx_polarity_flip_physical{89}=0xEC +serdes_core_rx_polarity_flip_physical{90}=0xEC +serdes_core_rx_polarity_flip_physical{91}=0xEC +serdes_core_rx_polarity_flip_physical{92}=0xEC +serdes_core_rx_polarity_flip_physical{93}=0xEC +serdes_core_rx_polarity_flip_physical{94}=0xEC +serdes_core_rx_polarity_flip_physical{95}=0xEC +serdes_core_rx_polarity_flip_physical{96}=0xEC +serdes_core_tx_polarity_flip_physical{89}=0x35 +serdes_core_tx_polarity_flip_physical{90}=0x35 +serdes_core_tx_polarity_flip_physical{91}=0x35 +serdes_core_tx_polarity_flip_physical{92}=0x35 +serdes_core_tx_polarity_flip_physical{93}=0x35 +serdes_core_tx_polarity_flip_physical{94}=0x35 +serdes_core_tx_polarity_flip_physical{95}=0x35 +serdes_core_tx_polarity_flip_physical{96}=0x35 + +dport_map_port_60=15 +dport_map_port_61=16 +dport_map_port_62=13 +dport_map_port_63=14 +portmap_60=97:100 +portmap_61=99:100 +portmap_62=101:100 +portmap_63=103:100 +phy_chain_rx_lane_map_physical{97.0}=0x10234567 +phy_chain_rx_lane_map_physical{98.0}=0x10234567 +phy_chain_rx_lane_map_physical{99.0}=0x10234567 +phy_chain_rx_lane_map_physical{100.0}=0x10234567 +phy_chain_rx_lane_map_physical{101.0}=0x10234567 +phy_chain_rx_lane_map_physical{102.0}=0x10234567 +phy_chain_rx_lane_map_physical{103.0}=0x10234567 +phy_chain_rx_lane_map_physical{104.0}=0x10234567 +phy_chain_tx_lane_map_physical{97.0}=0x75462103 +phy_chain_tx_lane_map_physical{98.0}=0x75462103 +phy_chain_tx_lane_map_physical{99.0}=0x75462103 +phy_chain_tx_lane_map_physical{100.0}=0x75462103 +phy_chain_tx_lane_map_physical{101.0}=0x75462103 +phy_chain_tx_lane_map_physical{102.0}=0x75462103 +phy_chain_tx_lane_map_physical{103.0}=0x75462103 +phy_chain_tx_lane_map_physical{104.0}=0x75462103 +serdes_core_rx_polarity_flip_physical{97}=0x65 +serdes_core_rx_polarity_flip_physical{98}=0x65 +serdes_core_rx_polarity_flip_physical{99}=0x65 +serdes_core_rx_polarity_flip_physical{100}=0x65 +serdes_core_rx_polarity_flip_physical{101}=0x65 +serdes_core_rx_polarity_flip_physical{102}=0x65 +serdes_core_rx_polarity_flip_physical{103}=0x65 +serdes_core_rx_polarity_flip_physical{104}=0x65 +serdes_core_tx_polarity_flip_physical{97}=0xDD +serdes_core_tx_polarity_flip_physical{98}=0xDD +serdes_core_tx_polarity_flip_physical{99}=0xDD +serdes_core_tx_polarity_flip_physical{100}=0xDD +serdes_core_tx_polarity_flip_physical{101}=0xDD +serdes_core_tx_polarity_flip_physical{102}=0xDD +serdes_core_tx_polarity_flip_physical{103}=0xDD +serdes_core_tx_polarity_flip_physical{104}=0xDD + +dport_map_port_64=31 +dport_map_port_65=32 +dport_map_port_66=29 +dport_map_port_67=30 +portmap_64=105:100 +portmap_65=107:100 +portmap_66=109:100 +portmap_67=111:100 +phy_chain_rx_lane_map_physical{105.0}=0x32106745 +phy_chain_rx_lane_map_physical{106.0}=0x32106745 +phy_chain_rx_lane_map_physical{107.0}=0x32106745 +phy_chain_rx_lane_map_physical{108.0}=0x32106745 +phy_chain_rx_lane_map_physical{109.0}=0x32106745 +phy_chain_rx_lane_map_physical{110.0}=0x32106745 +phy_chain_rx_lane_map_physical{111.0}=0x32106745 +phy_chain_rx_lane_map_physical{112.0}=0x32106745 +phy_chain_tx_lane_map_physical{105.0}=0x23015746 +phy_chain_tx_lane_map_physical{106.0}=0x23015746 +phy_chain_tx_lane_map_physical{107.0}=0x23015746 +phy_chain_tx_lane_map_physical{108.0}=0x23015746 +phy_chain_tx_lane_map_physical{109.0}=0x23015746 +phy_chain_tx_lane_map_physical{110.0}=0x23015746 +phy_chain_tx_lane_map_physical{111.0}=0x23015746 +phy_chain_tx_lane_map_physical{112.0}=0x23015746 +serdes_core_rx_polarity_flip_physical{105}=0xDB +serdes_core_rx_polarity_flip_physical{106}=0xDB +serdes_core_rx_polarity_flip_physical{107}=0xDB +serdes_core_rx_polarity_flip_physical{108}=0xDB +serdes_core_rx_polarity_flip_physical{109}=0xDB +serdes_core_rx_polarity_flip_physical{110}=0xDB +serdes_core_rx_polarity_flip_physical{111}=0xDB +serdes_core_rx_polarity_flip_physical{112}=0xDB +serdes_core_tx_polarity_flip_physical{105}=0xDC +serdes_core_tx_polarity_flip_physical{106}=0xDC +serdes_core_tx_polarity_flip_physical{107}=0xDC +serdes_core_tx_polarity_flip_physical{108}=0xDC +serdes_core_tx_polarity_flip_physical{109}=0xDC +serdes_core_tx_polarity_flip_physical{110}=0xDC +serdes_core_tx_polarity_flip_physical{111}=0xDC +serdes_core_tx_polarity_flip_physical{112}=0xDC + +dport_map_port_68=47 +dport_map_port_69=48 +dport_map_port_70=45 +dport_map_port_71=46 +portmap_68=113:100 +portmap_69=115:100 +portmap_70=117:100 +portmap_71=119:100 +phy_chain_rx_lane_map_physical{113.0}=0x23104567 +phy_chain_rx_lane_map_physical{114.0}=0x23104567 +phy_chain_rx_lane_map_physical{115.0}=0x23104567 +phy_chain_rx_lane_map_physical{116.0}=0x23104567 +phy_chain_rx_lane_map_physical{117.0}=0x23104567 +phy_chain_rx_lane_map_physical{118.0}=0x23104567 +phy_chain_rx_lane_map_physical{119.0}=0x23104567 +phy_chain_rx_lane_map_physical{120.0}=0x23104567 +phy_chain_tx_lane_map_physical{113.0}=0x65704231 +phy_chain_tx_lane_map_physical{114.0}=0x65704231 +phy_chain_tx_lane_map_physical{115.0}=0x65704231 +phy_chain_tx_lane_map_physical{116.0}=0x65704231 +phy_chain_tx_lane_map_physical{117.0}=0x65704231 +phy_chain_tx_lane_map_physical{118.0}=0x65704231 +phy_chain_tx_lane_map_physical{119.0}=0x65704231 +phy_chain_tx_lane_map_physical{120.0}=0x65704231 +serdes_core_rx_polarity_flip_physical{113}=0x22 +serdes_core_rx_polarity_flip_physical{114}=0x22 +serdes_core_rx_polarity_flip_physical{115}=0x22 +serdes_core_rx_polarity_flip_physical{116}=0x22 +serdes_core_rx_polarity_flip_physical{117}=0x22 +serdes_core_rx_polarity_flip_physical{118}=0x22 +serdes_core_rx_polarity_flip_physical{119}=0x22 +serdes_core_rx_polarity_flip_physical{120}=0x22 +serdes_core_tx_polarity_flip_physical{113}=0x20 +serdes_core_tx_polarity_flip_physical{114}=0x20 +serdes_core_tx_polarity_flip_physical{115}=0x20 +serdes_core_tx_polarity_flip_physical{116}=0x20 +serdes_core_tx_polarity_flip_physical{117}=0x20 +serdes_core_tx_polarity_flip_physical{118}=0x20 +serdes_core_tx_polarity_flip_physical{119}=0x20 +serdes_core_tx_polarity_flip_physical{120}=0x20 + +dport_map_port_72=63 +dport_map_port_73=64 +dport_map_port_74=61 +dport_map_port_75=62 +portmap_72=121:100 +portmap_73=123:100 +portmap_74=125:100 +portmap_75=127:100 +phy_chain_rx_lane_map_physical{121.0}=0x32145670 +phy_chain_rx_lane_map_physical{122.0}=0x32145670 +phy_chain_rx_lane_map_physical{123.0}=0x32145670 +phy_chain_rx_lane_map_physical{124.0}=0x32145670 +phy_chain_rx_lane_map_physical{125.0}=0x32145670 +phy_chain_rx_lane_map_physical{126.0}=0x32145670 +phy_chain_rx_lane_map_physical{127.0}=0x32145670 +phy_chain_rx_lane_map_physical{128.0}=0x32145670 +phy_chain_tx_lane_map_physical{121.0}=0x15764023 +phy_chain_tx_lane_map_physical{122.0}=0x15764023 +phy_chain_tx_lane_map_physical{123.0}=0x15764023 +phy_chain_tx_lane_map_physical{124.0}=0x15764023 +phy_chain_tx_lane_map_physical{125.0}=0x15764023 +phy_chain_tx_lane_map_physical{126.0}=0x15764023 +phy_chain_tx_lane_map_physical{127.0}=0x15764023 +phy_chain_tx_lane_map_physical{128.0}=0x15764023 +serdes_core_rx_polarity_flip_physical{121}=0xB4 +serdes_core_rx_polarity_flip_physical{122}=0xB4 +serdes_core_rx_polarity_flip_physical{123}=0xB4 +serdes_core_rx_polarity_flip_physical{124}=0xB4 +serdes_core_rx_polarity_flip_physical{125}=0xB4 +serdes_core_rx_polarity_flip_physical{126}=0xB4 +serdes_core_rx_polarity_flip_physical{127}=0xB4 +serdes_core_rx_polarity_flip_physical{128}=0xB4 +serdes_core_tx_polarity_flip_physical{121}=0x19 +serdes_core_tx_polarity_flip_physical{122}=0x19 +serdes_core_tx_polarity_flip_physical{123}=0x19 +serdes_core_tx_polarity_flip_physical{124}=0x19 +serdes_core_tx_polarity_flip_physical{125}=0x19 +serdes_core_tx_polarity_flip_physical{126}=0x19 +serdes_core_tx_polarity_flip_physical{127}=0x19 +serdes_core_tx_polarity_flip_physical{128}=0x19 + +dport_map_port_80=67 +dport_map_port_81=68 +dport_map_port_82=65 +dport_map_port_83=66 +portmap_80=129:100 +portmap_81=131:100 +portmap_82=133:100 +portmap_83=135:100 +phy_chain_rx_lane_map_physical{129.0}=0x07654123 +phy_chain_rx_lane_map_physical{130.0}=0x07654123 +phy_chain_rx_lane_map_physical{131.0}=0x07654123 +phy_chain_rx_lane_map_physical{132.0}=0x07654123 +phy_chain_rx_lane_map_physical{133.0}=0x07654123 +phy_chain_rx_lane_map_physical{134.0}=0x07654123 +phy_chain_rx_lane_map_physical{135.0}=0x07654123 +phy_chain_rx_lane_map_physical{136.0}=0x07654123 +phy_chain_tx_lane_map_physical{129.0}=0x31204675 +phy_chain_tx_lane_map_physical{130.0}=0x31204675 +phy_chain_tx_lane_map_physical{131.0}=0x31204675 +phy_chain_tx_lane_map_physical{132.0}=0x31204675 +phy_chain_tx_lane_map_physical{133.0}=0x31204675 +phy_chain_tx_lane_map_physical{134.0}=0x31204675 +phy_chain_tx_lane_map_physical{135.0}=0x31204675 +phy_chain_tx_lane_map_physical{136.0}=0x31204675 +serdes_core_rx_polarity_flip_physical{129}=0xDA +serdes_core_rx_polarity_flip_physical{130}=0xDA +serdes_core_rx_polarity_flip_physical{131}=0xDA +serdes_core_rx_polarity_flip_physical{132}=0xDA +serdes_core_rx_polarity_flip_physical{133}=0xDA +serdes_core_rx_polarity_flip_physical{134}=0xDA +serdes_core_rx_polarity_flip_physical{135}=0xDA +serdes_core_rx_polarity_flip_physical{136}=0xDA +serdes_core_tx_polarity_flip_physical{129}=0x67 +serdes_core_tx_polarity_flip_physical{130}=0x67 +serdes_core_tx_polarity_flip_physical{131}=0x67 +serdes_core_tx_polarity_flip_physical{132}=0x67 +serdes_core_tx_polarity_flip_physical{133}=0x67 +serdes_core_tx_polarity_flip_physical{134}=0x67 +serdes_core_tx_polarity_flip_physical{135}=0x67 +serdes_core_tx_polarity_flip_physical{136}=0x67 + +dport_map_port_84=83 +dport_map_port_85=84 +dport_map_port_86=81 +dport_map_port_87=82 +portmap_84=137:100 +portmap_85=139:100 +portmap_86=141:100 +portmap_87=143:100 +phy_chain_rx_lane_map_physical{137.0}=0x65432107 +phy_chain_rx_lane_map_physical{138.0}=0x65432107 +phy_chain_rx_lane_map_physical{139.0}=0x65432107 +phy_chain_rx_lane_map_physical{140.0}=0x65432107 +phy_chain_rx_lane_map_physical{141.0}=0x65432107 +phy_chain_rx_lane_map_physical{142.0}=0x65432107 +phy_chain_rx_lane_map_physical{143.0}=0x65432107 +phy_chain_rx_lane_map_physical{144.0}=0x65432107 +phy_chain_tx_lane_map_physical{137.0}=0x32140756 +phy_chain_tx_lane_map_physical{138.0}=0x32140756 +phy_chain_tx_lane_map_physical{139.0}=0x32140756 +phy_chain_tx_lane_map_physical{140.0}=0x32140756 +phy_chain_tx_lane_map_physical{141.0}=0x32140756 +phy_chain_tx_lane_map_physical{142.0}=0x32140756 +phy_chain_tx_lane_map_physical{143.0}=0x32140756 +phy_chain_tx_lane_map_physical{144.0}=0x32140756 +serdes_core_rx_polarity_flip_physical{137}=0x68 +serdes_core_rx_polarity_flip_physical{138}=0x68 +serdes_core_rx_polarity_flip_physical{139}=0x68 +serdes_core_rx_polarity_flip_physical{140}=0x68 +serdes_core_rx_polarity_flip_physical{141}=0x68 +serdes_core_rx_polarity_flip_physical{142}=0x68 +serdes_core_rx_polarity_flip_physical{143}=0x68 +serdes_core_rx_polarity_flip_physical{144}=0x68 +serdes_core_tx_polarity_flip_physical{137}=0x2C +serdes_core_tx_polarity_flip_physical{138}=0x2C +serdes_core_tx_polarity_flip_physical{139}=0x2C +serdes_core_tx_polarity_flip_physical{140}=0x2C +serdes_core_tx_polarity_flip_physical{141}=0x2C +serdes_core_tx_polarity_flip_physical{142}=0x2C +serdes_core_tx_polarity_flip_physical{143}=0x2C +serdes_core_tx_polarity_flip_physical{144}=0x2C + +dport_map_port_88=99 +dport_map_port_89=100 +dport_map_port_90=97 +dport_map_port_91=98 +portmap_88=145:100 +portmap_89=147:100 +portmap_90=149:100 +portmap_91=151:100 +phy_chain_rx_lane_map_physical{145.0}=0x02145673 +phy_chain_rx_lane_map_physical{146.0}=0x02145673 +phy_chain_rx_lane_map_physical{147.0}=0x02145673 +phy_chain_rx_lane_map_physical{148.0}=0x02145673 +phy_chain_rx_lane_map_physical{149.0}=0x02145673 +phy_chain_rx_lane_map_physical{150.0}=0x02145673 +phy_chain_rx_lane_map_physical{151.0}=0x02145673 +phy_chain_rx_lane_map_physical{152.0}=0x02145673 +phy_chain_tx_lane_map_physical{145.0}=0x17654023 +phy_chain_tx_lane_map_physical{146.0}=0x17654023 +phy_chain_tx_lane_map_physical{147.0}=0x17654023 +phy_chain_tx_lane_map_physical{148.0}=0x17654023 +phy_chain_tx_lane_map_physical{149.0}=0x17654023 +phy_chain_tx_lane_map_physical{150.0}=0x17654023 +phy_chain_tx_lane_map_physical{151.0}=0x17654023 +phy_chain_tx_lane_map_physical{152.0}=0x17654023 +serdes_core_rx_polarity_flip_physical{145}=0x9A +serdes_core_rx_polarity_flip_physical{146}=0x9A +serdes_core_rx_polarity_flip_physical{147}=0x9A +serdes_core_rx_polarity_flip_physical{148}=0x9A +serdes_core_rx_polarity_flip_physical{149}=0x9A +serdes_core_rx_polarity_flip_physical{150}=0x9A +serdes_core_rx_polarity_flip_physical{151}=0x9A +serdes_core_rx_polarity_flip_physical{152}=0x9A +serdes_core_tx_polarity_flip_physical{145}=0xD6 +serdes_core_tx_polarity_flip_physical{146}=0xD6 +serdes_core_tx_polarity_flip_physical{147}=0xD6 +serdes_core_tx_polarity_flip_physical{148}=0xD6 +serdes_core_tx_polarity_flip_physical{149}=0xD6 +serdes_core_tx_polarity_flip_physical{150}=0xD6 +serdes_core_tx_polarity_flip_physical{151}=0xD6 +serdes_core_tx_polarity_flip_physical{152}=0xD6 + +dport_map_port_92=115 +dport_map_port_93=116 +dport_map_port_94=113 +dport_map_port_95=114 +portmap_92=153:100 +portmap_93=155:100 +portmap_94=157:100 +portmap_95=159:100 +phy_chain_rx_lane_map_physical{153.0}=0x67451023 +phy_chain_rx_lane_map_physical{154.0}=0x67451023 +phy_chain_rx_lane_map_physical{155.0}=0x67451023 +phy_chain_rx_lane_map_physical{156.0}=0x67451023 +phy_chain_rx_lane_map_physical{157.0}=0x67451023 +phy_chain_rx_lane_map_physical{158.0}=0x67451023 +phy_chain_rx_lane_map_physical{159.0}=0x67451023 +phy_chain_rx_lane_map_physical{160.0}=0x67451023 +phy_chain_tx_lane_map_physical{153.0}=0x13205746 +phy_chain_tx_lane_map_physical{154.0}=0x13205746 +phy_chain_tx_lane_map_physical{155.0}=0x13205746 +phy_chain_tx_lane_map_physical{156.0}=0x13205746 +phy_chain_tx_lane_map_physical{157.0}=0x13205746 +phy_chain_tx_lane_map_physical{158.0}=0x13205746 +phy_chain_tx_lane_map_physical{159.0}=0x13205746 +phy_chain_tx_lane_map_physical{160.0}=0x13205746 +serdes_core_rx_polarity_flip_physical{153}=0xE4 +serdes_core_rx_polarity_flip_physical{154}=0xE4 +serdes_core_rx_polarity_flip_physical{155}=0xE4 +serdes_core_rx_polarity_flip_physical{156}=0xE4 +serdes_core_rx_polarity_flip_physical{157}=0xE4 +serdes_core_rx_polarity_flip_physical{158}=0xE4 +serdes_core_rx_polarity_flip_physical{159}=0xE4 +serdes_core_rx_polarity_flip_physical{160}=0xE4 +serdes_core_tx_polarity_flip_physical{153}=0xCC +serdes_core_tx_polarity_flip_physical{154}=0xCC +serdes_core_tx_polarity_flip_physical{155}=0xCC +serdes_core_tx_polarity_flip_physical{156}=0xCC +serdes_core_tx_polarity_flip_physical{157}=0xCC +serdes_core_tx_polarity_flip_physical{158}=0xCC +serdes_core_tx_polarity_flip_physical{159}=0xCC +serdes_core_tx_polarity_flip_physical{160}=0xCC + +dport_map_port_100=71 +dport_map_port_101=72 +dport_map_port_102=69 +dport_map_port_103=70 +portmap_100=161:100 +portmap_101=163:100 +portmap_102=165:100 +portmap_103=167:100 +phy_chain_rx_lane_map_physical{161.0}=0x54321067 +phy_chain_rx_lane_map_physical{162.0}=0x54321067 +phy_chain_rx_lane_map_physical{163.0}=0x54321067 +phy_chain_rx_lane_map_physical{164.0}=0x54321067 +phy_chain_rx_lane_map_physical{165.0}=0x54321067 +phy_chain_rx_lane_map_physical{166.0}=0x54321067 +phy_chain_rx_lane_map_physical{167.0}=0x54321067 +phy_chain_rx_lane_map_physical{168.0}=0x54321067 +phy_chain_tx_lane_map_physical{161.0}=0x40123765 +phy_chain_tx_lane_map_physical{162.0}=0x40123765 +phy_chain_tx_lane_map_physical{163.0}=0x40123765 +phy_chain_tx_lane_map_physical{164.0}=0x40123765 +phy_chain_tx_lane_map_physical{165.0}=0x40123765 +phy_chain_tx_lane_map_physical{166.0}=0x40123765 +phy_chain_tx_lane_map_physical{167.0}=0x40123765 +phy_chain_tx_lane_map_physical{168.0}=0x40123765 +serdes_core_rx_polarity_flip_physical{161}=0x1B +serdes_core_rx_polarity_flip_physical{162}=0x1B +serdes_core_rx_polarity_flip_physical{163}=0x1B +serdes_core_rx_polarity_flip_physical{164}=0x1B +serdes_core_rx_polarity_flip_physical{165}=0x1B +serdes_core_rx_polarity_flip_physical{166}=0x1B +serdes_core_rx_polarity_flip_physical{167}=0x1B +serdes_core_rx_polarity_flip_physical{168}=0x1B +serdes_core_tx_polarity_flip_physical{161}=0xD5 +serdes_core_tx_polarity_flip_physical{162}=0xD5 +serdes_core_tx_polarity_flip_physical{163}=0xD5 +serdes_core_tx_polarity_flip_physical{164}=0xD5 +serdes_core_tx_polarity_flip_physical{165}=0xD5 +serdes_core_tx_polarity_flip_physical{166}=0xD5 +serdes_core_tx_polarity_flip_physical{167}=0xD5 +serdes_core_tx_polarity_flip_physical{168}=0xD5 + +dport_map_port_104=87 +dport_map_port_105=88 +dport_map_port_106=85 +dport_map_port_107=86 +portmap_104=169:100 +portmap_105=171:100 +portmap_106=173:100 +portmap_107=175:100 +phy_chain_rx_lane_map_physical{169.0}=0x76543210 +phy_chain_rx_lane_map_physical{170.0}=0x76543210 +phy_chain_rx_lane_map_physical{171.0}=0x76543210 +phy_chain_rx_lane_map_physical{172.0}=0x76543210 +phy_chain_rx_lane_map_physical{173.0}=0x76543210 +phy_chain_rx_lane_map_physical{174.0}=0x76543210 +phy_chain_rx_lane_map_physical{175.0}=0x76543210 +phy_chain_rx_lane_map_physical{176.0}=0x76543210 +phy_chain_tx_lane_map_physical{169.0}=0x32046751 +phy_chain_tx_lane_map_physical{170.0}=0x32046751 +phy_chain_tx_lane_map_physical{171.0}=0x32046751 +phy_chain_tx_lane_map_physical{172.0}=0x32046751 +phy_chain_tx_lane_map_physical{173.0}=0x32046751 +phy_chain_tx_lane_map_physical{174.0}=0x32046751 +phy_chain_tx_lane_map_physical{175.0}=0x32046751 +phy_chain_tx_lane_map_physical{176.0}=0x32046751 +serdes_core_rx_polarity_flip_physical{169}=0x53 +serdes_core_rx_polarity_flip_physical{170}=0x53 +serdes_core_rx_polarity_flip_physical{171}=0x53 +serdes_core_rx_polarity_flip_physical{172}=0x53 +serdes_core_rx_polarity_flip_physical{173}=0x53 +serdes_core_rx_polarity_flip_physical{174}=0x53 +serdes_core_rx_polarity_flip_physical{175}=0x53 +serdes_core_rx_polarity_flip_physical{176}=0x53 +serdes_core_tx_polarity_flip_physical{169}=0x19 +serdes_core_tx_polarity_flip_physical{170}=0x19 +serdes_core_tx_polarity_flip_physical{171}=0x19 +serdes_core_tx_polarity_flip_physical{172}=0x19 +serdes_core_tx_polarity_flip_physical{173}=0x19 +serdes_core_tx_polarity_flip_physical{174}=0x19 +serdes_core_tx_polarity_flip_physical{175}=0x19 +serdes_core_tx_polarity_flip_physical{176}=0x19 + +dport_map_port_108=103 +dport_map_port_109=104 +dport_map_port_110=101 +dport_map_port_111=102 +portmap_108=177:100 +portmap_109=179:100 +portmap_110=181:100 +portmap_111=183:100 +phy_chain_rx_lane_map_physical{177.0}=0x30126457 +phy_chain_rx_lane_map_physical{178.0}=0x30126457 +phy_chain_rx_lane_map_physical{179.0}=0x30126457 +phy_chain_rx_lane_map_physical{180.0}=0x30126457 +phy_chain_rx_lane_map_physical{181.0}=0x30126457 +phy_chain_rx_lane_map_physical{182.0}=0x30126457 +phy_chain_rx_lane_map_physical{183.0}=0x30126457 +phy_chain_rx_lane_map_physical{184.0}=0x30126457 +phy_chain_tx_lane_map_physical{177.0}=0x67504123 +phy_chain_tx_lane_map_physical{178.0}=0x67504123 +phy_chain_tx_lane_map_physical{179.0}=0x67504123 +phy_chain_tx_lane_map_physical{180.0}=0x67504123 +phy_chain_tx_lane_map_physical{181.0}=0x67504123 +phy_chain_tx_lane_map_physical{182.0}=0x67504123 +phy_chain_tx_lane_map_physical{183.0}=0x67504123 +phy_chain_tx_lane_map_physical{184.0}=0x67504123 +serdes_core_rx_polarity_flip_physical{177}=0x6F +serdes_core_rx_polarity_flip_physical{178}=0x6F +serdes_core_rx_polarity_flip_physical{179}=0x6F +serdes_core_rx_polarity_flip_physical{180}=0x6F +serdes_core_rx_polarity_flip_physical{181}=0x6F +serdes_core_rx_polarity_flip_physical{182}=0x6F +serdes_core_rx_polarity_flip_physical{183}=0x6F +serdes_core_rx_polarity_flip_physical{184}=0x6F +serdes_core_tx_polarity_flip_physical{177}=0x26 +serdes_core_tx_polarity_flip_physical{178}=0x26 +serdes_core_tx_polarity_flip_physical{179}=0x26 +serdes_core_tx_polarity_flip_physical{180}=0x26 +serdes_core_tx_polarity_flip_physical{181}=0x26 +serdes_core_tx_polarity_flip_physical{182}=0x26 +serdes_core_tx_polarity_flip_physical{183}=0x26 +serdes_core_tx_polarity_flip_physical{184}=0x26 + +dport_map_port_112=119 +dport_map_port_113=120 +dport_map_port_114=117 +dport_map_port_115=118 +portmap_112=185:100 +portmap_113=187:100 +portmap_114=189:100 +portmap_115=191:100 +phy_chain_rx_lane_map_physical{185.0}=0x45601273 +phy_chain_rx_lane_map_physical{186.0}=0x45601273 +phy_chain_rx_lane_map_physical{187.0}=0x45601273 +phy_chain_rx_lane_map_physical{188.0}=0x45601273 +phy_chain_rx_lane_map_physical{189.0}=0x45601273 +phy_chain_rx_lane_map_physical{190.0}=0x45601273 +phy_chain_rx_lane_map_physical{191.0}=0x45601273 +phy_chain_rx_lane_map_physical{192.0}=0x45601273 +phy_chain_tx_lane_map_physical{185.0}=0x15234076 +phy_chain_tx_lane_map_physical{186.0}=0x15234076 +phy_chain_tx_lane_map_physical{187.0}=0x15234076 +phy_chain_tx_lane_map_physical{188.0}=0x15234076 +phy_chain_tx_lane_map_physical{189.0}=0x15234076 +phy_chain_tx_lane_map_physical{190.0}=0x15234076 +phy_chain_tx_lane_map_physical{191.0}=0x15234076 +phy_chain_tx_lane_map_physical{192.0}=0x15234076 +serdes_core_rx_polarity_flip_physical{185}=0x49 +serdes_core_rx_polarity_flip_physical{186}=0x49 +serdes_core_rx_polarity_flip_physical{187}=0x49 +serdes_core_rx_polarity_flip_physical{188}=0x49 +serdes_core_rx_polarity_flip_physical{189}=0x49 +serdes_core_rx_polarity_flip_physical{190}=0x49 +serdes_core_rx_polarity_flip_physical{191}=0x49 +serdes_core_rx_polarity_flip_physical{192}=0x49 +serdes_core_tx_polarity_flip_physical{185}=0xE6 +serdes_core_tx_polarity_flip_physical{186}=0xE6 +serdes_core_tx_polarity_flip_physical{187}=0xE6 +serdes_core_tx_polarity_flip_physical{188}=0xE6 +serdes_core_tx_polarity_flip_physical{189}=0xE6 +serdes_core_tx_polarity_flip_physical{190}=0xE6 +serdes_core_tx_polarity_flip_physical{191}=0xE6 +serdes_core_tx_polarity_flip_physical{192}=0xE6 + +dport_map_port_120=75 +dport_map_port_121=76 +dport_map_port_122=73 +dport_map_port_123=74 +portmap_120=193:100 +portmap_121=195:100 +portmap_122=197:100 +portmap_123=199:100 +phy_chain_rx_lane_map_physical{193.0}=0x54632107 +phy_chain_rx_lane_map_physical{194.0}=0x54632107 +phy_chain_rx_lane_map_physical{195.0}=0x54632107 +phy_chain_rx_lane_map_physical{196.0}=0x54632107 +phy_chain_rx_lane_map_physical{197.0}=0x54632107 +phy_chain_rx_lane_map_physical{198.0}=0x54632107 +phy_chain_rx_lane_map_physical{199.0}=0x54632107 +phy_chain_rx_lane_map_physical{200.0}=0x54632107 +phy_chain_tx_lane_map_physical{193.0}=0x41023567 +phy_chain_tx_lane_map_physical{194.0}=0x41023567 +phy_chain_tx_lane_map_physical{195.0}=0x41023567 +phy_chain_tx_lane_map_physical{196.0}=0x41023567 +phy_chain_tx_lane_map_physical{197.0}=0x41023567 +phy_chain_tx_lane_map_physical{198.0}=0x41023567 +phy_chain_tx_lane_map_physical{199.0}=0x41023567 +phy_chain_tx_lane_map_physical{200.0}=0x41023567 +serdes_core_rx_polarity_flip_physical{193}=0xD5 +serdes_core_rx_polarity_flip_physical{194}=0xD5 +serdes_core_rx_polarity_flip_physical{195}=0xD5 +serdes_core_rx_polarity_flip_physical{196}=0xD5 +serdes_core_rx_polarity_flip_physical{197}=0xD5 +serdes_core_rx_polarity_flip_physical{198}=0xD5 +serdes_core_rx_polarity_flip_physical{199}=0xD5 +serdes_core_rx_polarity_flip_physical{200}=0xD5 +serdes_core_tx_polarity_flip_physical{193}=0x1C +serdes_core_tx_polarity_flip_physical{194}=0x1C +serdes_core_tx_polarity_flip_physical{195}=0x1C +serdes_core_tx_polarity_flip_physical{196}=0x1C +serdes_core_tx_polarity_flip_physical{197}=0x1C +serdes_core_tx_polarity_flip_physical{198}=0x1C +serdes_core_tx_polarity_flip_physical{199}=0x1C +serdes_core_tx_polarity_flip_physical{200}=0x1C + +dport_map_port_124=91 +dport_map_port_125=92 +dport_map_port_126=89 +dport_map_port_127=90 +portmap_124=201:100 +portmap_125=203:100 +portmap_126=205:100 +portmap_127=207:100 +phy_chain_rx_lane_map_physical{201.0}=0x76543201 +phy_chain_rx_lane_map_physical{202.0}=0x76543201 +phy_chain_rx_lane_map_physical{203.0}=0x76543201 +phy_chain_rx_lane_map_physical{204.0}=0x76543201 +phy_chain_rx_lane_map_physical{205.0}=0x76543201 +phy_chain_rx_lane_map_physical{206.0}=0x76543201 +phy_chain_rx_lane_map_physical{207.0}=0x76543201 +phy_chain_rx_lane_map_physical{208.0}=0x76543201 +phy_chain_tx_lane_map_physical{201.0}=0x32046751 +phy_chain_tx_lane_map_physical{202.0}=0x32046751 +phy_chain_tx_lane_map_physical{203.0}=0x32046751 +phy_chain_tx_lane_map_physical{204.0}=0x32046751 +phy_chain_tx_lane_map_physical{205.0}=0x32046751 +phy_chain_tx_lane_map_physical{206.0}=0x32046751 +phy_chain_tx_lane_map_physical{207.0}=0x32046751 +phy_chain_tx_lane_map_physical{208.0}=0x32046751 +serdes_core_rx_polarity_flip_physical{201}=0xDA +serdes_core_rx_polarity_flip_physical{202}=0xDA +serdes_core_rx_polarity_flip_physical{203}=0xDA +serdes_core_rx_polarity_flip_physical{204}=0xDA +serdes_core_rx_polarity_flip_physical{205}=0xDA +serdes_core_rx_polarity_flip_physical{206}=0xDA +serdes_core_rx_polarity_flip_physical{207}=0xDA +serdes_core_rx_polarity_flip_physical{208}=0xDA +serdes_core_tx_polarity_flip_physical{201}=0xE6 +serdes_core_tx_polarity_flip_physical{202}=0xE6 +serdes_core_tx_polarity_flip_physical{203}=0xE6 +serdes_core_tx_polarity_flip_physical{204}=0xE6 +serdes_core_tx_polarity_flip_physical{205}=0xE6 +serdes_core_tx_polarity_flip_physical{206}=0xE6 +serdes_core_tx_polarity_flip_physical{207}=0xE6 +serdes_core_tx_polarity_flip_physical{208}=0xE6 + +dport_map_port_128=107 +dport_map_port_129=108 +dport_map_port_130=105 +dport_map_port_131=106 +portmap_128=209:100 +portmap_129=211:100 +portmap_130=213:100 +portmap_131=215:100 +phy_chain_rx_lane_map_physical{209.0}=0x30124756 +phy_chain_rx_lane_map_physical{210.0}=0x30124756 +phy_chain_rx_lane_map_physical{211.0}=0x30124756 +phy_chain_rx_lane_map_physical{212.0}=0x30124756 +phy_chain_rx_lane_map_physical{213.0}=0x30124756 +phy_chain_rx_lane_map_physical{214.0}=0x30124756 +phy_chain_rx_lane_map_physical{215.0}=0x30124756 +phy_chain_rx_lane_map_physical{216.0}=0x30124756 +phy_chain_tx_lane_map_physical{209.0}=0x67504213 +phy_chain_tx_lane_map_physical{210.0}=0x67504213 +phy_chain_tx_lane_map_physical{211.0}=0x67504213 +phy_chain_tx_lane_map_physical{212.0}=0x67504213 +phy_chain_tx_lane_map_physical{213.0}=0x67504213 +phy_chain_tx_lane_map_physical{214.0}=0x67504213 +phy_chain_tx_lane_map_physical{215.0}=0x67504213 +phy_chain_tx_lane_map_physical{216.0}=0x67504213 +serdes_core_rx_polarity_flip_physical{209}=0xED +serdes_core_rx_polarity_flip_physical{210}=0xED +serdes_core_rx_polarity_flip_physical{211}=0xED +serdes_core_rx_polarity_flip_physical{212}=0xED +serdes_core_rx_polarity_flip_physical{213}=0xED +serdes_core_rx_polarity_flip_physical{214}=0xED +serdes_core_rx_polarity_flip_physical{215}=0xED +serdes_core_rx_polarity_flip_physical{216}=0xED +serdes_core_tx_polarity_flip_physical{209}=0xDF +serdes_core_tx_polarity_flip_physical{210}=0xDF +serdes_core_tx_polarity_flip_physical{211}=0xDF +serdes_core_tx_polarity_flip_physical{212}=0xDF +serdes_core_tx_polarity_flip_physical{213}=0xDF +serdes_core_tx_polarity_flip_physical{214}=0xDF +serdes_core_tx_polarity_flip_physical{215}=0xDF +serdes_core_tx_polarity_flip_physical{216}=0xDF + +dport_map_port_132=123 +dport_map_port_133=124 +dport_map_port_134=121 +dport_map_port_135=122 +portmap_132=217:100 +portmap_133=219:100 +portmap_134=221:100 +portmap_135=223:100 +phy_chain_rx_lane_map_physical{217.0}=0x65401273 +phy_chain_rx_lane_map_physical{218.0}=0x65401273 +phy_chain_rx_lane_map_physical{219.0}=0x65401273 +phy_chain_rx_lane_map_physical{220.0}=0x65401273 +phy_chain_rx_lane_map_physical{221.0}=0x65401273 +phy_chain_rx_lane_map_physical{222.0}=0x65401273 +phy_chain_rx_lane_map_physical{223.0}=0x65401273 +phy_chain_rx_lane_map_physical{224.0}=0x65401273 +phy_chain_tx_lane_map_physical{217.0}=0x13524076 +phy_chain_tx_lane_map_physical{218.0}=0x13524076 +phy_chain_tx_lane_map_physical{219.0}=0x13524076 +phy_chain_tx_lane_map_physical{220.0}=0x13524076 +phy_chain_tx_lane_map_physical{221.0}=0x13524076 +phy_chain_tx_lane_map_physical{222.0}=0x13524076 +phy_chain_tx_lane_map_physical{223.0}=0x13524076 +phy_chain_tx_lane_map_physical{224.0}=0x13524076 +serdes_core_rx_polarity_flip_physical{217}=0xD7 +serdes_core_rx_polarity_flip_physical{218}=0xD7 +serdes_core_rx_polarity_flip_physical{219}=0xD7 +serdes_core_rx_polarity_flip_physical{220}=0xD7 +serdes_core_rx_polarity_flip_physical{221}=0xD7 +serdes_core_rx_polarity_flip_physical{222}=0xD7 +serdes_core_rx_polarity_flip_physical{223}=0xD7 +serdes_core_rx_polarity_flip_physical{224}=0xD7 +serdes_core_tx_polarity_flip_physical{217}=0x49 +serdes_core_tx_polarity_flip_physical{218}=0x49 +serdes_core_tx_polarity_flip_physical{219}=0x49 +serdes_core_tx_polarity_flip_physical{220}=0x49 +serdes_core_tx_polarity_flip_physical{221}=0x49 +serdes_core_tx_polarity_flip_physical{222}=0x49 +serdes_core_tx_polarity_flip_physical{223}=0x49 +serdes_core_tx_polarity_flip_physical{224}=0x49 + +dport_map_port_140=79 +dport_map_port_141=80 +dport_map_port_142=77 +dport_map_port_143=78 +portmap_140=225:100 +portmap_141=227:100 +portmap_142=229:100 +portmap_143=231:100 +phy_chain_rx_lane_map_physical{225.0}=0x21036745 +phy_chain_rx_lane_map_physical{226.0}=0x21036745 +phy_chain_rx_lane_map_physical{227.0}=0x21036745 +phy_chain_rx_lane_map_physical{228.0}=0x21036745 +phy_chain_rx_lane_map_physical{229.0}=0x21036745 +phy_chain_rx_lane_map_physical{230.0}=0x21036745 +phy_chain_rx_lane_map_physical{231.0}=0x21036745 +phy_chain_rx_lane_map_physical{232.0}=0x21036745 +phy_chain_tx_lane_map_physical{225.0}=0x56701234 +phy_chain_tx_lane_map_physical{226.0}=0x56701234 +phy_chain_tx_lane_map_physical{227.0}=0x56701234 +phy_chain_tx_lane_map_physical{228.0}=0x56701234 +phy_chain_tx_lane_map_physical{229.0}=0x56701234 +phy_chain_tx_lane_map_physical{230.0}=0x56701234 +phy_chain_tx_lane_map_physical{231.0}=0x56701234 +phy_chain_tx_lane_map_physical{232.0}=0x56701234 +serdes_core_rx_polarity_flip_physical{225}=0xE5 +serdes_core_rx_polarity_flip_physical{226}=0xE5 +serdes_core_rx_polarity_flip_physical{227}=0xE5 +serdes_core_rx_polarity_flip_physical{228}=0xE5 +serdes_core_rx_polarity_flip_physical{229}=0xE5 +serdes_core_rx_polarity_flip_physical{230}=0xE5 +serdes_core_rx_polarity_flip_physical{231}=0xE5 +serdes_core_rx_polarity_flip_physical{232}=0xE5 +serdes_core_tx_polarity_flip_physical{225}=0x4A +serdes_core_tx_polarity_flip_physical{226}=0x4A +serdes_core_tx_polarity_flip_physical{227}=0x4A +serdes_core_tx_polarity_flip_physical{228}=0x4A +serdes_core_tx_polarity_flip_physical{229}=0x4A +serdes_core_tx_polarity_flip_physical{230}=0x4A +serdes_core_tx_polarity_flip_physical{231}=0x4A +serdes_core_tx_polarity_flip_physical{232}=0x4A + +dport_map_port_144=95 +dport_map_port_145=96 +dport_map_port_146=93 +dport_map_port_147=94 +portmap_144=233:100 +portmap_145=235:100 +portmap_146=237:100 +portmap_147=239:100 +phy_chain_rx_lane_map_physical{233.0}=0x76541230 +phy_chain_rx_lane_map_physical{234.0}=0x76541230 +phy_chain_rx_lane_map_physical{235.0}=0x76541230 +phy_chain_rx_lane_map_physical{236.0}=0x76541230 +phy_chain_rx_lane_map_physical{237.0}=0x76541230 +phy_chain_rx_lane_map_physical{238.0}=0x76541230 +phy_chain_rx_lane_map_physical{239.0}=0x76541230 +phy_chain_rx_lane_map_physical{240.0}=0x76541230 +phy_chain_tx_lane_map_physical{233.0}=0x20314675 +phy_chain_tx_lane_map_physical{234.0}=0x20314675 +phy_chain_tx_lane_map_physical{235.0}=0x20314675 +phy_chain_tx_lane_map_physical{236.0}=0x20314675 +phy_chain_tx_lane_map_physical{237.0}=0x20314675 +phy_chain_tx_lane_map_physical{238.0}=0x20314675 +phy_chain_tx_lane_map_physical{239.0}=0x20314675 +phy_chain_tx_lane_map_physical{240.0}=0x20314675 +serdes_core_rx_polarity_flip_physical{233}=0xC9 +serdes_core_rx_polarity_flip_physical{234}=0xC9 +serdes_core_rx_polarity_flip_physical{235}=0xC9 +serdes_core_rx_polarity_flip_physical{236}=0xC9 +serdes_core_rx_polarity_flip_physical{237}=0xC9 +serdes_core_rx_polarity_flip_physical{238}=0xC9 +serdes_core_rx_polarity_flip_physical{239}=0xC9 +serdes_core_rx_polarity_flip_physical{240}=0xC9 +serdes_core_tx_polarity_flip_physical{233}=0xBD +serdes_core_tx_polarity_flip_physical{234}=0xBD +serdes_core_tx_polarity_flip_physical{235}=0xBD +serdes_core_tx_polarity_flip_physical{236}=0xBD +serdes_core_tx_polarity_flip_physical{237}=0xBD +serdes_core_tx_polarity_flip_physical{238}=0xBD +serdes_core_tx_polarity_flip_physical{239}=0xBD +serdes_core_tx_polarity_flip_physical{240}=0xBD + +dport_map_port_148=111 +dport_map_port_149=112 +dport_map_port_150=109 +dport_map_port_151=110 +portmap_148=241:100 +portmap_149=243:100 +portmap_150=245:100 +portmap_151=247:100 +phy_chain_rx_lane_map_physical{241.0}=0x21036754 +phy_chain_rx_lane_map_physical{242.0}=0x21036754 +phy_chain_rx_lane_map_physical{243.0}=0x21036754 +phy_chain_rx_lane_map_physical{244.0}=0x21036754 +phy_chain_rx_lane_map_physical{245.0}=0x21036754 +phy_chain_rx_lane_map_physical{246.0}=0x21036754 +phy_chain_rx_lane_map_physical{247.0}=0x21036754 +phy_chain_rx_lane_map_physical{248.0}=0x21036754 +phy_chain_tx_lane_map_physical{241.0}=0x56740123 +phy_chain_tx_lane_map_physical{242.0}=0x56740123 +phy_chain_tx_lane_map_physical{243.0}=0x56740123 +phy_chain_tx_lane_map_physical{244.0}=0x56740123 +phy_chain_tx_lane_map_physical{245.0}=0x56740123 +phy_chain_tx_lane_map_physical{246.0}=0x56740123 +phy_chain_tx_lane_map_physical{247.0}=0x56740123 +phy_chain_tx_lane_map_physical{248.0}=0x56740123 +serdes_core_rx_polarity_flip_physical{241}=0x15 +serdes_core_rx_polarity_flip_physical{242}=0x15 +serdes_core_rx_polarity_flip_physical{243}=0x15 +serdes_core_rx_polarity_flip_physical{244}=0x15 +serdes_core_rx_polarity_flip_physical{245}=0x15 +serdes_core_rx_polarity_flip_physical{246}=0x15 +serdes_core_rx_polarity_flip_physical{247}=0x15 +serdes_core_rx_polarity_flip_physical{248}=0x15 +serdes_core_tx_polarity_flip_physical{241}=0xEA +serdes_core_tx_polarity_flip_physical{242}=0xEA +serdes_core_tx_polarity_flip_physical{243}=0xEA +serdes_core_tx_polarity_flip_physical{244}=0xEA +serdes_core_tx_polarity_flip_physical{245}=0xEA +serdes_core_tx_polarity_flip_physical{246}=0xEA +serdes_core_tx_polarity_flip_physical{247}=0xEA +serdes_core_tx_polarity_flip_physical{248}=0xEA + +dport_map_port_152=127 +dport_map_port_153=128 +dport_map_port_154=125 +dport_map_port_155=126 +portmap_152=249:100 +portmap_153=251:100 +portmap_154=253:100 +portmap_155=255:100 +phy_chain_rx_lane_map_physical{249.0}=0x01237654 +phy_chain_rx_lane_map_physical{250.0}=0x01237654 +phy_chain_rx_lane_map_physical{251.0}=0x01237654 +phy_chain_rx_lane_map_physical{252.0}=0x01237654 +phy_chain_rx_lane_map_physical{253.0}=0x01237654 +phy_chain_rx_lane_map_physical{254.0}=0x01237654 +phy_chain_rx_lane_map_physical{255.0}=0x01237654 +phy_chain_rx_lane_map_physical{256.0}=0x01237654 +phy_chain_tx_lane_map_physical{249.0}=0x57601432 +phy_chain_tx_lane_map_physical{250.0}=0x57601432 +phy_chain_tx_lane_map_physical{251.0}=0x57601432 +phy_chain_tx_lane_map_physical{252.0}=0x57601432 +phy_chain_tx_lane_map_physical{253.0}=0x57601432 +phy_chain_tx_lane_map_physical{254.0}=0x57601432 +phy_chain_tx_lane_map_physical{255.0}=0x57601432 +phy_chain_tx_lane_map_physical{256.0}=0x57601432 +serdes_core_rx_polarity_flip_physical{249}=0x2A +serdes_core_rx_polarity_flip_physical{250}=0x2A +serdes_core_rx_polarity_flip_physical{251}=0x2A +serdes_core_rx_polarity_flip_physical{252}=0x2A +serdes_core_rx_polarity_flip_physical{253}=0x2A +serdes_core_rx_polarity_flip_physical{254}=0x2A +serdes_core_rx_polarity_flip_physical{255}=0x2A +serdes_core_rx_polarity_flip_physical{256}=0x2A +serdes_core_tx_polarity_flip_physical{249}=0xDE +serdes_core_tx_polarity_flip_physical{250}=0xDE +serdes_core_tx_polarity_flip_physical{251}=0xDE +serdes_core_tx_polarity_flip_physical{252}=0xDE +serdes_core_tx_polarity_flip_physical{253}=0xDE +serdes_core_tx_polarity_flip_physical{254}=0xDE +serdes_core_tx_polarity_flip_physical{255}=0xDE +serdes_core_tx_polarity_flip_physical{256}=0xDE + +dport_map_port_38=299 +portmap_38=257:10 + +dport_map_port_118=300 +portmap_118=258:10 + +portmap_19=259:10 + +portmap_39=260:10 + +portmap_59=261:10 + +portmap_79=262:10 + +portmap_99=263:10 + +portmap_119=264:10 + +portmap_139=265:10 + +portmap_159=266:10 diff --git a/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/config_16Q_FEC544_EVTB_100G.bcm b/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/config_16Q_FEC544_EVTB_100G.bcm new file mode 100755 index 000000000000..a72f22bbfd98 --- /dev/null +++ b/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/config_16Q_FEC544_EVTB_100G.bcm @@ -0,0 +1,1487 @@ +pbmp_xport_xe.0=0x3ffffffffffffffffffffffffffffffffffffffe +ccm_dma_enable=0 +ccmdma_intr_enable=0 +ctr_evict_enable=0 +mem_cache_enable=0 +parity_correction=0 +parity_enable=0 +phy_enable=0 +phy_null=1 +pll_bypass=1 + +init_all_modules=0 +core_clock_frequency=1325 +dpr_clock_frequency=1000 +device_clock_frequency=1325 +port_flex_enable=1 + +#firmware load method, use fast load +load_firmware=0x2 + +serdes_lane_config_dfe=on +serdes_lane_config_media_type=backplane + +port_fec_1=3 +port_fec_2=3 +port_fec_3=3 +port_fec_4=3 +port_fec_5=3 +port_fec_6=3 +port_fec_7=3 +port_fec_8=3 +port_fec_9=3 +port_fec_10=3 +port_fec_11=3 +port_fec_12=3 +port_fec_13=3 +port_fec_14=3 +port_fec_15=3 +port_fec_16=3 +port_fec_20=3 +port_fec_21=3 +port_fec_22=3 +port_fec_23=3 +port_fec_24=3 +port_fec_25=3 +port_fec_26=3 +port_fec_27=3 +port_fec_28=3 +port_fec_29=3 +port_fec_30=3 +port_fec_31=3 +port_fec_32=3 +port_fec_33=3 +port_fec_34=3 +port_fec_35=3 +port_fec_40=3 +port_fec_41=3 +port_fec_42=3 +port_fec_43=3 +port_fec_44=3 +port_fec_45=3 +port_fec_46=3 +port_fec_47=3 +port_fec_48=3 +port_fec_49=3 +port_fec_50=3 +port_fec_51=3 +port_fec_52=3 +port_fec_53=3 +port_fec_54=3 +port_fec_55=3 +port_fec_60=3 +port_fec_61=3 +port_fec_62=3 +port_fec_63=3 +port_fec_64=3 +port_fec_65=3 +port_fec_66=3 +port_fec_67=3 +port_fec_68=3 +port_fec_69=3 +port_fec_70=3 +port_fec_71=3 +port_fec_72=3 +port_fec_73=3 +port_fec_74=3 +port_fec_75=3 +port_fec_80=3 +port_fec_81=3 +port_fec_82=3 +port_fec_83=3 +port_fec_84=3 +port_fec_85=3 +port_fec_86=3 +port_fec_87=3 +port_fec_88=3 +port_fec_89=3 +port_fec_90=3 +port_fec_91=3 +port_fec_92=3 +port_fec_93=3 +port_fec_94=3 +port_fec_95=3 +port_fec_100=3 +port_fec_101=3 +port_fec_102=3 +port_fec_103=3 +port_fec_104=3 +port_fec_105=3 +port_fec_106=3 +port_fec_107=3 +port_fec_108=3 +port_fec_109=3 +port_fec_110=3 +port_fec_111=3 +port_fec_112=3 +port_fec_113=3 +port_fec_114=3 +port_fec_115=3 +port_fec_120=3 +port_fec_121=3 +port_fec_122=3 +port_fec_123=3 +port_fec_124=3 +port_fec_125=3 +port_fec_126=3 +port_fec_127=3 +port_fec_128=3 +port_fec_129=3 +port_fec_130=3 +port_fec_131=3 +port_fec_132=3 +port_fec_133=3 +port_fec_134=3 +port_fec_135=3 +port_fec_140=3 +port_fec_141=3 +port_fec_142=3 +port_fec_143=3 +port_fec_144=3 +port_fec_145=3 +port_fec_146=3 +port_fec_147=3 +port_fec_148=3 +port_fec_149=3 +port_fec_150=3 +port_fec_151=3 +port_fec_152=3 +port_fec_153=3 +port_fec_154=3 +port_fec_155=3 + + +dport_map_port_3=1 +dport_map_port_4=2 +dport_map_port_1=3 +dport_map_port_2=4 +portmap_1=1:100 +portmap_2=3:100 +portmap_3=5:100 +portmap_4=7:100 +phy_chain_rx_lane_map_physical{1.0}=0x01237645 +phy_chain_rx_lane_map_physical{2.0}=0x01237645 +phy_chain_rx_lane_map_physical{3.0}=0x01237645 +phy_chain_rx_lane_map_physical{4.0}=0x01237645 +phy_chain_rx_lane_map_physical{5.0}=0x01237645 +phy_chain_rx_lane_map_physical{6.0}=0x01237645 +phy_chain_rx_lane_map_physical{7.0}=0x01237645 +phy_chain_rx_lane_map_physical{8.0}=0x01237645 +phy_chain_tx_lane_map_physical{1.0}=0x32046751 +phy_chain_tx_lane_map_physical{2.0}=0x32046751 +phy_chain_tx_lane_map_physical{3.0}=0x32046751 +phy_chain_tx_lane_map_physical{4.0}=0x32046751 +phy_chain_tx_lane_map_physical{5.0}=0x32046751 +phy_chain_tx_lane_map_physical{6.0}=0x32046751 +phy_chain_tx_lane_map_physical{7.0}=0x32046751 +phy_chain_tx_lane_map_physical{8.0}=0x32046751 +serdes_core_rx_polarity_flip_physical{1}=0x29 +serdes_core_rx_polarity_flip_physical{2}=0x29 +serdes_core_rx_polarity_flip_physical{3}=0x29 +serdes_core_rx_polarity_flip_physical{4}=0x29 +serdes_core_rx_polarity_flip_physical{5}=0x29 +serdes_core_rx_polarity_flip_physical{6}=0x29 +serdes_core_rx_polarity_flip_physical{7}=0x29 +serdes_core_rx_polarity_flip_physical{8}=0x29 +serdes_core_tx_polarity_flip_physical{1}=0xE7 +serdes_core_tx_polarity_flip_physical{2}=0xE7 +serdes_core_tx_polarity_flip_physical{3}=0xE7 +serdes_core_tx_polarity_flip_physical{4}=0xE7 +serdes_core_tx_polarity_flip_physical{5}=0xE7 +serdes_core_tx_polarity_flip_physical{6}=0xE7 +serdes_core_tx_polarity_flip_physical{7}=0xE7 +serdes_core_tx_polarity_flip_physical{8}=0xE7 + +dport_map_port_7=17 +dport_map_port_8=18 +dport_map_port_5=19 +dport_map_port_6=20 +portmap_5=9:100 +portmap_6=11:100 +portmap_7=13:100 +portmap_8=15:100 +phy_chain_rx_lane_map_physical{9.0}=0x45672103 +phy_chain_rx_lane_map_physical{10.0}=0x45672103 +phy_chain_rx_lane_map_physical{11.0}=0x45672103 +phy_chain_rx_lane_map_physical{12.0}=0x45672103 +phy_chain_rx_lane_map_physical{13.0}=0x45672103 +phy_chain_rx_lane_map_physical{14.0}=0x45672103 +phy_chain_rx_lane_map_physical{15.0}=0x45672103 +phy_chain_rx_lane_map_physical{16.0}=0x45672103 +phy_chain_tx_lane_map_physical{9.0}=0x13240756 +phy_chain_tx_lane_map_physical{10.0}=0x13240756 +phy_chain_tx_lane_map_physical{11.0}=0x13240756 +phy_chain_tx_lane_map_physical{12.0}=0x13240756 +phy_chain_tx_lane_map_physical{13.0}=0x13240756 +phy_chain_tx_lane_map_physical{14.0}=0x13240756 +phy_chain_tx_lane_map_physical{15.0}=0x13240756 +phy_chain_tx_lane_map_physical{16.0}=0x13240756 +serdes_core_rx_polarity_flip_physical{9}=0xA5 +serdes_core_rx_polarity_flip_physical{10}=0xA5 +serdes_core_rx_polarity_flip_physical{11}=0xA5 +serdes_core_rx_polarity_flip_physical{12}=0xA5 +serdes_core_rx_polarity_flip_physical{13}=0xA5 +serdes_core_rx_polarity_flip_physical{14}=0xA5 +serdes_core_rx_polarity_flip_physical{15}=0xA5 +serdes_core_rx_polarity_flip_physical{16}=0xA5 +serdes_core_tx_polarity_flip_physical{9}=0x85 +serdes_core_tx_polarity_flip_physical{10}=0x85 +serdes_core_tx_polarity_flip_physical{11}=0x85 +serdes_core_tx_polarity_flip_physical{12}=0x85 +serdes_core_tx_polarity_flip_physical{13}=0x85 +serdes_core_tx_polarity_flip_physical{14}=0x85 +serdes_core_tx_polarity_flip_physical{15}=0x85 +serdes_core_tx_polarity_flip_physical{16}=0x85 + +dport_map_port_11=33 +dport_map_port_12=34 +dport_map_port_9=35 +dport_map_port_10=36 +portmap_9=17:100 +portmap_10=19:100 +portmap_11=21:100 +portmap_12=23:100 +phy_chain_rx_lane_map_physical{17.0}=0x10237456 +phy_chain_rx_lane_map_physical{18.0}=0x10237456 +phy_chain_rx_lane_map_physical{19.0}=0x10237456 +phy_chain_rx_lane_map_physical{20.0}=0x10237456 +phy_chain_rx_lane_map_physical{21.0}=0x10237456 +phy_chain_rx_lane_map_physical{22.0}=0x10237456 +phy_chain_rx_lane_map_physical{23.0}=0x10237456 +phy_chain_rx_lane_map_physical{24.0}=0x10237456 +phy_chain_tx_lane_map_physical{17.0}=0x67451032 +phy_chain_tx_lane_map_physical{18.0}=0x67451032 +phy_chain_tx_lane_map_physical{19.0}=0x67451032 +phy_chain_tx_lane_map_physical{20.0}=0x67451032 +phy_chain_tx_lane_map_physical{21.0}=0x67451032 +phy_chain_tx_lane_map_physical{22.0}=0x67451032 +phy_chain_tx_lane_map_physical{23.0}=0x67451032 +phy_chain_tx_lane_map_physical{24.0}=0x67451032 +serdes_core_rx_polarity_flip_physical{17}=0x6A +serdes_core_rx_polarity_flip_physical{18}=0x6A +serdes_core_rx_polarity_flip_physical{19}=0x6A +serdes_core_rx_polarity_flip_physical{20}=0x6A +serdes_core_rx_polarity_flip_physical{21}=0x6A +serdes_core_rx_polarity_flip_physical{22}=0x6A +serdes_core_rx_polarity_flip_physical{23}=0x6A +serdes_core_rx_polarity_flip_physical{24}=0x6A +serdes_core_tx_polarity_flip_physical{17}=0x94 +serdes_core_tx_polarity_flip_physical{18}=0x94 +serdes_core_tx_polarity_flip_physical{19}=0x94 +serdes_core_tx_polarity_flip_physical{20}=0x94 +serdes_core_tx_polarity_flip_physical{21}=0x94 +serdes_core_tx_polarity_flip_physical{22}=0x94 +serdes_core_tx_polarity_flip_physical{23}=0x94 +serdes_core_tx_polarity_flip_physical{24}=0x94 + +dport_map_port_15=49 +dport_map_port_16=50 +dport_map_port_13=51 +dport_map_port_14=52 +portmap_13=25:100 +portmap_14=27:100 +portmap_15=29:100 +portmap_16=31:100 +phy_chain_rx_lane_map_physical{25.0}=0x76231504 +phy_chain_rx_lane_map_physical{26.0}=0x76231504 +phy_chain_rx_lane_map_physical{27.0}=0x76231504 +phy_chain_rx_lane_map_physical{28.0}=0x76231504 +phy_chain_rx_lane_map_physical{29.0}=0x76231504 +phy_chain_rx_lane_map_physical{30.0}=0x76231504 +phy_chain_rx_lane_map_physical{31.0}=0x76231504 +phy_chain_rx_lane_map_physical{32.0}=0x76231504 +phy_chain_tx_lane_map_physical{25.0}=0x36012457 +phy_chain_tx_lane_map_physical{26.0}=0x36012457 +phy_chain_tx_lane_map_physical{27.0}=0x36012457 +phy_chain_tx_lane_map_physical{28.0}=0x36012457 +phy_chain_tx_lane_map_physical{29.0}=0x36012457 +phy_chain_tx_lane_map_physical{30.0}=0x36012457 +phy_chain_tx_lane_map_physical{31.0}=0x36012457 +phy_chain_tx_lane_map_physical{32.0}=0x36012457 +serdes_core_rx_polarity_flip_physical{25}=0x9E +serdes_core_rx_polarity_flip_physical{26}=0x9E +serdes_core_rx_polarity_flip_physical{27}=0x9E +serdes_core_rx_polarity_flip_physical{28}=0x9E +serdes_core_rx_polarity_flip_physical{29}=0x9E +serdes_core_rx_polarity_flip_physical{30}=0x9E +serdes_core_rx_polarity_flip_physical{31}=0x9E +serdes_core_rx_polarity_flip_physical{32}=0x9E +serdes_core_tx_polarity_flip_physical{25}=0x5D +serdes_core_tx_polarity_flip_physical{26}=0x5D +serdes_core_tx_polarity_flip_physical{27}=0x5D +serdes_core_tx_polarity_flip_physical{28}=0x5D +serdes_core_tx_polarity_flip_physical{29}=0x5D +serdes_core_tx_polarity_flip_physical{30}=0x5D +serdes_core_tx_polarity_flip_physical{31}=0x5D +serdes_core_tx_polarity_flip_physical{32}=0x5D + +dport_map_port_22=5 +dport_map_port_23=6 +dport_map_port_20=7 +dport_map_port_21=8 +portmap_20=33:100 +portmap_21=35:100 +portmap_22=37:100 +portmap_23=39:100 +phy_chain_rx_lane_map_physical{33.0}=0x56327410 +phy_chain_rx_lane_map_physical{34.0}=0x56327410 +phy_chain_rx_lane_map_physical{35.0}=0x56327410 +phy_chain_rx_lane_map_physical{36.0}=0x56327410 +phy_chain_rx_lane_map_physical{37.0}=0x56327410 +phy_chain_rx_lane_map_physical{38.0}=0x56327410 +phy_chain_rx_lane_map_physical{39.0}=0x56327410 +phy_chain_rx_lane_map_physical{40.0}=0x56327410 +phy_chain_tx_lane_map_physical{33.0}=0x65103247 +phy_chain_tx_lane_map_physical{34.0}=0x65103247 +phy_chain_tx_lane_map_physical{35.0}=0x65103247 +phy_chain_tx_lane_map_physical{36.0}=0x65103247 +phy_chain_tx_lane_map_physical{37.0}=0x65103247 +phy_chain_tx_lane_map_physical{38.0}=0x65103247 +phy_chain_tx_lane_map_physical{39.0}=0x65103247 +phy_chain_tx_lane_map_physical{40.0}=0x65103247 +serdes_core_rx_polarity_flip_physical{33}=0xA9 +serdes_core_rx_polarity_flip_physical{34}=0xA9 +serdes_core_rx_polarity_flip_physical{35}=0xA9 +serdes_core_rx_polarity_flip_physical{36}=0xA9 +serdes_core_rx_polarity_flip_physical{37}=0xA9 +serdes_core_rx_polarity_flip_physical{38}=0xA9 +serdes_core_rx_polarity_flip_physical{39}=0xA9 +serdes_core_rx_polarity_flip_physical{40}=0xA9 +serdes_core_tx_polarity_flip_physical{33}=0xF6 +serdes_core_tx_polarity_flip_physical{34}=0xF6 +serdes_core_tx_polarity_flip_physical{35}=0xF6 +serdes_core_tx_polarity_flip_physical{36}=0xF6 +serdes_core_tx_polarity_flip_physical{37}=0xF6 +serdes_core_tx_polarity_flip_physical{38}=0xF6 +serdes_core_tx_polarity_flip_physical{39}=0xF6 +serdes_core_tx_polarity_flip_physical{40}=0xF6 + +dport_map_port_26=21 +dport_map_port_27=22 +dport_map_port_24=23 +dport_map_port_25=24 +portmap_24=41:100 +portmap_25=43:100 +portmap_26=45:100 +portmap_27=47:100 +phy_chain_rx_lane_map_physical{41.0}=0x76543201 +phy_chain_rx_lane_map_physical{42.0}=0x76543201 +phy_chain_rx_lane_map_physical{43.0}=0x76543201 +phy_chain_rx_lane_map_physical{44.0}=0x76543201 +phy_chain_rx_lane_map_physical{45.0}=0x76543201 +phy_chain_rx_lane_map_physical{46.0}=0x76543201 +phy_chain_rx_lane_map_physical{47.0}=0x76543201 +phy_chain_rx_lane_map_physical{48.0}=0x76543201 +phy_chain_tx_lane_map_physical{41.0}=0x03517426 +phy_chain_tx_lane_map_physical{42.0}=0x03517426 +phy_chain_tx_lane_map_physical{43.0}=0x03517426 +phy_chain_tx_lane_map_physical{44.0}=0x03517426 +phy_chain_tx_lane_map_physical{45.0}=0x03517426 +phy_chain_tx_lane_map_physical{46.0}=0x03517426 +phy_chain_tx_lane_map_physical{47.0}=0x03517426 +phy_chain_tx_lane_map_physical{48.0}=0x03517426 +serdes_core_rx_polarity_flip_physical{41}=0x59 +serdes_core_rx_polarity_flip_physical{42}=0x59 +serdes_core_rx_polarity_flip_physical{43}=0x59 +serdes_core_rx_polarity_flip_physical{44}=0x59 +serdes_core_rx_polarity_flip_physical{45}=0x59 +serdes_core_rx_polarity_flip_physical{46}=0x59 +serdes_core_rx_polarity_flip_physical{47}=0x59 +serdes_core_rx_polarity_flip_physical{48}=0x59 +serdes_core_tx_polarity_flip_physical{41}=0x92 +serdes_core_tx_polarity_flip_physical{42}=0x92 +serdes_core_tx_polarity_flip_physical{43}=0x92 +serdes_core_tx_polarity_flip_physical{44}=0x92 +serdes_core_tx_polarity_flip_physical{45}=0x92 +serdes_core_tx_polarity_flip_physical{46}=0x92 +serdes_core_tx_polarity_flip_physical{47}=0x92 +serdes_core_tx_polarity_flip_physical{48}=0x92 + +dport_map_port_30=37 +dport_map_port_31=38 +dport_map_port_28=39 +dport_map_port_29=40 +portmap_28=49:100 +portmap_29=51:100 +portmap_30=53:100 +portmap_31=55:100 +phy_chain_rx_lane_map_physical{49.0}=0x63724510 +phy_chain_rx_lane_map_physical{50.0}=0x63724510 +phy_chain_rx_lane_map_physical{51.0}=0x63724510 +phy_chain_rx_lane_map_physical{52.0}=0x63724510 +phy_chain_rx_lane_map_physical{53.0}=0x63724510 +phy_chain_rx_lane_map_physical{54.0}=0x63724510 +phy_chain_rx_lane_map_physical{55.0}=0x63724510 +phy_chain_rx_lane_map_physical{56.0}=0x63724510 +phy_chain_tx_lane_map_physical{49.0}=0x67450213 +phy_chain_tx_lane_map_physical{50.0}=0x67450213 +phy_chain_tx_lane_map_physical{51.0}=0x67450213 +phy_chain_tx_lane_map_physical{52.0}=0x67450213 +phy_chain_tx_lane_map_physical{53.0}=0x67450213 +phy_chain_tx_lane_map_physical{54.0}=0x67450213 +phy_chain_tx_lane_map_physical{55.0}=0x67450213 +phy_chain_tx_lane_map_physical{56.0}=0x67450213 +serdes_core_rx_polarity_flip_physical{49}=0x4A +serdes_core_rx_polarity_flip_physical{50}=0x4A +serdes_core_rx_polarity_flip_physical{51}=0x4A +serdes_core_rx_polarity_flip_physical{52}=0x4A +serdes_core_rx_polarity_flip_physical{53}=0x4A +serdes_core_rx_polarity_flip_physical{54}=0x4A +serdes_core_rx_polarity_flip_physical{55}=0x4A +serdes_core_rx_polarity_flip_physical{56}=0x4A +serdes_core_tx_polarity_flip_physical{49}=0xCC +serdes_core_tx_polarity_flip_physical{50}=0xCC +serdes_core_tx_polarity_flip_physical{51}=0xCC +serdes_core_tx_polarity_flip_physical{52}=0xCC +serdes_core_tx_polarity_flip_physical{53}=0xCC +serdes_core_tx_polarity_flip_physical{54}=0xCC +serdes_core_tx_polarity_flip_physical{55}=0xCC +serdes_core_tx_polarity_flip_physical{56}=0xCC + +dport_map_port_34=53 +dport_map_port_35=54 +dport_map_port_32=55 +dport_map_port_33=56 +portmap_32=57:100 +portmap_33=59:100 +portmap_34=61:100 +portmap_35=63:100 +phy_chain_rx_lane_map_physical{57.0}=0x74501623 +phy_chain_rx_lane_map_physical{58.0}=0x74501623 +phy_chain_rx_lane_map_physical{59.0}=0x74501623 +phy_chain_rx_lane_map_physical{60.0}=0x74501623 +phy_chain_rx_lane_map_physical{61.0}=0x74501623 +phy_chain_rx_lane_map_physical{62.0}=0x74501623 +phy_chain_rx_lane_map_physical{63.0}=0x74501623 +phy_chain_rx_lane_map_physical{64.0}=0x74501623 +phy_chain_tx_lane_map_physical{57.0}=0x62731045 +phy_chain_tx_lane_map_physical{58.0}=0x62731045 +phy_chain_tx_lane_map_physical{59.0}=0x62731045 +phy_chain_tx_lane_map_physical{60.0}=0x62731045 +phy_chain_tx_lane_map_physical{61.0}=0x62731045 +phy_chain_tx_lane_map_physical{62.0}=0x62731045 +phy_chain_tx_lane_map_physical{63.0}=0x62731045 +phy_chain_tx_lane_map_physical{64.0}=0x62731045 +serdes_core_rx_polarity_flip_physical{57}=0x42 +serdes_core_rx_polarity_flip_physical{58}=0x42 +serdes_core_rx_polarity_flip_physical{59}=0x42 +serdes_core_rx_polarity_flip_physical{60}=0x42 +serdes_core_rx_polarity_flip_physical{61}=0x42 +serdes_core_rx_polarity_flip_physical{62}=0x42 +serdes_core_rx_polarity_flip_physical{63}=0x42 +serdes_core_rx_polarity_flip_physical{64}=0x42 +serdes_core_tx_polarity_flip_physical{57}=0x3A +serdes_core_tx_polarity_flip_physical{58}=0x3A +serdes_core_tx_polarity_flip_physical{59}=0x3A +serdes_core_tx_polarity_flip_physical{60}=0x3A +serdes_core_tx_polarity_flip_physical{61}=0x3A +serdes_core_tx_polarity_flip_physical{62}=0x3A +serdes_core_tx_polarity_flip_physical{63}=0x3A +serdes_core_tx_polarity_flip_physical{64}=0x3A + +dport_map_port_42=9 +dport_map_port_43=10 +dport_map_port_40=11 +dport_map_port_41=12 +portmap_40=65:100 +portmap_41=67:100 +portmap_42=69:100 +portmap_43=71:100 +phy_chain_rx_lane_map_physical{65.0}=0x73625104 +phy_chain_rx_lane_map_physical{66.0}=0x73625104 +phy_chain_rx_lane_map_physical{67.0}=0x73625104 +phy_chain_rx_lane_map_physical{68.0}=0x73625104 +phy_chain_rx_lane_map_physical{69.0}=0x73625104 +phy_chain_rx_lane_map_physical{70.0}=0x73625104 +phy_chain_rx_lane_map_physical{71.0}=0x73625104 +phy_chain_rx_lane_map_physical{72.0}=0x73625104 +phy_chain_tx_lane_map_physical{65.0}=0x42513076 +phy_chain_tx_lane_map_physical{66.0}=0x42513076 +phy_chain_tx_lane_map_physical{67.0}=0x42513076 +phy_chain_tx_lane_map_physical{68.0}=0x42513076 +phy_chain_tx_lane_map_physical{69.0}=0x42513076 +phy_chain_tx_lane_map_physical{70.0}=0x42513076 +phy_chain_tx_lane_map_physical{71.0}=0x42513076 +phy_chain_tx_lane_map_physical{72.0}=0x42513076 +serdes_core_rx_polarity_flip_physical{65}=0xE5 +serdes_core_rx_polarity_flip_physical{66}=0xE5 +serdes_core_rx_polarity_flip_physical{67}=0xE5 +serdes_core_rx_polarity_flip_physical{68}=0xE5 +serdes_core_rx_polarity_flip_physical{69}=0xE5 +serdes_core_rx_polarity_flip_physical{70}=0xE5 +serdes_core_rx_polarity_flip_physical{71}=0xE5 +serdes_core_rx_polarity_flip_physical{72}=0xE5 +serdes_core_tx_polarity_flip_physical{65}=0x5A +serdes_core_tx_polarity_flip_physical{66}=0x5A +serdes_core_tx_polarity_flip_physical{67}=0x5A +serdes_core_tx_polarity_flip_physical{68}=0x5A +serdes_core_tx_polarity_flip_physical{69}=0x5A +serdes_core_tx_polarity_flip_physical{70}=0x5A +serdes_core_tx_polarity_flip_physical{71}=0x5A +serdes_core_tx_polarity_flip_physical{72}=0x5A + +dport_map_port_46=25 +dport_map_port_47=26 +dport_map_port_44=27 +dport_map_port_45=28 +portmap_44=73:100 +portmap_45=75:100 +portmap_46=77:100 +portmap_47=79:100 +phy_chain_rx_lane_map_physical{73.0}=0x64501723 +phy_chain_rx_lane_map_physical{74.0}=0x64501723 +phy_chain_rx_lane_map_physical{75.0}=0x64501723 +phy_chain_rx_lane_map_physical{76.0}=0x64501723 +phy_chain_rx_lane_map_physical{77.0}=0x64501723 +phy_chain_rx_lane_map_physical{78.0}=0x64501723 +phy_chain_rx_lane_map_physical{79.0}=0x64501723 +phy_chain_rx_lane_map_physical{80.0}=0x64501723 +phy_chain_tx_lane_map_physical{73.0}=0x32015476 +phy_chain_tx_lane_map_physical{74.0}=0x32015476 +phy_chain_tx_lane_map_physical{75.0}=0x32015476 +phy_chain_tx_lane_map_physical{76.0}=0x32015476 +phy_chain_tx_lane_map_physical{77.0}=0x32015476 +phy_chain_tx_lane_map_physical{78.0}=0x32015476 +phy_chain_tx_lane_map_physical{79.0}=0x32015476 +phy_chain_tx_lane_map_physical{80.0}=0x32015476 +serdes_core_rx_polarity_flip_physical{73}=0xB6 +serdes_core_rx_polarity_flip_physical{74}=0xB6 +serdes_core_rx_polarity_flip_physical{75}=0xB6 +serdes_core_rx_polarity_flip_physical{76}=0xB6 +serdes_core_rx_polarity_flip_physical{77}=0xB6 +serdes_core_rx_polarity_flip_physical{78}=0xB6 +serdes_core_rx_polarity_flip_physical{79}=0xB6 +serdes_core_rx_polarity_flip_physical{80}=0xB6 +serdes_core_tx_polarity_flip_physical{73}=0x10 +serdes_core_tx_polarity_flip_physical{74}=0x10 +serdes_core_tx_polarity_flip_physical{75}=0x10 +serdes_core_tx_polarity_flip_physical{76}=0x10 +serdes_core_tx_polarity_flip_physical{77}=0x10 +serdes_core_tx_polarity_flip_physical{78}=0x10 +serdes_core_tx_polarity_flip_physical{79}=0x10 +serdes_core_tx_polarity_flip_physical{80}=0x10 + +dport_map_port_50=41 +dport_map_port_51=42 +dport_map_port_48=43 +dport_map_port_49=44 +portmap_48=81:100 +portmap_49=83:100 +portmap_50=85:100 +portmap_51=87:100 +phy_chain_rx_lane_map_physical{81.0}=0x20134567 +phy_chain_rx_lane_map_physical{82.0}=0x20134567 +phy_chain_rx_lane_map_physical{83.0}=0x20134567 +phy_chain_rx_lane_map_physical{84.0}=0x20134567 +phy_chain_rx_lane_map_physical{85.0}=0x20134567 +phy_chain_rx_lane_map_physical{86.0}=0x20134567 +phy_chain_rx_lane_map_physical{87.0}=0x20134567 +phy_chain_rx_lane_map_physical{88.0}=0x20134567 +phy_chain_tx_lane_map_physical{81.0}=0x67540123 +phy_chain_tx_lane_map_physical{82.0}=0x67540123 +phy_chain_tx_lane_map_physical{83.0}=0x67540123 +phy_chain_tx_lane_map_physical{84.0}=0x67540123 +phy_chain_tx_lane_map_physical{85.0}=0x67540123 +phy_chain_tx_lane_map_physical{86.0}=0x67540123 +phy_chain_tx_lane_map_physical{87.0}=0x67540123 +phy_chain_tx_lane_map_physical{88.0}=0x67540123 +serdes_core_rx_polarity_flip_physical{81}=0xBA +serdes_core_rx_polarity_flip_physical{82}=0xBA +serdes_core_rx_polarity_flip_physical{83}=0xBA +serdes_core_rx_polarity_flip_physical{84}=0xBA +serdes_core_rx_polarity_flip_physical{85}=0xBA +serdes_core_rx_polarity_flip_physical{86}=0xBA +serdes_core_rx_polarity_flip_physical{87}=0xBA +serdes_core_rx_polarity_flip_physical{88}=0xBA +serdes_core_tx_polarity_flip_physical{81}=0xAA +serdes_core_tx_polarity_flip_physical{82}=0xAA +serdes_core_tx_polarity_flip_physical{83}=0xAA +serdes_core_tx_polarity_flip_physical{84}=0xAA +serdes_core_tx_polarity_flip_physical{85}=0xAA +serdes_core_tx_polarity_flip_physical{86}=0xAA +serdes_core_tx_polarity_flip_physical{87}=0xAA +serdes_core_tx_polarity_flip_physical{88}=0xAA + +dport_map_port_54=57 +dport_map_port_55=58 +dport_map_port_52=59 +dport_map_port_53=60 +portmap_52=89:100 +portmap_53=91:100 +portmap_54=93:100 +portmap_55=95:100 +phy_chain_rx_lane_map_physical{89.0}=0x36271504 +phy_chain_rx_lane_map_physical{90.0}=0x36271504 +phy_chain_rx_lane_map_physical{91.0}=0x36271504 +phy_chain_rx_lane_map_physical{92.0}=0x36271504 +phy_chain_rx_lane_map_physical{93.0}=0x36271504 +phy_chain_rx_lane_map_physical{94.0}=0x36271504 +phy_chain_rx_lane_map_physical{95.0}=0x36271504 +phy_chain_rx_lane_map_physical{96.0}=0x36271504 +phy_chain_tx_lane_map_physical{89.0}=0x62413507 +phy_chain_tx_lane_map_physical{90.0}=0x62413507 +phy_chain_tx_lane_map_physical{91.0}=0x62413507 +phy_chain_tx_lane_map_physical{92.0}=0x62413507 +phy_chain_tx_lane_map_physical{93.0}=0x62413507 +phy_chain_tx_lane_map_physical{94.0}=0x62413507 +phy_chain_tx_lane_map_physical{95.0}=0x62413507 +phy_chain_tx_lane_map_physical{96.0}=0x62413507 +serdes_core_rx_polarity_flip_physical{89}=0x1C +serdes_core_rx_polarity_flip_physical{90}=0x1C +serdes_core_rx_polarity_flip_physical{91}=0x1C +serdes_core_rx_polarity_flip_physical{92}=0x1C +serdes_core_rx_polarity_flip_physical{93}=0x1C +serdes_core_rx_polarity_flip_physical{94}=0x1C +serdes_core_rx_polarity_flip_physical{95}=0x1C +serdes_core_rx_polarity_flip_physical{96}=0x1C +serdes_core_tx_polarity_flip_physical{89}=0x3B +serdes_core_tx_polarity_flip_physical{90}=0x3B +serdes_core_tx_polarity_flip_physical{91}=0x3B +serdes_core_tx_polarity_flip_physical{92}=0x3B +serdes_core_tx_polarity_flip_physical{93}=0x3B +serdes_core_tx_polarity_flip_physical{94}=0x3B +serdes_core_tx_polarity_flip_physical{95}=0x3B +serdes_core_tx_polarity_flip_physical{96}=0x3B + +dport_map_port_62=13 +dport_map_port_63=14 +dport_map_port_60=15 +dport_map_port_61=16 +portmap_60=97:100 +portmap_61=99:100 +portmap_62=101:100 +portmap_63=103:100 +phy_chain_rx_lane_map_physical{97.0}=0x32510467 +phy_chain_rx_lane_map_physical{98.0}=0x32510467 +phy_chain_rx_lane_map_physical{99.0}=0x32510467 +phy_chain_rx_lane_map_physical{100.0}=0x32510467 +phy_chain_rx_lane_map_physical{101.0}=0x32510467 +phy_chain_rx_lane_map_physical{102.0}=0x32510467 +phy_chain_rx_lane_map_physical{103.0}=0x32510467 +phy_chain_rx_lane_map_physical{104.0}=0x32510467 +phy_chain_tx_lane_map_physical{97.0}=0x57462103 +phy_chain_tx_lane_map_physical{98.0}=0x57462103 +phy_chain_tx_lane_map_physical{99.0}=0x57462103 +phy_chain_tx_lane_map_physical{100.0}=0x57462103 +phy_chain_tx_lane_map_physical{101.0}=0x57462103 +phy_chain_tx_lane_map_physical{102.0}=0x57462103 +phy_chain_tx_lane_map_physical{103.0}=0x57462103 +phy_chain_tx_lane_map_physical{104.0}=0x57462103 +serdes_core_rx_polarity_flip_physical{97}=0xE9 +serdes_core_rx_polarity_flip_physical{98}=0xE9 +serdes_core_rx_polarity_flip_physical{99}=0xE9 +serdes_core_rx_polarity_flip_physical{100}=0xE9 +serdes_core_rx_polarity_flip_physical{101}=0xE9 +serdes_core_rx_polarity_flip_physical{102}=0xE9 +serdes_core_rx_polarity_flip_physical{103}=0xE9 +serdes_core_rx_polarity_flip_physical{104}=0xE9 +serdes_core_tx_polarity_flip_physical{97}=0x1 +serdes_core_tx_polarity_flip_physical{98}=0x1 +serdes_core_tx_polarity_flip_physical{99}=0x1 +serdes_core_tx_polarity_flip_physical{100}=0x1 +serdes_core_tx_polarity_flip_physical{101}=0x1 +serdes_core_tx_polarity_flip_physical{102}=0x1 +serdes_core_tx_polarity_flip_physical{103}=0x1 +serdes_core_tx_polarity_flip_physical{104}=0x1 + +dport_map_port_66=29 +dport_map_port_67=30 +dport_map_port_64=31 +dport_map_port_65=32 +portmap_64=105:100 +portmap_65=107:100 +portmap_66=109:100 +portmap_67=111:100 +phy_chain_rx_lane_map_physical{105.0}=0x32106745 +phy_chain_rx_lane_map_physical{106.0}=0x32106745 +phy_chain_rx_lane_map_physical{107.0}=0x32106745 +phy_chain_rx_lane_map_physical{108.0}=0x32106745 +phy_chain_rx_lane_map_physical{109.0}=0x32106745 +phy_chain_rx_lane_map_physical{110.0}=0x32106745 +phy_chain_rx_lane_map_physical{111.0}=0x32106745 +phy_chain_rx_lane_map_physical{112.0}=0x32106745 +phy_chain_tx_lane_map_physical{105.0}=0x23015746 +phy_chain_tx_lane_map_physical{106.0}=0x23015746 +phy_chain_tx_lane_map_physical{107.0}=0x23015746 +phy_chain_tx_lane_map_physical{108.0}=0x23015746 +phy_chain_tx_lane_map_physical{109.0}=0x23015746 +phy_chain_tx_lane_map_physical{110.0}=0x23015746 +phy_chain_tx_lane_map_physical{111.0}=0x23015746 +phy_chain_tx_lane_map_physical{112.0}=0x23015746 +serdes_core_rx_polarity_flip_physical{105}=0x2A +serdes_core_rx_polarity_flip_physical{106}=0x2A +serdes_core_rx_polarity_flip_physical{107}=0x2A +serdes_core_rx_polarity_flip_physical{108}=0x2A +serdes_core_rx_polarity_flip_physical{109}=0x2A +serdes_core_rx_polarity_flip_physical{110}=0x2A +serdes_core_rx_polarity_flip_physical{111}=0x2A +serdes_core_rx_polarity_flip_physical{112}=0x2A +serdes_core_tx_polarity_flip_physical{105}=0xDA +serdes_core_tx_polarity_flip_physical{106}=0xDA +serdes_core_tx_polarity_flip_physical{107}=0xDA +serdes_core_tx_polarity_flip_physical{108}=0xDA +serdes_core_tx_polarity_flip_physical{109}=0xDA +serdes_core_tx_polarity_flip_physical{110}=0xDA +serdes_core_tx_polarity_flip_physical{111}=0xDA +serdes_core_tx_polarity_flip_physical{112}=0xDA + +dport_map_port_70=45 +dport_map_port_71=46 +dport_map_port_68=47 +dport_map_port_69=48 +portmap_68=113:100 +portmap_69=115:100 +portmap_70=117:100 +portmap_71=119:100 +phy_chain_rx_lane_map_physical{113.0}=0x32451607 +phy_chain_rx_lane_map_physical{114.0}=0x32451607 +phy_chain_rx_lane_map_physical{115.0}=0x32451607 +phy_chain_rx_lane_map_physical{116.0}=0x32451607 +phy_chain_rx_lane_map_physical{117.0}=0x32451607 +phy_chain_rx_lane_map_physical{118.0}=0x32451607 +phy_chain_rx_lane_map_physical{119.0}=0x32451607 +phy_chain_rx_lane_map_physical{120.0}=0x32451607 +phy_chain_tx_lane_map_physical{113.0}=0x65704231 +phy_chain_tx_lane_map_physical{114.0}=0x65704231 +phy_chain_tx_lane_map_physical{115.0}=0x65704231 +phy_chain_tx_lane_map_physical{116.0}=0x65704231 +phy_chain_tx_lane_map_physical{117.0}=0x65704231 +phy_chain_tx_lane_map_physical{118.0}=0x65704231 +phy_chain_tx_lane_map_physical{119.0}=0x65704231 +phy_chain_tx_lane_map_physical{120.0}=0x65704231 +serdes_core_rx_polarity_flip_physical{113}=0xD6 +serdes_core_rx_polarity_flip_physical{114}=0xD6 +serdes_core_rx_polarity_flip_physical{115}=0xD6 +serdes_core_rx_polarity_flip_physical{116}=0xD6 +serdes_core_rx_polarity_flip_physical{117}=0xD6 +serdes_core_rx_polarity_flip_physical{118}=0xD6 +serdes_core_rx_polarity_flip_physical{119}=0xD6 +serdes_core_rx_polarity_flip_physical{120}=0xD6 +serdes_core_tx_polarity_flip_physical{113}=0xDF +serdes_core_tx_polarity_flip_physical{114}=0xDF +serdes_core_tx_polarity_flip_physical{115}=0xDF +serdes_core_tx_polarity_flip_physical{116}=0xDF +serdes_core_tx_polarity_flip_physical{117}=0xDF +serdes_core_tx_polarity_flip_physical{118}=0xDF +serdes_core_tx_polarity_flip_physical{119}=0xDF +serdes_core_tx_polarity_flip_physical{120}=0xDF + +dport_map_port_74=61 +dport_map_port_75=62 +dport_map_port_72=63 +dport_map_port_73=64 +portmap_72=121:100 +portmap_73=123:100 +portmap_74=125:100 +portmap_75=127:100 +phy_chain_rx_lane_map_physical{121.0}=0x12304567 +phy_chain_rx_lane_map_physical{122.0}=0x12304567 +phy_chain_rx_lane_map_physical{123.0}=0x12304567 +phy_chain_rx_lane_map_physical{124.0}=0x12304567 +phy_chain_rx_lane_map_physical{125.0}=0x12304567 +phy_chain_rx_lane_map_physical{126.0}=0x12304567 +phy_chain_rx_lane_map_physical{127.0}=0x12304567 +phy_chain_rx_lane_map_physical{128.0}=0x12304567 +phy_chain_tx_lane_map_physical{121.0}=0x17526403 +phy_chain_tx_lane_map_physical{122.0}=0x17526403 +phy_chain_tx_lane_map_physical{123.0}=0x17526403 +phy_chain_tx_lane_map_physical{124.0}=0x17526403 +phy_chain_tx_lane_map_physical{125.0}=0x17526403 +phy_chain_tx_lane_map_physical{126.0}=0x17526403 +phy_chain_tx_lane_map_physical{127.0}=0x17526403 +phy_chain_tx_lane_map_physical{128.0}=0x17526403 +serdes_core_rx_polarity_flip_physical{121}=0xD5 +serdes_core_rx_polarity_flip_physical{122}=0xD5 +serdes_core_rx_polarity_flip_physical{123}=0xD5 +serdes_core_rx_polarity_flip_physical{124}=0xD5 +serdes_core_rx_polarity_flip_physical{125}=0xD5 +serdes_core_rx_polarity_flip_physical{126}=0xD5 +serdes_core_rx_polarity_flip_physical{127}=0xD5 +serdes_core_rx_polarity_flip_physical{128}=0xD5 +serdes_core_tx_polarity_flip_physical{121}=0xE2 +serdes_core_tx_polarity_flip_physical{122}=0xE2 +serdes_core_tx_polarity_flip_physical{123}=0xE2 +serdes_core_tx_polarity_flip_physical{124}=0xE2 +serdes_core_tx_polarity_flip_physical{125}=0xE2 +serdes_core_tx_polarity_flip_physical{126}=0xE2 +serdes_core_tx_polarity_flip_physical{127}=0xE2 +serdes_core_tx_polarity_flip_physical{128}=0xE2 + +dport_map_port_82=65 +dport_map_port_83=66 +dport_map_port_80=67 +dport_map_port_81=68 +portmap_80=129:100 +portmap_81=131:100 +portmap_82=133:100 +portmap_83=135:100 +phy_chain_rx_lane_map_physical{129.0}=0x70453261 +phy_chain_rx_lane_map_physical{130.0}=0x70453261 +phy_chain_rx_lane_map_physical{131.0}=0x70453261 +phy_chain_rx_lane_map_physical{132.0}=0x70453261 +phy_chain_rx_lane_map_physical{133.0}=0x70453261 +phy_chain_rx_lane_map_physical{134.0}=0x70453261 +phy_chain_rx_lane_map_physical{135.0}=0x70453261 +phy_chain_rx_lane_map_physical{136.0}=0x70453261 +phy_chain_tx_lane_map_physical{129.0}=0x32104675 +phy_chain_tx_lane_map_physical{130.0}=0x32104675 +phy_chain_tx_lane_map_physical{131.0}=0x32104675 +phy_chain_tx_lane_map_physical{132.0}=0x32104675 +phy_chain_tx_lane_map_physical{133.0}=0x32104675 +phy_chain_tx_lane_map_physical{134.0}=0x32104675 +phy_chain_tx_lane_map_physical{135.0}=0x32104675 +phy_chain_tx_lane_map_physical{136.0}=0x32104675 +serdes_core_rx_polarity_flip_physical{129}=0x2B +serdes_core_rx_polarity_flip_physical{130}=0x2B +serdes_core_rx_polarity_flip_physical{131}=0x2B +serdes_core_rx_polarity_flip_physical{132}=0x2B +serdes_core_rx_polarity_flip_physical{133}=0x2B +serdes_core_rx_polarity_flip_physical{134}=0x2B +serdes_core_rx_polarity_flip_physical{135}=0x2B +serdes_core_rx_polarity_flip_physical{136}=0x2B +serdes_core_tx_polarity_flip_physical{129}=0xB0 +serdes_core_tx_polarity_flip_physical{130}=0xB0 +serdes_core_tx_polarity_flip_physical{131}=0xB0 +serdes_core_tx_polarity_flip_physical{132}=0xB0 +serdes_core_tx_polarity_flip_physical{133}=0xB0 +serdes_core_tx_polarity_flip_physical{134}=0xB0 +serdes_core_tx_polarity_flip_physical{135}=0xB0 +serdes_core_tx_polarity_flip_physical{136}=0xB0 + +dport_map_port_86=81 +dport_map_port_87=82 +dport_map_port_84=83 +dport_map_port_85=84 +portmap_84=137:100 +portmap_85=139:100 +portmap_86=141:100 +portmap_87=143:100 +phy_chain_rx_lane_map_physical{137.0}=0x73625410 +phy_chain_rx_lane_map_physical{138.0}=0x73625410 +phy_chain_rx_lane_map_physical{139.0}=0x73625410 +phy_chain_rx_lane_map_physical{140.0}=0x73625410 +phy_chain_rx_lane_map_physical{141.0}=0x73625410 +phy_chain_rx_lane_map_physical{142.0}=0x73625410 +phy_chain_rx_lane_map_physical{143.0}=0x73625410 +phy_chain_rx_lane_map_physical{144.0}=0x73625410 +phy_chain_tx_lane_map_physical{137.0}=0x23407615 +phy_chain_tx_lane_map_physical{138.0}=0x23407615 +phy_chain_tx_lane_map_physical{139.0}=0x23407615 +phy_chain_tx_lane_map_physical{140.0}=0x23407615 +phy_chain_tx_lane_map_physical{141.0}=0x23407615 +phy_chain_tx_lane_map_physical{142.0}=0x23407615 +phy_chain_tx_lane_map_physical{143.0}=0x23407615 +phy_chain_tx_lane_map_physical{144.0}=0x23407615 +serdes_core_rx_polarity_flip_physical{137}=0x67 +serdes_core_rx_polarity_flip_physical{138}=0x67 +serdes_core_rx_polarity_flip_physical{139}=0x67 +serdes_core_rx_polarity_flip_physical{140}=0x67 +serdes_core_rx_polarity_flip_physical{141}=0x67 +serdes_core_rx_polarity_flip_physical{142}=0x67 +serdes_core_rx_polarity_flip_physical{143}=0x67 +serdes_core_rx_polarity_flip_physical{144}=0x67 +serdes_core_tx_polarity_flip_physical{137}=0xC6 +serdes_core_tx_polarity_flip_physical{138}=0xC6 +serdes_core_tx_polarity_flip_physical{139}=0xC6 +serdes_core_tx_polarity_flip_physical{140}=0xC6 +serdes_core_tx_polarity_flip_physical{141}=0xC6 +serdes_core_tx_polarity_flip_physical{142}=0xC6 +serdes_core_tx_polarity_flip_physical{143}=0xC6 +serdes_core_tx_polarity_flip_physical{144}=0xC6 + +dport_map_port_90=97 +dport_map_port_91=98 +dport_map_port_88=99 +dport_map_port_89=100 +portmap_88=145:100 +portmap_89=147:100 +portmap_90=149:100 +portmap_91=151:100 +phy_chain_rx_lane_map_physical{145.0}=0x32016457 +phy_chain_rx_lane_map_physical{146.0}=0x32016457 +phy_chain_rx_lane_map_physical{147.0}=0x32016457 +phy_chain_rx_lane_map_physical{148.0}=0x32016457 +phy_chain_rx_lane_map_physical{149.0}=0x32016457 +phy_chain_rx_lane_map_physical{150.0}=0x32016457 +phy_chain_rx_lane_map_physical{151.0}=0x32016457 +phy_chain_rx_lane_map_physical{152.0}=0x32016457 +phy_chain_tx_lane_map_physical{145.0}=0x76540132 +phy_chain_tx_lane_map_physical{146.0}=0x76540132 +phy_chain_tx_lane_map_physical{147.0}=0x76540132 +phy_chain_tx_lane_map_physical{148.0}=0x76540132 +phy_chain_tx_lane_map_physical{149.0}=0x76540132 +phy_chain_tx_lane_map_physical{150.0}=0x76540132 +phy_chain_tx_lane_map_physical{151.0}=0x76540132 +phy_chain_tx_lane_map_physical{152.0}=0x76540132 +serdes_core_rx_polarity_flip_physical{145}=0x63 +serdes_core_rx_polarity_flip_physical{146}=0x63 +serdes_core_rx_polarity_flip_physical{147}=0x63 +serdes_core_rx_polarity_flip_physical{148}=0x63 +serdes_core_rx_polarity_flip_physical{149}=0x63 +serdes_core_rx_polarity_flip_physical{150}=0x63 +serdes_core_rx_polarity_flip_physical{151}=0x63 +serdes_core_rx_polarity_flip_physical{152}=0x63 +serdes_core_tx_polarity_flip_physical{145}=0xB5 +serdes_core_tx_polarity_flip_physical{146}=0xB5 +serdes_core_tx_polarity_flip_physical{147}=0xB5 +serdes_core_tx_polarity_flip_physical{148}=0xB5 +serdes_core_tx_polarity_flip_physical{149}=0xB5 +serdes_core_tx_polarity_flip_physical{150}=0xB5 +serdes_core_tx_polarity_flip_physical{151}=0xB5 +serdes_core_tx_polarity_flip_physical{152}=0xB5 + +dport_map_port_94=113 +dport_map_port_95=114 +dport_map_port_92=115 +dport_map_port_93=116 +portmap_92=153:100 +portmap_93=155:100 +portmap_94=157:100 +portmap_95=159:100 +phy_chain_rx_lane_map_physical{153.0}=0x32106457 +phy_chain_rx_lane_map_physical{154.0}=0x32106457 +phy_chain_rx_lane_map_physical{155.0}=0x32106457 +phy_chain_rx_lane_map_physical{156.0}=0x32106457 +phy_chain_rx_lane_map_physical{157.0}=0x32106457 +phy_chain_rx_lane_map_physical{158.0}=0x32106457 +phy_chain_rx_lane_map_physical{159.0}=0x32106457 +phy_chain_rx_lane_map_physical{160.0}=0x32106457 +phy_chain_tx_lane_map_physical{153.0}=0x13205746 +phy_chain_tx_lane_map_physical{154.0}=0x13205746 +phy_chain_tx_lane_map_physical{155.0}=0x13205746 +phy_chain_tx_lane_map_physical{156.0}=0x13205746 +phy_chain_tx_lane_map_physical{157.0}=0x13205746 +phy_chain_tx_lane_map_physical{158.0}=0x13205746 +phy_chain_tx_lane_map_physical{159.0}=0x13205746 +phy_chain_tx_lane_map_physical{160.0}=0x13205746 +serdes_core_rx_polarity_flip_physical{153}=0xD3 +serdes_core_rx_polarity_flip_physical{154}=0xD3 +serdes_core_rx_polarity_flip_physical{155}=0xD3 +serdes_core_rx_polarity_flip_physical{156}=0xD3 +serdes_core_rx_polarity_flip_physical{157}=0xD3 +serdes_core_rx_polarity_flip_physical{158}=0xD3 +serdes_core_rx_polarity_flip_physical{159}=0xD3 +serdes_core_rx_polarity_flip_physical{160}=0xD3 +serdes_core_tx_polarity_flip_physical{153}=0x75 +serdes_core_tx_polarity_flip_physical{154}=0x75 +serdes_core_tx_polarity_flip_physical{155}=0x75 +serdes_core_tx_polarity_flip_physical{156}=0x75 +serdes_core_tx_polarity_flip_physical{157}=0x75 +serdes_core_tx_polarity_flip_physical{158}=0x75 +serdes_core_tx_polarity_flip_physical{159}=0x75 +serdes_core_tx_polarity_flip_physical{160}=0x75 + +dport_map_port_102=69 +dport_map_port_103=70 +dport_map_port_100=71 +dport_map_port_101=72 +portmap_100=161:100 +portmap_101=163:100 +portmap_102=165:100 +portmap_103=167:100 +phy_chain_rx_lane_map_physical{161.0}=0x04152736 +phy_chain_rx_lane_map_physical{162.0}=0x04152736 +phy_chain_rx_lane_map_physical{163.0}=0x04152736 +phy_chain_rx_lane_map_physical{164.0}=0x04152736 +phy_chain_rx_lane_map_physical{165.0}=0x04152736 +phy_chain_rx_lane_map_physical{166.0}=0x04152736 +phy_chain_rx_lane_map_physical{167.0}=0x04152736 +phy_chain_rx_lane_map_physical{168.0}=0x04152736 +phy_chain_tx_lane_map_physical{161.0}=0x14207653 +phy_chain_tx_lane_map_physical{162.0}=0x14207653 +phy_chain_tx_lane_map_physical{163.0}=0x14207653 +phy_chain_tx_lane_map_physical{164.0}=0x14207653 +phy_chain_tx_lane_map_physical{165.0}=0x14207653 +phy_chain_tx_lane_map_physical{166.0}=0x14207653 +phy_chain_tx_lane_map_physical{167.0}=0x14207653 +phy_chain_tx_lane_map_physical{168.0}=0x14207653 +serdes_core_rx_polarity_flip_physical{161}=0xB6 +serdes_core_rx_polarity_flip_physical{162}=0xB6 +serdes_core_rx_polarity_flip_physical{163}=0xB6 +serdes_core_rx_polarity_flip_physical{164}=0xB6 +serdes_core_rx_polarity_flip_physical{165}=0xB6 +serdes_core_rx_polarity_flip_physical{166}=0xB6 +serdes_core_rx_polarity_flip_physical{167}=0xB6 +serdes_core_rx_polarity_flip_physical{168}=0xB6 +serdes_core_tx_polarity_flip_physical{161}=0x4E +serdes_core_tx_polarity_flip_physical{162}=0x4E +serdes_core_tx_polarity_flip_physical{163}=0x4E +serdes_core_tx_polarity_flip_physical{164}=0x4E +serdes_core_tx_polarity_flip_physical{165}=0x4E +serdes_core_tx_polarity_flip_physical{166}=0x4E +serdes_core_tx_polarity_flip_physical{167}=0x4E +serdes_core_tx_polarity_flip_physical{168}=0x4E + +dport_map_port_106=85 +dport_map_port_107=86 +dport_map_port_104=87 +dport_map_port_105=88 +portmap_104=169:100 +portmap_105=171:100 +portmap_106=173:100 +portmap_107=175:100 +phy_chain_rx_lane_map_physical{169.0}=0x37261504 +phy_chain_rx_lane_map_physical{170.0}=0x37261504 +phy_chain_rx_lane_map_physical{171.0}=0x37261504 +phy_chain_rx_lane_map_physical{172.0}=0x37261504 +phy_chain_rx_lane_map_physical{173.0}=0x37261504 +phy_chain_rx_lane_map_physical{174.0}=0x37261504 +phy_chain_rx_lane_map_physical{175.0}=0x37261504 +phy_chain_rx_lane_map_physical{176.0}=0x37261504 +phy_chain_tx_lane_map_physical{169.0}=0x30246751 +phy_chain_tx_lane_map_physical{170.0}=0x30246751 +phy_chain_tx_lane_map_physical{171.0}=0x30246751 +phy_chain_tx_lane_map_physical{172.0}=0x30246751 +phy_chain_tx_lane_map_physical{173.0}=0x30246751 +phy_chain_tx_lane_map_physical{174.0}=0x30246751 +phy_chain_tx_lane_map_physical{175.0}=0x30246751 +phy_chain_tx_lane_map_physical{176.0}=0x30246751 +serdes_core_rx_polarity_flip_physical{169}=0x69 +serdes_core_rx_polarity_flip_physical{170}=0x69 +serdes_core_rx_polarity_flip_physical{171}=0x69 +serdes_core_rx_polarity_flip_physical{172}=0x69 +serdes_core_rx_polarity_flip_physical{173}=0x69 +serdes_core_rx_polarity_flip_physical{174}=0x69 +serdes_core_rx_polarity_flip_physical{175}=0x69 +serdes_core_rx_polarity_flip_physical{176}=0x69 +serdes_core_tx_polarity_flip_physical{169}=0x3F +serdes_core_tx_polarity_flip_physical{170}=0x3F +serdes_core_tx_polarity_flip_physical{171}=0x3F +serdes_core_tx_polarity_flip_physical{172}=0x3F +serdes_core_tx_polarity_flip_physical{173}=0x3F +serdes_core_tx_polarity_flip_physical{174}=0x3F +serdes_core_tx_polarity_flip_physical{175}=0x3F +serdes_core_tx_polarity_flip_physical{176}=0x3F + +dport_map_port_110=101 +dport_map_port_111=102 +dport_map_port_108=103 +dport_map_port_109=104 +portmap_108=177:100 +portmap_109=179:100 +portmap_110=181:100 +portmap_111=183:100 +phy_chain_rx_lane_map_physical{177.0}=0x72541063 +phy_chain_rx_lane_map_physical{178.0}=0x72541063 +phy_chain_rx_lane_map_physical{179.0}=0x72541063 +phy_chain_rx_lane_map_physical{180.0}=0x72541063 +phy_chain_rx_lane_map_physical{181.0}=0x72541063 +phy_chain_rx_lane_map_physical{182.0}=0x72541063 +phy_chain_rx_lane_map_physical{183.0}=0x72541063 +phy_chain_rx_lane_map_physical{184.0}=0x72541063 +phy_chain_tx_lane_map_physical{177.0}=0x67504312 +phy_chain_tx_lane_map_physical{178.0}=0x67504312 +phy_chain_tx_lane_map_physical{179.0}=0x67504312 +phy_chain_tx_lane_map_physical{180.0}=0x67504312 +phy_chain_tx_lane_map_physical{181.0}=0x67504312 +phy_chain_tx_lane_map_physical{182.0}=0x67504312 +phy_chain_tx_lane_map_physical{183.0}=0x67504312 +phy_chain_tx_lane_map_physical{184.0}=0x67504312 +serdes_core_rx_polarity_flip_physical{177}=0x9B +serdes_core_rx_polarity_flip_physical{178}=0x9B +serdes_core_rx_polarity_flip_physical{179}=0x9B +serdes_core_rx_polarity_flip_physical{180}=0x9B +serdes_core_rx_polarity_flip_physical{181}=0x9B +serdes_core_rx_polarity_flip_physical{182}=0x9B +serdes_core_rx_polarity_flip_physical{183}=0x9B +serdes_core_rx_polarity_flip_physical{184}=0x9B +serdes_core_tx_polarity_flip_physical{177}=0xD3 +serdes_core_tx_polarity_flip_physical{178}=0xD3 +serdes_core_tx_polarity_flip_physical{179}=0xD3 +serdes_core_tx_polarity_flip_physical{180}=0xD3 +serdes_core_tx_polarity_flip_physical{181}=0xD3 +serdes_core_tx_polarity_flip_physical{182}=0xD3 +serdes_core_tx_polarity_flip_physical{183}=0xD3 +serdes_core_tx_polarity_flip_physical{184}=0xD3 + +dport_map_port_114=117 +dport_map_port_115=118 +dport_map_port_112=119 +dport_map_port_113=120 +portmap_112=185:100 +portmap_113=187:100 +portmap_114=189:100 +portmap_115=191:100 +phy_chain_rx_lane_map_physical{185.0}=0x64570123 +phy_chain_rx_lane_map_physical{186.0}=0x64570123 +phy_chain_rx_lane_map_physical{187.0}=0x64570123 +phy_chain_rx_lane_map_physical{188.0}=0x64570123 +phy_chain_rx_lane_map_physical{189.0}=0x64570123 +phy_chain_rx_lane_map_physical{190.0}=0x64570123 +phy_chain_rx_lane_map_physical{191.0}=0x64570123 +phy_chain_rx_lane_map_physical{192.0}=0x64570123 +phy_chain_tx_lane_map_physical{185.0}=0x15247360 +phy_chain_tx_lane_map_physical{186.0}=0x15247360 +phy_chain_tx_lane_map_physical{187.0}=0x15247360 +phy_chain_tx_lane_map_physical{188.0}=0x15247360 +phy_chain_tx_lane_map_physical{189.0}=0x15247360 +phy_chain_tx_lane_map_physical{190.0}=0x15247360 +phy_chain_tx_lane_map_physical{191.0}=0x15247360 +phy_chain_tx_lane_map_physical{192.0}=0x15247360 +serdes_core_rx_polarity_flip_physical{185}=0xCA +serdes_core_rx_polarity_flip_physical{186}=0xCA +serdes_core_rx_polarity_flip_physical{187}=0xCA +serdes_core_rx_polarity_flip_physical{188}=0xCA +serdes_core_rx_polarity_flip_physical{189}=0xCA +serdes_core_rx_polarity_flip_physical{190}=0xCA +serdes_core_rx_polarity_flip_physical{191}=0xCA +serdes_core_rx_polarity_flip_physical{192}=0xCA +serdes_core_tx_polarity_flip_physical{185}=0x4 +serdes_core_tx_polarity_flip_physical{186}=0x4 +serdes_core_tx_polarity_flip_physical{187}=0x4 +serdes_core_tx_polarity_flip_physical{188}=0x4 +serdes_core_tx_polarity_flip_physical{189}=0x4 +serdes_core_tx_polarity_flip_physical{190}=0x4 +serdes_core_tx_polarity_flip_physical{191}=0x4 +serdes_core_tx_polarity_flip_physical{192}=0x4 + +dport_map_port_122=73 +dport_map_port_123=74 +dport_map_port_120=75 +dport_map_port_121=76 +portmap_120=193:100 +portmap_121=195:100 +portmap_122=197:100 +portmap_123=199:100 +phy_chain_rx_lane_map_physical{193.0}=0x36271504 +phy_chain_rx_lane_map_physical{194.0}=0x36271504 +phy_chain_rx_lane_map_physical{195.0}=0x36271504 +phy_chain_rx_lane_map_physical{196.0}=0x36271504 +phy_chain_rx_lane_map_physical{197.0}=0x36271504 +phy_chain_rx_lane_map_physical{198.0}=0x36271504 +phy_chain_rx_lane_map_physical{199.0}=0x36271504 +phy_chain_rx_lane_map_physical{200.0}=0x36271504 +phy_chain_tx_lane_map_physical{193.0}=0x41203675 +phy_chain_tx_lane_map_physical{194.0}=0x41203675 +phy_chain_tx_lane_map_physical{195.0}=0x41203675 +phy_chain_tx_lane_map_physical{196.0}=0x41203675 +phy_chain_tx_lane_map_physical{197.0}=0x41203675 +phy_chain_tx_lane_map_physical{198.0}=0x41203675 +phy_chain_tx_lane_map_physical{199.0}=0x41203675 +phy_chain_tx_lane_map_physical{200.0}=0x41203675 +serdes_core_rx_polarity_flip_physical{193}=0x49 +serdes_core_rx_polarity_flip_physical{194}=0x49 +serdes_core_rx_polarity_flip_physical{195}=0x49 +serdes_core_rx_polarity_flip_physical{196}=0x49 +serdes_core_rx_polarity_flip_physical{197}=0x49 +serdes_core_rx_polarity_flip_physical{198}=0x49 +serdes_core_rx_polarity_flip_physical{199}=0x49 +serdes_core_rx_polarity_flip_physical{200}=0x49 +serdes_core_tx_polarity_flip_physical{193}=0xE8 +serdes_core_tx_polarity_flip_physical{194}=0xE8 +serdes_core_tx_polarity_flip_physical{195}=0xE8 +serdes_core_tx_polarity_flip_physical{196}=0xE8 +serdes_core_tx_polarity_flip_physical{197}=0xE8 +serdes_core_tx_polarity_flip_physical{198}=0xE8 +serdes_core_tx_polarity_flip_physical{199}=0xE8 +serdes_core_tx_polarity_flip_physical{200}=0xE8 + +dport_map_port_126=89 +dport_map_port_127=90 +dport_map_port_124=91 +dport_map_port_125=92 +portmap_124=201:100 +portmap_125=203:100 +portmap_126=205:100 +portmap_127=207:100 +phy_chain_rx_lane_map_physical{201.0}=0x64570123 +phy_chain_rx_lane_map_physical{202.0}=0x64570123 +phy_chain_rx_lane_map_physical{203.0}=0x64570123 +phy_chain_rx_lane_map_physical{204.0}=0x64570123 +phy_chain_rx_lane_map_physical{205.0}=0x64570123 +phy_chain_rx_lane_map_physical{206.0}=0x64570123 +phy_chain_rx_lane_map_physical{207.0}=0x64570123 +phy_chain_rx_lane_map_physical{208.0}=0x64570123 +phy_chain_tx_lane_map_physical{201.0}=0x32046571 +phy_chain_tx_lane_map_physical{202.0}=0x32046571 +phy_chain_tx_lane_map_physical{203.0}=0x32046571 +phy_chain_tx_lane_map_physical{204.0}=0x32046571 +phy_chain_tx_lane_map_physical{205.0}=0x32046571 +phy_chain_tx_lane_map_physical{206.0}=0x32046571 +phy_chain_tx_lane_map_physical{207.0}=0x32046571 +phy_chain_tx_lane_map_physical{208.0}=0x32046571 +serdes_core_rx_polarity_flip_physical{201}=0xBA +serdes_core_rx_polarity_flip_physical{202}=0xBA +serdes_core_rx_polarity_flip_physical{203}=0xBA +serdes_core_rx_polarity_flip_physical{204}=0xBA +serdes_core_rx_polarity_flip_physical{205}=0xBA +serdes_core_rx_polarity_flip_physical{206}=0xBA +serdes_core_rx_polarity_flip_physical{207}=0xBA +serdes_core_rx_polarity_flip_physical{208}=0xBA +serdes_core_tx_polarity_flip_physical{201}=0x5F +serdes_core_tx_polarity_flip_physical{202}=0x5F +serdes_core_tx_polarity_flip_physical{203}=0x5F +serdes_core_tx_polarity_flip_physical{204}=0x5F +serdes_core_tx_polarity_flip_physical{205}=0x5F +serdes_core_tx_polarity_flip_physical{206}=0x5F +serdes_core_tx_polarity_flip_physical{207}=0x5F +serdes_core_tx_polarity_flip_physical{208}=0x5F + +dport_map_port_130=105 +dport_map_port_131=106 +dport_map_port_128=107 +dport_map_port_129=108 +portmap_128=209:100 +portmap_129=211:100 +portmap_130=213:100 +portmap_131=215:100 +phy_chain_rx_lane_map_physical{209.0}=0x37014526 +phy_chain_rx_lane_map_physical{210.0}=0x37014526 +phy_chain_rx_lane_map_physical{211.0}=0x37014526 +phy_chain_rx_lane_map_physical{212.0}=0x37014526 +phy_chain_rx_lane_map_physical{213.0}=0x37014526 +phy_chain_rx_lane_map_physical{214.0}=0x37014526 +phy_chain_rx_lane_map_physical{215.0}=0x37014526 +phy_chain_rx_lane_map_physical{216.0}=0x37014526 +phy_chain_tx_lane_map_physical{209.0}=0x56704213 +phy_chain_tx_lane_map_physical{210.0}=0x56704213 +phy_chain_tx_lane_map_physical{211.0}=0x56704213 +phy_chain_tx_lane_map_physical{212.0}=0x56704213 +phy_chain_tx_lane_map_physical{213.0}=0x56704213 +phy_chain_tx_lane_map_physical{214.0}=0x56704213 +phy_chain_tx_lane_map_physical{215.0}=0x56704213 +phy_chain_tx_lane_map_physical{216.0}=0x56704213 +serdes_core_rx_polarity_flip_physical{209}=0x19 +serdes_core_rx_polarity_flip_physical{210}=0x19 +serdes_core_rx_polarity_flip_physical{211}=0x19 +serdes_core_rx_polarity_flip_physical{212}=0x19 +serdes_core_rx_polarity_flip_physical{213}=0x19 +serdes_core_rx_polarity_flip_physical{214}=0x19 +serdes_core_rx_polarity_flip_physical{215}=0x19 +serdes_core_rx_polarity_flip_physical{216}=0x19 +serdes_core_tx_polarity_flip_physical{209}=0x35 +serdes_core_tx_polarity_flip_physical{210}=0x35 +serdes_core_tx_polarity_flip_physical{211}=0x35 +serdes_core_tx_polarity_flip_physical{212}=0x35 +serdes_core_tx_polarity_flip_physical{213}=0x35 +serdes_core_tx_polarity_flip_physical{214}=0x35 +serdes_core_tx_polarity_flip_physical{215}=0x35 +serdes_core_tx_polarity_flip_physical{216}=0x35 + +dport_map_port_134=121 +dport_map_port_135=122 +dport_map_port_132=123 +dport_map_port_133=124 +portmap_132=217:100 +portmap_133=219:100 +portmap_134=221:100 +portmap_135=223:100 +phy_chain_rx_lane_map_physical{217.0}=0x65041273 +phy_chain_rx_lane_map_physical{218.0}=0x65041273 +phy_chain_rx_lane_map_physical{219.0}=0x65041273 +phy_chain_rx_lane_map_physical{220.0}=0x65041273 +phy_chain_rx_lane_map_physical{221.0}=0x65041273 +phy_chain_rx_lane_map_physical{222.0}=0x65041273 +phy_chain_rx_lane_map_physical{223.0}=0x65041273 +phy_chain_rx_lane_map_physical{224.0}=0x65041273 +phy_chain_tx_lane_map_physical{217.0}=0x53174620 +phy_chain_tx_lane_map_physical{218.0}=0x53174620 +phy_chain_tx_lane_map_physical{219.0}=0x53174620 +phy_chain_tx_lane_map_physical{220.0}=0x53174620 +phy_chain_tx_lane_map_physical{221.0}=0x53174620 +phy_chain_tx_lane_map_physical{222.0}=0x53174620 +phy_chain_tx_lane_map_physical{223.0}=0x53174620 +phy_chain_tx_lane_map_physical{224.0}=0x53174620 +serdes_core_rx_polarity_flip_physical{217}=0xE6 +serdes_core_rx_polarity_flip_physical{218}=0xE6 +serdes_core_rx_polarity_flip_physical{219}=0xE6 +serdes_core_rx_polarity_flip_physical{220}=0xE6 +serdes_core_rx_polarity_flip_physical{221}=0xE6 +serdes_core_rx_polarity_flip_physical{222}=0xE6 +serdes_core_rx_polarity_flip_physical{223}=0xE6 +serdes_core_rx_polarity_flip_physical{224}=0xE6 +serdes_core_tx_polarity_flip_physical{217}=0xE8 +serdes_core_tx_polarity_flip_physical{218}=0xE8 +serdes_core_tx_polarity_flip_physical{219}=0xE8 +serdes_core_tx_polarity_flip_physical{220}=0xE8 +serdes_core_tx_polarity_flip_physical{221}=0xE8 +serdes_core_tx_polarity_flip_physical{222}=0xE8 +serdes_core_tx_polarity_flip_physical{223}=0xE8 +serdes_core_tx_polarity_flip_physical{224}=0xE8 + +dport_map_port_142=77 +dport_map_port_143=78 +dport_map_port_140=79 +dport_map_port_141=80 +portmap_140=225:100 +portmap_141=227:100 +portmap_142=229:100 +portmap_143=231:100 +phy_chain_rx_lane_map_physical{225.0}=0x32106745 +phy_chain_rx_lane_map_physical{226.0}=0x32106745 +phy_chain_rx_lane_map_physical{227.0}=0x32106745 +phy_chain_rx_lane_map_physical{228.0}=0x32106745 +phy_chain_rx_lane_map_physical{229.0}=0x32106745 +phy_chain_rx_lane_map_physical{230.0}=0x32106745 +phy_chain_rx_lane_map_physical{231.0}=0x32106745 +phy_chain_rx_lane_map_physical{232.0}=0x32106745 +phy_chain_tx_lane_map_physical{225.0}=0x65702134 +phy_chain_tx_lane_map_physical{226.0}=0x65702134 +phy_chain_tx_lane_map_physical{227.0}=0x65702134 +phy_chain_tx_lane_map_physical{228.0}=0x65702134 +phy_chain_tx_lane_map_physical{229.0}=0x65702134 +phy_chain_tx_lane_map_physical{230.0}=0x65702134 +phy_chain_tx_lane_map_physical{231.0}=0x65702134 +phy_chain_tx_lane_map_physical{232.0}=0x65702134 +serdes_core_rx_polarity_flip_physical{225}=0xDA +serdes_core_rx_polarity_flip_physical{226}=0xDA +serdes_core_rx_polarity_flip_physical{227}=0xDA +serdes_core_rx_polarity_flip_physical{228}=0xDA +serdes_core_rx_polarity_flip_physical{229}=0xDA +serdes_core_rx_polarity_flip_physical{230}=0xDA +serdes_core_rx_polarity_flip_physical{231}=0xDA +serdes_core_rx_polarity_flip_physical{232}=0xDA +serdes_core_tx_polarity_flip_physical{225}=0xB2 +serdes_core_tx_polarity_flip_physical{226}=0xB2 +serdes_core_tx_polarity_flip_physical{227}=0xB2 +serdes_core_tx_polarity_flip_physical{228}=0xB2 +serdes_core_tx_polarity_flip_physical{229}=0xB2 +serdes_core_tx_polarity_flip_physical{230}=0xB2 +serdes_core_tx_polarity_flip_physical{231}=0xB2 +serdes_core_tx_polarity_flip_physical{232}=0xB2 + +dport_map_port_146=93 +dport_map_port_147=94 +dport_map_port_144=95 +dport_map_port_145=96 +portmap_144=233:100 +portmap_145=235:100 +portmap_146=237:100 +portmap_147=239:100 +phy_chain_rx_lane_map_physical{233.0}=0x76450321 +phy_chain_rx_lane_map_physical{234.0}=0x76450321 +phy_chain_rx_lane_map_physical{235.0}=0x76450321 +phy_chain_rx_lane_map_physical{236.0}=0x76450321 +phy_chain_rx_lane_map_physical{237.0}=0x76450321 +phy_chain_rx_lane_map_physical{238.0}=0x76450321 +phy_chain_rx_lane_map_physical{239.0}=0x76450321 +phy_chain_rx_lane_map_physical{240.0}=0x76450321 +phy_chain_tx_lane_map_physical{233.0}=0x52301467 +phy_chain_tx_lane_map_physical{234.0}=0x52301467 +phy_chain_tx_lane_map_physical{235.0}=0x52301467 +phy_chain_tx_lane_map_physical{236.0}=0x52301467 +phy_chain_tx_lane_map_physical{237.0}=0x52301467 +phy_chain_tx_lane_map_physical{238.0}=0x52301467 +phy_chain_tx_lane_map_physical{239.0}=0x52301467 +phy_chain_tx_lane_map_physical{240.0}=0x52301467 +serdes_core_rx_polarity_flip_physical{233}=0xE5 +serdes_core_rx_polarity_flip_physical{234}=0xE5 +serdes_core_rx_polarity_flip_physical{235}=0xE5 +serdes_core_rx_polarity_flip_physical{236}=0xE5 +serdes_core_rx_polarity_flip_physical{237}=0xE5 +serdes_core_rx_polarity_flip_physical{238}=0xE5 +serdes_core_rx_polarity_flip_physical{239}=0xE5 +serdes_core_rx_polarity_flip_physical{240}=0xE5 +serdes_core_tx_polarity_flip_physical{233}=0xAA +serdes_core_tx_polarity_flip_physical{234}=0xAA +serdes_core_tx_polarity_flip_physical{235}=0xAA +serdes_core_tx_polarity_flip_physical{236}=0xAA +serdes_core_tx_polarity_flip_physical{237}=0xAA +serdes_core_tx_polarity_flip_physical{238}=0xAA +serdes_core_tx_polarity_flip_physical{239}=0xAA +serdes_core_tx_polarity_flip_physical{240}=0xAA + +dport_map_port_150=109 +dport_map_port_151=110 +dport_map_port_148=111 +dport_map_port_149=112 +portmap_148=241:100 +portmap_149=243:100 +portmap_150=245:100 +portmap_151=247:100 +phy_chain_rx_lane_map_physical{241.0}=0x01276534 +phy_chain_rx_lane_map_physical{242.0}=0x01276534 +phy_chain_rx_lane_map_physical{243.0}=0x01276534 +phy_chain_rx_lane_map_physical{244.0}=0x01276534 +phy_chain_rx_lane_map_physical{245.0}=0x01276534 +phy_chain_rx_lane_map_physical{246.0}=0x01276534 +phy_chain_rx_lane_map_physical{247.0}=0x01276534 +phy_chain_rx_lane_map_physical{248.0}=0x01276534 +phy_chain_tx_lane_map_physical{241.0}=0x67540123 +phy_chain_tx_lane_map_physical{242.0}=0x67540123 +phy_chain_tx_lane_map_physical{243.0}=0x67540123 +phy_chain_tx_lane_map_physical{244.0}=0x67540123 +phy_chain_tx_lane_map_physical{245.0}=0x67540123 +phy_chain_tx_lane_map_physical{246.0}=0x67540123 +phy_chain_tx_lane_map_physical{247.0}=0x67540123 +phy_chain_tx_lane_map_physical{248.0}=0x67540123 +serdes_core_rx_polarity_flip_physical{241}=0x34 +serdes_core_rx_polarity_flip_physical{242}=0x34 +serdes_core_rx_polarity_flip_physical{243}=0x34 +serdes_core_rx_polarity_flip_physical{244}=0x34 +serdes_core_rx_polarity_flip_physical{245}=0x34 +serdes_core_rx_polarity_flip_physical{246}=0x34 +serdes_core_rx_polarity_flip_physical{247}=0x34 +serdes_core_rx_polarity_flip_physical{248}=0x34 +serdes_core_tx_polarity_flip_physical{241}=0x83 +serdes_core_tx_polarity_flip_physical{242}=0x83 +serdes_core_tx_polarity_flip_physical{243}=0x83 +serdes_core_tx_polarity_flip_physical{244}=0x83 +serdes_core_tx_polarity_flip_physical{245}=0x83 +serdes_core_tx_polarity_flip_physical{246}=0x83 +serdes_core_tx_polarity_flip_physical{247}=0x83 +serdes_core_tx_polarity_flip_physical{248}=0x83 + +dport_map_port_154=125 +dport_map_port_155=126 +dport_map_port_152=127 +dport_map_port_153=128 +portmap_152=249:100 +portmap_153=251:100 +portmap_154=253:100 +portmap_155=255:100 +phy_chain_rx_lane_map_physical{249.0}=0x06152347 +phy_chain_rx_lane_map_physical{250.0}=0x06152347 +phy_chain_rx_lane_map_physical{251.0}=0x06152347 +phy_chain_rx_lane_map_physical{252.0}=0x06152347 +phy_chain_rx_lane_map_physical{253.0}=0x06152347 +phy_chain_rx_lane_map_physical{254.0}=0x06152347 +phy_chain_rx_lane_map_physical{255.0}=0x06152347 +phy_chain_rx_lane_map_physical{256.0}=0x06152347 +phy_chain_tx_lane_map_physical{249.0}=0x67501342 +phy_chain_tx_lane_map_physical{250.0}=0x67501342 +phy_chain_tx_lane_map_physical{251.0}=0x67501342 +phy_chain_tx_lane_map_physical{252.0}=0x67501342 +phy_chain_tx_lane_map_physical{253.0}=0x67501342 +phy_chain_tx_lane_map_physical{254.0}=0x67501342 +phy_chain_tx_lane_map_physical{255.0}=0x67501342 +phy_chain_tx_lane_map_physical{256.0}=0x67501342 +serdes_core_rx_polarity_flip_physical{249}=0x19 +serdes_core_rx_polarity_flip_physical{250}=0x19 +serdes_core_rx_polarity_flip_physical{251}=0x19 +serdes_core_rx_polarity_flip_physical{252}=0x19 +serdes_core_rx_polarity_flip_physical{253}=0x19 +serdes_core_rx_polarity_flip_physical{254}=0x19 +serdes_core_rx_polarity_flip_physical{255}=0x19 +serdes_core_rx_polarity_flip_physical{256}=0x19 +serdes_core_tx_polarity_flip_physical{249}=0x7E +serdes_core_tx_polarity_flip_physical{250}=0x7E +serdes_core_tx_polarity_flip_physical{251}=0x7E +serdes_core_tx_polarity_flip_physical{252}=0x7E +serdes_core_tx_polarity_flip_physical{253}=0x7E +serdes_core_tx_polarity_flip_physical{254}=0x7E +serdes_core_tx_polarity_flip_physical{255}=0x7E +serdes_core_tx_polarity_flip_physical{256}=0x7E + +dport_map_port_38=299 +portmap_38=257:10 + +dport_map_port_118=300 +portmap_118=258:10 + +portmap_19=259:10 + +portmap_39=260:10 + +portmap_59=261:10 + +portmap_79=262:10 + +portmap_99=263:10 + +portmap_119=264:10 + +portmap_139=265:10 + +portmap_159=266:10 + diff --git a/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/port_config.ini b/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/port_config.ini old mode 100644 new mode 100755 index fd2022dc2c9d..cc8e7cbad5fd --- a/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/port_config.ini +++ b/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/port_config.ini @@ -1,33 +1,129 @@ -# name lanes alias -Ethernet0 49,50,51,52 fortyGigE1 -Ethernet4 53,54,55,56 fortyGigE2 -Ethernet8 57,58,59,60 fortyGigE3 -Ethernet12 61,62,63,64 fortyGigE4 -Ethernet16 65,66,67,68 fortyGigE5 -Ethernet20 69,70,71,72 fortyGigE6 -Ethernet24 73,74,75,76 fortyGigE7 -Ethernet28 77,78,79,80 fortyGigE8 -Ethernet32 33,34,35,36 fortyGigE9 -Ethernet36 37,38,39,40 fortyGigE10 -Ethernet40 41,42,43,44 fortyGigE11 -Ethernet44 45,46,47,48 fortyGigE12 -Ethernet48 81,82,83,84 fortyGigE13 -Ethernet52 85,86,87,88 fortyGigE14 -Ethernet56 89,90,91,92 fortyGigE15 -Ethernet60 93,94,95,96 fortyGigE16 -Ethernet64 97,98,99,100 fortyGigE17 -Ethernet68 101,102,103,104 fortyGigE18 -Ethernet72 105,106,107,108 fortyGigE19 -Ethernet76 109,110,111,112 fortyGigE20 -Ethernet80 17,18,19,20 fortyGigE21 -Ethernet84 21,22,23,24 fortyGigE22 -Ethernet88 25,26,27,28 fortyGigE23 -Ethernet92 29,30,31,32 fortyGigE24 -Ethernet96 113,114,115,116 fortyGigE25 -Ethernet100 117,118,119,120 fortyGigE26 -Ethernet104 121,122,123,124 fortyGigE27 -Ethernet108 125,126,127,128 fortyGigE28 -Ethernet112 1,2,3,4 fortyGigE29 -Ethernet116 5,6,7,8 fortyGigE30 -Ethernet120 9,10,11,12 fortyGigE31 -Ethernet124 13,14,15,16 fortyGigE32 +# name lanes alias index +Ethernet1 5,6 onehundredGigE1 0 +Ethernet2 7,8 onehundredGigE2 1 +Ethernet3 1,2 onehundredGigE3 2 +Ethernet4 3,4 onehundredGigE4 3 +Ethernet5 37,38 onehundredGigE5 4 +Ethernet6 39,40 onehundredGigE6 5 +Ethernet7 33,34 onehundredGigE7 6 +Ethernet8 35,36 onehundredGigE8 7 +Ethernet9 69,70 onehundredGigE9 8 +Ethernet10 71,72 onehundredGigE10 9 +Ethernet11 65,66 onehundredGigE11 10 +Ethernet12 67,68 onehundredGigE12 11 +Ethernet13 101,102 onehundredGigE13 12 +Ethernet14 103,104 onehundredGigE14 13 +Ethernet15 97,98 onehundredGigE15 14 +Ethernet16 99,100 onehundredGigE16 15 +Ethernet17 13,14 onehundredGigE17 16 +Ethernet18 15,16 onehundredGigE18 17 +Ethernet19 9,10 onehundredGigE19 18 +Ethernet20 11,12 onehundredGigE20 19 +Ethernet21 45,46 onehundredGigE21 20 +Ethernet22 47,48 onehundredGigE22 21 +Ethernet23 41,42 onehundredGigE23 22 +Ethernet24 43,44 onehundredGigE24 23 +Ethernet25 77,78 onehundredGigE25 24 +Ethernet26 79,80 onehundredGigE26 25 +Ethernet27 73,74 onehundredGigE27 26 +Ethernet28 75,76 onehundredGigE28 27 +Ethernet29 109,110 onehundredGigE29 28 +Ethernet30 111,112 onehundredGigE30 29 +Ethernet31 105,106 onehundredGigE31 30 +Ethernet32 107,108 onehundredGigE32 31 +Ethernet33 21,22 onehundredGigE33 32 +Ethernet34 23,24 onehundredGigE34 33 +Ethernet35 17,18 onehundredGigE35 34 +Ethernet36 19,20 onehundredGigE36 35 +Ethernet37 53,54 onehundredGigE37 36 +Ethernet38 55,56 onehundredGigE38 37 +Ethernet39 49,50 onehundredGigE39 38 +Ethernet40 51,52 onehundredGigE40 39 +Ethernet41 85,86 onehundredGigE41 40 +Ethernet42 87,88 onehundredGigE42 41 +Ethernet43 81,82 onehundredGigE43 42 +Ethernet44 83,84 onehundredGigE44 43 +Ethernet45 117,118 onehundredGigE45 44 +Ethernet46 119,120 onehundredGigE46 45 +Ethernet47 113,114 onehundredGigE47 46 +Ethernet48 115,116 onehundredGigE48 47 +Ethernet49 29,30 onehundredGigE49 48 +Ethernet50 31,32 onehundredGigE50 49 +Ethernet51 25,26 onehundredGigE51 50 +Ethernet52 27,28 onehundredGigE52 51 +Ethernet53 61,62 onehundredGigE53 52 +Ethernet54 63,64 onehundredGigE54 53 +Ethernet55 57,58 onehundredGigE55 54 +Ethernet56 59,60 onehundredGigE56 55 +Ethernet57 93,94 onehundredGigE57 56 +Ethernet58 95,96 onehundredGigE58 57 +Ethernet59 89,90 onehundredGigE59 58 +Ethernet60 91,92 onehundredGigE60 59 +Ethernet61 125,126 onehundredGigE61 60 +Ethernet62 127,128 onehundredGigE62 61 +Ethernet63 121,122 onehundredGigE63 62 +Ethernet64 123,124 onehundredGigE64 63 +Ethernet65 133,134 onehundredGigE65 64 +Ethernet66 135,136 onehundredGigE66 65 +Ethernet67 129,130 onehundredGigE67 66 +Ethernet68 131,132 onehundredGigE68 67 +Ethernet69 165,166 onehundredGigE69 68 +Ethernet70 167,168 onehundredGigE70 69 +Ethernet71 161,162 onehundredGigE71 70 +Ethernet72 163,164 onehundredGigE72 71 +Ethernet73 197,198 onehundredGigE73 72 +Ethernet74 199,200 onehundredGigE74 73 +Ethernet75 193,194 onehundredGigE75 74 +Ethernet76 195,196 onehundredGigE76 75 +Ethernet77 229,230 onehundredGigE77 76 +Ethernet78 231,232 onehundredGigE78 77 +Ethernet79 225,226 onehundredGigE79 78 +Ethernet80 227,228 onehundredGigE80 79 +Ethernet81 141,142 onehundredGigE81 80 +Ethernet82 143,144 onehundredGigE82 81 +Ethernet83 137,138 onehundredGigE83 82 +Ethernet84 139,140 onehundredGigE84 83 +Ethernet85 173,174 onehundredGigE85 84 +Ethernet86 175,176 onehundredGigE86 85 +Ethernet87 169,170 onehundredGigE87 86 +Ethernet88 171,172 onehundredGigE88 87 +Ethernet89 205,206 onehundredGigE89 88 +Ethernet90 207,208 onehundredGigE90 89 +Ethernet91 201,202 onehundredGigE91 90 +Ethernet92 203,204 onehundredGigE92 91 +Ethernet93 237,238 onehundredGigE93 92 +Ethernet94 239,240 onehundredGigE94 93 +Ethernet95 233,234 onehundredGigE95 94 +Ethernet96 235,236 onehundredGigE96 95 +Ethernet97 149,150 onehundredGigE97 96 +Ethernet98 151,152 onehundredGigE98 97 +Ethernet99 145,146 onehundredGigE99 98 +Ethernet100 147,148 onehundredGigE100 99 +Ethernet101 181,182 onehundredGigE101 100 +Ethernet102 183,184 onehundredGigE102 101 +Ethernet103 177,178 onehundredGigE103 102 +Ethernet104 179,180 onehundredGigE104 103 +Ethernet105 213,214 onehundredGigE105 104 +Ethernet106 215,216 onehundredGigE106 105 +Ethernet107 209,210 onehundredGigE107 106 +Ethernet108 211,212 onehundredGigE108 107 +Ethernet109 245,246 onehundredGigE109 108 +Ethernet110 247,248 onehundredGigE110 109 +Ethernet111 241,242 onehundredGigE111 110 +Ethernet112 243,244 onehundredGigE112 111 +Ethernet113 157,158 onehundredGigE113 112 +Ethernet114 159,160 onehundredGigE114 113 +Ethernet115 153,154 onehundredGigE115 114 +Ethernet116 155,156 onehundredGigE116 115 +Ethernet117 189,190 onehundredGigE117 116 +Ethernet118 191,192 onehundredGigE118 117 +Ethernet119 185,186 onehundredGigE119 118 +Ethernet120 187,188 onehundredGigE120 119 +Ethernet121 221,222 onehundredGigE121 120 +Ethernet122 223,224 onehundredGigE122 121 +Ethernet123 217,218 onehundredGigE123 122 +Ethernet124 219,220 onehundredGigE124 123 +Ethernet125 253,254 onehundredGigE125 124 +Ethernet126 255,256 onehundredGigE126 125 +Ethernet127 249,250 onehundredGigE127 126 +Ethernet128 251,252 onehundredGigE128 127 diff --git a/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/sai.profile b/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/sai.profile old mode 100644 new mode 100755 index a283ada9e28f..f76d1e7424ab --- a/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/sai.profile +++ b/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/sai.profile @@ -1 +1 @@ -SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/th3-minipack-32x400w.config.bcm +SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/config_16Q_FEC544_EVTB_100G.bcm diff --git a/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/th3-minipack-32x400w.config.bcm b/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/th3-minipack-32x400w.config.bcm deleted file mode 100644 index 54f3c366fdc4..000000000000 --- a/device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/th3-minipack-32x400w.config.bcm +++ /dev/null @@ -1,132 +0,0 @@ -os=unix -bcm_stat_flags=0 -parity_enable=0 -parity_correction=0 - -l2_mem_entries=163840 -l3_mem_entries=81920 -mmu_lossless=0 -lls_num_l2uc=12 -module_64ports=0 - -#SFI -serdes_if_type=9 - -port_init_cl72=0 -phy_an_c73=5 # TSCMOD_CL73_CL37 - -#sdk6.5.5 only supports 156(default) or 125 -#xgxs_lcpll_xtal_refclk=1 -tslam_dma_enable=1 -table_dma_enable=1 - -#for 32x40G ports for breakout mode -pbmp_oversubscribe=0x1fffffffe -pbmp_xport_xe=0x1fffffffe - -rate_ext_mdio_divisor=96 - -#QSFP+ 1 from WC0 -portmap_1=1:40 - -#QSFP+ 2 from WC1 -portmap_2=5:40 - -#QSFP+ 3 from WC2 -portmap_3=9:40 - -#QSFP+ 4 from WC3 -portmap_4=13:40 - -#QSFP+ 5 from WC4 -portmap_5=17:40 - -#QSFP+ 6 from WC5 -portmap_6=21:40 - -#QSFP+ 7 from WC6 -portmap_7=25:40 - -#QSFP+ 8 from WC7 -portmap_8=29:40 - -#QSFP+ 9 from WC8 -portmap_9=33:40 - -#QSFP+ 10 from WC9 -portmap_10=37:40 - -#QSFP+ 11 from WC10 -portmap_11=41:40 - -#QSFP+ 12 from WC11 -portmap_12=45:40 - -#QSFP+ 13 from WC12 -portmap_13=49:40 - -#QSFP+ 14 from WC13 -portmap_14=53:40 - -#QSFP+ 15 from WC14 -portmap_15=57:40 - -#QSFP+ 16 from WC15 -portmap_16=61:40 - -#QSFP+ 17 from WC16 -portmap_17=65:40 - -#QSFP+ 18 from WC17 -portmap_18=69:40 - -#QSFP+ 19 from WC18 -portmap_19=73:40 - -#QSFP+ 20 from WC19 -portmap_20=77:40 - -#QSFP+ 21 from WC20 -portmap_21=81:40 - -#QSFP+ 22 from WC21 -portmap_22=85:40 - -#QSFP+ 23 from WC22 -portmap_23=89:40 - -#QSFP+ 24 from WC23 -portmap_24=93:40 - -#QSFP+ 25 from WC24 -portmap_25=97:40 - -#QSFP+ 26 from WC25 -portmap_26=101:40 - -#QSFP+ 27 from WC26 -portmap_27=105:40 - -#QSFP+ 28 from WC27 -portmap_28=109:40 - -#QSFP+ 29 from WC28 -portmap_29=113:40 - -#QSFP+ 30 from WC29 -portmap_30=117:40 - -#QSFP+ 31 from WC30 -portmap_31=121:40 - -#QSFP+ 32 from WC31 -portmap_32=125:40 - -# L3 ECMP -# - In Trident2, VP LAGs share the same table as ECMP group table. -# The first N entries are reserved for VP LAGs, where N is the value of the -# config property "max_vp_lags". By default this was set to 256 -l3_max_ecmp_mode=1 -max_vp_lags=0 - -stable_size=0x2000000 diff --git a/device/accton/x86_64-accton_minipack-r0/installer.conf b/device/accton/x86_64-accton_minipack-r0/installer.conf old mode 100644 new mode 100755 index 3714ff053bb0..30392541fade --- a/device/accton/x86_64-accton_minipack-r0/installer.conf +++ b/device/accton/x86_64-accton_minipack-r0/installer.conf @@ -1 +1,4 @@ +CONSOLE_PORT=0x3f8 +CONSOLE_DEV=0 CONSOLE_SPEED=57600 +ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="pcie_aspm=off" diff --git a/device/accton/x86_64-accton_minipack-r0/led_proc_init.soc b/device/accton/x86_64-accton_minipack-r0/led_proc_init.soc old mode 100644 new mode 100755 index d4d5fff774ff..6b2aaa764072 --- a/device/accton/x86_64-accton_minipack-r0/led_proc_init.soc +++ b/device/accton/x86_64-accton_minipack-r0/led_proc_init.soc @@ -1,103 +1 @@ -# LED setting for active -# ----------------------------------------------------------------------------- -# ----------------------------------------------------------------------------- - -s CMIC_LEDUP0_DATA_RAM 0 -s CMIC_LEDUP1_DATA_RAM 0 - -m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_63=0 -m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_59=1 -m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_55=2 -m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_51=3 -m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_35=4 -m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_39=5 -m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_43=6 -m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_47=7 - -m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_31=8 -m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_27=9 -m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_23=10 -m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_19=11 -m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_3=12 -m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_7=13 -m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_11=14 -m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_15=15 - - -m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_62=63 -m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_61=62 -m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=61 -m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_58=60 -m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_57=59 -m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=58 -m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_54=57 -m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_53=56 -m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=55 -m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_50=54 -m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_49=53 -m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=52 -m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_46=51 -m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_45=50 -m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=49 -m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_42=48 -m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_41=47 -m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=46 -m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_38=45 -m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_37=44 -m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=43 -m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_34=42 -m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_33=41 -m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=40 -m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_30=39 -m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_29=38 -m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=37 -m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_26=36 -m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_25=35 -m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=34 -m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_22=33 -m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_21=32 -m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=31 -m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_18=30 -m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_17=29 -m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=28 -m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_14=27 -m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_13=26 -m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=25 -m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_10=24 -m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_9=23 -m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=22 -m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_6=21 -m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_5=20 -m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=19 -m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_2=18 -m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_1=17 -m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=16 - - -led 0 stop -led 0 prog \ - 02 F9 42 80 02 F7 42 00 02 F8 42 00 02 F4 42 90 02 \ - F3 42 10 67 6A 67 6A 67 38 67 6A 67 6A 67 6A 67 6A \ - 67 6A 67 6A 86 F8 06 F3 D6 F8 74 14 86 F0 3E F4 67 \ - 6A 57 67 7E 57 06 F8 88 80 4A 00 27 97 75 35 90 4A \ - 00 27 4A 01 27 B7 97 71 4F 77 32 06 F5 D6 F0 74 62 \ - 02 F5 4A 07 37 4E 07 02 F0 42 00 4E 07 02 F5 4A 07 \ - 71 32 77 35 16 F7 06 F9 17 4D DA 07 74 7B 12 F7 52 \ - 00 86 F9 57 86 F7 57 16 F7 06 F9 07 4D DA 07 74 8F \ - 12 F7 52 00 86 F9 57 86 F7 57 00 00 00 00 00 00 00 \ - 00 00 00 00 00 00 00 -led 0 start - -led 1 stop -led 1 prog \ - 02 F9 42 80 02 F7 42 00 02 F8 42 01 02 F4 42 90 02 \ - F3 42 11 67 6A 67 6A 67 38 67 6A 67 6A 67 6A 67 6A \ - 67 6A 67 6A 86 F8 06 F3 D6 F8 74 14 86 F0 3E F4 67 \ - 6A 57 67 7E 57 06 F8 88 80 4A 00 27 97 75 35 90 4A \ - 00 27 4A 01 27 B7 97 71 4F 77 32 06 F5 D6 F0 74 62 \ - 02 F5 4A 07 37 4E 07 02 F0 42 00 4E 07 02 F5 4A 07 \ - 71 32 77 35 16 F7 06 F9 17 4D DA 07 74 7B 12 F7 52 \ - 00 86 F9 57 86 F7 57 16 F7 06 F9 07 4D DA 07 74 8F \ - 12 F7 52 00 86 F9 57 86 F7 57 00 00 00 00 00 00 00 \ - 00 00 00 00 00 00 00 -led 1 start + \ No newline at end of file diff --git a/device/accton/x86_64-accton_minipack-r0/sensors.conf b/device/accton/x86_64-accton_minipack-r0/sensors.conf old mode 100644 new mode 100755 index c0114ab68604..966d2f11ad9a --- a/device/accton/x86_64-accton_minipack-r0/sensors.conf +++ b/device/accton/x86_64-accton_minipack-r0/sensors.conf @@ -1,23 +1,3 @@ # libsensors configuration file # ------------------------------------------------ -chip "cpr_4011_4mxx-i2c-*-3c" - label in1 "PSU1_VIN" - label in2 "PSU1_VOUT" - label curr1 "PSU1_IIN" - label curr2 "PSU1_IOUT" - label power1 "PSU1_PIN" - label power2 "PSU1_POUT" - label fan1 "PSU1_FAN" - label temp1 "PSU1_TEMP" - -chip "cpr_4011_4mxx-i2c-*-3f" - label in1 "PSU2_VIN" - label in2 "PSU2_VOUT" - label curr1 "PSU2_IIN" - label curr2 "PSU2_IOUT" - label power1 "PSU2_PIN" - label power2 "PSU2_POUT" - label fan1 "PSU2_FAN" - label temp1 "PSU2_TEMP" -