There might be a problem with your USB port and wire. Otherwise, check if the USB restriction mode is turned on from your Settings app.