Myrdhinn is the original Welsh form of Merlin. It is probably ultimately from the name of the Romano-British settlement Moridunum, derived from Celtic mori "sea" and dūnom "rampart, hill fort". Prefixed with Welsh caer "fort."
The town Caerfyrddin (Carmarthen in English) from dates medieval times. It is thought that Caerfyrddin may have mistakenly been interpreted as meaning "fort of Myrddin", as if Myrddin were a personal name instead of a later development of Moridunum.
Myrddin appears in early Welsh poems, as a prophet who lives in the Caledonian Forest after being driven insane witnessing the defeat and death of his king Gwenddoleu and his forces at the Battle of Arfderydd. His character seems to be based on the North Brythonic figure Lailoken, and perhaps also the Irish figure Suibhne. Geoffrey of Monmouth adapted him into Merlin in the 12th century.
~