[device]: Add a new supported device DellEMC s5248f (#3547)
* Switch Vendor: DellEMC * Switch SKU: s5248F * ASIC Vendor: Broadcom * Swich ASIC: Trident3 * Port Configuration: 48x25G,4x100G,2x200G * SONiC Image: sonic-broadcom.bin * Changes Include ipmitool implementation for platform_sensors script is inclued in pmon startup * Added 25G,10G configruation(25G is default) 1-48FP. 4x100G,2x200G (49-54 FP) * LED support for s5248f
This commit is contained in:
parent
e6fc1e7bf0
commit
60a7f4d653
@ -0,0 +1,2 @@
|
||||
{%- set default_topo = 't1' %}
|
||||
{%- include 'buffers_config.j2' %}
|
@ -0,0 +1,46 @@
|
||||
|
||||
{%- set default_cable = '40m' %}
|
||||
|
||||
{%- macro generate_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
"size": "32744448",
|
||||
"type": "ingress",
|
||||
"mode": "static"
|
||||
},
|
||||
"egress_lossy_pool": {
|
||||
"size": "32744448",
|
||||
"type": "egress",
|
||||
"mode": "dynamic"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"static_th":"32744448"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro generate_pg_profils(port_names_active) %}
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names_active }}|0": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}
|
||||
},
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro generate_queue_buffers(port_names_active) %}
|
||||
"BUFFER_QUEUE": {
|
||||
"{{ port_names_active }}|0-6": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}
|
||||
}
|
||||
{% endmacro %}
|
||||
|
@ -0,0 +1,46 @@
|
||||
|
||||
{%- set default_cable = '40m' %}
|
||||
|
||||
{%- macro generate_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
"size": "32744448",
|
||||
"type": "ingress",
|
||||
"mode": "static"
|
||||
},
|
||||
"egress_lossy_pool": {
|
||||
"size": "32744448",
|
||||
"type": "egress",
|
||||
"mode": "dynamic"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"static_th":"32744448"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro generate_pg_profils(port_names_active) %}
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names_active }}|0": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}
|
||||
},
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro generate_queue_buffers(port_names_active) %}
|
||||
"BUFFER_QUEUE": {
|
||||
"{{ port_names_active }}|0-6": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}
|
||||
}
|
||||
{% endmacro %}
|
||||
|
BIN
device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-10G/custom_led.bin
Executable file
BIN
device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-10G/custom_led.bin
Executable file
Binary file not shown.
Binary file not shown.
@ -0,0 +1,57 @@
|
||||
# name lanes alias index speed
|
||||
Ethernet0 49 tenGigE1/1/1 1 10000
|
||||
Ethernet1 50 tenGigE1/1/2 2 10000
|
||||
Ethernet2 51 tenGigE1/1/3 3 10000
|
||||
Ethernet3 52 tenGigE1/1/4 4 10000
|
||||
Ethernet4 57 tenGigE1/2/1 5 10000
|
||||
Ethernet5 58 tenGigE1/2/2 6 10000
|
||||
Ethernet6 59 tenGigE1/2/3 7 10000
|
||||
Ethernet7 60 tenGigE1/2/4 8 10000
|
||||
Ethernet8 61 tenGigE1/3/1 9 10000
|
||||
Ethernet9 62 tenGigE1/3/2 10 10000
|
||||
Ethernet10 63 tenGigE1/3/3 11 10000
|
||||
Ethernet11 64 tenGigE1/3/4 12 10000
|
||||
Ethernet12 77 tenGigE1/4/1 13 10000
|
||||
Ethernet13 78 tenGigE1/4/2 14 10000
|
||||
Ethernet14 79 tenGigE1/4/3 15 10000
|
||||
Ethernet15 80 tenGigE1/4/4 16 10000
|
||||
Ethernet16 85 tenGigE1/5/1 17 10000
|
||||
Ethernet17 86 tenGigE1/5/2 18 10000
|
||||
Ethernet18 87 tenGigE1/5/3 19 10000
|
||||
Ethernet19 88 tenGigE1/5/4 20 10000
|
||||
Ethernet20 93 tenGigE1/6/1 21 10000
|
||||
Ethernet21 94 tenGigE1/6/2 22 10000
|
||||
Ethernet22 95 tenGigE1/6/3 23 10000
|
||||
Ethernet23 96 tenGigE1/6/4 24 10000
|
||||
Ethernet24 13 tenGigE1/7/1 25 10000
|
||||
Ethernet25 14 tenGigE1/7/2 26 10000
|
||||
Ethernet26 15 tenGigE1/7/3 27 10000
|
||||
Ethernet27 16 tenGigE1/7/4 28 10000
|
||||
Ethernet28 21 tenGigE1/8/1 29 10000
|
||||
Ethernet29 22 tenGigE1/8/2 30 10000
|
||||
Ethernet30 23 tenGigE1/8/3 31 10000
|
||||
Ethernet31 24 tenGigE1/8/4 32 10000
|
||||
Ethernet32 29 tenGigE1/9/1 33 10000
|
||||
Ethernet33 30 tenGigE1/9/2 34 10000
|
||||
Ethernet34 31 tenGigE1/9/3 35 10000
|
||||
Ethernet35 32 tenGigE1/9/4 36 10000
|
||||
Ethernet36 97 tenGigE1/10/1 37 10000
|
||||
Ethernet37 98 tenGigE1/10/2 38 10000
|
||||
Ethernet38 99 tenGigE1/10/3 39 10000
|
||||
Ethernet39 100 tenGigE1/10/4 40 10000
|
||||
Ethernet40 105 tenGigE1/11/1 41 10000
|
||||
Ethernet41 106 tenGigE1/11/2 42 10000
|
||||
Ethernet42 107 tenGigE1/11/3 43 10000
|
||||
Ethernet43 108 tenGigE1/11/4 44 10000
|
||||
Ethernet44 113 tenGigE1/12/1 45 10000
|
||||
Ethernet45 114 tenGigE1/12/2 46 10000
|
||||
Ethernet46 115 tenGigE1/12/3 47 10000
|
||||
Ethernet47 116 tenGigE1/12/4 48 10000
|
||||
Ethernet48 121,122,123,124 hundredGigE1/49 49 100000
|
||||
Ethernet49 125,126,127,128 hundredGigE1/50 50 100000
|
||||
Ethernet50 69,70,71,72 hundredGigE1/51 51 100000
|
||||
Ethernet51 65,66,67,68 hundredGigE1/52 52 100000
|
||||
Ethernet52 1,2,3,4 hundredGigE1/53 53 100000
|
||||
Ethernet53 33,34,35,36 hundredGigE1/54 54 100000
|
||||
Ethernet54 5,6,7,8 hundredGigE1/55 55 100000
|
||||
Ethernet55 41,42,43,44 hundredGigE1/56 56 100000
|
@ -0,0 +1,226 @@
|
||||
{%- set PORT_ALL = [] %}
|
||||
{%- for port in PORT %}
|
||||
{%- if PORT_ALL.append(port) %}{% endif %}
|
||||
{%- endfor %}
|
||||
{%- if PORT_ALL | sort_by_port_index %}{% endif %}
|
||||
|
||||
{%- set port_names_list_all = [] %}
|
||||
{%- for port in PORT_ALL %}
|
||||
{%- if port_names_list_all.append(port) %}{% endif %}
|
||||
{%- endfor %}
|
||||
{%- set port_names_all = port_names_list_all | join(',') -%}
|
||||
|
||||
|
||||
{%- set PORT_ACTIVE = [] %}
|
||||
{%- if DEVICE_NEIGHBOR is not defined %}
|
||||
{%- set PORT_ACTIVE = PORT_ALL %}
|
||||
{%- else %}
|
||||
{%- for port in DEVICE_NEIGHBOR.keys() %}
|
||||
{%- if PORT_ACTIVE.append(port) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
{%- if PORT_ACTIVE | sort_by_port_index %}{% endif %}
|
||||
|
||||
{%- set port_names_list_active = [] %}
|
||||
{%- for port in PORT_ACTIVE %}
|
||||
{%- if port_names_list_active.append(port) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- set port_names_active = port_names_list_active | join(',') -%}
|
||||
|
||||
|
||||
{%- set pfc_to_pg_map_supported_asics = ['mellanox', 'barefoot', 'marvell'] -%}
|
||||
|
||||
|
||||
{
|
||||
{% if generate_tc_to_pg_map is defined %}
|
||||
{{- generate_tc_to_pg_map() }}
|
||||
{% else %}
|
||||
"TC_TO_PRIORITY_GROUP_MAP": {
|
||||
"DEFAULT": {
|
||||
"0": "0",
|
||||
"1": "0",
|
||||
"2": "0",
|
||||
"3": "0",
|
||||
"4": "0",
|
||||
"5": "0",
|
||||
"6": "0",
|
||||
"7": "7"
|
||||
}
|
||||
},
|
||||
{% endif %}
|
||||
"MAP_PFC_PRIORITY_TO_QUEUE": {
|
||||
"DEFAULT": {
|
||||
"0": "0",
|
||||
"1": "1",
|
||||
"2": "2",
|
||||
"3": "3",
|
||||
"4": "4",
|
||||
"5": "5",
|
||||
"6": "6",
|
||||
"7": "7"
|
||||
}
|
||||
},
|
||||
"TC_TO_QUEUE_MAP": {
|
||||
"DEFAULT": {
|
||||
"0": "0",
|
||||
"1": "1",
|
||||
"2": "2",
|
||||
"3": "3",
|
||||
"4": "4",
|
||||
"5": "5",
|
||||
"6": "6",
|
||||
"7": "7"
|
||||
}
|
||||
},
|
||||
"DSCP_TO_TC_MAP": {
|
||||
"DEFAULT": {
|
||||
"0" : "0",
|
||||
"1" : "0",
|
||||
"2" : "0",
|
||||
"3" : "0",
|
||||
"4" : "0",
|
||||
"5" : "0",
|
||||
"6" : "0",
|
||||
"7" : "0",
|
||||
"8" : "0",
|
||||
"9" : "0",
|
||||
"10": "0",
|
||||
"11": "0",
|
||||
"12": "0",
|
||||
"13": "0",
|
||||
"14": "0",
|
||||
"15": "0",
|
||||
"16": "0",
|
||||
"17": "0",
|
||||
"18": "0",
|
||||
"19": "0",
|
||||
"20": "0",
|
||||
"21": "0",
|
||||
"22": "0",
|
||||
"23": "0",
|
||||
"24": "0",
|
||||
"25": "0",
|
||||
"26": "0",
|
||||
"27": "0",
|
||||
"28": "0",
|
||||
"29": "0",
|
||||
"30": "0",
|
||||
"31": "0",
|
||||
"32": "0",
|
||||
"33": "0",
|
||||
"34": "0",
|
||||
"35": "0",
|
||||
"36": "0",
|
||||
"37": "0",
|
||||
"38": "0",
|
||||
"39": "0",
|
||||
"40": "0",
|
||||
"41": "0",
|
||||
"42": "0",
|
||||
"43": "0",
|
||||
"44": "0",
|
||||
"45": "0",
|
||||
"46": "0",
|
||||
"47": "0",
|
||||
"48": "0",
|
||||
"49": "0",
|
||||
"50": "0",
|
||||
"51": "0",
|
||||
"52": "0",
|
||||
"53": "0",
|
||||
"54": "0",
|
||||
"55": "0",
|
||||
"56": "0",
|
||||
"57": "0",
|
||||
"58": "0",
|
||||
"59": "0",
|
||||
"60": "0",
|
||||
"61": "0",
|
||||
"62": "0",
|
||||
"63": "0"
|
||||
}
|
||||
},
|
||||
"SCHEDULER": {
|
||||
"scheduler.0": {
|
||||
"type" : "DWRR",
|
||||
"weight": "1"
|
||||
},
|
||||
"scheduler.1": {
|
||||
"type" : "DWRR",
|
||||
"weight": "2"
|
||||
},
|
||||
"scheduler.2": {
|
||||
"type" : "DWRR",
|
||||
"weight": "3"
|
||||
},
|
||||
"scheduler.3": {
|
||||
"type" : "DWRR",
|
||||
"weight": "4"
|
||||
},
|
||||
"scheduler.4": {
|
||||
"type" : "DWRR",
|
||||
"weight": "5"
|
||||
},
|
||||
"scheduler.5": {
|
||||
"type" : "DWRR",
|
||||
"weight": "10"
|
||||
},
|
||||
"scheduler.6": {
|
||||
"type" : "DWRR",
|
||||
"weight": "25"
|
||||
},
|
||||
"scheduler.7": {
|
||||
"type" : "DWRR",
|
||||
"weight": "50"
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"{{ port_names_active }}": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|DEFAULT]",
|
||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|DEFAULT]",
|
||||
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|DEFAULT]"
|
||||
}
|
||||
},
|
||||
"QUEUE": {
|
||||
{% for port in PORT_ACTIVE %}
|
||||
"{{ port }}|0": {
|
||||
"scheduler" : "[SCHEDULER|scheduler.0]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in PORT_ACTIVE %}
|
||||
"{{ port }}|1": {
|
||||
"scheduler" : "[SCHEDULER|scheduler.1]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in PORT_ACTIVE %}
|
||||
"{{ port }}|2": {
|
||||
"scheduler": "[SCHEDULER|scheduler.2]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in PORT_ACTIVE %}
|
||||
"{{ port }}|3": {
|
||||
"scheduler": "[SCHEDULER|scheduler.3]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in PORT_ACTIVE %}
|
||||
"{{ port }}|4": {
|
||||
"scheduler": "[SCHEDULER|scheduler.4]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in PORT_ACTIVE %}
|
||||
"{{ port }}|5": {
|
||||
"scheduler": "[SCHEDULER|scheduler.5]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in PORT_ACTIVE %}
|
||||
"{{ port }}|6": {
|
||||
"scheduler": "[SCHEDULER|scheduler.6]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in PORT_ACTIVE %}
|
||||
"{{ port }}|7": {
|
||||
"scheduler": "[SCHEDULER|scheduler.7]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/td3-s5248f-10g.config.bcm
|
@ -0,0 +1,2 @@
|
||||
m0 load 0 0x0 /usr/share/sonic/hwsku/linkscan_led_fw.bin
|
||||
m0 load 0 0x3800 /usr/share/sonic/hwsku/custom_led.bin
|
@ -0,0 +1,353 @@
|
||||
os=unix
|
||||
dpp_clock_ratio=2:3
|
||||
oversubscribe_mode=1
|
||||
core_clock_frequency=1525
|
||||
l2xmsg_mode=1
|
||||
pbmp_oversubscribe=0x7f878787f878787f9fe1e1e1fe1e1e1fe
|
||||
pbmp_xport_xe=0x7f878787f878787f9fe1e1e1fe1e1e1fe
|
||||
ifp_inports_support_enable=1
|
||||
port_flex_enable=1
|
||||
phy_an_c73=3
|
||||
l2xmsg_hostbuf_size=8192
|
||||
module_64ports=0
|
||||
tdma_intr_enable=1
|
||||
ipv6_lpm_128b_enable=1
|
||||
stat_if_parity_enable=1
|
||||
bcm_tunnel_term_compatible_mode=1
|
||||
table_dma_enable=1
|
||||
schan_intr_enable=0
|
||||
parity_enable=1
|
||||
parity_correction=1
|
||||
miim_intr_enable=1
|
||||
max_vp_lags=0
|
||||
tdma_intr_enable=1
|
||||
tdma_timeout_usec=5000000
|
||||
mmu_lossless=0
|
||||
pdma_descriptor_prefetch_enable=1
|
||||
pktdma_poll_mode_channel_bitmap=1
|
||||
|
||||
l3_alpm_enable=2
|
||||
l3_alpm_ipv6_128b_bkt_rsvd=1
|
||||
l2_mem_entries=40960
|
||||
l3_mem_entries=40960
|
||||
l3_max_ecmp_mode=1
|
||||
|
||||
stable_size=0x5500000
|
||||
|
||||
portmap_1.0=1:100
|
||||
portmap_5.0=5:100
|
||||
portmap_13.0=13:10
|
||||
portmap_14.0=14:10
|
||||
portmap_15.0=15:10
|
||||
portmap_16.0=16:10
|
||||
portmap_21.0=21:10
|
||||
portmap_22.0=22:10
|
||||
portmap_23.0=23:10
|
||||
portmap_24.0=24:10
|
||||
portmap_29.0=29:10
|
||||
portmap_30.0=30:10
|
||||
portmap_31.0=31:10
|
||||
portmap_32.0=32:10
|
||||
portmap_33.0=33:100
|
||||
portmap_41.0=41:100
|
||||
portmap_49.0=49:10
|
||||
portmap_50.0=50:10
|
||||
portmap_51.0=51:10
|
||||
portmap_52.0=52:10
|
||||
portmap_57.0=57:10
|
||||
portmap_58.0=58:10
|
||||
portmap_59.0=59:10
|
||||
portmap_60.0=60:10
|
||||
portmap_61.0=61:10
|
||||
portmap_62.0=62:10
|
||||
portmap_63.0=63:10
|
||||
portmap_64.0=64:10
|
||||
portmap_67.0=65:100
|
||||
portmap_71.0=69:100
|
||||
portmap_79.0=77:10
|
||||
portmap_80.0=78:10
|
||||
portmap_81.0=79:10
|
||||
portmap_82.0=80:10
|
||||
portmap_87.0=85:10
|
||||
portmap_88.0=86:10
|
||||
portmap_89.0=87:10
|
||||
portmap_90.0=88:10
|
||||
portmap_95.0=93:10
|
||||
portmap_96.0=94:10
|
||||
portmap_97.0=95:10
|
||||
portmap_98.0=96:10
|
||||
portmap_99.0=97:10
|
||||
portmap_100.0=98:10
|
||||
portmap_101.0=99:10
|
||||
portmap_102.0=100:10
|
||||
portmap_107.0=105:10
|
||||
portmap_108.0=106:10
|
||||
portmap_109.0=107:10
|
||||
portmap_110.0=108:10
|
||||
portmap_115.0=113:10
|
||||
portmap_116.0=114:10
|
||||
portmap_117.0=115:10
|
||||
portmap_118.0=116:10
|
||||
portmap_123.0=121:100
|
||||
portmap_127.0=125:100
|
||||
phy_chain_tx_lane_map_physical{1.0}=0x0123
|
||||
phy_chain_rx_lane_map_physical{1.0}=0x1302
|
||||
phy_chain_tx_lane_map_physical{5.0}=0x1032
|
||||
phy_chain_rx_lane_map_physical{5.0}=0x1302
|
||||
phy_chain_tx_lane_map_physical{13.0}=0x0123
|
||||
phy_chain_rx_lane_map_physical{13.0}=0x1032
|
||||
phy_chain_tx_lane_map_physical{21.0}=0x0123
|
||||
phy_chain_rx_lane_map_physical{21.0}=0x1032
|
||||
phy_chain_tx_lane_map_physical{29.0}=0x0123
|
||||
phy_chain_rx_lane_map_physical{29.0}=0x1032
|
||||
phy_chain_tx_lane_map_physical{33.0}=0x1302
|
||||
phy_chain_rx_lane_map_physical{33.0}=0x1032
|
||||
phy_chain_tx_lane_map_physical{41.0}=0x3120
|
||||
phy_chain_rx_lane_map_physical{41.0}=0x1032
|
||||
phy_chain_tx_lane_map_physical{49.0}=0x0123
|
||||
phy_chain_rx_lane_map_physical{49.0}=0x1032
|
||||
phy_chain_tx_lane_map_physical{57.0}=0x0123
|
||||
phy_chain_rx_lane_map_physical{57.0}=0x1032
|
||||
phy_chain_tx_lane_map_physical{61.0}=0x0123
|
||||
phy_chain_rx_lane_map_physical{61.0}=0x1032
|
||||
phy_chain_tx_lane_map_physical{65.0}=0x0123
|
||||
phy_chain_rx_lane_map_physical{65.0}=0x2031
|
||||
phy_chain_tx_lane_map_physical{69.0}=0x3021
|
||||
phy_chain_rx_lane_map_physical{69.0}=0x2130
|
||||
phy_chain_tx_lane_map_physical{77.0}=0x3210
|
||||
phy_chain_rx_lane_map_physical{77.0}=0x2301
|
||||
phy_chain_tx_lane_map_physical{85.0}=0x3210
|
||||
phy_chain_rx_lane_map_physical{85.0}=0x2301
|
||||
phy_chain_tx_lane_map_physical{93.0}=0x3210
|
||||
phy_chain_rx_lane_map_physical{93.0}=0x2301
|
||||
phy_chain_tx_lane_map_physical{97.0}=0x3210
|
||||
phy_chain_rx_lane_map_physical{97.0}=0x2301
|
||||
phy_chain_tx_lane_map_physical{105.0}=0x3210
|
||||
phy_chain_rx_lane_map_physical{105.0}=0x2301
|
||||
phy_chain_tx_lane_map_physical{113.0}=0x3210
|
||||
phy_chain_rx_lane_map_physical{113.0}=0x2301
|
||||
phy_chain_tx_lane_map_physical{121.0}=0x0312
|
||||
phy_chain_rx_lane_map_physical{121.0}=0x1023
|
||||
phy_chain_tx_lane_map_physical{125.0}=0x2301
|
||||
phy_chain_rx_lane_map_physical{125.0}=0x3120
|
||||
phy_chain_tx_polarity_flip_physical{1.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{1.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{2.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{2.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{3.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{3.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{4.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{4.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{5.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{5.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{6.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{6.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{7.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{7.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{8.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{8.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{13.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{13.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{14.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{14.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{15.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{15.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{16.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{16.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{21.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{21.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{22.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{22.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{23.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{23.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{24.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{24.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{29.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{29.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{30.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{30.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{31.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{31.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{32.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{32.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{33.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{33.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{34.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{34.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{35.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{35.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{36.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{36.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{41.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{41.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{42.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{42.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{43.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{43.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{44.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{44.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{49.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{49.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{50.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{50.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{51.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{51.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{52.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{52.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{57.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{57.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{58.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{58.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{59.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{59.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{60.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{60.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{61.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{61.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{62.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{62.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{63.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{63.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{64.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{64.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{65.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{65.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{66.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{66.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{67.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{67.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{68.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{68.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{69.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{69.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{70.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{70.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{71.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{71.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{72.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{72.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{77.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{77.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{78.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{78.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{79.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{79.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{80.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{80.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{85.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{85.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{86.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{86.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{87.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{87.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{88.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{88.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{93.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{93.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{94.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{94.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{95.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{95.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{96.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{96.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{97.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{97.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{98.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{98.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{99.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{99.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{100.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{100.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{105.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{105.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{106.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{106.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{107.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{107.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{108.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{108.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{113.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{113.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{114.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{114.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{115.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{115.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{116.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{116.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{121.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{121.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{122.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{122.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{123.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{123.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{124.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{124.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{125.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{125.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{126.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{126.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{127.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{127.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{128.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{128.0}=0x0
|
||||
dport_map_enable=1
|
||||
dport_map_port_49=1
|
||||
dport_map_port_50=2
|
||||
dport_map_port_51=3
|
||||
dport_map_port_52=4
|
||||
dport_map_port_57=5
|
||||
dport_map_port_58=6
|
||||
dport_map_port_59=7
|
||||
dport_map_port_60=8
|
||||
dport_map_port_61=9
|
||||
dport_map_port_62=10
|
||||
dport_map_port_63=11
|
||||
dport_map_port_64=12
|
||||
dport_map_port_79=13
|
||||
dport_map_port_80=14
|
||||
dport_map_port_81=15
|
||||
dport_map_port_82=16
|
||||
dport_map_port_87=17
|
||||
dport_map_port_88=18
|
||||
dport_map_port_89=19
|
||||
dport_map_port_90=20
|
||||
dport_map_port_95=21
|
||||
dport_map_port_96=22
|
||||
dport_map_port_97=23
|
||||
dport_map_port_98=24
|
||||
dport_map_port_13=25
|
||||
dport_map_port_14=26
|
||||
dport_map_port_15=27
|
||||
dport_map_port_16=28
|
||||
dport_map_port_21=29
|
||||
dport_map_port_22=30
|
||||
dport_map_port_23=31
|
||||
dport_map_port_24=32
|
||||
dport_map_port_29=33
|
||||
dport_map_port_30=34
|
||||
dport_map_port_31=35
|
||||
dport_map_port_32=36
|
||||
dport_map_port_99=37
|
||||
dport_map_port_100=38
|
||||
dport_map_port_101=39
|
||||
dport_map_port_102=40
|
||||
dport_map_port_107=41
|
||||
dport_map_port_108=42
|
||||
dport_map_port_109=43
|
||||
dport_map_port_110=44
|
||||
dport_map_port_115=45
|
||||
dport_map_port_116=46
|
||||
dport_map_port_117=47
|
||||
dport_map_port_118=48
|
||||
dport_map_port_123=49
|
||||
dport_map_port_127=50
|
||||
dport_map_port_71=51
|
||||
dport_map_port_67=52
|
||||
dport_map_port_1=53
|
||||
dport_map_port_33=54
|
||||
dport_map_port_5=55
|
||||
dport_map_port_41=56
|
||||
|
||||
mmu_init_config="TD3-DELL-lossless"
|
||||
#sai_preinit_cmd_file=/usr/share/sonic/hwsku/sai_preinit_cmd.soc
|
||||
|
@ -0,0 +1,2 @@
|
||||
{%- set default_topo = 't1' %}
|
||||
{%- include 'buffers_config.j2' %}
|
@ -0,0 +1,46 @@
|
||||
|
||||
{%- set default_cable = '40m' %}
|
||||
|
||||
{%- macro generate_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
"size": "32744448",
|
||||
"type": "ingress",
|
||||
"mode": "static"
|
||||
},
|
||||
"egress_lossy_pool": {
|
||||
"size": "32744448",
|
||||
"type": "egress",
|
||||
"mode": "dynamic"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"static_th":"32744448"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro generate_pg_profils(port_names_active) %}
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names_active }}|0": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}
|
||||
},
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro generate_queue_buffers(port_names_active) %}
|
||||
"BUFFER_QUEUE": {
|
||||
"{{ port_names_active }}|0-6": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}
|
||||
}
|
||||
{% endmacro %}
|
||||
|
@ -0,0 +1,46 @@
|
||||
|
||||
{%- set default_cable = '40m' %}
|
||||
|
||||
{%- macro generate_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
"size": "32744448",
|
||||
"type": "ingress",
|
||||
"mode": "static"
|
||||
},
|
||||
"egress_lossy_pool": {
|
||||
"size": "32744448",
|
||||
"type": "egress",
|
||||
"mode": "dynamic"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"static_th":"32744448"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"0",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro generate_pg_profils(port_names_active) %}
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names_active }}|0": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}
|
||||
},
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro generate_queue_buffers(port_names_active) %}
|
||||
"BUFFER_QUEUE": {
|
||||
"{{ port_names_active }}|0-6": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}
|
||||
}
|
||||
{% endmacro %}
|
||||
|
BIN
device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-25G/custom_led.bin
Executable file
BIN
device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-25G/custom_led.bin
Executable file
Binary file not shown.
Binary file not shown.
@ -0,0 +1,57 @@
|
||||
# name lanes alias index speed
|
||||
Ethernet0 49 twentyfiveGigE1/1/1 1 25000
|
||||
Ethernet1 50 twentyfiveGigE1/1/2 2 25000
|
||||
Ethernet2 51 twentyfiveGigE1/1/3 3 25000
|
||||
Ethernet3 52 twentyfiveGigE1/1/4 4 25000
|
||||
Ethernet4 57 twentyfiveGigE1/2/1 5 25000
|
||||
Ethernet5 58 twentyfiveGigE1/2/2 6 25000
|
||||
Ethernet6 59 twentyfiveGigE1/2/3 7 25000
|
||||
Ethernet7 60 twentyfiveGigE1/2/4 8 25000
|
||||
Ethernet8 61 twentyfiveGigE1/3/1 9 25000
|
||||
Ethernet9 62 twentyfiveGigE1/3/2 10 25000
|
||||
Ethernet10 63 twentyfiveGigE1/3/3 11 25000
|
||||
Ethernet11 64 twentyfiveGigE1/3/4 12 25000
|
||||
Ethernet12 77 twentyfiveGigE1/4/1 13 25000
|
||||
Ethernet13 78 twentyfiveGigE1/4/2 14 25000
|
||||
Ethernet14 79 twentyfiveGigE1/4/3 15 25000
|
||||
Ethernet15 80 twentyfiveGigE1/4/4 16 25000
|
||||
Ethernet16 85 twentyfiveGigE1/5/1 17 25000
|
||||
Ethernet17 86 twentyfiveGigE1/5/2 18 25000
|
||||
Ethernet18 87 twentyfiveGigE1/5/3 19 25000
|
||||
Ethernet19 88 twentyfiveGigE1/5/4 20 25000
|
||||
Ethernet20 93 twentyfiveGigE1/6/1 21 25000
|
||||
Ethernet21 94 twentyfiveGigE1/6/2 22 25000
|
||||
Ethernet22 95 twentyfiveGigE1/6/3 23 25000
|
||||
Ethernet23 96 twentyfiveGigE1/6/4 24 25000
|
||||
Ethernet24 13 twentyfiveGigE1/7/1 25 25000
|
||||
Ethernet25 14 twentyfiveGigE1/7/2 26 25000
|
||||
Ethernet26 15 twentyfiveGigE1/7/3 27 25000
|
||||
Ethernet27 16 twentyfiveGigE1/7/4 28 25000
|
||||
Ethernet28 21 twentyfiveGigE1/8/1 29 25000
|
||||
Ethernet29 22 twentyfiveGigE1/8/2 30 25000
|
||||
Ethernet30 23 twentyfiveGigE1/8/3 31 25000
|
||||
Ethernet31 24 twentyfiveGigE1/8/4 32 25000
|
||||
Ethernet32 29 twentyfiveGigE1/9/1 33 25000
|
||||
Ethernet33 30 twentyfiveGigE1/9/2 34 25000
|
||||
Ethernet34 31 twentyfiveGigE1/9/3 35 25000
|
||||
Ethernet35 32 twentyfiveGigE1/9/4 36 25000
|
||||
Ethernet36 97 twentyfiveGigE1/10/1 37 25000
|
||||
Ethernet37 98 twentyfiveGigE1/10/2 38 25000
|
||||
Ethernet38 99 twentyfiveGigE1/10/3 39 25000
|
||||
Ethernet39 100 twentyfiveGigE1/10/4 40 25000
|
||||
Ethernet40 105 twentyfiveGigE1/11/1 41 25000
|
||||
Ethernet41 106 twentyfiveGigE1/11/2 42 25000
|
||||
Ethernet42 107 twentyfiveGigE1/11/3 43 25000
|
||||
Ethernet43 108 twentyfiveGigE1/11/4 44 25000
|
||||
Ethernet44 113 twentyfiveGigE1/12/1 45 25000
|
||||
Ethernet45 114 twentyfiveGigE1/12/2 46 25000
|
||||
Ethernet46 115 twentyfiveGigE1/12/3 47 25000
|
||||
Ethernet47 116 twentyfiveGigE1/12/4 48 25000
|
||||
Ethernet48 121,122,123,124 hundredGigE1/49 49 100000
|
||||
Ethernet49 125,126,127,128 hundredGigE1/50 50 100000
|
||||
Ethernet50 69,70,71,72 hundredGigE1/51 51 100000
|
||||
Ethernet51 65,66,67,68 hundredGigE1/52 52 100000
|
||||
Ethernet52 1,2,3,4 hundredGigE1/53 53 100000
|
||||
Ethernet53 33,34,35,36 hundredGigE1/54 54 100000
|
||||
Ethernet54 5,6,7,8 hundredGigE1/55 55 100000
|
||||
Ethernet55 41,42,43,44 hundredGigE1/56 56 100000
|
@ -0,0 +1,226 @@
|
||||
{%- set PORT_ALL = [] %}
|
||||
{%- for port in PORT %}
|
||||
{%- if PORT_ALL.append(port) %}{% endif %}
|
||||
{%- endfor %}
|
||||
{%- if PORT_ALL | sort_by_port_index %}{% endif %}
|
||||
|
||||
{%- set port_names_list_all = [] %}
|
||||
{%- for port in PORT_ALL %}
|
||||
{%- if port_names_list_all.append(port) %}{% endif %}
|
||||
{%- endfor %}
|
||||
{%- set port_names_all = port_names_list_all | join(',') -%}
|
||||
|
||||
|
||||
{%- set PORT_ACTIVE = [] %}
|
||||
{%- if DEVICE_NEIGHBOR is not defined %}
|
||||
{%- set PORT_ACTIVE = PORT_ALL %}
|
||||
{%- else %}
|
||||
{%- for port in DEVICE_NEIGHBOR.keys() %}
|
||||
{%- if PORT_ACTIVE.append(port) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
{%- if PORT_ACTIVE | sort_by_port_index %}{% endif %}
|
||||
|
||||
{%- set port_names_list_active = [] %}
|
||||
{%- for port in PORT_ACTIVE %}
|
||||
{%- if port_names_list_active.append(port) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- set port_names_active = port_names_list_active | join(',') -%}
|
||||
|
||||
|
||||
{%- set pfc_to_pg_map_supported_asics = ['mellanox', 'barefoot', 'marvell'] -%}
|
||||
|
||||
|
||||
{
|
||||
{% if generate_tc_to_pg_map is defined %}
|
||||
{{- generate_tc_to_pg_map() }}
|
||||
{% else %}
|
||||
"TC_TO_PRIORITY_GROUP_MAP": {
|
||||
"DEFAULT": {
|
||||
"0": "0",
|
||||
"1": "0",
|
||||
"2": "0",
|
||||
"3": "0",
|
||||
"4": "0",
|
||||
"5": "0",
|
||||
"6": "0",
|
||||
"7": "7"
|
||||
}
|
||||
},
|
||||
{% endif %}
|
||||
"MAP_PFC_PRIORITY_TO_QUEUE": {
|
||||
"DEFAULT": {
|
||||
"0": "0",
|
||||
"1": "1",
|
||||
"2": "2",
|
||||
"3": "3",
|
||||
"4": "4",
|
||||
"5": "5",
|
||||
"6": "6",
|
||||
"7": "7"
|
||||
}
|
||||
},
|
||||
"TC_TO_QUEUE_MAP": {
|
||||
"DEFAULT": {
|
||||
"0": "0",
|
||||
"1": "1",
|
||||
"2": "2",
|
||||
"3": "3",
|
||||
"4": "4",
|
||||
"5": "5",
|
||||
"6": "6",
|
||||
"7": "7"
|
||||
}
|
||||
},
|
||||
"DSCP_TO_TC_MAP": {
|
||||
"DEFAULT": {
|
||||
"0" : "0",
|
||||
"1" : "0",
|
||||
"2" : "0",
|
||||
"3" : "0",
|
||||
"4" : "0",
|
||||
"5" : "0",
|
||||
"6" : "0",
|
||||
"7" : "0",
|
||||
"8" : "0",
|
||||
"9" : "0",
|
||||
"10": "0",
|
||||
"11": "0",
|
||||
"12": "0",
|
||||
"13": "0",
|
||||
"14": "0",
|
||||
"15": "0",
|
||||
"16": "0",
|
||||
"17": "0",
|
||||
"18": "0",
|
||||
"19": "0",
|
||||
"20": "0",
|
||||
"21": "0",
|
||||
"22": "0",
|
||||
"23": "0",
|
||||
"24": "0",
|
||||
"25": "0",
|
||||
"26": "0",
|
||||
"27": "0",
|
||||
"28": "0",
|
||||
"29": "0",
|
||||
"30": "0",
|
||||
"31": "0",
|
||||
"32": "0",
|
||||
"33": "0",
|
||||
"34": "0",
|
||||
"35": "0",
|
||||
"36": "0",
|
||||
"37": "0",
|
||||
"38": "0",
|
||||
"39": "0",
|
||||
"40": "0",
|
||||
"41": "0",
|
||||
"42": "0",
|
||||
"43": "0",
|
||||
"44": "0",
|
||||
"45": "0",
|
||||
"46": "0",
|
||||
"47": "0",
|
||||
"48": "0",
|
||||
"49": "0",
|
||||
"50": "0",
|
||||
"51": "0",
|
||||
"52": "0",
|
||||
"53": "0",
|
||||
"54": "0",
|
||||
"55": "0",
|
||||
"56": "0",
|
||||
"57": "0",
|
||||
"58": "0",
|
||||
"59": "0",
|
||||
"60": "0",
|
||||
"61": "0",
|
||||
"62": "0",
|
||||
"63": "0"
|
||||
}
|
||||
},
|
||||
"SCHEDULER": {
|
||||
"scheduler.0": {
|
||||
"type" : "DWRR",
|
||||
"weight": "1"
|
||||
},
|
||||
"scheduler.1": {
|
||||
"type" : "DWRR",
|
||||
"weight": "2"
|
||||
},
|
||||
"scheduler.2": {
|
||||
"type" : "DWRR",
|
||||
"weight": "3"
|
||||
},
|
||||
"scheduler.3": {
|
||||
"type" : "DWRR",
|
||||
"weight": "4"
|
||||
},
|
||||
"scheduler.4": {
|
||||
"type" : "DWRR",
|
||||
"weight": "5"
|
||||
},
|
||||
"scheduler.5": {
|
||||
"type" : "DWRR",
|
||||
"weight": "10"
|
||||
},
|
||||
"scheduler.6": {
|
||||
"type" : "DWRR",
|
||||
"weight": "25"
|
||||
},
|
||||
"scheduler.7": {
|
||||
"type" : "DWRR",
|
||||
"weight": "50"
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"{{ port_names_active }}": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|DEFAULT]",
|
||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|DEFAULT]",
|
||||
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|DEFAULT]"
|
||||
}
|
||||
},
|
||||
"QUEUE": {
|
||||
{% for port in PORT_ACTIVE %}
|
||||
"{{ port }}|0": {
|
||||
"scheduler" : "[SCHEDULER|scheduler.0]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in PORT_ACTIVE %}
|
||||
"{{ port }}|1": {
|
||||
"scheduler" : "[SCHEDULER|scheduler.1]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in PORT_ACTIVE %}
|
||||
"{{ port }}|2": {
|
||||
"scheduler": "[SCHEDULER|scheduler.2]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in PORT_ACTIVE %}
|
||||
"{{ port }}|3": {
|
||||
"scheduler": "[SCHEDULER|scheduler.3]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in PORT_ACTIVE %}
|
||||
"{{ port }}|4": {
|
||||
"scheduler": "[SCHEDULER|scheduler.4]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in PORT_ACTIVE %}
|
||||
"{{ port }}|5": {
|
||||
"scheduler": "[SCHEDULER|scheduler.5]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in PORT_ACTIVE %}
|
||||
"{{ port }}|6": {
|
||||
"scheduler": "[SCHEDULER|scheduler.6]"
|
||||
},
|
||||
{% endfor %}
|
||||
{% for port in PORT_ACTIVE %}
|
||||
"{{ port }}|7": {
|
||||
"scheduler": "[SCHEDULER|scheduler.7]"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/td3-s5248f-25g.config.bcm
|
@ -0,0 +1,2 @@
|
||||
m0 load 0 0x0 /usr/share/sonic/hwsku/linkscan_led_fw.bin
|
||||
m0 load 0 0x3800 /usr/share/sonic/hwsku/custom_led.bin
|
@ -0,0 +1,355 @@
|
||||
os=unix
|
||||
|
||||
dpp_clock_ratio=2:3
|
||||
oversubscribe_mode=1
|
||||
core_clock_frequency=1525
|
||||
l2xmsg_mode=1
|
||||
pbmp_oversubscribe=0x7f878787f878787f9fe1e1e1fe1e1e1fe
|
||||
pbmp_xport_xe=0x7f878787f878787f9fe1e1e1fe1e1e1fe
|
||||
ifp_inports_support_enable=1
|
||||
port_flex_enable=1
|
||||
phy_an_c73=3
|
||||
l2xmsg_hostbuf_size=8192
|
||||
module_64ports=0
|
||||
tdma_intr_enable=1
|
||||
ipv6_lpm_128b_enable=1
|
||||
stat_if_parity_enable=1
|
||||
bcm_tunnel_term_compatible_mode=1
|
||||
table_dma_enable=1
|
||||
schan_intr_enable=0
|
||||
parity_enable=1
|
||||
parity_correction=1
|
||||
miim_intr_enable=1
|
||||
max_vp_lags=0
|
||||
tdma_intr_enable=1
|
||||
tdma_timeout_usec=5000000
|
||||
mmu_lossless=0
|
||||
pdma_descriptor_prefetch_enable=1
|
||||
pktdma_poll_mode_channel_bitmap=1
|
||||
|
||||
l3_alpm_enable=2
|
||||
l3_alpm_ipv6_128b_bkt_rsvd=1
|
||||
l2_mem_entries=40960
|
||||
l3_mem_entries=40960
|
||||
l3_max_ecmp_mode=1
|
||||
|
||||
|
||||
stable_size=0x5500000
|
||||
|
||||
portmap_1.0=1:100
|
||||
portmap_5.0=5:100
|
||||
portmap_13.0=13:25
|
||||
portmap_14.0=14:25
|
||||
portmap_15.0=15:25
|
||||
portmap_16.0=16:25
|
||||
portmap_21.0=21:25
|
||||
portmap_22.0=22:25
|
||||
portmap_23.0=23:25
|
||||
portmap_24.0=24:25
|
||||
portmap_29.0=29:25
|
||||
portmap_30.0=30:25
|
||||
portmap_31.0=31:25
|
||||
portmap_32.0=32:25
|
||||
portmap_33.0=33:100
|
||||
portmap_41.0=41:100
|
||||
portmap_49.0=49:25
|
||||
portmap_50.0=50:25
|
||||
portmap_51.0=51:25
|
||||
portmap_52.0=52:25
|
||||
portmap_57.0=57:25
|
||||
portmap_58.0=58:25
|
||||
portmap_59.0=59:25
|
||||
portmap_60.0=60:25
|
||||
portmap_61.0=61:25
|
||||
portmap_62.0=62:25
|
||||
portmap_63.0=63:25
|
||||
portmap_64.0=64:25
|
||||
portmap_67.0=65:100
|
||||
portmap_71.0=69:100
|
||||
portmap_79.0=77:25
|
||||
portmap_80.0=78:25
|
||||
portmap_81.0=79:25
|
||||
portmap_82.0=80:25
|
||||
portmap_87.0=85:25
|
||||
portmap_88.0=86:25
|
||||
portmap_89.0=87:25
|
||||
portmap_90.0=88:25
|
||||
portmap_95.0=93:25
|
||||
portmap_96.0=94:25
|
||||
portmap_97.0=95:25
|
||||
portmap_98.0=96:25
|
||||
portmap_99.0=97:25
|
||||
portmap_100.0=98:25
|
||||
portmap_101.0=99:25
|
||||
portmap_102.0=100:25
|
||||
portmap_107.0=105:25
|
||||
portmap_108.0=106:25
|
||||
portmap_109.0=107:25
|
||||
portmap_110.0=108:25
|
||||
portmap_115.0=113:25
|
||||
portmap_116.0=114:25
|
||||
portmap_117.0=115:25
|
||||
portmap_118.0=116:25
|
||||
portmap_123.0=121:100
|
||||
portmap_127.0=125:100
|
||||
phy_chain_tx_lane_map_physical{1.0}=0x0123
|
||||
phy_chain_rx_lane_map_physical{1.0}=0x1302
|
||||
phy_chain_tx_lane_map_physical{5.0}=0x1032
|
||||
phy_chain_rx_lane_map_physical{5.0}=0x1302
|
||||
phy_chain_tx_lane_map_physical{13.0}=0x0123
|
||||
phy_chain_rx_lane_map_physical{13.0}=0x1032
|
||||
phy_chain_tx_lane_map_physical{21.0}=0x0123
|
||||
phy_chain_rx_lane_map_physical{21.0}=0x1032
|
||||
phy_chain_tx_lane_map_physical{29.0}=0x0123
|
||||
phy_chain_rx_lane_map_physical{29.0}=0x1032
|
||||
phy_chain_tx_lane_map_physical{33.0}=0x1302
|
||||
phy_chain_rx_lane_map_physical{33.0}=0x1032
|
||||
phy_chain_tx_lane_map_physical{41.0}=0x3120
|
||||
phy_chain_rx_lane_map_physical{41.0}=0x1032
|
||||
phy_chain_tx_lane_map_physical{49.0}=0x0123
|
||||
phy_chain_rx_lane_map_physical{49.0}=0x1032
|
||||
phy_chain_tx_lane_map_physical{57.0}=0x0123
|
||||
phy_chain_rx_lane_map_physical{57.0}=0x1032
|
||||
phy_chain_tx_lane_map_physical{61.0}=0x0123
|
||||
phy_chain_rx_lane_map_physical{61.0}=0x1032
|
||||
phy_chain_tx_lane_map_physical{65.0}=0x0123
|
||||
phy_chain_rx_lane_map_physical{65.0}=0x2031
|
||||
phy_chain_tx_lane_map_physical{69.0}=0x3021
|
||||
phy_chain_rx_lane_map_physical{69.0}=0x2130
|
||||
phy_chain_tx_lane_map_physical{77.0}=0x3210
|
||||
phy_chain_rx_lane_map_physical{77.0}=0x2301
|
||||
phy_chain_tx_lane_map_physical{85.0}=0x3210
|
||||
phy_chain_rx_lane_map_physical{85.0}=0x2301
|
||||
phy_chain_tx_lane_map_physical{93.0}=0x3210
|
||||
phy_chain_rx_lane_map_physical{93.0}=0x2301
|
||||
phy_chain_tx_lane_map_physical{97.0}=0x3210
|
||||
phy_chain_rx_lane_map_physical{97.0}=0x2301
|
||||
phy_chain_tx_lane_map_physical{105.0}=0x3210
|
||||
phy_chain_rx_lane_map_physical{105.0}=0x2301
|
||||
phy_chain_tx_lane_map_physical{113.0}=0x3210
|
||||
phy_chain_rx_lane_map_physical{113.0}=0x2301
|
||||
phy_chain_tx_lane_map_physical{121.0}=0x0312
|
||||
phy_chain_rx_lane_map_physical{121.0}=0x1023
|
||||
phy_chain_tx_lane_map_physical{125.0}=0x2301
|
||||
phy_chain_rx_lane_map_physical{125.0}=0x3120
|
||||
phy_chain_tx_polarity_flip_physical{1.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{1.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{2.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{2.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{3.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{3.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{4.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{4.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{5.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{5.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{6.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{6.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{7.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{7.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{8.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{8.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{13.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{13.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{14.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{14.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{15.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{15.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{16.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{16.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{21.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{21.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{22.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{22.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{23.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{23.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{24.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{24.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{29.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{29.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{30.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{30.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{31.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{31.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{32.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{32.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{33.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{33.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{34.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{34.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{35.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{35.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{36.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{36.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{41.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{41.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{42.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{42.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{43.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{43.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{44.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{44.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{49.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{49.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{50.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{50.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{51.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{51.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{52.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{52.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{57.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{57.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{58.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{58.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{59.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{59.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{60.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{60.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{61.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{61.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{62.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{62.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{63.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{63.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{64.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{64.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{65.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{65.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{66.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{66.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{67.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{67.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{68.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{68.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{69.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{69.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{70.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{70.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{71.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{71.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{72.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{72.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{77.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{77.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{78.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{78.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{79.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{79.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{80.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{80.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{85.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{85.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{86.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{86.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{87.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{87.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{88.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{88.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{93.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{93.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{94.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{94.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{95.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{95.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{96.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{96.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{97.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{97.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{98.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{98.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{99.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{99.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{100.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{100.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{105.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{105.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{106.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{106.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{107.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{107.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{108.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{108.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{113.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{113.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{114.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{114.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{115.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{115.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{116.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{116.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{121.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{121.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{122.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{122.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{123.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{123.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{124.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{124.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{125.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{125.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{126.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{126.0}=0x1
|
||||
phy_chain_tx_polarity_flip_physical{127.0}=0x0
|
||||
phy_chain_rx_polarity_flip_physical{127.0}=0x0
|
||||
phy_chain_tx_polarity_flip_physical{128.0}=0x1
|
||||
phy_chain_rx_polarity_flip_physical{128.0}=0x0
|
||||
dport_map_enable=1
|
||||
dport_map_port_49=1
|
||||
dport_map_port_50=2
|
||||
dport_map_port_51=3
|
||||
dport_map_port_52=4
|
||||
dport_map_port_57=5
|
||||
dport_map_port_58=6
|
||||
dport_map_port_59=7
|
||||
dport_map_port_60=8
|
||||
dport_map_port_61=9
|
||||
dport_map_port_62=10
|
||||
dport_map_port_63=11
|
||||
dport_map_port_64=12
|
||||
dport_map_port_79=13
|
||||
dport_map_port_80=14
|
||||
dport_map_port_81=15
|
||||
dport_map_port_82=16
|
||||
dport_map_port_87=17
|
||||
dport_map_port_88=18
|
||||
dport_map_port_89=19
|
||||
dport_map_port_90=20
|
||||
dport_map_port_95=21
|
||||
dport_map_port_96=22
|
||||
dport_map_port_97=23
|
||||
dport_map_port_98=24
|
||||
dport_map_port_13=25
|
||||
dport_map_port_14=26
|
||||
dport_map_port_15=27
|
||||
dport_map_port_16=28
|
||||
dport_map_port_21=29
|
||||
dport_map_port_22=30
|
||||
dport_map_port_23=31
|
||||
dport_map_port_24=32
|
||||
dport_map_port_29=33
|
||||
dport_map_port_30=34
|
||||
dport_map_port_31=35
|
||||
dport_map_port_32=36
|
||||
dport_map_port_99=37
|
||||
dport_map_port_100=38
|
||||
dport_map_port_101=39
|
||||
dport_map_port_102=40
|
||||
dport_map_port_107=41
|
||||
dport_map_port_108=42
|
||||
dport_map_port_109=43
|
||||
dport_map_port_110=44
|
||||
dport_map_port_115=45
|
||||
dport_map_port_116=46
|
||||
dport_map_port_117=47
|
||||
dport_map_port_118=48
|
||||
dport_map_port_123=49
|
||||
dport_map_port_127=50
|
||||
dport_map_port_71=51
|
||||
dport_map_port_67=52
|
||||
dport_map_port_1=53
|
||||
dport_map_port_33=54
|
||||
dport_map_port_5=55
|
||||
dport_map_port_41=56
|
||||
|
||||
mmu_init_config="TD3-DELL-lossless"
|
||||
#sai_preinit_cmd_file=/usr/share/sonic/hwsku/sai_preinit_cmd.soc
|
||||
|
1
device/dell/x86_64-dellemc_s5248f_c3538-r0/default_sku
Normal file
1
device/dell/x86_64-dellemc_s5248f_c3538-r0/default_sku
Normal file
@ -0,0 +1 @@
|
||||
DellEMC-S5248f-P-25G t1
|
@ -0,0 +1,3 @@
|
||||
CONSOLE_PORT=0x3f8
|
||||
CONSOLE_DEV=0
|
||||
CONSOLE_SPEED=115200
|
@ -0,0 +1,6 @@
|
||||
# LED microprocessor initialization for Dell S5232
|
||||
#
|
||||
#
|
||||
#Led0
|
||||
led auto on
|
||||
led start
|
442
device/dell/x86_64-dellemc_s5248f_c3538-r0/media_settings.json
Normal file
442
device/dell/x86_64-dellemc_s5248f_c3538-r0/media_settings.json
Normal file
@ -0,0 +1,442 @@
|
||||
{
|
||||
"GLOBAL_MEDIA_SETTINGS": {
|
||||
"1-32": {
|
||||
"QSFP28-40GBASE-CR4-1M":{
|
||||
"preemphasis": {
|
||||
"lane0":"0x16440A",
|
||||
"lane1":"0x16440A",
|
||||
"lane2":"0x16440A",
|
||||
"lane3":"0x16440A"
|
||||
}
|
||||
},
|
||||
"QSFP28-40GBASE-CR4-2M":{
|
||||
"preemphasis": {
|
||||
"lane0":"0x18420A",
|
||||
"lane1":"0x18420A",
|
||||
"lane2":"0x18420A",
|
||||
"lane3":"0x18420A"
|
||||
}
|
||||
},
|
||||
"QSFP28-40GBASE-CR4-3M":{
|
||||
"preemphasis": {
|
||||
"lane0":"0x1A400A",
|
||||
"lane1":"0x1A400A",
|
||||
"lane2":"0x1A400A",
|
||||
"lane3":"0x1A400A"
|
||||
}
|
||||
},
|
||||
"QSFP28-40GBASE-CR4-4M":{
|
||||
"preemphasis": {
|
||||
"lane0":"0x1A400A",
|
||||
"lane1":"0x1A400A",
|
||||
"lane2":"0x1A400A",
|
||||
"lane3":"0x1A400A"
|
||||
}
|
||||
},
|
||||
"QSFP28-40GBASE-CR4-5M":{
|
||||
"preemphasis": {
|
||||
"lane0":"0x1A400A",
|
||||
"lane1":"0x1A400A",
|
||||
"lane2":"0x1A400A",
|
||||
"lane3":"0x1A400A"
|
||||
}
|
||||
},
|
||||
"QSFP28-40GBASE-CR4-7M":{
|
||||
"preemphasis": {
|
||||
"lane0":"0x1A400A",
|
||||
"lane1":"0x1A400A",
|
||||
"lane2":"0x1A400A",
|
||||
"lane3":"0x1A400A"
|
||||
}
|
||||
},
|
||||
"QSFP28-40GBASE-CR4-10M":{
|
||||
"preemphasis": {
|
||||
"lane0":"0x1A400A",
|
||||
"lane1":"0x1A400A",
|
||||
"lane2":"0x1A400A",
|
||||
"lane3":"0x1A400A"
|
||||
}
|
||||
},
|
||||
"QSFP+-40GBASE-CR4-1M":{
|
||||
"preemphasis": {
|
||||
"lane0":"0x16440A",
|
||||
"lane1":"0x16440A",
|
||||
"lane2":"0x16440A",
|
||||
"lane3":"0x16440A"
|
||||
}
|
||||
},
|
||||
"QSFP+-40GBASE-CR4-2M":{
|
||||
"preemphasis": {
|
||||
"lane0":"0x18420A",
|
||||
"lane1":"0x18420A",
|
||||
"lane2":"0x18420A",
|
||||
"lane3":"0x18420A"
|
||||
}
|
||||
},
|
||||
"QSFP+-40GBASE-CR4-3M":{
|
||||
"preemphasis": {
|
||||
"lane0":"0x1A400A",
|
||||
"lane1":"0x1A400A",
|
||||
"lane2":"0x1A400A",
|
||||
"lane3":"0x1A400A"
|
||||
}
|
||||
},
|
||||
"QSFP+-40GBASE-CR4-4M":{
|
||||
"preemphasis": {
|
||||
"lane0":"0x1A400A",
|
||||
"lane1":"0x1A400A",
|
||||
"lane2":"0x1A400A",
|
||||
"lane3":"0x1A400A"
|
||||
}
|
||||
},
|
||||
"QSFP+-40GBASE-CR4-5M":{
|
||||
"preemphasis": {
|
||||
"lane0":"0x1A400A",
|
||||
"lane1":"0x1A400A",
|
||||
"lane2":"0x1A400A",
|
||||
"lane3":"0x1A400A"
|
||||
}
|
||||
},
|
||||
"QSFP+-40GBASE-CR4-7M":{
|
||||
"preemphasis": {
|
||||
"lane0":"0x1A400A",
|
||||
"lane1":"0x1A400A",
|
||||
"lane2":"0x1A400A",
|
||||
"lane3":"0x1A400A"
|
||||
}
|
||||
},
|
||||
"QSFP+-40GBASE-CR4-10M":{
|
||||
"preemphasis": {
|
||||
"lane0":"0x1A400A",
|
||||
"lane1":"0x1A400A",
|
||||
"lane2":"0x1A400A",
|
||||
"lane3":"0x1A400A"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"PORT_MEDIA_SETTINGS": {
|
||||
"1": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x164509",
|
||||
"lane1":"0x164509",
|
||||
"lane2":"0x164509",
|
||||
"lane3":"0x164509"
|
||||
}
|
||||
}
|
||||
},
|
||||
"2": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x164509",
|
||||
"lane1":"0x164509",
|
||||
"lane2":"0x164509",
|
||||
"lane3":"0x164509"
|
||||
}
|
||||
}
|
||||
},
|
||||
"3": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x144808",
|
||||
"lane1":"0x144808",
|
||||
"lane2":"0x144808",
|
||||
"lane3":"0x144808"
|
||||
}
|
||||
}
|
||||
},
|
||||
"4": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x144808",
|
||||
"lane1":"0x144808",
|
||||
"lane2":"0x144808",
|
||||
"lane3":"0x144808"
|
||||
}
|
||||
}
|
||||
},
|
||||
"5": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x144808",
|
||||
"lane1":"0x144808",
|
||||
"lane2":"0x144808",
|
||||
"lane3":"0x144808"
|
||||
}
|
||||
}
|
||||
},
|
||||
"6": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x124A08",
|
||||
"lane1":"0x124A08",
|
||||
"lane2":"0x124A08",
|
||||
"lane3":"0x124A08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"7": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x124A08",
|
||||
"lane1":"0x124A08",
|
||||
"lane2":"0x124A08",
|
||||
"lane3":"0x124A08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"8": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x124A08",
|
||||
"lane1":"0x124A08",
|
||||
"lane2":"0x124A08",
|
||||
"lane3":"0x124A08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"9": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x124A08",
|
||||
"lane1":"0x124A08",
|
||||
"lane2":"0x124A08",
|
||||
"lane3":"0x124A08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"10": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x124A08",
|
||||
"lane1":"0x124A08",
|
||||
"lane2":"0x124A08",
|
||||
"lane3":"0x124A08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"11": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x124A08",
|
||||
"lane1":"0x124A08",
|
||||
"lane2":"0x124A08",
|
||||
"lane3":"0x124A08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"12": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x124A08",
|
||||
"lane1":"0x124A08",
|
||||
"lane2":"0x124A08",
|
||||
"lane3":"0x124A08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"13": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x124A08",
|
||||
"lane1":"0x124A08",
|
||||
"lane2":"0x124A08",
|
||||
"lane3":"0x124A08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"14": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x124A08",
|
||||
"lane1":"0x124A08",
|
||||
"lane2":"0x124A08",
|
||||
"lane3":"0x124A08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"15": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x0E4E08",
|
||||
"lane1":"0x0E4E08",
|
||||
"lane2":"0x0E4E08",
|
||||
"lane3":"0x0E4E08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"16": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x124A08",
|
||||
"lane1":"0x124A08",
|
||||
"lane2":"0x124A08",
|
||||
"lane3":"0x124A08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"17": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x0E4E08",
|
||||
"lane1":"0x0E4E08",
|
||||
"lane2":"0x0E4E08",
|
||||
"lane3":"0x0E4E08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"18": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x0E4E08",
|
||||
"lane1":"0x0E4E08",
|
||||
"lane2":"0x0E4E08",
|
||||
"lane3":"0x0E4E08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"19": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x0E4E08",
|
||||
"lane1":"0x0E4E08",
|
||||
"lane2":"0x0E4E08",
|
||||
"lane3":"0x0E4E08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"20": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x0E4E08",
|
||||
"lane1":"0x0E4E08",
|
||||
"lane2":"0x0E4E08",
|
||||
"lane3":"0x0E4E08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"21": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x124A08",
|
||||
"lane1":"0x124A08",
|
||||
"lane2":"0x124A08",
|
||||
"lane3":"0x124A08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"22": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x124A08",
|
||||
"lane1":"0x124A08",
|
||||
"lane2":"0x124A08",
|
||||
"lane3":"0x124A08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"23": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x124A08",
|
||||
"lane1":"0x124A08",
|
||||
"lane2":"0x124A08",
|
||||
"lane3":"0x124A08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"24": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x124A08",
|
||||
"lane1":"0x124A08",
|
||||
"lane2":"0x124A08",
|
||||
"lane3":"0x124A08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"25": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x124A08",
|
||||
"lane1":"0x124A08",
|
||||
"lane2":"0x124A08",
|
||||
"lane3":"0x124A08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"26": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x124A08",
|
||||
"lane1":"0x124A08",
|
||||
"lane2":"0x124A08",
|
||||
"lane3":"0x124A08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"27": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x124A08",
|
||||
"lane1":"0x124A08",
|
||||
"lane2":"0x124A08",
|
||||
"lane3":"0x124A08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"28": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x124A08",
|
||||
"lane1":"0x124A08",
|
||||
"lane2":"0x124A08",
|
||||
"lane3":"0x124A08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"29": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x124A08",
|
||||
"lane1":"0x124A08",
|
||||
"lane2":"0x124A08",
|
||||
"lane3":"0x124A08"
|
||||
}
|
||||
}
|
||||
},
|
||||
"30": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x144808",
|
||||
"lane1":"0x144808",
|
||||
"lane2":"0x144808",
|
||||
"lane3":"0x144808"
|
||||
}
|
||||
}
|
||||
},
|
||||
"31": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x144808",
|
||||
"lane1":"0x144808",
|
||||
"lane2":"0x144808",
|
||||
"lane3":"0x144808"
|
||||
}
|
||||
}
|
||||
},
|
||||
"32": {
|
||||
"Default": {
|
||||
"preemphasis": {
|
||||
"lane0":"0x144808",
|
||||
"lane1":"0x144808",
|
||||
"lane2":"0x144808",
|
||||
"lane3":"0x144808"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
22
device/dell/x86_64-dellemc_s5248f_c3538-r0/plugins/eeprom.py
Normal file
22
device/dell/x86_64-dellemc_s5248f_c3538-r0/plugins/eeprom.py
Normal file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
#############################################################################
|
||||
# DellEMC S5248f
|
||||
#
|
||||
# Platform and model specific eeprom subclass, inherits from the base class,
|
||||
# and provides the followings:
|
||||
# - the eeprom format definition
|
||||
# - specific encoder/decoder if there is special need
|
||||
#############################################################################
|
||||
|
||||
try:
|
||||
from sonic_eeprom import eeprom_tlvinfo
|
||||
except ImportError, e:
|
||||
raise ImportError (str(e) + "- required module not found")
|
||||
|
||||
|
||||
class board(eeprom_tlvinfo.TlvInfoDecoder):
|
||||
|
||||
def __init__(self, name, path, cpld_root, ro):
|
||||
self.eeprom_path = "/sys/class/i2c-adapter/i2c-0/0-0050/eeprom"
|
||||
super(board, self).__init__(self.eeprom_path, 0, '', True)
|
107
device/dell/x86_64-dellemc_s5248f_c3538-r0/plugins/psuutil.py
Normal file
107
device/dell/x86_64-dellemc_s5248f_c3538-r0/plugins/psuutil.py
Normal file
@ -0,0 +1,107 @@
|
||||
#
|
||||
# psuutil.py
|
||||
# Platform-specific PSU status interface for SONiC
|
||||
#
|
||||
|
||||
|
||||
import os.path
|
||||
import logging
|
||||
import commands
|
||||
import sys
|
||||
|
||||
|
||||
S5248F_MAX_PSUS = 2
|
||||
IPMI_PSU_DATA = "docker exec -it pmon ipmitool sdr list"
|
||||
IPMI_PSU_DATA_DOCKER = "ipmitool sdr list"
|
||||
PSU_PRESENCE = "PSU{0}_stat"
|
||||
# Use this for older firmware
|
||||
# PSU_PRESENCE="PSU{0}_prsnt"
|
||||
ipmi_sdr_list = ""
|
||||
|
||||
|
||||
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)
|
||||
|
||||
def isDockerEnv(self):
|
||||
num_docker = open('/proc/self/cgroup', 'r').read().count(":/docker")
|
||||
if num_docker > 0:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
# Fetch a BMC register
|
||||
def get_pmc_register(self, reg_name):
|
||||
|
||||
status = 1
|
||||
global ipmi_sdr_list
|
||||
ipmi_dev_node = "/dev/pmi0"
|
||||
ipmi_cmd = IPMI_PSU_DATA
|
||||
dockerenv = self.isDockerEnv()
|
||||
if dockerenv == True:
|
||||
ipmi_cmd = IPMI_PSU_DATA_DOCKER
|
||||
|
||||
status, ipmi_sdr_list = commands.getstatusoutput(ipmi_cmd)
|
||||
|
||||
if status:
|
||||
logging.error('Failed to execute:' + ipmi_sdr_list)
|
||||
sys.exit(0)
|
||||
|
||||
for item in ipmi_sdr_list.split("\n"):
|
||||
if reg_name in item:
|
||||
output = item.strip()
|
||||
|
||||
if not output:
|
||||
print('\nFailed to fetch: ' + reg_name + ' sensor ')
|
||||
sys.exit(0)
|
||||
|
||||
output = output.split('|')[1]
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
return output
|
||||
|
||||
def get_num_psus(self):
|
||||
"""
|
||||
Retrieves the number of PSUs available on the device
|
||||
:return: An integer, the number of PSUs available on the device
|
||||
"""
|
||||
S5248F_MAX_PSUS = 2
|
||||
return S5248F_MAX_PSUS
|
||||
|
||||
def get_psu_status(self, index):
|
||||
"""
|
||||
Retrieves the oprational status of power supply unit (PSU) defined
|
||||
by index <index>
|
||||
:param index: An integer, index of the PSU of which to query status
|
||||
:return: Boolean, True if PSU is operating properly, False if PSU is\
|
||||
faulty
|
||||
"""
|
||||
# Until psu_status is implemented this is hardcoded temporarily
|
||||
|
||||
status = 1
|
||||
return status
|
||||
|
||||
def get_psu_presence(self, index):
|
||||
"""
|
||||
Retrieves the presence status of power supply unit (PSU) defined
|
||||
by index <index>
|
||||
:param index: An integer, index of the PSU of which to query status
|
||||
:return: Boolean, True if PSU is plugged, False if not
|
||||
"""
|
||||
status = 0
|
||||
psu_reg_name = PSU_PRESENCE.format(index)
|
||||
psu_status = int(self.get_pmc_register(psu_reg_name), 16)
|
||||
if (psu_status != 'ERR'):
|
||||
# Check for PSU presence
|
||||
if (psu_status == 0x00):
|
||||
status = 1
|
||||
return status
|
||||
|
289
device/dell/x86_64-dellemc_s5248f_c3538-r0/plugins/sfputil.py
Normal file
289
device/dell/x86_64-dellemc_s5248f_c3538-r0/plugins/sfputil.py
Normal file
@ -0,0 +1,289 @@
|
||||
# sfputil.py
|
||||
#
|
||||
# Platform-specific SFP transceiver interface for SONiC
|
||||
#
|
||||
# For S5248F-ON, hardware version X01
|
||||
|
||||
try:
|
||||
import struct
|
||||
import sys
|
||||
import getopt
|
||||
import time
|
||||
from sonic_sfp.sfputilbase import SfpUtilBase
|
||||
from os import *
|
||||
from mmap import *
|
||||
|
||||
except ImportError as e:
|
||||
raise ImportError("%s - required module not found" % str(e))
|
||||
|
||||
|
||||
class SfpUtil(SfpUtilBase):
|
||||
"""Platform-specific SfpUtil class"""
|
||||
|
||||
PORT_START = 1
|
||||
PORT_END = 56
|
||||
PORTS_IN_BLOCK = 56
|
||||
|
||||
BASE_RES_PATH = "/sys/bus/pci/devices/0000:04:00.0/resource0"
|
||||
|
||||
_port_to_i2c_mapping = {
|
||||
1: 2,
|
||||
2: 3,
|
||||
3: 4,
|
||||
4: 5,
|
||||
5: 6,
|
||||
6: 7,
|
||||
7: 8,
|
||||
8: 9,
|
||||
9: 10,
|
||||
10: 11,
|
||||
11: 12,
|
||||
12: 13,
|
||||
13: 14,
|
||||
14: 15,
|
||||
15: 16,
|
||||
16: 17,
|
||||
17: 18,
|
||||
18: 19,
|
||||
19: 20,
|
||||
20: 21,
|
||||
21: 22,
|
||||
22: 23,
|
||||
23: 24,
|
||||
24: 25,
|
||||
25: 26,
|
||||
26: 27,
|
||||
27: 28,
|
||||
28: 29,
|
||||
29: 30,
|
||||
30: 31,
|
||||
31: 32,
|
||||
32: 33,
|
||||
33: 34,
|
||||
34: 35,
|
||||
35: 36,
|
||||
36: 37,
|
||||
37: 38,
|
||||
38: 39,
|
||||
39: 40,
|
||||
40: 41,
|
||||
41: 42,
|
||||
42: 43,
|
||||
43: 44,
|
||||
44: 45,
|
||||
45: 46,
|
||||
46: 47,
|
||||
47: 48,
|
||||
48: 49,
|
||||
# DD + QSFP28
|
||||
49: 50,
|
||||
50: 50,
|
||||
51: 51,
|
||||
52: 51,
|
||||
53: 52,
|
||||
54: 53,
|
||||
55: 54,
|
||||
56: 55,
|
||||
}
|
||||
|
||||
_port_to_eeprom_mapping = {}
|
||||
|
||||
|
||||
_global_port_pres_dict = {}
|
||||
|
||||
@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(49, self.PORTS_IN_BLOCK + 1)
|
||||
|
||||
@property
|
||||
def port_to_eeprom_mapping(self):
|
||||
return self._port_to_eeprom_mapping
|
||||
|
||||
def pci_mem_read(self, mm, offset):
|
||||
mm.seek(offset)
|
||||
read_data_stream=mm.read(4)
|
||||
reg_val=struct.unpack('I',read_data_stream)
|
||||
mem_val = str(reg_val)[1:-2]
|
||||
# print "reg_val read:%x"%reg_val
|
||||
return mem_val
|
||||
|
||||
def pci_mem_write(self, mm, offset, data):
|
||||
mm.seek(offset)
|
||||
# print "data to write:%x"%data
|
||||
mm.write(struct.pack('I',data))
|
||||
|
||||
def pci_set_value(self, resource, val, offset):
|
||||
fd = open(resource, O_RDWR)
|
||||
mm = mmap(fd, 0)
|
||||
val = self.pci_mem_write(mm, offset, val)
|
||||
mm.close()
|
||||
close(fd)
|
||||
return val
|
||||
|
||||
def pci_get_value(self, resource, offset):
|
||||
fd = open(resource, O_RDWR)
|
||||
mm = mmap(fd, 0)
|
||||
val = self.pci_mem_read(mm, offset)
|
||||
mm.close()
|
||||
close(fd)
|
||||
return val
|
||||
|
||||
def init_global_port_presence(self):
|
||||
for port_num in range(self.port_start, (self.port_end + 1)):
|
||||
presence = self.get_presence(port_num)
|
||||
if(presence):
|
||||
self._global_port_pres_dict[port_num] = '1'
|
||||
else:
|
||||
self._global_port_pres_dict[port_num] = '0'
|
||||
|
||||
def __init__(self):
|
||||
eeprom_path = "/sys/class/i2c-adapter/i2c-{0}/{0}-0050/eeprom"
|
||||
|
||||
for x in range(self.port_start, self.port_end + 1):
|
||||
self.port_to_eeprom_mapping[x] = eeprom_path.format(
|
||||
self._port_to_i2c_mapping[x])
|
||||
self.init_global_port_presence()
|
||||
SfpUtilBase.__init__(self)
|
||||
|
||||
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
|
||||
|
||||
# Port offset starts with 0x4004
|
||||
port_offset = 16388 + ((port_num-1) * 16)
|
||||
|
||||
status = self.pci_get_value(self.BASE_RES_PATH, port_offset)
|
||||
reg_value = int(status)
|
||||
|
||||
# Absence of status throws error
|
||||
if (reg_value == "" ):
|
||||
return False
|
||||
|
||||
# Mask off bit for presence
|
||||
mask = (1 << 1)
|
||||
if (port_num > 48):
|
||||
mask = (1 << 4)
|
||||
|
||||
|
||||
# ModPrsL is active low
|
||||
if reg_value & mask == 0:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def get_low_power_mode(self, port_num):
|
||||
|
||||
# Check for invalid port_num
|
||||
if port_num < self.port_start or port_num > self.port_end:
|
||||
return False
|
||||
|
||||
# Port offset starts with 0x4000
|
||||
port_offset = 16384 + ((port_num-1) * 16)
|
||||
|
||||
status = self.pci_get_value(self.BASE_RES_PATH, port_offset)
|
||||
reg_value = int(status)
|
||||
|
||||
# Absence of status throws error
|
||||
if (reg_value == "" ):
|
||||
return False
|
||||
|
||||
# Mask off 4th bit for presence
|
||||
mask = (1 << 6)
|
||||
|
||||
# LPMode is active high
|
||||
if reg_value & mask == 0:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def set_low_power_mode(self, port_num, lpmode):
|
||||
|
||||
# Check for invalid port_num
|
||||
if port_num < self.port_start or port_num > self.port_end:
|
||||
return False
|
||||
|
||||
# Port offset starts with 0x4000
|
||||
port_offset = 16384 + ((port_num-1) * 16)
|
||||
|
||||
status = self.pci_get_value(self.BASE_RES_PATH, port_offset)
|
||||
reg_value = int(status)
|
||||
|
||||
# Absence of status throws error
|
||||
if (reg_value == "" ):
|
||||
return False
|
||||
|
||||
# Mask off 4th bit for presence
|
||||
mask = (1 << 6)
|
||||
|
||||
# LPMode is active high; set or clear the bit accordingly
|
||||
if lpmode is True:
|
||||
reg_value = reg_value | mask
|
||||
else:
|
||||
reg_value = reg_value & ~mask
|
||||
|
||||
# Convert our register value back to a hex string and write back
|
||||
status = self.pci_set_value(self.BASE_RES_PATH, reg_value, port_offset)
|
||||
|
||||
return True
|
||||
|
||||
def reset(self, port_num):
|
||||
|
||||
# Check for invalid port_num
|
||||
if port_num < self.port_start or port_num > self.port_end:
|
||||
return False
|
||||
|
||||
# Port offset starts with 0x4000
|
||||
port_offset = 16384 + ((port_num-1) * 16)
|
||||
|
||||
status = self.pci_get_value(self.BASE_RES_PATH, port_offset)
|
||||
reg_value = int(status)
|
||||
|
||||
# Absence of status throws error
|
||||
if (reg_value == "" ):
|
||||
return False
|
||||
|
||||
# Mask off 4th bit for presence
|
||||
mask = (1 << 6)
|
||||
|
||||
# ResetL is active low
|
||||
reg_value = reg_value & ~mask
|
||||
|
||||
# Convert our register value back to a hex string and write back
|
||||
status = self.pci_set_value(self.BASE_RES_PATH, reg_value, port_offset)
|
||||
|
||||
# Sleep 1 second to allow it to settle
|
||||
time.sleep(1)
|
||||
|
||||
reg_value = reg_value | mask
|
||||
|
||||
# Convert our register value back to a hex string and write back
|
||||
status = self.pci_set_value(self.BASE_RES_PATH, reg_value, port_offset)
|
||||
|
||||
return True
|
||||
|
||||
def get_transceiver_change_event(self, timeout=0):
|
||||
port_dict = {}
|
||||
while True:
|
||||
for port_num in range(self.port_start, (self.port_end + 1)):
|
||||
presence = self.get_presence(port_num)
|
||||
if(presence and self._global_port_pres_dict[port_num] == '0'):
|
||||
self._global_port_pres_dict[port_num] = '1'
|
||||
port_dict[port_num] = '1'
|
||||
elif(not presence and
|
||||
self._global_port_pres_dict[port_num] == '1'):
|
||||
self._global_port_pres_dict[port_num] = '0'
|
||||
port_dict[port_num] = '0'
|
||||
|
||||
if(len(port_dict) > 0):
|
||||
return True, port_dict
|
||||
|
||||
time.sleep(0.5)
|
@ -8,6 +8,7 @@ $(SONIC_ONE_IMAGE)_INSTALLS += $(SYSTEMD_SONIC_GENERATOR)
|
||||
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(DELL_S6000_PLATFORM_MODULE) \
|
||||
$(DELL_Z9264F_PLATFORM_MODULE) \
|
||||
$(DELL_S5232F_PLATFORM_MODULE) \
|
||||
$(DELL_S5248F_PLATFORM_MODULE) \
|
||||
$(DELL_Z9100_PLATFORM_MODULE) \
|
||||
$(DELL_S6100_PLATFORM_MODULE) \
|
||||
$(INGRASYS_S8900_54XC_PLATFORM_MODULE) \
|
||||
|
@ -29,3 +29,8 @@ Package: platform-modules-s5232f
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
||||
|
||||
Package: platform-modules-s5248f
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
||||
|
@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: setup-board
|
||||
# Required-Start:
|
||||
# Required-Stop:
|
||||
# Should-Start:
|
||||
# Should-Stop:
|
||||
# Default-Start: S
|
||||
# Default-Stop: 0 6
|
||||
# Short-Description: Setup S5248f board.
|
||||
### END INIT INFO
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Setting up board... "
|
||||
|
||||
# /usr/local/bin/iom_power_on.sh
|
||||
/usr/local/bin/s5248f_platform.sh init
|
||||
|
||||
echo "done."
|
||||
;;
|
||||
|
||||
stop)
|
||||
/usr/local/bin/s5248f_platform.sh deinit
|
||||
echo "done."
|
||||
|
||||
;;
|
||||
|
||||
force-reload|restart)
|
||||
echo "Not supported"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: /etc/init.d/platform-modules-s5248f.init {start|stop}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
@ -0,0 +1,9 @@
|
||||
s5248f/scripts/s5248f_platform.sh usr/local/bin
|
||||
s5248f/scripts/check_qsfp.sh usr/local/bin
|
||||
s5248f/scripts/platform_sensors.py usr/local/bin
|
||||
s5248f/scripts/sensors usr/bin
|
||||
s5248f/scripts/pcisysfs.py usr/bin
|
||||
s5248f/scripts/qsfp_irq_enable.py usr/bin
|
||||
s5248f/cfg/s5248f-modules.conf etc/modules-load.d
|
||||
s5248f/systemd/platform-modules-s5248f.service etc/systemd/system
|
||||
common/platform_reboot usr/share/sonic/device/x86_64-dellemc_s5248f_c3538-r0
|
@ -0,0 +1,10 @@
|
||||
# postinst script for S5248f
|
||||
|
||||
# Enable Dell-S5248f-platform-service
|
||||
depmod -a
|
||||
systemctl enable platform-modules-s5248f.service
|
||||
systemctl start platform-modules-s5248f.service
|
||||
|
||||
|
||||
#DEBHELPER#
|
||||
|
@ -5,7 +5,7 @@ export INSTALL_MOD_DIR:=extra
|
||||
KVERSION ?= $(shell uname -r)
|
||||
KERNEL_SRC := /lib/modules/$(KVERSION)
|
||||
MOD_SRC_DIR:= $(shell pwd)
|
||||
MODULE_DIRS:= s6000 z9100 s6100 z9264f s5232f
|
||||
MODULE_DIRS:= s6000 z9100 s6100 z9264f s5232f s5248f
|
||||
COMMON_DIR := common
|
||||
|
||||
%:
|
||||
|
@ -0,0 +1,19 @@
|
||||
# /etc/modules: kernel modules to load at boot time.
|
||||
#
|
||||
# This file contains the names of kernel modules that should be loaded
|
||||
# at boot time, one per line. Lines beginning with "#" are ignored.
|
||||
|
||||
i2c-i801
|
||||
i2c-isch
|
||||
i2c-ismt
|
||||
i2c-dev
|
||||
i2c-mux
|
||||
i2c-smbus
|
||||
|
||||
i2c-mux-gpio
|
||||
i2c-mux-pca954x
|
||||
|
||||
ipmi_devintf
|
||||
ipmi_si
|
||||
dell_s5248f_fpga_ocores
|
||||
i2c_ocores
|
@ -0,0 +1,2 @@
|
||||
obj-m := dell_s5248f_fpga_ocores.o
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,3 @@
|
||||
# Temporary dummy file for s5248f.
|
||||
# Will be updated soon.
|
||||
|
102
platform/broadcom/sonic-platform-modules-dell/s5248f/scripts/pcisysfs.py
Executable file
102
platform/broadcom/sonic-platform-modules-dell/s5248f/scripts/pcisysfs.py
Executable file
@ -0,0 +1,102 @@
|
||||
#!/usr/bin/python
|
||||
# Copyright (c) 2015 Dell Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
|
||||
# LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS
|
||||
# FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
#
|
||||
# See the Apache Version 2.0 License for specific language governing
|
||||
# permissions and limitations under the License.
|
||||
|
||||
import struct
|
||||
import sys
|
||||
import getopt
|
||||
from os import *
|
||||
from mmap import *
|
||||
|
||||
def usage():
|
||||
''' This is the Usage Method '''
|
||||
|
||||
print '\t\t pcisysfs.py --get --offset <offset> --res <resource>'
|
||||
print '\t\t pcisysfs.py --set --val <val> --offset <offset> --res <resource>'
|
||||
sys.exit(1)
|
||||
|
||||
def pci_mem_read(mm,offset):
|
||||
mm.seek(offset)
|
||||
read_data_stream=mm.read(4)
|
||||
print ""
|
||||
reg_val=struct.unpack('I',read_data_stream)
|
||||
print "reg_val read:%x"%reg_val
|
||||
return reg_val
|
||||
|
||||
def pci_mem_write(mm,offset,data):
|
||||
mm.seek(offset)
|
||||
print "data to write:%x"%data
|
||||
mm.write(struct.pack('I',data))
|
||||
|
||||
def pci_set_value(resource,val,offset):
|
||||
fd=open(resource,O_RDWR)
|
||||
mm=mmap(fd,0)
|
||||
pci_mem_write(mm,offset,val)
|
||||
|
||||
def pci_get_value(resource,offset):
|
||||
fd=open(resource,O_RDWR)
|
||||
mm=mmap(fd,0)
|
||||
pci_mem_read(mm,offset)
|
||||
|
||||
def main(argv):
|
||||
|
||||
''' The main function will read the user input from the
|
||||
command line argument and process the request '''
|
||||
|
||||
opts = ''
|
||||
val = ''
|
||||
choice = ''
|
||||
resource = ''
|
||||
offset = ''
|
||||
|
||||
try:
|
||||
opts, args = getopt.getopt(argv, "hgsv:" , \
|
||||
["val=","res=","offset=","help", "get", "set"])
|
||||
|
||||
except getopt.GetoptError:
|
||||
usage()
|
||||
|
||||
for opt,arg in opts:
|
||||
|
||||
if opt in ('-h','--help'):
|
||||
choice = 'help'
|
||||
|
||||
elif opt in ('-g', '--get'):
|
||||
choice = 'get'
|
||||
|
||||
elif opt in ('-s', '--set'):
|
||||
choice = 'set'
|
||||
|
||||
elif opt == '--res':
|
||||
resource = arg
|
||||
|
||||
elif opt == '--val':
|
||||
val = int(arg,16)
|
||||
|
||||
elif opt == '--offset':
|
||||
offset = int(arg,16)
|
||||
|
||||
if choice == 'set' and val != '' and offset !='' and resource !='':
|
||||
pci_set_value(resource,val,offset)
|
||||
|
||||
elif choice == 'get' and offset != '' and resource !='':
|
||||
pci_get_value(resource,offset)
|
||||
|
||||
else:
|
||||
usage()
|
||||
|
||||
#Calling the main method
|
||||
if __name__ == "__main__":
|
||||
main(sys.argv[1:])
|
||||
|
277
platform/broadcom/sonic-platform-modules-dell/s5248f/scripts/platform_sensors.py
Executable file
277
platform/broadcom/sonic-platform-modules-dell/s5248f/scripts/platform_sensors.py
Executable file
@ -0,0 +1,277 @@
|
||||
#!/usr/bin/python
|
||||
# On S5248F, the BaseBoard Management Controller is an
|
||||
# autonomous subsystem provides monitoring and management
|
||||
# facility independent of the host CPU. IPMI standard
|
||||
# protocol is used with ipmitool to fetch sensor details.
|
||||
# Current script support X00 board only. X01 support will
|
||||
# be added soon. This provies support for the
|
||||
# following objects:
|
||||
# * Onboard temperature sensors
|
||||
# * FAN trays
|
||||
# * PSU
|
||||
|
||||
|
||||
import os
|
||||
import sys
|
||||
import logging
|
||||
import subprocess
|
||||
import commands
|
||||
|
||||
S5248F_MAX_FAN_TRAYS = 4
|
||||
S5248F_MAX_PSUS = 2
|
||||
IPMI_SENSOR_DATA = "ipmitool sdr list"
|
||||
IPMI_SENSOR_DUMP = "/tmp/sdr"
|
||||
|
||||
FAN_PRESENCE = "FAN{0}_prsnt"
|
||||
PSU_PRESENCE = "PSU{0}_stat"
|
||||
# Use this for older firmware
|
||||
# PSU_PRESENCE="PSU{0}_prsnt"
|
||||
|
||||
IPMI_PSU1_DATA_DOCKER = "ipmitool raw 0x04 0x2d 0x31 | awk '{print substr($0,9,1)}'"
|
||||
IPMI_PSU2_DATA_DOCKER = "ipmitool raw 0x04 0x2d 0x32 | awk '{print substr($0,9,1)}'"
|
||||
ipmi_sdr_list = ""
|
||||
|
||||
# Dump sensor registers
|
||||
|
||||
|
||||
def ipmi_sensor_dump():
|
||||
|
||||
status = 1
|
||||
global ipmi_sdr_list
|
||||
ipmi_cmd = IPMI_SENSOR_DATA
|
||||
status, ipmi_sdr_list = commands.getstatusoutput(ipmi_cmd)
|
||||
|
||||
if status:
|
||||
logging.error('Failed to execute:' + ipmi_sdr_list)
|
||||
sys.exit(0)
|
||||
|
||||
# Fetch a BMC register
|
||||
|
||||
|
||||
def get_pmc_register(reg_name):
|
||||
|
||||
output = None
|
||||
for item in ipmi_sdr_list.split("\n"):
|
||||
if reg_name in item:
|
||||
output = item.strip()
|
||||
|
||||
if output is None:
|
||||
print('\nFailed to fetch: ' + reg_name + ' sensor ')
|
||||
sys.exit(0)
|
||||
|
||||
output = output.split('|')[1]
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
return output
|
||||
|
||||
|
||||
# Print the information for temperature sensors
|
||||
|
||||
|
||||
def print_temperature_sensors():
|
||||
|
||||
print("\nOnboard Temperature Sensors:")
|
||||
|
||||
print ' PT_Left_temp: ',\
|
||||
(get_pmc_register('PT_Left_temp'))
|
||||
print ' PT_Mid_temp: ',\
|
||||
(get_pmc_register('PT_Mid_temp'))
|
||||
print ' PT_Right_temp: ',\
|
||||
(get_pmc_register('PT_Right_temp'))
|
||||
print ' Broadcom Temp: ',\
|
||||
(get_pmc_register('NPU_Near_temp'))
|
||||
print ' Inlet Airflow Temp: ',\
|
||||
(get_pmc_register('ILET_AF_temp'))
|
||||
print ' CPU Temp: ',\
|
||||
(get_pmc_register('CPU_temp'))
|
||||
|
||||
ipmi_sensor_dump()
|
||||
|
||||
print_temperature_sensors()
|
||||
|
||||
# Print the information for 1 Fan Tray
|
||||
|
||||
|
||||
def print_fan_tray(tray):
|
||||
|
||||
Fan_Status = [' Normal', ' Abnormal']
|
||||
Airflow_Direction = ['B2F', 'F2B']
|
||||
|
||||
print ' Fan Tray ' + str(tray) + ':'
|
||||
|
||||
if (tray == 1):
|
||||
|
||||
fan1_status = int(get_pmc_register('FAN1_Front_stat'), 16)
|
||||
fan2_status = int(get_pmc_register('FAN1_Rear_stat'), 16)
|
||||
|
||||
print ' Fan1 Speed: ',\
|
||||
get_pmc_register('FAN1_Front_rpm')
|
||||
print ' Fan2 Speed: ',\
|
||||
get_pmc_register('FAN1_Rear_rpm')
|
||||
print ' Fan1 State: ',\
|
||||
Fan_Status[fan1_status]
|
||||
print ' Fan2 State: ',\
|
||||
Fan_Status[fan2_status]
|
||||
|
||||
elif (tray == 2):
|
||||
|
||||
fan1_status = int(get_pmc_register('FAN2_Front_stat'), 16)
|
||||
fan2_status = int(get_pmc_register('FAN2_Rear_stat'), 16)
|
||||
|
||||
print ' Fan1 Speed: ',\
|
||||
get_pmc_register('FAN2_Front_rpm')
|
||||
print ' Fan2 Speed: ',\
|
||||
get_pmc_register('FAN2_Rear_rpm')
|
||||
print ' Fan1 State: ',\
|
||||
Fan_Status[fan1_status]
|
||||
print ' Fan2 State: ',\
|
||||
Fan_Status[fan2_status]
|
||||
|
||||
elif (tray == 3):
|
||||
|
||||
fan1_status = int(get_pmc_register('FAN3_Front_stat'), 16)
|
||||
fan2_status = int(get_pmc_register('FAN3_Rear_stat'), 16)
|
||||
|
||||
print ' Fan1 Speed: ',\
|
||||
get_pmc_register('FAN3_Front_rpm')
|
||||
print ' Fan2 Speed: ',\
|
||||
get_pmc_register('FAN3_Rear_rpm')
|
||||
print ' Fan1 State: ',\
|
||||
Fan_Status[fan1_status]
|
||||
print ' Fan2 State: ',\
|
||||
Fan_Status[fan2_status]
|
||||
|
||||
elif (tray == 4):
|
||||
|
||||
fan1_status = int(get_pmc_register('FAN4_Front_stat'), 16)
|
||||
fan2_status = int(get_pmc_register('FAN4_Rear_stat'), 16)
|
||||
|
||||
print ' Fan1 Speed: ',\
|
||||
get_pmc_register('FAN4_Front_rpm')
|
||||
print ' Fan2 Speed: ',\
|
||||
get_pmc_register('FAN4_Rear_rpm')
|
||||
print ' Fan1 State: ',\
|
||||
Fan_Status[fan1_status]
|
||||
print ' Fan2 State: ',\
|
||||
Fan_Status[fan2_status]
|
||||
|
||||
|
||||
print('\nFan Trays:')
|
||||
|
||||
for tray in range(1, S5248F_MAX_FAN_TRAYS + 1):
|
||||
fan_presence = FAN_PRESENCE.format(tray)
|
||||
if (get_pmc_register(fan_presence)):
|
||||
print_fan_tray(tray)
|
||||
else:
|
||||
print '\n Fan Tray ' + str(tray + 1) + ': Not present'
|
||||
|
||||
def get_psu_presence(index):
|
||||
"""
|
||||
Retrieves the presence status of power supply unit (PSU) defined
|
||||
by index <index>
|
||||
:param index: An integer, index of the PSU of which to query status
|
||||
:return: Boolean, True if PSU is plugged, False if not
|
||||
"""
|
||||
status = 0
|
||||
ret_status = 1
|
||||
|
||||
if index == 1:
|
||||
status, ipmi_cmd_ret = commands.getstatusoutput(IPMI_PSU1_DATA_DOCKER)
|
||||
elif index == 2:
|
||||
ret_status, ipmi_cmd_ret = commands.getstatusoutput(IPMI_PSU2_DATA_DOCKER)
|
||||
|
||||
#if ret_status:
|
||||
# print ipmi_cmd_ret
|
||||
# logging.error('Failed to execute ipmitool')
|
||||
# sys.exit(0)
|
||||
|
||||
psu_status = ipmi_cmd_ret
|
||||
|
||||
if psu_status == '1':
|
||||
status = 1
|
||||
|
||||
return status
|
||||
|
||||
|
||||
# Print the information for PSU1, PSU2
|
||||
def print_psu(psu):
|
||||
Psu_Type = ['Normal', 'Mismatch']
|
||||
Psu_Input_Type = ['AC', 'DC']
|
||||
PSU_STATUS_TYPE_BIT = 4
|
||||
PSU_STATUS_INPUT_TYPE_BIT = 1
|
||||
PSU_FAN_PRESENT_BIT = 2
|
||||
PSU_FAN_STATUS_BIT = 1
|
||||
PSU_FAN_AIR_FLOW_BIT = 0
|
||||
Psu_Fan_Presence = ['Present', 'Absent']
|
||||
Psu_Fan_Status = ['Normal', 'Abnormal']
|
||||
Psu_Fan_Airflow = ['B2F', 'F2B']
|
||||
|
||||
# print ' Input: ', Psu_Input_Type[psu_input_type]
|
||||
# print ' Type: ', Psu_Type[psu_type]
|
||||
|
||||
# PSU FAN details
|
||||
if (psu == 1):
|
||||
|
||||
# psu1_fan_status = int(get_pmc_register('PSU1_status'),16)
|
||||
|
||||
print ' PSU1:'
|
||||
print ' FAN Normal Temperature: ',\
|
||||
get_pmc_register('PSU1_temp')
|
||||
print ' FAN AirFlow Temperature: ',\
|
||||
get_pmc_register('PSU1_AF_temp')
|
||||
print ' FAN RPM: ',\
|
||||
get_pmc_register('PSU1_rpm')
|
||||
# print ' FAN Status: ', Psu_Fan_Status[psu1_fan_status]
|
||||
|
||||
# PSU input & output monitors
|
||||
print ' Input Voltage: ',\
|
||||
get_pmc_register('PSU1_In_volt')
|
||||
print ' Output Voltage: ',\
|
||||
get_pmc_register('PSU1_Out_volt')
|
||||
print ' Input Power: ',\
|
||||
get_pmc_register('PSU1_In_watt')
|
||||
print ' Output Power: ',\
|
||||
get_pmc_register('PSU1_Out_watt')
|
||||
print ' Input Current: ',\
|
||||
get_pmc_register('PSU1_In_amp')
|
||||
print ' Output Current: ',\
|
||||
get_pmc_register('PSU1_Out_amp')
|
||||
|
||||
else:
|
||||
|
||||
# psu2_fan_status = int(get_pmc_register('PSU1_status'),16)
|
||||
print ' PSU2:'
|
||||
print ' FAN Normal Temperature: ',\
|
||||
get_pmc_register('PSU2_temp')
|
||||
print ' FAN AirFlow Temperature: ',\
|
||||
get_pmc_register('PSU2_AF_temp')
|
||||
print ' FAN RPM: ',\
|
||||
get_pmc_register('PSU2_rpm')
|
||||
# print ' FAN Status: ', Psu_Fan_Status[psu2_fan_status]
|
||||
|
||||
# PSU input & output monitors
|
||||
print ' Input Voltage: ',\
|
||||
get_pmc_register('PSU2_In_volt')
|
||||
print ' Output Voltage: ',\
|
||||
get_pmc_register('PSU2_Out_volt')
|
||||
print ' Input Power: ',\
|
||||
get_pmc_register('PSU2_In_watt')
|
||||
print ' Output Power: ',\
|
||||
get_pmc_register('PSU2_Out_watt')
|
||||
print ' Input Current: ',\
|
||||
get_pmc_register('PSU2_In_amp')
|
||||
print ' Output Current: ',\
|
||||
get_pmc_register('PSU2_Out_amp')
|
||||
|
||||
|
||||
print('\nPSUs:')
|
||||
for psu in range(1, S5248F_MAX_PSUS + 1):
|
||||
#psu_presence = PSU_PRESENCE.format(psu)
|
||||
if (get_psu_presence(psu)):
|
||||
print_psu(psu)
|
||||
else:
|
||||
print '\n PSU ', psu, 'Not present'
|
||||
|
||||
print '\n Total Power: ',\
|
||||
get_pmc_register('PSU_Total_watt')
|
||||
|
@ -0,0 +1,32 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
try:
|
||||
import struct
|
||||
import sys
|
||||
from os import *
|
||||
from mmap import *
|
||||
|
||||
except ImportError as e:
|
||||
raise ImportError("%s - required module no found" % str(e))
|
||||
|
||||
BASE_RES_PATH = "/sys/bus/pci/devices/0000:04:00.0/resource0"
|
||||
PORT_START = 0
|
||||
PORT_END = 32
|
||||
|
||||
|
||||
def pci_mem_write(mm, offset, data):
|
||||
mm.seek(offset)
|
||||
mm.write(struct.pack('I', data))
|
||||
|
||||
|
||||
def pci_set_value(resource, val, offset):
|
||||
fd = open(resource, O_RDWR)
|
||||
mm = mmap(fd, 0)
|
||||
val = pci_mem_write(mm, offset, val)
|
||||
mm.close()
|
||||
close(fd)
|
||||
return val
|
||||
|
||||
for port_num in range(PORT_START, PORT_END+1):
|
||||
port_offset = 0x400c + ((port_num) * 16)
|
||||
pci_set_value(BASE_RES_PATH, 0x30, port_offset)
|
161
platform/broadcom/sonic-platform-modules-dell/s5248f/scripts/s5248f_platform.sh
Executable file
161
platform/broadcom/sonic-platform-modules-dell/s5248f/scripts/s5248f_platform.sh
Executable file
@ -0,0 +1,161 @@
|
||||
#!/bin/bash
|
||||
|
||||
init_devnum() {
|
||||
found=0
|
||||
for devnum in 0 1; do
|
||||
devname=`cat /sys/bus/i2c/devices/i2c-${devnum}/name`
|
||||
# iSMT adapter can be at either dffd0000 or dfff0000
|
||||
if [[ $devname == 'SMBus iSMT adapter at '* ]]; then
|
||||
found=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
[ $found -eq 0 ] && echo "cannot find iSMT" && exit 1
|
||||
}
|
||||
|
||||
# Attach/Detach syseeprom on CPU board
|
||||
sys_eeprom() {
|
||||
case $1 in
|
||||
"new_device") echo 24c16 0x50 > /sys/bus/i2c/devices/i2c-0/$1
|
||||
;;
|
||||
"delete_device") echo 0x50 > /sys/bus/i2c/devices/i2c-0/$1
|
||||
;;
|
||||
*) echo "s5248f_platform: sys_eeprom : invalid command !"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
#Attach/Detach the MUX connecting all QSFPs
|
||||
switch_board_qsfp_mux() {
|
||||
case $1 in
|
||||
"new_device")
|
||||
for ((i=603;i<=610;i++));
|
||||
do
|
||||
echo "Attaching PCA9548 @ 0x74"
|
||||
echo pca9548 0x74 > /sys/bus/i2c/devices/i2c-$i/$1
|
||||
done
|
||||
|
||||
;;
|
||||
"delete_device")
|
||||
for ((i=603;i<=610;i++));
|
||||
do
|
||||
echo "Detaching PCA9548 @ 0x74"
|
||||
echo 0x74 > /sys/bus/i2c/devices/i2c-$i/$1
|
||||
done
|
||||
|
||||
;;
|
||||
*) echo "s5248f_platform: switch_board_qsfp_mux: invalid command !"
|
||||
;;
|
||||
esac
|
||||
sleep 2
|
||||
}
|
||||
|
||||
#Attach/Detach 64 instances of EEPROM driver QSFP ports
|
||||
#eeprom can dump data using below command
|
||||
switch_board_qsfp() {
|
||||
case $1 in
|
||||
"new_device")
|
||||
for ((i=2;i<=57;i++));
|
||||
do
|
||||
echo sff8436 0x50 > /sys/bus/i2c/devices/i2c-$i/$1
|
||||
done
|
||||
;;
|
||||
|
||||
"delete_device")
|
||||
for ((i=2;i<=57;i++));
|
||||
do
|
||||
echo 0x50 > /sys/bus/i2c/devices/i2c-$i/$1
|
||||
done
|
||||
;;
|
||||
|
||||
*) echo "s5248f_platform: switch_board_qsfp: invalid command !"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
#Modsel 64 ports to applicable QSFP type modules
|
||||
#This enables the adapter to respond for i2c commands
|
||||
switch_board_modsel() {
|
||||
resource="/sys/bus/pci/devices/0000:04:00.0/resource0"
|
||||
for ((i=1;i<=64;i++));
|
||||
do
|
||||
port_addr=$(( 16384 + ((i - 1) * 16)))
|
||||
hex=$( printf "0x%x" $port_addr )
|
||||
python /usr/bin/pcisysfs.py --set --offset $hex --val 0x10 --res $resource > /dev/null 2>&1
|
||||
done
|
||||
}
|
||||
|
||||
platform_firmware_versions() {
|
||||
FIRMWARE_VERSION_FILE=/var/log/firmware_versions
|
||||
rm -rf ${FIRMWARE_VERSION_FILE}
|
||||
echo "BIOS: `dmidecode -s system-version `" > $FIRMWARE_VERSION_FILE
|
||||
## Get FPGA version
|
||||
r=`/usr/bin/pcisysfs.py --get --offset 0x00 --res /sys/bus/pci/devices/0000\:04\:00.0/resource0 | sed '1d; s/.*\(....\)$/\1/; s/\(..\{1\}\)/\1./'`
|
||||
r_min=$(echo $r | sed 's/.*\(..\)$/0x\1/')
|
||||
r_maj=$(echo $r | sed 's/^\(..\).*/0x\1/')
|
||||
echo "FPGA: $((r_maj)).$((r_min))" >> $FIRMWARE_VERSION_FILE
|
||||
|
||||
## Get BMC Firmware Revision
|
||||
r=`cat /sys/class/ipmi/ipmi0/device/bmc/firmware_revision`
|
||||
echo "BMC: $r" >> $FIRMWARE_VERSION_FILE
|
||||
|
||||
#System CPLD 0x31 on i2c bus 601 ( physical FPGA I2C-2)
|
||||
r_min=`/usr/sbin/i2cget -y 601 0x31 0x0 | sed ' s/.*\(0x..\)$/\1/'`
|
||||
r_maj=`/usr/sbin/i2cget -y 601 0x31 0x1 | sed ' s/.*\(0x..\)$/\1/'`
|
||||
echo "System CPLD: $((r_maj)).$((r_min))" >> $FIRMWARE_VERSION_FILE
|
||||
|
||||
#Slave CPLD 1 0x30 on i2c bus 600 ( physical FPGA I2C-1)
|
||||
r_min=`/usr/sbin/i2cget -y 600 0x30 0x0 | sed ' s/.*\(0x..\)$/\1/'`
|
||||
r_maj=`/usr/sbin/i2cget -y 600 0x30 0x1 | sed ' s/.*\(0x..\)$/\1/'`
|
||||
echo "Slave CPLD 1: $((r_maj)).$((r_min))" >> $FIRMWARE_VERSION_FILE
|
||||
|
||||
#Slave CPLD 2 0x31 on i2c bus 600 ( physical FPGA I2C-1)
|
||||
r_min=`/usr/sbin/i2cget -y 600 0x31 0x0 | sed ' s/.*\(0x..\)$/\1/'`
|
||||
r_maj=`/usr/sbin/i2cget -y 600 0x31 0x1 | sed ' s/.*\(0x..\)$/\1/'`
|
||||
echo "Slave CPLD 2: $((r_maj)).$((r_min))" >> $FIRMWARE_VERSION_FILE
|
||||
|
||||
#Slave CPLD 3 0x32 on i2c bus 600 ( physical FPGA I2C-1)
|
||||
r_min=`/usr/sbin/i2cget -y 600 0x32 0x0 | sed ' s/.*\(0x..\)$/\1/'`
|
||||
r_maj=`/usr/sbin/i2cget -y 600 0x32 0x1 | sed ' s/.*\(0x..\)$/\1/'`
|
||||
echo "Slave CPLD 3: $((r_maj)).$((r_min))" >> $FIRMWARE_VERSION_FILE
|
||||
|
||||
#Slave CPLD 3 0x32 on i2c bus 600 ( physical FPGA I2C-1)
|
||||
r_min=`/usr/sbin/i2cget -y 600 0x33 0x0 | sed ' s/.*\(0x..\)$/\1/'`
|
||||
r_maj=`/usr/sbin/i2cget -y 600 0x33 0x1 | sed ' s/.*\(0x..\)$/\1/'`
|
||||
echo "Slave CPLD 4: $((r_maj)).$((r_min))" >> $FIRMWARE_VERSION_FILE
|
||||
}
|
||||
|
||||
#This enables the led control for CPU and default states
|
||||
switch_board_led_default() {
|
||||
resource="/sys/bus/pci/devices/0000:04:00.0/resource0"
|
||||
python /usr/bin/pcisysfs.py --set --offset 0x24 --val 0x194 --res $resource > /dev/null 2>&1
|
||||
}
|
||||
init_devnum
|
||||
|
||||
if [ "$1" == "init" ]; then
|
||||
modprobe i2c-dev
|
||||
modprobe i2c-mux-pca954x force_deselect_on_exit=1
|
||||
modprobe ipmi_devintf
|
||||
modprobe ipmi_si
|
||||
modprobe i2c_ocores
|
||||
modprobe dell_s5248f_fpga_ocores
|
||||
sys_eeprom "new_device"
|
||||
switch_board_qsfp_mux "new_device"
|
||||
switch_board_qsfp "new_device"
|
||||
switch_board_modsel
|
||||
switch_board_led_default
|
||||
#python /usr/bin/qsfp_irq_enable.py
|
||||
platform_firmware_versions
|
||||
|
||||
elif [ "$1" == "deinit" ]; then
|
||||
sys_eeprom "delete_device"
|
||||
switch_board_qsfp "delete_device"
|
||||
switch_board_qsfp_mux "delete_device"
|
||||
|
||||
modprobe -r i2c-mux-pca954x
|
||||
modprobe -r i2c-dev
|
||||
else
|
||||
echo "s5248f_platform : Invalid option !"
|
||||
fi
|
||||
|
8
platform/broadcom/sonic-platform-modules-dell/s5248f/scripts/sensors
Executable file
8
platform/broadcom/sonic-platform-modules-dell/s5248f/scripts/sensors
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
docker exec -i pmon sensors "$@"
|
||||
docker exec -i pmon /usr/bin/platform_sensors.py "$@"
|
||||
|
||||
#To probe sensors not part of lm-sensors
|
||||
#if [ -r /usr/local/bin/platform_sensors.py ]; then
|
||||
# python /usr/local/bin/platform_sensors.py
|
||||
#fi
|
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Dell S5248f Platform modules
|
||||
Before=pmon.service
|
||||
DefaultDependencies=no
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/local/bin/s5248f_platform.sh init
|
||||
ExecStop=/usr/local/bin/s5248f_platform.sh deinit
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -202,3 +202,10 @@ tm_port_header_type_out
|
||||
trunk_group_max_members
|
||||
ucode_port
|
||||
led_fw_path
|
||||
l2xlrn_thread_interval
|
||||
l2xlrn_intr_en
|
||||
serdes_lane_config_media_type
|
||||
sai_preinit_cmd_file
|
||||
sai_preinit_warmboot_cmd_file
|
||||
sai_postinit_cmd_file
|
||||
sai_postinit_warmboot_cmd_file
|
||||
|
Reference in New Issue
Block a user