[VOL-4676]:
Initial Framework for reading SFP capabilities by reading the EEPROM data.
Use the detected SFP data to derive the MAC and PON system mode.
Make the SFP EEPROM read mode configurable per platform through the
DYNAMIC_PON_TRX_SUPPORT '#define' defined in the platform vendor.h file.

Change-Id: I07d7763371d2f804a1e93ca38646b1a30198f8ee
diff --git a/agent/device/asgvolt64/mkdebian/debian/files b/agent/device/asgvolt64/mkdebian/debian/files
index f622278..4a4e596 100644
--- a/agent/device/asgvolt64/mkdebian/debian/files
+++ b/agent/device/asgvolt64/mkdebian/debian/files
@@ -1 +1 @@
-asgvolt64_3.10.2.2+edgecore-V202111090101_amd64.deb misc optional
+asgvolt64_3.10.2.2+edgecore-V202111040101_amd64.deb misc optional
diff --git a/agent/device/asgvolt64/vendor.cc b/agent/device/asgvolt64/vendor.cc
index 86836ff..7e68606 100644
--- a/agent/device/asgvolt64/vendor.cc
+++ b/agent/device/asgvolt64/vendor.cc
@@ -18,4 +18,4 @@
 
 void vendor_init()
 {
-}
+}
\ No newline at end of file
diff --git a/agent/device/asgvolt64/vendor.h b/agent/device/asgvolt64/vendor.h
index 89a4bff..7f49bc5 100644
--- a/agent/device/asgvolt64/vendor.h
+++ b/agent/device/asgvolt64/vendor.h
@@ -16,12 +16,18 @@
 
 #ifndef __VENDOR_H__
 #define __VENDOR_H__
+#include "device.h"
+
 #define VENDOR_ID "EdgeCore"
 #define ASGVOLT64
 #define MODEL_ID  "asgvolt64"
 #define MAX_SUPPORTED_PON 64
 #define ONU_BIT_TRANSMISSION_DELAY 0.8038585/1000 /* unit: ns to us */
 #define MINIMUM_ONU_RESPONSE_RANGING_TIME 198075 /* hardcore: this is ranging time for the shortest distance, typically 35us */
+#define DEFAULT_MAC_SYSTEM_MODE BCMOLT_SYSTEM_MODE_GPON__16_X
+//#define DEFAULT_MAC_SYSTEM_MODE BCMOLT_SYSTEM_MODE_XGS__2_X
+#define DEFAULT_PON_MODE BCMOLT_PON_TYPE_GPON
+// #define DEFAULT_PON_MODE BCMOLT_PON_TYPE_XGPON
 
 // DeviceInfo definitions
 
@@ -44,4 +50,64 @@
 
 #define MAC_DEVICE_ACTIVATION_DELAY 2000000 // in microseconds
 
+///////////////////////////////////////////////////////
+// Constants relevant for decoding PON Trx EEPROM Data
+
+// Uncomment below line when you need dynamic transceiver detection support
+//#define DYNAMIC_PON_TRX_SUPPORT
+
+#define TOTAL_PON_TRX_PORTS 64 // total PON transceiver ports
+#define TOTAL_PON_PORTS 64 // total PON ports (we could have up to 2 PON ports on the OLT MAC mapped to the external PON Trx)
+const int trx_port_to_pon_port_map[TOTAL_PON_TRX_PORTS][TOTAL_PON_PORTS/TOTAL_PON_TRX_PORTS]={{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},
+{11},{12},{13},{14},{15},{16},{17},{18},{19},{20},{21},{22},{23},{24},{25},{26},{27},{28},{29},{30},{31},{32},{33},{34},{35},{36},{37},{38},
+{39},{40},{41},{42},{43},{44},{45},{46},{47},{48},{49},{50},{51},{52},{53},{54},{55},{56},{57},{58},{59},{60},{61},{62},{63}};
+#define PONS_PER_TRX (TOTAL_PON_TRX_PORTS/TOTAL_PON_PORTS) // if there are more than one OLT MAC device,
+                                                           // they all have to be of the same type for this to work.
+
+const int bus_index[TOTAL_PON_TRX_PORTS] = {
+   41,  42,  56,  55,  43,  44,  54,  53,
+   45,  46,  52,  51,  47,  48,  50,  49,
+   57,  58,  72,  71,  59,  60,  70,  69,
+   61,  62,  68,  67,  63,  64,  66,  65,
+   73,  74,  88,  87,  75,  76,  86,  85,
+   77,  78,  84,  83,  79,  80,  82,  81,
+   89,  90, 104, 103,  91,  92, 102, 101,
+   93,  94, 100,  99,  95,  96,  98,  97
+};
+
+// FIXME: Check the correctness of the below constants for this platform
+
+#define PORT_ADDRESS 50
+
+#define NAME_EEPROM "eeprom"
+
+#define EEPROM_VENDOR_NAME_START_IDX 20
+#define EEPROM_VENDOR_NAME_LENGTH 16
+
+#define EEPROM_VENDOR_OUI_START_IDX 37
+#define EEPROM_VENDOR_OUI_LENGTH 3
+
+#define EEPROM_VENDOR_PART_NUMBER_START_IDX 40
+#define EEPROM_VENDOR_PART_NUMBER_LENGTH 16
+
+#define EEPROM_VENDOR_REVISION_START_IDX 56
+#define EEPROM_VENDOR_REVISION_LENGTH 4
+
+#define EEPROM_DOWNSTREAM_WAVELENGTH_START_IDX 60
+#define EEPROM_DOWNSTREAM_WAVELENGTH_LENGTH 2
+#define EEPROM_WAVELENGTH_RESOLUTION 1
+
+// Define valid values below in case of Combo PON Trx is supported
+// #define EEPROM_DOWNSTREAM_SECONDARY_WAVELENGTH_START_IDX 120
+// #define EEPROM_DOWNSTREAM_SECONDARY_WAVELENGTH_LENGTH 2
+
+class PonTrx: public PonTrxBase {
+   public:
+      // override the base member functions if you need a different implementation
+      PonTrx(): PonTrxBase("eeprom", 50, "/sys/bus/i2c/devices/%d-00%d/%s") {
+
+      }
+
+};
+
 #endif