The lingual n. is a branch of CN V3 and provides somatic sensory innervation to the anterior 2/3 of the tongue.
The chorda tympani n. (a branch of CN VII) joins the lingual n. and carries pre-ganglionic parasympathetic fibers which synapse in the submandibular ganglion, then the post-synaptic fibers travel to innervate the submandibular and lingual glands.