My name is Nathan, I am by no meens a doctor but I do know something about the way the ear works.
There is a nerve running through a part of the ear called the Vagus nerve, this nerve can and will cause coughing.
If in some way the ear is tickled or the tissue inside the ear near that nerve is damaged it can cause coughing.
I would hope that there is no way his nerve itself is damaged, as I did this when I was a child and it took surgery to fix.
I hope this was helpful. Best of luck!