Homogeneous fluxes, branes and a maximally supersymmetric solution of M-theory