EA has released a new briefing for its anticipated upcoming shooter Battlefield 2042, wherein it touched on the crossplay capabilities of the title. It has been confirmed that the game will feature crossplay between PC, PS5, and Xbox Series consoles, and likewise crossplay between PS4 and Xbox One, but the catch, as you might notice, is that former and current generation consoles cannot play together.
The crossplay details do also reveal that PC and console players can opt-out of crossplay with each other, as the difference between mouse and keyboard and controller can become quite noticeable.
The game will feature cross-progression, so you can play on the PS5 and then jump onto an Xbox One version of the game and continue where you left off (the post even mentioned that purchases made will be carried over as well), if that's something you're interested in, but you will not be able to play with friends on different generation consoles.