It is narrated from Sayyiduna Jabir bin Abdullah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Any Muslim who plants (a tree), then whatever is eaten from it, whatever is stolen from it, and whatever birds and beasts eat from it, all of it is a charity (for him)."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب المزارعة / 11749