Repository navigation
airoha: add support for Gemtek XR1710G - #26296
Conversation
9391832 to
d04ed18
Compare
d04ed18 to
d618778
Compare
d618778 to
026b57d
Compare
026b57d to
93b34d6
Compare
|
hi @akorshun I am giving this a try. I am currently running this chainloader: https://github.com/YYH2913/http-uboot/releases/tag/xr1710g_260805 after compiling main + this pull request, when flashing i get this warning related to v2.0 an 1.0 ubi. can you advise on what happens if one wants to switch to mainline openwrt in this case? i have couple of 10gbit devices at home and wanted to give some feedback on 10gbit and 2,5gbit partner negotiation for these phys |
It appears you are using an outdated partition layout. The main README file for the Http U-Boot bootloader (which u use) contains all the instructions for migrating to the new layout. If you would like to test the stability of the 10Gbps link, please use this image, which includes the necessary fixes: I have also created a few small tools:
Please note that I have not tested these tools on the older partition layouts, so you may want to test them yourself. |
|
Nice update to chainloader! Please send up PR for new functions for W1700k. |
93b34d6 to
bd61681
Compare
|
So, here are my tests with main + this pull request only. bootlog: i tested plugging and replugging the cable in both 2,5 and 10gbit interfaces on my switch and with warm reboot i didn't get any pcs/phy detection issues. I did an iperf to an internet speedtest server where I am 100% sure i have full 2200mbit bandwidth througputh Now the wan port is connected to my truenas with 10gbit interface and running iperf both as client and server shows as anticipated weird thing on the receiving side. HW Offload enabled. Nothing else running on the router. @akorshun I don't think the PCS thing mentioned at the beginning of the post affects download speeds or is there something else sent upstream that could potentially fix this? |
|
@pameruoso thanks a lot for testing! Good to see the 10G and 2.5G links come up and survive replugs and warm reboots with plain main + this PR. The PCS issue is about whether the link comes up at all. Once it’s up at 10G, the PCS doesn’t limit throughput, so it doesn’t explain these numbers, and I’m not aware of anything pending upstream that would change them. I think what you’re seeing is the CPU. In all of these tests iperf3 runs on the router itself, so every packet goes through the network stack on the Cortex-A53 cores, and HW offload (PPE) doesn’t apply to traffic the router terminates. Receiving is the heavier direction. I see the same thing on lan2 at 5G: iperf3 on the router does about 3.7 Gbit/s TX and 1.85 Gbit/s RX, with the CPU maxed out. To measure what the router can actually route, run iperf3 between two hosts through it, e.g. the client behind a LAN port and the server (or the internet speedtest) behind wan, with flow offloading on. Several streams (-P 4) also help. If downloads are still below 2.2 Gbit/s that way, I’d be very interested in the numbers and in top during the test. |
that is my suspect too. i will find time to do r4-pro-8x >lan2 10g - xr1710g -wan10g- > truenas 10g lan2 is connected to r4-pro-8x and wan is connected to truenas
not amazing... can provide more tests in next days. Lan2 and wan are both in a single bridge. R4pro is 10.10.2.3, xr1710g is 10.10.2.1 and Truenas is 10.10.2.2. Maybe need to do real routing and not bridge because looks like npu is not kicking in yet. |
Thanks! Yes, with lan2 and wan in one bridge the traffic is bridged by the CPU, and flow offloading only kicks in for routed traffic. With wan in its own subnet and flow_offloading/flow_offloading_hw enabled in the firewall, the numbers should look quite different. |
bd61681 to
3ca649b
Compare
3ca649b to
0e639d0
Compare
|
@pameruoso thanks, these numbers are very useful. With routing and HW offload the CPU stays at 0 in both directions, so both flows are offloaded, and the difference comes from the hardware path, not from the CPU. On this board the two 10G ports are not switch ports:
On the Wi-Fi questions:
|
|
Could we consider keeping the kernel-assigned The rationale is to avoid unnecessary OpenWrt-specific interface renaming and keep the network interface naming closer to the default Linux behavior. Relevant upstream references:
Currently, For the XR1710G, I would suggest retaining the current kernel-assigned names:
The default network configuration could then remain: ucidef_set_interfaces_lan_wan "eth2 lan2 lan3" "eth1" |
|
4ecb356 to
16bbb33
Compare
|
Rebased onto current main. 7a783bc (Turris 1.x) had already taken uboot-tools to A note on #26508, which swaps the AN7581 |
The shared dtsi is now an7581-gemtek-common.dtsi and the XR1710G board DTS an7581-gemtek_xr1710g-ubi.dts, as agreed in openwrt#26296. Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Andrey Korshunov <[email protected]>
Record what the xr1710g tree already has, what open PRs openwrt#26296 and openwrt#26297 carry, and what is local only. The table covers the DTS, PCIe and HIF2, 10G/2.5G PCS/PHY fixes, LEDs, fan, netwatchdog, NPU firmware and driver patches, mt76 patches, wifi-scripts, U-Boot, image entry and upgrade path, and the local lab tooling. No code or build changes. Signed-off-by: genshanxinli <[email protected]>
Record what the xr1710g tree already has, what open PRs openwrt#26296 and openwrt#26297 carry, and what is local only. The table covers the DTS, PCIe and HIF2, 10G/2.5G PCS/PHY fixes, LEDs, fan, netwatchdog, NPU firmware and driver patches, mt76 patches, wifi-scripts, U-Boot, image entry and upgrade path, and the local lab tooling. No code or build changes. Signed-off-by: genshanxinli <[email protected]>
Record what the xr1710g tree already has, what open PRs openwrt#26296 and openwrt#26297 carry, and what is local only. The table covers the DTS, PCIe and HIF2, 10G/2.5G PCS/PHY fixes, LEDs, fan, netwatchdog, NPU firmware and driver patches, mt76 patches, wifi-scripts, U-Boot, image entry and upgrade path, and the local lab tooling. No code or build changes. Signed-off-by: genshanxinli <[email protected]>
…45ee7f1 docs: add OpenWrt PR openwrt#26296 convergence checklist
16bbb33 to
1b981ab
Compare
The shared dtsi is now an7581-gemtek-common.dtsi and the XR1710G board DTS an7581-gemtek_xr1710g-ubi.dts, as agreed in openwrt#26296. Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Andrey Korshunov <[email protected]>
1b981ab to
28c7d10
Compare
|
Tested on my XR1710G. Everything works as expected, though I can't test speeds above 2.5 Gbps. Thanks for your work! |
|
I use a Gemtek XR1710G as my main router and would like to see official OpenWrt support for it. PPPoE, Wi-Fi, and both 10 GbE ports are important in my setup. Thanks for working on this! |
The Gemtek XR1710G is a close relative of the W1700K and shares almost all of its device tree: flash layout and UBI volumes, MAC addresses, Wi-Fi, Ethernet, the 10G PHYs, the reset button and the status LEDs. Move these parts into an7581-gemtek-common.dtsi and keep only what is specific to the W1700K in its DTS: the GPIO driven lan3/lan4 LEDs, the 10G PHY LEDs and the UARTs of the Bluetooth/Zigbee radio and the GPS. While at it, reference the wan_mac cell without an argument: it is a plain cell, not a "mac-base" one with #nvmem-cell-cells, so the trailing 0 was invalid and only worked because the nvmem core ignores it for index 0. Also use generic node names for the Wi-Fi and the BMT partition, and sort the status LEDs by GPIO (white 20 before red 29), which swaps the led-2 and led-3 node names. The resulting devicetree is otherwise unchanged. Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Andrey Korshunov <[email protected]> Link: openwrt#26296 Signed-off-by: Robert Marko <[email protected]>
The Gemtek XR1710G (Brightspeed XR1710G) runs the same AXON vendor
bootloader as the Gemtek W1700K, including its Airoha BMT/BBT
handling, so it needs the same chainloader: the vendor bootloader only
loads this U-Boot from the "chainloader" partition, and all OpenWrt data
lives in UBI, which does its own bad block management.
The parts of the board U-Boot uses (UART, reset button, status LEDs,
SPI-NAND and the flash layout) match the W1700K, so the configuration is
the W1700K one with the names changed, plus:
- CONFIG_PINCONF is replaced by CONFIG_PINCTRL_AIROHA_AN7581, as for the
AN7581 reference board. The W1700K configuration lacks the pin
controller driver, so U-Boot finds neither the reset button nor the
status LEDs there ("LED 'status:red' not found (err=-19)").
- The reset button is read when the chainloader starts. If it is held,
the blue status LED lights up and the recovery image
(openwrt-airoha-an7581-gemtek_xr1710g-ubi-initramfs-recovery.itb) is
booted via TFTP from 192.168.1.254, retrying until a server answers.
This allows recovery without a serial console. The button has to be
pressed after power is applied: held at power-on, it makes the AN7581
boot ROM wait for a UART download instead. The chainloader starts about
15 s after power-on.
- The default menu entry runs boot_ubi instead of boot_production, so a
broken production volume falls back to the recovery volume, and when
neither boots the recovery image is loaded via TFTP until a server
answers. boot_recovery only runs bootm after the recovery volume was
read, so a warm reset cannot boot a stale image left in RAM.
- As on the Nokia boards, a ubi partition that does not attach is
formatted, missing ubootenv, ubootenv2 and factory volumes are
created, and the environment is saved once, so fw_printenv and
fw_setenv work. CONFIG_ENV_SIZE is set to the ubootenv volume size
that uboot-envtools uses. The factory volume holds the Wi-Fi EEPROM
and the MAC addresses and is filled by sysupgrade from the vendor
partition. Created empty here, it lets the kernel fall back to random
MAC addresses instead of deferring the Ethernet probe, so the recovery
image has a working network.
- MMC support is disabled, as on the Nokia boards. The board has no
eMMC, and with the environment in MMC or UBI the saveenv right after a
format went to MMC: when no location holds an environment yet,
env_load() selects the first one.
- The installer variables and menu entry of the W1700K are dropped: the
device is installed by booting the recovery image and running
sysupgrade.
- CONFIG_CMD_ASKENV is enabled, as on the Nokia boards: the TFTP and
recovery menu entries wait for Enter with askenv when they fail. The
W1700K configuration lacks it, so there they print "Unknown command
'askenv'" and return to the menu at once.
Based on the XR1710G chainloader by Kenneth Kasilag.
Assisted-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Andrey Korshunov <[email protected]>
Link: openwrt#26296
Signed-off-by: Robert Marko <[email protected]>
Gemtek XR1710G, sold by Brightspeed, is an AN7581 Wi-Fi 7 gateway.
It is a close relative of the Gemtek W1700K: the Silabs
Bluetooth/Zigbee radio and the Airoha GPS are gone, and the LEDs of
the two 1 GbE ports are driven by the internal switch PHYs instead of
GPIOs. The device tree shares an7581-gemtek-common.dtsi with
the W1700K and only adds these LEDs and the label MAC.
Specification:
- SoC : Airoha AN7581GT, 4x Cortex-A53
- RAM : 2 GiB DDR4-2666 (ESMT M16U8G16512A)
- Flash : 512 MiB SPI-NAND (Winbond W25N04KV)
- WLAN : MediaTek MT7996 (BE19000) on PCIe
- 2.4 GHz : 4x4, MT7976GN
- 5 GHz : 4x4, MT7977BN
- 6 GHz : 4x4, MT7977AN
- Ethernet : 2x 10 GbE (Realtek RTL8261BE, wan and lan2),
2x 1 GbE (AN7581 internal switch, lan3 and lan4)
- LEDs : 1x status, red/green/blue/white (GPIO),
2x2 lan3/lan4 green/amber (switch PHY)
- Button : reset
- Fan : PWM controlled by a Nuvoton NCT7802 on I2C
- UART : 5-pin header next to the case screw, 115200n8
- pinout : TX, GND, VCC, N/C, RX, starting at the screw
- Power : 12 VDC, 5 A, barrel jack, center positive
- Bootloader: U-Boot 2014.04-rc1 "AXON 1.6", signed, vendor BMT/BBT
The vendor bootloader verifies the image it boots by default and uses
Airoha BMT/BBT for bad block management, which Linux does not know
about. As on the W1700K, a U-Boot chainloader is therefore placed into
the "chainloader" partition (the start of the first vendor firmware
bank), which the vendor bootloader writes and loads, and everything
else lives in UBI, which handles bad blocks itself. The vendor
bootloader and its 66 MiB BMT pool at the end of flash are left alone.
The factory UBI volume holds the MT7996 EEPROM and the MAC addresses.
All of it comes from the vendor partition, which OpenWrt never writes:
the DSD block at 0x400000 holds the MACs, fan_id and the serial number
as text, the EEPROM is in the first good block from 0x405000. When the
volume is missing or holds no valid EEPROM and MACs, as on a new
install, sysupgrade builds it from there before writing the firmware.
The serial number has to match the board, and nothing is written when
the vendor data does not look right.
Installation (via serial console):
1. Open the case: there is a Torx T10 screw under the QR code label,
then pry the grey and white halves apart starting at the ports.
2. Connect to the UART header and interrupt the vendor bootloader with
any key.
3. Make the vendor bootloader boot the chainloader from flash, write
the chainloader with TFTP (server 192.168.1.254), and erase the rest
of the stock firmware. The vendor Ethernet driver is flaky, the
tftpboot may need a few attempts:
setenv serverip 192.168.1.254
setenv ipaddr 192.168.1.1
tftpboot 0x89000000 openwrt-airoha-an7581-gemtek_xr1710g-ubi-chainload-uboot.itb
setenv one flash read 0x600000 0x100000 \$loadaddr
setenv two "; bootm"
setenv bootcmd "$one$two"
saveenv
flash erase 0x600000 0x100000
flash write 0x600000 0x100000 0x89000000
flash erase 0x700000 0x1b700000
reset
The last erase matters: the stock firmware keeps its own UBI in this
area, which the chainloader would otherwise attach and keep.
If tftpboot keeps failing, load the chainloader over the serial
console instead: run "loady 0x89000000" in place of the tftpboot,
send the file with YMODEM (about 30 s at 115200 baud), then go on
with the setenv commands.
4. The chainloader creates UBI in the erased ubi partition with the
ubootenv, ubootenv2 and an empty factory volume, and saves its
environment. With nothing to boot, it lights the blue LED and loads
openwrt-airoha-an7581-gemtek_xr1710g-ubi-initramfs-recovery.itb via
TFTP from 192.168.1.254 until a server answers.
5. In the recovery system (192.168.1.1), copy over the sysupgrade.itb
image and run sysupgrade. It fills the factory volume with the Wi-Fi
calibration data and the MAC addresses from the vendor partition and
installs OpenWrt. The recovery volume is optional; without it, the
chainloader falls back to TFTP when the system does not boot.
6. Further updates use the sysupgrade.itb image.
Reverting to the stock firmware is not documented: the stock firmware
needs an ISP account to be useful.
MAC addresses ("factory" UBI volume):
- WAN : 0x5000 xx:xx:xx:xx:xx:xx
- LAN : 0x6000 xx:xx:xx:xx:xx:xx
- 2.4 GHz : 0x6000 + 1
- 5 GHz : 0x6000 + 2
- 6 GHz : 0x6000 + 3
Known issues:
- The 10 GbE ports (wan and lan2) may come up without link or lose
link: the AN7581 USXGMII PCS sometimes fails RX calibration ("No
FBCK Lock") with the RTL8261BE. The PCS and PHY fixes are being
worked on separately.
Based on the XR1710G support by Kenneth Kasilag (openwrt#22397).
Assisted-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Andrey Korshunov <[email protected]>
Link: openwrt#26296
Signed-off-by: Robert Marko <[email protected]>
28c7d10 to
980a740
Compare
|
Thanks! Rebased on top of main and merged! |
The Gemtek XR1710G is a close relative of the W1700K and shares almost all of its device tree: flash layout and UBI volumes, MAC addresses, Wi-Fi, Ethernet, the 10G PHYs, the reset button and the status LEDs. Move these parts into an7581-gemtek-common.dtsi and keep only what is specific to the W1700K in its DTS: the GPIO driven lan3/lan4 LEDs, the 10G PHY LEDs and the UARTs of the Bluetooth/Zigbee radio and the GPS. While at it, reference the wan_mac cell without an argument: it is a plain cell, not a "mac-base" one with #nvmem-cell-cells, so the trailing 0 was invalid and only worked because the nvmem core ignores it for index 0. Also use generic node names for the Wi-Fi and the BMT partition, and sort the status LEDs by GPIO (white 20 before red 29), which swaps the led-2 and led-3 node names. The resulting devicetree is otherwise unchanged. Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Andrey Korshunov <[email protected]> Link: openwrt/openwrt#26296 Signed-off-by: Robert Marko <[email protected]> GitLab-source: fefe6d88c328fa387850961cd9bbbfb4f102ff64 Source delta sanitized for publication; author attribution preserved.
The Gemtek XR1710G (Brightspeed XR1710G) runs the same AXON vendor
bootloader as the Gemtek W1700K, including its Airoha BMT/BBT
handling, so it needs the same chainloader: the vendor bootloader only
loads this U-Boot from the "chainloader" partition, and all OpenWrt data
lives in UBI, which does its own bad block management.
The parts of the board U-Boot uses (UART, reset button, status LEDs,
SPI-NAND and the flash layout) match the W1700K, so the configuration is
the W1700K one with the names changed, plus:
- CONFIG_PINCONF is replaced by CONFIG_PINCTRL_AIROHA_AN7581, as for the
AN7581 reference board. The W1700K configuration lacks the pin
controller driver, so U-Boot finds neither the reset button nor the
status LEDs there ("LED 'status:red' not found (err=-19)").
- The reset button is read when the chainloader starts. If it is held,
the blue status LED lights up and the recovery image
(openwrt-airoha-an7581-gemtek_xr1710g-ubi-initramfs-recovery.itb) is
booted via TFTP from 192.168.1.254, retrying until a server answers.
This allows recovery without a serial console. The button has to be
pressed after power is applied: held at power-on, it makes the AN7581
boot ROM wait for a UART download instead. The chainloader starts about
15 s after power-on.
- The default menu entry runs boot_ubi instead of boot_production, so a
broken production volume falls back to the recovery volume, and when
neither boots the recovery image is loaded via TFTP until a server
answers. boot_recovery only runs bootm after the recovery volume was
read, so a warm reset cannot boot a stale image left in RAM.
- As on the Nokia boards, a ubi partition that does not attach is
formatted, missing ubootenv, ubootenv2 and factory volumes are
created, and the environment is saved once, so fw_printenv and
fw_setenv work. CONFIG_ENV_SIZE is set to the ubootenv volume size
that uboot-envtools uses. The factory volume holds the Wi-Fi EEPROM
and the MAC addresses and is filled by sysupgrade from the vendor
partition. Created empty here, it lets the kernel fall back to random
MAC addresses instead of deferring the Ethernet probe, so the recovery
image has a working network.
- MMC support is disabled, as on the Nokia boards. The board has no
eMMC, and with the environment in MMC or UBI the saveenv right after a
format went to MMC: when no location holds an environment yet,
env_load() selects the first one.
- The installer variables and menu entry of the W1700K are dropped: the
device is installed by booting the recovery image and running
sysupgrade.
- CONFIG_CMD_ASKENV is enabled, as on the Nokia boards: the TFTP and
recovery menu entries wait for Enter with askenv when they fail. The
W1700K configuration lacks it, so there they print "Unknown command
'askenv'" and return to the menu at once.
Based on the XR1710G chainloader by Kenneth Kasilag.
Assisted-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Andrey Korshunov <[email protected]>
Link: openwrt/openwrt#26296
Signed-off-by: Robert Marko <[email protected]>
GitLab-source: b8d878f0b6c2435bfdf3ccfd49a7ea2c0d2cb345
Source delta sanitized for publication; author attribution preserved.
Gemtek XR1710G, sold by Brightspeed, is an AN7581 Wi-Fi 7 gateway.
It is a close relative of the Gemtek W1700K: the Silabs
Bluetooth/Zigbee radio and the Airoha GPS are gone, and the LEDs of
the two 1 GbE ports are driven by the internal switch PHYs instead of
GPIOs. The device tree shares an7581-gemtek-common.dtsi with
the W1700K and only adds these LEDs and the label MAC.
Specification:
- SoC : Airoha AN7581GT, 4x Cortex-A53
- RAM : 2 GiB DDR4-2666 (ESMT M16U8G16512A)
- Flash : 512 MiB SPI-NAND (Winbond W25N04KV)
- WLAN : MediaTek MT7996 (BE19000) on PCIe
- 2.4 GHz : 4x4, MT7976GN
- 5 GHz : 4x4, MT7977BN
- 6 GHz : 4x4, MT7977AN
- Ethernet : 2x 10 GbE (Realtek RTL8261BE, wan and lan2),
2x 1 GbE (AN7581 internal switch, lan3 and lan4)
- LEDs : 1x status, red/green/blue/white (GPIO),
2x2 lan3/lan4 green/amber (switch PHY)
- Button : reset
- Fan : PWM controlled by a Nuvoton NCT7802 on I2C
- UART : 5-pin header next to the case screw, 115200n8
- pinout : TX, GND, VCC, N/C, RX, starting at the screw
- Power : 12 VDC, 5 A, barrel jack, center positive
- Bootloader: U-Boot 2014.04-rc1 "AXON 1.6", signed, vendor BMT/BBT
The vendor bootloader verifies the image it boots by default and uses
Airoha BMT/BBT for bad block management, which Linux does not know
about. As on the W1700K, a U-Boot chainloader is therefore placed into
the "chainloader" partition (the start of the first vendor firmware
bank), which the vendor bootloader writes and loads, and everything
else lives in UBI, which handles bad blocks itself. The vendor
bootloader and its 66 MiB BMT pool at the end of flash are left alone.
The factory UBI volume holds the MT7996 EEPROM and the MAC addresses.
All of it comes from the vendor partition, which OpenWrt never writes:
the DSD block at 0x400000 holds the MACs, fan_id and the serial number
as text, the EEPROM is in the first good block from 0x405000. When the
volume is missing or holds no valid EEPROM and MACs, as on a new
install, sysupgrade builds it from there before writing the firmware.
The serial number has to match the board, and nothing is written when
the vendor data does not look right.
Installation (via serial console):
1. Open the case: there is a Torx T10 screw under the QR code label,
then pry the grey and white halves apart starting at the ports.
2. Connect to the UART header and interrupt the vendor bootloader with
any key.
3. Make the vendor bootloader boot the chainloader from flash, write
the chainloader with TFTP (server 192.168.1.254), and erase the rest
of the stock firmware. The vendor Ethernet driver is flaky, the
tftpboot may need a few attempts:
setenv serverip 192.168.1.254
setenv ipaddr 192.168.1.1
tftpboot 0x89000000 openwrt-airoha-an7581-gemtek_xr1710g-ubi-chainload-uboot.itb
setenv one flash read 0x600000 0x100000 \$loadaddr
setenv two "; bootm"
setenv bootcmd "$one$two"
saveenv
flash erase 0x600000 0x100000
flash write 0x600000 0x100000 0x89000000
flash erase 0x700000 0x1b700000
reset
The last erase matters: the stock firmware keeps its own UBI in this
area, which the chainloader would otherwise attach and keep.
If tftpboot keeps failing, load the chainloader over the serial
console instead: run "loady 0x89000000" in place of the tftpboot,
send the file with YMODEM (about 30 s at 115200 baud), then go on
with the setenv commands.
4. The chainloader creates UBI in the erased ubi partition with the
ubootenv, ubootenv2 and an empty factory volume, and saves its
environment. With nothing to boot, it lights the blue LED and loads
openwrt-airoha-an7581-gemtek_xr1710g-ubi-initramfs-recovery.itb via
TFTP from 192.168.1.254 until a server answers.
5. In the recovery system (192.168.1.1), copy over the sysupgrade.itb
image and run sysupgrade. It fills the factory volume with the Wi-Fi
calibration data and the MAC addresses from the vendor partition and
installs OpenWrt. The recovery volume is optional; without it, the
chainloader falls back to TFTP when the system does not boot.
6. Further updates use the sysupgrade.itb image.
Reverting to the stock firmware is not documented: the stock firmware
needs an ISP account to be useful.
MAC addresses ("factory" UBI volume):
- WAN : 0x5000 xx:xx:xx:xx:xx:xx
- LAN : 0x6000 xx:xx:xx:xx:xx:xx
- 2.4 GHz : 0x6000 + 1
- 5 GHz : 0x6000 + 2
- 6 GHz : 0x6000 + 3
Known issues:
- The 10 GbE ports (wan and lan2) may come up without link or lose
link: the AN7581 USXGMII PCS sometimes fails RX calibration ("No
FBCK Lock") with the RTL8261BE. The PCS and PHY fixes are being
worked on separately.
Based on the XR1710G support by Kenneth Kasilag (openwrt/openwrt#22397).
Assisted-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Andrey Korshunov <[email protected]>
Link: openwrt/openwrt#26296
Signed-off-by: Robert Marko <[email protected]>
GitLab-source: 980a7404d781222674d475d06ff44201760701ff
Source delta sanitized for publication; author attribution preserved.





Gemtek XR1710G, sold by Brightspeed: Airoha AN7581, MT7996 (BE19000), 2x 10 GbE (RTL8261BE) + 2x 1 GbE.
This picks up #22397 by @hurrian, which has been inactive since April. The board uses the Gemtek W1700K "layout 2.0": the signed vendor bootloader stays, an OpenWrt U-Boot chainloader goes into the vendor
chainloaderpartition (0x600000), everything else lives in UBI, and the vendor BMT pool at the end of flash is left alone. The hardware spec, UART pinout, install steps and MAC layout are in the device commit.Commits:
an7581-gemtek-common.dtsi. The W1700K DTB is unchanged apart from thewan_maccell, two node names and the order of the red/white status LED nodes (now sorted by GPIO).CONFIG_PINCTRL_AIROHA_AN7581instead ofCONFIG_PINCONF, so U-Boot sees the reset button and the status LEDs;boot_ubi: production, then the recovery volume, then TFTP until a server answers;ubootenv,ubootenv2andfactory(static, empty) volumes are created and the environment is saved once, sofw_printenv/fw_setenvwork (CONFIG_ENV_SIZEmatches uboot-envtools, MMC is disabled so the firstsaveenvgoes to UBI);factoryis missing or has no valid EEPROM/MACs, sysupgrade rebuilds it from the vendor partition (MACs, fan_id and serial number from the DSD block, EEPROM with the 0x7990 magic) before writing the firmware. Nothing is written if the serial number does not match the board or the data looks wrong. This replaces the third-party UBI installer.The W1700K itself is not changed apart from the DTS move: its U-Boot environment and installer are left for its owners to update and test.
Tested on a retail unit, with a build of this PR plus the out-of-tree PCS/PHY fixes listed under Known issues:
factorybyte-identical to the one the installer used to write, and the first boot has the real MACs and the Wi-Fi calibrationloady(YMODEM) instead oftftpbootin the vendor bootloader, the fallback the install steps mention for when its TFTP keeps failingfw_printenvin the recovery and after sysupgrade, with no "Bad CRC"fit_check_imagerejects a non-FIT filefitandrecoveryit keeps retrying TFTP@pameruoso also tested plain main + this PR with 10G link partners: wan and lan2 come up at 10G and 2.5G and survive replugs and warm reboots, and routed traffic with flow offloading reaches 9.37 Gbit/s from lan2 to wan.
Known issues
wan,lan2): the link may not come up, or may drop. The AN7581 USXGMII PCS sometimes fails RX calibration (No FBCK Lock) against the RTL8261BE (also reported in airoha: add support for Gemtek XR1710G #22397). This is a platform PCS/PHY issue that affects every AN7581 board, not just this one, so the candidate fixes are not part of this PR: PCS RX calibration crossing search, USXGMII rate adaptation on link-up, and an RTL8261 SerDes re-patch after copper autonegotiation.The LED mode fix that this board's lan3/lan4 amber LEDs need goes in a separate PR: #26297.
🤖 Generated with Claude Code