I think you are referring to a tweet on March 16th where he said "Btw, the proceeds of any legal victory in the OpenAI case will be donated to charity. I will in no way enrich myself." Not during the trial, not a donation to OpenAI's charity, and obviously not meaningful given his track record of not following through on public statements.
It was official, he amended the lawsuit to codify it, read it for yourself: https://cdn.arstechnica.net/wp-content/uploads/2026/04/Musk-...