Hello @yipingwang,
I will provide you something better: the solution.
I have found the issue regarding the SGMII. The RCW configuration SRDS_REFCLK_SEL, which must be '1', was not set in our custom board file. Also, I have changed the Fixed PHY driver to allow the PFE to use a fixed speed and duplex even without the DTS (as you advise in the previous reply).
I also changed the pfe_set_mdio function in the eth.c of our board to consider the MDIO name of each GEMAC port:
pfe_set_mdio(priv->gemac_port,
miiphy_get_dev_by_name(mac_mdio_info.name));
That avoids the MDIO reconfiguration I sent you in the previous replies. Therefore, I have both SGMII and RGMII working properly now. Just emphasizing that the auto-negotiation was disabled in both devices: the LS1012A processor and the KSZ9477S switch.

Now everything is alive. Thank you very much for your support!
I will mark this reply as a solution.
Best regards,
Igor