Reconfigurable and robust topological edge states in photonic crystals