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

Added new SN3700/SN3700C Mellanox platforms #2548

Merged
merged 4 commits into from
Feb 14, 2019
Merged
Changes from 1 commit
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
Next Next commit
[mlnx-msn3700]: Added MSN3700 platform.
Signed-off-by: Nazarii Hnydyn <[email protected]>
nazariig committed Feb 11, 2019
commit bebf8cf38f9ee96504f0ef38789637e88867925d
2 changes: 1 addition & 1 deletion device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@

# magic code defnition for port number, qsfp port position of each hwsku
# port_position_tuple = (PORT_START, QSFP_PORT_START, PORT_END, PORT_IN_BLOCK, EEPROM_OFFSET)
hwsku_dict = {'ACS-MSN2700': 0, "LS-SN2700":0, 'ACS-MSN2740': 0, 'ACS-MSN2100': 1, 'ACS-MSN2410': 2, 'ACS-MSN2010': 3, }
hwsku_dict = {'ACS-MSN2700': 0, "LS-SN2700":0, 'ACS-MSN2740': 0, 'ACS-MSN2100': 1, 'ACS-MSN2410': 2, 'ACS-MSN2010': 3, 'ACS-MSN3700': 0}
port_position_tuple_list = [(0, 0, 31, 32, 1), (0, 0, 15, 16, 1), (0, 48, 55, 56, 1),(0, 18, 21, 22, 1)]

class SfpUtil(SfpUtilBase):
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{% set default_cable = '5m' %}
{% set ingress_lossless_pool_size = '8224768' %}
{% set ingress_lossy_pool_size = '8224768' %}
{% set egress_lossless_pool_size = '41943024' %}
{% set egress_lossy_pool_size = '8224768' %}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
{%- for port_idx in range(0, 32) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
{%- endfor %}
{%- endmacro %}

{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
"size": "{{ ingress_lossless_pool_size }}",
"type": "ingress",
"mode": "dynamic"
},
"ingress_lossy_pool": {
"size": "{{ ingress_lossy_pool_size }}",
"type": "ingress",
"mode": "dynamic"
},
"egress_lossless_pool": {
"size": "{{ egress_lossless_pool_size }}",
"type": "egress",
"mode": "dynamic"
},
"egress_lossy_pool": {
"size": "{{ egress_lossy_pool_size }}",
"type": "egress",
"mode": "dynamic"
}
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"0",
"dynamic_th":"0"
},
"ingress_lossy_profile": {
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
"pool":"[BUFFER_POOL|egress_lossless_pool]",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
"size":"4096",
"dynamic_th":"3"
},
"q_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
"size":"0",
"dynamic_th":"3"
}
},
{%- endmacro %}

{%- macro generate_profile_lists(port_names) %}
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
"{{ port_names }}": {
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]"
}
},
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
"{{ port_names }}": {
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
}
}
{%- endmacro %}

{%- macro generate_queue_buffers(port_names) %}
"BUFFER_QUEUE": {
"{{ port_names }}|3-4": {
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
},
"{{ port_names }}|0-1": {
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
},
"{{ port_names }}|5": {
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
}
}
{%- endmacro %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{% set default_cable = '5m' %}
{% set ingress_lossless_pool_size = '12042240' %}
{% set ingress_lossy_pool_size = '12042240' %}
{% set egress_lossless_pool_size = '41943024' %}
{% set egress_lossy_pool_size = '12042240' %}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
{%- for port_idx in range(0, 32) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
{%- endfor %}
{%- endmacro %}

{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
"size": "{{ ingress_lossless_pool_size }}",
"type": "ingress",
"mode": "dynamic"
},
"ingress_lossy_pool": {
"size": "{{ ingress_lossy_pool_size }}",
"type": "ingress",
"mode": "dynamic"
},
"egress_lossless_pool": {
"size": "{{ egress_lossless_pool_size }}",
"type": "egress",
"mode": "dynamic"
},
"egress_lossy_pool": {
"size": "{{ egress_lossy_pool_size }}",
"type": "egress",
"mode": "dynamic"
}
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"0",
"dynamic_th":"0"
},
"ingress_lossy_profile": {
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
"pool":"[BUFFER_POOL|egress_lossless_pool]",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
"size":"4096",
"dynamic_th":"3"
},
"q_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
"size":"0",
"dynamic_th":"3"
}
},
{%- endmacro %}

{%- macro generate_profile_lists(port_names) %}
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
"{{ port_names }}": {
"profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]"
}
},
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
"{{ port_names }}": {
"profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
}
}
{%- endmacro %}

{%- macro generate_queue_buffers(port_names) %}
"BUFFER_QUEUE": {
"{{ port_names }}|3-4": {
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
},
"{{ port_names }}|0-1": {
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
},
"{{ port_names }}|5": {
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
}
}
{%- endmacro %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# speed cable size xon xoff threshold
1000 5m 35840 18432 17408 0
10000 5m 36864 18432 18432 0
25000 5m 36864 18432 18432 0
40000 5m 36864 18432 18432 0
50000 5m 37888 18432 19456 0
100000 5m 38912 18432 20480 0
200000 5m 41984 18432 23552 0
1000 40m 36864 18432 18432 0
10000 40m 38912 18432 20480 0
25000 40m 41984 18432 23552 0
40000 40m 45056 18432 26624 0
50000 40m 47104 18432 28672 0
100000 40m 59392 18432 40960 0
200000 40m 81920 18432 63488 0
1000 300m 37888 18432 19456 0
10000 300m 53248 18432 34816 0
25000 300m 78848 18432 60416 0
40000 300m 104448 18432 86016 0
50000 300m 121856 18432 103424 0
100000 300m 206848 18432 188416 0
200000 300m 376832 18432 358400 0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_3700.xml
243 changes: 243 additions & 0 deletions device/mellanox/x86_64-mlnx_msn3700-r0/ACS-MSN3700/sai_3700.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,243 @@
<?xml version="1.0"?>
<root>
<platform_info type="3700">

<!-- Device MAC address -->
<device-mac-address>00:02:03:04:05:00</device-mac-address>

<!-- Number of ports in the following port list -->
<number-of-physical-ports>32</number-of-physical-ports>

<!-- List of ports in the device -->
<ports-list>
<port-info>
<local-port>1</local-port>
<width>4</width>
<module>16</module>

<!-- 0 none, 1=2, 2=4, 3=2,4 -->
<breakout-modes>3</breakout-modes>

<!-- (BITMASK) 2 - 1Gb , 16 - 10Gb , 32 - 40Gb , 384 - 50Gb , 1536 - 100Gb , 4096 - 200Gb -->
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>5</local-port>
<width>4</width>
<module>17</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>9</local-port>
<width>4</width>
<module>18</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>13</local-port>
<width>4</width>
<module>19</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>17</local-port>
<width>4</width>
<module>20</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>21</local-port>
<width>4</width>
<module>21</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>25</local-port>
<width>4</width>
<module>22</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>29</local-port>
<width>4</width>
<module>23</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>33</local-port>
<width>4</width>
<module>14</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>37</local-port>
<width>4</width>
<module>15</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>41</local-port>
<width>4</width>
<module>12</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>45</local-port>
<width>4</width>
<module>13</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>49</local-port>
<width>4</width>
<module>10</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>53</local-port>
<width>4</width>
<module>11</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>57</local-port>
<width>4</width>
<module>8</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>61</local-port>
<width>4</width>
<module>9</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>65</local-port>
<width>4</width>
<module>30</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>69</local-port>
<width>4</width>
<module>31</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>73</local-port>
<width>4</width>
<module>28</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>77</local-port>
<width>4</width>
<module>29</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>81</local-port>
<width>4</width>
<module>26</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>85</local-port>
<width>4</width>
<module>27</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>89</local-port>
<width>4</width>
<module>24</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>93</local-port>
<width>4</width>
<module>25</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>97</local-port>
<width>4</width>
<module>0</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>101</local-port>
<width>4</width>
<module>1</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>105</local-port>
<width>4</width>
<module>2</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>109</local-port>
<width>4</width>
<module>3</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>113</local-port>
<width>4</width>
<module>4</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>117</local-port>
<width>4</width>
<module>5</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>121</local-port>
<width>4</width>
<module>6</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
<port-info>
<local-port>125</local-port>
<width>4</width>
<module>7</module>
<breakout-modes>3</breakout-modes>
<port-speed>1536</port-speed>
</port-info>
</ports-list>
</platform_info>
</root>
1 change: 1 addition & 0 deletions device/mellanox/x86_64-mlnx_msn3700-r0/default_sku
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ACS-MSN3700 t1
1 change: 1 addition & 0 deletions device/mellanox/x86_64-mlnx_msn3700-r0/platform_reboot
1 change: 1 addition & 0 deletions device/mellanox/x86_64-mlnx_msn3700-r0/plugins/eeprom.py
1 change: 1 addition & 0 deletions device/mellanox/x86_64-mlnx_msn3700-r0/plugins/psuutil.py
1 change: 1 addition & 0 deletions device/mellanox/x86_64-mlnx_msn3700-r0/plugins/sfpreset.py
1 change: 1 addition & 0 deletions device/mellanox/x86_64-mlnx_msn3700-r0/plugins/sfputil.py
89 changes: 89 additions & 0 deletions device/mellanox/x86_64-mlnx_msn3700-r0/sensors.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
################################################################################
# Copyright (c) 2019 Mellanox Technologies
#
# Platform specific sensors config for MSN3700
################################################################################

# Temperature sensors
bus "i2c-2" "i2c-1-mux (chan_id 1)"
chip "mlxsw-i2c-*-48"
label temp1 "Ambient ASIC Temp"

bus "i2c-7" "i2c-1-mux (chan_id 6)"
chip "tmp102-i2c-*-49"
label temp1 "Ambient Fan Side Temp (air intake)"
chip "tmp102-i2c-*-4a"
label temp1 "Ambient Port Side Temp (air exhaust)"

# Power controllers
bus "i2c-5" "i2c-1-mux (chan_id 4)"
chip "tps53679-i2c-*-70"
label in1 "PMIC-1 PSU 12V Rail (in)"
label in2 "PMIC-1 ASIC 0.8V VCORE Rail (out)"
label in3 "PMIC-1 ASIC 1.2V Rail (out)"
label temp1 "PMIC-1 Temp 1"
label temp2 "PMIC-1 Temp 2"
label power1 "PMIC-1 ASIC 0.8V VCORE Rail Pwr (out)"
label power2 "PMIC-1 ASIC 1.2V Rail Pwr (out)"
label curr1 "PMIC-1 ASIC 0.8V VCORE Rail Curr (out)"
label curr2 "PMIC-1 ASIC 1.2V Rail Curr (out)"
chip "tps53679-i2c-*-71"
label in1 "PMIC-2 PSU 12V Rail (in)"
label in2 "PMIC-2 ASIC 3.3V Rail (out)"
label in3 "PMIC-2 ASIC 1.8V Rail (out)"
label temp1 "PMIC-2 Temp 1"
label temp2 "PMIC-2 Temp 2"
label power1 "PMIC-2 ASIC 3.3V Rail Pwr (out)"
label power2 "PMIC-2 ASIC 1.8V Rail Pwr (out)"
label curr1 "PMIC-2 ASIC 3.3V Rail Curr (out)"
label curr2 "PMIC-2 ASIC 1.8V Rail Curr (out)"

# Power supplies
bus "i2c-4" "i2c-1-mux (chan_id 3)"
chip "dps460-i2c-*-58"
label in1 "PSU-1 220V Rail (in)"
ignore in2
label in3 "PSU-1 12V Rail (out)"
label fan1 "PSU-1 Fan 1"
ignore fan2
ignore fan3
label temp1 "PSU-1 Temp 1"
label temp2 "PSU-1 Temp 2"
label temp3 "PSU-1 Temp 3"
label power1 "PSU-1 220V Rail Pwr (in)"
label power2 "PSU-1 12V Rail Pwr (out)"
label curr1 "PSU-1 220V Rail Curr (in)"
label curr2 "PSU-1 12V Rail Curr (out)"
chip "dps460-i2c-*-59"
label in1 "PSU-2 220V Rail (in)"
ignore in2
label in3 "PSU-2 12V Rail (out)"
label fan1 "PSU-2 Fan 1"
ignore fan2
ignore fan3
label temp1 "PSU-2 Temp 1"
label temp2 "PSU-2 Temp 2"
label temp3 "PSU-2 Temp 3"
label power1 "PSU-2 220V Rail Pwr (in)"
label power2 "PSU-2 12V Rail Pwr (out)"
label curr1 "PSU-2 220V Rail Curr (in)"
label curr2 "PSU-2 12V Rail Curr (out)"

# Chassis fans
chip "mlxreg_fan-isa-*"
label fan1 "Chassis Fan Drawer-1 Tach 1"
label fan2 "Chassis Fan Drawer-1 Tach 2"
label fan3 "Chassis Fan Drawer-2 Tach 1"
label fan4 "Chassis Fan Drawer-2 Tach 2"
label fan5 "Chassis Fan Drawer-3 Tach 1"
label fan6 "Chassis Fan Drawer-3 Tach 2"
label fan7 "Chassis Fan Drawer-4 Tach 1"
label fan8 "Chassis Fan Drawer-4 Tach 2"
label fan9 "Chassis Fan Drawer-5 Tach 1"
label fan10 "Chassis Fan Drawer-5 Tach 2"
label fan11 "Chassis Fan Drawer-6 Tach 1"
label fan12 "Chassis Fan Drawer-6 Tach 2"

# Miscellaneous
chip "*-virtual-*"
ignore temp1