Using grants to make donations to institutions for using their resources/products? In my academic area I constantly use free software/products such as Linux, Python, SageMath, Octave, Wikipedia, etc. 

I know that one can include software costs such as Matlab, Mathematica, Maple, Adobe stuff, Mac software, etc. But for free software/products I have not heard of anyone doing that. It feels wrong that if I use Matlab/Mathematica/Macs in my research, I can get public funding to pay MathWorks/wolfram/Apple thousands of dollars, but if I use Octave/SageMath/Linux they do not receive anything. 

In other academic areas something similar can happen. I assume the same happens with "open" databases that operate with donations vs private databases that mostly operate as for-profit. Other examples could be Wikipedia, OEIS, LibreOffice, Gimp, etc.

I think that since a lot of research depends on that free software/product, they should receive funding (at least if you heavily use it). I know they receive funding elsewhere, but it is minimal compared to the money proprietary-software companies get (a lot from grants, by the way).

Do you know of cases where donations costs were included in grants?
Do you think it is the ethical thing to do?
It is ethical to pay the price you are asked to pay; I'm not sure if it's ethical to get a funding agency to pay more than the advertised price, and your example could be understood as suggesting precisely that, even if the cause is good.  I've never heard of an agency allocating funds for donations (imagine the potential for corruption!)

I personally feel there is nothing unethical about using a free product.  Academics have many occasions to give back to the community without formal compensation: refereeing papers, editing a journal, reading theses, sitting on grant selection committee, organizing or participating in outreach activities etc. It's all part of the broader duties that come with job, and for those who care to keep score I found in the longer term that service roughly evens out: you contribute for free roughly the same you get back for free.