]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: pcs: rtl930x: break up fiber config sequences
authorJonas Jelonek <jelonek.jonas@gmail.com>
Tue, 17 Mar 2026 22:23:08 +0000 (22:23 +0000)
committerRobert Marko <robimarko@gmail.com>
Thu, 26 Mar 2026 09:53:46 +0000 (10:53 +0100)
commit40fa81433b78cb70d81a079fe77458fe80a00569
tree2e24f51bcd37228f7cd9b50eff1ad419f6625f3a
parentbab2bcd9d8b2d9cb8d38317dd70872b68bbdcb5e
realtek: pcs: rtl930x: break up fiber config sequences

The patch/config sequences we took over from the SDK are partially
redundant, i.e. they share common parts which can be separated per
speed. For example, the config for 10GR contains the one for 2500Base-X
but we have a dedicated one for 2500Base-X. This is a first step to
modularize and reverse-engineer those sequences, and decrease the size
they claim.

The sequences are nearly exclusive ordered by ascending pages. This
suggests that those register/writes do not have a hidden function of
performing inline resets but rather are just configuration values.
Likely, they may be applied in rather arbitrary order. Splitting up the
sequences here assumes this is true and does some minor order changes.
Testing shows no behavioral change. Looking at [1] there are no relevant
reset or trigger bits affected by that. Suspiciously ordered writes have
mostly been kept though.

USXGMII setup needs to be adjusted too due to shared sequence parts.

[1] https://github.com/plappermaul/realtek-doc/blob/82af3a36b7f65dbe2158fef3a9b71e7aab94315e/sources/rtk-dms1250/include/hal/phy/rtl8295_reg_def.h

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