You're correct, the sentence is awkward because of mixing conditional and non-conditional modes. It's not "wrong" however. We'd probably not think it sounded strange and understand it to mean:
When he had time, he always called in to see us.
which is the natural way of saying "in the past, whenever he had the time to do so, he did actually call in to see us." This refers to multiple occasions, and the subject did actually "call in" - more than once. We could instead say:
If he had time, he would have called in to see us.
which means in some unspecified time frame in the past, he did not "call in" but would have if he had the time to do so.
If there was just a single instance that he "called in", you could say either of:
When he had the time, he called in to see us.
He had the time to call in once.
The first one could mean he "called in" a single time, or many times. The second one explicitly states that it was just one time.