]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: pcs: rtl930x: move writes to config
authorJonas Jelonek <jelonek.jonas@gmail.com>
Wed, 18 Mar 2026 22:58:56 +0000 (23:58 +0100)
committerRobert Marko <robimarko@gmail.com>
Thu, 26 Mar 2026 09:53:46 +0000 (10:53 +0100)
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 <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22582
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c

index 186b485e738867be6802b1d616a23de40b2ea99e..4e101c23d5acbd5e5369b5ecf209c93ab33278f2 100644 (file)
@@ -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,