Skip to content

airoha: an7581: w1700k: fix RTL8261N PHY boot failure - #22564

Merged
openwrt-bot merged 1 commit into
openwrt:mainfrom
rchen14b:airoha-rtl8261n-reset-timing
May 14, 2026
Merged

openwrt-bot merged 1 commit into
openwrt:mainfrom
rchen14b:airoha-rtl8261n-reset-timing

Conversation

@rchen14b

Copy link
Copy Markdown
Contributor

Summary

Fix intermittent 10G PHY boot failure on W1700K and XR1701G boards
with Realtek RTL8261N/RTL8261BE PHYs.

On cold boot, the USXGMII link sometimes fails to come up and stays
dead until power cycle. The RTL8261N needs time to load its internal
firmware after reset deassertion. The current GPIO reset timing
(40ms assert / 150ms deassert) is too short — the PHY firmware load
hasn't completed when the PCS starts link training.

Fix: increase both PHY reset assert and deassert delays to 200ms,
matching the OEM firmware values.

Confirmed fix on:

  • Gemtek W1700K (RTL8261N on phy5/lan2 and phy8/wan)
  • XR1701G (RTL8261BE)

Multiple users reported this issue:

Test plan

  • Cold boot 20+ times with 10G device plugged in
  • Verify link comes up reliably on both lan2 and wan
  • Verify no regression on boot time (adds ~100ms total)

@rchen14b

Copy link
Copy Markdown
Contributor Author

@hurrian Confirmed with couple users this fixed the 10G phy boot up issue.

@github-actions github-actions Bot added the target/airoha pull request/issue for airoha target label Mar 22, 2026
@glassd00r

Copy link
Copy Markdown

Confirmed.
I have a unit of w1700k hw v1.1 which Lan2 will fail upon bootup as much as 50% of the time.
With this fix, it boots up reliably and no issues with wan or Lan2 thus far.

@hurrian

hurrian commented Mar 23, 2026

Copy link
Copy Markdown
Contributor

Please revise commit title to pass test formalities, it's too long (airoha: an7581: w1700k: fix RTL8261N PHY boot failure with increased reset timing); otherwise the change looks good to me.

Later W1700K hardware revisions and all known XR1710G are affected by this bug.

@danpawlik

danpawlik commented Mar 28, 2026 •

Copy link
Copy Markdown
Contributor

After testing change related to realtek driver - #22563 - I spotted an issue that the w1700k got difficulties to start. More, it has such traceback: #22563 (comment)

To solve that issue, it seems we just need to change interrupts: 2ba2afb and all seems to work normally - hard reboot/soft reboot.

@rchen14b If you could include that in the patch or should I create another one?

@rchen14b

Copy link
Copy Markdown
Contributor Author

After testing change related to realtek driver - #22563 - I spotted an issue that the w1700k got difficulties to start. More, it has such traceback: #22563 (comment)

To solve that issue, it seems we just need to change interrupts: 2ba2afb and all seems to work normally - hard reboot/soft reboot.

@rchen14b If you could include that in the patch or should I create another one?

I have tested the edge failing solution, it breaks the irqbalance and also caused 1G port acting up.

@danpawlik

Copy link
Copy Markdown
Contributor

After testing change related to realtek driver - #22563 - I spotted an issue that the w1700k got difficulties to start. More, it has such traceback: #22563 (comment)
To solve that issue, it seems we just need to change interrupts: 2ba2afb and all seems to work normally - hard reboot/soft reboot.
@rchen14b If you could include that in the patch or should I create another one?

I have tested the edge failing solution, it breaks the irqbalance and also caused 1G port acting up.

Not sure about 1G acting up - it works, but after 3th unplug-plug back it stops working. Interesting. After reboot works normally.
About irqbalance - right, it stopped working.

@OpenWRT-fanboy

Copy link
Copy Markdown

@rchen14b @danpawlik Given what you guys said above, here's my suggestion:

  1. Remove the interrupts in the W1700k DTS through a PR. The current Realtek driver doesn't use it anyway, so there's no big loss.
  2. Only put back the interrupts once we can get it compatible with the new Realtek driver and irqbalance. Depending on the timing of when this issue gets solved, it can be included with the driver PR or patched in afterwards.

@danpawlik

danpawlik commented Mar 29, 2026 •

Copy link
Copy Markdown
Contributor

@OpenWRT-fanboy I tested your proposal - f12351f - and... it works with #22563. 1G and 10G works, irqbalance - works. All seems to be fine, but - 3 seconds is required on unplug/plug cable or ip link set lan2 down; ip link set lan2 up. TBH It seems the best solution and it does not require #22536.
WDYT @rchen14b ?

@rchen14b

Copy link
Copy Markdown
Contributor Author

@OpenWRT-fanboy I tested your proposal - f12351f - and... it works with #22563. 1G and 10G works, irqbalance - works. All seems to be fine, but - 3 seconds is required on unplug/plug cable or ip link set lan2 down; ip link set lan2 up. TBH It seems the best solution and it does not require #22536.

WDYT @rchen14b ?

PR 22536 is meant to fix that link come up issue. I don't have any issue with that dts interrupts, but I can test how it will look like with the remove interrupts commit.

OpenWRT-fanboy pushed a commit to OpenWRT-fanboy/OpenW1700k that referenced this pull request May 14, 2026
…ure with increased reset timing

Some W1700K and XR1701G boards with Realtek RTL8261N/RTL8261BE 10G PHYs
fail to bring up the USXGMII link on cold boot. The PHY enters a bad
state during initialization and the link stays down permanently until
power cycle.

Root cause: the GPIO reset assert/deassert timing (40ms/150ms) is too
short for the RTL8261N to complete its internal firmware load. The OEM
firmware uses 200ms/200ms.

Increase both PHY reset timings to 200ms/200ms to match OEM values.
Confirmed to fix intermittent boot failures on both W1700K (Gemtek)
and XR1701G boards.

Signed-off-by: Ryan Chen <[email protected]>
OpenWRT-fanboy pushed a commit to OpenWRT-fanboy/OpenW1700k that referenced this pull request May 14, 2026
…ure with increased reset timing

Some W1700K and XR1701G boards with Realtek RTL8261N/RTL8261BE 10G PHYs
fail to bring up the USXGMII link on cold boot. The PHY enters a bad
state during initialization and the link stays down permanently until
power cycle.

Root cause: the GPIO reset assert/deassert timing (40ms/150ms) is too
short for the RTL8261N to complete its internal firmware load. The OEM
firmware uses 200ms/200ms.

Increase both PHY reset timings to 200ms/200ms to match OEM values.
Confirmed to fix intermittent boot failures on both W1700K (Gemtek)
and XR1701G boards.

Signed-off-by: Ryan Chen <[email protected]>
OpenWRT-fanboy pushed a commit to OpenWRT-fanboy/OpenW1700k that referenced this pull request May 14, 2026
…ure with increased reset timing

Some W1700K and XR1701G boards with Realtek RTL8261N/RTL8261BE 10G PHYs
fail to bring up the USXGMII link on cold boot. The PHY enters a bad
state during initialization and the link stays down permanently until
power cycle.

Root cause: the GPIO reset assert/deassert timing (40ms/150ms) is too
short for the RTL8261N to complete its internal firmware load. The OEM
firmware uses 200ms/200ms.

Increase both PHY reset timings to 200ms/200ms to match OEM values.
Confirmed to fix intermittent boot failures on both W1700K (Gemtek)
and XR1701G boards.

Signed-off-by: Ryan Chen <[email protected]>
…reset timing

Some W1700K and XR1701G boards with Realtek RTL8261N/RTL8261BE 10G PHYs
fail to bring up the USXGMII link on cold boot. The PHY enters a bad
state during initialization and the link stays down permanently until
power cycle.

Root cause: the GPIO reset assert/deassert timing (40ms/150ms) is too
short for the RTL8261N to complete its internal firmware load. The OEM
firmware uses 200ms/200ms.

Increase both PHY reset timings to 200ms/200ms to match OEM values.
Confirmed to fix intermittent boot failures on both W1700K (Gemtek)
and XR1701G boards.

Signed-off-by: Ryan Chen <[email protected]>
Link: openwrt#22564
Signed-off-by: Hauke Mehrtens <[email protected]>
@hauke
hauke force-pushed the airoha-rtl8261n-reset-timing branch from 0ee9fab to 7be78e7 Compare May 14, 2026 17:24
@openwrt-bot
openwrt-bot merged commit 7be78e7 into openwrt:main May 14, 2026
4 checks passed
dchard pushed a commit to dchard/openwrt that referenced this pull request May 15, 2026
…reset timing

Some W1700K and XR1701G boards with Realtek RTL8261N/RTL8261BE 10G PHYs
fail to bring up the USXGMII link on cold boot. The PHY enters a bad
state during initialization and the link stays down permanently until
power cycle.

Root cause: the GPIO reset assert/deassert timing (40ms/150ms) is too
short for the RTL8261N to complete its internal firmware load. The OEM
firmware uses 200ms/200ms.

Increase both PHY reset timings to 200ms/200ms to match OEM values.
Confirmed to fix intermittent boot failures on both W1700K (Gemtek)
and XR1701G boards.

Signed-off-by: Ryan Chen <[email protected]>
Link: openwrt#22564
Signed-off-by: Hauke Mehrtens <[email protected]>
andrewjlamarche pushed a commit to andrewjlamarche/openwrt that referenced this pull request May 15, 2026
…reset timing

Some W1700K and XR1701G boards with Realtek RTL8261N/RTL8261BE 10G PHYs
fail to bring up the USXGMII link on cold boot. The PHY enters a bad
state during initialization and the link stays down permanently until
power cycle.

Root cause: the GPIO reset assert/deassert timing (40ms/150ms) is too
short for the RTL8261N to complete its internal firmware load. The OEM
firmware uses 200ms/200ms.

Increase both PHY reset timings to 200ms/200ms to match OEM values.
Confirmed to fix intermittent boot failures on both W1700K (Gemtek)
and XR1701G boards.

Signed-off-by: Ryan Chen <[email protected]>
Link: openwrt#22564
Signed-off-by: Hauke Mehrtens <[email protected]>
(cherry picked from commit 7be78e7)
andrewjlamarche pushed a commit to andrewjlamarche/openwrt that referenced this pull request May 15, 2026
…reset timing

Some W1700K and XR1701G boards with Realtek RTL8261N/RTL8261BE 10G PHYs
fail to bring up the USXGMII link on cold boot. The PHY enters a bad
state during initialization and the link stays down permanently until
power cycle.

Root cause: the GPIO reset assert/deassert timing (40ms/150ms) is too
short for the RTL8261N to complete its internal firmware load. The OEM
firmware uses 200ms/200ms.

Increase both PHY reset timings to 200ms/200ms to match OEM values.
Confirmed to fix intermittent boot failures on both W1700K (Gemtek)
and XR1701G boards.

Signed-off-by: Ryan Chen <[email protected]>
Link: openwrt#22564
Signed-off-by: Hauke Mehrtens <[email protected]>
(cherry picked from commit 7be78e7)
glassd00r pushed a commit to glassd00r/openwrt that referenced this pull request Jun 19, 2026
…reset timing

Some W1700K and XR1701G boards with Realtek RTL8261N/RTL8261BE 10G PHYs
fail to bring up the USXGMII link on cold boot. The PHY enters a bad
state during initialization and the link stays down permanently until
power cycle.

Root cause: the GPIO reset assert/deassert timing (40ms/150ms) is too
short for the RTL8261N to complete its internal firmware load. The OEM
firmware uses 200ms/200ms.

Increase both PHY reset timings to 200ms/200ms to match OEM values.
Confirmed to fix intermittent boot failures on both W1700K (Gemtek)
and XR1701G boards.

Signed-off-by: Ryan Chen <[email protected]>
Link: openwrt#22564
Signed-off-by: Hauke Mehrtens <[email protected]>
(cherry picked from commit 7be78e7)
sp4rkiop pushed a commit to sp4rkiop/openwrt that referenced this pull request Jun 23, 2026
…reset timing

Some W1700K and XR1701G boards with Realtek RTL8261N/RTL8261BE 10G PHYs
fail to bring up the USXGMII link on cold boot. The PHY enters a bad
state during initialization and the link stays down permanently until
power cycle.

Root cause: the GPIO reset assert/deassert timing (40ms/150ms) is too
short for the RTL8261N to complete its internal firmware load. The OEM
firmware uses 200ms/200ms.

Increase both PHY reset timings to 200ms/200ms to match OEM values.
Confirmed to fix intermittent boot failures on both W1700K (Gemtek)
and XR1701G boards.

Signed-off-by: Ryan Chen <[email protected]>
Link: openwrt#22564
Signed-off-by: Hauke Mehrtens <[email protected]>
andrewjlamarche pushed a commit to andrewjlamarche/openwrt that referenced this pull request Jul 1, 2026
…reset timing

Some W1700K and XR1701G boards with Realtek RTL8261N/RTL8261BE 10G PHYs
fail to bring up the USXGMII link on cold boot. The PHY enters a bad
state during initialization and the link stays down permanently until
power cycle.

Root cause: the GPIO reset assert/deassert timing (40ms/150ms) is too
short for the RTL8261N to complete its internal firmware load. The OEM
firmware uses 200ms/200ms.

Increase both PHY reset timings to 200ms/200ms to match OEM values.
Confirmed to fix intermittent boot failures on both W1700K (Gemtek)
and XR1701G boards.

Signed-off-by: Ryan Chen <[email protected]>
Link: openwrt#22564
Signed-off-by: Hauke Mehrtens <[email protected]>
(cherry picked from commit 7be78e7)
Vladdrako pushed a commit to Vladdrako/openwrt that referenced this pull request Aug 22, 2026
…reset timing

Some W1700K and XR1701G boards with Realtek RTL8261N/RTL8261BE 10G PHYs
fail to bring up the USXGMII link on cold boot. The PHY enters a bad
state during initialization and the link stays down permanently until
power cycle.

Root cause: the GPIO reset assert/deassert timing (40ms/150ms) is too
short for the RTL8261N to complete its internal firmware load. The OEM
firmware uses 200ms/200ms.

Increase both PHY reset timings to 200ms/200ms to match OEM values.
Confirmed to fix intermittent boot failures on both W1700K (Gemtek)
and XR1701G boards.

Signed-off-by: Ryan Chen <[email protected]>
Link: openwrt#22564
Signed-off-by: Hauke Mehrtens <[email protected]>
Quarx2k pushed a commit to Quarx2k/OpenWRT-BE7000 that referenced this pull request Sep 22, 2026
…reset timing

Some W1700K and XR1701G boards with Realtek RTL8261N/RTL8261BE 10G PHYs
fail to bring up the USXGMII link on cold boot. The PHY enters a bad
state during initialization and the link stays down permanently until
power cycle.

Root cause: the GPIO reset assert/deassert timing (40ms/150ms) is too
short for the RTL8261N to complete its internal firmware load. The OEM
firmware uses 200ms/200ms.

Increase both PHY reset timings to 200ms/200ms to match OEM values.
Confirmed to fix intermittent boot failures on both W1700K (Gemtek)
and XR1701G boards.

Signed-off-by: Ryan Chen <[email protected]>
Link: openwrt/openwrt#22564
Signed-off-by: Hauke Mehrtens <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

target/airoha pull request/issue for airoha target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants