openwrt/staging/nbd.git
3 days agoramips: restore full switch performance for USW-Flex
Anders Melchiorsen [Wed, 22 Jan 2025 20:54:57 +0000 (21:54 +0100)]
ramips: restore full switch performance for USW-Flex

Since commit f1c9afd80138 ("ramips: mt7621-dts: mux phy0/4 to gmac1") the
USW-Flex lan1 port has been attached directly to the CPU. This improves
routing performance but hinders switching.

This is a generally accepted trade-off in that commit but for USW-Flex it
is a questionable choice. This switch is designed to deliver PoE to remote
places and using it as a router is unlikely. Meanwhile, the lan1 port is
also PoE-in and will often be the uplink, carrying most of the traffic.

Reverting f1c9afd80138 for USW-Flex restores full 1 Gbps switching
performance on all ports.

Signed-off-by: Anders Melchiorsen <amelchio@nogoto.net>
Link: https://github.com/openwrt/openwrt/pull/17703
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 days agoimx: coretexa53: add network configuration for gw82xx-2x
Tim Harvey [Thu, 23 Jan 2025 18:29:55 +0000 (10:29 -0800)]
imx: coretexa53: add network configuration for gw82xx-2x

The GW82xx-2x has two network ports. By convention, the first
port (eth0) should be the WAN port and the second port (eth1)
should be the LAN port.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/17717
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 days agoimx: 6.6: add a patch to work around a PCI init hang on IMX8M{M,P}
Tim Harvey [Tue, 17 Dec 2024 22:52:48 +0000 (14:52 -0800)]
imx: 6.6: add a patch to work around a PCI init hang on IMX8M{M,P}

The act of attempting link at gen1 then trying to link at higher speeds
causes a hang with the specific PCIe switch used on the Gateworks Venice
boards. Work around this by linking at the highest speed first as is
common with all other PCI controller drivers.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/17717
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 days agoimx: 6.6: add some backported kernel patches for Gateworks Venice
Tim Harvey [Tue, 17 Dec 2024 22:50:51 +0000 (14:50 -0800)]
imx: 6.6: add some backported kernel patches for Gateworks Venice

Add several dt backports for the Gateworks Venice product family.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/17717
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 days agogeneric: 6.6: add backported btsdio patch for cyw437
Tim Harvey [Tue, 17 Dec 2024 22:51:57 +0000 (14:51 -0800)]
generic: 6.6: add backported btsdio patch for cyw437

Add a backport of a btsdio patch for the cyw437 bluetooth controller.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/17717
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 days agoocteon: ubnt-usg: add board name to supported devices
Eric Fahlgren [Sun, 26 Jan 2025 17:25:13 +0000 (09:25 -0800)]
octeon: ubnt-usg: add board name to supported devices

The on-device board name reported by 'ubus call system board' is not present
in the generated profiles.json.  This results in upgrade tools being unable
to match the image with the proper device.  Let's add a 'SUPPORTED_DEVICES'
entry for the board name to fix this.

Links: https://forum.openwrt.org/t/owut-openwrt-upgrade-tool/200035/441
Links: https://github.com/openwrt/openwrt/commit/2a07270180ed0e295d854d6e9e59c78c40549efc
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17736
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agoramips: mt7620: fix patching mac address in caldata
Paweł Owoc [Sun, 26 Jan 2025 18:53:31 +0000 (19:53 +0100)]
ramips: mt7620: fix patching mac address in caldata

Fix usage of non-existent 'caldata_patch_mac' function
by using the 'caldata_patch_data' function.

Fixes: #17734
Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17737
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agoqoriq: Switch to use a module for mv88e6xxx
Linus Walleij [Sat, 11 Jan 2025 23:00:01 +0000 (00:00 +0100)]
qoriq: Switch to use a module for mv88e6xxx

It's possible to add the driver for the Marvell MV88E6xxx DSA
switches using a module package rather than to compile it into
the kernel. For affected devices this saves a bit of space,
the DSA core alone is around 600 KB on ARM.

I could only find one device actually using this switch (I also
checked upstream DTS files) so I have added the package to that
one device.

In the config CONFIG_NET_DSA_TAG_TRAILER and CONFIG_NET_DSA_OCELOT
were also selected, which seems like mistakes. These taggers are
only used by the MV88E6060 and driver which is a separate switch
from MV88E6xxx and the Ocelot drivers such as
CONFIG_NET_DSA_MSCC_FELIX or CONFIG_NET_DSA_MSCC_SEVILLE
and no qoric platform seems to be using them, nor are they
selected in the config.

Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250113-mv88e6xxx-modularize-v2-2-3064419615cd@linaro.org/
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
3 days agomvebu: Switch to use a module for mv88e6xxx
Linus Walleij [Sat, 11 Jan 2025 22:46:34 +0000 (23:46 +0100)]
mvebu: Switch to use a module for mv88e6xxx

It's possible to add the driver for the Marvell MV88E6xxx DSA
switches using a module package rather than to compile it into
the kernel. For affected devices this saves a bit of space,
typically the DSA core is 600 KB so this and some more is saved
for devices with no DSA switch.

When adding the packages I went over both the upstream DTS files
and the OpenWrt-specific DTS files and used grep 'marvell,mv88e6'
to find the devices using these switches.

Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250113-mv88e6xxx-modularize-v2-1-3064419615cd@linaro.org/
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
3 days agorealtek: Simple conversions to RTL8231 MFD driver
Sander Vanheule [Sat, 18 Jan 2025 20:40:06 +0000 (21:40 +0100)]
realtek: Simple conversions to RTL8231 MFD driver

Change devices with RTL8231 GPIO expander definition that can easily be
translated to the new RTL8231 binding and carry over any gpio-hogs. This
will let them use the new RTL8231 MFD driver, without any functional
changes.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
3 days agounetd: update to Git HEAD (2025-01-26)
Felix Fietkau [Sun, 26 Jan 2025 20:20:00 +0000 (21:20 +0100)]
unetd: update to Git HEAD (2025-01-26)

322500403615 service: add default group @ to match all nodes
5f7860306200 ubus: rename unetd_ubus_notify to unetd_ubus_network_notify
d13752814651 enroll: add PEX sub-protocol to support enrolling new nodes into a network

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 days agonetifd: remove leftover wifi reload_legacy call
Felix Fietkau [Sun, 26 Jan 2025 20:18:27 +0000 (21:18 +0100)]
netifd: remove leftover wifi reload_legacy call

Commit d12753929165 removed support for it

Fixes: #17738
Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 days agounetd: fix interface teardown
Felix Fietkau [Sun, 26 Jan 2025 20:10:53 +0000 (21:10 +0100)]
unetd: fix interface teardown

Pass the correct device name in the network_del ubus call

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 days agotools/dwarves: update to v1.29
Tony Ambardar [Wed, 22 Jan 2025 07:00:35 +0000 (23:00 -0800)]
tools/dwarves: update to v1.29

Update to include the latest upstream improvements and bugfixes, including
pahole now always encoding reproducibly.

Drop the local patch:
     100-reproducible-builds.patch

Release Notes: https://lore.kernel.org/bpf/Z4-TDt42dTKZvCo6@x1/
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/17705
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 days agogeneric: fix probe issues with RealTek RTL8221B PHYs
Daniel Golle [Thu, 23 Jan 2025 03:36:10 +0000 (03:36 +0000)]
generic: fix probe issues with RealTek RTL8221B PHYs

Import patch "net: phy: realtek: mark existing MMDs as present"

    When using Clause-45 mode to access RealTek RTL8221B 2.5G PHYs some
    versions of the PHY fail to report the MMDs present on the PHY.
    Mark MMDs PMAPMD, PCS and AN which are always existing according to
    the datasheet as present to fix that.

Fixes: #16823, #17183, #17232
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Tested-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Tested-by: Juan Pedro Paredes Caballero <juanpedro.paredes@gmail.com>
4 days agoqualcommbe: ipq95xx: Set target as source-only
Christian Marangi [Sat, 25 Jan 2025 20:18:02 +0000 (21:18 +0100)]
qualcommbe: ipq95xx: Set target as source-only

Set target as source-only for now as only the Reference Board is
supported and needs to better evaluated with real Devices.

Link: https://github.com/openwrt/openwrt/pull/17725
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 days agoqualcommbe: ipq95xx: Enable Aquantia PHY by default
Christian Marangi [Sat, 25 Jan 2025 20:13:16 +0000 (21:13 +0100)]
qualcommbe: ipq95xx: Enable Aquantia PHY by default

Enable the Aquantia PHY by default in config-defaults. Target is big
enough to permit embedding the PHY instead of having as an external
module.

Link: https://github.com/openwrt/openwrt/pull/17725
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 days agoqualcommbe: ipq95xx: Update patch with upstream version and refresh
Christian Marangi [Sat, 25 Jan 2025 20:11:24 +0000 (21:11 +0100)]
qualcommbe: ipq95xx: Update patch with upstream version and refresh

Update patch with upstream version and automatically refresh with make
target/linux/refresh.

Also backport one additional fix patch for NAND patch and drop a patch
merged upstream.

Link: https://github.com/openwrt/openwrt/pull/17725
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 days agoqualcommbe: ipq95xx: Add patch fixing unmet dependency for QCOM PPE
Christian Marangi [Mon, 9 Dec 2024 17:25:45 +0000 (18:25 +0100)]
qualcommbe: ipq95xx: Add patch fixing unmet dependency for QCOM PPE

Add patch fixing unmet dependency for QCOM PPE. This fix a compilation
error when SFP config is selected.

Link: https://github.com/openwrt/openwrt/pull/17725
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 days agoqualcommbe: ipq95xx: Add patch adding partition table common to RDP
Christian Marangi [Mon, 9 Dec 2024 17:24:50 +0000 (18:24 +0100)]
qualcommbe: ipq95xx: Add patch adding partition table common to RDP

Add patches adding partition table common to RDP board and node for AQR
NVMEM.

Link: https://github.com/openwrt/openwrt/pull/17725
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 days agoqualcommbe: ipq95xx: Add patch fixing USB regulator
Christian Marangi [Mon, 9 Dec 2024 17:24:01 +0000 (18:24 +0100)]
qualcommbe: ipq95xx: Add patch fixing USB regulator

Add patch fixing USB regulator as the LDO needs to use ID 5 instead of
ID 2.

Link: https://github.com/openwrt/openwrt/pull/17725
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 days agoqualcommbe: ipq95xx: Backport cpufreq patch and enable RPM
Christian Marangi [Thu, 5 Dec 2024 14:10:53 +0000 (15:10 +0100)]
qualcommbe: ipq95xx: Backport cpufreq patch and enable RPM

Backport CPUFreq patch and enable RPM. This is to enable CPU Frequency
scaling and regulators.

Link: https://github.com/openwrt/openwrt/pull/17725
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 days agoqualcommbe: ipq95xx: Add initial support for new target
Christian Marangi [Wed, 4 Dec 2024 00:53:47 +0000 (01:53 +0100)]
qualcommbe: ipq95xx: Add initial support for new target

Add initial support for new target with the initial patch for ethernet
support using pending upstream patches for PCS UNIPHY, PPE and EDMA.

Only initramfs currently working as support for new SPI/NAND
implementation, USB, CPUFreq and other devices is still unfinished and
needs to be evaluated.

Link: https://github.com/openwrt/openwrt/pull/17725
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 days agorealtek: Split Zyxel GS1900-8 into v1 and v2
Sander Vanheule [Wed, 22 Jan 2025 11:25:18 +0000 (12:25 +0100)]
realtek: Split Zyxel GS1900-8 into v1 and v2

Zyxel GS1900-8 v2 devices have been produced more recently than v1
devices. As there are v1 boards with RTL8380M rev. C SoCs, it can likely
safely be assumed that all v2 devices will also have a recent SoC
revision, supporting the hardware auxiliary MDIO controller.

Make the GS1900-8 v1 use an emulated auxiliary MDIO bus, for backward
compatibility with devices containing an RTL8380M rev. A.

Since the devicetrees are otherwise identical, GS1900-8 v1 devices with
an RTL8380M rev. B or C will also be able to use the (more efficient) v2
image. This includes any currently functioning device with OpenWrt, so
include the old compatible as a supported device for the GS1900-8 v2.

Link: https://github.com/openwrt/openwrt/issues/9534
Signed-off-by: Sander Vanheule <sander@svanheule.net>
5 days agorealtek: rtl838x: Enable MDIO_GPIO driver
Sander Vanheule [Tue, 21 Jan 2025 18:57:22 +0000 (19:57 +0100)]
realtek: rtl838x: Enable MDIO_GPIO driver

The mdio-gpio driver is required to support early revision of RTL8380M
slicon (rev A) where the auxilairy MDIO controller does not function
correctly. Add this driver to the rtl838x kernel so devices with old
SoCs are also able to function correctly.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
5 days agorealtek: Move GS1900 external GPIO to new DTSI
Sander Vanheule [Wed, 22 Jan 2025 11:16:00 +0000 (12:16 +0100)]
realtek: Move GS1900 external GPIO to new DTSI

In order to be able to define the external GPIO controller on an
emulated MDIO bus, move the controller definition outside of the main
GS1900 include for RTL838x-based devices.

Additionally, a new DTSI is provided defining the RTL8231 on the
emulated MDIO bus.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
5 days agorealtek: Add virtual MDIO bus on rtl838x
Sander Vanheule [Tue, 21 Jan 2025 18:40:11 +0000 (19:40 +0100)]
realtek: Add virtual MDIO bus on rtl838x

Some RTL8380M-based devices have been around for a long time and use an
early A revision of the RTL8380M SoC. This revision has an issue with
the auxiliary MDIO controller, causing it to malfunction. This may lead
to device reboots when the controller is used.

Provide a bit-banged MDIO bus, which muxes the auxiliary MDIO pins to
their GPIO function. Although this will result in lower performance,
there should otherwise be no functional differences.

Link: https://github.com/openwrt/openwrt/issues/9534
Signed-off-by: Sander Vanheule <sander@svanheule.net>
5 days agorealtek: Enable Zyxel GS1900's RTL8231 reset line
Sander Vanheule [Tue, 21 Jan 2025 18:37:25 +0000 (19:37 +0100)]
realtek: Enable Zyxel GS1900's RTL8231 reset line

As the bootloader is reconfiguring the RTL8231 on these devices anyway,
no pin state can be maintained over warm reboots. This results in for
example the PoE disable pin always being asserted by the bootloader.

Define the GPIO line linked to the RTL8231's reset so the MDIO subsystem
will also reset the expander on boot and ensure the line in the correct
state.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
5 days agokernel: bump 6.6 to 6.6.74
John Audia [Thu, 23 Jan 2025 17:22:43 +0000 (12:22 -0500)]
kernel: bump 6.6 to 6.6.74

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.74

All patches automatically rebased.

Build system: x86/64
Build-tested: bcm27xx/bcm2712, flogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: bcm27xx/bcm2712, flogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17708
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 days agokernel: Make kmod-usb-chipidea select kmod-phy-ath79-usb
Hauke Mehrtens [Fri, 24 Jan 2025 21:56:59 +0000 (22:56 +0100)]
kernel: Make kmod-usb-chipidea select kmod-phy-ath79-usb

The USB PHY on the ar9330 and similar SoCs needs the PHY driver. In
OpenWrt 23.05 it was compiled into the kernel. The kernel 6.6
configuration does not compile it in any more, make the
kmod-usb-chipidea driver select it to add it to the images.

Fixes: https://github.com/openwrt/openwrt/issues/17710
Fixes: 04bdf9b3323e ("ath79: disable ath79 USB phy drivers by default")
Link: https://github.com/openwrt/openwrt/pull/17720
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 days agomediatek-mt7622: netgear-wax206 fix wifi leds
Florian Maurer [Wed, 22 Jan 2025 18:59:12 +0000 (19:59 +0100)]
mediatek-mt7622: netgear-wax206 fix wifi leds

the wifi leds of the wax206 were not reacting.
This patch enables the green leds to show activity, as the blue ones are very bright.
Also set the label-mac to the gmac0

Signed-off-by: Florian Maurer <f.maurer@outlook.de>
Link: https://github.com/openwrt/openwrt/pull/17694
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 days agoarmsr: add Hyper-V on Arm64 support
Mathew McBride [Fri, 17 Jan 2025 05:58:05 +0000 (16:58 +1100)]
armsr: add Hyper-V on Arm64 support

This adds support for running as a guest on Windows Hyper-V
on arm64 Windows machines (like the Qualcomm Snapdragon X based
machines). The drivers are the same as Hyper-V on x86-64.

Limitations:
- The VM must be configured with a single vCPU only[1].

It appears Microsoft has made changes to Arm64 Hyper-V's timers
and other infrastructure in Windows 11 24H2 which require
kernel changes[2][3] to fix.

- You must turn off secure boot enforcement to boot OpenWrt, as
OpenWrt/armsr does not have a signed bootloader.

[1] https://www.reddit.com/r/Surface/comments/1dmzpzt/comment/lx4tatp/
[2] https://www.reddit.com/r/Surface/comments/1dmzpzt/comment/m5bqgrm/
[3] https://github.com/microsoft/WSL2-Linux-Kernel

Signed-off-by: Mathew McBride <matt@traverse.com.au>
Link: https://github.com/openwrt/openwrt/pull/17675
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 days agorealtek: Fix old compatible for HPE 1920-8G PoE
Sander Vanheule [Fri, 24 Jan 2025 16:07:21 +0000 (17:07 +0100)]
realtek: Fix old compatible for HPE 1920-8G PoE

Supported devices are listed in the metadata as the first part of the
DTS compatible. This normally follows the format "vendor,device".

When updating the device name of the 180W 1920-8G PoE an underscore was
used, instead of a comma, to join the vendor and device name. This will
lead to warnings for users wanting to sysupgrade a device with an older
compatible, as the device's info does not match the one the metadata.

Fixes: 987c96e88927 ("realtek: rename hpe,1920-8g-poe to match hardware")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
6 days agoqualcommax: add missing WAN LED support to Spectrum SAX1V1K routers
Ivan Deng [Thu, 16 Jan 2025 08:53:36 +0000 (00:53 -0800)]
qualcommax: add missing WAN LED support to Spectrum SAX1V1K routers

Fixed an issue where both WAN LEDs light up before plugging in the
ethernet cable and no blinking regardless of WAN network activity.

Updated the LED configuration to reflect proper status:
Green indicates 2.5Gb connection speed.
Yellow indicates other connection speed and traffic activity.

This resolves inconsistent WAN LED behavior on Spectrum SAX1V1K routers.

Signed-off-by: Ivan Deng <hongba@rocketmail.com>
Link: https://github.com/openwrt/openwrt/pull/17623
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agokernel: vrx518_tc: bump PKG_RELEASE
Sergey Ryazanov [Wed, 22 Jan 2025 22:26:54 +0000 (00:26 +0200)]
kernel: vrx518_tc: bump PKG_RELEASE

Bump PKG_RELEASE after the previous fixes.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250122222654.21833-5-ryazanov.s.a@gmail.com/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 days agoipq40xx: fix compatibility with linux-atm tools
Sergey Ryazanov [Wed, 22 Jan 2025 22:26:53 +0000 (00:26 +0200)]
ipq40xx: fix compatibility with linux-atm tools

atm_qos struct should be the same both for user and kernel spaces. Via
the __SO_ENCODE() macro it is used to define the SO_ATMQOS socket IOC.

During the VRX518 support introduction, the atm_trafprm sturct nested
into the atm_qos stucture was update with newer fields that are
referenced by the ATM TC layer of the VRX518 TC driver. These new fields
are intended to communicate information for extra traffic classes
supported by the driver. But we are still using vanilla kernel headers
to build the toolchain. Due to the atm.h header incoherency br2684ctl
from linux-atm tools is incapable to configure the ATM bridge netdev:

  br2684ctl: Interface "dsl0" created sucessfully
  br2684ctl: Communicating over ATM 0.1.2, encapsulation: LLC
  br2684ctl: setsockopt SO_ATMQOS 22 <-- EINVAL errno
  br2684ctl: Fatal: failed to connect on socket; File descriptor in bad state

There are two options to fix this incoherency. (a) update the header
file in the toolchain to build linux-atm against updated atm_trafprm and
atm_qos structures, or (b) revert atm_trafprm changes.

Since there are no actual users of the extra ATM QoS traffic classes,
just drop these extra traffic classes from vrx518_tc ATM TC layer and
drop the kernel patch updating atm.h.

Besides fixing the compatibility with linux-atm tools, removing the
kernel patch should simplify kernel updates removing unneeded burden of
maintenance.

Run tested with FRITZ!Box 7530 with disabled extra traffic classes and
then removed them entirely before the submission.

CC: John Crispin <john@phrozen.org>
Fixes: cfd42a0098 ("ipq40xx: add Intel/Lantiq ATM hacks")
Suggested-by: Andre Heider <a.heider@gmail.com>
Reported-and-tested-by: nebibigon93@yandex.ru
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250122222654.21833-4-ryazanov.s.a@gmail.com/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 days agokernel: vrx518_tc: fix ADSL/ATM operation
Sergey Ryazanov [Wed, 22 Jan 2025 22:26:52 +0000 (00:26 +0200)]
kernel: vrx518_tc: fix ADSL/ATM operation

ATM TC layer have some issues which effectively prevent VRX518 from
being used as ADSL modem. Specifically, there one crash during the ATM
layer configuration and wrong PVC ID selection on packet receiving what
breaks RX path. Fix both of the issues. Make subif iface registration
optional to prevent the crash (see more details in the new patch) and
update the hardcoded PVC ID to match the first allocated channel.

Run tested with FRITZ!Box 7530.

Fixes: 474bbe23b7 ("kernel: add Intel/Lantiq VRX518 TC driver")
Reported-and-tested-by: nebibigon93@yandex.ru
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250122222654.21833-3-ryazanov.s.a@gmail.com/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 days agokernel: vrx518_tc: fix RX desc phys to virt mapping
Sergey Ryazanov [Wed, 22 Jan 2025 22:26:51 +0000 (00:26 +0200)]
kernel: vrx518_tc: fix RX desc phys to virt mapping

It looks like VRX518 returns phys addr of data buffer in the 'data_ptr'
field of the RX descriptor and an actual data offset within the buffer
in the 'byte_off' field. In order to map the phys address back to
virtual we need the original phys address of the allocated buffer.

In the same driver applies offset to phys address before the mapping,
what leads to WARN_ON triggering in plat_mem_virt() function with
subsequent kernel panic:

  WARNING: CPU: 0 PID: 0 at .../sw_plat.c:764 0xbf306cd0 [vrx518_tc@8af9f5d0+0x25000]
  ...
  Unable to handle kernel NULL pointer dereference at virtual address 00000000
  pgd = aff5701e
  [00000000] *pgd=00000000
  Internal error: Oops: 5 [#1] SMP ARM

Noticed in ATM mode, when chip always returns byte_off = 4.

In order to fix the issue, pass the phys address to plat_mem_virt() as
is and apply byte_off later for proper DMA syncing and on mapped virtual
address when copying RXed data into the skb.

Run tested with FRITZ!Box 7530 on both ADSL and VDSL (thanks Jan) links.

Fixes: 474bbe23b7 ("kernel: add Intel/Lantiq VRX518 TC driver")
Tested-by: Jan Hoffmann <jan@3e8.eu> # VDSL link
Reported-and-tested-by: nebibigon93@yandex.ru # ADSL link
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250122222654.21833-2-ryazanov.s.a@gmail.com/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 days agomediatek: add Airoha AN8855 gigabit switch driver
Dim Fish [Fri, 11 Oct 2024 16:25:29 +0000 (19:25 +0300)]
mediatek: add Airoha AN8855 gigabit switch driver

New revisions of Xiaomi AX3000T with 1.0.84+ stock firmware contain new hardware.
This commit add support for Airoha AN8855 gigabit switch driver with 6.6 kernel patches

Based on https://patchwork.kernel.org/project/netdevbpf/cover/20241209134459.27110-1-ansuelsmth@gmail.com/

Signed-off-by: Dim Fish <dimfish@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16709
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
7 days agomt76: update to Git HEAD (2025-01-22)
Felix Fietkau [Thu, 23 Jan 2025 10:36:59 +0000 (11:36 +0100)]
mt76: update to Git HEAD (2025-01-22)

3e85822b9c66 page_pool: remove PP_FLAG_PAGE_FRAG
a22d59e4ad50 tools: fix allocation check and missing memory freeing

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 days agomediatek: use standard PHY reset bindings for Cudy WR3000H
Chukun Pan [Wed, 15 Jan 2025 15:10:26 +0000 (23:10 +0800)]
mediatek: use standard PHY reset bindings for Cudy WR3000H

Use generic Ethernet PHY reset bindings.
Remove the useless lan label as connected switch.

Fixes: 9d66b8b ("mediatek: filogic: Add support for cudy wr3000h")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
7 days agomediatek: cleanup device tree for cudy devices
Chukun Pan [Thu, 5 Dec 2024 15:26:18 +0000 (23:26 +0800)]
mediatek: cleanup device tree for cudy devices

Fixes typo for led properties.
Delete the unused rfb compatible.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
7 days agomediatek: update status led for Cudy TR3000
Chukun Pan [Wed, 4 Dec 2024 15:26:28 +0000 (23:26 +0800)]
mediatek: update status led for Cudy TR3000

Use white led when running, consistent with the stock firmware.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
7 days agomediatek: cudy: fixes 2.5G PHY interrupt support
Chukun Pan [Mon, 9 Dec 2024 15:17:06 +0000 (23:17 +0800)]
mediatek: cudy: fixes 2.5G PHY interrupt support

Fixed interrupt support for 2.5G PHY.
Removed useless phy-mode on phy node.

Tested on Cudy TR3000.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
7 days agomediatek: cudy: fixes typo for spi and mtd properties
Chukun Pan [Tue, 3 Dec 2024 15:02:15 +0000 (23:02 +0800)]
mediatek: cudy: fixes typo for spi and mtd properties

Same as commit 3674689, correct 'buswidth' to 'bus-width'.
Move the nmbm properties outside the partition definition.
Change uppercase to lowercase, add missing read-only flag.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
7 days agogeneric: backport pending gpio-regmap ops patch
Álvaro Fernández Rojas [Wed, 22 Jan 2025 19:42:49 +0000 (20:42 +0100)]
generic: backport pending gpio-regmap ops patch

This patch has been accepted for linux v6.14 so we can move it from pending
to backport.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 days agogeneric: fix version number on realtek phy patches
Álvaro Fernández Rojas [Wed, 22 Jan 2025 19:34:26 +0000 (20:34 +0100)]
generic: fix version number on realtek phy patches

These patches have been accepted in linux v6.14 instead of v6.13.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 days agogeneric: net: phy: realtek: expose temperature sensors
Daniel Golle [Fri, 17 Jan 2025 20:53:03 +0000 (20:53 +0000)]
generic: net: phy: realtek: expose temperature sensors

Expose the temperature sensor built-into RTL822x 2.5G and 5G PHYs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 days agogeneric: refresh hack patches
Mieczyslaw Nalewaj [Wed, 22 Jan 2025 16:05:30 +0000 (17:05 +0100)]
generic: refresh hack patches

Refresh hack patches with make target/linux/refresh.

Fixes: 9508ca44eb57 ("kernel: backport improvement to page pool fragment handling from 6.7")
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
8 days agokernel: add missing version number to the page pool backport patch
Felix Fietkau [Wed, 22 Jan 2025 11:40:57 +0000 (12:40 +0100)]
kernel: add missing version number to the page pool backport patch

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 days agokernel: backport improvement to page pool fragment handling from 6.7
Felix Fietkau [Wed, 22 Jan 2025 11:11:56 +0000 (12:11 +0100)]
kernel: backport improvement to page pool fragment handling from 6.7

Makes it easier to keep drivers like mt76 in sync with newer versions

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 days agogeneric: mtk_eth_soc: reduce driver memory usage
Danila Romanov [Mon, 20 Jan 2025 15:40:20 +0000 (18:40 +0300)]
generic: mtk_eth_soc: reduce driver memory usage

1. Import pending patch to fix ramips/mt7621 64MB targets.

2. Do not enable CONFIG_PAGE_POOL_STATS by default.

Signed-off-by: Danila Romanov <pervokur@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 days agokernel: bump 6.6 to 6.6.73
John Audia [Tue, 21 Jan 2025 20:07:46 +0000 (15:07 -0500)]
kernel: bump 6.6 to 6.6.73

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.73

No patches needed a rebase.

Build system: x86/64
Build-tested: bcm27xx/bcm2712, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: bcm27xx/bcm2712, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17687
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
8 days agorealtek: add support for XikeStor SKS8300-8X
INAGAKI Hiroshi [Fri, 24 May 2024 04:38:02 +0000 (13:38 +0900)]
realtek: add support for XikeStor SKS8300-8X

XikeStor (Seeker) SKS8300-8X is a 8 ports Multi-Gig switch, based on
RTL9303.

Specification:

- SoC             : Realtek RTL9303
- RAM             : DDR3 512 MiB
- Flash           : SPI-NOR 32 MiB (Winbond W25Q256JVFIQ)
- Ethernet        : 8x 1/2.5/10 Gbps (SFP+)
- LEDs/Keys (GPIO): 1x/1x
- UART            : "Console" port on the front panel
  - type          : RS-232C
  - connector     : RJ-45
  - settings      : 9600n8
- Watchdog        : Diodes PT7A7514WE
- Power           : 12 VDC, 2 A

Flash instruction using initramfs image:

 1. Prepare TFTP server with an IP address "192.168.2.36"
 2. Connect your PC to Port1 on SKS8300-8X
 3. Power on SKS8300-8X and interrupt by Ctrl + B
 4. Login to the vendor CLI by Ctrl + F and "diagshell_unipoe_env"
 5. Login to the U-Boot CLI by "debug_unish_env" command
 6. Enable Port1 with the following commands

    rtk 10g 0 fiber1g (or fiber10g if 10GBase-*R)
    rtk ext-devInit 0
    rtk ext-pinSet 2 0

    Note: the last command sets tx-disable to low

 7. Download initramfs image from TFTP server

    tftpboot 0x82000000 <image name>

 8. Boot with the downloaded image

    bootm

 9. On the initramfs image, backup the stock firmware if needed
10. Upload (or download) sysupgrade image to the device
11. Erase "firmware" partition to cleanup JFFS2 of stock FW

    mtd erase firmware

12. Perform sysupgrade with the sysupgrade image
13. Wait ~120 sec to complete flashing

Notes:

- A kernel binary "nos.img" needs to be stored into JFFS2 filesystem
  using 4KiB erase block instead of 64KiB.

- PT7A7514WE is handled by hardware-assited system LED output
  (blinking).

- Some Japanese users asked to XikeStor about maximum power limit of
  SFP+ ports and got approximate criteria:

  - per port       : <=  2.9 W
  - total (8 ports): <= 15.8 W

MAC addresses:

eth0   : 84:E5:D8:xx:xx:37 (board-info (stock:"flash_raw"), 0x218 (hex))
(ports): 84:E5:D8:xx:xx:36 (board-info (stock:"flash_raw"), 0x1f1 (hex))

Reverting to stock firmware:

1. Prepare OpenWrt SDK to use the mkfs.jffs2 tool contained in it

   Note: the official mkfs.jffs2 tool in mtd-utils doesn't support 4KiB
         erase size and not usable for SKS8300-8X

2. Create a directory for working
3. Download official firmware for SKS8300-8X from XikeStor's official
   website
4. Rename the downloaded firmware to "nos.img" and place it to the
   working directory
5. Create a JFFS2 filesystem binary with the working directory

   /path/to/mkfs.jffs2 -p -b -U -v -e 4KiB -x lzma \
       -o nos.img.jffs2 -d /path/to/working/dir/

6. Upload the created JFFS2 filesystem binary to the device
7. Erase the "firmware" partition

   mtd erase firmware

8. Write the JFFS2 filesystem binary to the "firmware" partition

   mtd write /path/to/nos.img.jffs2 firmware

9. After writing, reboot the device by power cycle

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17593
Signed-off-by: Sander Vanheule <sander@svanheule.net>
8 days agorealtek: suppress debug messages of RTL930x SerDes in PHY driver
INAGAKI Hiroshi [Mon, 23 Dec 2024 12:00:26 +0000 (21:00 +0900)]
realtek: suppress debug messages of RTL930x SerDes in PHY driver

Change some debugging messages of RTL930x SerDes in the PHY driver to
pr_debug() to suppress log messages on the console.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17593
Signed-off-by: Sander Vanheule <sander@svanheule.net>
8 days agorealtek: add 10GBASER to supported interfaces in DSA driver
INAGAKI Hiroshi [Mon, 23 Dec 2024 11:58:30 +0000 (20:58 +0900)]
realtek: add 10GBASER to supported interfaces in DSA driver

add PHY_INTERFACE_MODE_10GBASER to supported_interfaces for using
10GBase-*R interfaces on SFP+ ports.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17593
Signed-off-by: Sander Vanheule <sander@svanheule.net>
8 days agorealtek: add aux-mdio and pinctrl nodes to rtl930x.dtsi
INAGAKI Hiroshi [Sun, 19 Jan 2025 10:01:28 +0000 (19:01 +0900)]
realtek: add aux-mdio and pinctrl nodes to rtl930x.dtsi

Add aux-mdio and pinctrl nodes to rtl930x.dtsi to enable handling of the
external RTL8231 GPIO expander connected via MDIO.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17593
Signed-off-by: Sander Vanheule <sander@svanheule.net>
8 days agorealtek: rtl930x: enable rtl8231-related drivers
INAGAKI Hiroshi [Sun, 19 Jan 2025 09:56:15 +0000 (18:56 +0900)]
realtek: rtl930x: enable rtl8231-related drivers

Enable the following drivers to use the external RTL8231 GPIO expander.

- aux-mdio
- rtl8231 (mfd)
- rtl8231 (pinctrl)

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17593
Signed-off-by: Sander Vanheule <sander@svanheule.net>
8 days agorealtek: rtl930x: enable HIGHMEM for large memory (>256M)
INAGAKI Hiroshi [Sat, 25 May 2024 17:25:13 +0000 (02:25 +0900)]
realtek: rtl930x: enable HIGHMEM for large memory (>256M)

Enable HIGHMEM option to use all ranges of memory on XikeStor SKS8300-8X
that has 512MiB RAM.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17593
Signed-off-by: Sander Vanheule <sander@svanheule.net>
8 days agobuild: add additional parameter support to Build/jffs2
INAGAKI Hiroshi [Mon, 13 Jan 2025 08:30:26 +0000 (17:30 +0900)]
build: add additional parameter support to Build/jffs2

Allow specifying additional parameters on Build/jffs2.
This is useful to specify additional options or overriding existing
ones.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17593
Signed-off-by: Sander Vanheule <sander@svanheule.net>
8 days agotools: firmware-utils: update to Git HEAD (2024-01-14)
INAGAKI Hiroshi [Mon, 13 Jan 2025 10:46:10 +0000 (19:46 +0900)]
tools: firmware-utils: update to Git HEAD (2024-01-14)

12c0b42 nosimg-enc: add new tool for XikeStor SKS8300 series

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17593
Signed-off-by: Sander Vanheule <sander@svanheule.net>
9 days agoath79: meraki-mr18: fix initramfs build
Lech Perczak [Mon, 20 Jan 2025 23:10:50 +0000 (00:10 +0100)]
ath79: meraki-mr18: fix initramfs build

Now, that initramfs images built for ZTE devices work, by moving
LZMA_TEXT_START further up the available RAM - same fix works
successfully for Meraki MR18 too. Apply it and reenable initramfs
generation again.

Fixes: 1d49310fdb5e ("ath79: add Cisco Meraki MR18")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17680
Signed-off-by: Robert Marko <robimarko@gmail.com>
9 days agomediatek: Xiaomi AX3000t: fix soft brick for the rd23 model
Mikhail Zhilkin [Sat, 11 Jan 2025 14:55:17 +0000 (14:55 +0000)]
mediatek: Xiaomi AX3000t: fix soft brick for the rd23 model

This commit fixes Xiaomi AX3000t soft bricks. Issue affects at least rd23
model (Global version) users:
Link: https://forum.openwrt.org/t/openwrt-support-for-xiaomi-ax3000t/180490/452
I also found that these nvram settings are wrong for the rd23 model and
U-Boot erase them:
'''
flag_try_sys1_failed 8
flag_try_sys2_failed 8
'''
As a result, platform.sh -> xiaomi_initial_setup() function sometimes ends
early without applying settings for the rd23 model.

RD03 model strategy:
1. Don't touch values those were set up by platform.sh ->
xiaomi_initial_setup() function

RD23 model strategy:
1. Apply correct nvram settings at every boot
2. Use bulk fw_setenv call

I didn't find opened issue for AX3000t. Similar AX3200 issue:
Link: https://github.com/openwrt/openwrt/issues/16347
So, other Xiaomi devices (e.g. Xiaomi WR30U) may also require fix.

Fixes: 7dbcc1215a56cc1da68c81bf92d7efa174c5e051 ("mediatek: filogic: add support for Xiaomi AX3000T")
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17580
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
9 days agomediatek: replace multiple fw_setenv calls by the bulk one
Mikhail Zhilkin [Sat, 11 Jan 2025 14:46:05 +0000 (14:46 +0000)]
mediatek: replace multiple fw_setenv calls by the bulk one

This commit replaces multiple fw_setenv calls by the bulk one to reduce
flash writes.

Thanks @Linaro1985 for the idea.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17580
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
9 days agokernel: bump 6.6 to 6.6.72
John Audia [Fri, 17 Jan 2025 13:25:17 +0000 (08:25 -0500)]
kernel: bump 6.6 to 6.6.72

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.72

Dropped to due being superseded by upstream patch:
mediatek/patches-6.6/870-drm-mediatek-only-touch-DISP_REG_OVL_PITCH_MSB-if-AF.patch[1]

All other patches automatically rebased.

1. https://github.com/gregkh/linux/commit/ac7f5641e9887354a0fc6f48190533af084bb0dc

Build system: x86/64
Build-tested: bcm27xx/bcm2712, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: bcm27xx/bcm2712, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17646
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
9 days agolantiq: xrx200: fb7430 set correct label-mac
Florian Maurer [Wed, 15 Jan 2025 20:31:47 +0000 (21:31 +0100)]
lantiq: xrx200: fb7430 set correct label-mac

the CWMP account mac is correctly set on the lan device but was not correctly as label-mac

Signed-off-by: Florian Maurer <f.maurer@outlook.de>
Link: https://github.com/openwrt/openwrt/pull/17618
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
9 days agokernel: add missing symbols for lxc
John Audia [Fri, 10 Jan 2025 02:22:48 +0000 (21:22 -0500)]
kernel: add missing symbols for lxc

These symbols are needed to satisfy lxc dependencies.

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17553
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
9 days agoath79: add support for Ruckus R500
Lech Perczak [Thu, 9 Jan 2025 20:40:03 +0000 (21:40 +0100)]
ath79: add support for Ruckus R500

Ruckus R500 datasheet: https://webresources.ruckuswireless.com/datasheets/r500/ds-ruckus-r500.html

Specifications:

SoC: 720Mhz QCA9558
RAM: 256MB
Storage: 64MB of FLASH (SPI NOR - S25FL512S)
1x AR8327 GB switch
Ethernet: 1x1000M port #3 on AR8327,
          1x1000M (802.3at POE), port #5 on AR8327
Wireless: QCA988X HW2.0 802.11ac
AR9550 2.4GHz 802.11b/g/n
5x GPIO LED
1x GPIO Reset Button
1x DC Jack 12v
1x UART, 3.3v, 115200
1x TPM, SLB9645TT12
2x Beamforming antennas configured via 74LV164

MAC addresses:
 1. art 0x807E | Factory bridged | f0:3e:90:XX:XX:80 |
 2. art 0x66   | eth0            | f0:3e:90:XX:XX:83 | (port 5, cpu port 6) - PoE port
 3. art 0x6c   | eth1            | f0:3e:90:XX:XX:84 | (port 3, cpu port 0) - non PoE port

Serial console: 115200-8-N-1 on internal H4 header.
Pinout:

H1
-----------
|1|x|3|4|5|
-----------

Pin 1 is near the "H4" marking.
1 - RX
x - no pin
3 - VCC (3.3V)
4 - GND
5 - TX

JTAG: Connector H2, similar to MIPS eJTAG, standard, unpoulated.

H9
----------------------
|2 |4 |6 |8 |10|12|14|
----------------------
|1 |3 |5 |7 |9 |11|13|
----------------------

3 - TDI
5 - TDO
7 - TMS
9 - TCK
2,4,6,8,10 - GND
14 - Vref
1,11,12,13 - Not connected

I²C: connector H2, near power LED, unpopulated:

------
|1|2|3
------
    H2

1 - SCL
2 - SDA
3 - GND

Installation:

Serial Port/TFTP

1. Setup tftp server on the local network
2. Connect to UART with TTL
3. Interupt U-boot process with Ctrl-C
4. Setup appropriate ipaddr and serverip in setenv:
  - setenv ipaddr 192.168.1.1
  - setenv serverip 192.168.1.2
5. On TFTP Server - copy openwrt-ath79-generic-ruckus_r500-initramfs-kernel.bin to /srv/tftp
6. On R500 boot into initrd image
  - tftpboot 0x81000000 openwrt-ath79-generic-ruckus_r500-initramfs-kernel.bin
  - bootm 0x81000000
7. On TFTP server - scp -O openwrt-ath79-generic-ruckus_r500-squashfs-sysupgrade.bin root@192.168.1.1:/tmp
8. Ensure the boot command is set before flashing the image:
    fw_setenv bootcmd 'bootm 0xbf1c0000'
9. On R500 - sysupgrade /tmp/openwrt-ath79-generic-ruckus_r500-squashfs-sysupgrade.bin
10. If not done in 8; set boot command from U-boot shell itself:
  - setenv bootcmd bootm 0xbf1c0000
  - saveenv
  - reset

This patch adapted from https://github.com/victhor393/openwrt-ruckus-r500/tree/ruckus-r500-master

Signed-off-by: Damien Mascord <tusker@tusker.org>
- Heavily refactored the device tree
- Extended commit message
- Documented onboad connectors
- Refactored MAC and calibration data setups to use nvmem-layout
- Made both network interfaces LAN ports and bridge them, this makes
  more sense for an access point and is consistent with the rest of
  Ruckus APs.
- Enable lzma-loader for compressed initramfs
- Enabled the optional internal USB port
- Added missing LEDs and according pinctrl settings
- Added reserved memory region used for bootloader communication
- Added the bit-banged I²C bus and onboard TPM
- Refactored boot scheme and flash layout to match earlier Ruckus
  devices and maximize usable space for user data.

Quirks:
- H7 is the physical presence switch for the SLB9645TT12 TPM.

TODO:
- Link state reporting on the Ethernet ports doesn't work and both ports
  report "up" due to limitation of swconfig ar8327 driver. With DSA
  conversion, this shall be rectified.
- Locate 2nd shift register (U7) controlling beamforming antennas, probably
  on ath10k GPIOs which are currently unsupported in the driver. For
  this, there is a device tree node describing that - but explicitly
  disabled.
- At the moment of adding support, there is an endianness bug in the TPM
  driver causing it to not detect the TPM module because of ID mismatch.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17550
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
9 days agouci: update to Git HEAD (2025-01-20)
Felix Fietkau [Mon, 20 Jan 2025 21:16:37 +0000 (22:16 +0100)]
uci: update to Git HEAD (2025-01-20)

047b2efc1348 CMakeLists.txt: bump minimum cmake version
16ff0badbde7 CMakeLists: add support for including ABIVERSION in the library version number

Signed-off-by: Felix Fietkau <nbd@nbd.name>
9 days agokernel: fix rootfs initramfs not updating on subsequent single build
Christian Marangi [Mon, 20 Jan 2025 16:14:47 +0000 (17:14 +0100)]
kernel: fix rootfs initramfs not updating on subsequent single build

There is currently a problem where the rootfs in an initramfs image for
single target build is not updated on subsequent run. This is caused by
a bug introduced in d78dec3e19e3 ("kernel: copy kernel build dir on
Per-Device Initramfs compilation") where the initramfs_data.cpio rm was
moved to PrepareConfigPerRootfs. This caused the side effect of dropping
the rm call for single target build making the kernel reusing the
previous generated initramfs_data.cpio.

To correctly handle this, restore the original location of this call
right after the touch /init call. This way the kernel will always
regenerate the initramfs embedded rootfs ALSO for single target build.

Fixes: d78dec3e19e3 ("kernel: copy kernel build dir on Per-Device Initramfs compilation")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
10 days agofritz-tools: increase PKG_RELEASE
Robert Marko [Mon, 20 Jan 2025 12:08:38 +0000 (13:08 +0100)]
fritz-tools: increase PKG_RELEASE

Increase PKG_RELEASE as follow-up for
("lantiq: fritz_cal_extract with reverse option for AVM FritzBox 7430").

Signed-off-by: Robert Marko <robimarko@gmail.com>
10 days agolantiq: fritz_cal_extract with reverse option for AVM FritzBox 7430
Dustin Gathmann [Wed, 15 Jan 2025 14:55:29 +0000 (15:55 +0100)]
lantiq: fritz_cal_extract with reverse option for AVM FritzBox 7430

This implementation of fritz_cal_extract can also retrieve firmware
data stored in reverse byte order, as found in the AVM 7430 device.

This is done by intermediate storage in a buffer presumably large enough
to hold the complete data set. Currently, this buffer size is 128kB + 1kB
(some extra space for skipped data).

In the usual case of "forward" data, this implementation should behave
like the original implementation in all common cases. limit [-l] will
determine the amount of data read and size of buffer allocated.

However, if you are reading reversed data or didn't set a limit, the buffer
may be too small to hold all data. In this case, you can choose a higher
limit [-l] to enforce a sufficient buffer size.

Signed-off-by: Dustin Gathmann <dzsoftware@posteo.org>
Link: https://github.com/openwrt/openwrt/pull/15501
Signed-off-by: Robert Marko <robimarko@gmail.com>
10 days agoramips: fixes for Keenetic KN-1711,1713,1910
Anton Yu. Ivanusev [Thu, 16 Jan 2025 16:05:38 +0000 (21:05 +0500)]
ramips: fixes for Keenetic KN-1711,1713,1910

The image size has been changed to prevent failures in routers and bootloop
when flashing a large image using a stock bootloader. The LED trigger
package has been removed for 1910, which is no longer in use.

Signed-off-by: Anton Yu. Ivanusev <ivanusevanton@yandex.ru>
Link: https://github.com/openwrt/openwrt/pull/17630
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
10 days agomediatek: EX5601-T0 add Zyxel EX5601-T1 and T-56 alias
Aleksander Jan Bajkowski [Wed, 15 Jan 2025 18:21:24 +0000 (19:21 +0100)]
mediatek: EX5601-T0 add Zyxel EX5601-T1 and T-56 alias

Define EX5601-T1 and T-56 as alternative name, to explicitly show
the device is supported using existing image. EX5601-T1 does not
have the option to switch between WAN/SFP port. The switch port
is hardwired to the WAN port. The Zyxel T-56 is the odido-branded
version of the EX5601-T1.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/17615
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
10 days agoath79: zte-mf28x-common: fix initramfs execution
Lech Perczak [Wed, 20 Nov 2024 02:45:46 +0000 (03:45 +0100)]
ath79: zte-mf28x-common: fix initramfs execution

Now that LZMA_TEXT_START is configurable per-target once again,
move the target above 32MB boundary for ZTE MF28* devices.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17616
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
10 days agoath79: lzma-loader: expose LZMA_TEXT_ADDRESS configuration again
Lech Perczak [Wed, 20 Nov 2024 02:45:21 +0000 (03:45 +0100)]
ath79: lzma-loader: expose LZMA_TEXT_ADDRESS configuration again

initramfs for some devices grew so big, that it can't be loaded within
the previous 32MB RAM limit. Make the LZMA_TEXT_ADDRESS configurable
per-target once again, to fix it for bigger devices, while maintaining
compatibility with previous ones.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17616
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 days agoethtool: update to 6.11
Andrea Pesaresi [Wed, 15 Jan 2025 00:15:20 +0000 (01:15 +0100)]
ethtool: update to 6.11

Version 6.11 - October 8, 2024
* Feature: cmis: print active and inactive firmware versions
* Feature: flash transceiver module firmware (--flash-module-firmware)
* Feature: add T1BRR 10Mb/s mode to link mode tables
* Feature: support for disabling netlink from command line
* Fix: fix lanes parameter format specifier
* Fix: add missing clause 33 PSE manual description
* Fix: qsf: Better handling of Page A2h netlink read failure
* Fix: rss: retrieve ring count using ETHTOOL_GRXRINGS ioctl (-x)
* Misc: man page formatting fix

* changelog here: https://git.kernel.org/pub/scm/network/ethtool/ethtool.git/commit/NEWS?id=c0ea4b70c71334ef038f7a3416b228a50dada406

Tested on gl.inet MT6000, retrieve ring count is now working

Signed-off-by: Andrea Pesaresi <andreapesaresi82@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17607
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agomac80211: Fix tracing backport
Tony Ambardar [Wed, 1 Jan 2025 12:48:56 +0000 (04:48 -0800)]
mac80211: Fix tracing backport

Update handling of macro __assign_str() to also support the one-argument
variant when building against kernel 6.10 or later. This is needed for
building the next LTS kernel 6.12.

Fixes: 384d079fd8 ("mac80211: update to version 6.11")
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/17456
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agogeneric: add leds_st1202 patch to fix NULL pointer access
Manuel Fombuena [Tue, 14 Jan 2025 12:37:20 +0000 (12:37 +0000)]
generic: add leds_st1202 patch to fix NULL pointer access

As per @KanjiMonster comment: st1202_dt_init() calls devm_led_classdev_register_ext() before the internal data structures are properly setup, so the leds become visible to user space while being partially initialized, leading to a window where trying to access them causes a NULL pointer access.

Move devm_led_classdev_register_ext() to the last thing to happen during initialization.

Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/17543
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agomediatek-filogic: fix wax220 wifi leds
Florian Maurer [Thu, 16 Jan 2025 08:29:55 +0000 (09:29 +0100)]
mediatek-filogic: fix wax220 wifi leds

The WAX220 does have a 2.4GHz and 5GHz wifi led, which was set to trigger on netdev before.
This commit changes this to trigger on activity of the respective radio

Signed-off-by: Florian Maurer <f.maurer@outlook.de>
Link: https://github.com/openwrt/openwrt/pull/17627
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 days agomediatek: filogic: Cudy WR3000H: Fix SUPPORTED_DEVICES
Hauke Mehrtens [Fri, 17 Jan 2025 22:23:10 +0000 (23:23 +0100)]
mediatek: filogic: Cudy WR3000H: Fix SUPPORTED_DEVICES

Fix the name used for the transition image from Cudy.
This should make it possible to use the cudy transition image.

Fixes: 9d66b8b312fb ("mediatek: filogic: Add support for cudy wr3000h")
Link: https://github.com/openwrt/openwrt/pull/17652
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 days agoipq4019: patch initialization of Lantiq DSL on FritzBox 7530.
Christian Marangi [Tue, 7 May 2024 18:44:27 +0000 (20:44 +0200)]
ipq4019: patch initialization of Lantiq DSL on FritzBox 7530.

Some VRX518 modems fail to initialize properly with the error message
"dc_ep_clk_on failed". As a result, the DSL data path doesn't work.

This hack, which is based on code from the FRITZ!Box 7530 GPL archive,
fixes the issue. It changes the PCIe vendor/device ID to values matching
a Lantiq SoC. It also appears to emulate a Lantiq CPU ID register for
connected PCIe devices, by remapping the matching address area to a
specially crafted buffer using the address translation unit.

A dedicated compatible is created to activate this in
the device tree, so this shouldn't affect any devices other than
FRITZ!Box 7530/7520.

Original investigation was done in https://github.com/janh/openwrt/commit/59f52125178146a9dc44290c11c63e5e029e8044 which used the "avm,host_magic" property to enabled the patch.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Florian Maurer <f.maurer@outlook.de>
Link: https://github.com/openwrt/openwrt/pull/17622
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agoath79: add extended AR9344 reset sequence
David Bauer [Fri, 3 Jan 2025 20:46:13 +0000 (21:46 +0100)]
ath79: add extended AR9344 reset sequence

According to datasheet, on AR9344 the switch and switch analog need to
be reset first before initiating a full reset.

Resetting these systems fixes spurious reset hangs on Atheros AR9344
SoCs.

Link: https://github.com/freifunk-gluon/gluon/issues/2904
Signed-off-by: David Bauer <mail@david-bauer.net>
11 days agoRevert "ath79: reset ETH switch for AR9344"
David Bauer [Fri, 17 Jan 2025 19:51:38 +0000 (20:51 +0100)]
Revert "ath79: reset ETH switch for AR9344"

This reverts commit 916af73fc388d638b1a717a2411792e0680dd8e6.

It was reported this change did not fix the reboot issues on AR9344.

Signed-off-by: David Bauer <mail@david-bauer.net>
11 days agoqualcommax: dl-wrx36: fix 2.5G port LED-s
Robert Marko [Sat, 18 Jan 2025 11:25:01 +0000 (12:25 +0100)]
qualcommax: dl-wrx36: fix 2.5G port LED-s

Currently, 2.5G port LED-s on Dynalink are incorrectly configured and thus
they will light up all of the time.

So, lets fix this by:
1. Current green LED is actually yellow, change the color
2. Fix its polarity as its actually active-low
3. The yellow LED that was registered as being connected to LED_1 pin on
the PHY is not actually connected at all, so remove it.
4. The actual green LED is connected to LED_2 on the PHY so add it.

Fixes: 75ad5c24142a ("qualcommax: switch to qca8081 upstream PHY driver")
Fixes: #14502
Link: https://github.com/openwrt/openwrt/pull/17656
Signed-off-by: Robert Marko <robimarko@gmail.com>
12 days agorealtek: Switch RTL8231 driver on Zyxel GS1900-48
Sander Vanheule [Sat, 18 Jan 2025 12:39:01 +0000 (13:39 +0100)]
realtek: Switch RTL8231 driver on Zyxel GS1900-48

Switch the Zyxel GS1900-48 over to the new MDIO-based driver for the
RTL8231 GPIO expander.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
12 days agorealtek: rtl839x: Enable RTL8231 MFD driver
Sander Vanheule [Sat, 18 Jan 2025 12:48:17 +0000 (13:48 +0100)]
realtek: rtl839x: Enable RTL8231 MFD driver

Enable the RTL8231 MFD core driver, as well as the pinctrl/gpio driver
to allow RTL839x devices to use it.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
12 days agorealtek: rtl839x: Enable AUX MDIO controller
Sander Vanheule [Sat, 18 Jan 2025 12:45:55 +0000 (13:45 +0100)]
realtek: rtl839x: Enable AUX MDIO controller

Enable the driver for the Realtek Otto auxiliary MDIO driver so RTL839x
devices can use it. The related node is added to the base devicetree for
rtl839x-based devices, so they can enabled and use it when required.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
12 days agorealtek: Update aux-mdio driver
Sander Vanheule [Sat, 18 Jan 2025 12:28:44 +0000 (13:28 +0100)]
realtek: Update aux-mdio driver

For RTL839x, the driver was producing frequent timeouts on bus accesses.
Increasing the timeout to the one from a recent Realtek SDK resolves
these timeouts. To minimize overhead on different SoCs, each controller
can specify their own timeout.

This also add support for the register format as used on RTL93xx.
Support is added for the RTL930x "ext gpio" controller.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
12 days agowifi-scripts: add a few missing auth_type checks in ucode
Felix Fietkau [Sat, 18 Jan 2025 09:06:44 +0000 (10:06 +0100)]
wifi-scripts: add a few missing auth_type checks in ucode

Add some missing documented or commonly used values

Fixes: https://github.com/openwrt/openwrt/issues/17431
Signed-off-by: Felix Fietkau <nbd@nbd.name>
12 days agoairoha: an7581: add pending PCI patch
Christian Marangi [Fri, 17 Jan 2025 21:09:05 +0000 (22:09 +0100)]
airoha: an7581: add pending PCI patch

Add pending PCI patch that should correctly fix mediatek driver with
Airoha SoC.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
12 days agoairoha: an7581: backport ETS patch for Airoha ethernet
Christian Marangi [Fri, 17 Jan 2025 21:04:19 +0000 (22:04 +0100)]
airoha: an7581: backport ETS patch for Airoha ethernet

Backport ETS patch for Airoha ethernet and refresh affected patches.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
13 days agogeneric: backport pending Realtek PHY patches
Álvaro Fernández Rojas [Fri, 17 Jan 2025 12:45:11 +0000 (13:45 +0100)]
generic: backport pending Realtek PHY patches

These patches have been accepted, so we can move them from pending to
backported.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
13 days agogeneric: add pending patches for RealTek Ethernet PHYs
Daniel Golle [Thu, 16 Jan 2025 20:11:43 +0000 (20:11 +0000)]
generic: add pending patches for RealTek Ethernet PHYs

Import patches to fix several issues with status reporting of RealTek
2.5G PHYs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
13 days agogeneric: backport Realtek PHY patches from upstream
Álvaro Fernández Rojas [Fri, 17 Jan 2025 08:56:34 +0000 (09:56 +0100)]
generic: backport Realtek PHY patches from upstream

Adds patches for the temperature sensor on RTL822x.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
13 days agogeneric: r8169: remove reverted temperature sensor patch
Álvaro Fernández Rojas [Fri, 17 Jan 2025 08:38:30 +0000 (09:38 +0100)]
generic: r8169: remove reverted temperature sensor patch

The patch adding temperature sensor support for r8169 has been removed upstream
and the functionality will be added to Realtek PHY instead:
https://github.com/torvalds/linux/commit/1f691a1fc4bef1c5cf5f503e14e1a22fc37c97e3

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
13 days agoucode-mod-pkgen: add ucode module for generating crypto keys/certificates
Felix Fietkau [Fri, 22 Mar 2024 15:21:18 +0000 (16:21 +0100)]
ucode-mod-pkgen: add ucode module for generating crypto keys/certificates

This also includes a script to use the functionality from the
command line

Signed-off-by: Felix Fietkau <nbd@nbd.name>
13 days agouci: update to Git HEAD (2025-01-17)
Felix Fietkau [Fri, 17 Jan 2025 10:26:09 +0000 (11:26 +0100)]
uci: update to Git HEAD (2025-01-17)

fb3c2343b17b add support for an override config directory

Signed-off-by: Felix Fietkau <nbd@nbd.name>
13 days agomediatek: remove obsolete base-files scripts
Felix Fietkau [Thu, 16 Jan 2025 18:32:51 +0000 (19:32 +0100)]
mediatek: remove obsolete base-files scripts

Signed-off-by: Felix Fietkau <nbd@nbd.name>
13 days agonetifd: improve packet steering on ipq40xx (and possibly others)
Felix Fietkau [Thu, 16 Jan 2025 11:35:47 +0000 (12:35 +0100)]
netifd: improve packet steering on ipq40xx (and possibly others)

Some platforms a single ethernet device for all ports with multiple rx rings
and NAPI threading enabled. In this case, the steering script was limiting
performance by keeping all NAPI threads assigned to the same CPU.
Fix this by assigning each rx queue and the corresponding NAPI task separately.
Additionally, if the number of rx queues is at least as big as the number of
CPUs, skip weight based assignment and distribute the load across all CPUs
directly.

Fixes: https://github.com/openwrt/openwrt/issues/17611
Signed-off-by: Felix Fietkau <nbd@nbd.name>