Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[platform && device]update centec e582 platform device config files and drivers, update sai to 1.2.4 #1680

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitmodules
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,7 @@
[submodule "platform/broadcom/sonic-platform-modules-mitac"]
path = platform/broadcom/sonic-platform-modules-mitac
url = https://github.com/MiTAC-EBU/sonic-platform-modules-mitac.git
[submodule "platform/centec/sonic-platform-modules-e582"]
path = platform/centec/sonic-platform-modules-e582
url = https://github.com/CentecNetworks/sonic-platform-modules-e582
branch = 201803
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{# Default values which will be used if no actual configura available #}
{% set default_cable = '40m' %}
{% set default_ports_num = 54 -%}

{# Port configuration to cable length look-up table #}
{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #}
{# Roles described in the minigraph #}
{% set ports2cable = {
'torrouter_server' : '5m',
'leafrouter_torrouter' : '40m',
'spinerouter_leafrouter' : '300m'
}
%}

{%- macro cable_length(port_name) -%}
{%- set cable_len = [] -%}
{%- for local_port in DEVICE_NEIGHBOR -%}
{%- if local_port == port_name -%}
{%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%}
{%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%}
{%- set neighbor_role = neighbor.type -%}
{%- set roles1 = switch_role + '_' + neighbor_role %}
{%- set roles2 = neighbor_role + '_' + switch_role -%}
{%- set roles1 = roles1 | lower -%}
{%- set roles2 = roles2 | lower -%}
{%- if roles1 in ports2cable -%}
{%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%}
{%- elif roles2 in ports2cable -%}
{%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%}
{%- endif -%}
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{%- if cable_len -%}
{{ cable_len.0 }}
{%- else -%}
{{ default_cable }}
{%- endif -%}
{% endmacro %}

{%- if DEVICE_METADATA is defined %}
{%- set switch_role = DEVICE_METADATA['localhost']['type'] %}
{%- endif -%}

{# Generate list of ports if not defined #}
{% if PORT is not defined %}
{% set PORT = [] %}
{% for port_idx in range(1,default_ports_num+1) %}
{% if PORT.append("Ethernet%d" % (port_idx)) %}{% endif %}
{% endfor %}
{% endif -%}

{% set port_names_list = [] %}
{% for port in PORT %}
{%- if port_names_list.append(port) %}{% endif %}
{% endfor %}
{% set port_names = port_names_list | join(',') -%}

{
"CABLE_LENGTH": {
"AZURE": {
{% for port in PORT %}
{% set cable = cable_length(port) -%}
"{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %}

{% endfor %}
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# PG lossless profiles.
# speed cable size xon xoff threshold
1000 5m 34816 18432 16384 0
10000 5m 34816 18432 16384 0
25000 5m 34816 18432 16384 0
40000 5m 34816 18432 16384 0
50000 5m 34816 18432 16384 0
100000 5m 36864 18432 18432 0
1000 40m 36864 18432 18432 0
10000 40m 36864 18432 18432 0
25000 40m 39936 18432 21504 0
40000 40m 41984 18432 23552 0
50000 40m 41984 18432 23552 0
100000 40m 54272 18432 35840 0
1000 300m 49152 18432 30720 0
10000 300m 49152 18432 30720 0
25000 300m 71680 18432 53248 0
40000 300m 94208 18432 75776 0
50000 300m 94208 18432 75776 0
100000 300m 184320 18432 165888 0

Original file line number Diff line number Diff line change
@@ -1,33 +1,55 @@
# name lanes
Ethernet0 1
Ethernet4 2
Ethernet8 3
Ethernet12 4
Ethernet16 5
Ethernet20 6
Ethernet24 7
Ethernet28 8
Ethernet32 9
Ethernet36 10
Ethernet40 11
Ethernet44 12
Ethernet48 13
Ethernet52 14
Ethernet56 15
Ethernet60 16
Ethernet64 17
Ethernet68 18
Ethernet72 19
Ethernet76 20
Ethernet80 21
Ethernet84 22
Ethernet88 23
Ethernet92 24
Ethernet96 25
Ethernet100 26
Ethernet104 27
Ethernet108 28
Ethernet112 29
Ethernet116 30
Ethernet120 31
Ethernet124 32
Ethernet1 4
Ethernet2 5
Ethernet3 6
Ethernet4 8
Ethernet5 9
Ethernet6 10
Ethernet7 12
Ethernet8 13
Ethernet9 14
Ethernet10 16
Ethernet11 17
Ethernet12 18
Ethernet13 20
Ethernet14 21
Ethernet15 22
Ethernet16 24
Ethernet17 25
Ethernet18 26
Ethernet19 28
Ethernet20 30
Ethernet21 31
Ethernet22 32
Ethernet23 34
Ethernet24 35
Ethernet25 40
Ethernet26 41
Ethernet27 43
Ethernet28 36
Ethernet29 37
Ethernet30 39
Ethernet31 44
Ethernet32 45
Ethernet33 46
Ethernet34 47
Ethernet35 80
Ethernet36 81
Ethernet37 82
Ethernet38 88
Ethernet39 89
Ethernet40 90
Ethernet41 84
Ethernet42 85
Ethernet43 86
Ethernet44 87
Ethernet45 92
Ethernet46 93
Ethernet47 94
Ethernet48 95
Ethernet49 52,53,54,55
Ethernet50 56,57,58,59
Ethernet51 60,61,62,63
Ethernet52 68,69,70,71
Ethernet53 72,73,74,75
Ethernet54 76,77,78,79
133 changes: 133 additions & 0 deletions device/centec/x86_64-centec_e582_48x6q-r0/E582-48x6q/qos.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
{
"DSCP_TO_TC_MAP": {
"AZURE": {
"0":"0",
"1":"0",
"2":"0",
"3":"0",
"4":"0",
"5":"0",
"6":"0",
"7":"0",
"8":"1",
"9":"1",
"10":"1",
"11":"1",
"12":"1",
"13":"1",
"14":"1",
"15":"1",
"16":"2",
"17":"2",
"18":"2",
"19":"2",
"20":"2",
"21":"2",
"22":"2",
"23":"2",
"24":"3",
"25":"3",
"26":"3",
"27":"3",
"28":"3",
"29":"3",
"30":"3",
"31":"3",
"32":"4",
"33":"4",
"34":"4",
"35":"4",
"36":"4",
"37":"4",
"38":"4",
"39":"4",
"40":"5",
"41":"5",
"42":"5",
"43":"5",
"44":"5",
"45":"5",
"46":"5",
"47":"5",
"48":"6",
"49":"6",
"50":"6",
"51":"6",
"52":"6",
"53":"6",
"54":"6",
"55":"6",
"56":"7",
"57":"7",
"58":"7",
"59":"7",
"60":"7",
"61":"7",
"62":"7",
"63":"7"
}
},
"SCHEDULER": {
"scheduler.0": {
"type":"DWRR",
"weight": "25"
},
"scheduler.1": {
"type":"DWRR",
"weight": "30"
},
"scheduler.2": {
"type":"DWRR",
"weight": "20"
}
},
"PORT_QOS_MAP": {
"Ethernet1,Ethernet2,Ethernet3,Ethernet4,Ethernet5,Ethernet6,Ethernet7,Ethernet8,Ethernet9,Ethernet10,Ethernet11,Ethernet12,Ethernet13,Ethernet14,Ethernet15,Ethernet16,Ethernet17,Ethernet18,Ethernet19,Ethernet20,Ethernet21,Ethernet22,Ethernet23,Ethernet24,Ethernet25,Ethernet26,Ethernet27,Ethernet28,Ethernet29,Ethernet30,Ethernet31,Ethernet32,Ethernet33,Ethernet34,Ethernet35,Ethernet36,Ethernet37,Ethernet38,Ethernet39,Ethernet40,Ethernet41,Ethernet42,Ethernet43,Ethernet44,Ethernet45,Ethernet46,Ethernet47,Ethernet48,Ethernet49,Ethernet50,Ethernet51,Ethernet52,Ethernet53,Ethernet54": {
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
"pfc_enable": "3,4"
}
},
"WRED_PROFILE": {
"AZURE_LOSSY": {
"wred_green_enable":"true",
"wred_yellow_enable":"true",
"red_max_threshold":"32760",
"red_min_threshold":"4095",
"yellow_max_threshold":"32760",
"yellow_min_threshold":"4095",
"green_max_threshold": "32760",
"green_min_threshold": "4095"
},
"AZURE_LOSSLESS": {
"wred_green_enable":"true",
"wred_yellow_enable":"true",
"red_max_threshold":"32760",
"red_min_threshold":"4095",
"yellow_max_threshold":"32760",
"yellow_min_threshold":"4095",
"green_max_threshold": "32760",
"green_min_threshold": "4095"
}
},
"QUEUE": {
"Ethernet1,Ethernet2,Ethernet3,Ethernet4,Ethernet5,Ethernet6,Ethernet7,Ethernet8,Ethernet9,Ethernet10,Ethernet11,Ethernet12,Ethernet13,Ethernet14,Ethernet15,Ethernet16,Ethernet17,Ethernet18,Ethernet19,Ethernet20,Ethernet21,Ethernet22,Ethernet23,Ethernet24,Ethernet25,Ethernet26,Ethernet27,Ethernet28,Ethernet29,Ethernet30,Ethernet31,Ethernet32,Ethernet33,Ethernet34,Ethernet35,Ethernet36,Ethernet37,Ethernet38,Ethernet39,Ethernet40,Ethernet41,Ethernet42,Ethernet43,Ethernet44,Ethernet45,Ethernet46,Ethernet47,Ethernet48,Ethernet49,Ethernet50,Ethernet51,Ethernet52,Ethernet53,Ethernet54|0-2": {
"scheduler" : "[SCHEDULER|scheduler.1]"
},
"Ethernet1,Ethernet2,Ethernet3,Ethernet4,Ethernet5,Ethernet6,Ethernet7,Ethernet8,Ethernet9,Ethernet10,Ethernet11,Ethernet12,Ethernet13,Ethernet14,Ethernet15,Ethernet16,Ethernet17,Ethernet18,Ethernet19,Ethernet20,Ethernet21,Ethernet22,Ethernet23,Ethernet24,Ethernet25,Ethernet26,Ethernet27,Ethernet28,Ethernet29,Ethernet30,Ethernet31,Ethernet32,Ethernet33,Ethernet34,Ethernet35,Ethernet36,Ethernet37,Ethernet38,Ethernet39,Ethernet40,Ethernet41,Ethernet42,Ethernet43,Ethernet44,Ethernet45,Ethernet46,Ethernet47,Ethernet48,Ethernet49,Ethernet50,Ethernet51,Ethernet52,Ethernet53,Ethernet54|5-7": {
"scheduler" : "[SCHEDULER|scheduler.2]"
},
"Ethernet1,Ethernet2,Ethernet3,Ethernet4,Ethernet5,Ethernet6,Ethernet7,Ethernet8,Ethernet9,Ethernet10,Ethernet11,Ethernet12,Ethernet13,Ethernet14,Ethernet15,Ethernet16,Ethernet17,Ethernet18,Ethernet19,Ethernet20,Ethernet21,Ethernet22,Ethernet23,Ethernet24,Ethernet25,Ethernet26,Ethernet27,Ethernet28,Ethernet29,Ethernet30,Ethernet31,Ethernet32,Ethernet33,Ethernet34,Ethernet35,Ethernet36,Ethernet37,Ethernet38,Ethernet39,Ethernet40,Ethernet41,Ethernet42,Ethernet43,Ethernet44,Ethernet45,Ethernet46,Ethernet47,Ethernet48,Ethernet49,Ethernet50,Ethernet51,Ethernet52,Ethernet53,Ethernet54|0-2": {
"wred_profile" : "[WRED_PROFILE|AZURE_LOSSY]"
},

"Ethernet1,Ethernet2,Ethernet3,Ethernet4,Ethernet5,Ethernet6,Ethernet7,Ethernet8,Ethernet9,Ethernet10,Ethernet11,Ethernet12,Ethernet13,Ethernet14,Ethernet15,Ethernet16,Ethernet17,Ethernet18,Ethernet19,Ethernet20,Ethernet21,Ethernet22,Ethernet23,Ethernet24,Ethernet25,Ethernet26,Ethernet27,Ethernet28,Ethernet29,Ethernet30,Ethernet31,Ethernet32,Ethernet33,Ethernet34,Ethernet35,Ethernet36,Ethernet37,Ethernet38,Ethernet39,Ethernet40,Ethernet41,Ethernet42,Ethernet43,Ethernet44,Ethernet45,Ethernet46,Ethernet47,Ethernet48,Ethernet49,Ethernet50,Ethernet51,Ethernet52,Ethernet53,Ethernet54|5-7": {
"wred_profile" : "[WRED_PROFILE|AZURE_LOSSY]"
},
"Ethernet1,Ethernet2,Ethernet3,Ethernet4,Ethernet5,Ethernet6,Ethernet7,Ethernet8,Ethernet9,Ethernet10,Ethernet11,Ethernet12,Ethernet13,Ethernet14,Ethernet15,Ethernet16,Ethernet17,Ethernet18,Ethernet19,Ethernet20,Ethernet21,Ethernet22,Ethernet23,Ethernet24,Ethernet25,Ethernet26,Ethernet27,Ethernet28,Ethernet29,Ethernet30,Ethernet31,Ethernet32,Ethernet33,Ethernet34,Ethernet35,Ethernet36,Ethernet37,Ethernet38,Ethernet39,Ethernet40,Ethernet41,Ethernet42,Ethernet43,Ethernet44,Ethernet45,Ethernet46,Ethernet47,Ethernet48,Ethernet49,Ethernet50,Ethernet51,Ethernet52,Ethernet53,Ethernet54|3-4": {
"scheduler" : "[SCHEDULER|scheduler.0]",
"wred_profile" : "[WRED_PROFILE|AZURE_LOSSLESS]"
}
}
}


Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
BOARD_CONFIG_FILE_PATH=/etc/centec/E582-48x6q.json
SAI_INIT_CONFIG_FILE=/etc/centec/E582-48x6q-chip-profile.txt
SAI_HW_PORT_PROFILE_ID_CONFIG_FILE=/etc/centec/E582-48x6q-datapath-cfg.txt
11 changes: 11 additions & 0 deletions device/centec/x86_64-centec_e582_48x6q-r0/fancontrol
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Configuration file generated by pwmconfig, changes will be lost
INTERVAL=10
DEVPATH=hwmon0= hwmon5=devices/pci0000:00/0000:00:1f.3/i2c-0/i2c-15/15-002f
DEVNAME=hwmon0=acpitz hwmon5=adt7470
FCTEMPS=hwmon5/device/pwm4=hwmon0/temp1_input hwmon5/device/pwm3=hwmon0/temp1_input hwmon5/device/pwm2=hwmon0/temp1_input hwmon5/device/pwm1=hwmon0/temp1_input
FCFANS=hwmon5/device/pwm4=hwmon5/device/fan4_input hwmon5/device/pwm3=hwmon5/device/fan3_input hwmon5/device/pwm2=hwmon5/device/fan2_input hwmon5/device/pwm1=hwmon5/device/fan1_input
MINTEMP=hwmon5/device/pwm4=20 hwmon5/device/pwm3=20 hwmon5/device/pwm2=20 hwmon5/device/pwm1=20
MAXTEMP=hwmon5/device/pwm4=60 hwmon5/device/pwm3=60 hwmon5/device/pwm2=60 hwmon5/device/pwm1=60
MINSTART=hwmon5/device/pwm4=150 hwmon5/device/pwm3=12 hwmon5/device/pwm2=12 hwmon5/device/pwm1=150
MINSTOP=hwmon5/device/pwm4=0 hwmon5/device/pwm3=12 hwmon5/device/pwm2=12 hwmon5/device/pwm1=0
MAXPWM= hwmon5/device/pwm4=150
1 change: 1 addition & 0 deletions device/centec/x86_64-centec_e582_48x6q-r0/installer.conf
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
CONSOLE_SPEED=115200
ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="acpi_enforce_resources=no"
Loading