This problem is complex to solve that you need to check all the pads of charging connector.Charger gives the voltage but circuit don`t accept the voltage.
Possible solution.
1- Check the charging pin for band and loose connection.
2-Check the resistor open on the connector line.
3 -Check the I2C line.
4 - Trister reverse gate track.
5 - M5500 might be faulty remember M5500 has AP EEPROM inveld there.