  We investigate the electronic structures of iron-based superconductors having
perovskite-like blocking layers, %Ca$_4$Al$_2$O$_6$Fe$_2$(As$_{1-x}$P$_x$)$_2$
from first principles. Ca$_4$Al$_2$O$_6$Fe$_2$P$_2$ and
Ca$_4$Al$_2$O$_6$Fe$_2$As$_2$ from first principles.
Ca$_4$Al$_2$O$_6$Fe$_2$P$_2$ is found to have two hole-like Fermi surfaces
around $\Gamma$, and one hole-like Fermi surface around M in the unfolded
Brillouin zone. This is in contrast with LaFePO, where no Fermi surface is
found around M. The relationship of their band structures and measured
transition temperatures of superconductivity is discussed. The number of Fermi
surfaces in Ca$_4$Al$_2$O$_6$Fe$_2$P$_2$ is also different from that of
Ca$_4$Al$_2$O$_6$Fe$_2$As$_2$, in which only one Fermi surface is formed around
$\Gamma$. Analysis using maximally localized Wannier functions clarifies that
the differences between their band structures originate mainly from the
pnictogen height. We then analyze the alloying effect on the electronic
structure of Ca$_4$Al$_2$O$_6$Fe$_2$AsP. It is found that its electronic
structure is similar to that of Ca$_4$Al$_2$O$_6$Fe$_2$P$_2$ and
Ca$_4$Al$_2$O$_6$Fe$_2$As$_2$ with the average crystal structure, though
Ca$_4$Al$_2$O$_6$Fe$_2$AsP contains the pnictogen height disorder. We calculate
the generalized susceptibility for Ca$_4$Al$_2$O$_6$Fe$_2$(As$_{1-x}$P$_x$)$_2$
and clarify the factors determining its tendency.
