Tun and dun certainly get mixed up and interchanged as place names evolve and spelling right up to the 19th century was very inconsistent
Old English (Anglo-Saxon) "dun" means a hill and is the same word as modern "down" (as in downs not down as opposed to up) Sometimes dun is spelled as "don" and also as "den" which is unfortunate because that means a valley!
Old English "tun" is the commonest of all English place-name elements and mostly appears as "ton". Eventually it became town. Variously it can mean an enclosure, farmstead, village or manor
None of that explains Orkney's Grimeston though. We would need to see its earliest recorded form - it could be quite different and have been Anglicised fairly recently