The Messenger of Allah ﷺ said, "No Muslim plants a tree or sows a crop from which a bird, a person, or an animal eats, without it being counted as charity for him."
قال رسول الله ﷺ: ما من مسلم يغرس غرسا أو يزرع زرعا، فيأكل منه طير أو إنسان أو بهيمة إلا كان له به صدقة.
Bukhari narrated it in "Cultivation and Sharecropping" (2320), and Muslim in "Sharecropping" (1553:12), both through the route of Abu Awana, from Qatada, from Anas, who mentioned it.