Commit Graph

28208 Commits

Author SHA1 Message Date
Álvaro Fernández Rojas e656bcbab0 kernel: add bcma/ssb fallback SPROM support
This adds generic kernel support for Broadcom Fallback SPROMs so that it can be
used in any target, even non Broadcom ones.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-04-23 12:18:35 +02:00
Daniel Kestrel e1242fc339
generic: 5.15: replace ramips AR8033 fiber patch with 5.18 patches
A patch was added in kernel 5.4 to support the fiber operation of
AR8033 with ramips devices. In kernel 5.18 similar enhancements
were added to the kernel. Those patches are required for other
fiber based devices but when added, build fails for ramips targets.
This commit removes the ramips patch and adds the kernel 5.18 ones.

Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
[ split commit,refresh patch and improve commit message ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-04-22 17:21:29 +02:00
Daniel Kestrel 85b2f213c5
generic: 5.10: replace ramips AR8033 fiber patch with 5.18 patches
A patch was added in kernel 5.4 to support the fiber operation of
AR8033 with ramips devices. In kernel 5.18 similar enhancements
were added to the kernel. Those patches are required for other
fiber based devices but when added, build fails for ramips targets.
This commit removes the ramips patch and adds the kernel 5.18 ones.

Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
[ split commit, refresh patch and improve commit title ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-04-22 17:21:29 +02:00
Christian Marangi aa8ba5166e
generic: 5.10: replace pending 730-net-phy-at803x-fix... with upstream
Replace pending 730-net-phy-at803x-fix-feature-detection.patch with
upstream version and move it to backport.

Refresh other related patch while moving it.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-04-22 17:21:28 +02:00
Daniel Golle bf3b876a63 kernel: refresh 729-net-phy-realtek-introduce-rtl822x_probe.patch
The patch needs to be refreshed to apply cleanly.

Fixes: 998b973157 ("kernel: net: phy: realtek: improve RealTek 2.5G PHY driver")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-04-22 12:25:14 +01:00
Chukun Pan 21be2c26d5 mediatek: add support for TP-Link TL-XDR4288/608x
Hardware specification:
  SoC: MediaTek MT7986A 4x A53
  Flash: ESMT F50L1G41LB 128MB
  RAM: ESMT M15T4G16256A 512MB
  Ethernet (Max Speed):
    XDR4288: 1x 2.5G Wan, 1x 2.5G Lan, 4x 1G Lan
    XDR6086: 1x 2.5G Wan, 1x 2.5G Lan, 1x 1G Lan
    XDR6088: 1x 2.5G Wan, 1x 2.5G Lan, 4x 1G Lan
  WiFi:
    XDR4288: MT7976DAN (2.4G 2T2R, 5G 3T3R)
    XDR6086/XDR6088:
      WiFi1: MT7976GN 2.4GHz 4T4R
      WiFi2: MT7976AN 5GHz 4T4R
  Button: Reset, WPS, Turbo
  USB: 1 x USB 3.0
  Power: DC 12V 4A

Flash instructions:
  1. Execute the following operation to open nc shell:
     https://openwrt.org/inbox/toh/tp-link/xdr-6086#rooting
  2. Replace the stock bootloader to OpenWrt's:
     dd bs=131072 conv=sync of=/dev/mtdblock9 if=/tmp/xxx-preloader.bin
     dd bs=131072 conv=sync of=/dev/mtdblock9 seek=28 if=/tmp/xxx-bl31-uboot.fip
  3. Connect to your PC via the Gigabit port of the router,
     set a static ip on the ethernet interface of your PC.
     (ip 192.168.1.254, gateway 192.168.1.1)
  4. Download the initramfs image, and restart the router,
     waiting for tftp recovery to complete.
  5. After openwrt boots up, perform sysupgrade.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
[Add uboot build, fit and sysupgrade support, fix RealTek PHYs]
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-04-22 04:10:19 +01:00
Daniel Golle 998b973157 kernel: net: phy: realtek: improve RealTek 2.5G PHY driver
* use interface mode switching only when operating in C45 mode
   Linux prevents switching the interface mode when using C22 MDIO,
   hence use rate-adapter mode in case the PHY controlled via C22.

 * use phy_read_paged where appropriate

 * use existing generic inline functions to handle 10GbE advertisements
   instead of redundantly defining register macros in realtek.c which
   are not actually vendor-specific.

 * make sure 10GbE advertisement is valid, preventing false-positive
   warning "Downshift occurred from negotiated speed 2.5Gbps to actual
   speed 1Gbps, check cabling!" with some link-partners using 1G mode.

 * Support Link Down Power Saving Mode (ALDPS)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-04-22 04:08:41 +01:00
John Audia 126c64df2b kernel: bump 5.10 to 5.10.178
Removed upstreamed:
	backport-5.10/430-v6.3-ubi-Fix-failure-attaching-when-vid_hdr-offset-equals.patch[1]

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.178&id=0279e82e148407feec88466990de14bcba9e12c0

All other patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-04-22 01:15:03 +02:00
John Audia 3887a55909 kernel: bump 5.15 to 5.15.108
Removed upstreamed:
	backport-5.15/430-v6.3-ubi-Fix-failure-attaching-when-vid_hdr-offset-equals.patch[1]
	backport-5.15/612-v6.3-skbuff-Fix-a-race-between-coalescing-and-releasing-S.patch[2]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.108&id=85d7a7044b759d865d10395a357632af00de5867
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.108&id=906a6689bb0191ad2a44131a3377006aa098af59

Build system: x86_64
Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-04-22 01:10:24 +02:00
Chukun Pan 28ce677fa7
generic: update nvmem cell mac-address-ascii support
Instead of use mac-address-ascii in nvmem_get_mac_address
function, move it into of_get_mac_addr_nvmem function to
support more devices.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2023-04-21 21:35:45 +02:00
Chukun Pan 31c15813f9
ramips: MSG1500 X.00: switch to mac-address-ascii dts
The Config partition of some machines is special, and the openwrt script
cannot read the protest_lan_mac correctly. This problem can be solved by
reading the mac address (ascii) in dts.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2023-04-21 21:35:41 +02:00
Chukun Pan 1f68baf5f0
mediatek: filogic: remove redundant code for tuf-ax4200
Remove redundant code in 02_network.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2023-04-21 18:44:40 +02:00
Chukun Pan 30d84684cf
mediatek: filogic: move mac address setting together
Simultaneously sort in the order of letters.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2023-04-21 18:44:40 +02:00
Chukun Pan 800ce7f7b4
mediatek: filogic: fix network config for mt7986a-rfb
Fix the network configuration according to the device tree.

Fixes: 5faff99 ("mediatek: filogic: fix mt7986a ethernet devicetree entries")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2023-04-21 18:44:36 +02:00
Daniel Golle 9f2ede5551 mediatek: filogic: update kernel config-5.15
Expose thermal-zone as hwmon sensor, remove thermal emulation driver
and add some missing symbols.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-04-20 01:05:30 +01:00
Daniel Golle 929634c4de mediatek: bpi-r3: allow up to 3W per SFP module
According to SinoVoip up to 3A @ 3.3V are available for both
SFP modules together. Raise energy limit from 1W (default) to 3W,
however, be aware that using modules consuming more than 1W will
require active cooling!

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-04-20 01:03:56 +01:00
John Audia f4989239cc kernel: bump 5.15 to 5.15.107
All  patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-04-19 00:55:58 +02:00
Álvaro Fernández Rojas 5ec781c444 bmips: pci-bcm6348: load IO resource from DT ranges
Correctly load IO resource from DT ranges and remove the specific IO resource.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-04-18 20:11:28 +02:00
Álvaro Fernández Rojas 16b0cbbde0 bmips: drop unneeded ath9k fixup
We no longer need the custom ath9k fixup now that we're using the standard
kmod-owl-loader.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-04-18 19:45:04 +02:00
Álvaro Fernández Rojas db4f158c03 bmips: hg556a: switch to kmod-owl-loader
Stop using custom ath9k fixup and switch to standard kmod-owl-loader

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-04-18 19:45:04 +02:00
Michał Kępień 5264296ce4
ath79: mikrotik: update kernel on NAND using Yafut
Instead of erasing the entire NAND partition holding the kernel during
every system upgrade and then flashing a Yaffs file system image
prepared using kernel2minor (not accounting for bad blocks in the
process), use the Yafut utility to replace the kernel executable on
MikroTik NAND devices, preserving the existing Yaffs file system
(including bad block information) on the partition holding the kernel.

Add Yafut to DEFAULT_PACKAGES for the ath79/mikrotik target, so that the
tool is included in the initramfs images created when building for
multiple profiles.  However, exclude Yafut from the images built for
MikroTik devices with NOR flash as the tool is currently only meant to
be used on devices with NAND flash.

As this addresses the concerns for MikroTik NAND devices discussed in
commit 9d96b6fb72 ("ath79/mikrotik: disable building NAND images"),
re-enable building images for these devices.

Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
2023-04-18 13:53:04 +02:00
Michał Kępień fa4dc86e98
kernel: backport MEMREAD ioctl
MEMREAD is a new ioctl for MTD character devices that was first included
in Linux 6.1.  It allows userspace applications to use the Linux
kernel's OOB autoplacement mechanism while reading data from NAND
devices.  The Yafut tool needs this ioctl to do its job.

Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
2023-04-18 13:53:03 +02:00
Michał Kępień 3d110053f8
ath79: mikrotik: drop unused files from ramdisk
The ramdisk used by sysupgrade on MikroTik devices currently includes
U-Boot fw_* files that are not necessary for performing a system upgrade
on that platform.  The relevant lines were added to
target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh by commit
a66eee6336 ("ath79: add mikrotik subtarget"), likely because they also
existed in target/linux/ath79/nand/base-files/lib/upgrade/platform.sh,
where the platform_do_upgrade_mikrotik_nand() function moved by commit
a66eee6336 originally lived.  However, these lines were added to
target/linux/ath79/nand/base-files/lib/upgrade/platform.sh by commit
55e6c903ae ("ath79: GL-AR300M: provide NAND support; increase to 4 MB
kernel"), which is not related to MikroTik devices in any way.

Remove the code adding unused U-Boot fw_* files to the ramdisk used by
sysupgrade on MikroTik devices.

Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
2023-04-18 13:53:00 +02:00
David Bauer e11d00d44c ath79: create Aruba AP-105 APBoot compatible image
Alter the Aruba AP-105 image generation process so OpenWrt can be loaded
with the vendor Aruba APBoot.

This works by prepending the OpenWrt LZMA loader to the uImage and
jumping directly to the loader. Aruba does not offer bootm on these
boards.

This approach keeps compatibility to devices which had their U-Boot
replaced. Both bootloaders can boot the same image.

The same modification is most likely also possible for the Aruba AP-175.

With this patch, new installations do not require replacing the
bootloader and can be performed from the serial console without opening
the case.

Installation
------------

1. Attach to the serial console of the AP-105.
   Interrupt autoboot and change the U-Boot env.

   $ setenv apb_rb_openwrt "setenv ipaddr 192.168.1.1;
     setenv serverip 192.168.1.66;
     netget 0x84000000 ap105.bin; go 0x84000040"
   $ setenv apb_fb_openwrt "cp.b 0xbf040000 0x84000000 0x10000;
     go 0x84000040"
   $ setenv bootcmd "run apb_fb_openwrt"
   $ saveenv

2. Load the OpenWrt initramfs image on the device using TFTP.
   Place the initramfs image as "ap105.bin" in the TFTP server
   root directory, connect it to the AP and make the server reachable
   at 192.168.1.66/24.

   $ run apb_rb_openwrt

3. Once OpenWrt booted, transfer the sysupgrade image to the device
   using scp and use sysupgrade to install the firmware.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-04-18 00:11:22 +02:00
Mark Onstid 5811db1d0b
ath79: fix LED pinout for Comfast CF-E314N v2
In addition to standardizing LED names to match the rest of the systems, this
commit fixes a possibly erroneous pinout for LEDs in Comfast CF-E314N v2.

In particular, rssimediumhigh and rssihigh are moved from pins 13 and 14 to
14 and 16 respectively. In addition to working on a test device, this pinout
better matches the one set out in the prototype support patch for the device
in Github PR #1873.

Signed-off-by: Mark Onstid <turretkeeper@mail.com>
2023-04-17 19:02:25 +02:00
Oleksandr Zharov 998c34d3fe
ramips: add Xiaomi RA75 red signal led
RA75 has 5 physical LEDs under 2 indicators, mixed with light pipes:
Indicator "System":
  GPIO0: blue
  GPIO2: amber
Indicator "Signal":
  GPIO44: blue
  GPIO37: amber
  GPIO46: red

All except GPIO46 were already added by Jo Deisenhofer. GPIO46 is used for UART1 by
default, so it needs additional pin control change in devicetree to be operational.
Verified on my RA75.

Signed-off-by: Oleksandr Zharov <alex.zeed@gmail.com>
2023-04-17 18:59:28 +02:00
David Bauer 72780e3eac ipq40xx: convert AP-365 to DSA
Re-enable the Aruba AP-365 with DSA support. Changes are trvivial, as
the board design is pretty much the already updated AP-303.

Run-tested on the device.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-04-15 14:15:42 +02:00
Daniel Golle aad34818b5 kernel: backport fix for recently introduced UBI bug
Import commit "ubi: Fix failure attaching when vid_hdr offset equals to
(sub)page size" which did not yet make it to stable upstream Linux trees.

Fixes: #12232
Fixes: #12339
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-04-15 03:23:42 +01:00
Felix Fietkau 8ecf160c47 kernel: backport fix for a page pool related race condition
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-14 10:27:09 +02:00
Daniel Golle b8e1fcad38 generic: move accepted patch to backport-5.15
The patch adding SFP quirk for MXPD 483II was accepted upstream and
will be part of Linux v6.3:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=ad651d68cee75e9ac20002254c4e5d09ee67a84b

Move the patch from pending-5.15 to backport-5.15.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-04-13 20:16:05 +01:00
Daniel Golle f4f8c0e8de mediatek: sync pinctrl-mt7981 and pinctrl-mt7986 drivers
Now that new pinconf features have been backported sync pinctrl-mt7981
and pinctrl-m7986 with bleeding-edge upstream versions.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-04-13 20:01:33 +01:00
Daniel Golle 3cb2fddd30 mediatek: backport new pinctrl features
Backport new features for MediaTek pinctrl/pinconf drivers from upstream.
This will serve as the base to improve pinconf bias/pull-up/pull-down on
MT7981 and MT7986, and also prepare for upcoming support for MT7988.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-04-13 20:01:33 +01:00
Ian Chang 877ec78e23 mvebu: puzzle-mcu: add mcu write retry function
Avoid MCU getting "command reply receive timed out" message when LED
configuration setting trigger function is enabled in heartbeat mode.

Signed-off-by: Ian Chang <ianchang@ieiworld.com>
2023-04-13 01:07:54 +01:00
Michael Trinidad ff91a12c8d base-files: fix Linksys upgrade, restore config step
It appears that the refactor of the upgrade process for NAND devices                                                                                                                            resulted in the nand_do_upgrade_success step not being called for
devices using the linksys.sh script. As a result, configuration was
not preserved over sysupgrade steps.

This corrects a typo in the call of nand_do_upgrade_failed for ipq40xx
and ipq806x devices using the linksys.sh script.

Fixes: 8634c1080d ("ipq40xx: Fix Linksys upgrade, restore config step")
Fixes: 2715aff5df ("ipq806x: Fix Linksys upgrade, restore config step")
Signed-off-by: Michael Trinidad <trinidude4@hotmail.com>
2023-04-11 12:22:35 +02:00
Michael Trinidad d1c1e10e89 mvebu: cortexa9: fix Linksys upgrade, restore config step
It appears that the refactor of the upgrade process for NAND devices                                                                                                                            resulted in the nand_do_upgrade_success step not being called for
devices using the linksys.sh script. As a result, configuration was
not preserved over sysupgrade steps.

This restores the preservation of configs for mvebu/cortexa9 devices using the
linksys.sh script.

Fixes: e25e6d8e54 ("base-files: fix and clean up nand sysupgrade code")
Signed-off-by: Michael Trinidad <trinidude4@hotmail.com>
2023-04-11 12:22:09 +02:00
Michael Trinidad 65f8089b7a kirkwood: fix Linksys upgrade, restore config step
It appears that the refactor of the upgrade process for NAND devices
resulted in the nand_do_upgrade_success step not being called for
devices using the linksys.sh script. As a result, configuration was
not preserved over sysupgrade steps.

This restores the preservation of configs for kirkwood devices using the
linksys.sh script.

Fixes: e25e6d8e54 ("base-files: fix and clean up nand sysupgrade code")
Fixes: #12298
Signed-off-by: Michael Trinidad <trinidude4@hotmail.com>
2023-04-11 12:21:15 +02:00
Paul Spooren 9cbc83726e bcm53xx: switch to Kernel 5.15 by default
Getting ready for the next release.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Tested-by: Rafał Miłecki <rafal@milecki.pl>
2023-04-10 23:13:12 +02:00
Paul Spooren d10503060b bcm4908: switch to Kernel 5.15 by default
Getting ready for the next release.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[rmilecki: tested on GT-AC5300: boot, sysupgrade & 940 Mbps NAT]
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-04-10 21:21:03 +02:00
Álvaro Fernández Rojas 457549665f bmips: dts: add missing phy modes
PHY modes should be defined in the device tree for the bcm63xx internal switch.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-04-10 10:06:22 +02:00
Álvaro Fernández Rojas 2c824b4615 bmips: remove source-only flag
bmips target is now more stable and it's time to start generating buildbot
images in order to receive a wider testing, which will be essential to replace
bcm63xx target in the future.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-04-10 10:04:08 +02:00
Álvaro Fernández Rojas 6fd8e0f943 bmips: add subtargets for each SoC
BMIPS is a generic arch that can be used for multiple Broadcom SoCs, each one
with its own specific drivers, so instead of having a huge kernel supporting
all of them, let's switch to a subtarget per SoC like other OpenWrt targets.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-04-10 10:04:08 +02:00
Álvaro Fernández Rojas e76556d967 bmips: b43-sprom: fix build when SSB/BCMA disabled
Fix build of B43 SPROM fallback when SSB or BCMA are disabled.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-04-10 10:04:08 +02:00
Álvaro Fernández Rojas 95b846fbc0 bmips: allow disabling mdio-mux-bcm6368
This controller is only present on SoCs with B53 MMAP switch.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-04-10 10:04:08 +02:00
Álvaro Fernández Rojas f5adc5bafb kernel: disable CONFIG_HW_RANDOM_BCM2835
This HW RNG is present on some Broadcom 63XX SoCs, but not all of them.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-04-10 10:04:08 +02:00
John Audia 32f134fbdf kernel: bump 5.15 to 5.15.106
Removed upstreamed:
        generic/735-net-ethernet-mtk_eth_soc-fix-flow_offload-related-re.patch[1]
        pending-5.15/350-mips-bmips-BCM6358-disable-RAC-flush-for-TP1.patch[2]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.106&id=76f09582a191dcf11118fd4bdbf50f538c90fa8d

2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/mips/bmips?h=v5.15.106&id=65b723644294f1d79770704162c0e8d1f700b6f1

Build system: x86_64
Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod, ipq806x/R7800
Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod, ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-04-09 14:48:34 +02:00
Álvaro Fernández Rojas 8bee6a9f1d bmips: switch to LED kernel modules
Disable LED controllers from kernel config and switch to per device kernel
modules.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-04-09 10:52:32 +02:00
Álvaro Fernández Rojas 6e081e1778 bmips: add LED kernel modules
Add BCM6328 and BCM6358 LED kernel modules.
This allows selecting the LED controllers only for those devices using them.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-04-09 10:34:05 +02:00
Álvaro Fernández Rojas aefeb34223 bmips: add support for Sercomm SHG2500
Sercomm SHG2500 is a BCM63168 with 128M of RAM, 256M of NAND, an external
BCM53124S switch for the LAN ports and internal/external Broadcom wifi.
LEDs are connected to an external MSP430G2513 MCU controlled via SPI.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-04-09 10:33:13 +02:00
Álvaro Fernández Rojas d11a7c4d95 bmips: use sercomm-pid script
Make use of sercomm-pid script for generating the Sercomm PID, which avoids
having to add an array of hex bytes for every new Sercomm device.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-04-09 10:21:58 +02:00
Álvaro Fernández Rojas d309160d30 bmips: image: rename SERCOMM_VERSION to SERCOMM_FSVER
SERCOMM_VERSION is ambiguous and it should be more clear that it refers to the
version used for the filesystem.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-04-09 10:06:26 +02:00
Álvaro Fernández Rojas 8758438c27 ramips: sercomm-payload: use pide-file argument
Instead of passing an array of hex bytes for the Sercomm PID we can now use
the --pid-file parameter.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-04-09 09:59:21 +02:00
John Audia 78a468f690 kernel: bump 5.10 to 5.10.177
All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-04-08 15:32:01 +02:00
Joe Mullally 2122c80b32 ramips: lower re305-v3 spi-max-frequency
Fix flash I/O instability observed in newer devices with cFeon
QH64A-104HIP (detected as en25qh64).

Ref: https://forum.openwrt.org/t/support-for-tp-link-re305-v3/75893/91

Reported-by: Dimitri Souza <dimitri.souza@gmail.com>
Tested-by: Dimitri Souza <dimitri.souza@gmail.com>
Signed-off-by: Joe Mullally <jwmullally@gmail.com>
[alter commit-message - target master]
Signed-off-by: David Bauer <mail@david-bauer.net>
2023-04-08 14:41:01 +02:00
David Bauer 827a40502f mpc85xx: refresh patches
Signed-off-by: David Bauer <mail@david-bauer.net>
2023-04-08 14:41:01 +02:00
David Bauer 765f66810a mpc85xx: add support for Enterasys WS-AP3715i
Hardware
--------

SoC:   NXP P1010 (1x e500 @ 800MHz)
RAM:   256M DDR3 (2x Samsung K4B1G1646G-BCH9)
FLASH: 32M NOR (Spansion S25FL256S)
BTN:   1x Reset
WiFi:  1x Atheros AR9590 2.4 bgn 3x3
       2x Atheros AR9590 5.0 an 3x3
ETH:   2x Gigabit Ethernet (Atheros AR8033 / AR8035)
UART:  115200 8N1 (RJ-45 Cisco)

Installation
------------
1. Grab the OpenWrt initramfs, rename it to ap3715.bin. Place it in
   the root directory of a TFTP server and serve it at
   192.168.1.66/24.

2. Connect to the serial port and boot the AP. Stop autoboot in U-Boot
   by pressing Enter when prompted. Credentials are identical to the one
   in the APs interface. By default it is admin / new2day.

3. Alter the bootcmd in U-Boot:

 $ setenv ramboot_openwrt "setenv ipaddr 192.168.1.1;
   setenv serverip 192.168.1.66; tftpboot 0x2000000 ap3715.bin; bootm"

 $ setenv boot_openwrt "sf probe 0; sf read 0x2000000 0x140000 0x1000000;
   bootm 0x2000000"

 $ setenv bootcmd "run boot_openwrt"

 $ saveenv

4. Boot the initramfs image

 $ run ramboot_openwrt

5. Transfer the OpenWrt sysupgrade image to the AP using SCP. Install
   using sysupgrade.

 $ sysupgrade -n <path-to-sysupgrade.bin>

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-04-08 14:41:01 +02:00
David Bauer f058dad1b6 mpc85xx: don't compress kernel image for WS-AP3825i
The kernel is already compressed with XZ by the bootwrapper, thus we
gain nothing by compressing it a second time.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-04-08 14:41:01 +02:00
David Bauer 1d4d21481f mpc85xx: reserve upper 1MB of RAM for WS-AP3825i
The bootpage for the second core is placed by U-Boot in the upper 128k
of syste-memory.

This could either be a reserved-area or deducted from the total
system-memory. As only the latter is parsed by the bootwrapper, reduce
the available system memory for linux in order to preserve the bootpage
from being overwritten.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-04-08 14:41:01 +02:00
David Bauer e3f31ff20d mpc85xx: backport bootwrapper patch to kernel 5.10
Kernel 5.10 builds currently fail because the patch for using the
simpleImage bootwrapper were not added to 5.10.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-04-08 14:41:01 +02:00
David Bauer 51046da7be mpc85xx: add properties normally added by U-Boot
This adds properties to PCIe as well as ethernet nodes which are
normally added by the Extreme Networks U-Boot.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-04-08 14:41:01 +02:00
David Bauer 16e1bf509c mpc85xx: fix incorrect CPU node / properties
This adds properties normally filled by U-Boot. Also it fixes the node
name, which is incorrectly referring to a P1010 core.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-04-08 14:41:01 +02:00
David Bauer 3d43d68333 mpc85xx: add localbus frequency for WS-AP3825i
This is normally filled by U-Boot.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-04-08 14:41:01 +02:00
David Bauer e81709af13 mpc85xx: add linux,stdout-path for WS-AP3825i
This is normally filled by U-Boot. Prevents double-printing of early
console messages. Also enables debug-output by the zImage wrapper.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-04-08 14:41:01 +02:00
David Bauer 076da59f17 ramips: define remapping-range for DAP-X1860
Prevent the BBT translation layer from remapping the UBI used for
storing rootfs.

Explicitly define the number of blocks reserved for remapping.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-04-08 14:41:01 +02:00
Paul Spooren c8934099bf octeon: switch to Kernel 5.15 by default
Getting ready for the next release.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2023-04-08 00:47:12 +02:00
Paul Spooren 596059266a kirkwood: switch to Kernel 5.15 by default
Getting ready for the next release.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2023-04-08 00:43:25 +02:00
Paul Spooren 16565bc1ce tegra: switch to Kernel 5.15 by default
Getting ready for the next release.

Acked-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Signed-off-by: Paul Spooren <mail@aparcar.org>
2023-04-08 00:30:22 +02:00
Raylynn Knight 036372c769
realtek: Fix typo for EnGenius EWS2910P
Fix mis-typed DEVICE-MODEL in mk file for EnGenius EWS2910P.

Signed-off-by: Raylynn Knight <rayknight@me.com>
[ fix wrong SoB format and improve commit title/description ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-04-07 11:22:37 +02:00
Rafał Miłecki 9a62b3977f kernel: backport NVMEM patch for U-Boot env data "ethaddr" cell
Adjust our local code to avoid breakage.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-04-06 12:21:29 +02:00
Rafał Miłecki 323072f3a6 kernel: backport NVMEM patches queued for the v6.4
They add NVMEM layouts support. It allows handling NVMEM content
independently of NVMEM device access.

Skip U-Boot env data patch for now as it break our downstream MAC hacks.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-04-06 12:13:22 +02:00
Rafał Miłecki b67ba02fc8 kernel: backport mtd fixes for nvmem
They are needed for NVMEM changes pending for v6.4.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-04-06 07:26:11 +02:00
Rafał Miłecki 3b212db232 kernel: backport of_request_module()
It's needed by NVMEM changes queued for 6.4.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-04-06 06:27:02 +02:00
Daniel Golle e92b153e99 mediatek: introduce KERNEL_LOADADDR to Device/Default template
We need to reset KERNEL_LOADADDR if we use it on a per-device base.
Otherwise the previous value will be kept in case a device doesn't
define KERNEL_LOADADDR and relies on the default.

Move initializing KERNEL_LOADADDR to target/linux/mediatek/image/Makefile,
similar to how it's done also on the ramips target.

This fixes image size related breakage on devices which rely on the
default value of KERNEL_LOADADDR.

While at it use 0x48000000 which is more common than the previous default
0x44000000 for the filogic subtarget.

Fixed: e7c399bee6 ("filogic: add support for ASUS TUF-AX4200")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-04-05 17:12:55 +01:00
David Bauer f25abdf144 mediatek: make TUF-AX4200 KERNEL simply expanded
The KERNEL variable was recursively expanded, breaking other devices.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-04-04 02:08:32 +02:00
Daniel Golle d98c8fc06d generic: disable SGMII in-band AN for RealTek 2.5G PHYs
MAC drivers don't use SGMII in-band autonegotiation unless told to do so
in device tree using 'managed = "in-band-status"'. When using MDIO to
access a PHY, in-band-status is unneeded as we have link-status via
MDIO. Switch off SGMII in-band autonegotiation using magic values.

Reported-by: Chen Minqiang <ptpt52@gmail.com>
Reported-by: Chukun Pan <amadeus@jmu.edu.cn>
Reported-by: Yevhen Kolomeiko <jarvis2709@gmail.com>
Tested-by: Yevhen Kolomeiko <jarvis2709@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-04-03 02:32:28 +01:00
Daniel Golle 7e3284eef7 generic: use genphy_soft_reset for RealTek 2.5G PHYs
Some vendor bootloaders do weird things with those PHYs which result in
link modes being reported wrongly. Start from a clean sheet by resetting
the PHY.

Reported-by: Yevhen Kolomeiko <jarvis2709@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-04-03 02:32:28 +01:00
Chukun Pan db37999170 generic: interface mode switch for RTL8221B PHY
Add dynamic interface mode update for the rtl8221 phy to match various
wire speeds. 10M/100M/1000M use SGMII, 2500M uses 2500Base-X.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-04-03 02:32:28 +01:00
Daniel Golle 5a8741aee9 realtek: refresh patches
Refresh patches which were no longer applying cleanly after a recently
added SFP quirk.

Fixes: 658b45ce48 ("generic: add quirk for HG MXPD-483II 2500M fiber SFP")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-04-03 02:32:28 +01:00
David Bauer f003217ddf Revert "mpc85xx: remove Watchguard T10 MAC override"
This reverts commit aa4a9058fb.

The assumption the bootloader fills out the MAC-address is not
correct. The MAC-address has to be set from userspace based on
information found in the device_id partition.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-04-03 03:14:20 +02:00
Daniel Golle 658b45ce48 generic: add quirk for HG MXPD-483II 2500M fiber SFP
The HG MXPD-483II 1310nm SFP module is meant to operate with 2500Base-X,
however, in their EEPROM they incorrectly specify:
    Transceiver type                          : Ethernet: 1000BASE-LX
    ...
    BR, Nominal                               : 2600MBd

Use sfp_quirk_2500basex for this module to allow 2500Base-X mode anyway.

https://forum.banana-pi.org/t/bpi-r3-sfp-module-compatibility/14573/60

X-Patchwork-Id: 13197378
X-Mailing-List: netdev@vger.kernel.org
X-Patchwork-Delegate: kuba@kernel.org
Reported-by: chowtom <chowtom@gmail.com>
Tested-by: chowtom <chowtom@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-04-03 00:11:16 +01:00
Maik Goette 4d9c38d654 lantiq: fix lzma-loader for Netgear DGN 3500(B)
Fixes Uncompressing Kernel Image ... ERROR: LzmaDecode.c, 561

Fixes: #11701 for both 3500(B)
Signed-off-by: Maik Goette <github@beeit.de>
2023-04-02 22:33:55 +02:00
Bin We 6b66666da4 ramips: add support for OrayBox X1
Add support for OrayBox X1. It is a 802.11n router, based on MediaTek MT7628N.

Specifications:
SoC: MediaTek MT7628N (580MHz)
RAM: 64 MiB
Flash: 16 MiB NOR (Winbond W25Q128JVSIQ)
Wireless: 802.11b/g/n 2x2 2.4GHz (Built In)
Ethernet: 1x 100Mbps only
USB: 1x USB Type-A 2.0 Host Port
Button: 1x "Reset" button
LED: 1x Blue LED + 1x Red LED + 1x White LED
Power: 5V Micro-USB input

Manufacturer Page:
https://pgy.oray.com/router/x1.html/parameter

Flash Layout:
0x000000000000-0x000000030000 : "u-boot"
0x000000030000-0x000000040000 : "kpanic"
0x000000040000-0x000000050000 : "factory"
0x000000050000-0x000000fe0000 : "firmware"
0x000000fe0000-0x000000ff0000 : "bdinfo"
0x000000ff0000-0x000001000000 : "reserve"

Install via SSH:
Original firmware is based on OpenWRT, but SSH is not start by default,
You should enable it first

1. Login into web admin (10.168.1.1), default password is 'admin'
2. Open the following link, and the result should be {"code":0};
SSH is now started, username is root, password is same as web admin password
http://10.168.1.1/cgi-bin/oraybox?_api=ssh_set&enabled=1
4. You can flash firmware via mtd: mtd write /tmp/firmware_image.bin firmware

Signed-off-by: Bin We <me@udp.pw>
2023-04-02 19:25:37 +02:00
Thomas Nixon d3b47909b1 lantiq: nand: don't yield while holding spinlock
The nand driver normally while waiting for the device to become ready;
this is normally fine, but xway_nand holds the ebu_lock spinlock, and
this can cause lockups if other threads which use ebu_lock are
interleaved. Fix this by waiting instead of polling.

This mainly showed up as crashes in ath9k_pci_owl_loader (see
https://github.com/openwrt/openwrt/issues/9829 ), but turning on
spinlock debugging shows this happening in other places too.

This doesn't seem to measurably impact boot time.

Tested on bt_homehub-v5a with 5.10 and 5.15.

Signed-off-by: Thomas Nixon <tom@tomn.co.uk>
[Add commit description into patch]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-04-02 17:08:45 +02:00
Jacob Aharon 2715aff5df ipq806x: Fix Linksys upgrade, restore config step
It appears that the refactor of the upgrade process for NAND devices
resulted in the nand_do_upgrade_success step not being called for
devices using the linksys.sh script. As a result, configuration
was not preserved over sysupgrade steps.

This restores the preservation of configs for ipq806x devices using the
linksys.sh script. Other devices and targets have not been examined.

This commit uses the same functionality and terminology used in commit
8634c10 ("ipq40xx: Fix Linksys upgrade, restore config step")

Fixes: e25e6d8 ("base-files: fix and clean up nand sysupgrade code")
Tested-on: EA8500

Signed-off-by: Jacob Aharon <ah.jacob@gmail.com>
2023-04-02 12:22:37 +00:00
Álvaro Fernández Rojas fdc8573587 kernel: backport upstreamed DSA B53 MMAP patch
Move the patch from pending to backport, since it has been accepted upstream:
45977e58ce

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-04-01 22:39:35 +02:00
Felix Baumann cbf120c255 ramips: mt7621: add migration script for WLAN PCI paths
PCI paths of the WLAN devices have changed between kernel 5.10 and 5.15;
migrate config so existing wifi-iface definitions don't break.

This is implemented as a hotplug handler rather than a uci-defaults script
as the migration script must run before the 10-wifi-detect hotplug handler.

based on b452af23a8

migration was forgotten when device trees were adjusted in
688697889c
c77913be5b

fixes #9374

affected devices:
Netgear R6220
Netgear WAC104
Netgear WNDR3700 v5
Zbtlink ZBT-WE1326
Wiflyer WF3526-P
Arcadyan WE420223-99
Beeline Smartbox Flash (Arcadyan WG443223)
MTS WG430223 (Arcadyan WG430223)

Tested-by: Maximilian Baumgartner <aufhaxer@googlemail.com>
Tested-by: Mikhail Zhilkin <csharper2005@gmail.com>
Signed-off-by: Felix Baumann <felix.bau@gmx.de>
2023-04-01 22:32:13 +02:00
Muhammad AL-Qadhy 2a04df3920 ramips: Add support for CJ-Hello HYC-G920
Hanyang Digitech Co., Ltd.
MSIP-CMM-HYD-HYC-G920
CJ-Hello HYC-G920

SoC		: MediaTek MT7621AT
RAM		: 256M (SK hynix H5TQ2G63FFR)
FLASH	: 16MB (Winbond W25Q128BV)
WiFi	: MediaTek MT7602EN bgn 2SS
WiFi	: MediaTek MT7612EN nac 2SS
BTN		: Reset
LED		: - Power RED
		  - WAN Green
		  - LAN {1-4}
		  - WiFi 2.4 GHz Blue
		  - WiFi 5 GHz Blue
		  - USB Green

**For MT7621 stage1 DDR Test**

UART	: J4 GND - 3V3 - TX - RX - GND / 57600-8N1

```
                MT7621   stage1 code 10:33:55 (ASIC)
                CPU=500000000 HZ BUS=166666666 HZ
```

**For u boot environment**

UART	: J4 GND - 3V3 - TX - RX - GND / 115200-8N1

**UART Menu**

```
	Please choose the operation:
		1: Load system code to SDRAM via TFTP.
		2: Load system code then write to Flash via TFTP.
		3: Boot system code via Flash (default).
		4: Entr boot command line interface.
		7: Load Boot Loader code then write to Flash via Serial.
		9: Load Boot Loader code then write to Flash via TFTP.
```

**Steps**

Press 4: Entr boot command line interface.

On the pormpt enter.
`setenv firmware_size 0xf60000`
Then enter.
`saveenv`
Then enter.
`reset`

**Device will reboot**

Set your IP 192.168.100.100/24
Connect your lan cable to wan port.

**On the UART Menu**

Press 2: Load system code then write to Flash via TFTP.

 Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N) **enter** `Y`
 Please Input new ones /or Ctrl-C to discard
        Input device IP (192.168.100.55) ==:`192.168.100.55`
        Input server IP (192.168.100.100) ==:`192.168.100.100`
        Input Linux Kernel filename () ==:`openwrt-22.03.0-ramips-mt7621-hanyang_hyc-g920-squashfs-sysupgrade.bin`

After uploading firmware image, device will boot Openwrt.

Signed-off-by: Muhammad AL-Qadhy <m.ismael@gmail.com>
2023-04-01 22:13:16 +02:00
Rosen Penev 37dbe30215 ramips: mt7621: remove set-affinity script
From https://github.com/openwrt/openwrt/pull/12280#issuecomment-1489279860
On Ethernet and WLAN, NAPI is threaded for all queues. This means that the
processing work is not stuck on the CPU that fired the IRQ. Under heavy
load, IRQs get disabled anyway, so it should not matter at all which CPUs
the IRQs fire on.

Basic testing indicates this to be true. There's no speedup or slowdown.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-04-01 21:56:28 +02:00
Felix Baumann 787ecdf66d ramips: mt7621: ASUS RT-AX53U add NMBM, nest firmware
Nests kernel and ubi into firmware partition in-order to be compatible
with OEM firmware. This allows restoring oem firmware from a backup of
firmware2. Add jffs2 partition which is present in the oem firmware.
Add support for mediatek NMBM (wear leveling on newer mediatek devices).
Exclude UBI partition from NMBM management.
Continues PR #10685.

Tested-by: Felix Baumann <felix.bau@gmx.de>
Signed-off-by: Felix Baumann <felix.bau@gmx.de>
2023-04-01 21:34:46 +02:00
John Audia ec8c837eab kernel: bump 5.15 to 5.15.105
Manually rebased:

Removed upstreamed:
	backport-5.15/743-v6.3-0005-net-dsa-b53-mmap-fix-device-tree-support.patch[1]
	backport-5.15/743-v6.3-0006-net-dsa-tag_brcm-legacy-fix-daisy-chained-switches.patch[2]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.105&id=9bbb3d3f218f1cf51f57a43cf8fd63b05be1b821
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.105&id=48f52431af9980582b6faa32ff8b581edb10486c

Build system: x86_64
Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-04-01 19:58:44 +02:00
Joe Mullally 19752bdfa3 kernel: add support for XMC XM25QH64C
The XMC XM25QH64C is a 8MB SPI NOR chip. The patch is verified on TL-WPA8631P v3.
Datasheet available at https://www.xmcwh.com/uploads/442/XM25QH64C.pdf

Signed-off-by: Joe Mullally <jwmullally@gmail.com>
2023-04-01 19:47:46 +02:00
Felix Fietkau 5c57d6c382 kernel: fix mtk_eth_soc flow accounting for MT7986
This was accidentally dropped when MT7981 support was added

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-01 09:16:30 +02:00
Jan-Niklas Burfeind 9b005036f8 ipq40xx: add LED functions for Google WiFi
Add LED function properties for the LED controller to avoid failing
driver probe with kernel 5.15.

While at it, also define the OpenWrt LED indicator patterns for this
device.

Ref commit 583ac0e11d ("mpc85xx: update lp5521 led-controller node for 5.10")

Google uses white for running and red for an issue

Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
Tested-by: Andrijan Möcker <amo@ct.de>
Reviewed-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
2023-03-31 19:39:36 +02:00
Jan-Niklas Burfeind 791550b94f ipq40xx: add reset button for Google WiFi (Gale)
Add the external reset button for use with OpenWrt.

Co-authored-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
Reviewed-by: Brian Norris <computersforpeace@gmail.com>
Tested-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
2023-03-31 19:39:24 +02:00
Álvaro Fernández Rojas 967520800a bmips: bcm6362/bcm63268: enable HW RNG
This enables the HW Random Number Generator on the BCM6362 and BCM63268 SoCs,
which is the same one used on BCM6368 SoC.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-31 17:52:03 +02:00
Felix Fietkau 75e78bcaab kernel: remove obsolete netfilter tcp window size check bypass patch
On any currently supported hardware, the performance impact should not
matter anymore.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-30 14:15:35 +02:00
Hauke Mehrtens 9186da4027 ramips: Refresh patches
Refresh the ramips kernel patches.

Fixes: 7472476aef ("kernel: fix mtk_eth_soc throughput regressions on gigabit PHY ports")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-03-29 19:36:33 +02:00
Álvaro Fernández Rojas a0f100c569 bmips: bcm6348-enet: register emac driver from iudma
Register the ethernet driver from iudma, which avoids the attempt to probe the
emac driver before iudma and its consequent deferral.
The ethernet driver can't work without iudma anyway.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-29 18:33:34 +02:00
Robert Marko 5d8f14bfef kernel: filter out pahole version
Pahole version is being autodetected during runtime since kernel 5.15.96
via in-kernel scripts/pahole-version.sh so add CONFIG_PAHOLE_VERSION to
kernel filter in order to prevent it from being added to target configs.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-03-29 17:36:19 +02:00
Andrew Sim ed2849958f mediatek: re-add wireless driver for TUF-AX4200
The wireless driver package was incorrectly removed from the TUF-AX4200
device-packages, resulting in images without wireless functionality.

Fixes: d98c4fb8bf ("mediatek: broaden filogic target description")

Signed-off-by: Andrew Sim <andrewsimz@gmail.com>
[rework commit description]
Signed-off-by: David Bauer <mail@david-bauer.net>
2023-03-29 17:03:42 +02:00
Álvaro Fernández Rojas cd64353bd6 bmips: bcm6348-enet: add PHY support
We should ensure that the PHY is properly configured.
This is specially needed in devices using the internal PHY for ethernet0.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-29 16:26:42 +02:00
Felix Fietkau 7472476aef kernel: fix mtk_eth_soc throughput regressions on gigabit PHY ports
Fixes issues on MT7621 and MT7623 switch ports, and PHY ports on all SoC

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-29 16:14:37 +02:00
Álvaro Fernández Rojas 1c552eb44d bmips: add basic BCM6358 ethernet support
The MDIO bus is supported but there are errors when trying to probe and
configure the external BCM5325E switch through B53 DSA.
Therefore, let's add basic ethernet (but working) support for now.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-28 20:01:22 +02:00
Álvaro Fernández Rojas 414ca70684 bmips: bcm6368-enetsw: refactor probe
- Switch to devm functions where possible.
- Fix probing when no resets provided.
- Properly check pointers (IS_ERR_OR_NULL/PTR_ERR).
- Add probe info.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-28 19:36:59 +02:00
Álvaro Fernández Rojas 4d99f0ce4d bmips: bcm6368-enetsw: remove unneeded variables
Change the code to use defines instead of variables.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-28 18:47:17 +02:00
Álvaro Fernández Rojas 33f59ebd1f bmips: bcm6368-enetsw: harmonize dev variables
The current implementation of bcm6368-enetsw is a mess of dev, ndev and kdev
variables, which have refer to different things depending on the function.
This commit harmonizes it and resolves the issue.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-28 18:34:46 +02:00
Álvaro Fernández Rojas 741780bd93 bmips: sercomm,h500-s: add Quantenna gpio switch
Sercomm H500-s has a Quantenna SoC for external wifi which can be activated or
deactivated through GPIO #20.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-28 18:20:34 +02:00
Felix Fietkau 77f11d2772 kernel: remove unnecessary change from backlog threading fix
Fixes: f1c9bd6f6f ("kernel: fix kernel warning and network issue in the backlog threading patch")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-28 13:14:04 +02:00
Felix Fietkau f1c9bd6f6f kernel: fix kernel warning and network issue in the backlog threading patch
Fixes enabling it early during the boot

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-28 12:46:34 +02:00
Daniel Golle d98c4fb8bf mediatek: broaden filogic target description
The filogic subtarget now also supports MT7981 and will in future
also support MT7988. Reflect that in the target description.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-03-27 19:07:54 +01:00
Daniel Golle 397c706cba mediatek: add device tree include for the MT7981 SoC
Add mt7981.dtsi so we can start adding MT7981 devices.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-03-27 19:07:54 +01:00
Daniel Golle 5f898483af generic: fix Macronix SPI-NAND driver
Use scratch buffer for DMA operetations. Passing a pointer to a stack
variable won't work and results in bogus bit flips being reported.

Patch was submitted upstream and is part of Linux 6.3.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-03-27 19:07:54 +01:00
Daniel Golle 5403770105 mediatek: add support for SPI calibration
Newer MediaTek's SoCs need SPI calibration routines for SPI to work
reliably. Import patches for that from MediaTek's SDK.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-03-27 19:07:54 +01:00
Daniel Golle 3542ee9d1f mediatek: add PWM support for MT7981 SoC
Add patch to support PWM on the MT7981 SoC.
This patch will also be submitted to upstream Linux soon.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-03-27 19:07:54 +01:00
Daniel Golle be6bbd9484 mediatek: add I2C for MT7981 SoC
Add patch to support I2C on the MT7981 SoC.
This change will also be submitted to upstream Linux soon.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-03-27 19:07:54 +01:00
Daniel Golle ad962c90c3 mediatek: simplify MaxLinear GPY PHY driver
The mxl-gpy driver apparently was built in the assumption that SGMII
auto-negotiation is always switched on at the MAC. This may be true for
few rather recent drivers (why?), but certainly isn't for most drivers
unless 'managed = "in-band-status"' is set in device tree. Add patch to
the mediatek target which reduces mxl-gpy to behave more like an
ordinary PHY driver using out-of-band status.

This allows to use these PHYs without rate-adaptation which seems to be
at least partially broken/racy in some revisions of the PHY and/or
internal PHY firmware.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-03-27 19:07:54 +01:00
Daniel Golle b62f58891a generic: dsa: make use of pcs-mtk-lynxi also for mt7530
The MT7531 switch IC comes with SerDes ports with PCS identical to
what is also used in MediaTek's SoCs. Make use of the shared driver
to ease maintainance and reduce code duplication.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-03-27 19:07:54 +01:00
Daniel Golle d308479d10 generic: backport regmap reg_base and downshift features
Backport new regmap features from Linux 5.18 which are needed to let
mt7530 use pcs-mtk-lynxi.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-03-27 19:07:54 +01:00
Daniel Golle 53dc9a60c0 generic: mtk_eth_soc: switch to external PCS driver
Backport patch to make use of the new PCS driver in mtk_eth_soc.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-03-27 19:07:54 +01:00
Daniel Golle 880d131133 generic: pcs-mtk-lynxi: add hack to use 2500Base-X without AN
Using 2500Base-T SFP modules e.g. on the BananaPi R3 requires manually
disabling auto-negotiation, e.g. using ethtool. While a proper fix
using SFP quirks is being discussed upstream, bring a work-around to
restore user experience to what it was before the switch to the
dedicated SGMII PCS driver.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-03-27 19:07:54 +01:00
Daniel Golle 72094f74a6 generic: net: pcs: add driver for MediaTek SGMII PCS
Backport dedicated PCS driver for MediaTek LynxI SGMII/SerDes unit.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-03-27 19:07:54 +01:00
Daniel Golle 5b972d7272 generic: mtk_eth_soc: allow setting MDIO clock frequency
Backport patch allowing to set the MDIO bus clock frequency.
By default the MDIO bus clock runs on 2.5 MHz, allow increasing it
up to 25 MHz.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-03-27 19:07:54 +01:00
Daniel Golle a438a805eb mediatek: add support for built-in GE PHYs of newer SoCs
MT7981 and the upcoming MT7988 have built-in Gigabit Ethernet PHYs.
While they share some design properties with the PHYs present in
MT753x, they do need calibration data from the SoC's efuse.

Add driver to support them. Upstreaming it is planned, but there are
still some ongoing discussions with MediaTek.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-03-27 19:07:54 +01:00
Daniel Golle 18a3cd2062 generic: backport support for MT7981 Ethernet
Backport support for the MT7981 SoC to mtk_eth_soc.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-03-27 19:07:54 +01:00
Daniel Golle 18a9ae56e9 mediatek: backport pinctrl driver for MT7981 SoC
Backport the pinctrl driver for the MT7981 SoC. The driver has also
been submitted upstream and is part of Linux 6.3.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-03-27 19:07:54 +01:00
Daniel Golle 658c4dd43f mediatek: backport clk driver for MT7981 SoC
Backport driver for common clocks in MT7981 SoC. The driver has also
been submitted upstream and became part of Linux 6.3.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-03-27 19:07:54 +01:00
Daniel Golle 2f663cab46 generic: replace mtk_sgmii patches with versions accepted upstream
Replace patches for MediaTek Ethernet driver SGMII/SerDes unit with
their corresponding upstream patches. Not all of the patches in our
tree went upstream as-is, some are slightly different implementations,
and they require the phylink_pcs helpers now made available.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-03-27 19:07:54 +01:00
Daniel Golle 027586ae8e generic: backport some phylink helper functions
It isn't feasible to literally backport all upstream phylink_pcs changes
down to Linux 5.15: It's just too many patches, and many downstream
drivers and hacks are likely to break. We are too close to branching off
to risk this, and it's also just too much work.
Instead just add helper functions used by modern PCS drivers while keeping
the original functions instact as well. While this may add a kilobyte or
two of extra kernel size, it has the advantage that we get the best of both
worlds: None of the existing codepaths are touched, but yet we have the
option to backport singular improvements to Ethernet drivers where needed.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-03-27 19:07:54 +01:00
Christian Marangi 708a507af0
generic: 5.15: refresh kernel patches
Refresh kernel patches for generic kernel 5.15 due to new backport
version of MGLRU patchset.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-03-27 14:16:10 +02:00
Kazuki H 0d0928f587
kernel: Update MGLRU patchset
The current patches are old, update them from mainline.
Backports taken from https://github.com/yuzhaogoogle/linux/commits/mglru-5.15

Tested-by: Kazuki H <kazukih0205@gmail.com> #mt7622/Linksys E8450 UBI
Signed-off-by: Kazuki H <kazukih0205@gmail.com>
2023-03-27 14:16:10 +02:00
Alexey Bartenev dc79b51533 ramips: add support for Keenetic Lite III rev. A
General specification:
SoC Type: MediaTek MT7620N (580MHz)
ROM: 8 MB SPI-NOR (W25Q64FV)
RAM: 64 MB DDR (EM6AB160TSD-5G)
Switch: MediaTek MT7530
Ethernet: 5 ports - 5×100MbE (WAN, LAN1-4)
Wireless: 2.4 GHz (MediaTek RT5390): b/g/n
Buttons: 3 button (POWER, RESET, WPS)
Slide switch: 4 position (BASE, ADAPTER, BOOSTER, ACCESS POINT)
Bootloader: U-Boot 1.1.3
Power: 9 VDC, 0.6 A

MAC in stock:
|-	+			|
| LAN 	| RF-EEPROM + 0x04	|
| WLAN	| RF-EEPROM + 0x04	|
| WAN 	| RF-EEPROM + 0x28	|

OEM easy installation
1. Use a PC to browse to http://my.keenetic.net.
2. Go to the System section and open the Files tab.
3. Under the Files tab, there will be a list of system
files. Click on the Firmware file.
4. When a modal window appears, click on the Choose File
button and upload the firmware image.
5. Wait for the router to flash and reboot.

OEM installation using the TFTP method
1. Download the latest firmware image and rename it to
klite3_recovery.bin.
2. Set up a Tftp server on a PC (e.g. Tftpd32) and place the
firmware image to the root directory of the server.
3. Power off the router and use a twisted pair cable to connect
the PC to any of the router's LAN ports.
4. Configure the network adapter of the PC to use IP address
192.168.1.2 and subnet mask 255.255.255.0.
5. Power up the router while holding the reset button pressed.
6. Wait approximately for 5 seconds and then release the
reset button.
7. The router should download the firmware via TFTP and
complete flashing in a few minutes.
After flashing is complete, use the PC to browse to
http://192.168.1.1 or ssh to proceed with the configuration.

Signed-off-by: Alexey Bartenev <41exey@proton.me>
2023-03-27 02:09:58 +02:00
Aleksander Jan Bajkowski 11c28cfceb bcm47xx: enable adm6996 only on legacy subtarget
The generic subtarget supports only a few devices. None of
these devices are equipped with a ADM6996 switch. On the
mips74k subtarget, the driver for the adm6996 switch is
disabled. So it seems that the ADM6996 driver should
be enabled only on the legacy subtarget.

Support for ADM6996 switches was enabled in commit 68081fc1c8.
At the time when this driver was enabled the bcm47xx
target had only one subtarget.

Switches used by individual devices suported by the generic
subtarget are listed below.

Device			Switch
Edimax PS-1208MFG	int. SoC
Linksys WRT300N v1.1	Broadcom BCM5325
Linksys WRT310N v1	Broadcom BCM5397
Linksys WRT350N v1	Broadcom BCM5397
Linksys WRT610N v1	Broadcom BCM53115
Linksys WRT610N v2	Broadcom BCM53115
Linksys E3000 v1	Broadcom BCM53115

Reduce uncompressed kernel size by 8320 Bytes.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2023-03-27 01:25:03 +02:00
Aleksander Jan Bajkowski 9215f556a0 bcm47xx: refresh config
This was done by executing these command:
$ make kernel_oldconfig CONFIG_TARGET=subtarget

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2023-03-27 01:24:46 +02:00
Aleksander Jan Bajkowski ceac4ae3b4 lantiq: xway: add support for AVM FRITZ!Box 7330
The AVM FRITZ!Box 7330 shares hardware with the AVM Fritzbox 7320
except for the second ethernet port, which only supports 100M.

Hardware:
- SoC: Lantiq ARX 188
- CPU: 2x MIPS 34Kc 393 MHz
- RAM: 64 MiB 196 MHz
- Flash: 16 MiB NAND
- Ethernet: Built-in Gigabit Ethernet switch, 1x 1GbE, 1x 100M
- Wifi: Atheros AR9227-BC2A b/g/n with 2 pcb/internal antennas
- USB: 2x USB 2.0
- DSL: Built-in ADSL2+ modem
- DECT: Dialog SC14441
- LEDs: 1 two-color, 4 one-color
- Buttons: 1x DECT, 1x WIFI
- Telephone connectors: 1 FXS port via TAE or RJ11 connector

Installation:
The installation process is described on the wiki.

Unsupported (same as AVM 7320):
- VoIP (DECT and FXS),
- Second Ethernet port.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2023-03-27 00:31:47 +02:00
Martin Kennedy 12f52336d2 ath79: Add Aruba AP-175 support
This board is very similar to the Aruba AP-105, but is
outdoor-first. It is very similar to the MSR2000 (though certain
MSR2000 models have a different PHY[^1]).

A U-Boot replacement is required to install OpenWrt on these
devices[^2].

Specifications
--------------
* Device:	Aruba AP-175
* SoC:		Atheros AR7161 680 MHz MIPS
* RAM:		128MB - 2x Mira P3S12D40ETP
* Flash:	16MB MXIC MX25L12845EMI-10G (SPI-NOR)
* WiFi:		2 x DNMA-H92 Atheros AR9220-AC1A 802.11abgn
* ETH:		IC+ IP1001 Gigabit + PoE PHY
* LED:		2x int., plus 12 ext. on TCA6416 GPIO expander
* Console:	CP210X linking USB-A Port to CPU console @ 115200
* RTC:		DS1374C, with internal battery
* Temp:		LM75 temperature sensor

Factory installation:

- Needs a u-boot replacement. The process is almost identical to that
  of the AP105, except that the case is easier to open, and that you
  need to compile u-boot from a slightly different branch:
  https://github.com/Hurricos/u-boot-ap105/tree/ap175

  The instructions for performing an in-circuit reflash with an
  SPI-Flasher like a CH314A can be found on the OpenWrt Wiki
  (https://openwrt.org/toh/aruba/ap-105); in addition a detailed guide
  may be found on YouTube[^3].

- Once u-boot has been replaced, a USB-A-to-A cable may be used to
  connect your PC to the CP210X inside the AP at 115200 baud; at this
  point, the normal u-boot serial flashing procedure will work (set up
  networking; tftpboot and boot an OpenWrt initramfs; sysupgrade to
  OpenWrt proper.)

- There is no built-in functionality to revert back to stock firmware,
  because the AP-175 has been declared by the vendor[^4] end-of-life
  as of 31 Jul 2020. If for some reason you wish to return to stock
  firmware, take a backup of the 16MiB flash before flashing u-boot.

[^1]: https://github.com/shalzz/aruba-ap-310/blob/master/platform/bootloader/apboot-11n/include/configs/msr2k.h#L186

[^2]: https://github.com/Hurricos/u-boot-ap105/tree/ap175

[^3]: https://www.youtube.com/watch?v=Vof__dPiprs

[^4]: https://www.arubanetworks.com/support-services/end-of-life/#product=access-points&version=0

Signed-off-by: Martin Kennedy <hurricos@gmail.com>
2023-03-27 00:27:59 +02:00
Shiji Yang 88d76bb455 ramips: mt7621: enable unused PCIe port to fix potential boot failure
One user reported that his SIMAX1800T couldn't boot like the others. After
debugging, I found that this was caused by the disabled PCIe port. I cannot
reproduce this issue on my SIMAX1800T. But when I disabled pcie2 on the
ASUS RT-AC57U, I got the same result.

It seems that disabling these unused PCIe ports on some mt7621 revisions
will cause PCIe to fail to initialize. So we'd better to re-enable them on
all related mt7621 devices.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-03-26 23:33:24 +02:00
Chuanhong Guo 2126325400
ramips: fix 5g mac for TOTOLINK X5000R
There's no valid mac address for the second band in the eeprom.
The vendor fw uses 2.4G mac + 4 as the mac for 5G radio.
Do the same in our firmware.

Fixes: 23be410b3d ("ramips: add support for TOTOLINK X5000R")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2023-03-26 23:55:54 +08:00
Edward Chow de3d60b982 ath79: calibrate dlink dir-825 b1 with nvmem
Driver for both soc (2.4GHz Wifi) and pci (5 GHz) now pull the calibration
data from the nvmem subsystem.

This allows us to move the userspace caldata extraction for the pci-e ath9k
supported wifi into the device-tree definition of the device.

Currently, only ethernet devices uses the mac address of
"mac-address-ascii" cells, while PCI ath9k devices uses the mac address
within calibration data.

Signed-off-by: Edward Chow <equu@openmail.cc>
(restored switch configuration in 02_network, integrated caldata into
partition)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-03-26 16:39:37 +02:00
Christian Lamparter c2d1c32d1e lantiq: xrx200: convert FritzBox 7360v2's wifi to nvmem
this was thoroughly tested (warm and cold boots). on a
real 7360v2. This is because there have been documented
hick-ups with other lantiq devices that need the
owl-loader too.

It's likely that the 7360(sl) could be converted in the
same way as well. However the 7362sl uses a reversed
caldata format, so the "qca,no-eeprom" stays in place.

The patch also moves the urloader nvmem partition
definition into the partition section.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-03-26 16:39:37 +02:00
Christian Lamparter 4ca858f1a0 apm821xx: Migrate to libdeflate
libdeflate's gzip compressor provides a better
compression ratio and uboot's decompressor has
no problem with the data streams.

Tested on MX60, WNDR4700, WNDAP660

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-03-26 16:39:37 +02:00
Jeff Kletsky 8634c1080d ipq40xx: Fix Linksys upgrade, restore config step
It appears that the refactor of the upgrade process for NAND devices
resulted in the nand_do_upgrade_success step not being called for
devices using the linksys.sh script. As a result, configuration
was not preserved over sysupgrade steps.

This was restored for some devices in
commit 84ff6c90dd ("base-files: bring back nand_do_upgrade_success").
This restored preservation of config for ipq40xx devices using the
linksys.sh script. Other devices and targets have not been examined.

Closes: #11677
Fixes: e25e6d8e54 ("base-files: fix and clean up nand sysupgrade code")
Tested-on: EA8300

Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
(checkpatch nitpick)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-03-26 16:39:37 +02:00
John Audia f598880162 kernel: bump 5.10 to 5.10.176
All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-03-25 16:22:48 +01:00
John Audia f0bc2636ce kernel: bump 5.15 to 5.15.104
All patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-03-25 16:05:14 +01:00
John Audia d59d69f9e1 kernel: bump 5.15 to 5.15.103
Manually rebased:
        backport-5.15/704-15-v5.19-net-mtk_eth_soc-move-MAC_MCR-setting-to-mac_finish.patch

Removed upstreamed:
        backport-5.15/060-v6.0-01-tools-build-Add-feature-test-for-init_disassemble_in.patch[1]
        backport-5.15/060-v6.0-02-tools-include-add-dis-asm-compat.h-to-handle-version.patch[2]
        backport-5.15/060-v6.0-03-tools-perf-Fix-compilation-error-with-new-binutils.patch[3]
        backport-5.15/060-v6.0-04-tools-bpf_jit_disasm-Fix-compilation-error-with-new-.patch[4]
        backport-5.15/060-v6.0-05-tools-bpftool-Fix-compilation-error-with-new-binutil.patch[5]
        pending-5.15/733-02-net-ethernet-mtk_eth_soc-fix-RX-data-corruption-issu.patch[6]
        bcm47xx/patches-5.15/170-bgmac-fix-initial-chip-reset-to-support-BCM5358.patch[7]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=51b99dc38c1a053e2e732d7f9e2740e343ae7eae
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=451c9d7b16169645ed291ebb2ca9844caa088f2d
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=97f005c0bdbaf656a7808586d234965385a06c58
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=1c27fab243333821375e4d63128d60093fdbe149
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=4441a90091931fd81607567961dc122f24f735bb
6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=2adc29350a5b4669544566f71f208d2abaec60ab
7. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=04bfc5bcdfc0fdb73587487c71b04d63807ae15a

Build system: x86_64
Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-03-25 16:01:23 +01:00
Felix Fietkau 95cae498b6 kernel: fix mtk flow offload list corruption issue with l2 flows
The same node was accidentally used for two different lists, causing an
invalid pointer chain.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-25 11:58:59 +01:00
Álvaro Fernández Rojas 09115a1705 kernel: refresh mxl-gpy LED patch
Make the patches apply cleanly again.

Fixes: 90691f4505 ("generic: mxl-gpy: allow configuring LED registers")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-25 10:35:19 +01:00
Álvaro Fernández Rojas 21b89b0647 kernel: backport dsa b53 patches
These patches have been merged upstream, so let's move them to backport.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-25 10:33:06 +01:00
Álvaro Fernández Rojas 67c28dde09 bmips: sercomm,h500-s: fix upgrade
Sercomm H500-s devices don't need the JFFS2 cleanmarkers as opposed to the
other bmips NAND devices.

Fixes: 6df12200d9 ("bmips: add support for Sercomm H-500s")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-25 10:25:31 +01:00
David Bauer e7c399bee6 filogic: add support for ASUS TUF-AX4200
Hardware
--------
SOC:   MediaTek MT7986
RAM:   512MB DDR3
FLASH: 256MB SPI-NAND (Winbond W25N02KV)
WIFI:  Mediatek MT7986 DBDC 802.11ax 2.4/5 GHz
ETH:   MediaTek MT7531 Switch
       MaxLinear GPY211C 2.5 N-Base-T PHY
UART:  3V3 115200 8N1 (Pinout silkscreened / Do not ocnnect VCC)

Installation
------------

1. Download the OpenWrt initramfs image. Copy the image to a TFTP server
   reachable at 192.168.1.66/24. Rename the image to tufax4200.bin.

2. Connect the TFTP server to the AX4200. Conect to the serial console,
   interrupt the autoboot process by pressing '4' when prompted.

3. Download & Boot the OpenWrt initramfs image.

   $ setenv ipaddr 192.168.1.1
   $ setenv serverip 192.168.1.66
   $ tftpboot 0x46000000 tufax4200.bin
   $ bootm 0x46000000

4. Wait for OpenWrt to boot. Transfer the sysupgrade image to the device
   using scp and install using sysupgrade.

   $ sysupgrade -n <path-to-sysupgrade.bin>

Missing features
----------------

 - The LAN port LEDs are driven by the switch but OpenWrt does not
   correctly configure the output.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-03-24 20:30:29 +01:00
David Bauer 652d5ac152 mediatek: enable bootargs-override for filogic subtarget
The ASUS TUF-AX4200 bootloader adds invalid parameters for the rootfs.
Without overwriting the cmdline, the kernel crashes when trying to
attach the rootfs, as OpenWrt uses a different partition than the vendor
OS.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-03-24 20:30:29 +01:00
David Bauer 90691f4505 generic: mxl-gpy: allow configuring LED registers
Add a patch to allow modification of the PHY LED configuration. This is
required for boards, where the reset configuration of LED functions is
incompatibe with the usage of the device LEDs.

This is the case for the ASUS TUF-AX4200 Wireless router. It requires
modification of the LED configuration because as the WAN LED on the
front of the device is driven by the PHY. Without patching, it would
only illuminate in case the Link speed is 100 Mbit/s.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-03-24 20:30:29 +01:00
David Bauer 156c00dedc generic: backport Winbond W25N02KV SPI-NAND support
This flash-chip is used on the Asus TUF-AX4200 and TUF-AX6000 routers.

As the filogic target only uses kernel 5.15, skip the 5.10 backport.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-03-24 20:30:29 +01:00
Felix Fietkau 4ce0405e18 kernel: add support for threaded network backlog processing
This can improve load balancing by pushing backlog (and RPS) processing
to separate threads, allowing the scheduler to distribute the load.
It can be enabled with: echo 1 > /proc/sys/net/core/backlog_threaded

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-24 18:22:39 +01:00
David Bauer 47de2c6862 ramips: add support for Mercusys MR70X
Hardware
========
- SoC: MediaTek MT7621AT (880MHz, Duel-Core)
- RAM: DDR3 128MB
- Flash: Winbond W25Q128JV (SPI-NOR 16MB)
- WiFi: MediaTek MT7915D (2.4GHz, 5GHz, DBDC)
- Ethernet: MediaTek MT7530 (WAN x1, LAN x3, SoC)
- UART: >TX RX GND 3v3 (115200 8N1, J1)
        Do not connect 3v3. TX is marked with an arrow.

Installation
============
Flash factory image. This can be done using stock web ui.

Revert to stock firmware
========================
Flash stock firmware via OEM Web UI Recovery mode.

Web UI Recovery method
======================
1. Unplug the router
2. Plug in and hold reset button 5~10 secs
3. Set your computer IP address manually to 192.168.1.x / 255.255.255.0
4. Flash image with web browser to 192.168.1.1

Co-authored-by: Robert Senderek <robert.senderek@10g.pl>
Co-authored-by: Yoonji Park <koreapyj@dcmys.kr>
Signed-off-by: David Bauer <mail@david-bauer.net>
2023-03-24 15:32:57 +01:00
Álvaro Fernández Rojas 4dedcbdc80 bmips: sercomm,h500-s: add Quantenna network config
Sercomm H500-s has an external Quantenna QT3740BC SoC connected by RGMII.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-24 11:23:42 +01:00
Álvaro Fernández Rojas b88ae628cb kernel: add more dsa b53 pending patches
These patches have now received a positive review upstream, so let's add them
to pending patches.

776-net-dsa-b53-mmap-add-phy-ops.patch:
  This is mostly bmips/bcm63xx-specific to get external switches working
  without hanging the device when accessing certain registers.

777-net-dsa-b53-mdio-add-support-for-BCM53134:
  This adds support for BCM53134 switch on DSA B53, so any target using DSA B53
  can benefit from it.

Also fix sercomm-h500-s external switch IMP port phy-mode.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-24 11:23:42 +01:00
Felix Fietkau f84c94060f kernel: enable conntrack counter updates for iptables xt_FLOWOFFLOAD
Ensures that packet/byte counters in /proc/net/nf_conntrack are updated

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-24 10:15:23 +01:00
Felix Fietkau 808014c007 kernel: fix mediatek ppe flow accounting for mt7622 and older
v1 hardware uses a different enable bit for hardware counters

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-24 10:15:23 +01:00
Felix Fietkau be54fa2680 kernel: report mediatek ppe flow stats incrementally
Fixes wrong counter values in conntrack stats

Fixes: aa2777145f ("kernel: improve mtk ppe flow accounting")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-24 10:15:23 +01:00
Hauke Mehrtens af5aa11017 mpc85xx: Refresh patches
Make the patches apply cleanly again.

Fixes: ed82189339 ("mpc85xx: use bootwrapper for ws-ap3825i")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-03-24 00:42:47 +01:00
Hauke Mehrtens 93debecc88 ipq806x: Refresh patches
Make the patches apply cleanly again.

Fixes: a97965b7b1 ("kernel: add pending patches for bcm63268-timer-clocks")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-03-24 00:42:00 +01:00
Felix Fietkau aa2777145f kernel: improve mtk ppe flow accounting
Properly track L2 flows, and ensure that stale data gets cleared

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-23 17:54:18 +01:00
Felix Fietkau d0a06965e8 mediatek: add kernel code for supporting offloading wlan->eth and wlan->wlan flows
Will be enabled by an upcoming mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-23 17:54:18 +01:00
Felix Fietkau fbcfb7f7af kernel: update mtk ppe flow accounting patch to the latest version
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-23 17:54:18 +01:00
Felix Fietkau 07b550890c kernel: update flow offload fix based on upstream suggestions
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-23 17:54:18 +01:00
Álvaro Fernández Rojas f7c1631155 kernel: fix DSA B53 BCM63xx RGMII patch
Refreshing the patches for fff07085fb moved the b53_adjust_63xx_rgmii() call
from b53_phylink_mac_link_up() to b53_phylink_mac_link_down().
In order to properly configure the RGMII ports we need to restore it to its
correct place.

Fixes: fff07085fb ("kernel: add pending bmips patches")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-23 12:20:31 +01:00
Lech Perczak 0eebc6f0dd ath79: support Ruckus ZoneFlex 7341/7343/7363
Ruckus ZoneFlex 7363 is a dual-band, dual-radio 802.11n 2x2 MIMO enterprise
access point. ZoneFlex 7343 is the single band variant of 7363
restricted to 2.4GHz, and ZoneFlex 7341 is 7343 minus two Fast Ethernet
ports.

Hardware highligts:
- CPU: Atheros AR7161 SoC at 680 MHz
- RAM: 64MB DDR
- Flash: 16MB SPI-NOR
- Wi-Fi 2.4GHz: AR9280 PCI 2x2 MIMO radio with external beamforming
- Wi-Fi 5GHz: AR9280 PCI 2x2 MIMO radio with external beamforming
- Ethernet 1: single Gigabit Ethernet port through Marvell 88E1116R gigabit PHY
- Ethernet 2: two Fast Ethernet ports through Realtek RTL8363S switch,
  connected with Fast Ethernet link to CPU.
- PoE: input through Gigabit port
- Standalone 12V/1A power input
- USB: optional single USB 2.0 host port on the -U variants.

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

H1 ----------
   |1|x3|4|5|
   ----------

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

Installation:
- Using serial console - requires some disassembly, 3.3V USB-Serial
  adapter, TFTP server, and removing a single PH1 screw.

0. Connect serial console to H1 header. Ensure the serial converter
   does not back-power the board, otherwise it will fail to boot.

1. Power-on the board. Then quickly connect serial converter to PC and
   hit Ctrl+C in the terminal to break boot sequence. If you're lucky,
   you'll enter U-boot shell. Then skip to point 3.
   Connection parameters are 115200-8-N-1.

2. Allow the board to boot.  Press the reset button, so the board
   reboots into U-boot again and go back to point 1.

3. Set the "bootcmd" variable to disable the dual-boot feature of the
   system and ensure that uImage is loaded. This is critical step, and
   needs to be done only on initial installation.

   > setenv bootcmd "bootm 0xbf040000"
   > saveenv

4. Boot the OpenWrt initramfs using TFTP. Replace IP addresses as needed.
   Use the Gigabit interface, Fast Ethernet ports are not supported
   under U-boot:

   > setenv serverip 192.168.1.2
   > setenv ipaddr 192.168.1.1
   > tftpboot 0x81000000 openwrt-ath79-generic-ruckus_zf7363-initramfs-kernel.bin
   > bootm 0x81000000

5. Optional, but highly recommended: back up contents of "firmware" partition:

   $ ssh root@192.168.1.1 cat /dev/mtd1 > ruckus_zf7363_fw_backup.bin

6. Copy over sysupgrade image, and perform actual installation. OpenWrt
   shall boot from flash afterwards:

   $ ssh root@192.168.1.1
   # sysupgrade -n openwrt-ath79-generic-ruckus_zf7363-squashfs-sysupgrade.bin

   After unit boots, it should be available at the usual 192.168.1.1/24.

Return to factory firmware:

1. Copy over the backup to /tmp, for example using scp
2. Unset the "bootcmd" variable:
   fw_setenv bootcmd ""
3. Use sysupgrade with force to restore the backup:
   sysupgrade -F ruckus_zf7363_backup.bin
4. System will reboot.

Quirks and known issues:
- Fast Ethernet ports on ZF7363 and ZF7343 are supported, but management
  features of the RTL8363S switch aren't implemented yet, though the
  switch is visible over MDIO0 bus. This is a gigabit-capable switch, so
  link establishment with a gigabit link partner may take a longer time
  because RTL8363S advertises gigabit, and the port magnetics don't
  support it, so a downshift needs to occur. Both ports are accessible
  at eth1 interface, which - strangely - runs only at 100Mbps itself.
- Flash layout is changed from the factory, to use both firmware image
  partitions for storage using mtd-concat, and uImage format is used to
  actually boot the system, which rules out the dual-boot capability.
- Both radio has its own EEPROM on board, not connected to CPU.
- The stock firmware has dual-boot capability, which is not supported in
  OpenWrt by choice.
  It is controlled by data in the top 64kB of RAM which is unmapped,
  to avoid the interference in the boot process and accidental
  switch to the inactive image, although boot script presence in
  form of "bootcmd" variable should prevent this entirely.
- On some versions of stock firmware, it is possible to obtain root shell,
  however not much is available in terms of debugging facitilies.
  1. Login to the rkscli
  2. Execute hidden command "Ruckus"
  3. Copy and paste ";/bin/sh;" including quotes. This is required only
     once, the payload will be stored in writable filesystem.
  4. Execute hidden command "!v54!". Press Enter leaving empty reply for
     "What's your chow?" prompt.
  5. Busybox shell shall open.
  Source: https://alephsecurity.com/vulns/aleph-2019014
- There is second method to achieve root shell, using command injection
  in the web interface:
  1. Login to web administration interface
  2. Go to Administration > Diagnostics
  3. Enter |telnetd${IFS}-p${IFS}204${IFS}-l${IFS}/bin/sh into "ping"
     field
  4. Press "Run test"
  5. Telnet to the device IP at port 204
  6. Busybox shell shall open.
  Source: https://github.com/chk-jxcn/ruckusremoteshell

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2023-03-22 22:25:08 +01:00
Lech Perczak 694b8e6521 ath79: support Ruckus ZoneFlex 7351
Ruckus ZoneFlex 7351 is a dual-band, dual-radio 802.11n 2x2 MIMO enterprise
access point.

Hardware highligts:
- CPU: Atheros AR7161 SoC at 680 MHz
- RAM: 64MB DDR
- Flash: 16MB SPI-NOR
- Wi-Fi 2.4GHz: AR9280 PCI 2x2 MIMO radio with external beamforming
- Wi-Fi 5GHz: AR9280 PCI 2x2 MIMO radio with external beamforming
- Ethernet: single Gigabit Ethernet port through Marvell 88E1116R gigabit PHY
- Standalone 12V/1A power input
- USB: optional single USB 2.0 host port on the 7351-U variant.

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

H1 ----------
   |1|x3|4|5|
   ----------

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

Installation:
- Using serial console - requires some disassembly, 3.3V USB-Serial
  adapter, TFTP server, and removing a single T10 screw.

0. Connect serial console to H1 header. Ensure the serial converter
   does not back-power the board, otherwise it will fail to boot.

1. Power-on the board. Then quickly connect serial converter to PC and
   hit Ctrl+C in the terminal to break boot sequence. If you're lucky,
   you'll enter U-boot shell. Then skip to point 3.
   Connection parameters are 115200-8-N-1.

2. Allow the board to boot.  Press the reset button, so the board
   reboots into U-boot again and go back to point 1.

3. Set the "bootcmd" variable to disable the dual-boot feature of the
   system and ensure that uImage is loaded. This is critical step, and
   needs to be done only on initial installation.

   > setenv bootcmd "bootm 0xbf040000"
   > saveenv

4. Boot the OpenWrt initramfs using TFTP. Replace IP addresses as needed:

   > setenv serverip 192.168.1.2
   > setenv ipaddr 192.168.1.1
   > tftpboot 0x81000000 openwrt-ath79-generic-ruckus_zf7351-initramfs-kernel.bin
   > bootm 0x81000000

5. Optional, but highly recommended: back up contents of "firmware" partition:

   $ ssh root@192.168.1.1 cat /dev/mtd1 > ruckus_zf7351_fw_backup.bin

6. Copy over sysupgrade image, and perform actual installation. OpenWrt
   shall boot from flash afterwards:

   $ ssh root@192.168.1.1
   # sysupgrade -n openwrt-ath79-generic-ruckus_zf7351-squashfs-sysupgrade.bin

   After unit boots, it should be available at the usual 192.168.1.1/24.

Return to factory firmware:
1. Copy over the backup to /tmp, for example using scp
2. Unset the "bootcmd" variable:
   fw_setenv bootcmd ""
3. Use sysupgrade with force to restore the backup:
   sysupgrade -F ruckus_zf7351_backup.bin
4. System will reboot.

Quirks and known issues:
- Flash layout is changed from the factory, to use both firmware image
  partitions for storage using mtd-concat, and uImage format is used to
  actually boot the system, which rules out the dual-boot capability.
- Both radio has its own EEPROM on board, not connected to CPU.
- The stock firmware has dual-boot capability, which is not supported in
  OpenWrt by choice.
  It is controlled by data in the top 64kB of RAM which is unmapped,
  to avoid the interference in the boot process and accidental
  switch to the inactive image, although boot script presence in
  form of "bootcmd" variable should prevent this entirely.
- On some versions of stock firmware, it is possible to obtain root shell,
  however not much is available in terms of debugging facitilies.
  1. Login to the rkscli
  2. Execute hidden command "Ruckus"
  3. Copy and paste ";/bin/sh;" including quotes. This is required only
     once, the payload will be stored in writable filesystem.
  4. Execute hidden command "!v54!". Press Enter leaving empty reply for
     "What's your chow?" prompt.
  5. Busybox shell shall open.
  Source: https://alephsecurity.com/vulns/aleph-2019014
- There is second method to achieve root shell, using command injection
  in the web interface:
  1. Login to web administration interface
  2. Go to Administration > Diagnostics
  3. Enter |telnetd${IFS}-p${IFS}204${IFS}-l${IFS}/bin/sh into "ping"
     field
  4. Press "Run test"
  5. Telnet to the device IP at port 204
  6. Busybox shell shall open.
  Source: https://github.com/chk-jxcn/ruckusremoteshell

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2023-03-22 22:25:08 +01:00
Tony Butler 889bbf89bb ramips: mt7621: enable lzma-loader for AFOUNDRY EW1200
Fixes boot loader LZMA decompression issues (LZMA ERROR 1)
As reported in issue #12208

Reported-by: Raúl M. <raul.m@sparkedhost.com>
Tested-by: Raúl M. <raul.m@sparkedhost.com>
Signed-off-by: Tony Butler <spudz76@gmail.com>
2023-03-22 22:05:51 +01:00
Álvaro Fernández Rojas 6df12200d9 bmips: add support for Sercomm H-500s
Sercomm H-500s is a BCM63268 with 128M, internal and external (Quantenna) wifi
and external BCM53134S switch.
This device is already supported in bcm63xx target, so more information can be
found in https://openwrt.org/toh/sercomm/h500-s.

It's a perfect example of a device with internal and external switch
coexistance since most devices only have ports on one of the switches but not
both of them.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-22 20:57:07 +01:00
Álvaro Fernández Rojas cc07d1d2fd bmips: drop unneded cpu labels from external switches
These labels aren't needed and were accidentally added when adding external
switches support for bmips.

Fixes: 80a3ecc894 ("bmips: add Huawei HG253s v2 support")
Fixes: 61f3c3b1ee ("bmips: dgnd3700v2: enable external BCM53125 switch")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-22 18:31:31 +01:00
Álvaro Fernández Rojas a97965b7b1 kernel: add pending patches for bcm63268-timer-clocks
bcm63268-timer-clocks have been sent upstream with a positive review, so let's
add them to pending v5.15.
Also add devm_clk_hw_register_gate() patch from v5.17 to backports since it's
needed for upstream bcm63268-timer-clocks patches.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-22 18:31:31 +01:00
Álvaro Fernández Rojas 68883278ab bmips: dts: nand: add missing address/size cells
Fixes the following warnings for Netgear DGND3700v2 and Comtrend VR-3032u:
[    1.059540] 7 fixed-partitions partitions found on MTD device brcmnand.0
[    1.066570] OF: Bad cell count for /ubus/nand@10000200/nandcs@0/partitions
[    1.073766] OF: Bad cell count for /ubus/nand@10000200/nandcs@0/partitions
[    1.081927] OF: Bad cell count for /ubus/nand@10000200/nandcs@0/partitions
[    1.089128] OF: Bad cell count for /ubus/nand@10000200/nandcs@0/partitions

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-21 20:49:21 +01:00
Álvaro Fernández Rojas 80a3ecc894 bmips: add Huawei HG253s v2 support
Huawei HG253s v2 is a BCM6362 with 128M RAM, internal wifi and external
BCM53124S switch.
This device is already supported in bcm63xx target, so more information can be
found in https://openwrt.org/toh/huawei/hg253s_v2.

It's a perfect example of a device with internal and external switch
coexistance since most devices only have ports on one of the switches but not
both of them.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-21 20:49:18 +01:00
Álvaro Fernández Rojas 61f3c3b1ee bmips: dgnd3700v2: enable external BCM53125 switch
The Netgear DGND3700v2 has an external BCM53125 switch which can now be enabled
as a DSA disjoint switch tree setup.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-21 19:45:20 +01:00
Álvaro Fernández Rojas 82dc16fde0 bmips: disable B53 MMAP phy read/write ops
Without this change, internal and external B53 switches couldn't coexist as
reported in https://github.com/openwrt/openwrt/issues/10313.
In order to fix this we need to force the B53 MMAP DSA switch driver to use
bcm6368-mdio-mux for accessing the PHY registers instead of its own phy_read()
and phy_write() functions.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-21 19:36:16 +01:00
Álvaro Fernández Rojas c6eb099db9 kernel: update pending b53 mmap patches
Update B53 MMAP pending patches to the latest version sent upstream.
Fixes regression in bmips BCM63268 switches.

Fixes: fff07085fb ("kernel: add pending bmips patches")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-21 19:28:38 +01:00
Robert Marko eb564690c9 ipq40xx: add support for Wallystech DR40x9
Adds support for the Wallys DR40x9 series boards.
They come in IPQ4019 and IPQ4029 versions.
IPQ4019/4029 only differ in that that IPQ4029 is the industrial version that is rated to higher temperatures.

Specifications are:
* CPU: Qualcomm IPQ40x9 (4x ARMv7A Cortex A7) at 716 MHz
* RAM: 512 MB
* Storage: 2MB of SPI-NOR, 128 MB of parallel NAND
* USB 3.0 TypeA port for users
* MiniPCI-E with PCI-E 2.0 link
* MiniPCI-E for LTE modems with only USB2.0 link
* 2 SIM card slots that are selected via GPIO11
* MicroSD card slot
* Ethernet: 2x GBe with 24~48V passive POE
* SFP port (Does not work, I2C and GPIO's not connected on hardware)
* DC Jack
* UART header
* WLAN: In-SoC 2x2 802.11b/g/n and 2x2 802.11a/n/ac
* 4x MMCX connectors for WLAN
* Reset button
* 8x LED-s

Installation instructions:
Connect to UART, pins are like this:
-> 3.3V | TX | RX | GND

Settings are 115200 8n1

Boot initramfs from TFTP:
tftpboot 0x84000000 openwrt-ipq40xx-generic-wallys_dr40x9-initramfs-fit-uImage.itb

bootm

Then copy the sysupgrade image to the /tmp folder and execute sysupgrade -n <image_name>

The board file binary was provided from Wallystech on March 14th 2023
including full permission to use and distribute.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
2023-03-21 16:38:23 +01:00
Koen Vandeputte fe69010b1d kernel: add missing symbols in 5.15
Found these while playing around with video support

Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
2023-03-21 16:38:23 +01:00
Rafał Miłecki e026a65af1 kernel: backport eth_addr_add()
It's required by upcoming NVMEM layout drivers.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-03-21 06:16:50 +01:00
David Bauer d52870125d ramips: fix Archer AX23 WiFi MAC address conflict
The original claim about conflicting MAC addresses is wrong. mac80211
does increment the first octet and sets the LA bit.

This means our "workaround" actually leads to the issue while
incrementing the last octet is safe.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-03-21 05:10:03 +01:00
Óscar García Amor ca330cac92 ramips: cudy wr1300v2 reduce SPI freq to 40000000
Cases have been reported in which certain devices do not boot correctly
or have errors. After various tests by users who have such errors it has
been concluded that the SPI frequency should be reduced to 40Mhz, at
this speed it appears that all devices work correctly.

Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2023-03-20 23:48:08 +01:00
John Audia 3ca9849589 kernel: bump 5.10 to 5.10.175
Manually rebased:
	backport-5.10/611-v5.12-net-ethernet-mediatek-support-setting-MTU.patch

Removed upstreamed:
	bcm47xx/patches-5.10/170-bgmac-fix-initial-chip-reset-to-support-BCM5358.patch[1]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.175&id=cbf11ff3708ff163387da924f80a47ce7c721e9b

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-03-20 22:44:28 +01:00
John Audia d4aad642ff kernel: bump 5.10 to 5.10.173
Manually rebased:
        ramips/patches-5.10/810-uvc-add-iPassion-iP2970-support.patch

All other patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-03-20 22:44:28 +01:00
John Audia bd2103e9bc kernel: tcindex classifier has been retired
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/net/sched?h=v5.10.173&id=18c3fa7a7fdbb4d21dafc8a7710ae2c1680930f6

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-03-20 22:44:28 +01:00
John Audia 0c5ffe1ab2 x86: fix deprecated CONFIG_MICROCODE_OLD_INTERACE
We use late loading[1] so need to set this option despite upstream adding a
kernel taint when this option is set.  See discussion in PR#12149 for more details.

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/Kconfig?id=v5.10.173&id2=v5.10.172

1. https://github.com/openwrt/openwrt/blob/master/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-03-20 22:44:20 +01:00
David Bauer cff40ef122 mpc85xx: poll PHY status
Disable interrupts for the eth-PHYs, as the interrupts are either not
firing or lost within the stack. Switch to polling the PHY status in the
meantime until a proper fix is implemented.

Ref: https://github.com/openwrt/openwrt/issues/12192

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-03-20 22:21:31 +01:00
David Bauer ed82189339 mpc85xx: use bootwrapper for ws-ap3825i
The boot-procedure for the Extreme WS-AP3825I is vfragile to put it
mildly. It does not relocate the FDT properly. It currently exercises
every step manually as well as coming with a pre-padded dtb.

Use the PowerPC bootwrapper code for legacy platforms with a pre-filles
DTS instead. We still need to ship a fit image to not break the fdt
resize / relocate instructions on existing boards. This does not require
adapting the U-Boot bootcommand.

Ref: https://github.com/openwrt/openwrt/issues/12223

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-03-20 22:21:22 +01:00
Lorenzo Bianconi e314f7be7e mediatek: filogic: move ilm, dlm and cpu_boot in dedicated nodes
This fixes issues with legacy boot loaders that don't process reserved memory
regions outside of system RAM

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-20 21:28:19 +01:00
Felix Fietkau 1d8baafc43 kernel: move mediatek flow offload refcount fix and fix a logic error
Move it to pending, since it wasn't actually accepted upstream yet.
Fixes potential issues when doing offload between multiple MACs.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-20 21:28:19 +01:00
Álvaro Fernández Rojas 82ce340384 bmips: dts: fix switch compatible strings
Use the proper string for each SoC.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-20 19:55:24 +01:00
Álvaro Fernández Rojas fff07085fb kernel: add pending bmips patches
Add patches sent upstream for bmips and b53 and remove downstream ones.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-20 19:51:53 +01:00
Alexandru Gagniuc 7801161c4b ipq807x: add support for Netgear WAX218
Netgear WAX218 is a 802.11ax AP claiming AX3600 support. It is wall
or ceiling mountable. It can be powered via PoE, or a 12 V adapter.

The board has footprints for 2.54mm UART headers. They're difficult to
solder because the GND is connected to a large copper plane. Only try
soldering if you are very skilled. Otherwise, use pogo pins.

Specifications:
---------------
    * CPU: Qualcomm IPQ8072A Quad core Cortex-A53 2.2GHz
    * RAM: 366 MB of RAM available to OS, not sure of total amount
    * Storage: Macronix MX30UF2G18AC 256MB NAND
    * Ethernet:
            * 2.5G RJ45 port (QCA8081) with PoE input
    * WLAN:
            * 2.4GHz/5GHz with 8 antennas
    * LEDs:
            * Power (Amber)
            * LAN (Blue)
            * 2G WLAN (Blue)
            * 5G WLAN (Blue)
    * Buttons:
            * 1x Factory reset
    * Power: 12V DC Jack
    * UART: Two 4-pin unpopulated headers near the LEDs
            * "J2 UART" is the CPU UART, 3.3 V level

Installation:
=============

Web UI method
-------------

Flashing OpenWRT using the vendor's Web UI is problematic on this
device. The u-boot mechanism for communicating the active rootfs is
antiquated and unreliable. Instead of setting the kernel commandline,
it relies on patching the DTS partitions of the nand node. The way
partitions are patched is incompatible with newer kernels.

Newer kernels use the SMEM partition table, which puts "rootfs" on
mtd12. The vendor's Web UI will flash to either mtd12 or mtd14. One
reliable way to boot from mtd14 and avoid boot loops is to use an
initramfs image.

 1. In the factory web UI, navigate to System Manager -> Firmware.
 2. In the "Local Firmware Upgrade" section, click Browse
 3. Navigate and select the 'web-ui-factory.fit' image
 4. Click "Upload"
 5. On the following page, click on "Proceed"

The flash proceeds at this point and the system will reboot
automatically to OpenWRT.

 6. Flash the 'nand-sysupgrade.bin' using Luci or the commandline

SSH method
----------

Enable SSH using the CLI or Web UI. The root account is locked out to
ssh, and the admin account defaults to Netgear's CLI application.
So we need to get creative:

First, make sure the device boots from the second firmware partition:

    ssh -okexalgorithms=diffie-hellman-group14-sha1 admin@<ipaddr> \
        /usr/sbin/fw_setenv active_fw 1

Then reboot the device, and run the update:

    scp -O -o kexalgorithms=diffie-hellman-group14-sha1 \
        -o hostkeyalgorithms=ssh-rsa \
        netgear_wax218-squashfs-nand-factory.ubi \
        admin@<ipaddr>:/tmp/openwrt.ubi

    ssh -okexalgorithms=diffie-hellman-group14-sha1 admin@<ipaddr> \
        /usr/sbin/ubiformat /dev/mtd12 -f /tmp/openwrt.ubi

    ssh -okexalgorithms=diffie-hellman-group14-sha1 admin@<ipaddr> \
        /usr/sbin/fw_setenv active_fw 0

Now reboot the device, and it should boot into a ready-to-use OpenWRT.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
Tested-by: Francisco G Luna <frangonlun@gmail.com>
2023-03-20 11:40:36 -05:00
David Bauer 00b40ef00d mpc85xx: fix incorrect kernel target
The wrapper-image for the WL-WDR4900 was used as a build-target for the
kernel. This workd fine as long as only a single wrapper is used with
the OpenWrt build-system.

If additional wrappers are used, the build becomes racy in the
wrapper-stage.

The wrapper images actually do not represent a target. They are built
based on the kernel configuration. Only copy the resulting images to
avoid race-conditions as explained.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-03-20 03:10:43 +01:00
David Bauer aa4a9058fb mpc85xx: remove Watchguard T10 MAC override
As the mac-address readout never worked, the mac-address fillout by the
bootloader is sufficient. Remove the readout for the Watchguard T10
then.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-03-20 03:10:36 +01:00
David Bauer fa168f521a mpc85xx: fix missing system import
The mac-address accessor functions were not included in the sourced
script. Fix this by importing the correct script path.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-03-20 03:10:30 +01:00
Hauke Mehrtens b844716158 kernel: Add CONFIG_KERNEL_HARDLOCKUP_DETECTOR
Make it possible to change the kernel configuration option
CONFIG_HARDLOCKUP_DETECTOR from OpenWrt.

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
2023-03-19 18:44:46 +01:00
Hauke Mehrtens 0f5ba14791 kernel: Deactivate options shown with CONFIG_KERNEL_KCOV=y
This sets the CONFIG_KCOV_IRQ_AREA_SIZE kernel configuration option to its default value.
This is shown when I set CONFIG_KERNEL_KCOV=y in the OpenWrt configuration on x86/64.

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
2023-03-19 18:44:46 +01:00
Hauke Mehrtens 2213bf5e83 kernel: Deactivate options shown with CONFIG_KERNEL_KASAN=y
This deactivates some kernel configuration options I see when
CONFIG_KERNEL_KASAN=y is set in the OpenWrt configuration on x86/64.

Set CONFIG_STACK_HASH_ORDER to its default value.

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
2023-03-19 18:44:46 +01:00
Hauke Mehrtens 85661be9df kernel: Set some options to default shown with CONFIG_KERNEL_UBSAN=y
This sets some kernel configuration options to their default values. I saw
these as warnings when I set CONFIG_KERNEL_UBSAN=y is set in the OpenWrt
configuration on x86/64.

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
2023-03-19 18:44:46 +01:00
Hauke Mehrtens 2d5b761838 kernel: Deactivate options shown with CONFIG_KERNEL_DYNAMIC_FTRACE=y
This deactivates some kernel configuration options I see when
CONFIG_KERNEL_DYNAMIC_FTRACE=y is set in the OpenWrt configuration on x86/64.

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
2023-03-19 18:44:46 +01:00
Hauke Mehrtens e291a38d7f kernel: Deactivate options shown with CONFIG_KERNEL_HIST_TRIGGERS=y
This deactivates some kernel configuration options I see when
CONFIG_KERNEL_HIST_TRIGGERS=y is set in the OpenWrt configuration on x86/64.

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
2023-03-19 18:44:46 +01:00
Hauke Mehrtens e850045c76 kernel: Deactivate options shown with CONFIG_KERNEL_DEBUG_VIRTUAL=y
This deactivates some kernel configuration options I see when
CONFIG_KERNEL_DEBUG_VIRTUAL=y is set in the OpenWrt configuration on x86/64.

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
2023-03-19 18:44:46 +01:00
Hauke Mehrtens 582f6fb8cd kernel: Deactivate options shown with CONFIG_KERNEL_DEBUG_VM=y
This deactivates some kernel configuratoion options I see when
CONFIG_KERNEL_DEBUG_VM=y is set in the OpenWrt configuration on x86/64.

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
2023-03-19 18:44:46 +01:00
Kristjan Krušič f574b535eb
ipq806x: add support for Nokia Airscale AC400i
Hardware
--------

SoC:    Qualcomm IPQ8065
RAM:    512 MB DDR3
Flash:  256 MB NAND (Macronix MX30UF2G18AC) (split into 2x128MB)
        4 MB SPI-NOR (Macronix MX25U3235F)
WLAN:   Qualcomm Atheros QCA9984 - 2.4Ghz
        Qualcomm Atheros QCA9984 - 5Ghz
ETH:    eth0 - POE (100Mbps in U-Boot, 1000Mbps in OpenWrt)
        eth1 - (1000Mbps in both)
        Auto-negotiation broken on both.
USB:    USB 2.0
LED:    5G, 2.4G, ETH1, ETH2, CTRL, PWR (All support green and red)
BTN:    Reset
Other:  SD card slot (non-functional)
Serial: 115200bps, near the Ethernet transformers, labeled 9X.
        Connections from the arrow to the 9X text:
		[NC] - [TXD] - [GND] - [RXD] - [NC]

Installation
------------

0. Connect to the device
Plug your computer into LAN2 (1000Mbps connection required).
If you use the LAN1/POE port, set your computer to force a 100Mbps link.

Connect to the device via TTL (Serial) 115200n8.
Locate the header (or solder pads) labeled 9X,
near the Ethernet jacks/transformers.
There should be an arrow on the other side of the header marking.
The connections should go like this:
(from the arrow to the 9X text): NC - TXD - GND - RXD - NC

1. Prepare for installation
While the AP is powering up, interrupt the startup process.
MAKE SURE TO CHECK YOUR CURRENT PARTITION!

If you see: "Current Partition is : partB" or
"Need to switch partition from partA to partB",
you have to force the device into partA mode, before continuing.
This can be done by changing the PKRstCnt to 5 and resetting the device.

setenv PKRstCnt 5
saveenv
reset

After you interrupt the startup process again,
you should see: Need to switch partition from partB to partA

You can now continue to the next step.

If you see: "Current Partition is : partA",
you can continue to the next step.

2. Prevent partition switching.
To prevent the device from switching partitions,
we are going to modify the startup command.
set bootcmd "setenv PKRstCnt 0; saveenv; bootipq"
setenv

3. First boot
Now, we have to boot the OpenWrt intifs.
The easiest way to do this is by using Tiny PXE.
You can also use the normal U-Boot tftp method.

Run "bootp" this will get an IP from the DHCP server
and possibly the firmware image.
If it doesn't download the firmware image, run "tftpboot".

Now run "bootm" to run the image.

You might see:
"ERROR: new format image overwritten - must RESET the board to recover"
this means that the image you are trying to load is too big.
Use a smaller image for the initial boot.

4. Install OpenWrt from initfs
Once you are booted into OpenWrt,
transfer the OpenWrt upgrade image and
use sysupgrade to install OpenWrt to the device.

Signed-off-by: Kristjan Krušič <kristjan.krusic@krusic22.com>
2023-03-19 18:02:34 +01:00
Aleksander Jan Bajkowski a32def781f lantiq: xway: add phy reset pin to AVM Fritz!Box 7320
This commit adds the PHY reset gpio for the LAN1 port to the dts.
According to the GPL sources, gpios 34 and 36 are used on the AVM
FritzBox 7320 and 7330. The second port is unsupported.

The gpio assignment has been verified on the FritzBox 7330.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2023-03-19 17:11:09 +01:00
Christian Marangi 4bfbecbd9a
ipq40xx: mf18a: rename wifi0 calibration variant to ZTE-MF18A
Rename wifi0 calibration variant to ZTE-MF18A to allign to BDF changes
for ZTE MF18A.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-03-18 12:47:48 +01:00
Christian Marangi 13fefc54fc
ipq40xx: rutx10: Add missing variant to ath10k wifi
Add missing variant to ath10k wifi to allign to BDF changes for
Teltonika RUTX10.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-03-18 12:03:50 +01:00
Christian Marangi 66c4c2f023
ipq40xx: mf18a: Add missing variant to PCI ath10k card
Add missing variant to PCI ath10k card to allign to BDF changes for
ZTE MF18A.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-03-18 12:03:50 +01:00
John Audia d6d8851d12 kernel: bump 5.15 to 5.15.100
Manually rebased:
        bcm27xx/patches-5.15/950-0421-Support-RPi-DPI-interface-in-mode6-for-18-bit-color.patch
        bcm27xx/patches-5.15/950-0706-media-i2c-imx219-Scale-the-pixel-clock-rate-for-the-.patch
        ramips/patches-5.15/810-uvc-add-iPassion-iP2970-support.patch

Removed upstreamed:
        bcm27xx/patches-5.15/950-0707-drm-vc4-For-DPI-MEDIA_BUS_FMT_RGB565_1X16-is-mode-1-.patch[1]
        bcm27xx/patches-5.15/950-0596-drm-vc4-dpi-Add-option-for-inverting-pixel-clock-and.patch[2]
        ipq807x/0006-v5.16-arm64-dts-qcom-Fix-IPQ8074-PCIe-PHY-nodes.patch [3]
        ipq807x/0034-v6.1-arm64-dts-qcom-ipq8074-fix-PCIe-PHY-serdes-size.patch [4]
        ipq807x/0103-arm64-dts-qcom-ipq8074-fix-Gen2-PCIe-QMP-PHY.patch [5]
        ipq807x/0104-arm64-dts-qcom-ipq8074-fix-Gen3-PCIe-QMP-PHY.patch [6]
        ipq807x/0105-arm64-dts-qcom-ipq8074-correct-Gen2-PCIe-ranges.patch [7]
        ipq807x/0108-arm64-dts-qcom-ipq8074-fix-Gen3-PCIe-node.patch [8]
        ipq807x/0109-arm64-dts-qcom-ipq8074-correct-PCIe-QMP-PHY-output-c.patch [9]
        ipq807x/0132-arm64-dts-qcom-ipq8074-correct-USB3-QMP-PHY-s-clock-.patch [10]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.99&id=d2991e6b30020e286f2dd9d3b4f43548c547caa6
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/gpu/drm/vc4/vc4_dpi.c?h=v5.15.100&id=8e04aaffb6de5f1ae61de7b671c1531172ccf429
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=a55a645aa303a3f7ec37db69822d5420657626da
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=d9df682bcea57fa25f37bbf17eae56fa05662635
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=7e6eeb5fb3aa9e5feffdb6e137dcc06f5f6410e1
6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=e88204931d9a60634cd50bbc679f045439c4b91d
7.  https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=1563af0f28afd3b6d64ac79a2aecced3969c90bf
8. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=feb8c71f015d416f1afe90e1f62cf51e47376c67
9. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=69c7a270357a7d50ffd3471b14c60250041200e3
10. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=dd3d021ae5471d98adf81f1e897431c8657d0a18

Build system: x86_64
Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3
Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
Tested-by: Robert Marko <robimarko@gmail.com> #ipq807x/Dynalink WRX36
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> #ipq807x/ax3600, x86_64/FW-7543B, ath79/tl-wdr3600, ipq806x/g10, ipq806x/nbg6817
2023-03-18 12:52:17 +01:00
John Audia fbfec3286e kernel: tcindex classifier has been retired
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/net/sched?h=v5.15.100&id=7c183dc0af472dec33d2c0786a5e356baa8cad19

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-03-18 12:48:27 +01:00
John Audia 4692cffeaa x86: set deprecated CONFIG_MICROCODE_OLD_INTERACE
We use late loading[1] so need to set this option despite upstream adding a
kernel taint when this option is set.  See discussion in PR#12149 for more details.

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/Kconfig?id=v5.15.100&id2=v5.15.98

1. https://github.com/openwrt/openwrt/blob/master/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-03-18 12:48:27 +01:00
Eneas U de Queiroz 4662adef2a
uencrypt: add support for mbedtls
This commit includes some additional changes:
 - better handling of iv and keys in openssl/wolfssl variants
 - fix compiler warnings and whitespace
 - build all 3 variants as separate packages
 - adjust the new package name in targets' DEVICE_PACKAGES
 - remove PKG_FLAGS:=nonshared

[Beeline SmartBox Flash - OK]
Tested-by: Mikhail Zhilkin <csharper2005@gmail.com>
[after test: replaced a hardcoded IV size of 16 by cipher_info->iv_size]
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2023-03-17 17:22:53 -03:00
Rafał Miłecki 6ac6f2402d kernel: update v6.3 of patches
1. Use final (accepted) patches
2. Add two more required for v6.4 nvmem stuff

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-03-17 16:47:09 +01:00
Mantas Pucka d7ba312a14
ipq40xx: update Crisis Innovation Lab MeshPoint.One BDF
Make sure it uses updated Jalapeno BDF inherited from
Device/8dev_jalapeno-common

Fixes: 146eb4925c ("ipq40xx: add support for Crisis Innovation Lab MeshPoint.One")
Signed-off-by: Mantas Pucka <mantas@8devices.com>
[ fix Fixes tag to correct format and fix commit title ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-03-17 14:37:17 +01:00
Mantas Pucka fce0379d30
ipq40xx: set specific BDF file for 8devices Habanero/Jalapeno
Set specific BDF file for 8devices Habanero/Jalapeno in ipq40xx
generic.mk

Signed-off-by: Mantas Pucka <mantas@8devices.com>
[ split ipq40xx changes in separate commit ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-03-17 14:35:52 +01:00
Paul Spooren 513d15cb79 layerscape: switch to Kernel 5.15 by default
Getting ready for the next release.

Tested-by: Pawel Dembicki <paweldembicki@gmail.com>
Signed-off-by: Paul Spooren <mail@aparcar.org>
2023-03-17 12:20:24 +01:00
Rafał Miłecki 86cf0f93f1 bcm4908: add HVC workaround for booting kernel 5.15
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-03-16 23:34:56 +01:00
Rafał Miłecki cb2661844a bcm4908: include usbport trigger
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-03-16 22:02:25 +01:00
Rafał Miłecki ffaabee9b8 bcm4908: backport v6.4 pending DTS changes
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-03-16 22:02:25 +01:00
Álvaro Fernández Rojas c2836c4d27 bmips: tweak Kconfig options
Add patch to reduce and improve selected bmips kernel config options.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-16 20:49:47 +01:00
Álvaro Fernández Rojas 9fc98b1956 bmips: irq-bcm6345-l1: register memory region
Add new patch sent upstream for requesting the memory region in the bcm6345-l1
interrupt controller.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-16 20:49:47 +01:00
Álvaro Fernández Rojas 8d0c254651 bmips: update patches sent upstream
Update bmips patches with the latest version sent upstream

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-16 20:49:47 +01:00
David Bauer 7dceef5ee5 ramips: add support for TP-Link Archer AX23 v1
Hardware
--------
CPU:    MediaTek MT7621 DAT
RAM:    128MB DDR3 (integrated)
FLASH:  16MB SPI-NOR ()
WiFi:   MediaTek MT7905 + MT7975 (2.4 / 5 DBDC) 802.11ax
SERIAL: 115200 8N1
        LEDs - (3V3 - GND - RX - TX) - ETH ports

Installation
------------

Upload the factory image using the Web-UI.

Web-Recovery
------------

The router supports a HTTP recovery mode by holding the reset-button
when powering on. The interface is reachable at 192.168.0.1 and supports
installation using the factory image.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-03-15 01:44:29 +01:00
Paul Spooren 7b7edd25a5 imagebuilder: allow to specific ROOTFS_PARTSIZE
Setting this options modifies the rootfs size of created images. When
installing a large number of packages it may become necessary to
increase the size to have enough storage.

This option is only useful for supported devices, i.e. with an attached
SD Card or installed on a hard drive.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2023-03-14 19:00:47 +01:00
Paul Spooren 61a07ea68d realtek: switch to Kernel 5.15 by default
Getting ready for the next release.

Tested-by: Sander Vanheule <sander@svanheule.net>
Tested-by: Olliver Schinagl <oliver@schinagl.nl>
Tested-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: Paul Spooren <mail@aparcar.org>
2023-03-14 18:47:00 +01:00
Lech Perczak a7a3de5edb ath79: fix user LED glow on Mikrotik 911 Lite boards
GPIO3, to which the user LED is connected on RB911-Lite boards seems to
still sink current, even when driven high. Enabling open drain for this
pin fixes this behaviour and gets rid of the glow when LED is set to
off, so enable it.

Fixes: 43c7132bf8 ("ath79: add support for MikroTik RouterBOARD 911 Lite2/Lite5")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2023-03-12 14:00:26 +01:00
David Bauer 14334c222e ath79: refactor devolo WiFi pro image definitions
Reuse common parts for the devolo WiFi pro series. The series is
discontinued and we support all existing devices, so changes due to new
revisions or models are highly unlikely

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-03-10 02:31:50 +01:00
Álvaro Fernández Rojas 89390a9e50 bmips: dts: fix warnings
- Add missing interrupt-parent to ext_intc.
- Add missing #address-cells and #size-cells to gpio_cntl.
- Use proper gpio handle for gpios (ar-5315u).

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-09 19:05:30 +01:00
INAGAKI Hiroshi 102dc5a625 mvebu: add support for Fortinet FortiGate 50E
Fortinet FortiGate 50E (FG-50E) is a UTM, based on Armada 385 (88F6820).

Specification:

- SoC          : Marvell Armada 385 88F6820
- RAM          : DDR3 2 GiB (4x Micron MT41K512M8DA-107, "D9SGQ")
- Flash        : SPI-NOR 128 MiB (Macronix MX66L1G45GMI-10G)
- Ethernet     : 7x 10/100/1000 Mbps
  - LAN 1-5    : Marvell 88E6176
  - WAN 1, 2   : Marvell 88E1512 (2x)
- LEDs/Keys    : 18x/1x
- UART         : "CONSOLE" port (RJ-45, RS-232C level)
  - port       : ttyS0
  - settings   : 9600bps 8n1
  - assignment : 1:NC , 2:NC , 3:TXD, 4:GND,
                 5:GND, 6:RXD, 7:NC , 8:NC
  - note       : compatible with Cisco console cable
- HW Monitoring: nuvoTon NCT7802Y
- Power        : 12 VDC, 2 A
  - plug       : Molex 5557-02R

Flash instruction using initramfs image:

1. Power on FG-50E and interrupt to show bootmenu
2. Call "[R]: Review TFTP parameters.", check TFTP parameters and
   connect computer to "Image download port" in the parameters
3. Prepare TFTP server with the parameters obtained above
4. Rename OpenWrt initramfs image to "image.out" and put to TFTP
   directory
5. Call "[T]: Initiate TFTP firmware transfer." to download initramfs
   image from TFTP server
6. Type "r" key when the following message is showed, to boot initramfs
   image without flashing to spi-nor flash

   "Save as Default firmware/Backup firmware/Run image without saving:[D/B/R]?"

7. On initramfs image, backup mtd if needed

   minimum:

   - "firmware-info"
   - "kernel"
   - "rootfs"

7. On initramfs image, upload sysupgrade image to the device and perform
   sysupgrade
8. Wait ~200 seconds to complete flashing and rebooting.
   If the device is booted with stock firmware, login to bootmenu and
   call "[B]: Boot with backup firmware and set as default." to set the
   first OS image as default and boot it.

Notes:

- All "SPEED" LEDs(Green/Amber) of LAN and 1000M "SPEED" LEDs(Green) of
  WAN1/2 are connected to GPIO expander. There is no way to indicate
  link speed of networking device on Linux Kernel/OpenWrt, so those LEDs
  cannot be handled like stock firmware.
  On OpenWrt, use netdev(link) trigger instead.

- Both colors of Bi-color LEDs on the front panel cannot be turned on at
  the same time.

- "PWR" and "Logo" LEDs are connected to power source directly.

- The following partitions are added for OpenWrt.
  These partitions are contained in "uboot" partition (0x0-0x1fffff) on
  stock firmware.

  - "firmware-info"
  - "dtb"
  - "u-boot-env"
  - "board-info"

Image header for bootmenu tftp:

  0x0 - 0xf  : ?
 0x10 - 0x2f : Image Name
 0x30 - 0x17f: ?
0x180 - 0x183: Kernel Offset*
0x184 - 0x187: Kernel Length*
0x188 - 0x18b: RootFS Offset (ext2)*
0x18c - 0x18f: RootFS Length (ext2)*
0x190 - 0x193: DTB Offset
0x194 - 0x197: DTB Length
0x198 - 0x19b: Data Offset (jffs2)
0x19c - 0x19f: Data Length (jffs2)
0x1a0 - 0x1ff: ?

*: required for initramfs image

MAC addresses:

(eth0): 70:4C:A5:xx:xx:7C (board-info, 0xd880 (hex))
WAN 1 : 70:4C:A5:xx:xx:7D
WAN 2 : 70:4C:A5:xx:xx:7E
LAN 1 : 70:4C:A5:xx:xx:7F
LAN 2 : 70:4C:A5:xx:xx:80
LAN 3 : 70:4C:A5:xx:xx:81
LAN 4 : 70:4C:A5:xx:xx:82
LAN 5 : 70:4C:A5:xx:xx:83

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2023-03-08 23:49:39 +01:00
Aleksey Nasibulin d45659a571 ramips: add support for SNR-CPE-ME2-SFP
SNR-CPE-ME2-SFP is a wireless router with SFP cage manufactured by SNR/NAG company.

Specification:
- SoC: MediaTek MT7621A
- CPU: 880MHz
- Flash: 16 MB (GD25Q127CSIG)
- RAM:  256 MB
- WLAN: 2.4 GHz, 5 GHz (MediaTek MT7615DN)
- Ethernet: 4x 10/100/1000 Mbps
- SFP cage (using RTL8211FS-CG)
- USB 3.0 port
- Power: 12 VDC, 2 A

Flash instruction via TFTP:
1. Boot SNR-CPE-ME2 to recovery mode
  (press reset button and power on device, hold button for ~10 seconds)
2. Send firmware via TFTP client:
 TFTP Server address: 192.168.1.1
 TFTP Client address: 192.168.1.131
3. Wait ~120 seconds to complete flashing
4. Do sysupgrade using web-interface

MAC Addresses(stock)
--------------------
+----------+------------------+-------------------+
| use      | address          | example           |
+----------+------------------+-------------------+
| Device   | label            | 6A:C4:DD:xx:xx:28 |
| Ethernet | + 1              | 6A:C4:DD:xx:xx:29 |
| 2g       | + 2              | 6A:C4:DD:xx:xx:2A |
| 5g       | + 3              | 6A:C4:DD:xx:xx:2B |
+----------+------------------+-------------------+

Notes:
- Reading sfp eeprom is not supported [1] (driver issue). Stock image has the same situation.

References:
1. https://forum.openwrt.org/t/mt7621-and-reading-sfp-eeprom/152249

Signed-off-by: Aleksey Nasibulin <alealexpro100@ya.ru>
2023-03-08 23:44:59 +01:00
David Bauer bf055fcdca ipq40xx: convert Netgear EX6100/EX6150 v2 to DSA
Signed-off-by: David Bauer <mail@david-bauer.net>
2023-03-08 02:19:01 +01:00
Hauke Mehrtens fb06f533b3 kernel: Fix perf build with binutils 2.40
Backport patches from kernel 6.0 which are fixing building of perf with
binutils 2.40.

perf with kernel 5.10 is also not building but the backporting is more
complicated and only a few targets are still using kernel 5.10.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-03-07 22:31:36 +01:00
David Bauer 35f6d79513 mpc85xx: add support for Watchguard Firebox T10
Hardware
--------
SoC:    Freescale P1010
RAM:    512MB
FLASH:  1 MB SPI-NOR
        512 MB NAND
ETH:    3x Gigabite Ethernet (Atheros AR8033)
SERIAL: Cisco RJ-45 (115200 8N1)
RTC:    Battery-Backed RTC (I2C)

Installation
------------

1. Patch U-Boot by dumping the content of the SPI-Flash using a SPI
   programmer. The SHA1 hash for the U-Boot password is currently
   unknown.

   A tool for patching U-Boot is available at
   https://github.com/blocktrron/t10-uboot-patcher/

   You can also patch the unknown password yourself. The SHA1 hash is
   E597301A1D89FF3F6D318DBF4DBA0A5ABC5ECBEA

2. Interrupt the bootmenu by pressing CTRL+C. A password prompt appears.
   The patched password is '1234' (without quotation marks)

3. Download the OpenWrt initramfs image. Copy it to a TFTP server
   reachable at 10.0.1.13/24 and rename it to uImage.

4. Connect the TFTP server to ethernet port 0 of the Watchguard T10.

5. Download and boot the initramfs image by entering "tftpboot; bootm;"
   in U-Boot.

6. After OpenWrt booted, create a UBI volume on the old data partition.
   The "ubi" mtd partition should be mtd7, check this using

   $ cat /proc/mtd

   Create a UBI partition by executing

   $ ubiformat /dev/mtd7 -y

7. Increase the loadable kernel-size of U-Boot by executing

   $ fw_setenv SysAKernSize 800000

8. Transfer the OpenWrt sysupgrade image to the Watchguard T10 using
   scp. Install the image by using sysupgrade:

   $ sysupgrade -n <path-to-sysupgrade>

   Note: The LAN ports of the T10 are 1 & 2 while 0 is WAN. You might
   have to change the ethernet-port.

9. OpenWrt should now boot from the internal NAND. Enjoy.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-03-07 14:05:02 +01:00
Paul Spooren acb189179c at91: switch to Kernel 5.15 by default
Getting ready for the next release.

Claudiu said:
> I tested v5.15 on all targets I have access to previously, when
> updating OpenWrt kernel for v5.15 and when preparing this PR. (#11918)

Signed-off-by: Paul Spooren <mail@aparcar.org>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
2023-03-07 00:12:02 +01:00
John Audia 50cb897d25 kernel: bump 5.10 to 5.10.172
Removed upstreamed:
	backport-5.10/804-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch[1]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.171&id=3e4bbd1f38a8d35bd2d3aaffdb5f6ada546b669a

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-03-07 00:06:40 +01:00
John Audia b88955aa22 kernel: bump 5.10 to 5.10.169
Manually rebased:
        backport-5.10/811-v6.1-0001-nvmem-core-Fix-memleak-in-nvmem_register.patch

Removed upstreamed:
        backport-5.10/811-v6.1-0003-nvmem-core-add-error-handling-for-dev_set_name.patch[1]
	patches-5.10/070-net-bgmac-fix-BCM5358-support-by-setting-correct-fla.patch[2]

Add fix:
	target/linux/generic/backport-5.10/804-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch[3]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.169&id=a19a0f67dbb89ad2bfc466f2003841acba645884
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.169&id=a5c51e0c3202820192db3f3809e072f3ca2b1177
3. https://lore.kernel.org/stable/20230227211548.13923-1-kuniyu@amazon.com

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-03-07 00:06:40 +01:00
Hauke Mehrtens a7e05caaf3 bcm47xx: Refresh patches
The kernel patches did not apply cleanly any more, refresh them
automatically.

Fixes: 26bc8f6876 ("generic: MIPS: Add barriers between dcache & icache flushes")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-03-05 18:47:12 +01:00
Tomasz Maciej Nowak 477ff0821a sdk: expose PATENTED an NLS build options
Some packages offer functionalities guarded by these options and it'll
be impossible to reach them without changing Config-build.in. So allow
to toggle these in more friendly way, by exposing them in configuration
menu.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2023-03-05 18:31:21 +01:00
Felix Fietkau 26b8739b68 mediatek: backport more WED upstream fixes
Fixes hang if the WO firmware can't be loaded

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-05 17:26:07 +01:00
Alan Luck 4c1d7787d4 ipq806x: Add buttons to OnHub
These are the factory reset button (external) and "developer mode"
button (hidden inside the case (ASUS) or under a screw in the base
(TP-Link)) found on the TP-Link and ASUS OnHub devices.

Signed-off-by: Alan Luck <luckyhome2008@gmail.com>
[Brian: add description; factor out for both ASUS and TP-Link; use
existing pinmux definitions; add keycode for dev button]
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2023-03-05 17:24:46 +01:00
Álvaro Fernández Rojas 2f8e90739a Revert "bmips: add missing switch cpu label"
This reverts commit dc0de05e10.
As pointed out by @BKPepe and @arinc9 this was removed by 9df035b since it
isn't needed.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-05 11:53:52 +01:00
Felix Fietkau 9f6d25551e mediatek: add missing DTS entries for WED on MT7986
Needed to support WLAN offloading

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-05 09:59:00 +01:00
Felix Fietkau daaf708b8c kernel: backport upstream mtk_eth_soc fixes
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-05 08:51:22 +01:00
Felix Fietkau 5ef783c1b2 kernel: move accepted mtk_eth_soc patches to generic-backport
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-05 08:51:22 +01:00
Álvaro Fernández Rojas dc0de05e10 bmips: add missing switch cpu label
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-04 21:27:30 +01:00
Daniel González Cabanelas 796815eb53 bcm63xx: kernel: power cycle the bcm6358 USB PLL
Some BCM6358 based boards may detect USB2.0 high speed devices as USB1.1
full speed. This is an old well known bug, but nobody cared about it. It
is quite random and hard to track.

With the latest versions of Openwrt, one user confirmed that the bug is
still there (tested router: HG556a).

Power cycle the USB PLL to fix it.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
2023-03-04 20:09:49 +01:00
Daniel González Cabanelas e55b4b436e bcm63xx: kernel: fix up bcm63268 roboswitch gpio registers
Some BCM63268 bootloaders may leave gpio registers, related to the
roboswitch, disabled before loading the OpenWrt firmware. As result of
this the switch won't work.

These registers, if not enabled, probably avoid forwarding packets.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
2023-03-04 20:07:33 +01:00
Álvaro Fernández Rojas 55117c3580 bcm63xx: drop kernel 5.10 support
Now that the target is on kernel 5.15 this is no longer needed.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-03-04 19:47:06 +01:00
Paul Spooren ef6f3fbc8c bcm63xx: switch to Kernel 5.15 by default
Getting ready for the next release.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2023-03-04 19:35:53 +01:00
Sieng-Piaw Liew 65ebe31130 bmips: check for DMA error when refilling Rx
dma_mapping_error() should be called as dma_map_single() could fail and
return error.

Signed-off-by: Sieng-Piaw Liew <liew.s.piaw@gmail.com>
2023-03-04 19:28:16 +01:00