The phone uses max77804k MFD (Multi Function Device) IC to handle charging, extcon (cable detect), vibrator, flash led. This device is not in mainline, but it is very similar (i.e the same) to max77693 in register layout. In the next paragraph I'll refer to max77804k code as downstream and max77693 code as upstream.
* Charging : downstream charging code is scary. Mainline code only reads info, and doesn't charge, so a brave soul might be able to figure out a minimal setup that does charge the phone.* Extcon : downstream extcon is not too bad, and it is trivial to follow the basic use cases and ensure they are ported correctly. Mainline code is different and writes different values for diffrent use cases, but following a similar structure it can be made to behave.* Flash Leds : these are pretty straight forward, the existing mainline code is a bit weird, but I wrote a port of downstream and it does work for the most part.* Vibrator : the mainline code is for a different kind of vibrator. It shouldn't be too hard to port the downstream code.
==== USB ====