Diagnosed with bipolar disorder NOS when I was 32 after ten years of work, most of it in big tech. I was clearly acting very strangely at work at the time so there was no hiding something was going on. Spent 10 days in hospital getting diagnosed and medicated. Spent 30 days on leave after. When I returned I asked to be moved into a new role because I felt like the role I had moved to 18 months prior was a bad fit and contributed substantially to stress and that contributed to the manic episode. They didn't have space on my prior team (which was where I wanted to go) so I ended up in an adjacent team, working on things I was less familiar with, still a reasonably good fit.
The first 18 months after returning to work were the most difficult. Medication difficulties, difficulties coping with how I saw myself, how I felt others saw me, the feeling that my career would be slowed down or come to a halt, fear over losing my job and eventually ending up homeless, concerns over reduced life expectancy, etc. Job performance definitely suffered, especially the first 6-12 months. Nobody told me directly I was close to a PIP, but I definitely got the worst review I had ever had for that period ("Needs Improvement" sort of rating overall).
I did talk therapy weekly for ~3-4 years after the initial diagnosis. It helped a lot. If nothing else it made me realize I needed something outside of work that I cared about to help reduce the emotional ups-and-downs that came with work going well versus not (I had been extremely successful before the diagnosis, effectively getting promoted five times in five years).
To your questions: My current manager knows, but that's because I knew him before I was reporting to him and had talked to him about it at some point. My employer knows that I am in some kind of protected class because they sent a generic thing to everyone at the company at some point asking people if they were. As to accommodations, in the role before my current one I felt that I was very distracted in the office due to all the noise, so my direct manager let me work from home more than was "allowed" by upper management. I'm now in a role where that isn't possible, but at the same time I'm in a less noisy environment and feel like I'm dealing with the noise better.
Advice?
If you feel like you're really stable and really good at managing moods, etc., I think you'll probably do just fine. If you're not, work on that. Maintain a very stable sleep schedule, make sure you maintain relationships outside of work and make those a substantial focus, don't get too caught up in work or let your emotions get pulled all over the place based on what's going on at work. Take vacations when you have the time. Don't get too worried about whether your career will move as fast as others. I've had to step back a few times over the years since the diagnosis, and yes I think my career has moved more slowly than it could have, but I've come to terms with that.
Hope that helps. Feel free to ask follow-on questions and I'll try to answer.