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

[Celestica Seastone2] Build correct platform files #9660

Merged
merged 4 commits into from
Jan 16, 2022
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
16 changes: 8 additions & 8 deletions device/celestica/x86_64-cel_seastone_2-r0/plugins/sfputil.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ def get_port_name(self, port_num):
if port_num in self.qsfp_ports:
self._port_name = "QSFP" + str(port_num - self.QSFP_PORT_START + 1)
else:
self._port_name = "SFP" + str(port_num)
self._port_name = "SFP" + str(port_num - self.QSFP_PORT_END)
return self._port_name

# def get_eeprom_dom_raw(self, port_num):
# if port_num in self.qsfp_ports:
# # QSFP DOM EEPROM is also at addr 0x50 and thus also stored in eeprom_ifraw
# return None
# else:
# # Read dom eeprom at addr 0x51
# return self._read_eeprom_devid(port_num, self.DOM_EEPROM_ADDR, 256)
def get_eeprom_dom_raw(self, port_num):
if port_num in self.qsfp_ports:
# QSFP DOM EEPROM is also at addr 0x50 and thus also stored in eeprom_ifraw
return None
else:
# Read dom eeprom as offset 0x100 on optoe eeprom
return self._read_eeprom_devid(port_num, self.DOM_EEPROM_ADDR, 256)

def __init__(self):
# Override port_to_eeprom_mapping for class initialization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,14 @@ def _initialize_interrupts(self):

for index in range(self.num_sfp):
port_num = index + 1
port_name = "QSFP{}".format(port_num)
port_type = "qsfp"
sysfs_prs_file = "{}_modprs".format(port_type)
if port_num <= 32:
port_name = "QSFP{}".format(port_num)
port_type = "qsfp"
sysfs_prs_file = "{}_modprs".format(port_type)
else:
port_name = "SFP{}".format(port_num - 32)
port_type = "sfp"
sysfs_prs_file = "{}_modabs".format(port_type)

sfp_info_obj[index] = {}
sfp_info_obj[index]['intmask_sysfs'] = self.PATH_INTMASK_SYSFS.format(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"port_num": 32,
"port_num": 33,
"eeprom_path": "/sys/bus/i2c/devices/i2c-{0}/{0}-0050/eeprom",
"port_i2c_mapping": [
2,
Expand Down Expand Up @@ -33,12 +33,13 @@
30,
31,
32,
33
33,
34
],
"get_presence": {
"output_source": "sysfs_value",
"sysfs_path": "/sys/devices/platform/switchboard/SFF/{}/qsfp_modprs",
"argument": "$ref:_port_name",
"sysfs_path": "/sys/devices/platform/switchboard/SFF/{}",
"argument": "$ref:_presence_file",
"output_translator": "False if '{}' == '1' else True"
},
"get_lpmode": {
Expand Down Expand Up @@ -101,6 +102,42 @@
"QSFP29",
"QSFP30",
"QSFP31",
"QSFP32"
"QSFP32",
"SFP1"
],
"_presence_file": [
"QSFP1/qsfp_modprs",
"QSFP2/qsfp_modprs",
"QSFP3/qsfp_modprs",
"QSFP4/qsfp_modprs",
"QSFP5/qsfp_modprs",
"QSFP6/qsfp_modprs",
"QSFP7/qsfp_modprs",
"QSFP8/qsfp_modprs",
"QSFP9/qsfp_modprs",
"QSFP10/qsfp_modprs",
"QSFP11/qsfp_modprs",
"QSFP12/qsfp_modprs",
"QSFP13/qsfp_modprs",
"QSFP14/qsfp_modprs",
"QSFP15/qsfp_modprs",
"QSFP16/qsfp_modprs",
"QSFP17/qsfp_modprs",
"QSFP18/qsfp_modprs",
"QSFP19/qsfp_modprs",
"QSFP20/qsfp_modprs",
"QSFP21/qsfp_modprs",
"QSFP22/qsfp_modprs",
"QSFP23/qsfp_modprs",
"QSFP24/qsfp_modprs",
"QSFP25/qsfp_modprs",
"QSFP26/qsfp_modprs",
"QSFP27/qsfp_modprs",
"QSFP28/qsfp_modprs",
"QSFP29/qsfp_modprs",
"QSFP30/qsfp_modprs",
"QSFP31/qsfp_modprs",
"QSFP32/qsfp_modprs",
"SFP1/sfp_modabs"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ override_dh_auto_build:
(for mod in $(MODULE_DIRS); do \
make -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules; \
if [ $$mod = "seastone2" ]; then \
cd services/platform_api; \
cd $(MOD_SRC_DIR)/services/platform_api; \
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
continue; \
fi; \
Expand Down