Actually, the first reference to Mordred is as "Medraut" in the Annales Cambriae: it mentions the Battle of Camlynn, and simply states, "where Arthur and Medraut died". No clue about who he was, or whether they were enemies or on the same side.
This is exactly why I said, "Depending on what period you are taking your Arthur myth from..."
That is the oldest surviving mention of Mordred, which is *not* the same as the first. It is merely the first we know of. It is known that the writers of the Annales were working from other sources. Much of the story is apt to have been carried from before the Annales to after in oral tradition, or in other documents that are now lost to us. The Annales probably makes no description because, by that time, it actually was a "everyone knows what happened" kind of thing, and the authors didn't feel any need to explicate the details.
To my knowledge, there is no version of the story from the older periods that have Mordred and Arthur as anything other than antagonists. Having Mordred be Arthur's son may be a more recent alteration to the story, but they weren't ever friends.