"brink, edge, margin," c. 1200, brymme "edge (of the sea), bank (of a river)," of obscure origin, perhaps akin to Old Norse barmr "rim, brim," probably related to dialectal German bräme "margin, border, fringe," from PIE *bhrem- "point, spike, edge." Extended by 1520s to the upper or projecting edge of anything hollow (cups, basins, hats).
Old English (and northern Middle English) had brim "sea, surf, pool, spring, river, body of water," of uncertain origin but probably unrelated, perhaps from the Germanic stem *brem- "to roar, rage." "It became obs. in ME.; but was perhaps used by Spenser" [OED].