g3: configure offmode charging

* mercilessly kanged from oppo

Change-Id: I3e9756f298ae5cffa7b7710cec86ada49ce5e204