Note that some texts indicate that L4 also innervates tibialis posterior and some texts indicate that S2 also innervates the flexor digitorum and hallucis muscles.
Tibialis posterior provides foot inversion.
Flexor digitorum longus flexes the toes (except the great toe).