Maternity leave?

Azia

When do should i begin to discuss maternity leave with HR ? When exactly should I tell HR about my pregnancy?