"penis," 1891, slang, of unknown origin. Perhaps suggested by dingus and other names for unnameable things; perhaps suggesting of a sound of striking (clapper of a bell?); perhaps there's an element of donkey in it.
"to sound a large bell," 1580s, imitative. Related: Donged; donging.