What are the ehkamat of funeral prayers of new born baby. (in both if birth of dead baby and if died after some time e.g. in a week or month)

Ruling 546. A miscarried child of four months or more must be given ghusl. In fact, based on obligatory precaution, even a miscarried child of less than four months whose body formation is complete must be given ghusl. In cases other than these two, based on obligatory precaution, one must wrap the child in cloth and bury it without giving it ghusl
Ruling 538. It is obligatory to give a corpse three ghusls in the following order:

1. a ghusl with water that has been mixed with lote tree (sidr) leaves;
2. a ghusl with water that has been mixed with camphor (kāfūr);
3. a ghusl with ordinary water