]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: pcs: add XSG write operations 21592/head
authorJonas Jelonek <jelonek.jonas@gmail.com>
Fri, 16 Jan 2026 09:32:52 +0000 (09:32 +0000)
committerRobert Marko <robimarko@gmail.com>
Wed, 28 Jan 2026 20:10:42 +0000 (21:10 +0100)
commit6879c8ea535a00aa6ad8530878094bf58bc8f65b
treed2f23d7705fc35d4a477b35a0db335bbec06f144
parent0a1e1016b4d82dabedcb231dc4fd7fb65ba16736
realtek: pcs: add XSG write operations

There is some special logic used for certain writes to digital pages for
RTL93xx SerDes, especially when configuring the XSGMII mode. For
RTL930x this applies to SerDes 2 and 3, for RTL93xx to more. In this case,
a dual-read/write to SDS and SDS + 1 is done. While the corresponding
mapping from front to back SDS for RTL931x is currently covered in the
SerDes MDIO driver, it isn't for RTL930x.

To cover these special cases and provide a clear interface on that,
introduce an XSG write SerDes operation. All these dual-read/write cases
can be expressed with such an XSG operation whose internal semantics are
defined for each switchcore family.

This could be done just with plain dual read/write calls however this
isn't a clean approach and may be confusing while comparing our
functionality with the SDK, especially for RTL930x.

In practice, if this isn't handled correctly, only half of the ports of an
XSGMII-connected RTL8218D do work because some required values aren't
applied for the background SerDes 3.

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