The MGPA electromagnetic calorimeter readout chip for CMS