I've been having this problem. Sprint note 5. 4 computers wouldn't recognise the phone. Tried multiple charging blocks, all fast charging, multiple fast charging cables. The phone also wouldn't fast charge, and the cell signal was bad. Even though Hubby has the same phone on the same network. I also cleared the cashe, multiple restarts, "pulled the battery", and factory reset 3 times, once being in the recovery mode. I took it to Sprint, they changed the charging port, the battery, the touch screen/digitizer. Still same problem. They have decided that the motherboard is bad and my replacement should be here in a few days. Sometimes, you just need to bite the bullet and bring it in to be serviced.
Posted via the Android Central App