diff --git a/sonic_platform_base/sonic_xcvr/api/public/cmis.py b/sonic_platform_base/sonic_xcvr/api/public/cmis.py index a550b22..621b557 100644 --- a/sonic_platform_base/sonic_xcvr/api/public/cmis.py +++ b/sonic_platform_base/sonic_xcvr/api/public/cmis.py @@ -779,6 +779,14 @@ def get_module_pwr_down_duration(self): duration = self.xcvr_eeprom.read(consts.MODULE_PWRDN_DURATION) return float(duration) if duration is not None else 0 + def is_tx_tunable(self): + ''' + Returns True if transmitter is tunable(Page04h and 12h supported) + ''' + if self.is_flat_memory(): + return False + return self.xcvr_eeprom.read(consts.TX_TUNABLE_SUPPORT_FIELD) + def get_host_lane_count(self): ''' This function returns number of host lanes for default application diff --git a/sonic_platform_base/sonic_xcvr/fields/consts.py b/sonic_platform_base/sonic_xcvr/fields/consts.py index 68ff4b2..c5573dc 100644 --- a/sonic_platform_base/sonic_xcvr/fields/consts.py +++ b/sonic_platform_base/sonic_xcvr/fields/consts.py @@ -55,6 +55,7 @@ TX_FAULT_SUPPORT_FIELD = "TxFaultSupported" TX_DISABLE_FIELD = "TxDisable" TX_DISABLE_SUPPORT_FIELD = "TxDisableSupported" +TX_TUNABLE_SUPPORT_FIELD = "TxTunableSupported" TX_POWER_FIELD = "TxPower" TX_POWER_SUPPORT_FIELD = "TxPowerSupported" diff --git a/sonic_platform_base/sonic_xcvr/mem_maps/public/cmis.py b/sonic_platform_base/sonic_xcvr/mem_maps/public/cmis.py index 8702e76..b6bb219 100644 --- a/sonic_platform_base/sonic_xcvr/mem_maps/public/cmis.py +++ b/sonic_platform_base/sonic_xcvr/mem_maps/public/cmis.py @@ -213,6 +213,7 @@ def __init__(self, codes): ), NumberRegField(consts.CTRLS_ADVT_FIELD, self.getaddr(0x1, 155), RegBitField(consts.TX_DISABLE_SUPPORT_FIELD, 1), + RegBitField(consts.TX_TUNABLE_SUPPORT_FIELD, 6), size=2, format="