Thank you for your post and welcome to EmpowHer!
Has your boyfriend been tested?
To be honest, it sounds like his penis may just be irritated. Whether it was caused by rough sex, a scratch, or friction. The penis is a very sensitive area and can be easily irritated. If you have both been tested with negative results I would definitely attribute it to an irritated penis. Perhaps a break from sex and masturbation for your boyfriend will help him heal and resume sex without pain afterward.
Hope this helps.