openwrt/staging/stintel.git
2 months agolayerscape: remove left-over config-6.1 files
Daniel Golle [Fri, 20 Sep 2024 17:46:18 +0000 (18:46 +0100)]
layerscape: remove left-over config-6.1 files

Remove left-over config-6.1 files which should have been removed
when removing kernel 6.1 support.

Fixes: f20987c161 ("layerscape: remove kernel 6.1 support")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 months agopistachio: drop files for Linux 6.1
Daniel Golle [Fri, 20 Sep 2024 17:45:07 +0000 (18:45 +0100)]
pistachio: drop files for Linux 6.1

Drop obsolete config and patches for Linux 6.1.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 months agoipq40xx: add PoE passthrough GPIO
David Bauer [Sat, 14 Sep 2024 17:10:10 +0000 (19:10 +0200)]
ipq40xx: add PoE passthrough GPIO

Add the GPIO pin of the PoE passthrough switch on the Aruba AP-303H.
Power is activated when the pin is low. It enables a PSE chip, so power
is only supplied to downstream devices when they are 802.3af/at
compliant devices.

Ensure you use a sufficient power supply when chaining a consuming
device after the AP.

Signed-off-by: David Bauer <mail@david-bauer.net>
2 months agoqoriq: drop 6.1 support
Mieczyslaw Nalewaj [Sun, 8 Sep 2024 08:11:15 +0000 (10:11 +0200)]
qoriq: drop 6.1 support

Drop config for Linux 6.1.

Link: https://github.com/openwrt/openwrt/pull/16120
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2 months agoqoriq: use kernel 6.6 by default
Mieczyslaw Nalewaj [Fri, 9 Aug 2024 15:47:02 +0000 (17:47 +0200)]
qoriq: use kernel 6.6 by default

Switch to Linux kernel version 6.6.

Link: https://github.com/openwrt/openwrt/pull/16120
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2 months agoat91: drop 6.1 support
Mieczyslaw Nalewaj [Fri, 9 Aug 2024 16:00:21 +0000 (18:00 +0200)]
at91: drop 6.1 support

Drop config and files for Linux 6.1.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2 months agoat91: use kernel 6.6 by default
Mieczyslaw Nalewaj [Fri, 9 Aug 2024 15:57:23 +0000 (17:57 +0200)]
at91: use kernel 6.6 by default

Switch to Linux kernel version 6.6.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2 months agotools/llvm-bpf: filter out STAGING_DIR_HOST/include from cflags on non-linux systems
Felix Fietkau [Fri, 20 Sep 2024 14:55:45 +0000 (16:55 +0200)]
tools/llvm-bpf: filter out STAGING_DIR_HOST/include from cflags on non-linux systems

Avoids picking up an incompatible libuuid from util-linux

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 months agogeneric: 6.6: mtk_eth_soc: increase QDMA RESV_BUF size
Daniel Golle [Thu, 19 Sep 2024 13:33:15 +0000 (14:33 +0100)]
generic: 6.6: mtk_eth_soc: increase QDMA RESV_BUF size

Increase QDMA RESV_BUF from 2K to 3K for netsys v2 to match Mediatek SDK.
This helps reduce the possibility of Ethernet transmit timeouts.

Link: https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/19d8456c3051e5f6dabf42fa770916a2126ea4bf
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 months agogeneric: 6.6: mtk_eth_soc: reset all TX queues on DMA free
Daniel Golle [Wed, 18 Sep 2024 01:12:24 +0000 (02:12 +0100)]
generic: 6.6: mtk_eth_soc: reset all TX queues on DMA free

The purpose of resetting the TX queue is to reset the
byte and packet count as well as to clear the software
flow control XOFF bit.

MediaTek developers pointed out that netdev_reset_queue would only
resets queue 0 of the network device.
Queues that are not reset may cause unexpected issues.

Packets may stop being sent after reset and "transmit timeout" log may
be displayed.

Import fix from MediaTek's SDK to resolve this issue.

Link: https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/5746a94456f466446cc0dcdfbd9078df6df31b63
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 months agoucode: another fix for host installation
Felix Fietkau [Fri, 20 Sep 2024 09:23:24 +0000 (11:23 +0200)]
ucode: another fix for host installation

The previous host installation fix accidentally moved the rpath settings
out of CMAKE_HOST_OPTIONS and into CMAKE_OPTIONS.

Fixes: ae42ecaad4e7 ("ucode: fix host installation")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 months agopackages: remove kernel 5.15 remnants
Mieczyslaw Nalewaj [Wed, 18 Sep 2024 08:48:03 +0000 (10:48 +0200)]
packages: remove kernel 5.15 remnants

Remove kernel 5.15 remnants.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16417
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agogeneric: drop 5.15 support
Mieczyslaw Nalewaj [Tue, 17 Sep 2024 20:02:06 +0000 (22:02 +0200)]
generic: drop 5.15 support

Drop config and files for Linux 5.15.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16417
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: drop 5.15 support
Mieczyslaw Nalewaj [Tue, 17 Sep 2024 19:59:28 +0000 (21:59 +0200)]
realtek: drop 5.15 support

Drop config and files for Linux 5.15.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16417
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agoramips: add support for netis N6
Mikhail Zhilkin [Sat, 31 Aug 2024 14:21:06 +0000 (14:21 +0000)]
ramips: add support for netis N6

This commit adds support for netis N6 WiFi 6 router.

Specification
-------------
- SoC       : MediaTek MT7621AT, MIPS, 880 MHz
- RAM       : 256 MiB
- Flash     : NAND 128 MiB (ESMT PSU1GA30DT)
- WLAN      : MT7905DAN + MT7975DN
  - 2.4 GHz : b/g/n/ax, 574 Mbps, MIMO 2x2
  - 5 GHz   : a/n/ac/ax, 1201 Mbps, MIMO 2x2
- Ethernet  : 10/100/1000 Mbps x5 (1x WAN, 4x LAN)
- USB       : 1x 3.0
- UART      : 3.3V, 115200n8
- Buttons   : 1x Reset
              1x WPS
- LEDs      : 1x Power (green)
              1x System (green)
              1x WAN (green)
              1x WiFi 2.4 GHz (green), controlled by phy
              1x WiFi 5 GHz (green), controlled by phy
              1x WPS (green)
              1x USB (green)
              5x ethernet leds (green), controlled by switch
- Power     : 12 VDC, 1.5 A

Installation
------------
1. Update the router using stock firmware web interface and OpenWrt
   factory.bin image.

Recovery and return to stock
----------------------------
1. Assign your PC a static IP 192.168.1.2 and connect to the router using
   the ethernet cable;
2. Power off the router;
3. Press Reset button, power on the router and wait until ethernet led
   start blinking;
4. Release the button;
5. Open http://192.168.1.1/ (N6 System Recovery Mode) in your browser;
6. Upload OpenWrt factory.bin (or stock firmware *.bin) image and proceed
   with upgrade.

MAC addresses
-------------
+---------+-------------------+
|         | MAC example       |
+---------+-------------------+
| LAN     | dc:xx:xx:49:xx:04 |
| WAN     | dc:xx:xx:49:xx:05 |
| WLAN 2g | dc:xx:xx:19:xx:06 |
| WLAN 5g | dc:xx:xx:79:xx:06 |
+---------+-------------------+
The WLAN MAC prototype was found in 'Factory', 0x4
The LAN MAC was found in 'Factory', 0x7ef20
The WAN MAC was found in 'Factory', 0x7ef26

Known issue
-----------
2.4 GHz WLAN doesn't start with mt76 driver.

Probable reason:
   Original Netis N6 EEPROM contains wrong MT_EE_WIFI_CONF value (0xd2).
   Other routers with the same WLAN hardware (e.g., Routerich AX1800)
   have MT_EE_WIFI_CONF = 0x92.

Workaround (already included in this commit):
   Extract EEPROM to a file at the first time boot and change
   MT_EE_WIFI_CONF (offset 0x190) value from 0xd2 to 0x92. See
   /etc/hotplug.d/firmware/11-mt76-caldata for details.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16322
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoramips: fix wrong dts files permissions
Mikhail Zhilkin [Sat, 31 Aug 2024 14:05:39 +0000 (14:05 +0000)]
ramips: fix wrong dts files permissions

This files are executable:
   target/linux/ramips/dts/mt7621_openfi_5pro.dts
   target/linux/ramips/dts/mt7621_winstars_ws-wn536p3.dts
Has to be fixed.

Fixes: 5560791 ("ramips: add support for OpenFi 5Pro Travel Router")
Fixes: 2da2705 ("ramips: add support for WINSTARS WS-WN536P3")
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16322
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agotools/expat: update to 2.6.3
Yanase Yuki [Fri, 13 Sep 2024 10:22:28 +0000 (19:22 +0900)]
tools/expat: update to 2.6.3

This release fixes CVE-2024-45490, CVE-2024-45491 and
CVE-2024-45492.

Changelog:
https://github.com/libexpat/libexpat/blob/R_2_6_3/expat/Changes

Signed-off-by: Yanase Yuki <dev@zpc.st>
Link: https://github.com/openwrt/openwrt/pull/16379
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agokernel: bump 6.6 to 6.6.52
John Audia [Wed, 18 Sep 2024 19:29:06 +0000 (15:29 -0400)]
kernel: bump 6.6 to 6.6.52

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

Removed upstreamed:
backport-6.6/819-v6.8-0010-nvmem-core-add-nvmem_dev_size-helper.patch[1]
backport-6.6/819-v6.8-0011-nvmem-u-boot-env-use-nvmem_add_one_cell-nvmemsubsys.patch[2]
backport-6.6/819-v6.8-0012-nvmem-u-boot-env-use-nvmem-device-helpers.patch[3]
backport-6.6/819-v6.8-0013-nvmem-u-boot-env-improve-coding-style.patch[4]
backport-6.6/822-v6.11-0011-nvmem-u-boot-env-error-if-NVMEM-device-is-too-small.patch[5]

Manually rebased:
starfive/patches-6.6/0048-riscv-dts-starfive-Add-full-support-except-VIN-and-V.patch

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.52&id=820b1b981aeb8b8e60db2835ddd430c9d1bc6072
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.52&id=ae91c9c7b67d4d47206fe8cbb2ab89687d283dcc
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.52&id=2eea394c31cbc3d853a26ef2ddb8f5bd24d4d002
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.52&id=368fa77b7945bdbdf0e3bb26b5abcae4fba25a20
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.52&id=2278629c3ebb1a912fe0a1f19f088312600742a4

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/16422
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agomediatek: filogic: openwrt_one: let U-Boot set LAN MAC address
Daniel Golle [Thu, 19 Sep 2024 19:12:54 +0000 (20:12 +0100)]
mediatek: filogic: openwrt_one: let U-Boot set LAN MAC address

Instead of reading it from flash directly, let U-Boot assign the LAN
MAC address. Set label-mac-device while at it and sort aliases in DT
alphabetically.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 months agouboot-mediatek: openwrt_one: set ethaddr from factory
Daniel Golle [Thu, 19 Sep 2024 18:26:57 +0000 (19:26 +0100)]
uboot-mediatek: openwrt_one: set ethaddr from factory

Set LAN MAC address from factory partition on NOR flash.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 months agoat91: 6.6: add missing kernel symbols
Daniel Golle [Thu, 19 Sep 2024 17:39:56 +0000 (18:39 +0100)]
at91: 6.6: add missing kernel symbols

Kconfig symbols CONFIG_VIDEO_MICROCHIP_CSI2DC, CONFIG_VIDEO_MICROCHIP_ISC
and CONFIG_VIDEO_MICROCHIP_XISC are missing for sama5 and sama7 causing
the build to abort or waiting for user input. Add the symbols (disabled)
so build with Linux 6.6 succeeds.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 months agomediatek: filogic: fix WiFi MAC address retrieval for Adtran SDG-8734
Daniel Golle [Thu, 19 Sep 2024 13:36:43 +0000 (14:36 +0100)]
mediatek: filogic: fix WiFi MAC address retrieval for Adtran SDG-8734

Fix a typo in the MAC address assignment script affecting SDG-8734.

Fixes: c71b68acdd ("mediatek: filogic: add Adtran SmartRG Mount Stuart series")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 months agodtc: Update to 1.7.1
Andreas Gnau [Mon, 16 Sep 2024 22:07:46 +0000 (00:07 +0200)]
dtc: Update to 1.7.1

Update to dtc to 1.7.1. Change tarball to gzip and drop upstreamed patch
010-both-libraries.patch. Disable tests.

Changes sinve v1.7.0 include:
 * dtc
   * Fix check for 10-bit I2C addresses
   * Improve documentation of -@ option
   * Update to libyaml >= 0.2.3
   * Improvements & fixes for device graph checks
   * Add -L / --local-fixups option
   * Add check for length of interrupt-map properties
 * libfdt
   * Add fdt_path_getprop_namelen()
   * Add fdt_get_symbol() and fdt_get_symbol_namelen()
   * Correct documentation of fdt_path_offset()
   * Correct documentation of fdt_appendprop_addrrange()
   * Validate aliases is fdt_get_alias_namelen()
   * Don't overwrite phandles when applying overlays
   * Require Python 3
 * pylibfdt
   * Support boolean properties
   * Fixes for current Python versions
 * General
   * Assorted bugfixes
   * Assorted build improvements
   * Assorted typo fixes in docs
   * Some additional testcases
   * Move to GitHub Actions based CI

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/16411
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agokernel: rework Initramfs compile cpio handling
Christian Marangi [Wed, 18 Sep 2024 23:01:27 +0000 (01:01 +0200)]
kernel: rework Initramfs compile cpio handling

Now that we copy and then delete the Per-Device rootfs linux directory,
it's not valid anymore placing the generated cpio there as artifacts
or subsequent commands need the generated cpio.

To handle this, rework Initramfs compile cpio handling by placing them in
the KERNEL_BUILD_DIR but add to the name the rootfs HASH ID.

To also prevent race condition, generate and access these file under a
lock to prevent fit command to reference a cpio while a parallel
execution is genereting it.

Fixes: 52cc9d82f113 ("kernel: rework Initramfs locking logic")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 months agokernel: fix flock name for gen-initramfs lock
Christian Marangi [Wed, 18 Sep 2024 22:58:44 +0000 (00:58 +0200)]
kernel: fix flock name for gen-initramfs lock

Fix flock name for gen-initramfs lock as $(2) starts with .HASH making
the lock name gen-initramfs-.HASH.flock

Fix this to a better name of gen-initramfs.HASH.flock

Fixes: 52cc9d82f113 ("kernel: rework Initramfs locking logic")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 months agokernel: fix wrong rework for Initramfs cpio xz compression
Christian Marangi [Wed, 18 Sep 2024 22:56:32 +0000 (00:56 +0200)]
kernel: fix wrong rework for Initramfs cpio xz compression

Fix wrong rework for Initramfs cpio xz compression where it was wrongly
dropped the Per-Device linux directory if condition.

Fixes: 52cc9d82f113 ("kernel: rework Initramfs locking logic")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 months agotools/cmake: update to 3.30.3
Yanase Yuki [Fri, 13 Sep 2024 10:16:29 +0000 (19:16 +0900)]
tools/cmake: update to 3.30.3

Release notes: https://cmake.org/cmake/help/latest/release/3.30.html

Signed-off-by: Yanase Yuki <dev@zpc.st>
Link: https://github.com/openwrt/openwrt/pull/16378
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: add support for HPE 1920-48G (JG927A) and 1920-48G-PoE (JG928A)
Stephen Howell [Tue, 25 Apr 2023 15:32:07 +0000 (17:32 +0200)]
realtek: add support for HPE 1920-48G (JG927A) and 1920-48G-PoE (JG928A)

Hardware information:
---------------------

- SoC: RTL8393M
- Copper phy: 6×RTL8218B
- Fibre phy: RTL8214FC
- Flash: 32MiB SPI NOR, MX25L25635FMI
- RAM: 128MiB DDR3, Micron MT41K64M16TW-107
- Serial port: ±5V serial port to RJ45, ZT3232 (MAX3232 compatible)
- +370W POE on JG928A model

Note: SFP ports currently non-functional due to missing support for
RTL8214FC on the RTL8393M target.

Updated for Linux 6.6 kernel.

Installation:
-------------
- Initial installation follows same process as HPE 1920-24G (JG924A)

- Based on prior work of Jan Hoffmann <jan@3e8.eu>
- Additional work by Andreas Böhler <dev@aboehler.at>
- PoE updates and tidy-up by Stephen Howell <howels@allthatwemight.be>
Signed-off-by: Stephen Howell <howels@allthatwemight.be>
2 months agorealtek: default to 6.6
Robert Marko [Tue, 17 Sep 2024 10:54:47 +0000 (12:54 +0200)]
realtek: default to 6.6

Now that there is 6.6 support for realtek, lets encourage testing it by
making it default so 5.15 can be dropped ASAP.

Link: https://github.com/openwrt/openwrt/pull/16408
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agogeneric: 6.6: backport pending fix for Aquantia PHY LEDs
Daniel Golle [Tue, 17 Sep 2024 16:29:20 +0000 (17:29 +0100)]
generic: 6.6: backport pending fix for Aquantia PHY LEDs

The 'active-low' property was not applied correctly and two fixes
are required to make inverted LEDs work as expected.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 months agorpcd: update to git HEAD
Daniel Golle [Tue, 17 Sep 2024 18:06:55 +0000 (19:06 +0100)]
rpcd: update to git HEAD

 bcc091d session: Fix crash when the UCI option 'password' or 'username' is missing
 9f4b86e rpcd: iwinfo: add IEEE 802.11be support

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 months agoiwinfo: update to git HEAD
Daniel Golle [Tue, 17 Sep 2024 18:03:29 +0000 (19:03 +0100)]
iwinfo: update to git HEAD

Add support for 802.11be (HE) radios.

 4b7c47c iwinfo: sync with upstream nl80211.h
 268a662 iwinfo: add basic IEEE 802.11be support

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 months agoat91: enable 6.6 testing kernel
Mieczyslaw Nalewaj [Fri, 2 Aug 2024 20:37:28 +0000 (22:37 +0200)]
at91: enable 6.6 testing kernel

The at91 now supports 6.6 kernel as testing.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16058
Signed-off-by: Nick Hainke <vincent@systemli.org>
2 months agoat91: refresh config-6.6
Mieczyslaw Nalewaj [Sat, 3 Aug 2024 00:48:13 +0000 (02:48 +0200)]
at91: refresh config-6.6

Refresh kernel config for Linux 6.6.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16058
Signed-off-by: Nick Hainke <vincent@systemli.org>
2 months agoat91: 6.6: change dts files location
Mieczyslaw Nalewaj [Sat, 3 Aug 2024 13:58:04 +0000 (15:58 +0200)]
at91: 6.6: change dts files location

Change dts files location to subfolder microchip for compatibility with kernel 6.6

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16058
Signed-off-by: Nick Hainke <vincent@systemli.org>
2 months agoat91: 6.6: remove obsolete patches
Mieczyslaw Nalewaj [Fri, 2 Aug 2024 20:26:02 +0000 (22:26 +0200)]
at91: 6.6: remove obsolete patches

Remove obsolete patches no longer applicable to the 6.6 kernel.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16058
Signed-off-by: Nick Hainke <vincent@systemli.org>
2 months agokernel/at91: Restore kernel files for v6.1
Mieczyslaw Nalewaj [Sat, 3 Aug 2024 13:53:45 +0000 (15:53 +0200)]
kernel/at91: Restore kernel files for v6.1

This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16058
Signed-off-by: Nick Hainke <vincent@systemli.org>
2 months agokernel/at91: Create kernel files for v6.6 (from v6.1)
Mieczyslaw Nalewaj [Sat, 3 Aug 2024 13:53:44 +0000 (15:53 +0200)]
kernel/at91: Create kernel files for v6.6 (from v6.1)

This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16058
Signed-off-by: Nick Hainke <vincent@systemli.org>
2 months agoat91: remove unnecessary dts files
Mieczyslaw Nalewaj [Sat, 3 Aug 2024 13:53:04 +0000 (15:53 +0200)]
at91: remove unnecessary dts files

Remove unnecessary dts files already included in the 6.1 kernel.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16058
Signed-off-by: Nick Hainke <vincent@systemli.org>
2 months agosiflower: new target for Siflower SF19A2890
Chuanhong Guo [Thu, 8 Aug 2024 04:56:03 +0000 (12:56 +0800)]
siflower: new target for Siflower SF19A2890

Siflower SF19A2890 is an SoC with:
Dual-core MIPS InterAptiv at 800MHz
DDR3 controller
One Gigabit Ethernet MAC with RGMII and IPv4 HNAT engine
Built-in 2x2 11N + 2x2 11AC WiFi radio
USB 2.0 OTG
I2C/SPI/GPIO and various other peripherals

This PR adds support for SF19A2890 EVB with ethernet support.

EVB spec:
Memory: DDR3 128M
Ethernet: RTL8367RB 5-port gigabit switch
Flash: 16M NOR
Others: MicroUSB OTG, LED x 1, Reset button x1

The built image can be flashed using u-boot recovery.

This target is marked as source-only until support for a commercial
router board comes.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2 months agopackage: busybox: disable mips16 on hard-float
Chuanhong Guo [Thu, 15 Aug 2024 08:04:30 +0000 (16:04 +0800)]
package: busybox: disable mips16 on hard-float

The busybox built with mips16 enabled has broken seq command.
Disassembling shows that the call to hard-float strtod in mips16
code is generated without the __call_stub_fp:
```
   0x00406d6f <+118>:   lw      v0,32(sp)
   0x00406d71 <+120>:   sll     s0,2
   0x00406d73 <+122>:   addu    s0,v0,s0
   0x00406d75 <+124>:   lw      a0,-4(s0)
   0x00406d79 <+128>:   jal     0x44ebc1 <strtod@mips16plt>
   0x00406d7d <+132>:   addiu   a1,sp,84
   0x00406d7f <+134>:   sw      v0,64(sp)
   0x00406d81 <+136>:   lw      v0,0(s1)
   0x00406d83 <+138>:   sw      v1,68(sp)
```

As a result, strtod returns the result in float point registers
while the calling mips16 code expect the result in v0/v1.

Disable mips16 on hard-float targets for now. The built .ipk goes
from 213316 bytes to 251419 bytes.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2 months agoramips: mt7621: use lzma-loader for Sercomm NA502s
Andreas Böhler [Sun, 15 Sep 2024 21:35:08 +0000 (23:35 +0200)]
ramips: mt7621: use lzma-loader for Sercomm NA502s

This fixes a well-known "LZMA ERROR 1" error on Sercomm NA502s, reported
on the OpneWrt forum [0].

[0] https://forum.openwrt.org/t/206640

Signed-off-by: Andreas Böhler <dev@aboehler.at>
2 months agoramips: mtd_eth_soc: use dev_err_probe
Rosen Penev [Thu, 15 Aug 2024 02:25:21 +0000 (19:25 -0700)]
ramips: mtd_eth_soc: use dev_err_probe

Simplifies the code by avoiding having to manually handle -EPROBE_DEFER.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 months agotoolchain: gcc: drop 110-Fix-MIPS-PR-84790.patch
Chuanhong Guo [Tue, 17 Sep 2024 13:41:10 +0000 (21:41 +0800)]
toolchain: gcc: drop 110-Fix-MIPS-PR-84790.patch

According to the bugzilla link, this is fixed in gcc 14.2.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2 months agokernel: copy kernel build dir on Per-Device Initramfs compilation
Christian Marangi [Mon, 16 Sep 2024 16:38:16 +0000 (18:38 +0200)]
kernel: copy kernel build dir on Per-Device Initramfs compilation

To speedup compilation of Per-Device Initramfs, copy the kernel build
directory for each rootfs ID.

This permits concurrent execution of kernel build without conflicting
with each other at the expense of additional disk space usage.

To limit disk space usage, the copied kernel directory is deleted after
the Per-Device Initramfs image is generated and saved.

Link: https://github.com/openwrt/openwrt/pull/16404
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 months agokernel: rework Initramfs locking logic
Christian Marangi [Mon, 16 Sep 2024 16:34:09 +0000 (18:34 +0200)]
kernel: rework Initramfs locking logic

Rework CompileImage/Initramfs locking logic to fix race condition on
concurrent access/compilation.

Rework each intermediate step and group them under one single execution
block. Protect this with a new lock, 'gen-initramfs' and rename the
compile initramfs to compile-initramfs lock name.

This is done to handle corner case scenario where a rootfs with the same
hash ID is generated at the same time. To handle this, we execute
everything under lock and use a specific hash ID lock to prevent
concurrent access/compilation.

Link: https://github.com/openwrt/openwrt/pull/16404
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 months agotoolchain: binutils: add support for 2.43.1
Olcay Korkmaz [Mon, 16 Sep 2024 21:28:21 +0000 (00:28 +0300)]
toolchain: binutils: add support for 2.43.1
Release notes:
https://lists.gnu.org/archive/html/info-gnu/2024-08/msg00003.html

No need to refresh patches
Test device: Xiaomi ax3600

Signed-off-by: Olcay Korkmaz <nuke_mania@hotmail.com>
Link: https://github.com/openwrt/openwrt/pull/16405
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agogeneric: enable RELR relocations
Robert Marko [Mon, 16 Sep 2024 09:51:45 +0000 (11:51 +0200)]
generic: enable RELR relocations

RELR is a relocation packing format for relative relocations.

Linux has supported using it for ARM64 since 5.4, and more recently
for LoongArch as well.

It requires compatible tooling as well, so only with binutils 2.43
TOOLS_SUPPORT_RELR is set and thus RELR available.

RELR should always decrease the binary size and while testing this
the default build for Dynalink WRX-36 (qualcommax/ipq807x) reduced
the compressed kernel size by 38k and uncompressed one by 640k.

So, lets enable it in the default config.

Link: https://github.com/openwrt/openwrt/pull/16403
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: 6.6: MDIO post fixes
Markus Stockhausen [Sat, 14 Sep 2024 20:39:12 +0000 (16:39 -0400)]
realtek: 6.6: MDIO post fixes

Merging of the realtek 6.6 series forgot to include some final fixes
for the new MDIO driver. What was changed in last second?

1. The MDIO driver used wrong constants to make use of the raw
page (for direct register access). Provide a rawpage variable in
the bus private structure, populate it during initialization and
make use of it at the proper places

2. We always used the variable portaddr for the bus index. Usually
our driver uses either addr or port for the same meaning. Remove the
duplication and reuse the normal addr variable.

3. Drop functions rtmdio_write_page() and rtmdio_read_page(). These
only call the PHY driver read/write page functions. We know that
these will only access page 0x1f. As we have only Realtek PHYs
and our driver only reacts to this special page, just hardcode it.
Benefit is that we can use these functions for PHY detection when
read/write page functions are not yet assigned.

4. Add two new helper functions phy_port_read_paged() and
phy_port_write_paged(). These allow to access arbitrary ports on
the MDIO bus when the packages are not initialized. These will be
needed for proper RTL8218B and RTL8214FC detection in forthcoming
patches.

5. The port tracking wrongly used index 0 to mark "normal" access.
This does not allow to make a "special" access to port 0. Use
index -1 to mark "normal" access.

Provide the fix for 5.15 and 6.6 to allow for easy version
comparison.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/16391
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: 5.15: backport VLAN fix
Markus Stockhausen [Sat, 14 Sep 2024 20:26:34 +0000 (16:26 -0400)]
realtek: 5.15: backport VLAN fix

With commit a22d359fa56fe0 VLAN handling was fixed for kernel 6.6.
This restored network connectivity of the devices. For easy testing
backport the fix for 5.15 too.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/16391
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: 6.6: Support XGMII attached PHYs
Markus Stockhausen [Sat, 14 Sep 2024 20:22:40 +0000 (16:22 -0400)]
realtek: 6.6: Support XGMII attached PHYs

On the XGS1210-12 the RTL8218D is attached via XGMII. Add this to the
supported list in the DSA driver.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/16391
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agohostapd: update to version 2024-09-15
Ivan Pavlov [Sat, 7 Sep 2024 17:54:34 +0000 (20:54 +0300)]
hostapd: update to version 2024-09-15

Remove upstreamed from 2.11 release:
  060-nl80211-fix-crash-when-adding-an-interface-fails.patch

Rebase all other patches

Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16338
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agohostapd: update to 2.11 release tag
Ivan Pavlov [Thu, 15 Aug 2024 18:47:25 +0000 (21:47 +0300)]
hostapd: update to 2.11 release tag

Release 2.11 has been quite a few new features and fixes since the 2.10
release. The following ChangeLog entries highlight some of the main
changes:

* Wi-Fi Easy Connect
  - add support for DPP release 3
  - allow Configurator parameters to be provided during config exchange
* HE/IEEE 802.11ax/Wi-Fi 6
  - various fixes
* EHT/IEEE 802.11be/Wi-Fi 7
  - add preliminary support
* SAE: add support for fetching the password from a RADIUS server
* support OpenSSL 3.0 API changes
* support background radar detection and CAC with some additional
  drivers
* support RADIUS ACL/PSK check during 4-way handshake (wpa_psk_radius=3)
* EAP-SIM/AKA: support IMSI privacy
* improve 4-way handshake operations
  - use Secure=1 in message 3 during PTK rekeying

...and many more

Remove upstreamed patches:
  023-ndisc_snoop-call-dl_list_del-before-freeing-ipv6-add.patch
  030-driver_nl80211-rewrite-neigh-code-to-not-depend-on-l.patch
  040-mesh-allow-processing-authentication-frames-in-block.patch
  181-driver_nl80211-update-drv-ifindex-on-removing-the-fi.patch
  182-nl80211-move-nl80211_put_freq_params-call-outside-of.patch
  183-hostapd-cancel-channel_list_update_timeout-in-hostap.patch
  210-build-de-duplicate-_DIRS-before-calling-mkdir.patch
  253-qos_map_set_without_interworking.patch
  751-qos_map_ignore_when_unsupported.patch
  800-SAE-Check-for-invalid-Rejected-Groups-element-length.patch
  801-SAE-Check-for-invalid-Rejected-Groups-element-length.patch
  802-SAE-Reject-invalid-Rejected-Groups-element-in-the-pa.patch

Other patches has been updated.

Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16338
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agoramips: mt7621: Add DNA Valokuitu Plus EX400
Mauri Sandberg [Mon, 31 Jul 2023 12:35:46 +0000 (15:35 +0300)]
ramips: mt7621: Add DNA Valokuitu Plus EX400

Specifications:
- Device: DNA Valokuitu Plus EX400
- SoC: MT7621A
- Flash: 256MB NAND
- RAM: 256MB
- Ethernet: Built-in, 2 x 1GbE
- Wifi: MT7603 2.4 GHz, MT7615 5 GHz (4x internal antennas)
- USB: 1x 3.0
- LED: 1x green/red, 1x green
- Buttons: Reset

MAC addresses:
- LAN:     u-boot 'ethaddr' (label)
- WAN:     label + 1
- 2.4 GHz: label + 6
- 5 GHz:   label + 7

Serial:
 There is a black block connector next to the red ethernet connector. It
 is accessible also through holes in the casing.

Pinout (TTL 3.3V)
 +---+---+
 |Tx |Rx |
 +---+---+
 |Vcc|Gnd|
 +---+---+

Firmware:
 The vendor firmware is a fork of OpenWrt (Reboot) with a kernel version
 4.4.93. The flash is arranged as below and there is a dual boot
 mechanism alternating between rootfs_0 and rootfs_1.

 +-------+------+------+-----------+-----------+
 |       | env1 | env2 | rootfs_0  |  rootfs_1 |
 |       +------+------+-----------+-----------+
 |       |         UBI volumes                 |
 +-------+-------------------------------------+
 |U-Boot |             UBI                     |
 +-------+-------------------------------------+
 |mtd0   |             mtd1                    |
 +-------+-------------------------------------+
 |                     NAND                    |
 +---------------------------------------------+

 In OpenWrt rootfs_0 will be used as a boot partition that will contain the
 kernel and the dtb. The squashfs rootfs and overlay are standard OpenWrt
 behaviour.

 +-------+------+------+-----------+--------+------------+
 |       | env1 | env2 | rootfs_0  | rootfs | rootfs_data|
 |       +------+------+-----------+--------+------------+
 |       |         UBI volumes                           |
 +-------+-----------------------------------------------+
 |U-Boot |             UBI                               |
 +-------+-----------------------------------------------+
 |mtd0   |             mtd1                              |
 +-------+-----------------------------------------------+
 |                     NAND                              |
 +-------------------------------------------------------+

U-boot:
 With proper serial access booting can be halted to U-boot by pressing any
 key. TFTP and flash writes are available, but only the first one has been
 tested.

 NOTE: Recovery mode can be accessed by holding down the reset button while
 powering on the device. The led 'Update' will show a solid green light
 once ready. A web server will be running at 192.168.1.1:80 and it will
 allow flashing a firmware package. You can cycle between rootfs_0 and
 rootfs_1 by pressing the reset button once.

Root password:
 With the vendor web UI create a backup of your settings and download the
 archive to your computer. Within the archive in the file
 /etc/shadow replace the password hash for root with that of a password you
 know. Restore the configuration with the vendor web UI and you will have
 changed the root password.

SSH access:
 You might need to enable the SSH service for LAN interface as by default
 it's enabled for WAN only.

Installing OpenWrt:
 With the vendor web UI install the OpenWrt factory image. Alternatively,
 ssh to the device and use sysupgrade -n from cli.

 Finalize by installing the OpenWrt sysupgrade image to get a fully
 functioning system.

Reverting to the vendor firmware:

 Boot with OpenWrt initramfs image
  - Remove volumes rootfs_0, rootfs and rootfs_data and create vendor
    volumes.

    ubirmvol /dev/ubi0 -n 2
    ubirmvol /dev/ubi0 -n 3
    ubirmvol /dev/ubi0 -n 4
    ubimkvol /dev/ubi0 -N rootfs_0 -S 990
    ubimkvol /dev/ubi0 -N rootfs_1 -S 990

 Power off and enter to the U-boot recovery to install the vendor
 firmware.

Known issues:
 - MACs for wifi are stored in currently unknown place but it seems
   to persist over power-off. They might be stored on the chip.

Signed-off-by: Mauri Sandberg <maukka@ext.kapsi.fi>
[rmilecki: try NVMEM for MACs]
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 months agoomap: remove 6.1 support
Andre Heider [Sun, 4 Aug 2024 14:11:16 +0000 (16:11 +0200)]
omap: remove 6.1 support

We switched to 6.6, so lets remove 6.1 support now.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16099
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoomap: switch to kernel 6.6
Andre Heider [Sun, 4 Aug 2024 14:10:49 +0000 (16:10 +0200)]
omap: switch to kernel 6.6

Switch to Linux 6.6.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16099
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoomap: refresh kernel 6.6 config
Andre Heider [Sun, 4 Aug 2024 14:06:56 +0000 (16:06 +0200)]
omap: refresh kernel 6.6 config

Unset CONFIG_CRYPTO_MANAGER_DISABLE_TESTS and
CONFIG_CRYPTO_MANAGER_EXTRA_TESTS manually to fix these linker errors:
crypto/crypto_engine.o: in function `crypto_engine_register_akcipher': undefined reference to `crypto_register_akcipher'
crypto/crypto_engine.o: in function `crypto_engine_unregister_akcipher': undefined reference to `crypto_unregister_akcipher'
crypto/crypto_engine.o: in function `crypto_engine_register_kpp': undefined reference to `crypto_register_kpp'
crypto/crypto_engine.o: in function `crypto_engine_unregister_kpp': undefined reference to `crypto_unregister_kpp'

Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16099
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoomap: adapt to the new dts directory layout.
Andre Heider [Sun, 4 Aug 2024 14:10:49 +0000 (16:10 +0200)]
omap: adapt to the new dts directory layout.

.dts files were moved to the 'ti/omap' sub-directory.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16099
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agokernel/omap: Restore kernel files for v6.1
Andre Heider [Fri, 9 Aug 2024 06:34:29 +0000 (08:34 +0200)]
kernel/omap: Restore kernel files for v6.1

This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16099
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agokernel/omap: Create kernel files for v6.6 (from v6.1)
Andre Heider [Fri, 9 Aug 2024 06:34:29 +0000 (08:34 +0200)]
kernel/omap: Create kernel files for v6.6 (from v6.1)

This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16099
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoomap: rename kernel patches directory to include the version
Andre Heider [Fri, 9 Aug 2024 06:31:39 +0000 (08:31 +0200)]
omap: rename kernel patches directory to include the version

Bring it in line with all the other targets.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16099
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agorealtek: add fan controller support to D-Link DGS-1210-28MP
Andreas Böhler [Sat, 1 Jun 2024 17:28:22 +0000 (19:28 +0200)]
realtek: add fan controller support to D-Link DGS-1210-28MP

The DGS-1210-28MP has a LM63 fan controller connected via i2c of the
RTL8231. The clock line is always low if the property
i2c-gpio,scl-open-drain is not set; with this property, the GPIO pin is
force-drive and the clock works as expected.

The LM63 is not configured by U-Boot, thus only manual fan control is
possible by settings pwm1_enable to "1" and writing the desired values to
pwm1.

The OEM firmware drives the fan from user mode and sets it up like this:

// PWM LUT/value r/w, PWM Clock = 1.4kHz
0x4a 0x28
// Tachometer spinup disabled, spin-up cycles bypassed
0x4b 0x00
// PWM Frequency = default
0x4d 0x17
// PWM Value (28)
0x4c 0x1c
// If > 0 C, use
0x50 0x00
// PWM = 28
0x51 0x1c
// If > 51 C, use
0x52 0x33
// PWM = 44
0x53 0x2e
// Set hysteresis to 100 = default
0x4f 0x03
// Turn on automatic mode and w/p the LUT values
0x4a 0x08

A thread in the OEM firmware polls the ALERT status register for fan
failures.

Unfortunately, the lm63 kernel driver does not perform any initialization
of the chip and it does not support changing some config registers (like
PWM frequency or LUT). Hence, we are stuck with the defaults and need to do
fan control in software.

Signed-off-by: Andreas Böhler <dev@aboehler.at>
Link: https://github.com/openwrt/openwrt/pull/15616
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2 months agorealtek: add full SFP support to D-Link DGS-1210-28 series
Andreas Böhler [Sat, 1 Jun 2024 17:14:39 +0000 (19:14 +0200)]
realtek: add full SFP support to D-Link DGS-1210-28 series

The DGS-1210-28 series was lacking full SFP support due to missing GPIOs.
Fortunately, the existing GPIO definitions of DGS-1210-52 match, this adds
the required i2c-gpio nodes to the DTS and allows hotplug SFP support.

Signed-off-by: Andreas Böhler <dev@aboehler.at>
Link: https://github.com/openwrt/openwrt/pull/15616
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2 months agokernel: bump 6.6 to 6.6.51
John Audia [Thu, 12 Sep 2024 11:14:13 +0000 (07:14 -0400)]
kernel: bump 6.6 to 6.6.51

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

Removed upstreamed:
generic/backport-6.6/200-regmap-maple-work-around-false-positive-warning.patch
generic/backport-6.6/822-v6.11-0012-nvmem-Fix-return-type-of-devm_nvmem_device_get-in-ke.patch
bcm27xx/patches-6.6/950-1018-drivers-mmc-apply-SD-quirks-earlier-during-probe.patch

Manually rebased:
bcm27xx/patches-6.6/950-0993-drivers-mmc-cqhci-clear-CQHCI_CTL-if-halt-fails.patch
ramips/patches-6.6/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch[4]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.51&id=e42ea96d6d36a16526cb82b8aa2e5422814c3250
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.51&id=3d1baf322a3a69b38b6b2d511cfe0d611d1b5462
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.51&id=115a755bb38db5a1175be44e6a9a93a0a8233885
4. Adapted the changes from Hauke Mehrtens' modification in PR#16366 to 5.15.167

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/16370
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agoapm821xx: meraki: fix mac addresses in dts
Rosen Penev [Tue, 20 Aug 2024 19:54:04 +0000 (12:54 -0700)]
apm821xx: meraki: fix mac addresses in dts

The one for the mx60 was wrong. The LAN MAC is offset by one.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14037
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agoapm821xx: migrate to DSA
Rosen Penev [Mon, 9 Oct 2023 20:15:52 +0000 (13:15 -0700)]
apm821xx: migrate to DSA

The qca8k driver is upstream, unlike swconfig. This applies to the mx60
and wndr4700 only. Fixed up LED definitions as well.

RTL83xx DSA for WNDAP62300/660 is not working.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14037
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agoucode: fix missing backslash
David Bauer [Sun, 15 Sep 2024 01:26:58 +0000 (03:26 +0200)]
ucode: fix missing backslash

Fixes: ae42ecaad4e7 ("ucode: fix host installation")
Signed-off-by: David Bauer <mail@david-bauer.net>
2 months agorealtek: 6.6: enable testing kernel
Markus Stockhausen [Mon, 9 Sep 2024 12:25:16 +0000 (08:25 -0400)]
realtek: 6.6: enable testing kernel

Allow to build the new kernel.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: fix VLAN handling
Markus Stockhausen [Sat, 7 Sep 2024 07:23:03 +0000 (03:23 -0400)]
realtek: 6.6: fix VLAN handling

The CPU port of realtek switches needs some proper PVID set to handle
untagged packets. Because the ethernet driver does no special VLAN
handling (see CPU tag RVID/RVID_SEL) as of now we can only steer
untagged packets by setting PVID for the CPU port. VLAN handling has
never been perfect but 3 events made things worse.

- Commit a37650821644 ("rtl83xx: dsa: Do nothing when vid 0")
- Commit e691e2b302d9 ("rtl83xx: dsa: reset PVID to 1 instead of 0")
- Upgrade to kernel 6.6

Reasons are:

- Rejecting VID 0 disabled Linux initialization routines
- Initialization for PVID forgot to set priv->ports[port].pvid
- Kernel 6.6 does no longer clarify CPU port as untagged

To fix this prepare the VID 0 setup inside the driver. Join all ports
to VID 0 and let no one from outsinde interfere with this setup.
Especially ignore PVID settings for the CPU port for all further
VLAN commands.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Suggested-by: Bjørn Mork <bjorn@mork.no>
2 months agorealtek: 6.6: refactor mac config and link up for RTL83xx
Markus Stockhausen [Tue, 27 Aug 2024 12:01:57 +0000 (08:01 -0400)]
realtek: 6.6: refactor mac config and link up for RTL83xx

Since kernel commit c5714f68a76bcad3d ("net: phylink: explicitly invalidate
link_state members in mac_config") it should be clear that link data can
only be used in mac_link_up(). Refactor that for the RTL83xx targets.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: harden fw_init_cmdline()
Markus Stockhausen [Sun, 25 Aug 2024 17:22:28 +0000 (13:22 -0400)]
realtek: 6.6: harden fw_init_cmdline()

Some devices (e.g. HP JG924A) hand over other than expected kernel boot
arguments. Looking at these one can see:

fw_init_cmdline: fw_arg0=00020000
fw_init_cmdline: fw_arg1=00060000
fw_init_cmdline: fw_arg2=fffdffff
fw_init_cmdline: fw_arg3=0000416c

Especially fw_arg2 should be the pointer to the environment and it looks
very suspicous. It is not aligned and the address is outside KSEG0 and
KSEG1. Booting the device will result in a hang. Do better at verifying
the address.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Suggested-by: Bjørn Mork <bjorn@mork.no>
2 months agorealtek: 6.6: set phylink supported_interfaces
Markus Stockhausen [Thu, 22 Aug 2024 06:01:30 +0000 (02:01 -0400)]
realtek: 6.6: set phylink supported_interfaces

The supported_interfaces bitmap cannot be empty since mainline kernel
commit de5c9bf40c45 ("net: phylink: require supported_interfaces to
be filled"). Fix the dsa and ethernet driver accordingly.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: adapt message to 64 bit variable
Markus Stockhausen [Sun, 18 Aug 2024 07:16:28 +0000 (03:16 -0400)]
realtek: 6.6: adapt message to 64 bit variable

used_keys has been changed from 32 to 64 bits.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: change to current dsa structures
Markus Stockhausen [Thu, 22 Aug 2024 05:55:36 +0000 (01:55 -0400)]
realtek: 6.6: change to current dsa structures

The DSA framework has changed a bit since 6.1, lets adapt to match.
Currently there is no one-patch-fits-all solution to directly fix
all errors up to 6.6. So cover the final differences with this
second patch.

Most notable upstream changes are:
  - a88dd7538461 ("net: dsa: remove legacy_pre_march2020 detection")
  - 53d04b981110 ("net: dsa: remove phylink_validate() method")

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
[Minor checkpatch.pl cleanups]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2 months agorealtek: 6.6: change to 6.1 dsa structures
Markus Stockhausen [Tue, 13 Aug 2024 17:17:33 +0000 (13:17 -0400)]
realtek: 6.6: change to 6.1 dsa structures

The DSA framework has changed a bit since 5.15, lets adapt to match.
Currently there is no one-patch-fits-all solution to directly fix
all errors up to 6.6. So at least take all the already known changes
that cover differences between 5.15 and 6.1

Most notable upstream changes are:
  - d3eed0e57d5d ("net: dsa: keep the bridge_dev and bridge_num as part
    of the same structure")
    Update of port_bridge_{join,leave}: use same helper as upstream
  - c26933639b54 ("net: dsa: request drivers to perform FDB isolation")
    Update of port_fdb_{add,del}, port_mdb_{add,del}
  - dedd6a009f41 ("net: dsa: create a dsa_lag structure")
    Update of port_lag_{join,leave}

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
[align updates with upstream, add references to upstream commits]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: refresh patch net-dsa-add-rtl838x-support-for-tag-trailer
Markus Stockhausen [Mon, 9 Sep 2024 12:18:31 +0000 (08:18 -0400)]
realtek: 6.6: refresh patch net-dsa-add-rtl838x-support-for-tag-trailer

No content changes. Only take over the new patch locations.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: copy patch net-dsa-add-rtl838x-support-for-tag-trailer
Markus Stockhausen [Mon, 9 Sep 2024 12:11:13 +0000 (08:11 -0400)]
realtek: 6.6: copy patch net-dsa-add-rtl838x-support-for-tag-trailer

Copy the patch file to 6.6. Reorder it in the 7xx range.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: refresh patch add-rtl-phy
Markus Stockhausen [Mon, 9 Sep 2024 12:09:46 +0000 (08:09 -0400)]
realtek: 6.6: refresh patch add-rtl-phy

No content changes. Only take over the new patch locations. All errors
that wil arise from compiling with the phy driver will be covered by
follow up patches.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: copy patch add-rtl-phy.patch
Markus Stockhausen [Mon, 9 Sep 2024 11:55:57 +0000 (07:55 -0400)]
realtek: 6.6: copy patch add-rtl-phy.patch

Copy the patch file to 6.6. Reorder it in the 7xx range.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: refresh patch net-dsa-add-support-for-rtl838x-switch
Markus Stockhausen [Mon, 9 Sep 2024 11:52:41 +0000 (07:52 -0400)]
realtek: 6.6: refresh patch net-dsa-add-support-for-rtl838x-switch

No content changes. Only adapt the failing hooks and take over the
new patch locations. All errors that wil arise from compiling with
the dsa driver will be covered by follow up patches.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: copy patch net-dsa-add-support-for-rtl838x-switch
Markus Stockhausen [Mon, 9 Sep 2024 11:23:01 +0000 (07:23 -0400)]
realtek: 6.6: copy patch net-dsa-add-support-for-rtl838x-switch

Copy the patch file to 6.6. Reorder it in the 7xx range.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: convert ethernet driver to phylink_pcs_ops
Markus Stockhausen [Mon, 19 Aug 2024 16:26:48 +0000 (12:26 -0400)]
realtek: 6.6: convert ethernet driver to phylink_pcs_ops

A lot of stuff has been converted to the phylink_pcs_ops structure.
Adapt the ethernet driver to make use of it.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: drop netif_napi_add weight
Markus Stockhausen [Mon, 19 Aug 2024 15:40:45 +0000 (11:40 -0400)]
realtek: 6.6: drop netif_napi_add weight

We no longer are required to pass the weight to netif_napi_add.

See commit b48b89f9c189 ("net: drop the weight argument from netif_napi_add").

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: rework mdio bus driver
Markus Stockhausen [Sun, 25 Aug 2024 08:11:39 +0000 (04:11 -0400)]
realtek: 6.6: rework mdio bus driver

This is not a surprise. Before upgrade to 6.6 we refactored the mdio part of
the ethernet driver and knew that changes will come. Drop all unnecessary
stuff from the old world and adapt to the new kernel.

- remove legacy functions
- directly link new functions
- adapt to new shared base address
- remove references to old MDIO bus capabilities

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: refresh patch net-ethernet-add-support-for-rtl838x-ethernet
Markus Stockhausen [Mon, 9 Sep 2024 11:00:27 +0000 (07:00 -0400)]
realtek: 6.6: refresh patch net-ethernet-add-support-for-rtl838x-ethernet

No content changes. Only take over the new patch locations. All errors
that will arise from compiling with the ethernet driver will be covered
by follow up patches.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: copy patch net-ethernet-add-support-for-rtl838x-ethernet
Markus Stockhausen [Mon, 9 Sep 2024 10:53:23 +0000 (06:53 -0400)]
realtek: 6.6: copy patch net-ethernet-add-support-for-rtl838x-ethernet

Copy the patch file to 6.6. Reorder it in the 7xx range.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: rework patch net-phy-sfp-add-support-for-SMBus
Markus Stockhausen [Mon, 9 Sep 2024 10:50:44 +0000 (06:50 -0400)]
realtek: 6.6: rework patch net-phy-sfp-add-support-for-SMBus

With the new kernel the MDIO bus gets created after the smbus
read/write functions are used. Make use of native functions.
Relocate bus initialization into a separate function to make
patch easier to read.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: copy patch net-phy-sfp-add-support-for-SMBus
Markus Stockhausen [Mon, 9 Sep 2024 08:26:18 +0000 (04:26 -0400)]
realtek: 6.6: copy patch net-phy-sfp-add-support-for-SMBus

Copy the patch file to 6.6. Reorder it in th 7xx range.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: refresh patch net-phy-add-an-MDIO-SMBus-library
Markus Stockhausen [Mon, 9 Sep 2024 08:24:24 +0000 (04:24 -0400)]
realtek: 6.6: refresh patch net-phy-add-an-MDIO-SMBus-library

No content changes. Two hooks had to be adapted to take over the
new patch locations.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: copy patch net-phy-add-an-MDIO-SMBus-library
Markus Stockhausen [Mon, 9 Sep 2024 07:56:38 +0000 (03:56 -0400)]
realtek: 6.6: copy patch net-phy-add-an-MDIO-SMBus-library

Copy the patch file to 6.6. Reorder it in the 7xx range.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: refresh patch net-phy-sfp-re-probe-modules-on-DEV_UP-event
Markus Stockhausen [Mon, 9 Sep 2024 07:44:59 +0000 (03:44 -0400)]
realtek: 6.6: refresh patch net-phy-sfp-re-probe-modules-on-DEV_UP-event

No content changes. Only take over the new patch locations.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: copy patch net-phy-sfp-re-probe-modules-on-DEV_UP-event
Markus Stockhausen [Mon, 9 Sep 2024 07:32:14 +0000 (03:32 -0400)]
realtek: 6.6: copy patch net-phy-sfp-re-probe-modules-on-DEV_UP-event

Copy the patch file to 6.6. Reorder it in the 7xx range.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: refresh patch drivers-net-phy-eee-support-for-rtl838x
Markus Stockhausen [Mon, 9 Sep 2024 07:28:58 +0000 (03:28 -0400)]
realtek: 6.6: refresh patch drivers-net-phy-eee-support-for-rtl838x

No content changes. One hook had to be adapted.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: copy patch drivers-net-phy-eee-support-for-rtl838x
Markus Stockhausen [Mon, 9 Sep 2024 07:13:06 +0000 (03:13 -0400)]
realtek: 6.6: copy patch drivers-net-phy-eee-support-for-rtl838x

Copy the patch file to 6.6. Reorder it in the 7xx range.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: refresh patch include-linux-add-phy-ops-for-rtl838x
Markus Stockhausen [Mon, 9 Sep 2024 07:11:27 +0000 (03:11 -0400)]
realtek: 6.6: refresh patch include-linux-add-phy-ops-for-rtl838x

No content changes. Hook failed and had to be adapted.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: copy patch include-linux-add-phy-ops-for-rtl838x
Markus Stockhausen [Mon, 9 Sep 2024 06:43:19 +0000 (02:43 -0400)]
realtek: 6.6: copy patch include-linux-add-phy-ops-for-rtl838x

Copy the patch file to 6.6. Reorder it in the 7xx range.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: refresh patch include-linux-phy-increase-phy-address-number-for-rtl839x
Markus Stockhausen [Mon, 9 Sep 2024 06:40:42 +0000 (02:40 -0400)]
realtek: 6.6: refresh patch include-linux-phy-increase-phy-address-number-for-rtl839x

No content changes. Only take over the new patch locations.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: copy patch include-linux-phy-increase-phy-address-number-for-rtl839x
Markus Stockhausen [Mon, 9 Sep 2024 06:32:33 +0000 (02:32 -0400)]
realtek: 6.6: copy patch include-linux-phy-increase-phy-address-number-for-rtl839x

Copy the patch file to 6.6. Reorder it in the 7xx range.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: rework patch include-linux-add-phy-hsgmii-mode
Markus Stockhausen [Mon, 9 Sep 2024 06:28:42 +0000 (02:28 -0400)]
realtek: 6.6: rework patch include-linux-add-phy-hsgmii-mode

Take over the new patch locations and add references to the link mode into
phylink_sfp_interface_preference[] and phylink_get_capabilities().

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 months agorealtek: 6.6: copy patch include-linux-add-phy-hsgmii-mode
Markus Stockhausen [Mon, 9 Sep 2024 06:12:51 +0000 (02:12 -0400)]
realtek: 6.6: copy patch include-linux-add-phy-hsgmii-mode

Copy the patch file to 6.6. Reorder it in the 7xx range.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>