Realtek switch/PHY drivers are partially available in the Linux kernel. You can find in these public sources:
However, navigating Realtek’s ecosystem to find the correct SDK can be surprisingly difficult. Unlike consumer software, these development kits are often hidden behind partner portals, encrypted within driver packages, or scattered across obscure FTP servers.
For Ethernet PHYs, Gigabit switches, and PCIe NICs: