Jan Hoffmann [Thu, 27 Feb 2025 19:44:59 +0000 (20:44 +0100)]
realtek: add support for Zyxel XGS1010-12 A1
This device is very similar to the already supported XGS1210-12 A1. For
now, only revision A1 is supported (not marked on the label).
Hardware:
- RTL9302B SoC
- 16 MiB NOR flash
- 128 MiB DDR3 SDRAM
- 8x 1G RJ45 (RTL8218D)
- 2x 2.5G RJ45 (2x RTL8226)
- 2x SFP+ (supporting 1G/2.5G/10G)
- 3.3V UART serial (115200 baud 8N1) on the right side of the case
(from bottom to top: GND, RX, TX, VCC)
It is originally an unmanaged switch, so there are a few differences:
- No reset button
- Different partition layout: There is some reserved space in the middle
of the flash which might be used by the bootloader for flash testing.
The remaining space in between is used for OpenWrt using mtd-concat.
The largest contiguous area is at the beginning, allowing a maximum
kernel size of 7 MiB.
- No individual MAC address: This device ships with an empty U-Boot
environment. When an OpenWrt squashfs image is booted for the first
time, a random MAC address will be written to the environment (but
only if the environment has been initialized from the bootloader
before and contains the default MAC address).
Steps to boot initramfs image via network:
- Configure a TFTP server to provide the OpenWrt initramfs image
- Connect to device using serial (see hardware information above)
- Power on the device and enter U-Boot using Esc when prompted
- Run the following commands (adjust as necessary):
# rtk network on
# tftpboot 0x84f00000 192.168.1.100:openwrt-xgs1010-initramfs.bin
# bootm
Installation on flash:
- Boot initramfs image as described above
- Now is a good time to create a backup of all flash partitions! You'll
need this if you want to revert to the unmanaged factory firmware at
some point.
- Use sysupgrade to install OpenWrt
- After restart enter U-Boot again and set the boot command:
# setenv bootcmd 'rtk network on; bootm 0xb4900000'
# saveenv
# run bootcmd
Note: The command "rtk network on" is only needed because the drivers
currently rely on some setup by the bootloader (without this the RJ45
ports don't work). If the drivers improve in the future, it should be
removed (i.e. change the boot command to "bootm 0xb4900000").
Reverting to factory firmware:
- Write back your backup of the firmware partition (or write just the
fwconcat1 partition, and erase the other two fwconcat partitions)
- Change the boot command back to "boota" (or just erase the u-boot-env
partition so the default gets used)
Jan Hoffmann [Mon, 20 Oct 2025 13:24:40 +0000 (15:24 +0200)]
realtek: restructure Zyxel XGS1210-12 device tree files
This is a preparation for adding support for XGS1010-12, which is almost
identical to XGS1210-12, with some small differences (partition layout,
missing reset key).
In addition to moving the common parts to a new file, also simplify the
definition of the 2.5G PHYs to reduce duplication. With this change, the
revision-specific files only have to specify the SMI addresses.
Jonas Jelonek [Mon, 27 Oct 2025 19:30:06 +0000 (19:30 +0000)]
realtek: dsa: remove sds_num entirely
After having moved RTL93XX SerDes configuration from PHY to PCS driver,
the DSA driver doesn't need to know about SerDes explicitly anymore.
Although RTL83XX SerDes is still partly managed within the DSA driver,
it doesn't make use of the sds_num property/field. RTL93XX was the only
user of this right now.
Thus, we can just remove the remaining 'sds_num' code which doesn't
serve any purpose anymore.
Jonas Jelonek [Sun, 26 Oct 2025 14:02:11 +0000 (14:02 +0000)]
realtek: rtl93xx: remove pseudo-PHYs and phy-handle from SFP ports
RTL93XX reached the point where the SerDes' are no longer treated as
regular PHYs. Instead, they are managed by the dedicated PCS driver.
Thus, all device tree definitions should follow this change.
Remove the pseudo-PHYs for the SerDes (so far usually defined with macro
INTERNAL_PHY) and corresponding 'phy-handle's from all SFP ports. This
removes a long-lasting confusion from our Realtek driver(s).
Jonas Jelonek [Sat, 11 Oct 2025 21:36:25 +0000 (21:36 +0000)]
realtek: dsa: allow to drop phy-handle on switch ports
When Realtek SerDes is completely handled by PCS, it is not treated as
a regular PHY anymore. Thus, we should be able to drop the currently
used pseudo-PHYs and phy-handles for ports which just use the SerDes as
PCS but have no PHY attached.
Allow to drop the phy-handle from switch port definitions if there is a
pcs-handle defined by relaxing several checks in the DSA driver.
Sven Eckelmann [Wed, 29 Oct 2025 15:00:03 +0000 (16:00 +0100)]
realtek: dsa,pcs: rtl930x: Disable SerDes patching for 10G-QXGMII
The code to add bootstrapping for 10G-QXGMII on RTL930X broke the only
devices which are using 10G-QXGMII on RTL930X (Plasma Cloud PSX8+PSX10) in
OpenWrt. It is currently unknown what other changes are pending to get this
correctly working. But both the `rtpcs_930x_sds_usxgmii_config()` call and
the write of the "magic" SerDes values in the patching process break the
SerDes connected to the RTL8224 PHYs.
The Plasma Cloud PSX8+PSX10 devices get their RTL8224 and the 10G-QXGMII
SerDes bootstrapped directly by u-boot.
Fixes: dca20f91ea12 ("realtek: add serdes patch for 10G_QXGMII") Signed-off-by: Sven Eckelmann <se@simonwunderlich.de> Link: https://github.com/openwrt/openwrt/pull/20588 Signed-off-by: Robert Marko <robimarko@gmail.com>
Eric Fahlgren [Fri, 19 Sep 2025 17:01:07 +0000 (10:01 -0700)]
scripts/make-index-json: ensure that manifest output is in opkg format
Certain existing tooling, such as 'package-metadata.pl', are written
to accept the output of 'opkg list' with package manifest delimited
by '-'. The 'make-index-json.py --manifest' output was emulating
the 'apk list --manifest' format without the delimiting dash,
thus breaking these legacy tools.
We fix this by adding the dash to the manifest output, which allows
all existing tooling to process the output irrespective of whether
the build system uses opkg or apk.
Felix Fietkau [Fri, 31 Oct 2025 18:33:21 +0000 (18:33 +0000)]
wpa_supplicant: use a timer to defer starting interfaces
This allows wpa_supplicant to process pending netlink socket messages
first. Without this change, there is a race condition where the newly
created interface processes netlink events from the removal of the
previous interface.
Fix Totolink X6000R image failing to upgrade via sysupgrade due to an
incorrect upgrade case. The fallback upgrade path used the NAND upgrade
routine, which caused the "layout volume not found" error on NOR flash
devices. By adding a specific case for this board, sysupgrade now uses
`default_do_upgrade`, which is compatible with the NOR flash layout.
mediatek: mt7622: fix 2.5G WAN port on Netgear WAX206
Since 6b43a52171f5, the PHY is using interrupts instead of polling. It
turned out that the interrupt number is wrong and the WAN port doesn't
work. This commit fixes this bug.
Fixes: 6b43a52171f5 ("mediatek: mt7622: add the missing phy interrupt-parent for WAX206") Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
** This commit includes a fix for the GPIO pins for factory/reset and WPS. It was reversed and is now fixed.
* U-Boot Mod Openwrt Installation via UART:
Openwrt Stock Layout Commit: https://github.com/openwrt/openwrt/commit/6e04dccb7ad3191e9a48597a1b354bf548ead1d8
NOTE: Stock Openwrt is not necessary. You can go straight to ubootmod version of the firmware. However, it is recommended to follow stock layout instructions to backup NAND.
1. Configure TFTP server with IP 192.168.1.66. Copy `openwrt-mediatek-filogic-acer_predator-w6x-ubootmod-initramfs-recovery.itb` to TFTP root and rename to `predator.bin`
2. Interrupt boot by pressing 0 on startup or select `U-Boot Console` in U-Boot Boot Menu.
3. Run setenv `serverip 192.168.1.66; setenv ipaddr 192.168.1.1; tftpboot 0x46000000 predator.bin; bootm` in uboot console.
4. Wait for boot complete on Openwrt initramfs env.
5. Transfer `openwrt-mediatek-filogic-acer_predator-w6x-ubootmod-initramfs-recovery.itb`,
`openwrt-mediatek-filogic-acer_predator-w6x-ubootmod-squashfs-sysupgrade.itb`,
`openwrt-mediatek-filogic-acer_predator-w6x-ubootmod-bl31-uboot.fip`,
`openwrt-mediatek-filogic-acer_predator-w6x-ubootmod-preloader.bin` to router's /tmp/ directory.
6. run `ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5`
7. run `ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB`
8. run `ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB`
9. run `ubimkvol /dev/ubi0 -n 2 -N recovery -s 10MiB`
10. run `ubiupdatevol /dev/ubi0_2 /tmp/openwrt-mediatek-filogic-acer_predator-w6x-ubootmod-initramfs-recovery.itb`
11. install kmod-mtd-rw via opkg or apk.
12. run `insmod /lib/modules/$(uname -r)/mtd-rw.ko i_want_a_brick=1`
13. run `mtd write /tmp/openwrt-mediatek-filogic-acer_predator-w6x-ubootmod-preloader.bin bl2`
14. run `mtd write /tmp/openwrt-mediatek-filogic-acer_predator-w6x-ubootmod-bl31-uboot.fip fip`
15. run `sysupgrade -n /tmp/openwrt-mediatek-filogic-acer_predator-w6x-ubootmod-squashfs-sysupgrade.itb`
16. reboot to ubootmod layout
Stijn Segers [Wed, 29 Oct 2025 19:32:04 +0000 (20:32 +0100)]
uboot-tools: relabel Zyxel devices
Commits d205878ede and 46cf10771a relabeled the supported Zyxel devices
from v1/v2 to A1/B1, but board setup files were overlooked.
Fixes: d205878ede ("rtl838x: rename GS1900 series v1/v2 to A1/B1") Fixes: 46cf10771a ("rtl839x: rename GS1900 series v1/v2 to A1/B1") Signed-off-by: Stijn Segers <foss@volatilesystems.org> Link: https://github.com/openwrt/openwrt/pull/20590 Signed-off-by: Robert Marko <robimarko@gmail.com>
Stijn Segers [Wed, 29 Oct 2025 19:26:01 +0000 (20:26 +0100)]
realtek: fix Zyxel relabel
Commits d205878ede and 46cf10771a relabeled the supported Zyxel devices
from v1/v2 to A1/B1, but board setup files were overlooked.
Fixes: d205878ede ("rtl838x: rename GS1900 series v1/v2 to A1/B1") Fixes: 46cf10771a ("rtl839x: rename GS1900 series v1/v2 to A1/B1") Signed-off-by: Stijn Segers <foss@volatilesystems.org> Link: https://github.com/openwrt/openwrt/pull/20590 Signed-off-by: Robert Marko <robimarko@gmail.com>
Kenneth Kasilag [Mon, 20 Oct 2025 22:53:09 +0000 (22:53 +0000)]
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.
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
Richard Huynh [Sun, 19 Oct 2025 10:52:59 +0000 (21:52 +1100)]
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.
Lorenzo Bianconi [Sun, 26 Oct 2025 16:46:42 +0000 (17:46 +0100)]
airoha: Add missing board files for EN7581
Add missing leds and network board files for EN7581 SoC.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
[ drop reference to downstream 10g RFB board ] Link: https://github.com/openwrt/openwrt/pull/20556 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
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 <ansuelsmth@gmail.com>
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 <ansuelsmth@gmail.com>
Felix Baumann [Sun, 26 Oct 2025 01:54:14 +0000 (02:54 +0100)]
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: 27029277f98ddd0006175bdc5beec8b0b150f187 Tested-by: Jonas Jelonek <jelonek.jonas@gmail.com> Signed-off-by: Felix Baumann <felix.bau@gmx.de> Link: https://github.com/openwrt/openwrt/pull/20549 Signed-off-by: Robert Marko <robimarko@gmail.com>
Jonas Jelonek [Thu, 16 Oct 2025 16:01:11 +0000 (16:01 +0000)]
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.
Jonas Jelonek [Mon, 20 Oct 2025 22:06:33 +0000 (22:06 +0000)]
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.
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.
Christoph Krapp [Sun, 26 Oct 2025 20:16:50 +0000 (21:16 +0100)]
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.
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
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].
Damien Dejean [Wed, 27 Aug 2025 14:05:39 +0000 (16:05 +0200)]
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.
Damien Dejean [Sat, 18 Oct 2025 15:01:24 +0000 (17:01 +0200)]
realtek: add serdes mapping for rtl930x
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.
The root file system is getting a bit bigger.
Without this commit: 5250380 bin/targets/armsr/armv8/openwrt-armsr-armv8-generic-rootfs.tar.gz 4919997 bin/targets/malta/be/openwrt-malta-be-default-rootfs.tar.gz
With this commit: 5263407 bin/targets/armsr/armv8/openwrt-armsr-armv8-generic-rootfs.tar.gz 4930011 bin/targets/malta/be/openwrt-malta-be-default-rootfs.tar.gz
Hauke Mehrtens [Sat, 25 Oct 2025 12:27:00 +0000 (14:27 +0200)]
uboot-sifiveu: fix build with swig 4.3.0
Fixes the following error by backporting upstream update:
```
scripts/dtc/pylibfdt/libfdt_wrap.c: In function ‘_wrap_fdt_next_node’:
scripts/dtc/pylibfdt/libfdt_wrap.c:5581:17: error: too few arguments to function ‘SWIG_Python_AppendOutput’
5581 | resultobj = SWIG_Python_AppendOutput(resultobj, val);
| ^~~~~~~~~~~~~~~~~~~~~~~~
```
This is the same fix as applied in 4e68103c4eb9 ("uboot-rockchip: fix build with swig 4.3.0")
Hauke Mehrtens [Fri, 24 Oct 2025 22:34:04 +0000 (00:34 +0200)]
valgrind: Update to version 3.26.0
The following patches were removed:
* 010-486180-Valgrind-MIPS-VexGuestArchState-has-no-member.patch [1]
* 020-mips-skip-using-shared-syscall-numbers-for-mips32.patch [2]
* 021-mips-skip-using-shared-syscall-numbers-for-mips64.patch [3]
Jonas Jelonek [Fri, 24 Oct 2025 21:40:44 +0000 (21:40 +0000)]
realtek: fix SFP GPIOs for XikeStor SKS8310-8X
Fix the GPIO assignment of RX-LOS and TX-DISABLE for all SFP ports. Both
were actually swapped when adding support for the device. Apparently,
this didn't cause any issues.
These paths have changed in recent kernels, so we need to adapte.
The CONFIG_GOOGLE_VPD kernel module (provided by kmod-google-firmware)
is present on OnHub, and provides alternative means to locate this
information, in /sys/firmware/vpd/ro/wifi_base64_calibration{0,1,2}. Use
that instead.
airoha: an7581: add Aeonsemi AS21xxx PHY to RFB eMMC board
Airoha AN7581 eMMC RFB board mount 2 Aeonsemi AS21xxx PHY. One is
usually connected to GDM4 and the other is optionally connected to GDM2.
Add the relevant nodes to support the one connected to GDM4.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Jonas Jelonek [Wed, 22 Oct 2025 07:21:09 +0000 (07:21 +0000)]
realtek: phy: rtl931x: remove SerDes code from PHY driver
Since ddf94f7489 and 4a5de35dba, a SerDes is configured by the PCS
driver. All code from PHY and DSA related to this has been imported and
adjusted into the PCS driver. Thus, remove the unused code from the PHY
driver now.
As mkits.sh only generates the relevant DTS for mkimage and is
specific for the building image, we can move it outside the locked
section as it doesn't do any operation that can be used concurrently by
others.
This won't have any real impact but clean the code making it clear what
needs to be protected and what can be executed concurrently.
image: fix race between mkits.sh and mkimage in .itb squashfs generation
With further investigation it was found a race in generating .itb images
that include a RootFS caused by the mkits.sh and the mkimage.
Due to the fact that mkits.sh generates a .pagesync image of the passed
rootfs, it can happen that, concurrently, mkimage can be called at the
same time mkits.sh is creating another .pagesync for the same rootfs.
This cause mkimage to use an half made rootfs.pagesync creating a
corrupted image.
To address this, also protect the mkimage with the same lock used for
mkits.sh preventing any kind of concurrent usage/generation of the
rootfs.pagesync blob
e2fsprogs: add pending patch that improve reproducibility
Add pending patch that disable libmagic support as this cause
reproducibility issue due to timing of presence of libmagic library at
times e2fsprogs gets compiled.
The new patch adds control on libmagic inclusion and we add the
--without-libmagic to the configure args by default.
Drop redundant patch for host build as this has been fixed in 1.44.1
but for some reason it wasn't notice with the patch directly refreshed
(with the fix right up)
airoha: backport additional upstream patch for NPU support for AN7583
Backport additional patch required for NPU support of Airoha AN7583.
These are specific for the NPU module with some minor fixes and to adds
upport for loading the specific Airoha AN7583 NPU firmware.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
airoha: an7583: drop bootloader artifacts entry and add default pkg
Fix the current image Makefile for Airoha AN7583 by dropping the
artifacts entry for bootloader and add default PKG for the PHY mounted
on the RFB boards.
The artifacts for the bootloader will be readded later once ATF-A
support will be pushed mainline.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
airoha: an7583: add additional comments on EVB board
On the Airoha AN7583 EVB there are 2 Aeonsemi AS21xxx PHY but only the
one connected to Serdes Ethernet is usable as the other connected to
Serdes PON is not actually HW connected (as the serdes is connected to
the BOSA port)
Add comments and disable the relevant PHY.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>