In the initial maternity letter, there is a form attached (Form BSA/M2 v3). You need to complete this form 4 weeks prior to your expected date of return (after discussions with your Line Manager) if you return before the end of your full entitlement to leave. No notification is required if the full entitlement to leave is taken.
The form needs to be either sent to your Line Manager to upload this to the Document Transfer Service (DTS) or your Line Manager can arrange for an Employee Change Form (ECF) to be uploaded to DTS. Alternatively, you can post this directly back to the address stated on the initial maternity letter.