]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: pcs: rtl931x: use generic USXGMII config
authorJonas Jelonek <jelonek.jonas@gmail.com>
Tue, 14 Apr 2026 11:10:38 +0000 (11:10 +0000)
committerRobert Marko <robimarko@gmail.com>
Fri, 17 Apr 2026 10:24:07 +0000 (12:24 +0200)
Since the USXGMII config was made generic before, we can use it now for
the RTL931x setup too. This brings it closer to what the SDK configures
(see _dal_mango_construct_init_usxgmii), fixes some deviations in our
previous settings and makes clearer what is actually done.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22939
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c

index 82f59cedae9f9551012eab34567226ee5ecc3e6a..cf49342f0a6faa5f9f5ea1473321e4bf5ca356ad 100644 (file)
@@ -3783,14 +3783,10 @@ static int rtpcs_931x_sds_config_hw_mode(struct rtpcs_serdes *sds,
        case RTPCS_SDS_MODE_USXGMII_5GSXGMII:
        case RTPCS_SDS_MODE_USXGMII_5GDXGMII:
        case RTPCS_SDS_MODE_USXGMII_2_5GSXGMII:
-               u32 op_code = 0x6003;
-
                rtpcs_931x_sds_reset_leq_dfe(sds);
                rtpcs_931x_sds_rx_reset(sds);
 
-               rtpcs_sds_write(sds, 0x7, 0x10, op_code);
-               rtpcs_sds_write(sds, 0x6, 0x1d, 0x0480);
-               rtpcs_sds_write(sds, 0x6, 0xe, 0x0400);
+               rtpcs_93xx_sds_usxgmii_config(sds, 0x03, 0xa4, 0, 1, 0x1);
                break;
 
        case RTPCS_SDS_MODE_QSGMII: