The phosphorylation by a protein of one or more of its own histidine residues, or a histidine residue on an identical protein.