def __init__(self): log = Logger(__name__) self.logger = log.getLogger() self.i2c_mux = I2CMux() self.sysfs_util = SysfsUtility() self.brd_id_util = BrdIDUtility() self.board_id = self.brd_id_util.get_board_id()
def __init__(self): log = Logger(__name__) self.logger = log.getLogger() self.ioexp = IOExpander() self.ipmitool = IPMITool() self.brd_id_util = BrdIDUtility() self.board_id = self.brd_id_util.get_board_id()
def __init__(self, name, value, unit, status): log = Logger(__name__) self.logger = log.getLogger() self.name = name self.value = value self.unit = unit self.status = status
def __init__(self): log = Logger(__name__) self.logger = log.getLogger() self.i2c = I2C() self.lpc = LPC() self.sysfs_util = SysfsUtility() self.brd_id_util = BrdIDUtility() # init i2c devices for CPLD self.i2c_dev = [] for i in range(CPLDConst.CPLD_MAX): self.i2c_dev.append( I2C_Dev(self.CPLD_I2C_BUS, self.CPLD_I2C_ADDR[i]))
def __init__(self): log = Logger(__name__) self.logger = log.getLogger() self.ioexp = IOExpander() self.cpld = CPLD() self.lpc = LPC() self.ioexp = IOExpander() #GPIO REGs self.ALERT_GPIO_REG = 0x1 #I2C Alert REGs self.ALERT_STATUS_REG = 0x0 self.ALERT_DIS_REG = 0x11
def __init__(self): try: log = Logger(__name__) self.logger = log.getLogger() # I2C drivers self._load_i2c_drivers() #Check Mux Ctrl self.lpc = LPC() self._check_i2c_mux_ctrl() self.ioexp = IOExpander() self.i2c_mux = I2CMux() self.eeprom = EEPRom() self.cpld = CPLD() self.thermal = Thermal() self.rov_util = ROVUtility() self.intr_util = INTRUtility() self.bsp_util = BSPUtility() except Exception: raise
def __init__(self): log = Logger(__name__) self.logger = log.getLogger() self.sysfs_util = SysfsUtility()
def __init__(self): log = Logger(__name__) self.logger = log.getLogger() self.cpld = CPLD() self.rov_controller = ROVController()
def __init__(self): log = Logger(__name__) self.logger = log.getLogger()
def __init__(self): log = Logger(__name__) self.logger = log.getLogger() self.ipmitool = IPMITool()
def __init__(self): log = Logger(__name__) self.logger = log.getLogger() self.lpcAddr = self.BASE_ADDR[LPCDevType.CPLD_ON_CPU_BOARD]
def __init__(self): log = Logger(__name__) self.logger = log.getLogger() self.ioexp = IOExpander()
def __init__(self): log = Logger(__name__) self.logger = log.getLogger() self.thermal = Thermal()
def __init__(self): log = Logger(__name__) self.logger = log.getLogger() self.sysfs_util = SysfsUtility() self.brd_id_util = BrdIDUtility() #Global Mux Alias board_id = self.brd_id_util.get_board_id() if board_id == BID.NCP1_1_PROTO: self.MUXs = { # MUX PCA9548 ROOT Gearbox "9548_ROOT_GB": PCA9548("ROOT_GB", self.I2C_ADDR_9548_ROOT_GB, self.BUS_I801, [i for i in range(1, 9)]), # MUX PCA9548 ROOT QSFP, QSFPDD "9548_ROOT_QSFP": PCA9548("ROOT_QSFP", self.I2C_ADDR_9548_ROOT_QSFP, self.BUS_I801, [i for i in range(9, 17)]), # MUX PCA9548#2 SFP, CPLD, etc "9548_ROOT_SFP_CPLD": PCA9548("ROOT_SFP_CPLD", self.I2C_ADDR_9548_ROOT_SFP_CPLD, self.BUS_I801, [i for i in range(17, 25)]), # MUX PCA9548#3 Gearbox #1-#8 "9548_CHILD_GB0": PCA9548("CHILD_GB0", self.I2C_ADDR_9548_CHILD_GB, 7, [i for i in range(25, 33)]), # MUX PCA9548 Gearbox #9-#10 "9548_CHILD_GB1": PCA9548("CHILD_GB1", self.I2C_ADDR_9548_CHILD_GB, 8, [i for i in range(33, 41)]), # MUX PCA9548 QSFP 0-7 "9548_CHILD_QSFP0": PCA9548("CHILD_QSFP0", self.I2C_ADDR_9548_CHILD_QSFP, 9, [i for i in range(41, 49)]), # MUX PCA9548 QSFP 8-15 "9548_CHILD_QSFP1": PCA9548("CHILD_QSFP1", self.I2C_ADDR_9548_CHILD_QSFP, 10, [i for i in range(49, 57)]), # MUX PCA9548 QSFP 16-23 "9548_CHILD_QSFP2": PCA9548("CHILD_QSFP2", self.I2C_ADDR_9548_CHILD_QSFP, 11, [i for i in range(57, 65)]), # MUX PCA9548 QSFP 24-31 "9548_CHILD_QSFP3": PCA9548("CHILD_QSFP3", self.I2C_ADDR_9548_CHILD_QSFP, 12, [i for i in range(65, 73)]), # MUX PCA9548 QSFP 32-39 "9548_CHILD_QSFP4": PCA9548("CHILD_QSFP4", self.I2C_ADDR_9548_CHILD_QSFP, 13, [i for i in range(73, 81)]), # MUX PCA9548 QSFPDD 4-7 & DD Board "9548_CHILD_QSFPDD0": PCA9548("CHILD_QSFPDD0", self.I2C_ADDR_9548_CHILD_QSFPDD, 15, [i for i in range(81, 89)]), # MUX PCA9548 QSFPDD 0-3 "9548_CHILD_QSFPDDBOARD": PCA9548("CHILD_QSFPDDBOARD", self.I2C_ADDR_9548_CHILD_QSFPDDBOARD, 81, [i for i in range(89, 97)]), # MUX PCA9548 QSFPDD 8-12 "9548_CHILD_QSFPDD1": PCA9548("CHILD_QSFPDD1", self.I2C_ADDR_9548_CHILD_QSFPDD, 16, [i for i in range(97, 105)]), } self.MUX_ORDER = [ "9548_ROOT_GB", "9548_ROOT_QSFP", "9548_ROOT_SFP_CPLD", "9548_CHILD_GB0", "9548_CHILD_GB1", "9548_CHILD_QSFP0", "9548_CHILD_QSFP1", "9548_CHILD_QSFP2", "9548_CHILD_QSFP3", "9548_CHILD_QSFP4", "9548_CHILD_QSFPDD0", "9548_CHILD_QSFPDDBOARD", "9548_CHILD_QSFPDD1" ] elif (board_id & BID.BUILD_REV_MASK) >= BID.NCP1_1_ALPHA: self.MUXs = { # MUX PCA9548 ROOT Gearbox "9548_ROOT_GB": PCA9548("ROOT_GB", self.I2C_ADDR_9548_ROOT_GB, self.BUS_I801, [i for i in range(1, 9)]), # MUX PCA9548 ROOT QSFP, QSFPDD "9548_ROOT_QSFP": PCA9548("ROOT_QSFP", self.I2C_ADDR_9548_ROOT_QSFP, self.BUS_I801, [i for i in range(9, 17)]), # MUX PCA9548#2 SFP, CPLD, etc "9548_ROOT_SFP_CPLD": PCA9548("ROOT_SFP_CPLD", self.I2C_ADDR_9548_ROOT_SFP_CPLD, self.BUS_I801, [i for i in range(17, 25)]), # MUX PCA9548 QSFP 0-7 "9548_CHILD_QSFP0": PCA9548("CHILD_QSFP0", self.I2C_ADDR_9548_CHILD_QSFP, 9, [i for i in range(25, 33)]), # MUX PCA9548 QSFP 8-15 "9548_CHILD_QSFP1": PCA9548("CHILD_QSFP1", self.I2C_ADDR_9548_CHILD_QSFP, 10, [i for i in range(33, 41)]), # MUX PCA9548 QSFP 16-23 "9548_CHILD_QSFP2": PCA9548("CHILD_QSFP2", self.I2C_ADDR_9548_CHILD_QSFP, 11, [i for i in range(41, 49)]), # MUX PCA9548 QSFP 24-31 "9548_CHILD_QSFP3": PCA9548("CHILD_QSFP3", self.I2C_ADDR_9548_CHILD_QSFP, 12, [i for i in range(49, 57)]), # MUX PCA9548 QSFP 32-39 "9548_CHILD_QSFP4": PCA9548("CHILD_QSFP4", self.I2C_ADDR_9548_CHILD_QSFP, 13, [i for i in range(57, 65)]), # MUX PCA9548 QSFPDD 4-7 & DD Board "9548_CHILD_QSFPDD0": PCA9548("CHILD_QSFPDD0", self.I2C_ADDR_9548_CHILD_QSFPDD, 15, [i for i in range(65, 73)]), # MUX PCA9548 QSFPDD 8-12 "9548_CHILD_QSFPDD1": PCA9548("CHILD_QSFPDD1", self.I2C_ADDR_9548_CHILD_QSFPDD, 16, [i for i in range(73, 81)]), } self.MUX_ORDER = [ "9548_ROOT_GB", "9548_ROOT_QSFP", "9548_ROOT_SFP_CPLD", "9548_CHILD_QSFP0", "9548_CHILD_QSFP1", "9548_CHILD_QSFP2", "9548_CHILD_QSFP3", "9548_CHILD_QSFP4", "9548_CHILD_QSFPDD0", "9548_CHILD_QSFPDD1" ] else: self.logger.error("[I2C Mux] Invalid Board ID:" + str(board_id)) sys.exit("[I2C Mux] Invalid Board ID:" + str(board_id))