A Josephson phase battery