We have some notes in the docs about dealing with a 4k resolution, but the canonical source is always the Raspberry Pi docs at https://www.raspberrypi.com/documentation/computers/configuration.html#hdmi-configuration.

EDIT: I'll add some notes about the 2nd port and a link to the video mode table listing.