There is no code regulation against having your control valve and showerhead on opposite ends. But you do need at least 4 feet of distance between them to help with water pressure and general water flow. But if they are on the same wall, they only need around 30 inches.