From: Jonas Jelonek Date: Wed, 18 Mar 2026 22:58:56 +0000 (+0100) Subject: realtek: pcs: rtl930x: move writes to config X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c9f5723558ccfc170cc4a263f68dfa5968c2defb;p=thirdparty%2Fopenwrt.git realtek: pcs: rtl930x: move writes to config Move a few register writes from the ANA_10G patch sequences to the configuration function. Those write are targeted at digital pages and do not fully apply for *SGMII modes. To make the ANA_10G sequence really just deal with analog pages and make it usable for *SGMII modes too, move out the digital page writes. Signed-off-by: Jonas Jelonek Link: https://github.com/openwrt/openwrt/pull/22582 Signed-off-by: Robert Marko --- diff --git a/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c b/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c index 186b485e738..4e101c23d5a 100644 --- a/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c +++ b/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c @@ -2760,7 +2760,6 @@ static const struct rtpcs_sds_config rtpcs_930x_sds_cfg_ana_3g_odd[] = { }; static const struct rtpcs_sds_config rtpcs_930x_sds_cfg_ana_10g_even[] = { - {0x06, 0x0D, 0x0F00}, {0x06, 0x00, 0x0000}, {0x06, 0x01, 0xC800}, {0x2E, 0x00, 0xA668}, {0x2E, 0x02, 0xD020}, {0x2E, 0x06, 0xC000}, {0x2E, 0x0B, 0x1892}, {0x2E, 0x0F, 0xFFDF}, {0x2E, 0x11, 0x8280}, {0x2E, 0x12, 0x0044}, {0x2E, 0x13, 0x027F}, {0x2E, 0x14, 0x1311}, {0x2E, 0x17, 0xA100}, {0x2E, 0x1A, 0x0001}, {0x2E, 0x1C, 0x0400}, @@ -2771,7 +2770,6 @@ static const struct rtpcs_sds_config rtpcs_930x_sds_cfg_ana_10g_even[] = { }; static const struct rtpcs_sds_config rtpcs_930x_sds_cfg_ana_10g_odd[] = { - {0x06, 0x0D, 0x0F00}, {0x06, 0x00, 0x0000}, {0x06, 0x01, 0xC800}, {0x2E, 0x00, 0xA668}, {0x2E, 0x02, 0xD020}, {0x2E, 0x06, 0xC000}, {0x2E, 0x0B, 0x1892}, {0x2E, 0x0F, 0xFFDF}, {0x2E, 0x11, 0x8280}, {0x2E, 0x12, 0x0044}, {0x2E, 0x13, 0x027F}, {0x2E, 0x14, 0x1311}, {0x2E, 0x17, 0xA100}, {0x2E, 0x1A, 0x0001}, {0x2E, 0x1C, 0x0400}, @@ -2926,6 +2924,9 @@ static int rtpcs_930x_sds_config_hw_mode(struct rtpcs_serdes *sds, enum rtpcs_sd break; case RTPCS_SDS_MODE_10GBASER: + rtpcs_sds_write(sds, 0x06, 0x0D, 0x0F00); + rtpcs_sds_write(sds, 0x06, 0x00, 0x0000); + rtpcs_sds_write(sds, 0x06, 0x01, 0xC800); /* * TODO: Do the 1G and 3G sequences need to be applied? The SDK usually * uses a 10GR-1000BX automatic mode covering all speeds. But in Linux,