What are the earliest sources (i.e. Chazal or Rishonim) for washing one's hands after visiting a cemetery?
Is this mentioned by the Rambam?
A Geonic responsum (T'shuvos HaGeonim Shaarei Tzedek chelek 3 shaar 4 siman 20) cited by the Ritz Geius (Hil. Avel), the Ramban (Toras Haadam: Shaar Haavel; inyan hahaschala), the Ran (chiddushim to Moed Katan; dinei kvurah: aveilus uminhagim), and the Tur (YD 376) mentions a custom of washing ones hand after returning from a cemetery before entering ones house and says that it is unnecessary but appropriate/permissible if one has the minhag. The Ritz Geius identifies this Gaon as R. Platoi (פלטואי) Gaon.
The Machzor Vitry (280) too rules that it is unnecessary.
Hagahos Ashri (Moed Katan 3:86) quotes the Or Zarua that some mourners wash their hands upon returning from a cemetery and that this is permissible but isn't mandatory.
The Rambam doesn't appear to quote it.