とき is a conjunction meaning “when,” so
both means “when you go home, please ring me.”
The grammar difference is
うちにかえるときでんわしてね has かえる (non-past plain verb) before とき and
うちにかえったときでんわしてね has かえった (past plain verb) before とき.
When a “non-past plain” verb is used before とき, that means the action of that verb has not been completed when the action of the verb after とき happens. In short, うちにかえるときでんわしてね means “Please ring me when you are coming home” or “Please ring me when you are on the way home.” So it is likely someone at home is asking her to ring.
On the other hand, when a “past plain” verb is used before とき, the action of that verb has to be completed when the second action happens. So うちにかえったときでんわしてね means “When you are back home, please ring me” or “After you get home, please ring me.” So it is likely someone who is not home is asking her to ring.
I bought it when I was going to Japan.
I bought it when I went to Japan. (Most likely “when I was still in Japan.”)
When I was getting off the train, I saw Hanako (on the train).
When I got off the train, I saw Hanako (in a station).