Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Marvell hwsku ET6448M 48x1G+4x10G Arm32 Mgmt switch #3221

Merged
merged 5 commits into from
Jul 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{%- set default_cable = '300m' %}

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

{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
"size": "12766208",
"type": "ingress",
"mode": "dynamic"
},
"egress_lossless_pool": {
"size": "12766208",
"type": "egress",
"mode": "static"
},
"egress_lossy_pool": {
"size": "7326924",
"type": "egress",
"mode": "dynamic"
}
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
"pool":"[BUFFER_POOL|egress_lossless_pool]",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
"size":"1518",
"dynamic_th":"3"
}
},
{%- endmacro %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# name lanes alias
Ethernet0 1 Ethernet0
Ethernet1 2 Ethernet1
Ethernet2 3 Ethernet2
Ethernet3 4 Ethernet3
Ethernet4 5 Ethernet4
Ethernet5 6 Ethernet5
Ethernet6 7 Ethernet6
Ethernet7 8 Ethernet7
Ethernet8 9 Ethernet8
Ethernet9 10 Ethernet9
Ethernet10 11 Ethernet10
Ethernet11 12 Ethernet11
Ethernet12 13 Ethernet12
Ethernet13 14 Ethernet13
Ethernet14 15 Ethernet14
Ethernet15 16 Ethernet15
Ethernet16 17 Ethernet16
Ethernet17 18 Ethernet17
Ethernet18 19 Ethernet18
Ethernet19 20 Ethernet19
Ethernet20 21 Ethernet20
Ethernet21 22 Ethernet21
Ethernet22 23 Ethernet22
Ethernet23 24 Ethernet23
Ethernet24 25 Ethernet24
Ethernet25 26 Ethernet25
Ethernet26 27 Ethernet26
Ethernet27 28 Ethernet27
Ethernet28 29 Ethernet28
Ethernet29 30 Ethernet29
Ethernet30 31 Ethernet30
Ethernet31 32 Ethernet31
Ethernet32 33 Ethernet32
Ethernet33 34 Ethernet33
Ethernet34 35 Ethernet34
Ethernet35 36 Ethernet35
Ethernet36 37 Ethernet36
Ethernet37 38 Ethernet37
Ethernet38 39 Ethernet38
Ethernet39 40 Ethernet39
Ethernet40 41 Ethernet40
Ethernet41 42 Ethernet41
Ethernet42 43 Ethernet42
Ethernet43 44 Ethernet43
Ethernet44 45 Ethernet44
Ethernet45 46 Ethernet45
Ethernet46 47 Ethernet46
Ethernet47 48 Ethernet47
Ethernet48 49 Ethernet48
Ethernet49 50 Ethernet49
Ethernet50 51 Ethernet50
Ethernet51 52 Ethernet51
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
switchMacAddress=00:50:43:ee:ee:ee
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it mean all switches will have the same mac?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, but Hardware doesn't have board eeprom, so its been updated in config file. Need to be updated per board.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not quite understand the logic here, the mac address should be embedded in your board, we should not put a file in the image because then every image will be different for each board. but, I will let you address this problem later.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mode=1
hwId=et6448m
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/profile.ini
10 changes: 10 additions & 0 deletions device/marvell/armhf-marvell_et6448m_52x-r0/fancontrol
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
INTERVAL=10
DEVPATH=hwmon0=devices/platform/soc/soc:internal-regs/f1011000.i2c/i2c-0/0-002e hwmon1=devices/platform/soc/soc:internal-regs/f1011000.i2c/i2c-0/0-004a hwmon2=devices/platform/soc/soc:internal-regs/f1011000.i2c/i2c-0/0-004b
DEVNAME=hwmon0=adt7473 hwmon1=lm75a hwmon2=lm75a
FCTEMPS=hwmon0/device/pwm2=hwmon2/temp1_input hwmon0/device/pwm1=hwmon1/temp1_input
FCFANS=hwmon0/device/pwm2=hwmon0/device/fan2_input hwmon0/device/pwm1=hwmon0/device/fan1_input
MINTEMP=hwmon0/device/pwm2=20 hwmon0/device/pwm1=20
MAXTEMP=hwmon0/device/pwm2=60 hwmon0/device/pwm1=60
MINSTART=hwmon0/device/pwm2=150 hwmon0/device/pwm1=150
MINSTOP=hwmon0/device/pwm2=0 hwmon0/device/pwm1=0

13 changes: 13 additions & 0 deletions device/marvell/armhf-marvell_et6448m_52x-r0/plugins/eeprom.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env python

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 = "/etc/sonic/eeprom"
super(board, self).__init__(self.eeprom_path, 0, '', True)
54 changes: 54 additions & 0 deletions device/marvell/armhf-marvell_et6448m_52x-r0/plugins/psuutil.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/usr/bin/env python

import os.path
import subprocess
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)
MAX_PSUS = 2

def get_num_psus(self):
MAX_PSUS = 2
return MAX_PSUS

def get_psu_status(self, index):
if index is None:
return False

cmdstatus, psustatus = subprocess.getstatusoutput('i2cget -y 0 0x41 0xa') #need to verify the cpld register logic
psustatus = int(psustatus, 16)
if cmdstatus == 0:
if index == 1:
psustatus = psustatus&4
if psustatus == 4 :
return True
if index == 2:
psustatus = psustatus&8
if psustatus == 8 :
return True
return False

def get_psu_presence(self, index):
if index is None:
return False

cmdstatus , psustatus = subprocess.getstatusoutput('i2cget -y 0 0x41 0xa') #need to verify the cpld register logic
psustatus = int(psustatus, 16)
if cmdstatus == 0:
if index == 1:
psustatus = psustatus&1
if psustatus == 1 :
return True
if index == 2:
psustatus = psustatus&2
if psustatus == 2 :
return True
return False

Loading