The photon does not expand, his wavelength does. Wavelength of the photon is simply width of one period of the wave. This distance is completly determined by the nature of photon and geometry. The naure of photon doesnt change due to equivalence principle in GR, but the geometry does and so does the wavelength.
To compute the change in the period you would imagine that you started to send wave of period $T_0$ from some event $(t_0,x_0)$. This wave will travel with speed of light to some event $(t_1,x_1)$ where it is recieved. But sending full period of wave is not instanteneous. The transmition of one period would end after a time $T_0$ passed at the event $(t_0+T_0,x_0)$. This will also travel with speed of light until it is recieved at $(t_1+T_1,x_1)$. But because the space is expanding, the space between these two "points of wave" exapnds too and when they come to reciever, they will be further appart that they have been when they were first sent.
Here it is in the detail:
Let us have photon traveling in expanding universe in direction of x-coordinate. Forgetting other spatial coordinates, the metric in expanding universe (FLRW) metric is:
where $a(t)$ is some positive function of time.
The photon moves on null curves, that is:
Now asume that the light signal was send from an event $(t_0,x_0)$ and that the period of the light is $T_0$. That means if the signal was started to be sent in $(t_0,x_0)$, the sending of one period was finished in $(t_0+T_0,x_0)$.
The light travels through space, where observer starts recieving the signal in the event $(t_1,x_1)$. How long it takes for him to stop recieving the signal (which would be one period $T_1$)? The equation for moving photon gives:
from which $T_2$ can be computed. Since the integral tells you the area under a curve $1/a(t)$, this equations is an equation for width of two equal areas at two different points so the $T_0$ and $T_1$ wont be equal in general.