It is narrated from Hazrat Umm Mubashir (may Allah be pleased with her) that once I visited the Prophet (peace and blessings be upon him) in a garden. The Prophet (peace and blessings be upon him) asked: "Is this yours?" I replied: "Yes!" The Prophet (peace and blessings be upon him) asked: "Have the plants been planted by a Muslim or a disbeliever?" I replied: "By a Muslim." The Prophet (peace and blessings be upon him) said: "Whenever a Muslim plants a plant or sows a crop, and a human, bird, beast, or animal eats from it, it is counted as charity for him."
Hadith Referenceمسند احمد / من مسند القبائل / 27361