This reverts commit 7390e63374a9e0bd62c2448f362479de269b841a.
This broke SFP handling on some Mediatek SoCs.
Some SFPs are configured for inband/2500base-x link mode and were
rejected with this change.
Fixes: https://github.com/openwrt/openwrt/issues/21436
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Backport a bunch of upstream commits simplifying the RealTek PHY driver
and re-unifying the C22 and C45 driver instances.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Currently, the LED names generated by the r8169 driver are the
network port names renamed by udev, such as enp1s0. Add a hack
patch to restore the interface name to match OpenWrt.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
More rust symbols that are detected using scripts or based on the rust
version have been added. Filter them out.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Link: https://github.com/openwrt/openwrt/pull/21554
Signed-off-by: Robert Marko <robimarko@gmail.com>
Replace downstream hack disabling SGMII in-band AN on the MediaTek platform
with pending upstream patch announcing in-band AN capabilities and implementing
configuring in-band AN in the PHY driver.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Only use link-partner advertisement bits for 10GbE modes if they are
actually valid. Check LOCALOK and REMOTEOK bits and clear 10GbE modes
unless both of them are set.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Replace downstream hack for RealTek PHYs with a more clean solution
which could make it upstream.
As SGMII in-band AN is broken on some platforms, or simply expected to
be disabled by default in phy/sgmii mode (ie. on-board PHYs with MDIO
for out-of-band configuration and status), a hack for the RealTek PHY
driver was introduced to unconditionally disable SGMII in-band
autonegotiation.
Meanwhile the kernel has gained a proper interface for PHY and PCS to
report in-band AN capabilities and enable/disable in-band, matching
PHY and PCS capabilities.
Thanks to Bevan Weiss' knowledge about how RealTek PHY SerDes registers
are being handled in RealTek's SDK this can now be greatly improved:
- report in-band capabilties
- let phylink set in-band matching PCS and PHY capabilities
- properly abstracted indirect access of SerDes registers
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
RealTek's 2.5G PHYs suffer from an up to now inexplicable problem which
results in the SerDes mode not being properly setup and disabling
in-band AN leading to a timeout waiting for a busy-bit to clear. Up to
now there has been a crude work-around: resetting the PHY and trying
another time.
The cause has now been found as a wrong access to register PHYCR1 on
MDIO_MMD_VEND1 instead of MDIO_MMD_VEND2 when setting up ALDPS as well
as disabling the MDIO broadcast address 0.
In order to access MDIO_MMD_VEND2 on Clause-22-only busses a custom
.read_mmd and .write_mmd ops are implemented, mapping MDIO_MMD_VEND2 to
paged access as this is required.
Also, as ALDPS by design disables the SerDes PCS of the PHY in case the
link has been down for a while, move enabling ALDPS to the end of the
config_init function to not face problems when configuring the interface
mode and in-band AN.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
These patches fix bugs in a patch we backported.
These patch were cherry picked from upstream Linux because it references
a patch we backported in the fixes tag.
The patches were reordered to match the ordering in the upstream Linux kernel.
Fixes: 93173aee96e7 ("qualcommbe: ipq95xx: Add initial support for new target")
Link: https://github.com/openwrt/openwrt/pull/21366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This patch fixes a bug in a patch we backported.
This patch was cherry picked from upstream Linux because it references a
patch we backported in the fixes tag.
The first two patches are providing function needed by the last patch.
Fixes: 813ecda1f387 ("generic: backport phylink patches for PCS/PHY caps OPs")
Link: https://github.com/openwrt/openwrt/pull/21366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This patch fixes a bug in a patch we backported.
This patch was cherry picked from upstream Linux because it references a
patch we backported in the fixes tag.
Fixes: 48c9e5509407 ("kernel: backport upstream Realtek PHY patches")
Link: https://github.com/openwrt/openwrt/pull/21366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
These patches fix bugs in a patch we backported.
These patch were cherry picked from upstream Linux because it references
a patch we backported in the fixes tag.
Fixes: c990f6e15669 ("linux: generic: net: dsa: mv88e6xxx LED support")
Link: https://github.com/openwrt/openwrt/pull/21366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This patch fixes a bug in a patch we backported.
This patch was cherry picked from upstream Linux because it references a
patch we backported in the fixes tag.
Fixes: 9d3009f426d5 ("airoha: major backport of Airoha Ethernet driver feature support")
Link: https://github.com/openwrt/openwrt/pull/21366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This patch fixes a bug in a patch we backported.
This patch was cherry picked from upstream Linux because it references a
patch we backported in the fixes tag.
The function phy_id_compare_vendor() is needed by the fix.
Refresh 782-05-v6.16-net-phy-Add-support-for-Aeonsemi-AS21xxx-PHYs.patch with the upstream code.
Fixes: 08a616b2163e ("generic: backport support for Aeonsemi AS21xxx PHY")
Link: https://github.com/openwrt/openwrt/pull/21366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This patch fixes a bug in a patch we backported.
This patch was cherry picked from upstream Linux because it references a
patch we backported in the fixes tag.
Fixes: 813ecda1f387 ("generic: backport phylink patches for PCS/PHY caps OPs")
Link: https://github.com/openwrt/openwrt/pull/21366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This patch fixes a bug in some patches we backported.
This patch was cherry picked from upstream Linux because it references a
patch we backported in the fixes tag.
Link: https://github.com/openwrt/openwrt/pull/21366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This fixes a bug introduced in a patch we backported.
This patch was cherry picked from upstream Linux because it references a
patch we backported in the fixes tag.
Fixes: 91ce7f606a62 ("generic: backport upstream v6.16 r8169 patches")
Link: https://github.com/openwrt/openwrt/pull/21366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
These formally pending patches were merged into upstream Linux some time
ago. Move them to the backports folder and add the kernel version they
were added to the file name.
Link: https://github.com/openwrt/openwrt/pull/21366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Replace pending patches which are already integrated in upstream Linux
with their upstream versions.
These patches were exported with:
git format-patch -1 -k
Link: https://github.com/openwrt/openwrt/pull/21366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This is adding SUN6I-CSI and OV5640 driver for AllWinner platform for NanoPi
Signed-off-by: Michel Promonet <michel.promonet@free.fr>
Link: https://github.com/openwrt/openwrt/pull/20085
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Set SND_SOC_NAU8325 to no
Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21329
Signed-off-by: Robert Marko <robimarko@gmail.com>
This is the recommended way for the OF based platform.
Tested-on TP-Link TL-WR2543N with RTL8367 switch:
```
root@OpenWrt:~# dmesg |grep -i rtl
[ 7.941126] rtl8367 rtl8367: cannot find mdio node phandle
[ 7.947562] rtl8367 rtl8367: RTL8367R ver. 0 chip found
[ 9.056830] rtl8367 rtl8367: cpu_port:9, assigned to extif0
root@OpenWrt:~# cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 512-529, parent: platform/18040000.gpio, 18040000.gpio:
gpio-512 ( |lime:status ) out lo ACTIVE LOW
gpio-513 ( |rtl836x-sda ) in hi
gpio-518 ( |rtl836x-sck ) in lo
gpio-520 ( |lime:usb ) out hi ACTIVE LOW
gpio-523 ( |reset ) in hi IRQ ACTIVE LOW
gpio-524 ( |wps ) in hi IRQ ACTIVE LOW
```
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21143
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
mdio node is optional for the rtl836x switch. Some devices use GPIO to
control the switch chip. Missing mdio is a normal behavior.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21143
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
If the switch is directly controlled by the mdio bus, we must ensure
that the mdio bus is ready instead of trying GPIO simulated bus.
Fixes: d4ac26ec4920 ("kernel: rtl8366-smi: add Realtek switch management via mii-bus")
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21143
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
There are no platform_data based devices using it anymore. Also move
header files to the driver folder.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21138
Signed-off-by: Robert Marko <robimarko@gmail.com>
Teaming is a link aggregation implementation similar to bonding, but
it's configured by a userspace program.
Signed-off-by: Qingfang Deng <dqfext@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21120
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Add opending patch fixing resource_size(9 if resource start and end is
set to zero.
This is to indirectly fix a helper rework in ath11k qmi code that cause
firmware load panic.
Link: https://github.com/openwrt/openwrt/pull/20964
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Move reserved_mem backports patch from airoha to generic dir as it will
be also used by backports package based on 6.18.
Link: https://github.com/openwrt/openwrt/pull/20964
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Backport support for faux base driver needed for backports package to
compile with kernel 6.18.
Link: https://github.com/openwrt/openwrt/pull/20964
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Unneeded semicolon
WARNING comparing pointer to 0
WARNING: NULL check before some freeing functions is not needed.
WARNING: casting value returned by memory allocation function to (u32 *)
ERROR: allocation function on line 378 returns NULL not ERR_PTR on failure
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19932
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Backport fix for premature SPI CS deassertion on RX-only transactions from
linux v6.18, which is needed for bmips (bcm63xx).
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Backport support for the Quectel RG255C USB modem.
This modem is used, among others, on the Teltonika RUT976.
Signed-off-by: Til Kaiser <mail@tk154.de>
Link: https://github.com/openwrt/openwrt/pull/20933
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Since everything got migrated to the layouts driver, this is no longer
needed.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20948
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Backport of the latest upstream Realtek PHY patches. WoL uses
devm_pm_set_wake_irq(), so the patch that adds this function
has also been backported.
Changelog:
4465ae435ddc net: phy: realtek: create rtl8211f_config_phy_eee() helper
bb78b71faf60 net: phy: realtek: eliminate priv->phycr1 variable
e1a31c41bef6 net: phy: realtek: allow CLKOUT to be disabled on RTL8211F(D)(I)-VD-CG
910ac7bfb1af net: phy: realtek: eliminate has_phycr2 variable
27033d069177 net: phy: realtek: eliminate priv->phycr2 variable
8e982441ba60 net: phy: realtek: create rtl8211f_config_rgmii_delay()
b826bf795564 net: phy: realtek: fix RTL8211F wake-on-lan support
Tested on Netgear WAX206 with RTL8221B-VB-CG.
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/20987
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Backport upstream patch to add support for the ESMT F50L1G41LC flash
chip. It is used in multiple Cudy products manufactured starting
November 2025.
Link: https://github.com/openwrt/openwrt/pull/20962
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>