I have a few thoughts. If the brand is mentioned in the book in more than a casual way, you might need permission to use it. If you're suggesting you could revise the manuscript to make it more clear that the brand inspired it, then that could be fine.
I'd ask your agent what they think of the idea. First, they have the ability to scope out all of the legal implications of such a partnership. Second, career advice is part of an agent's job. And third, you agent might not like having been left out of the process up front.
All of that said, there are brands that do books, but usually with Licensees. The brand (Cheerios, Legos, Hasbro) licenses a publisher to produce books using their brand, logos, etc. You'd have to make sure the brand you're interested in doesn't have such an agreement with anyone else. Some larger charities have their own publishing arms too, which might work in your favor if they like your book.
Next, if I'm that brand, I want a percent of profits for the use of my name and logo or up front payment, not just the dubious prospect of publicity. After all, you can't guarantee the book will sell, much less sell well.
Things to think about. Let us know what your agent says if you ask.