If it uses the mlx5_core driver/module, it should work.
Try this:
yum -y groupinstall ’ Infiniband Support’
if you want to try using the “in box” driver from CentOS 7.7.
I think that I have ConnectX-4 cards, current running in CentOS 7.7 and my cluster is working just fine.
Please note that the "Infiniband Support’ package group does NOT, default, include OpenSM, so you’ll have to run that separately.
If you need more details/information, when I get home, I can copy-and-paste the commands that I used to get my ConnectX 4 cards up and running on my cluster at home.