mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-14 02:19:06 +04:00
Commitc8c187f0f0("realtek: add support for RTL8218E") added the PHY identifier and reused the generic RTL821x callbacks. This is enough when the bootloader has already configured the package, but it leaves the MAC-side SerDes uninitialized without that setup. As a result, the XSGMII link is not established after a cold boot and/or without any pre-established PHY setup. Add package-level initialization on the base PHY address and gate it on the strapped XSGMII mode. Apply the minimal required subset of the vendor configuration, reset the active SerDes block, and force XSGMII mode by disabling SerDes autonegotiation. QSGMII remains unsupported. This completes RTL8218E support without relying on bootloader PHY setup while avoiding the large, mostly unnecessary vendor register table. This minimal sequence has been established through various testing iterations on two devices. Fixes:c8c187f0f0("realtek: add support for RTL8218E") Assisted-by: ChatGPT (OpenAI GPT-5.6 Sol) Link: https://github.com/openwrt/openwrt/pull/25255 Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>