Skip to content

realtek: add support for 10g-qxgmii serdes mode on rtl930x. - #20472

Merged
openwrt-bot merged 3 commits into
openwrt:mainfrom
ddejean:rtk-10g-qxgmii
Oct 26, 2025
Merged

openwrt-bot merged 3 commits into
openwrt:mainfrom
ddejean:rtk-10g-qxgmii

Conversation

@ddejean

@ddejean ddejean commented Oct 20, 2025

Copy link
Copy Markdown
Contributor

On the Zyxel XMG191510E(P) the bootloader does not initialize the network subsystem (ie rtk network init is not available) before booting the kernel. Plus, on this model the two RTL8224 are using the 10g-qxgmii serdes which not supported yet.

This pull request brings 3 change lists:

  • a CL to implement the serdes mapping for the rtl930x, it's almost a 1:1 except for accessing 4 pages of the serdes 3;
  • a CL to introduce the 10g-qxgmii serdes patch sequence, as previously done for 2500basex
  • a CL to add the support for 10g-qxgmii mode everywhere it's required, in particular when setting the serdes mode. The 10g-qxgmii mode is considered by realtek as a submode of USXGMII, it uses almost the same configuration except for a submode register that needs to be set to the correct value.

@jonasjelonek jonasjelonek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Apart from some architectural stuff but let's do refactoring when we have that in the PCS driver.

@jonasjelonek jonasjelonek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took a second look and found some things, marked them below.

Also some general things:

  • please adjust the commit titles to remove the dot at the end
  • probably don't use the uncommon terms CL/changelist, it was quite confusing at first because I've never heard of this. I'd suggest changeset/patchset.
  • The commit realtek: add serdes mapping for rtl930x itself is fine, as discussed in the forum. I'm just wondering, if I'm not mistaken this should have no effect right now. The old functions rtl9300_sds_field_ do not use the mdio-realtek-otto-serdes driver but still rely on the mdio-realtek-otto driver for reading/writing SerDes.

Comment on lines +1432 to +1446
switch(phy_mode) {
case PHY_INTERFACE_MODE_SGMII:
case PHY_INTERFACE_MODE_1000BASEX:
case PHY_INTERFACE_MODE_2500BASEX:
case PHY_INTERFACE_MODE_10GBASER:
rtsds_930x_force_mode(sds, phy_mode);
return;
case PHY_INTERFACE_MODE_10G_QXGMII:
mode = RTL930X_SDS_MODE_USXGMII;
submode = RTL930X_SDS_SUBMODE_USXGMII_QX;
break;
default:
pr_warn("%s: unsupported mode %s\n", __func__, phy_modes(phy_mode));
return;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the USXGMII mode be handled here too with the different submode?

@ddejean ddejean Oct 21, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes you're right, however I excluded USXGMII handling from that serie of patches because of the following (legitimate) comment I receive a few weeks ago from @plappermaul:

Pease drop the USXGMII commit in this series (for now). Why? We currently use USXGMII for convenience in several modes (that also includes the proprietary XSGMII aka 10G SGMII Realtek mode). The XGS1210-12 ports 1-8 are driven in XSGMII but are declared USXGMII.

and I didn't know if this problem is solved. Is it ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that I know of ... at least it's still on my list to work on that proper mode handling as it's still problematic.

After a closer look it seems fine and I just overlooked the fact that rtl9300_serdes_setup isn't called for USXGMII. I was unsure if this may break devices like XGS1250-12. They use USXGMII for both multiple 1G ports running on a single SerDes, and a single 2.5G/10G port running on a single SerDes. That's why we need rtk network on because it sets that up properly and we must not change anything of that.

Solving this is planned in the PCS driver, but there's still work to do before.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we stay on the current state? Or do you still want me to add the USXGMII support?

@jonasjelonek jonasjelonek Oct 21, 2025 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the confusion, keep the current state. This shouldn't harm any devices using USXGMII right now, and let's fix this issue in the PCS driver when everything is over there.

If it works for your device, then it's good.

Comment on lines +1455 to +1457
if (phy_mode == PHY_INTERFACE_MODE_10G_QXGMII) {
rtsds_930x_submode_set(sds, submode);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If so, setting the single-port 10G submode for USXGMII should go here then.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

solved, see discussion above

phydev->interface = PHY_INTERFACE_MODE_10GBASER;
} else if (mode == RTL930X_SDS_MODE_USXGMII) {
phydev->speed = SPEED_10000;
if (submode == 0x2) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (submode == 0x2) {
if (submode == RTL930X_SDS_SUBMODE_USXGMII_QX) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solved by next push :)

@github-actions github-actions Bot added the target/realtek pull request/issue for realtek target label Oct 21, 2025
@Djfe

Djfe commented Oct 24, 2025

Copy link
Copy Markdown
Contributor

@robimarko feel free to take a look :)

@jonasjelonek

Copy link
Copy Markdown
Member

@robimarko @hauke sorry for being impatient. If there aren't any objections from your side, it would be great to have this merged. Then I can continue with my SerDes -> PCS transition and @ddejean can continue bringing in support for a new device.

Thanks in advance :)

On the RTL930x series the serdes openwrt#3 is backed by serdes openwrt#10 when pages
0, 1, 2 or 3 are accessed [1]. This changeset modifies the sds mapping
function from a single implementation for the 3 families to one
implementation per chip family. In particular it implements the mapping
required for the rtl930x one.

[1] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_sds.c#L624

Signed-off-by: Damien Dejean <[email protected]>
Link: openwrt#20472
Signed-off-by: Robert Marko <[email protected]>
Adds the serdes patch sequence [1] and configuration [2] for the
PHY_INTERFACE_MODE_10G_QXGMII mode (aka USXGMII_QX in Realtek sources).
It is required by devices with light bootloaders (ie not u-boot) that
does not initialize the hardware before booting the kernel.

[1] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L1075
[2] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L1315

Signed-off-by: Damien Dejean <[email protected]>
Link: openwrt#20472
Signed-off-by: Robert Marko <[email protected]>
In Realtek implementation USXGMII is divided in submodes:
 - USXGMII_SX: 10G single link, equivalent of PHY_INTERFACE_MODE_USXGMII
 - USXGMII_DX: 10G two links (2*5G ?),
 - USXGMII_QX: 10G four links, presumably 4*2.5G, used with the RTL8224,
   equivalent of PHY_INTERFACE_MODE_10G_QXGMII.

This CL adds the 10_GQXGMII modes to the RTL930x implementation. In
particular the "mode set" function is extended to support both simple
mode set, and force mode set depending on the mode according to
dal_longan_sds_mode_set [1].

[1] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_sds.c#L1746

Signed-off-by: Damien Dejean <[email protected]>
Link: openwrt#20472
Signed-off-by: Robert Marko <[email protected]>
@openwrt-bot
openwrt-bot merged commit ddd82c8 into openwrt:main Oct 26, 2025
@robimarko

Copy link
Copy Markdown
Contributor

Thanks! Rebased on top of main and merged!

@jonasjelonek

Copy link
Copy Markdown
Member

Thanks!

simsasss pushed a commit to simsasss/openwrt that referenced this pull request Oct 26, 2025
On the RTL930x series the serdes openwrt#3 is backed by serdes openwrt#10 when pages
0, 1, 2 or 3 are accessed [1]. This changeset modifies the sds mapping
function from a single implementation for the 3 families to one
implementation per chip family. In particular it implements the mapping
required for the rtl930x one.

[1] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_sds.c#L624

Signed-off-by: Damien Dejean <[email protected]>
Link: openwrt#20472
Signed-off-by: Robert Marko <[email protected]>
simsasss pushed a commit to simsasss/openwrt that referenced this pull request Oct 26, 2025
Adds the serdes patch sequence [1] and configuration [2] for the
PHY_INTERFACE_MODE_10G_QXGMII mode (aka USXGMII_QX in Realtek sources).
It is required by devices with light bootloaders (ie not u-boot) that
does not initialize the hardware before booting the kernel.

[1] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L1075
[2] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L1315

Signed-off-by: Damien Dejean <[email protected]>
Link: openwrt#20472
Signed-off-by: Robert Marko <[email protected]>
simsasss pushed a commit to simsasss/openwrt that referenced this pull request Oct 26, 2025
In Realtek implementation USXGMII is divided in submodes:
 - USXGMII_SX: 10G single link, equivalent of PHY_INTERFACE_MODE_USXGMII
 - USXGMII_DX: 10G two links (2*5G ?),
 - USXGMII_QX: 10G four links, presumably 4*2.5G, used with the RTL8224,
   equivalent of PHY_INTERFACE_MODE_10G_QXGMII.

This CL adds the 10_GQXGMII modes to the RTL930x implementation. In
particular the "mode set" function is extended to support both simple
mode set, and force mode set depending on the mode according to
dal_longan_sds_mode_set [1].

[1] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_sds.c#L1746

Signed-off-by: Damien Dejean <[email protected]>
Link: openwrt#20472
Signed-off-by: Robert Marko <[email protected]>
@ddejean
ddejean deleted the rtk-10g-qxgmii branch October 26, 2025 18:02
Lienol pushed a commit to Lienol/openwrt that referenced this pull request Oct 27, 2025
On the RTL930x series the serdes #3 is backed by serdes #10 when pages
0, 1, 2 or 3 are accessed [1]. This changeset modifies the sds mapping
function from a single implementation for the 3 families to one
implementation per chip family. In particular it implements the mapping
required for the rtl930x one.

[1] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_sds.c#L624

Signed-off-by: Damien Dejean <[email protected]>
Link: openwrt/openwrt#20472
Signed-off-by: Robert Marko <[email protected]>
Lienol pushed a commit to Lienol/openwrt that referenced this pull request Oct 27, 2025
Adds the serdes patch sequence [1] and configuration [2] for the
PHY_INTERFACE_MODE_10G_QXGMII mode (aka USXGMII_QX in Realtek sources).
It is required by devices with light bootloaders (ie not u-boot) that
does not initialize the hardware before booting the kernel.

[1] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L1075
[2] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L1315

Signed-off-by: Damien Dejean <[email protected]>
Link: openwrt/openwrt#20472
Signed-off-by: Robert Marko <[email protected]>
Lienol pushed a commit to Lienol/openwrt that referenced this pull request Oct 27, 2025
In Realtek implementation USXGMII is divided in submodes:
 - USXGMII_SX: 10G single link, equivalent of PHY_INTERFACE_MODE_USXGMII
 - USXGMII_DX: 10G two links (2*5G ?),
 - USXGMII_QX: 10G four links, presumably 4*2.5G, used with the RTL8224,
   equivalent of PHY_INTERFACE_MODE_10G_QXGMII.

This CL adds the 10_GQXGMII modes to the RTL930x implementation. In
particular the "mode set" function is extended to support both simple
mode set, and force mode set depending on the mode according to
dal_longan_sds_mode_set [1].

[1] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_sds.c#L1746

Signed-off-by: Damien Dejean <[email protected]>
Link: openwrt/openwrt#20472
Signed-off-by: Robert Marko <[email protected]>
@ecsv

ecsv commented Oct 29, 2025

Copy link
Copy Markdown
Contributor

Looks like this PR broke ethernet on PSX8/PSX10 (RTL8224+RTL9302) and all other 10G-QXGMII RTL930x devices which I have here. The regression was introduced with commit ddd82c8

@ddejean Any changes we need to apply in the DTS for these devices to get them working again? Do you have some splitted down version of this commit which we can use to bisect this further?

@0xharshal do you know if there is anything special in the way u-boot setups the serdes for these devices when running rtk init in u-boot?

@jonasjelonek

jonasjelonek commented Oct 29, 2025 •

Copy link
Copy Markdown
Member

@ecsv Note that the changes from this PR are now in the PCS driver.

Additionally, there was just a discussion starting here about RTL8224. Maybe you also try the driver made by @ddejean which is linked over there if it? IIRC 10G-QXGMII was completely skipped before during SerDes setup the same as USXGMII.

EDIT: The driver thing doesn't make that much sense, sorry.

@ddejean

ddejean commented Oct 29, 2025

Copy link
Copy Markdown
Contributor Author

Looks like this PR broke ethernet on PSX8/PSX10 (RTL8224+RTL9302) and all other 10G-QXGMII RTL930x devices which I have here. The regression was introduced with commit ddd82c8

Oh that's bad -_-
Can you detail a bit more "broke ethernet"? What's working and what's not? Are the leds still lighting when you plug a cable? Are they blinking?

@ecsv

ecsv commented Oct 29, 2025

Copy link
Copy Markdown
Contributor

Can you detail a bit more "broke ethernet"? What's working and what's not? Are the leds still lighting when you plug a cable? Are they blinking?

The link active is is shown and the light is blinking. But neither traffic exiting not entering the device. No traffic is forwarded between the ports or the CPU

This description is less interesting than the earlier - because this could mean that it could be a switch problem. But as shown in my last message, this happened after the SerDes initialization was added. Which means - the SerDes is now getting misconfigured by the new code.

@ecsv

ecsv commented Oct 29, 2025

Copy link
Copy Markdown
Contributor

Working SerDes configuration:

cat /sys/kernel/debug/realtek_otto_serdes/serdes.2/registers
ug/realtek_otto_serdes/serdes.2/registers 
Back SDS 02:   00   01   02   03   04   05   06   07   08   09   0A   0B   0C   0D   0E   0F   10   11   12   13   14   15   16   17   18   19   1A   1B   1C   1D   1E   1F
SDS        : 1403 0F00 70D0 3106 0749 8E00 8F5F 1359 524B F000 8BA4 0000 08E4 4636 2053 0000 0000 0000 0000 4001 0001 4001 9800 9800 001C 001C 3810 0003 C040 0202 0000 0000 
SDS_EXT    : 0000 0000 0000 0000 0000 0000 0000 0003 283F 4000 0000 0000 0004 326A 0332 1162 2ABD 0000 0000 0000 0000 0000 0000 0000 0015 02BC 0000 0000 0000 0100 0100 0000 
FIB        : 0140 6109 3380 02A0 01A0 0000 0000 0004 0000 0000 0000 0000 0000 0000 0000 8000 0083 0000 5000 0000 0000 0000 0001 4001 0004 326A 0000 115D 33FA E46A 071E 0000 
FIB_EXT    : 1140 6109 3380 02A0 01A0 0000 0000 0004 0000 0000 0000 0000 0000 0000 0000 8000 02D6 0000 0124 031B 1F33 4000 0000 1408 0000 1005 0001 0000 0000 0000 0000 0000 
DTE        : 2040 0004 0000 0000 0001 002A 0000 0000 8001 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
DTE_EXT    : 100D 8000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
TGX        : 0000 C800 0000 C45C 6EAA E1A8 6473 2303 7670 0000 0000 0000 0000 0F00 055A 5A5A 432E 00A8 5078 0000 0000 0000 0000 0000 0000 8040 0000 0000 0000 0600 0000 0000 
TGX_EXT    : 0000 0000 0000 0000 0000 0000 5401 0000 5401 0000 5401 0000 5401 1711 1516 383F 40AA 0540 0FFF 0FFF 0FFF 6318 0006 0000 0000 0000 F010 0000 0884 0FFF DF26 0000 
ANA_RG     : 2040 0000 0000 0000 0001 0028 0000 0000 8000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0010 0000 0000 0000 0800 0000 0000 0000 0000 0000 0000 0000 
ANA_RG_EXT : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
ANA_TG     : 0007 0300 8000 0000 0000 0000 B6B5 0000 0000 0000 0000 0000 0000 0000 0332 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
ANA_TG_EXT : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 0C    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0003 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 0D    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 0E    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 0F    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 10    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 11    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 12    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 13    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 14    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 15    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 16    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 17    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 18    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 19    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 1A    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 1B    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 1C    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 1D    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 1E    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
ANA_WDIG   : 0000 0000 0031 0000 0000 0000 0C04 DC05 0603 0000 0000 0000 A05A 0708 0001 0000 0000 0000 0000 0000 0000 0001 B5AD 0000 0000 0000 0000 0000 0000 0000 0000 0000 
ANA_MISC   : 0000 0000 0000 0000 A05A 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
ANA_COM    : 0000 FFFF 03C0 8206 F0F0 40B0 0410 F0FF 0000 FFFF 0003 0005 0007 0009 0000 0008 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
ANA_SP     : 8668 A088 D8E0 4A5F 08C0 1000 C000 4820 23FF F100 1000 1892 2427 0BFF 0000 FFDF 2BFF 8292 0484 027F 1311 62C1 20CB A100 3E48 0000 0001 FFFF 0400 0000 87F8 8888 
ANA_SP_EXT : 820F 0300 1017 FFDF 0000 7F7C 0200 8104 0001 FFD4 7C2F 7C0F 0025 0000 003F 0121 0020 8840 0004 0050 2008 8000 4000 4104 8E88 4902 A12B 0003 7109 66E1 6E30 3524 
ANA_1G     : 8360 2088 F020 5F5F 08C0 1000 E000 4820 23FF F000 1000 188A 2427 0BFF 0000 BFDF 2BFF 8280 0084 227F 2179 60C1 00CB 0100 BE48 0000 0000 FFFF 4400 0000 07F8 8888 
ANA_1G_EXT : 820F 0100 1107 FFD0 0000 787C 0200 8104 0003 FFC4 7C4F 7C07 0000 0000 FFFF F8A1 0028 8030 0000 0034 2008 8000 4000 4105 8F88 490A A02B 0003 7109 2500 5030 2624 
ANA_2G     : 8360 2088 F020 5F5F 08C0 1000 E000 4820 23FF F000 1000 188A 2427 0BFF 0000 BFDF 2BFF 8280 0084 227F 2179 60C1 00CB 0100 BE48 0000 0000 FFFF 4400 0000 07F8 8888 
ANA_2G_EXT : 820F 0100 1107 FFD0 0000 787C 0200 8104 0003 FFC4 7C4F 7C07 0000 0000 FFFF F8A1 0028 8030 0000 0034 2008 8000 4000 4105 8F88 490A A02B 0003 7109 2500 5030 2624 
ANA_3G     : 8360 2088 F020 5F5F 08C0 1000 E000 4820 23FF F000 1000 188A 2427 0BFF 0000 BFDF 2BFF 8280 0084 227F 2179 60C1 00CB 0100 BE48 0000 0000 FFFF 4400 0000 07F8 8888 
ANA_3G_EXT : 820F 0100 1107 FFD0 0000 787C 0200 8104 0003 FFC4 7C4F 7C07 0000 0000 FFFF F8A1 0028 8030 0000 0034 2008 8000 4000 4105 8F88 490A A02B 0003 7109 2640 6430 3024 
ANA_5G     : 8360 2088 F020 5F5F 08C0 1000 E000 4820 23FF F000 1000 188A 2427 0BFF 0000 BFDF 2BFF 8280 0084 227F 2179 60C1 00CB 0100 BE48 0000 0000 FFFF 4400 0000 07F8 8888 
ANA_5G_EXT : 820F 0100 1107 FFD0 0000 787C 0200 8104 0003 FFC4 7C4F 7C07 0000 0000 FFFF F8A1 0028 8030 0000 0050 2008 8000 4000 4105 8E88 4902 A02B 0003 7109 2501 5030 2624 
ANA_6G     : 8360 2088 F020 5F5F 08C0 1000 E000 4820 23FF F000 1000 188A 2427 0BFF 0000 BFDF 2BFF 8280 0084 227F 2179 60C1 00CB 0100 BE48 0000 0000 FFFF 4400 0000 07F8 8888 
ANA_6G_EXT : 820F 0100 1107 FFD0 0000 787C 0200 8104 0003 FFC4 7C4F 7C07 0000 0000 FFFF F8A1 0028 8030 0000 0050 2008 8000 4000 4105 8E88 4902 A02B 0003 7109 2641 6430 3024 
ANA_10G    : 8668 A088 D8E0 4A5F 08C0 1000 C000 4820 23FF F100 1000 1892 2427 0BFF 0000 FFDF 2BFF 8292 0484 027F 1311 62C1 20CB A100 3E48 0000 0001 FFFF 0400 0000 87F8 8888 
ANA_10G_EXT: 820F 0300 1017 FFDF 0000 7F7C 0200 8104 0001 FFD4 7C2F 7C0F 0025 0000 003F 0121 0020 8840 0004 0050 2008 8000 4000 4104 8E88 4902 A12B 0003 7109 66E1 6E30 3524 
PAGE 30    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 31    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 32    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 33    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 34    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 35    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 36    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 37    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 38    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 39    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 3A    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 3B    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 3C    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 3D    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 3E    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 3F    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000

Not working one:

cat /sys/kernel/debug/realtek_otto_serdes/serdes.2/registers
root@OpenWrt:~# cat /sys/kernel/debug/realtek_otto_serdes/serdes.2/registers
Back SDS 02:   00   01   02   03   04   05   06   07   08   09   0A   0B   0C   0D   0E   0F   10   11   12   13   14   15   16   17   18   19   1A   1B   1C   1D   1E   1F
SDS        : 1403 0F00 70D0 3106 0749 8E00 8F5F 1359 524B F000 8BA4 0000 08E4 4636 2053 0000 0000 0000 0000 4001 0001 4001 9800 9800 001C 001C 3810 0003 C040 0013 0000 0000 
SDS_EXT    : 0000 0000 0000 0000 0000 0000 0000 0003 283F 4000 0000 0000 0004 326A 0332 1162 2ABD 0000 0000 0000 0000 0000 0000 0000 0010 02BC 0000 0000 0000 0100 0100 0000 
FIB        : 0140 6109 3380 02A0 01A0 0000 0000 0004 0000 0000 0000 0000 0000 0000 0000 8000 0083 0000 5000 0000 0000 0000 0001 4001 0004 326A 0000 115D 33FA E46A 071E 0000 
FIB_EXT    : 1140 6109 3380 02A0 01A0 0000 0000 0004 0000 0000 0000 0000 0000 0000 0000 8000 02D6 0000 0124 031B 1F33 4000 0000 1408 0000 1005 0001 0000 0000 0000 0000 0000 
DTE        : 2040 0004 0000 0000 0001 002A 0000 0000 8001 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
DTE_EXT    : 100D 8000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
TGX        : 0000 C800 0000 C45C 6EAA E1A8 6473 2303 7670 0000 0000 0000 0000 0F00 055A 5A5A 432E 00A8 5078 0000 0000 0000 0000 0000 0000 8040 0000 0000 0000 0600 0000 0000 
TGX_EXT    : 0000 0000 0000 0000 0000 0000 1401 0000 5401 0000 5401 0000 5401 1711 1516 383F 60AA 054F 0F3F 0FFF 0FFF 6318 0006 0000 0000 0000 F020 0000 0884 0FFF D091 0000 
ANA_RG     : 2040 0000 0000 0000 0001 0028 0000 0000 8000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0010 0000 0000 0000 0800 0000 0000 0000 0000 0000 0000 0000 
ANA_RG_EXT : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
ANA_TG     : 0007 0300 8000 0000 0000 0000 B6B5 0000 0000 0000 0000 0000 0000 0000 0332 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
ANA_TG_EXT : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 0C    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0003 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 0D    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 0E    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 0F    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 10    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 11    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 12    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 13    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 14    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 15    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 16    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 17    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 18    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 19    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 1A    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 1B    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 1C    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 1D    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 1E    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
ANA_WDIG   : 0000 0000 0031 0000 0000 0000 0C04 DC05 0603 0000 0000 0002 A05A 0708 0001 0000 0000 0000 0000 0000 0010 3000 B5AD 0000 0000 0000 0000 0000 0000 0000 0000 0000 
ANA_MISC   : 0000 0000 0000 0000 A05A 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
ANA_COM    : 0000 FFFF 03C0 8206 F0F0 40B0 0810 F09F 0000 FFFF 0003 0005 0007 6009 0000 0008 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
ANA_SP     : A668 2088 D020 4A5F 08C0 1000 C000 4820 23FF F000 1000 1893 2427 0BFF 0000 FFDF 2BFF 8280 0484 0264 1311 62C1 00CB A100 3E48 03E0 0001 FFFF 0400 0000 87F8 8888 
ANA_SP_EXT : 820F 0300 1017 FFD3 0000 7F7C 0200 8104 0001 FFD4 7C2F 7807 0000 0000 003F 0121 0020 8840 0000 0050 2008 8000 4000 4104 8E88 4902 A12B 0003 7109 66E1 6E30 3524 
ANA_1G     : 8360 2088 F020 5F5F 08C0 1000 E000 4820 23FF F000 1000 188A 2427 0BFF 0000 BFDF 2BFF 8280 0084 227F 2179 60C1 00CB 0100 BE48 0000 0000 FFFF 4400 0000 07F8 8888 
ANA_1G_EXT : 820F 0100 1107 FFD0 0000 787C 0200 8104 0003 FFC4 7C4F 7C07 0000 0000 FFFF F8A1 0028 8030 0000 0034 2008 8000 4000 4105 8F88 490A A02B 0003 7109 2500 5030 2624 
ANA_2G     : 8360 2088 F020 5F5F 08C0 1000 E000 4820 23FF F000 1000 188A 2427 0BFF 0000 BFDF 2BFF 8280 0084 227F 2179 60C1 00CB 0100 BE48 0000 0000 FFFF 4400 0000 07F8 8888 
ANA_2G_EXT : 820F 0100 1107 FFD0 0000 787C 0200 8104 0003 FFC4 7C4F 7C07 0000 0000 FFFF F8A1 0028 8030 0000 0034 2008 8000 4000 4105 8F88 490A A02B 0003 7109 2500 5030 2624 
ANA_3G     : 8360 2088 F020 5F5F 08C0 1000 E000 4820 23FF F000 1000 188A 2427 0BFF 0000 BFDF 2BFF 8280 0084 227F 2179 60C1 00CB 0100 BE48 0000 0000 FFFF 4400 0000 07F8 8888 
ANA_3G_EXT : 820F 0100 1107 FFD0 0000 787C 0200 8104 0003 FFC4 7C4F 7C07 0000 0000 FFFF F8A1 0028 8030 0000 0034 2008 8000 4000 4105 8F88 490A A02B 0003 7109 2640 6430 3024 
ANA_5G     : 8360 2088 F020 5F5F 08C0 1000 E000 4820 23FF F000 1000 188A 2427 0BFF 0000 BFDF 2BFF 8280 0084 227F 2179 60C1 00CB 0100 BE48 0000 0000 FFFF 4400 0000 07F8 8888 
ANA_5G_EXT : 820F 0100 1107 FFD0 0000 787C 0200 8104 0003 FFC4 7C4F 7C07 0000 0000 FFFF F8A1 0028 8030 0000 0050 2008 8000 4000 4105 8E88 4902 A02B 0003 7109 2501 5030 2624 
ANA_6G     : 8360 2088 F020 5F5F 08C0 1000 E000 4820 23FF F000 1000 188A 2427 0BFF 0000 BFDF 2BFF 8280 0084 227F 2179 60C1 00CB 0100 BE48 0000 0000 FFFF 4400 0000 07F8 8888 
ANA_6G_EXT : 820F 0100 1107 FFD0 0000 787C 0200 8104 0003 FFC4 7C4F 7C07 0000 0000 FFFF F8A1 0028 8030 0000 0050 2008 8000 4000 4105 8E88 4902 A02B 0003 7109 2641 6430 3024 
ANA_10G    : A668 2088 D020 4A5F 08C0 1000 C000 4820 23FF F000 1000 1893 2427 0BFF 0000 FFDF 2BFF 8280 0484 0264 1311 62C1 00CB A100 3E48 03E0 0001 FFFF 0400 0000 87F8 8888 
ANA_10G_EXT: 820F 0300 1017 FFD3 0000 7F7C 0200 8104 0001 FFD4 7C2F 7807 0000 0000 003F 0121 0020 8840 0000 0050 2008 8000 4000 4104 8E88 4902 A12B 0003 7109 66E1 6E30 3524 
PAGE 30    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 31    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 32    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 33    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 34    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 35    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 36    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 37    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 38    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 39    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 3A    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 3B    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 3C    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 3D    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 3E    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
PAGE 3F    : 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000

@ddejean

ddejean commented Oct 29, 2025

Copy link
Copy Markdown
Contributor Author

Thanks for the complementary info and the dumps, I'm going to have a look at it.

This description is less interesting than the earlier - because this could mean that it could be a switch problem. But as shown in my last message, this happened after the SerDes initialization was added. Which means - the SerDes is now getting misconfigured by the new code.

I don't question the fact it comes from the change you pointed out, but I want to be sure I got all the context in particular things that could relate to behaviors I experienced on my switch before.

@ecsv

ecsv commented Oct 29, 2025 •

Copy link
Copy Markdown
Contributor

The most minimal change I can currently do (with my non-existing knowledge about the Realtek SerDes) is:

diff --git i/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c w/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
index 6cae6a8f0c..88366ea972 100644
--- i/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
+++ w/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
@@ -727,8 +727,7 @@ static void rtl93xx_phylink_mac_config(struct dsa_switch *ds, int port,
 	    (state->interface == PHY_INTERFACE_MODE_1000BASEX ||
 	     state->interface == PHY_INTERFACE_MODE_SGMII ||
 	     state->interface == PHY_INTERFACE_MODE_2500BASEX ||
-	     state->interface == PHY_INTERFACE_MODE_10GBASER ||
-	     state->interface == PHY_INTERFACE_MODE_10G_QXGMII))
+	     state->interface == PHY_INTERFACE_MODE_10GBASER))
 		rtl9300_serdes_setup(port, sds_num, state->interface);
 }

(@jonasjelonek I know, it moved. but I needed to start simple and therefore worked directly on ddd82c8)

Another option is to drop the serdes patching (sorry, ugly):

diff --git i/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c w/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
index 7feceda6f8..f4a0228c99 100644
--- i/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
+++ w/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
@@ -2709,6 +2709,8 @@ static void rtsds_930x_patch_serdes(int sds, phy_interface_t mode)
 	const sds_config *config;
 	size_t count;
 
+	return;
+
 	switch (mode) {
 	case PHY_INTERFACE_MODE_1000BASEX:
 	case PHY_INTERFACE_MODE_SGMII:

I also played around with calibration values which @0xharshal "gave me" from the RTLSDK code:

THIS DIDN'T SOLVE IT - JUST HERE FOR COMPLETENESS


diff --git i/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c w/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
index 7feceda6f8..f1a9175b4c 100644
--- i/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
+++ w/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
@@ -2642,9 +2642,10 @@ static const sds_config rtsds_930x_cfg_10g_2500bx_odd[] =
 sds_config rtsds_930x_cfg_usxgmii_qx_even[] =
 {
     {0x06, 0x00, 0x0000}, {0x06, 0x0D, 0x0F00}, {0x06, 0x0E, 0x055A}, {0x06, 0x1D, 0x0600},
-    {0x07, 0x10, 0x6003}, {0x06, 0x13, 0x68C1}, {0x06, 0x14, 0xF021}, {0x07, 0x06, 0x1401},
+    {0x07, 0x10, 0x4003}, {0x06, 0x13, 0x68C1}, {0x06, 0x14, 0xF021}, {0x07, 0x06, 0x5401},
+    {0x07, 0x08, 0x5401}, {0x07, 0x0A, 0x5401}, {0x07, 0x0C, 0x5401},
     {0x21, 0x03, 0x8206}, {0x21, 0x05, 0x40B0}, {0x21, 0x06, 0x0010}, {0x21, 0x07, 0xF09F},
-    {0x21, 0x0C, 0x0007}, {0x21, 0x0D, 0x6009}, {0x21, 0x0E, 0x0000}, {0x21, 0x0F, 0x0008},
+    {0x21, 0x0C, 0x0007}, {0x21, 0x0D, 0x0009}, {0x21, 0x0E, 0x0000}, {0x21, 0x0F, 0x0008},
     {0x2E, 0x00, 0xA668}, {0x2E, 0x01, 0x2088}, {0x2E, 0x02, 0xD020}, {0x2E, 0x06, 0xC000},
     {0x2E, 0x0B, 0x1892}, {0x2E, 0x0F, 0xFFDF}, {0x2E, 0x11, 0x8280}, {0x2E, 0x12, 0x0484},
     {0x2E, 0x13, 0x027F}, {0x2E, 0x14, 0x1311}, {0x2E, 0x17, 0xA100}, {0x2E, 0x1A, 0x0001},
@@ -2662,9 +2663,10 @@ sds_config rtsds_930x_cfg_usxgmii_qx_even[] =
 sds_config rtsds_930x_cfg_usxgmii_qx_odd[] =
 {
     {0x06, 0x00, 0x0000}, {0x06, 0x0D, 0x0F00}, {0x06, 0x0E, 0x055A}, {0x06, 0x1D, 0x0600},
-    {0x07, 0x10, 0x6003}, {0x06, 0x13, 0x68C1}, {0x06, 0x14, 0xF021}, {0x07, 0x06, 0x1401},
+    {0x07, 0x10, 0x4003}, {0x06, 0x13, 0x68C1}, {0x06, 0x14, 0xF021}, {0x07, 0x06, 0x5401},
+    {0x07, 0x08, 0x5401}, {0x07, 0x0A, 0x5401}, {0x07, 0x0C, 0x5401},
     {0x21, 0x03, 0x8206}, {0x21, 0x05, 0x40B0}, {0x21, 0x06, 0x0010}, {0x21, 0x07, 0xF09F},
-    {0x21, 0x0A, 0x0003}, {0x21, 0x0B, 0x0005}, {0x21, 0x0C, 0x0007}, {0x21, 0x0D, 0x6009},
+    {0x21, 0x0A, 0x0003}, {0x21, 0x0B, 0x0005}, {0x21, 0x0C, 0x0007}, {0x21, 0x0D, 0x0009},
     {0x21, 0x0E, 0x0000}, {0x21, 0x0F, 0x0008},
     {0x2E, 0x00, 0xA668}, {0x2E, 0x02, 0xD020}, {0x2E, 0x06, 0xC000}, {0x2E, 0x0B, 0x1892},
     {0x2E, 0x0F, 0xFFDF}, {0x2E, 0x11, 0x8280}, {0x2E, 0x12, 0x0484}, {0x2E, 0x13, 0x027F},

But this didn't solve the problem

@ddejean

ddejean commented Oct 29, 2025 •

Copy link
Copy Markdown
Contributor Author

Good to know, it restricts the changes a lot, I'm gonna try to spend some time on the content of rtl9300_serdes_setup(...).

One thing that comes to my mind is the rtl9300_serdes_mac_link_config() call in the rtl9300_serdes_setup(...). Before my change, the serdes setup was not called for 10g-qxgmii, which means the mac link config was not overriden. It is possible that your switch requires another setup than the one we apply here. Could you try to run my changes with this function call commented? If it works it means we "just" have to figure out the right config for your switch and add a configuration in the device tree.

More generally, if you want to spend time on this, you can try to comment things out from this serdes setup function to see when it starts working. Isolating the guilty element in there would be very helpful.

@jonasjelonek

Copy link
Copy Markdown
Member

(@jonasjelonek I know, it moved. but I needed to start simple and therefore worked directly on ddd82c8)

Sorry, this wasn't meant to be offending in any way, just as a kind note.

@jonasjelonek

jonasjelonek commented Oct 29, 2025 •

Copy link
Copy Markdown
Member

One thing that comes to my mind is the rtl9300_serdes_mac_link_config() call in the rtl9300_serdes_setup(...). Before my change, the serdes setup was not called for 10g-qxgmii, which means the mac link config was not overriden. It is possible that your switch requires another setup than the one we apply here. Could you try to run my changes with this function call commented? If it works it means we "just" have to figure out the right config for your switch and add a configuration in the device tree.

This function should only sets the SerDes RX/TX polarity. Compare here.

Again, just meant as a kind note to support debugging.

EDIT: I'll shut up for now to not disturb your discussion here.

@ddejean

ddejean commented Oct 29, 2025 •

Copy link
Copy Markdown
Contributor Author

This function should only set the SerDes RX/TX polarity.

Yes, and there’s a chance that the serdes polarity is not the same on every switch model. Our code only sets one of the four possible configurations, it worths checking if this is the right one. By commenting it, we’ll default to the configuration done by the bootloader and we’ll see if that’s the cause.

@ecsv

ecsv commented Oct 29, 2025

Copy link
Copy Markdown
Contributor

(@jonasjelonek I know, it moved. but I needed to start simple and therefore worked directly on ddd82c8)

Sorry, this wasn't meant to be offending in any way, just as a kind note.

Wasn't meant like this - I didn't understand your comment as offense (just as kind reminder/information). Just wanted to explain why I am working on the old code and for the moment ignore everything which followed after that.

If I revert something then this will be on top of the new PCS code.


As said earlier, the patching values are not the magic cure here - just that the patching is called in the first place.

I've also tried to only remove the rtsds_930x_usxgmii_config and the rtmdio_930x_write_sds_phy calls in rtsds_930x_patch_serdes separately:

  • both not called: works
  • rtmdio_930x_write_sds_phy called: doesn't work
  • rtsds_930x_patch_serdes called: doesn't work

For the moment, the only thing I can do is to drop this code portion for it:

diff --git i/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c w/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
index 7feceda6f8..0497c85012 100644
--- i/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
+++ w/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
@@ -2639,46 +2639,6 @@ static const sds_config rtsds_930x_cfg_10g_2500bx_odd[] =
 	{0x2D, 0x13, 0x3C87}, {0x2D, 0x14, 0x1808},
 };
 
-sds_config rtsds_930x_cfg_usxgmii_qx_even[] =
-{
-    {0x06, 0x00, 0x0000}, {0x06, 0x0D, 0x0F00}, {0x06, 0x0E, 0x055A}, {0x06, 0x1D, 0x0600},
-    {0x07, 0x10, 0x6003}, {0x06, 0x13, 0x68C1}, {0x06, 0x14, 0xF021}, {0x07, 0x06, 0x1401},
-    {0x21, 0x03, 0x8206}, {0x21, 0x05, 0x40B0}, {0x21, 0x06, 0x0010}, {0x21, 0x07, 0xF09F},
-    {0x21, 0x0C, 0x0007}, {0x21, 0x0D, 0x6009}, {0x21, 0x0E, 0x0000}, {0x21, 0x0F, 0x0008},
-    {0x2E, 0x00, 0xA668}, {0x2E, 0x01, 0x2088}, {0x2E, 0x02, 0xD020}, {0x2E, 0x06, 0xC000},
-    {0x2E, 0x0B, 0x1892}, {0x2E, 0x0F, 0xFFDF}, {0x2E, 0x11, 0x8280}, {0x2E, 0x12, 0x0484},
-    {0x2E, 0x13, 0x027F}, {0x2E, 0x14, 0x1311}, {0x2E, 0x17, 0xA100}, {0x2E, 0x1A, 0x0001},
-    {0x2E, 0x1C, 0x0400}, {0x2F, 0x01, 0x0300}, {0x2F, 0x02, 0x1017}, {0x2F, 0x03, 0xFFDF},
-    {0x2F, 0x05, 0x7F7C}, {0x2F, 0x07, 0x8104}, {0x2F, 0x08, 0x0001}, {0x2F, 0x09, 0xFFD4},
-    {0x2F, 0x0A, 0x7C2F}, {0x2F, 0x0E, 0x003F}, {0x2F, 0x0F, 0x0121}, {0x2F, 0x10, 0x0020},
-    {0x2F, 0x11, 0x8840},
-    {0x2B, 0x13, 0x0050}, {0x2B, 0x18, 0x8E88}, {0x2B, 0x19, 0x4902}, {0x2B, 0x1D, 0x2501},
-    {0x2D, 0x13, 0x0050}, {0x2D, 0x18, 0x8E88}, {0x2D, 0x19, 0x4902}, {0x2D, 0x1D, 0x2641},
-    {0x2F, 0x13, 0x0050}, {0x2F, 0x18, 0x8E88}, {0x2F, 0x19, 0x4902}, {0x2F, 0x1D, 0x66E1},
-    /* enable IEEE 802.3az EEE */
-    {0x06, 0x03, 0xc45c},
-};
-
-sds_config rtsds_930x_cfg_usxgmii_qx_odd[] =
-{
-    {0x06, 0x00, 0x0000}, {0x06, 0x0D, 0x0F00}, {0x06, 0x0E, 0x055A}, {0x06, 0x1D, 0x0600},
-    {0x07, 0x10, 0x6003}, {0x06, 0x13, 0x68C1}, {0x06, 0x14, 0xF021}, {0x07, 0x06, 0x1401},
-    {0x21, 0x03, 0x8206}, {0x21, 0x05, 0x40B0}, {0x21, 0x06, 0x0010}, {0x21, 0x07, 0xF09F},
-    {0x21, 0x0A, 0x0003}, {0x21, 0x0B, 0x0005}, {0x21, 0x0C, 0x0007}, {0x21, 0x0D, 0x6009},
-    {0x21, 0x0E, 0x0000}, {0x21, 0x0F, 0x0008},
-    {0x2E, 0x00, 0xA668}, {0x2E, 0x02, 0xD020}, {0x2E, 0x06, 0xC000}, {0x2E, 0x0B, 0x1892},
-    {0x2E, 0x0F, 0xFFDF}, {0x2E, 0x11, 0x8280}, {0x2E, 0x12, 0x0484}, {0x2E, 0x13, 0x027F},
-    {0x2E, 0x14, 0x1311}, {0x2E, 0x17, 0xA100}, {0x2E, 0x1A, 0x0001}, {0x2E, 0x1C, 0x0400},
-    {0x2F, 0x00, 0x820F}, {0x2F, 0x01, 0x0300}, {0x2F, 0x02, 0x1017}, {0x2F, 0x03, 0xFFDF},
-    {0x2F, 0x05, 0x7F7C}, {0x2F, 0x07, 0x8104}, {0x2F, 0x08, 0x0001}, {0x2F, 0x09, 0xFFD4},
-    {0x2F, 0x0A, 0x7C2F}, {0x2F, 0x0E, 0x003F}, {0x2F, 0x0F, 0x0121}, {0x2F, 0x10, 0x0020},
-    {0x2F, 0x11, 0x8840},
-    {0x2B, 0x13, 0x3D87}, {0x2B, 0x14, 0x3108},
-    {0x2D, 0x13, 0x3C87}, {0x2D, 0x14, 0x1808},
-    /* enable IEEE 802.3az EEE */
-    {0x06, 0x03, 0xc45c},
-};
-
 static void rtsds_930x_usxgmii_config(int sds, int nway_en, u32 opcode, u32 am_period, u32 all_am_markers, u32 an_table, u32 sync_bit)
 {
 	rtl9300_sds_field_w(sds, 0x7, 0x11, 0, 0, nway_en);
@@ -2733,14 +2693,7 @@ static void rtsds_930x_patch_serdes(int sds, phy_interface_t mode)
 		break;
 
 	case PHY_INTERFACE_MODE_10G_QXGMII:
-		if (even_sds) {
-			config = rtsds_930x_cfg_usxgmii_qx_even;
-			count = ARRAY_SIZE(rtsds_930x_cfg_usxgmii_qx_even);
-		} else {
-			config = rtsds_930x_cfg_usxgmii_qx_odd;
-			count = ARRAY_SIZE(rtsds_930x_cfg_usxgmii_qx_odd);
-		}
-		break;
+		return;
 
 	default:
 		pr_warn("%s: unsupported mode %s on serdes %d\n", __func__, phy_modes(mode), sds);

Or with the new driver:

diff --git i/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c w/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c
index f3490c48f6..bbc0167153 100644
--- i/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c
+++ w/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c
@@ -1756,46 +1756,6 @@ static const sds_config rtpcs_930x_sds_cfg_10g_2500bx_odd[] =
 	{0x2D, 0x13, 0x3C87}, {0x2D, 0x14, 0x1808},
 };
 
-static sds_config rtpcs_930x_sds_cfg_usxgmii_qx_even[] =
-{
-    {0x06, 0x00, 0x0000}, {0x06, 0x0D, 0x0F00}, {0x06, 0x0E, 0x055A}, {0x06, 0x1D, 0x0600},
-    {0x07, 0x10, 0x6003}, {0x06, 0x13, 0x68C1}, {0x06, 0x14, 0xF021}, {0x07, 0x06, 0x1401},
-    {0x21, 0x03, 0x8206}, {0x21, 0x05, 0x40B0}, {0x21, 0x06, 0x0010}, {0x21, 0x07, 0xF09F},
-    {0x21, 0x0C, 0x0007}, {0x21, 0x0D, 0x6009}, {0x21, 0x0E, 0x0000}, {0x21, 0x0F, 0x0008},
-    {0x2E, 0x00, 0xA668}, {0x2E, 0x01, 0x2088}, {0x2E, 0x02, 0xD020}, {0x2E, 0x06, 0xC000},
-    {0x2E, 0x0B, 0x1892}, {0x2E, 0x0F, 0xFFDF}, {0x2E, 0x11, 0x8280}, {0x2E, 0x12, 0x0484},
-    {0x2E, 0x13, 0x027F}, {0x2E, 0x14, 0x1311}, {0x2E, 0x17, 0xA100}, {0x2E, 0x1A, 0x0001},
-    {0x2E, 0x1C, 0x0400}, {0x2F, 0x01, 0x0300}, {0x2F, 0x02, 0x1017}, {0x2F, 0x03, 0xFFDF},
-    {0x2F, 0x05, 0x7F7C}, {0x2F, 0x07, 0x8104}, {0x2F, 0x08, 0x0001}, {0x2F, 0x09, 0xFFD4},
-    {0x2F, 0x0A, 0x7C2F}, {0x2F, 0x0E, 0x003F}, {0x2F, 0x0F, 0x0121}, {0x2F, 0x10, 0x0020},
-    {0x2F, 0x11, 0x8840},
-    {0x2B, 0x13, 0x0050}, {0x2B, 0x18, 0x8E88}, {0x2B, 0x19, 0x4902}, {0x2B, 0x1D, 0x2501},
-    {0x2D, 0x13, 0x0050}, {0x2D, 0x18, 0x8E88}, {0x2D, 0x19, 0x4902}, {0x2D, 0x1D, 0x2641},
-    {0x2F, 0x13, 0x0050}, {0x2F, 0x18, 0x8E88}, {0x2F, 0x19, 0x4902}, {0x2F, 0x1D, 0x66E1},
-    /* enable IEEE 802.3az EEE */
-    {0x06, 0x03, 0xc45c},
-};
-
-static sds_config rtpcs_930x_sds_cfg_usxgmii_qx_odd[] =
-{
-    {0x06, 0x00, 0x0000}, {0x06, 0x0D, 0x0F00}, {0x06, 0x0E, 0x055A}, {0x06, 0x1D, 0x0600},
-    {0x07, 0x10, 0x6003}, {0x06, 0x13, 0x68C1}, {0x06, 0x14, 0xF021}, {0x07, 0x06, 0x1401},
-    {0x21, 0x03, 0x8206}, {0x21, 0x05, 0x40B0}, {0x21, 0x06, 0x0010}, {0x21, 0x07, 0xF09F},
-    {0x21, 0x0A, 0x0003}, {0x21, 0x0B, 0x0005}, {0x21, 0x0C, 0x0007}, {0x21, 0x0D, 0x6009},
-    {0x21, 0x0E, 0x0000}, {0x21, 0x0F, 0x0008},
-    {0x2E, 0x00, 0xA668}, {0x2E, 0x02, 0xD020}, {0x2E, 0x06, 0xC000}, {0x2E, 0x0B, 0x1892},
-    {0x2E, 0x0F, 0xFFDF}, {0x2E, 0x11, 0x8280}, {0x2E, 0x12, 0x0484}, {0x2E, 0x13, 0x027F},
-    {0x2E, 0x14, 0x1311}, {0x2E, 0x17, 0xA100}, {0x2E, 0x1A, 0x0001}, {0x2E, 0x1C, 0x0400},
-    {0x2F, 0x00, 0x820F}, {0x2F, 0x01, 0x0300}, {0x2F, 0x02, 0x1017}, {0x2F, 0x03, 0xFFDF},
-    {0x2F, 0x05, 0x7F7C}, {0x2F, 0x07, 0x8104}, {0x2F, 0x08, 0x0001}, {0x2F, 0x09, 0xFFD4},
-    {0x2F, 0x0A, 0x7C2F}, {0x2F, 0x0E, 0x003F}, {0x2F, 0x0F, 0x0121}, {0x2F, 0x10, 0x0020},
-    {0x2F, 0x11, 0x8840},
-    {0x2B, 0x13, 0x3D87}, {0x2B, 0x14, 0x3108},
-    {0x2D, 0x13, 0x3C87}, {0x2D, 0x14, 0x1808},
-    /* enable IEEE 802.3az EEE */
-    {0x06, 0x03, 0xc45c},
-};
-
 static void rtpcs_930x_sds_usxgmii_config(struct rtpcs_ctrl *ctrl, int sds,
 					  int nway_en, u32 opcode, u32 am_period,
 					  u32 all_am_markers, u32 an_table,
@@ -1853,14 +1813,7 @@ static void rtpcs_930x_sds_patch(struct rtpcs_ctrl *ctrl, int sds, phy_interface
 		break;
 
 	case PHY_INTERFACE_MODE_10G_QXGMII:
-		if (even_sds) {
-			config = rtpcs_930x_sds_cfg_usxgmii_qx_even;
-			count = ARRAY_SIZE(rtpcs_930x_sds_cfg_usxgmii_qx_even);
-		} else {
-			config = rtpcs_930x_sds_cfg_usxgmii_qx_odd;
-			count = ARRAY_SIZE(rtpcs_930x_sds_cfg_usxgmii_qx_odd);
-		}
-		break;
+		return;
 
 	default:
 		pr_warn("%s: unsupported mode %s on serdes %d\n", __func__, phy_modes(mode), sds);

@ddejean

ddejean commented Oct 29, 2025

Copy link
Copy Markdown
Contributor Author

So the cause is in dca20f91. The revert is going to solve your problem on short term, but on the long term we're going to need the patch sequence for devices that can't run rtk init. I just re-tested mine without patch sequence and it doesn't work.

@ecsv

ecsv commented Oct 29, 2025

Copy link
Copy Markdown
Contributor

The revert is going to solve your problem on short term, but on the long term we're going to need the patch sequence for devices that can't run rtk init. I just re-tested mine without patch sequence and it doesn't work.

I completely agree. But I would point to @0xharshal here. He doesn't have any documentation either, but maybe managed to boost his frustration tolerance while working on the SFP stuff earlier. Hopefully, he hasn't reached full embitterment just yet.

@ddejean

ddejean commented Oct 29, 2025

Copy link
Copy Markdown
Contributor Author

@ecsv I just read in realtek code that there's two different patch sequences depending on the revision on the chip. In particular the chip revision D would required a different patch sequece. Would you be able to tell me what's the revision of the chip included in your switch?

In my kernel logs I have the following trace, it should be similar on yours:

[    0.000000] SoC Type: Realtek RTL9302C rev B (6487)
[    0.000000] printk: legacy bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019555 (MIPS 34Kc)
[    0.000000] MIPS: machine is Zyxel XMG1915-10E Switch

@ecsv

ecsv commented Oct 29, 2025

Copy link
Copy Markdown
Contributor

I just read in realtek code that there's two different patch sequences depending on the revision on the chip.

[    0.000000] SoC Type: Realtek RTL9302C rev B (6487)
[    0.000000] printk: legacy bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019555 (MIPS 34Kc)
[    0.000000] MIPS: machine is Plasma Cloud PSX10

On first glance, looks the same

HateTM added a commit to HateTM/tpl_ax80_ubi that referenced this pull request Oct 30, 2025
* Revert "kernel: removed GRO fraglist by default on kernel 6.12"

This reverts commit 2b18766.

* kernel: disable fraglist GRO by default

Signed-off-by: Andrea Pesaresi <[email protected]>

* kernel: 6.12 change default rx buffer

Signed-off-by: Andrea Pesaresi <[email protected]>

* kernel: 6.6 add mtk_eth_soc-change-default-rx-buffer-length

manually refreshed patches 2719
other patches automatically refreshed

Signed-off-by: Andrea Pesaresi <[email protected]>

* linux-firmware: revert to import 06.2025 update

Signed-off-by: Andrea Pesaresi <[email protected]>

* linux-firmware: sync with 2025.06.16 with latest mtk 12.2025 01.2025

Signed-off-by: Andrea Pesaresi <[email protected]>

* advanced_setup: do not touch rps if packet steering is enabled

Signed-off-by: Andrea Pesaresi <[email protected]>

* advanced_setup: RPS setting type 1 or type 2.

type 1 - standard: as before like mtk source
type 2 - advanced: to distribute better accros CPUs as suggestion on forum

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt76: revert to import latest vanilla changes

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt76: revert to my repo 2025-06-03

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt76: update to 2025.06.18

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt76: Adds a specific initialization register for mt7986 in the ADIE power-on sequence.

Disableing setting the IGTK key for AES-CMAC in firmware, delegating it to mac80211 for consistency with GMAC.

Refreshed other patches

Signed-off-by: Andrea Pesaresi <[email protected]>

* hostapd: revert to import latest changes

Signed-off-by: Andrea Pesaresi <[email protected]>

* hostapd: import mtk patches and refresh patch to 2025.06.23

Signed-off-by: Andrea Pesaresi <[email protected]>

* kernel: refresh config and set timer tick 300

Signed-off-by: Andrea Pesaresi <[email protected]>

* advanced_setup: add sleep on boot and prevent slow up start on boot

Signed-off-by: Andrea Pesaresi <[email protected]>

* advanced_setup: better identification of real device and code beautify

Signed-off-by: Andrea Pesaresi <[email protected]>

* firewall: removed patch 100

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt753x: dsa: eanble fdb learn on cpu port

attempt to fix arp issues

Signed-off-by: Andrea Pesaresi <[email protected]>

* kernel: net: mtk: removed jumbo frame - cleaned rss patch - add debugfs to clean apply patch from mtk

Signed-off-by: Andrea Pesaresi <[email protected]>

* kernel: net: clean and add only rss

Signed-off-by: Andrea Pesaresi <[email protected]>

* kernel: net: mod on RSS Hash Function for rss ethtool and:
convert cap bit
change napi poll weight
change default rx buffer
add 9k jumbo frame

Signed-off-by: Andrea Pesaresi <[email protected]>

* kernel: net: mtk version 6.6, removed not necessary patches

Signed-off-by: Andrea Pesaresi <[email protected]>

* kernel: net: mtk: rework patches rss and jumbo packet.

- add a fix for rss

Signed-off-by: Andrea Pesaresi <[email protected]>

* kernel: net: mtk: convert cap bit

Signed-off-by: Andrea Pesaresi <[email protected]>

* kernel: net: mtk: refresh patches

Signed-off-by: Andrea Pesaresi <[email protected]>

* kernel: net: mtk: 6.12 rework rss and jumbo frame patches

Signed-off-by: Andrea Pesaresi <[email protected]>

* kernel: net: mtk: use net_prefetch for non pagepool path

Signed-off-by: Andrea Pesaresi <[email protected]>

* linux-firmware revert to vanilla to sync

Signed-off-by: Andrea Pesaresi <[email protected]>

* kernel: mtk: disable jumbo frame and refresh patch

Signed-off-by: Andrea Pesaresi <[email protected]>

* linux-firmware: update to 20250704 with latest mt7986

Signed-off-by: Andrea Pesaresi <[email protected]>

* hostapd: revert my mod to import vanilla changes

Signed-off-by: Andrea Pesaresi <[email protected]>

* mac80211: revert from my mod to vanilla to import latest changes

Signed-off-by: Andrea Pesaresi <[email protected]>

* linux-firmware: revert from my mod to vanilla to import latest changes

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt76: revert to vanilla to update latest changes on main

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt76: update mt76 to 2025.07.07
manually refresh patch 1016

Signed-off-by: Andrea Pesaresi <[email protected]>

* mac80211: add mtk patch on 6.14.xx

manually refresh patch mtk 17 28 31

Signed-off-by: Andrea Pesaresi <[email protected]>

* hostapd: add mtk patch

- automatically refreshed

Signed-off-by: Andrea Pesaresi <[email protected]>

* linux-firmware: update to 2025.07.12

mt7915 - mt798x update to 2024.12.18-19

Signed-off-by: Andrea Pesaresi <[email protected]>

* kernel: re-enable GRO fraglist

Signed-off-by: Andrea Pesaresi <[email protected]>

* net: ethernet: mtk_eth_soc: add 2500Mbps maximum rate limt

Without this patch, the ETH driver is unable to set QDMA maximum rate
limit to 2500 Mbps for the specific TX queue.

original patch from mtk 999-2728-net-ethernet-mtk_eth_soc-add-2500Mbps-maximum-rate-limit.patch

Signed-off-by: Andrea Pesaresi <[email protected]>

* hostapd: avoid clearing vht 160 support during downgrading bw

Signed-off-by: Andrea Pesaresi <[email protected]>

* hostapd: explicitly initialize wpabuf->flags to 0 in wpabuf_alloc()

This avoids warnings such as:
warning: 'free' called on pointer '_36' with nonzero offset 32 [-Wfree-nonheap-object]

by explicitly setting wpabuf->flags to 0 ensures and prevents static from misinterpreting the state of the buffer

Signed-off-by: Andrea Pesaresi <[email protected]>

* advanced_setup script: fix a bug

Signed-off-by: Andrea Pesaresi <[email protected]>

* advanced_setup: fix script for eth1

- now log only in syslog

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt76: use ALTX queue for deauth frames

Signed-off-by: Andrea Pesaresi <[email protected]>

* mediatek: swap to 6.12 - removed mtk patch for 6.6

Signed-off-by: Andrea Pesaresi <[email protected]>

* advanced_setup: update delay to 30sec

- now delay can be set-up on luci-app-advanced

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt76: mt7915: set appropriate txq memory limits

MT7986 is DBDC and would fall back to the mac80211 default of 16MB
or if the radio does not support VHT (2G/6G) then 4MB. Set all radios
to 32MB except MT7915 DBDC where 16MB is adequate.

Signed-off-by: Andrea Pesaresi <[email protected]>

* Revert "mbedtls: Apply configuration in Configure instead of Prepare"

This reverts commit 5359639.

* mt76: ignore dynamic SMPS requests

when there are Windows machines with dynamic SMPS mode connected
to these radios, they constantly move between dynamic and off states.
something about this toggling causes other clients on the same radio
to disconnect randomly.

Signed-off-by: Andrea Pesaresi <[email protected]>

* Reapply "mbedtls: Apply configuration in Configure instead of Prepare"

This reverts commit 3f1cdf4.

* mac80211: revert to import vanilla changes

Signed-off-by: Andrea Pesaresi <[email protected]>

* hostapd: revert to import vanilla changes

Signed-off-by: Andrea Pesaresi <[email protected]>

* linux-firmware: revert to import vanilla changes

Signed-off-by: Andrea Pesaresi <[email protected]>

* mac80211: import mtk patch on mac80211 6.16

- all patch automatically refreshed

Signed-off-by: Andrea Pesaresi <[email protected]>

* hostapd: import mtk patch

- all patches automatically refreshed

Signed-off-by: Andrea Pesaresi <[email protected]>

* linux-firmware: update to 2025.08.13

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt76: revert to import vanilla changes

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt76: update to 2025.08.13 and apply mtk patch

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt76: revert to import vanilla changes

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt76: import mtk patches

Signed-off-by: Andrea Pesaresi <[email protected]>

* hostapd: revert to import vanilla changes

Signed-off-by: Andrea Pesaresi <[email protected]>

* hostapd: import latest mtk patches

Signed-off-by: Andrea Pesaresi <[email protected]>

* hostapd: revert to import vanilla changes

Signed-off-by: Andrea Pesaresi <[email protected]>

* hostapd: import mtk patches

-manually reworked patch mtk/0013

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt76. revert to import latest vanilla changes

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt76: refresh patches mtk to sync with 2025.08.25

- automatically refreshed

Signed-off-by: Andrea Pesaresi <[email protected]>

* mac80211: refresh patch after latest commit 28.08.2025

- patch 0033 manually refreshed
- other patches automatically refreshed

Signed-off-by: Andrea Pesaresi <[email protected]>

* wifi-script: ucode: align with vanilla

Signed-off-by: Andrea Pesaresi <[email protected]>

* net: ethernet: mediatek: fix rss patch after commit 2025.09.05

- manually fix patch 999-2710

other patches automatically refreshed

Signed-off-by: Andrea Pesaresi <[email protected]>

* Revert "net: ethernet: mediatek: fix rss patch after commit 2025.09.05"

mainstream commit is reverted, I revert also this one

This reverts commit c8f9734.

* net: ethernet: mtk: refresh patches

Signed-off-by: Andrea Pesaresi <[email protected]>

* advanced_setup: added mt3000

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt76: revert to vanilla to import latest vanilla commit

Signed-off-by: Andrea Pesaresi <[email protected]>

* net: eth: mtk: manually refresh mtk patch 999-2710-net-ethernet-mtk_eth_soc-add-rss-support

-this need to be done after this commit: improve mtk_eth_soc performance 2025.09.09
- shrink data structures
- avoid unnecessary divisions
- support GSO fraglist on tx

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt76: manually refresh patches 0013-1016 after update of 2025.09.09

- other patches automatically refreshed

Signed-off-by: Andrea Pesaresi <[email protected]>

* net: ethernet: rename mtk patch 999-2709... 999-2710... to align to mtk numbers

Signed-off-by: Andrea Pesaresi <[email protected]>

* net: ethernet: mtk: disable-RSS-mt7981

Signed-off-by: Andrea Pesaresi <[email protected]>

* net: ethernet: mtk RSS fix-ethtool-hash-function

Signed-off-by: Andrea Pesaresi <[email protected]>

* Revert "kernel: refresh config and set timer tick 300"

This reverts commit f5def0c.

* ksmbd: revert limit repeated connections

After applying the upstream patch e6bb9193974059ddbb0ce7763fa3882bd60d4dc3 (ksmbd: limit repeated connections from clients with the same IP), ksmbd works for Windows and Android clients but fails to connect from Linux/Ubuntu clients.
Mount attempts using gio mount, smbclient, or mount -t cifs hang or timeout.

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt76: revert makefile to import latest vanilla changes

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt76: update to 2025.09.15

- manually refresh patches 1016-9604
- other patches automatically refreshed

Signed-off-by: Andrea Pesaresi <[email protected]>

* ksmbd: instead of remove the multiple connection check, check if it is a real share

Signed-off-by: Andrea Pesaresi <[email protected]>

* ksmbd: removed patch, waiting fix

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt76: fix increase-txq-memory-limit patch

Signed-off-by: Andrea Pesaresi <[email protected]>

* linux-firmware: revert to import latest commit on vanilla

Signed-off-by: Andrea Pesaresi <[email protected]>

* hostapd: revert to import changes on vanilla

Signed-off-by: Andrea Pesaresi <[email protected]>

* linux-firmware: sync with 2025.09.25

Signed-off-by: Andrea Pesaresi <[email protected]>

* hostapd: add mtk patch on vanilla update of 2025.09.25

Signed-off-by: Andrea Pesaresi <[email protected]>

* ksmbd: revert upstream limit repeated connection

the upstream commit https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/fs/smb?h=linux-6.6.y&id=fa1c47af4ff641cf9197ecdb1f8240cbb30389c1
and the extended for ipv6 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/fs/smb?h=linux-6.6.y&id=d9e157fcfebc126cd19b2333a6417a840c24e529
cause a regression if you try to get a connection on nautilus by a double click on share name.
When you do a double click on share name Nautilus try to connect two times, and ksmbd refusing it.
An issue is opened here namjaejeon/ksmbd#512, at the moment, until we don't have a fix upstream I suggest to revert these two commits.

Signed-off-by: Andrea Pesaresi <[email protected]>

* ksmbd: revert my patch to import the one suggested from owrt team

Signed-off-by: Andrea Pesaresi <[email protected]>

* ksmbd: revert upstream limit repeated connection

the upstream commit https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/fs/smb?h=linux-6.6.y&id=fa1c47af4ff641cf9197ecdb1f8240cbb30389c1
and the extended for ipv6 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/fs/smb?h=linux-6.6.y&id=d9e157fcfebc126cd19b2333a6417a840c24e529
cause a regression if you try to get a connection on nautilus by a double click on share name.
When you do a double click on share name Nautilus try to connect two times, and ksmbd refusing it.
An issue is opened here namjaejeon/ksmbd#512, at the moment, until we don't have a fix upstream I suggest to revert these two commits.

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt76: swap to owrt to import vanilla changes

Signed-off-by: Andrea Pesaresi <[email protected]>

* hostapd: revert to import vanilla changes

Signed-off-by: Andrea Pesaresi <[email protected]>

* hostapd: add mtk patches to latest hostapd mod on owrt vanilla

Signed-off-by: Andrea Pesaresi <[email protected]>

* ksmbd: revert my local changes, import upstream

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt76: update to 2025.10.05

patch 1022 was imported upstream with patch 0001_0002 add bf backoff
9703 don't need anymore

patch 1000 and 0004 manually refreshed, other patches automatically refreshed

Signed-off-by: Andrea Pesaresi <[email protected]>

* kernel6.6: ksmbd: browse-interfaces-list-on-FSCTL_QUERY_INTERFACE_INFO

backport from kernel 6.12

ksmbd.mount will give each interfaces list and bind_interfaces_only flags
to ksmbd server. Previously, the interfaces list was sent only
when bind_interfaces_only was enabled.
ksmbd server browse only interfaces list given from ksmbd.conf on
FSCTL_QUERY_INTERFACE_INFO IOCTL.

Signed-off-by: Andrea Pesaresi <[email protected]>

* kernel: ksmbd: add max ip connection parameter

With this patch is set the maximum number of connections per ip address instead of no control.
The default is 8.

Signed-off-by: Andrea Pesaresi <[email protected]>

* netfilter: add two patches: nf_flow_table_core-teardown-direct-xmit-on-dest-changed and flow-Add-bridge_vid-member

flow-Add-bridge_vid-member:
ericwoud/linux@a73a210

nf_flow_table_core-teardown-direct-xmit-on-dest-changed:
ericwoud/linux@f28c2e0

Signed-off-by: Andrea Pesaresi <[email protected]>

* net: eth: mtk: ranamed patch to align with mtk sdk and fix queue on case speed 2500

Signed-off-by: Andrea Pesaresi <[email protected]>

* net: mtk: fix eth-24-mtk_eth_soc-add-2500Mbps-maximum-rate-limit-for-NETSYSv3

Signed-off-by: Andrea Pesaresi <[email protected]>

* Revert "net: mtk: fix eth-24-mtk_eth_soc-add-2500Mbps-maximum-rate-limit-for-NETSYSv3"

This reverts commit e5983bd.

* Revert "net: eth: mtk: ranamed patch to align with mtk sdk and fix queue on case speed 2500"

This reverts commit 0d8cf30.

* mt76: update to 2025-10-13

Signed-off-by: Andrea Pesaresi <[email protected]>

* linux-firmware: revert to import vanilla

Signed-off-by: Andrea Pesaresi <[email protected]>

* Revert "kernel: ksmbd: add max ip connection parameter"

This reverts commit 3580d95.

* Revert "kernel6.6: ksmbd: browse-interfaces-list-on-FSCTL_QUERY_INTERFACE_INFO"

This reverts commit 39da6ff.

* linux-firmware: update to 2025.10.16

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt76: revert to import vanilla changes

Signed-off-by: Andrea Pesaresi <[email protected]>

* mt76: update to 2025.10.20

- manually refresh patches 2000 and 1008
- removed 9601 imported upstream

Signed-off-by: Andrea Pesaresi <[email protected]>

* hostapd: revert to import latest upstream patches

Signed-off-by: Andrea Pesaresi <[email protected]>

* hostapd: import mtk patch on latest release

Signed-off-by: Andrea Pesaresi <[email protected]>

* advanced_setup: procd-compatible

Signed-off-by: Andrea Pesaresi <[email protected]>

* kernel: refresh patches

Signed-off-by: Andrea Pesaresi <[email protected]>

* kernel: add power on off control

cat /sys/devices/platform/regulator-usb-vbus/usb_vbus_enable  # read status
echo 0 > /sys/devices/platform/regulator-usb-vbus/usb_vbus_enable  # power off USB
echo 1 > /sys/devices/platform/regulator-usb-vbus/usb_vbus_enable  # power on USB

Signed-off-by: Andrea Pesaresi <[email protected]>

* advanced_setup: now power can be set from LuCi

Signed-off-by: Andrea Pesaresi <[email protected]>

* linu-firmware: revert to import latest mod

Signed-off-by: Andrea Pesaresi <[email protected]>

* linux-firmware: update to 2025.10.24

Signed-off-by: Andrea Pesaresi <[email protected]>

* realtek: add serdes mapping for rtl930x

On the RTL930x series the serdes #3 is backed by serdes openwrt#10 when pages
0, 1, 2 or 3 are accessed [1]. This changeset modifies the sds mapping
function from a single implementation for the 3 families to one
implementation per chip family. In particular it implements the mapping
required for the rtl930x one.

[1] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_sds.c#L624

Signed-off-by: Damien Dejean <[email protected]>
Link: openwrt#20472
Signed-off-by: Robert Marko <[email protected]>

* realtek: add serdes patch for 10G_QXGMII

Adds the serdes patch sequence [1] and configuration [2] for the
PHY_INTERFACE_MODE_10G_QXGMII mode (aka USXGMII_QX in Realtek sources).
It is required by devices with light bootloaders (ie not u-boot) that
does not initialize the hardware before booting the kernel.

[1] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L1075
[2] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L1315

Signed-off-by: Damien Dejean <[email protected]>
Link: openwrt#20472
Signed-off-by: Robert Marko <[email protected]>

* realtek: add 10G_QXGMII serdes mode support for RTL930x

In Realtek implementation USXGMII is divided in submodes:
 - USXGMII_SX: 10G single link, equivalent of PHY_INTERFACE_MODE_USXGMII
 - USXGMII_DX: 10G two links (2*5G ?),
 - USXGMII_QX: 10G four links, presumably 4*2.5G, used with the RTL8224,
   equivalent of PHY_INTERFACE_MODE_10G_QXGMII.

This CL adds the 10_GQXGMII modes to the RTL930x implementation. In
particular the "mode set" function is extended to support both simple
mode set, and force mode set depending on the mode according to
dal_longan_sds_mode_set [1].

[1] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_sds.c#L1746

Signed-off-by: Damien Dejean <[email protected]>
Link: openwrt#20472
Signed-off-by: Robert Marko <[email protected]>

* Revert "build: Add _FORTIFY_SOURCE=3 support"

This reverts commit 93f8662.

* Revert "toolchain: fortify-headers: Update to version 2.3.3"

This reverts commit 6268692.

* bmips: fix leds on f@st3864op

gpio-leds were not working on F@ST3864OP before  was merged.

This pull request adds definitions for all LEDs, including the previously
non-working WAN LEDs.

Signed-off-by: Hang Zhou <[email protected]>
Link: openwrt#20533
Signed-off-by: Álvaro Fernández Rojas <[email protected]>

* toolchain: fortify-headers: Fix build of some packages

Fix some warnings and compile errors generated by the new
fortify-headers when compiling some applications like strace.

Fixes: 6268692 ("toolchain: fortify-headers: Update to version 2.3.3")
Link: openwrt#20561
Signed-off-by: Hauke Mehrtens <[email protected]>

* elfutils: add compatibility with new fortify-headers

Add compatibility with the new fortify-headers 2.3.3 by
disabling two warnings.

Fixes: 6268692 ("toolchain: fortify-headers: Update to version 2.3.3")
Signed-off-by: Hannu Nyman <[email protected]>
Link: openwrt#20552
Signed-off-by: Hauke Mehrtens <[email protected]>

* odhcpd: update to Git HEAD (2025-10-26)

fc27940fe993 dhcpv6: support a configurable DUID
ae16476bcad2 dhcpv6-ia: split reconf_msg struct into partial structs
a3bf57a39958 dhcpv6: split clientid to a separate struct
14da3727ac0c dhcpv6-ia: simplify/fix IID calculations
f49574e42e78 odhcpd: change "-c" cmd line arg to take a dir
0900202c2754 dhcpv4: dhcpv4_lease() - clarify which variables are requests
2c1e6e7c3ebf dhcpv4: dhcpv4_lease() - simplification
48487aedead8 dhcpv4: dhcpv4_lease() - convert to switch statement
3ad54baa4adc dhcpv4: dhcpv4_assign() - explain address assignment
fab8f67818e6 dhcpv6: send timezone only when client requests

openwrt/odhcpd@0d0fac3...fc27940

Fixes: 28bb40c ("odhcpd: update to Git HEAD (2025-10-22)")
Link: openwrt#20559
Signed-off-by: Álvaro Fernández Rojas <[email protected]>

* airoha: add nodes for 3rd PCIe line for AN7581

Some SoC might use the Serdes for the second USB port as a 3rd PCIe
line (with the SSTR register correctly setup).

Add the node for the 3rd PCIe card and enable for the eMMC RFB board.

Signed-off-by: Christian Marangi <[email protected]>

* ipq40xx: remove ethernet0 alias for Netgear LBR20

This will remove the ethernet0 alias and TODO as setting the LAN MAC via
nvmem to gmac0 will set the correct mac to the switch.

Signed-off-by: Christoph Krapp <[email protected]>
Link: openwrt#20558
Signed-off-by: Robert Marko <[email protected]>

* ipq40xx: improve Netgear LBR20 LED config

This aligns the LED behaviour with other Orbi devices. Orbi devices have
multiple RBG LEDs at the top of the device and two status LEDs at the
back next to the barrel jack.
The current behaviour of other Orbi devices is to use the multi-color
LEDs at the top for status indication and the green/red LEDs at the back
for running/panic-indication. This matches the vendor behaviour except
the color choice.
Other devices use green as running, blue on upgrade, red on failsafe and
white on bootup, so this aligns the LBR20 behaviour to the rest.

Signed-off-by: Christoph Krapp <[email protected]>
Link: openwrt#20558
Signed-off-by: Robert Marko <[email protected]>

* ipq40xx: fix sysupgrade image for Netgear LBR20

This fixes the sysupgrade image generation for the LBR20 as before
updating resulted in a brick which needed to be recovered using
nmrpflash.

UART log of a bricked unit:
Loading DNI firmware for checking...
Loading firmware 1 ...

NAND read: device 0 offset 0xa600000, size 0x20000
 131072 bytes read: OK

NAND read: device 0 offset 0xa600000, size 0x380000
 3670016 bytes read: OK
rootfs imge header corrupted !
Loading firmware 2 ...

NAND read: device 0 offset 0xa600000, size 0x20000
 131072 bytes read: OK

NAND read: device 0 offset 0xa600000, size 0x380000
 3670016 bytes read: OK
rootfs imge header corrupted !

Comparing the partition contents of a bricked and a working unit showed
that on the bricked one the fake uImage header was missing. The UBI
partition also showed significant changes. Both are fixed when the
base DniImage receipt is used.

Signed-off-by: Christoph Krapp <[email protected]>
Link: openwrt#20558
Signed-off-by: Robert Marko <[email protected]>

* realtek: pcs: rtl930x: import SerDes setup code from PHY driver

Import SerDes configuration code from PHY driver into the PCS driver.
Only do mandatory adjustments, rename the function to adhere to the
naming scheme, adjust all SerDes access calls.

Signed-off-by: Jonas Jelonek <[email protected]>
Link: openwrt#20539
Signed-off-by: Robert Marko <[email protected]>

* realtek: pcs: rtl930x: use regmap for register access

Use regmap to access registers in the global register space so we don't
have to use the old macros sw_r32/sw_w32 anymore.

Signed-off-by: Jonas Jelonek <[email protected]>
Link: openwrt#20539
Signed-off-by: Robert Marko <[email protected]>

* realtek: dsa,pcs: rtl930x: let PCS driver setup SerDes

Remove SerDes initialization/configuration calls from the DSA driver in
'rtl93xx_phylink_mac_config' and let our PCS driver setup the SerDes now
that the driver is able to do that.

Adjust some details in rtl93xx_phylink_mac_config to ensure the MAC is
properly disabled MAC before configuring the SerDes. This was done
within the SerDes code before.

Signed-off-by: Jonas Jelonek <[email protected]>
Link: openwrt#20539
Signed-off-by: Robert Marko <[email protected]>

* wifi-scripts: ucode: fix check for empty crypto object while scanning

it can be empty

Signed-off-by: Leon M. Busch-George <[email protected]>
Link: openwrt#20526
Signed-off-by: Robert Marko <[email protected]>

* realtek: rtl838x: fix regression in enable_phy_polling

Fix regression from back when support for RTL930x was added.
While at it replace 0x8000 by BIT(15).

Fixes: 2702927

Tested-by: Jonas Jelonek <[email protected]>
Signed-off-by: Felix Baumann <[email protected]>
Link: openwrt#20549
Signed-off-by: Robert Marko <[email protected]>

* airoha: add pending patch for USB support on AN7581

Add pending patch for USB support on AN7581 SoC. This is also required
to make operational the 3rd PCIe line that use the USB2 Serdes for PCIe
operations.

Signed-off-by: Christian Marangi <[email protected]>

* airoha: an7581: add USB nodes

Add USB nodes to AN7581 DTSI, disabled by default.

Signed-off-by: Christian Marangi <[email protected]>

* airoha: an7581: correctly attach the USB2 PHY for 3rd PCIe line

The 3rd PCIe line use the USB2 serdes for PCIe operation. Correctly set
it to the DT node so that the mode can be correctly set in the PHY
driver.

Signed-off-by: Christian Marangi <[email protected]>

* airoha: an7581: enable USB node on eMMC RFB board

Enable USB node on eMMC RFB board and disable USB2 3.0 port to make the
3rd PCIe line correctly work.

This is needed to prevent the xHCI driver to mess with PCIe by
configuring the USB2 3.0 port. Port will still be detected but won't be
configureed by the driver and won't have PHY to configure for.

Signed-off-by: Christian Marangi <[email protected]>

* Revert "toolchain: fortify-headers: Fix build of some packages"

This reverts commit 61f16a6.

The new fortify-headers version needs some more work to be usable in
OpenWrt. Revert this to fix the builds again.

Signed-off-by: Hauke Mehrtens <[email protected]>

* Revert "toolchain: fortify-headers: Update to version 2.3.3"

This reverts commit 6268692.

The new fortify-headers version needs some more work to be usable in
OpenWrt. Revert this to fix the builds again.

Signed-off-by: Hauke Mehrtens <[email protected]>

* Revert "elfutils: add compatibility with new fortify-headers"

This reverts commit 096739a.

The new fortify-headers version needs some more work to be usable in
OpenWrt. Revert this to fix the builds again.

Signed-off-by: Hauke Mehrtens <[email protected]>

* airoha: adjust and default the loadaddr

Similar to e92b153 ("mediatek: introduce KERNEL_LOADADDR to Device/Default template"),
let's move the default loadaddr to Device/Default.

What's more, use 0x80200000 instead of the SDK default value 0x80088000
to avoid the following error which may overwrite TZ memory and cause crash:

    [    0.000000] [Firmware Bug]: Kernel image misaligned at boot, please fix your bootloader!
    [    0.000000] OF: reserved mem: Reserved memory: failed to reserve memory for node 'atf@80000000': base 0x0000000080000000, size 2 MiB

Signed-off-by: Ziyang Huang <[email protected]>
[ fix spelling mistake ]
Link: openwrt#20470
Signed-off-by: Christian Marangi <[email protected]>

* airoha: Add missing board files for EN7581

Add missing leds and network board files for EN7581 SoC.

Signed-off-by: Lorenzo Bianconi <[email protected]>
[ drop reference to downstream 10g RFB board ]
Link: openwrt#20556
Signed-off-by: Christian Marangi <[email protected]>

* airoha: backport minor fixes for NPU handling

Backport upstream minor fixed for NPU handling that might result in
kernel panic or handle leak.

Signed-off-by: Christian Marangi <[email protected]>

* kernel: rtl8261n: Correct serdes global config register

Fix typo in register for the serdes global config.

Fixes: ddb0cd2 ("kernel: rtl8261n: add support for Serdes TX swap")
Signed-off-by: Richard Huynh <[email protected]>
[ add commit description ]
Link: openwrt#20465
Signed-off-by: Christian Marangi <[email protected]>

* kernel: rtl8261n: Add support for Serdes RX swap

Datasheet claims this register bit is supposed to be set by default,
however it was found in practice to not be, and OEM drivers would set
this bit at the same time.

Signed-off-by: Richard Huynh <[email protected]>
Link: openwrt#20465
Signed-off-by: Christian Marangi <[email protected]>

* ucode-mod-uline: drop usage of AUTORELEASE

AUTORELEASE has been deprecated from a long time. Drop it and hardcode
the release following the current one present in the downloads
repository.

Link: openwrt#20586
Signed-off-by: Christian Marangi <[email protected]>

* cli: drop usage of AUTORELEASE

AUTORELEASE has been deprecated from a long time. Drop it and hardcode
the release following the current one present in the downloads
repository.

Link: openwrt#20586
Signed-off-by: Christian Marangi <[email protected]>

* provision: drop usage of AUTORELEASE

AUTORELEASE has been deprecated from a long time. Drop it and hardcode
the release following the current one present in the downloads
repository.

Link: openwrt#20586
Signed-off-by: Christian Marangi <[email protected]>

* unetmsg: drop usage of AUTORELEASE

AUTORELEASE has been deprecated from a long time. Drop it and hardcode
the release following the current one present in the downloads
repository.

Link: openwrt#20586
Signed-off-by: Christian Marangi <[email protected]>

* uboot-bmips: drop usage of AUTORELEASE

AUTORELEASE has been deprecated from a long time. Drop it and hardcode
the release following the current one present in the downloads
repository.

Link: openwrt#20586
Signed-off-by: Christian Marangi <[email protected]>

* uboot-bcm53xx: drop usage of AUTORELEASE

AUTORELEASE has been deprecated from a long time. Drop it and hardcode
the release following the current one present in the downloads
repository.

Link: openwrt#20586
Signed-off-by: Christian Marangi <[email protected]>

* rules.mk: add DEPRECATION NOTICE for AUTORELEASE

Add DEPRECATION NOTICE for AUTORELEASE to signal that any usage of this
should be dropped and fixed.

The macro is still defined for legacy reason but we at least dropped any
usage of it in both main and feeds.

Link: openwrt#20586
Signed-off-by: Christian Marangi <[email protected]>

* Revert "sdk: use git-src-full to allow Git versioning"

This reverts commit f795ecc.

Now that AUTORELEASE has been dropped from main, we can go back on
shallow clone it for faster SDK usage.

Link: openwrt#20586
Signed-off-by: Christian Marangi <[email protected]>

* ipq40xx: add support for ASUS Lyra Mini (MAP-AC1300)

The device is the little brother of the already supported ASUS Lyra but
with the flash configuration/layout of the RT-AC58U.

Hardware
--------
SOC:    Qualcomm IPQ4019
FLASH:  2MB (Macronix MX25L1606E)
        128MB (GigaDevice GD5F1GQ4UCYIG)
RAM:    256MB (Nanya NT5CC128M16IP-DI)
WIFI:   Qualcomm IPQ4019
BT:     Atheros AR3012-BL3D
ETH:    1x WAN, 1x LAN
LED:    1 RBG LED
BTN:    WPS, Reset
UART:   115200 8N1 (square pin = VCC) VCC-TX-RX-GND

MAC addresses
-------------
LAN     2.4G + 1
WAN     2.4G + 3
2.4G    Label MAC (stored in factory offset 0x1006)
5G      2.4G + 2 (stored in factory offset 0x5006)

Installation
------------
SSH
---
1. Reset the device, setup and enable SSH.
2. Transfer initramfs.itb to /tmp on the device.
3. SSH into the router, credentials are the same as in the web ui.
4. Write initramfs to linux partition:
   mtd-write -d linux -i initramfs.itb
5. Reboot and wait for OpenWrt to boot.
6. Transfer sysupgrade.bin to /tmp on the device.
7. SSH into the router, user root, no pw.
8. Delete jffs2 ubi partition:
   ubirmvol /dev/ubi0 --name=jffs2
9. Flash OpenWrt:
   sysupgrade -n sysupgrade.bin

Signed-off-by: Christoph Krapp <[email protected]>
Link: openwrt#20573
Signed-off-by: Robert Marko <[email protected]>

* airoha: support openwrt,netdev-name for renaming interfaces

Add support to the airoha target for the OpenWrt-specific DT property
`openwrt,netdev-name`. In particular, this is for interfaces under
non-DSA `airoha_eth` interfaces.

This will avoid conflicts with upstream code[1]; and maintain forward
compatibility with OpenWrt configurations if/when `airoha_eth` becomes
a full DSA driver.

[1] https://lore.kernel.org/netdev/20240709124503.pubki5nwjfbedhhy@skbuf/

Borrowed from d4d6c48 (mediatek: filogic: support openwrt,netdev-name for renaming interfaces)

Signed-off-by: Kenneth Kasilag <[email protected]>
Link: openwrt#20475
Signed-off-by: Robert Marko <[email protected]>

* mt7981: enable irqs for rss to have compatibility with this repo

Signed-off-by: Andrea Pesaresi <[email protected]>

* Reapply "toolchain: fortify-headers: Update to version 2.3.3"

This reverts commit e5a6cfc.

* Reapply "build: Add _FORTIFY_SOURCE=3 support"

This reverts commit 4ec07b7.

* linux-firmware: set the correct source date

Signed-off-by: Andrea Pesaresi <[email protected]>

---------

Signed-off-by: Andrea Pesaresi <[email protected]>
Signed-off-by: Damien Dejean <[email protected]>
Signed-off-by: Robert Marko <[email protected]>
Signed-off-by: Hang Zhou <[email protected]>
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
Signed-off-by: Hauke Mehrtens <[email protected]>
Signed-off-by: Hannu Nyman <[email protected]>
Signed-off-by: Christian Marangi <[email protected]>
Signed-off-by: Christoph Krapp <[email protected]>
Signed-off-by: Jonas Jelonek <[email protected]>
Signed-off-by: Leon M. Busch-George <[email protected]>
Signed-off-by: Felix Baumann <[email protected]>
Signed-off-by: Ziyang Huang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Richard Huynh <[email protected]>
Signed-off-by: Kenneth Kasilag <[email protected]>
Co-authored-by: Andrea Pesaresi <[email protected]>
Co-authored-by: Damien Dejean <[email protected]>
Co-authored-by: Hang Zhou <[email protected]>
Co-authored-by: Hauke Mehrtens <[email protected]>
Co-authored-by: Hannu Nyman <[email protected]>
Co-authored-by: Álvaro Fernández Rojas <[email protected]>
Co-authored-by: Christian Marangi <[email protected]>
Co-authored-by: Christoph Krapp <[email protected]>
Co-authored-by: Jonas Jelonek <[email protected]>
Co-authored-by: Leon M. Busch-George <[email protected]>
Co-authored-by: Felix Baumann <[email protected]>
Co-authored-by: Ziyang Huang <[email protected]>
Co-authored-by: Lorenzo Bianconi <[email protected]>
Co-authored-by: Richard Huynh <[email protected]>
Co-authored-by: Kenneth Kasilag <[email protected]>
Vladdrako pushed a commit to Vladdrako/openwrt that referenced this pull request Nov 3, 2025
On the RTL930x series the serdes #3 is backed by serdes openwrt#10 when pages
0, 1, 2 or 3 are accessed [1]. This changeset modifies the sds mapping
function from a single implementation for the 3 families to one
implementation per chip family. In particular it implements the mapping
required for the rtl930x one.

[1] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_sds.c#L624

Signed-off-by: Damien Dejean <[email protected]>
Link: openwrt#20472
Signed-off-by: Robert Marko <[email protected]>
Vladdrako pushed a commit to Vladdrako/openwrt that referenced this pull request Nov 3, 2025
Adds the serdes patch sequence [1] and configuration [2] for the
PHY_INTERFACE_MODE_10G_QXGMII mode (aka USXGMII_QX in Realtek sources).
It is required by devices with light bootloaders (ie not u-boot) that
does not initialize the hardware before booting the kernel.

[1] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L1075
[2] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L1315

Signed-off-by: Damien Dejean <[email protected]>
Link: openwrt#20472
Signed-off-by: Robert Marko <[email protected]>
Vladdrako pushed a commit to Vladdrako/openwrt that referenced this pull request Nov 3, 2025
In Realtek implementation USXGMII is divided in submodes:
 - USXGMII_SX: 10G single link, equivalent of PHY_INTERFACE_MODE_USXGMII
 - USXGMII_DX: 10G two links (2*5G ?),
 - USXGMII_QX: 10G four links, presumably 4*2.5G, used with the RTL8224,
   equivalent of PHY_INTERFACE_MODE_10G_QXGMII.

This CL adds the 10_GQXGMII modes to the RTL930x implementation. In
particular the "mode set" function is extended to support both simple
mode set, and force mode set depending on the mode according to
dal_longan_sds_mode_set [1].

[1] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_sds.c#L1746

Signed-off-by: Damien Dejean <[email protected]>
Link: openwrt#20472
Signed-off-by: Robert Marko <[email protected]>
@ddejean

ddejean commented Nov 20, 2025

Copy link
Copy Markdown
Contributor Author

@ecsv would you be able to test https://github.com/ddejean/openwrt/tree/xmg1915-10e on your device? I'm curious to see if both serdes patch and RTL8224 patch together would fix the issue ?

@ecsv

ecsv commented Nov 20, 2025

Copy link
Copy Markdown
Contributor

@ecsv would you be able to test https://github.com/ddejean/openwrt/tree/xmg1915-10e on your device? I'm curious to see if both serdes patch and RTL8224 patch together would fix the issue ?

No, can't do this at the moment. But I've asked @0xharshal a while back to perform a test with both your RTL8224 driver and the serdes patching.

@0xharshal

0xharshal commented Nov 21, 2025 •

Copy link
Copy Markdown
Contributor

Hey sorry for replying very late @ddejean.

I have been playing with PSX10 with ddejean:rtk-10g-qxgmii without rtk init part in the bootcmd.

I saw very weird results.

Only the first two rtl8224 ports connected to each serdes work, and that too only if 1G ethernet is connected to the 1st port of the said serdes.

Repeating same statement with an example,
In the photo below, if I plug in 1G ethernet then I see lan1 up (rx/tx does not work). After this if I plug in 1G switch into port 2, lan2 also comes up (rx/tx works here). But this is not true for lan3 and lan4, they never come up. The behavior is similar for lan5, lan6 (works after plugging in 1g on lan5) and lan7, lan8 (does not work)
PSX10-ports-scaled

If I plug in 2.5G for the first time in lan1 or lan5, lan2 or lan6 never works.

Also the PHY leds do not work.

The behavior stays similar with rtk init but at phy LEDs start working.

@ddejean

ddejean commented Nov 21, 2025 •

Copy link
Copy Markdown
Contributor Author

Thanks for the testing @0xharshal! Actually the results are very interesting because they look like something I observed with my own device when the MDI polarity and pair swap was not correctly configured.

On my device, the driver has to configure the MDI polarity and pair swap for each port because the registers are in a random state after a reset. If not specified in the device tree, the registers values are set to 0. Since this configuration is not specified in your device tree, the 0 value might be wrong for you. If we can fix this temporarily, we might be able to make a move forward.

If you're willing to give it a try, you can either try to dump the registers values after a rtk init or comment the code that sets the configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

target/realtek pull request/issue for realtek target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants