There's not a way to disable/enable the proximity sensor.
Have you tried restarting your iPhone? Restart your iPhone, iPad, or iPod touch - Apple Support
Have you tried restoring from a backup? Restore your iPhone, iPad, or iPod touch from a backup - Apple Support
Have you tried restoring to factory settings? Restore your iPhone, iPad, or iPod to factory settings - Apple Support
If you've tried all these things then make an appointment at an Apple Store to have the device tested and they can tell you what your options are.