We introduce and solve a two-band model of spinless fermions with $p_x$-wave pairing on a square lattice. The model reduces to the well-known extended Harper-Hofstadter model with half-flux quanta per plaquette and weakly coupled Kitaev chains in two respective limits. We show that its phase diagram contains a topologically nontrivial weak pairing phase as well as a trivial strong pairing phase as the ratio of the pairing amplitude and hopping is tuned. Introducing periodic driving to the model, we observe a cascade of Floquet phases with well defined quasienergy gaps and featuring chiral Majorana edge modes at the zero- or $pi$-gap, or both. Dynamical topological invariants are obtained to characterize each phase and to explain the emergence of edge modes in the anomalous phase where all the quasienergy bands have zero Chern number. Analytical solution is achieved by exploiting a generalized mirror symmetry of the model, so that the effective Hamiltonian is decomposed into that of spin-$1/2$ in magnetic field, and the loop unitary operator becomes spin rotations. We further show the dynamical invariants manifest as the Hopf linking numbers.