sonic-buildimage/device/nokia/armhf-nokia_ixs7215_52x-r0/plugins/eeprom.py
carl-nokia 0a9d7a2145
[devices]: Add support for the Nokia-7215 platform (#5827)
Platform: armhf-nokia_ixs7215_52x-r0
HwSKU: Nokia-7215
ASIC: marvell
Port Config: 48x1G + 4x10G

Co-authored-by: dflynn <dennis.flynn@nokia.com>
Co-authored-by: Carl Keene <keene@nokia.com>
2020-11-18 17:00:40 -08:00

15 lines
523 B
Python

try:
import os
from sonic_eeprom import eeprom_tlvinfo
except ImportError as 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-0053/eeprom"
if not os.path.exists(self.eeprom_path):
os.system("echo 24c02 0x53 > /sys/class/i2c-adapter/i2c-0/new_device")
super(board, self).__init__(self.eeprom_path, 0, '', True)