Commit Graph

62593 Commits

Author SHA1 Message Date
Zoltan HERPAI
e934e67f9c kirkwood: dns320l: export mcu_power GPIO
This GPIO is pulled down by the onboard MCU when the power button
is pressed for 5 seconds, indicating a user-initiated shutdown.

Refresh patches at the same time.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-10-28 09:24:32 +01:00
Markus Stockhausen
945a335f66 realtek: ethernet: Improve SMI polling configuration based on DTS
Although Zyxel XGS1210 devices are not yet officially supported there
are several patches floating around to enable them. This is a very imporant
one because it fixes a SMI misconfiguration. In the known DTS the SFP+
port settings are set as follows.

  phy26: ethernet-phy@26 {
    compatible = "ethernet-phy-ieee802.3-c45";
    phy-is-integrated;
    reg = <26>;
    sds = < 8 >;
  };

  phy27: ethernet-phy@27 {
    compatible = "ethernet-phy-ieee802.3-c45";
    phy-is-integrated;
    reg = <27>;
    sds = < 9 >;
  };

So these are PHYs linked to an internal SerDes. During initialization
rtl838x_mdio_init() generates smi_bus=0 & smi_addr=27/28 for these ports.
Although this seems like a valid configuration integrated PHYs attached
to an SerDes do not have an SMI bus. Later on the mdio reset wrongly feeds
the SMI registers and as a result the PHYs on SMI bus 0 do not work.

Without patch (loaded with rtk network on & initramfs):

...
mdio_bus mdio-bus: MDIO device at address 0 is missing.
mdio_bus mdio-bus: MDIO device at address 1 is missing.
mdio_bus mdio-bus: MDIO device at address 2 is missing.
mdio_bus mdio-bus: MDIO device at address 3 is missing.
mdio_bus mdio-bus: MDIO device at address 4 is missing.
mdio_bus mdio-bus: MDIO device at address 5 is missing.
mdio_bus mdio-bus: MDIO device at address 6 is missing.
mdio_bus mdio-bus: MDIO device at address 7 is missing.
...
rtl83xx-switch ... : no phy at 0
rtl83xx-switch ... : failed to connect to PHY: -ENODEV
rtl83xx-switch ... : error -19 setting up PHY for tree 0, switch 0, port 0
rtl83xx-switch ... : no phy at 1
rtl83xx-switch ... : failed to connect to PHY: -ENODEV
rtl83xx-switch ... : error -19 setting up PHY for tree 0, switch 0, port 1
...

With patch (loaded with rtk network on & initramfs):

...
rtl83xx-switch ... : PHY [mdio-bus:00] driver [REALTEK RTL8218D] (irq=POLL)
rtl83xx-switch ... : PHY [mdio-bus:01] driver [REALTEK RTL8218D] (irq=POLL)
...

Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/16457
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-27 22:26:25 +01:00
Markus Stockhausen
74509c0e7d realtek: remove wrong SMI bus from XGS1250
The RTL930x have only 4 SMI busses (0-3) and the XGS1250 SFP port ist
directly managed. Remove the wrong configuration in the dts.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/16457
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-27 22:26:25 +01:00
Markus Stockhausen
8f68e1abe5 realtek: phy: fix RTL8218D detection
Currently RTL8218D detection works for a range of devices. That can lead to
false positives. E.g. RTL8218B or RTL8214FC are covered by the detection mask
as well. That is wrong. Nail detection down to the real RTL8218D phy id.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/16457
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-27 22:26:25 +01:00
Markus Stockhausen
0ed688a4d9 realtek: phy: simplify RTL8214C detection
The detection of the RTL8214C is a little complicated. Make it easier.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/16457
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-27 22:26:25 +01:00
Markus Stockhausen
597f87ebf5 realtek: phy: proper RTL8218B, RTL8214FC, RTL8214FB detection
Three PHYs share the same identifier. Until now we simply assume
the type depending of the bus address it is attached to. Make it
better and check the chip mode register instead.

The kernel will either detect by id/mask or by match_phy_device().
Remove the unneeded settings.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/16457
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-27 22:26:25 +01:00
Markus Stockhausen
d607dc2a06 realtek: phy: adapt raw page for RTL839X
The number of phy pages differ between RTL838X and RTL839X. Make that
clear and adapt the existing defines.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/16457
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-27 22:26:25 +01:00
Markus Stockhausen
8e4597297d realtek: dsa: increase RTL839x max phy page to 8191
According to the specs the RTL839x provides up to 8192 phy pages.
Especially the "raw" page 8191 is used for different initialization
tasks. Increase the limit.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/16457
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-27 22:26:25 +01:00
Markus Stockhausen
a200f0cee7 realtek: dsa: allow USXGMII mode
RTL930x devices need the USXGMII mode. This is a final leftover
from the 6.6 conversion.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/16457
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-27 22:26:25 +01:00
Christian Marangi
07159cc25a
Revert "scripts/download.pl: read file natively"
This reverts commit 65560de58d.

Seems to broke CI and require more testing.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-10-27 15:58:16 +01:00
Daniel Golle
388de64d9f mediatek: mt7988: add DT entries for WED
Add memory regions and devices used for wireless offloading to the
device tree for MT7988.

This allows using WED on devices with MT7988 SoC and MT7995E, MT7996E or
MT7992E wireless controllers.

Devices with 4 GiB of RAM (or more) will still need ajustments to avoid
running out of swiotlb entries.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-27 14:27:20 +00:00
Rosen Penev
0f5e5dee1d ramips: modernize pwm driver
Add more devm usage.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16649
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-27 15:21:03 +01:00
Kevin Zhang
b5c7c67b8f rockchip: Add LED aliases for FriendlyElec NanoPi R3S
This commit adds OpenWRT's LED aliases to the board DTS
for showing system status on the NanoPi R3S.

Signed-off-by: Kevin Zhang <kevin@kevinzhang.me>
Link: https://github.com/openwrt/openwrt/pull/16738
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-27 14:57:51 +01:00
Kevin Zhang
2902b0a6fb rockchip: Add support for RK3566 FriendlyElec NanoPi R3S
This commit adds support for the FriendlyElec NanoPi R3S.

CPU: Rockchip RK3566, Quad-core Cortex-A55
RAM: 2GB LPDDR4X
Ethernet: GMAC RTL8211F GbE, PCIe R8111H GbE
USB3.0 Host: Type-A x1
Storage: MicroSD Slot x 1, and optional on-board 32GB eMMC
Debug Serial Port: 3.3V TTL, 3-pin 2.54mm pitch connector, 1500000 bauds
LED: LED x 3
RTC: One low-power RTC, supports backup battery input

Both GbE controllers are working (WAN eth0, LAN eth1).
Appropriate LAN/WAN interface assignments and MAC address generation.
All three LEDs are working.
USB appears to be working and has been tested with mass storage.

Installation - microSD:

-Uncompress the OpenWRT sysupgrade.img.gz
-Write image to microSD card using dd or similar tool

Installation - eMMC:

-Boot from microSD
-Uncompress the OpenWRT sysupgrade.img.gz
-Flash to eMMC : dd if=x.img of=/dev/mmcblk0
-sync
-Remove microSD card
-Reboot

Signed-off-by: Kevin Zhang <kevin@kevinzhang.me>
Link: https://github.com/openwrt/openwrt/pull/16738
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-27 14:57:51 +01:00
Kevin Zhang
e35f0493b1 uboot-rockchip: add support for NanoPi R3S
This commit adds u-boot support for the NanoPi R3S.

Signed-off-by: Kevin Zhang <kevin@kevinzhang.me>
Link: https://github.com/openwrt/openwrt/pull/16738
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-27 14:57:51 +01:00
Rosen Penev
3cdab2ad44
ramips: use platform_get_irq
No need for irq_of_parse_and_map since this is in _probe.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16771
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-10-27 14:25:24 +01:00
Matteo Croce
65560de58d
scripts/download.pl: read file natively
Read files natively instead of execing /bin/cat.

Signed-off-by: Matteo Croce <teknoraver@meta.com>
Link: https://github.com/openwrt/openwrt/pull/16784
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-10-27 14:24:32 +01:00
Til Kaiser
5fdd18243e
xdp-tools: re-add vlan_hdr struct
Drop the patch to re-add the vlan_hdr struct
because it is required now to build xdp-filter.

Signed-off-by: Til Kaiser <mail@tk154.de>
Link: https://github.com/openwrt/openwrt/pull/16798
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-10-27 14:23:22 +01:00
Marius Dinu
63ea5710d9 kernel: add missing CONFIG_DM_AUDIT
The option shows up when kmod-dm and CONFIG_KERNEL_AUDIT are selected.

Signed-off-by: Marius Dinu <m95d+git@psihoexpert.ro>
Link: https://github.com/openwrt/openwrt/pull/16793
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-27 12:45:16 +01:00
Daniel Golle
a2aabc9a7a kernel: add MultiPath TCP diag kernel module
Add INET diag socket monitoring interface module for MultiPath TCP.
It allows using native Linux socket diagnostic tools such as 'ss' for
Multipath TCP connections.

Co-authored-by: Rodrigo B. de Sousa Martins <rodrigo.sousa.577@gmail.com>
Signed-off-by: sKy King <29267720+sKyissKy@users.noreply.github.com>
Link: https://github.com/openwrt/openwrt/pull/12884
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-26 15:21:03 +01:00
Daniel Golle
c8d5abd62b kernel: enable Multi-Path TCP for !SMALL_FLASH targets
Expose Kernel's CONFIG_MPTCP option and enable it by default for
!SMALL_FLASH targets.

The idea behind enabling it by default is to allow users of the binary
distribution to make use of MPTCP tunneling for link aggregation.

Using MPTCP for link aggregation is an often discussed topic in the
forum and there is even a whole OpenWrt fork (MPTCPRouter) just for that.

Enabling the kernel-side of the story by default will allow using MPTCP
on vanilla OpenWrt without having to build anything from source.

See also https://openwrt.org/docs/guide-user/network/mptcp

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-26 15:21:03 +01:00
Daniel Golle
b6c2422448 generic: mtk_wed: fix path of MT7988 WO firmware
commit eee3c695f3 ("linux-firmware: add offloading firmware for MT7988")
added mt7988_wo_{0,1}.bin in the 'mediatek/mt7988' directory while driver
currently expects the files in the 'mediatek' directory.

Import pending patch which changes the path in the driver header now
that the firmware has been added.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-26 15:21:03 +01:00
Andreas Gnau
1dc86af356
airoha: Clarify subtarget compatibility
Clarify compatibility of the two subtargets with different SoCs to
reduce confusion. The added SoC names only differ in small details such
as features enabled (PoN vs DSL for example).

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/16785
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-10-25 19:47:07 +02:00
Shiji Yang
d7ed4c77b5 ramips: rt3883: convert devices to interrupt-driven gpio-keys
This converts all RT3662 and RT3883 devices to use interrupt based
gpio-keys instead of gpio-keys-polled. The poll-interval will be
removed.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16764
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-25 13:56:14 +02:00
Shiji Yang
0bcb64041a ramips: rt305x: convert devices to interrupt-driven gpio-keys
This converts all RT305x and RT5350 devices to use interrupt based
gpio-keys instead of gpio-keys-polled. The poll-interval will be
removed.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16764
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-25 13:56:14 +02:00
Shiji Yang
a3819e23be ramips: rt2880: convert devices to interrupt-driven gpio-keys
This converts all RT2880 devices to use interrupt based gpio-keys
instead of gpio-keys-polled. The poll-interval will be removed.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16764
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-25 13:56:14 +02:00
Shiji Yang
7cc53ef09b ramips: mt76x8: convert Minew G1-C to interrupt-driven gpio-keys
All other MT76x8 devices have already been migrated to gpio-keys.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16764
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-25 13:56:14 +02:00
Shiji Yang
0d4616b838 ramips: dts: add the missing interrupt properties for GPIO nodes
The Ralink GPIO driver supports irqchip function. Hence we need to
add "interrupt-parent" and "interrupt-controller" properties to make
sure it works properly. It is worth noting that all GPIO devices
share the same interrupt line.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16764
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-25 13:56:14 +02:00
Shiji Yang
2b2abdbb75 ramips: ralink-gpio: use irqchip helpers to register driver
The gpiolib has already introduced a general GPIO irqchip framework
to initialize the GPIO irqchip[1]. This patch will make use of it
to simplify the legacy Ralink GPIO driver codes. This patch also
includes some code readability improvements.

[1] 1425052097b5 ("gpio: add IRQ chip helpers in gpiolib")
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16764
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-25 13:56:14 +02:00
Hauke Mehrtens
27657050d0 mbedtls: update to 3.6.2
Fixes the following security problem:
* CVE-2024-49195: Fix a buffer underrun in mbedtls_pk_write_key_der()
  when called on an opaque key, MBEDTLS_USE_PSA_CRYPTO is enabled, and
  the output buffer is smaller than the actual output. Fix a related
  buffer underrun in mbedtls_pk_write_key_pem() when called on an opaque
  RSA key, MBEDTLS_USE_PSA_CRYPTO is enabled and MBEDTLS_MPI_MAX_SIZE is
  smaller than needed for a 4096-bit RSA key.

Link: https://github.com/openwrt/openwrt/pull/16768
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-24 20:17:27 +02:00
Christian Marangi
6835ff8cbc
include/package-pack: Set missing Maintainer and URL for APK
Set missing Maintainer and URL info for .apk creation.

Fixes: d788ab376f ("build: add APK package build capabilities")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-10-24 12:46:47 +02:00
Christian Marangi
abeaf8df5c
include/package-pack: remove whitespace for Description info for APK
Remove whitespace for Description info for .apk creation

Fixes: b6bbc76c0b ("include/package-pack: set missing Description on .apk creation")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-10-24 12:46:26 +02:00
Rosen Penev
4175828482 mpc85xx: move CONFIG_MTD_SPLIT_FIRMWARE up
It's shared by all targets. Unlike the other shared symbols, it's not
removed by kernel_oldconfig.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16756
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-24 00:30:11 +02:00
Rosen Penev
dfc8e8d09a apm821xx: move CONFIG_GENERIC_PHY up
It's shared by both subtargets.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16754
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-24 00:25:28 +02:00
John Audia
8e294af41b kernel: bump 6.6 to 6.6.58
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.58

All patches automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/glinet_gl-mt6000, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: x86/64/AMD Cezanne, flogic/glinet_gl-mt6000, 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/16758
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-24 00:23:24 +02:00
Daniel Golle
b27075e12b mediatek: add wireless offloading firmware to MT7988 boards
Install mt7988-wo-firmware by default on boards based on MT7988.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-23 13:40:09 +01:00
Daniel Golle
eee3c695f3 linux-firmware: add offloading firmware for MT7988
Package wireless offloading firmware for MediaTek MT7988.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-23 13:40:09 +01:00
Christian Marangi
d7dc5b1b4d
airoha: rename subtarget from en7581 to an7581
The Airoha EN7581 got renamed to AN7581 due to move from Econet to
Airoha.

To save on compatibility, use both compatible for the device.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-10-23 12:32:03 +02:00
Christian Marangi
43d07feb91
airoha: en7581: refresh and fix PWM patch
Refresh and fix PWM patch with new revision proposed upstream.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-10-23 12:32:03 +02:00
Christian Marangi
b6bbc76c0b
include/package-pack: set missing Description on .apk creation
Set missing description info on .apk creation. This was probably a TODO
that wasn't notice when the final implementation was pushed.

Fixes: d788ab376f ("build: add APK package build capabilities")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-10-23 00:11:55 +02:00
Hauke Mehrtens
1306885968 kernel: Reorder config files
Reorder the kernel configuration files.

This was done uisng:
./scripts/kconfig-reorder.sh

Link: https://github.com/openwrt/openwrt/pull/16743
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-22 21:13:26 +02:00
Hauke Mehrtens
d0abb26f40 mediatek: Remove double CONFIG_HARDEN_BRANCH_PREDICTOR
CONFIG_HARDEN_BRANCH_PREDICTOR option is included two times in this
configuration file. Remove one definition. On arm32 SoC it should not be
needed.

Fixes: 54f9744c82 ("treewide: disable spectre mitigation on unaffected Arm32 targets")
Link: https://github.com/openwrt/openwrt/pull/16743
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-22 21:13:26 +02:00
Hauke Mehrtens
b8816343fb scripts: Add script to reorder kernel config-* files
This script will reorder the content of all config-* files in the target
folder. It will also remove duplicates. It will not remove options
already defined in the generic configuration.

Link: https://github.com/openwrt/openwrt/pull/16743
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-22 21:13:26 +02:00
Felix Fietkau
7e542f6a77 hostapd: fix build error with SAE disabled
Fixes: b2a2c28617 ("hostapd: add support for authenticating with multiple PSKs via ubus helper")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-10-22 16:57:43 +02:00
Christian Marangi
eeb59f87a1
ppp: install pkg-config file on InstallDev
It seems some package (sstp-client) makes use of pppd.pc file to detect
the ppp version as 2.5.0 changed some API.

Also install the .pc file to permit the version detection of pppd.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-10-22 16:10:05 +02:00
Felix Fietkau
04fb05914e wifi-scripts: add multi-radio config support
Emit one wifi-device section per wiphy radio

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-10-22 14:40:43 +02:00
Felix Fietkau
cb60bee04d iwinfo: add multi-radio support
Fix the path to the hostapd config file for queries

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-10-22 14:40:43 +02:00
Felix Fietkau
5c1ee08e2d iw: add multi-radio support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-10-22 14:40:43 +02:00
Felix Fietkau
5db27664bc ucode: add support for nl80211 vif radio mask
Used for multi-radio support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-10-22 14:40:43 +02:00
Felix Fietkau
87033c3a0b mac80211: improve single-wiphy multi-radio support
- add support for configuring allowed radios for a vif
- add support for monitor mode on multiple channels

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-10-22 14:40:42 +02:00