Commit graph

32545 commits

Author SHA1 Message Date
Mantas Pucka
c88c2d40d0 qualcommbe: add PCS driver fixes
After update to v6.12 some PCS driver fixes were dropped and additional
are needed due to updated driver.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18435
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-25 10:20:37 +02:00
Alexandru Gagniuc
8c14f33bb4 qualcommbe: v6.12: update PCS patches to use .pcs_validate()
The original PCS driver did not use the .pcs_validate() in
phylink_pcs_ops. The patches for 1000/2500base-x and 10g modes were
taken from this old driver, and thus did not bother with
.pcs_validate(). Thus, even though these modes are supported, phylink
would not enable them.

To fix these, list these modes in .pcs_validate(). Also list them in
ipq_pcs_clk_rate_get(). While the latter does not appear to change
behavior, it does change the clock rates listed under
/sys/kernel/debug/clk

Co-developed-by: Mantas Pucka <mantas@8devices.com>
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18435
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-25 10:20:37 +02:00
Mantas Pucka
2c6a830c3d qualcommbe: v6.12: drop upstreamed patch
0102-arm64-dts-qcom-ipq9574-Fix-USB-vdd-info.patch was merged in 6.12.34
Other patches automatically refreshed.

Fixes: cb1b656027 ("kernel: bump 6.12 to 6.12.34")
Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/19232
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-25 10:18:23 +02:00
Daniel Golle
3fb1605931 ipq806x: add support for IgniteNet SunSpot AC Wave2
The IgniteNet SS-W2-AC2600 is an 802.11ac outdoor (IP-55) access point.
FCC ID: HEDSSW2AC2600

Specification:
 - Qualcomm dual-core IPQ8068 @ 1.4 GHz
 - 256 MB of DDR3L RAM (2x Winbond W631GU6KB-12)
 - 16 MB of SPI NOR (Winbond W25Q128FW)
 - 128 MB of NAND (Macronix MX30UF1G18AC)
 - Qualcomm QCA9994 2.4GHz 802.11bgn
 - Qualcomm QCA9994 5GHz 802.11ac
 - 2 x 10/100/1000 Mbit/s Ethernet
 - 115200, 8N1 RS-232 console (unpopulated RJ-45)
 - Reset button
 - Power and WLAN LEDs
 - Powered via 802.3at PoE or 12V 2A barrel connector

Tested-by: Elektra Wagenrad <onelektra@gmx.net>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-06-25 02:07:02 +01:00
Erik Servili
9df3d6b21c qualcommax: ipq60xx: WAX610 remove unmountable oem partitions on upgrade
When using TFTP install method on a fresh unit, wifi_fw and ubi_rootfs UBI volumes must be removed or will hang when mounting.

Signed-off-by: Erik Servili <serverror@serverror.com>
Link: https://github.com/openwrt/openwrt/pull/19215
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-24 13:51:15 +02:00
Tim Harvey
2b0b353104 imx: venice: disable PCI AER
As a workaround to an issue causing hang during PCI enumeration on
imx8mp with a specific PCIe switch, disable PCI AER.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/19189
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-23 11:49:12 +02:00
Tim Harvey
6bb42ddf0e imx: venice: add dt overlay support
Enable DT overlay support:
 - add dt-overlay to board features
 - add DEVICE_DTS_OVERLAYS
 - update the boot script to resize before applying each overlay

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/19189
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-23 11:49:12 +02:00
Tim Harvey
5c9460a4da imx: 6-12: add additional patches
Backport some additional upstream patches:
 - 6.13-arm64-dts-imx8mm-venice-gw73xx-remove-compatible-in-overlay-files.patch
   (this resolves some issues when using dt overlays on gw73xx-0x)
 - 6.16-PCI-imx6-Skip-link-up-workaround-for-newer-platforms.patch
 - pending-PCI-imx6-Remove-apps_reset-toggle-in-_core_reset-function
   (these resolve enumeration issues on imx8mm/imx8mp with a pcie switch)

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/19189
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-23 11:49:12 +02:00
Anton Yu. Ivanusev
7aecbefb52 ramips: mt76x8: add support for Keenetic 4G (KN-1212)
Specification:
SoC: MediaTek MT7628NN
RAM: 128 MB, EtronTech EM68C16CWQG-25H (DDR2)
Flash: 32MB, Winbond 25Q256JVFQ (Dual Boot, SPI)
Switch: MediaTek MT7628AN, 4 ports 100 Mbps
WiFi: MediaTek MT7603 2T2R/2.4GHz 802.11n
GPIO: 3 buttons (Wi-Fi, Reset, FN), 3 LEDs (Power, Internet, Wi-Fi), 1 port USB 2.0

Disassembly:
At the bottom, under the LEDs, there are 2 screws hidden by rubber feet. After removing the screws, pry the gray plastic part around (it is secured with latches) and remove it.

Serial Interface:
The serial interface can be connected to the 5 pin dots located on the right between the operating mode switch and the antenna.
Pins (from antenna to operating mode switch):
VCC
TX
RX
NC
GND
Settings: 115200, 8N1

Flashing via OEM recovery software:
1. Download the OEM recovery software from the manufacturer's website
2. Download the firmware image (for OpenWRT it is *-squashfs-factory.bin), rename it to KN-1212_recovery.bin
3. Replace the file in the fw folder OEM recovery software with the file from step 2.
4. Run the OEM recovery software and follow the instructions.

Flashing via TFTP:
1. Connect your PC and router to port 1-3, configure PC interface using IP 192.168.1.2, mask 255.255.255.252
2. Serve the firmware image (for OpenWRT it is *-squashfs-factory.bin) renamed to KN-1212_recovery.bin via TFTP
3. Power up the router while pressing Reset button on the back
4. Release Restart button when Power LED starts blinking

To revert back to OEM firmware:
The return to the OEM firmware is carried out by using the methods described above with the help of the appropriate firmware image.

When using OEM bootloader, the firmware image size cannot exceed the size of one OEM «Firmware_x» partition or Kernel + rootFS size.

Signed-off-by: Anton Yu. Ivanusev <ivanusevanton@yandex.ru>
Link: https://github.com/openwrt/openwrt/pull/19157
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-22 23:13:27 +02:00
Markus Stockhausen
83880cd01e realtek: Use Otto timer on RTL931x
Until now the timer management on the RTL931x devices depends
on the MIPS default timer. Looking at the clock progress on
these devices one can see that it is totally off. It is running
at half the required speed (e.g. if 1 minute passes the date
command shows that according to the timers only 30 seconds have
elapsed). This is a mix from wrong DTS and bad startup code.

This is not only a cosmetic issue but has effects on every
delay operation inside the kernel. Switch RTL931x to the proven
Otto timer.

Tested on LGS352C based on RTL9311.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19205
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 23:12:02 +02:00
Markus Stockhausen
ee46517a63 realtek: build Otto timer for RTL931x
The Otto timer is very helpful on the RTL931x devices.
Include it into the builds.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19205
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 23:12:02 +02:00
Markus Stockhausen
f1257b1ca3 realtek: backport MIPS GIC patch
Upstream has gained support for forced affinity settings in the MIPS
GIC interrupt controller. This is needed to enable the Otto timer on
the RTL931x platform. See

https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/
commit/?id=2250db8628a0d8293ad2e0671138b848a185fba1

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19205
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 23:12:02 +02:00
INAGAKI Hiroshi
97af506edf mvebu: add support for Check Point V-81
Check Point V-80 (Quantum Spark 1590 Appliance) is an Appliance, based
on Armada 8040 (88F8040).

Specification:

- SoC             : Marvell Armada 8040 (88F8040)
- RAM             : DDR4 2 GiB (4x 512 MiB chip)
- Flash           : eMMC 4 GiB
- Ethernet        : 10x 10/100/1000 Mbps
  - LAN 1-8       : Marvell 88E6393X
  - WAN           : Marvell 88E1512
  - DMZ           : Marvell 88E1512 (RJ-45/SFP combo)
- LEDs/Keys (GPIO): 11x/1x
- UART            : "CONSOLE" port (USB 1.1 Type-C)
  - chip          : Silicon Labs CP2102N
  - port          : ttyS0
  - settings      : 115200bps 8n1
- HW Monitoring   : 2x nuvoTon NCT7802Y
- USB             : USB 3.0 Type-A
- Power           : 12 VDC, 3.3 A
  - plug          : DC Plug 2.5/5.5 mm (inner/outer)

Flash instruction (common):

1. Boot V-81 normally
2. Login to the vendor CLI (default: admin/admin) and login to the Linux
   CLI by `expert` command
3. Update U-Boot environment variables by the following commands

   fw_setenv bootcmd_ow_usb 'usb start; load usb 0:1 ${loadaddr} boot.scr && source ${loadaddr}'
   fw_setenv bootcmd_ow_sd 'load mmc 0:1 ${loadaddr} boot.scr && source ${loadaddr}'
   fw_setenv bootcmd_ow_emmc 'run set_mmc_internal; mmc read ${loadaddr} ${prim_header_mmc_blk} 4 && source ${loadaddr}'
   fw_setenv bootcmd 'run bootcmd_ow_usb; run bootcmd_ow_sd; run bootcmd_ow_emmc; run bootcmd_part${activePartition};'

   Attention: don't forget single quatations of values to prevent
              expansion of variables

4. Turn off the device

Flash instruction (USB-boot/SD-boot):

1. Extract and burn (squashfs|ext4)-sdcard.img.gz to USB storage or
   MicroSD card
2. Connect that storage to V-81
3. Turn on V-81 and it will be booted with OpenWrt in that USB storage

Flash instruction (eMMC-boot):

1. Copy initramfs image, dtb and bootsctipt to the USB storage with
   renaming

   initramfs.bin -------> Image
   dtb -----------------> armada-8040-v-81.dtb
   bootscript (.scr) ---> boot.scr

2. Connect that storage to the USB 3.0 port on V-81
3. Turn on V-81 and it will be booted with OpenWrt initramfs image in
   that USB storage
4. Upload (squashfs|ext4)-sysupgrade.gz to V-81
5. Perform sysupgrade with the uploaded image
6. Wait ~100 seconds to complete flashing

Reverting to stock firmware:

1. Turn on V-81 and interrupt booting by Ctrl + C
2. Select "4. Restore to Factory Defaults (local)"
3. Wait ~180 seconds to complete restoring and rebooting

Notes:

- The partition table in the internal eMMC has single partition, but
  "blkdevparts=" parameter will be passed from the bootloader and that
  definition will be used instead.

- The port-side LED pairs of RJ-45/SFP ports on V-81 are switched by a
  GPIO pin of pin7 on &cp0_gpio2. (High(1): RJ-45, Low(0): SFP)
  This needs to be switched manually.

- The MicroSD card slot is too unstable and the following messages are
  printed without "marvell,xenon-phy-slow-mode;" property.

  [   97.060851] mmc0: error -84 whilst initialising SD card
  [   97.137049] mmc0: error -84 whilst initialising SD card
  [   97.214315] mmc0: error -84 whilst initialising SD card
  ...

- There are no detailed information about maximum power consumption
  limit of the SFP port or optional DSL-SFP modules sold officially.
  But the power requirement of almost DSL-SFP modules are 3.3V/700mA, so
  set the maximum value of the SFP port to 2000 mW (Power Level III).

- Do not insert a MicroSD card before turning of the device when OpenWrt
  installation. The stock firmware deletes all files in the first
  partition automatically, to use it as a storage for logs.

MAC addresses:

LAN: 00:1C:7F:xx:xx:FA (mmcblk1boot0, ethaddr  (text))
WAN: 00:1C:7F:xx:xx:F9 (mmcblk1boot0, eth2addr (text))
DMZ: 00:1C:7F:xx:xx:FB (mmcblk1boot0, eth1addr (text))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16904
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-22 22:17:20 +02:00
INAGAKI Hiroshi
35c851b813 mvebu: add support for Check Point V-80
Check Point V-80 (Quantum Spark 1550 Appliance) is an Appliance, based
on Armada 7040 (88F7040).

Specification:

- SoC             : Marvell Armada 7040 (88F7040)
- RAM             : DDR4 2 GiB (4x Nanya NT5AD512M8D3-HR)
- Flash           : eMMC 4 GiB (Toshiba THGBMNG5D1LBAIL)
- Ethernet        : 6x 10/100/1000 Mbps
  - LAN 1-5       : Marvell 88E6352
  - WAN           : Marvell 88E1512
- LEDs/Keys (GPIO): 6x/1x
- UART            : "CONSOLE" port (USB 1.1 Type-C)
  - chip          : Silicon Labs CP2102N
  - port          : ttyS0
  - settings      : 115200bps 8n1
- HW Monitoring   : 2x nuvoTon NCT7802Y
- USB             : USB 3.0 Type-A
- Power           : 12 VDC, 3.3 A
  - plug          : DC Plug 2.5/5.5 mm (inner/outer)

Flash instruction (common):

1. Boot V-80 normally
2. Login to the vendor CLI (default: admin/admin) and login to the Linux
   CLI by `expert` command
3. Update U-Boot environment variables by the following commands

   fw_setenv bootcmd_ow_usb 'usb start; load usb 0:1 ${loadaddr} boot.scr && source ${loadaddr}'
   fw_setenv bootcmd_ow_emmc 'run set_mmc_internal; mmc read ${loadaddr} ${prim_header_mmc_blk} 4 && source ${loadaddr}'
   fw_setenv bootcmd 'run bootcmd_ow_usb; run bootcmd_ow_emmc; run bootcmd_part${activePartition};'

   Attention: don't forget single quatations of values to prevent
              expansion of each variables

4. Turn off the device

Flash instruction (USB-boot):

1. Burn (squashfs|ext4)-sdcard.img.gz to USB storage
2. Connect that storage to the USB 3.0 port on V-80
3. Turn on V-80 and it will be booted with OpenWrt in that USB storage

Flash instruction (eMMC-boot):

1. Copy initramfs image, dtb and bootsctipt to the USB storage with
   renaming

   initramfs.bin -------> Image
   dtb -----------------> armada-7040-v-80.dtb
   bootscript (.scr) ---> boot.scr

2. Connect that storage to the USB 3.0 port on V-80
3. Turn on V-80 and it will be booted with OpenWrt initramfs image in
   that USB storage
4. Upload (squashfs|ext4)-sysupgrade.gz to V-80
5. Perform sysupgrade with the uploaded image
6. Wait ~100 seconds to complete flashing

Reverting to stock firmware:

1. Turn on V-80 and interrupt booting by Ctrl + C
2. Select "4. Restore to Factory Defaults (local)"
3. Wait ~180 seconds to complete restoring and rebooting

Notes:

- V-80 has some HW versions. Internal MicroSD card slot and mPCIe slot
  is available on some HW versions, but not on the other HW versions.

  confirmed (MicroSD/mPCIe slots):

  - 1.0.1: unavailable
  - 1.0.3: available

- The partition table in the internal eMMC has single partition, but
  "blkdevparts=" parameter will be passed from the bootloader and that
  definition will be used instead.

MAC addresses:

LAN: 00:1C:7F:xx:xx:4B (mmcblk1boot0, ethaddr (text))
WAN: 00:1C:7F:xx:xx:4A (mmcblk1boot0, eth1addr (text))

Tested-by: Yanase Yuki <dev@zpc.st>
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16904
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-22 22:17:20 +02:00
INAGAKI Hiroshi
2c379af543 mvebu: add specific signature support to Build/boot-scr
Add image-specific signature support to Build/boot-scr.
This is required to switch root devices passed to the kernel on Check
Point V-80 and V-81.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16904
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-22 22:17:20 +02:00
INAGAKI Hiroshi
61f3e2d132 mvebu: cortexa72: enable emmc feature
Enable "emmc" feature to use the emmc helpers on sysupgrade.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16904
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-22 22:17:20 +02:00
INAGAKI Hiroshi
e10a811408 mvebu: cortexa72: enable CONFIG_CMDLINE_PARTITION for blkdevparts
Enable CONFIG_CMDLINE_PARTITION symbol to use "blkdevparts=" parameter
support on Check Point V-80.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16904
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-22 22:17:20 +02:00
John Audia
515db1e069 x86: config-6.12: enable RAPL interface
Expose the sysfs interface to userspace tools for power monitoring.
Useful for tracking energy usage in CPU package, cores, DRAM, etc.

Build system: x86/64
Build-tested: x86/64
Run-tested: x86/64

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18255
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-22 20:10:12 +02:00
jinkela air
1e00b92597 mediatek: Ruijie RG-X60 Pro: Fix LAN port status light
Fix the status indicator light of the LAN port.

Signed-off-by: jinkela air <air_jinkela@163.com>
Link: https://github.com/openwrt/openwrt/pull/19135
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-22 19:58:29 +02:00
cheng wang
594da824a4 mediatek: add support for Cudy TR3000 256MB v1 flash version
This device is similar to the Cudy TR3000 v1 128MB version.
The difference is that the flash memory is 128mb and the other is 256mb

Hardware:
 - SoC: MediaTek MT7981B
 - CPU: 2x 1.3 GHz Cortex-A53
 - Flash: 256 MiB SPI NAND
 - RAM: 512 MiB
 - WLAN: 2.4 GHz, 5 GHz (MediaTek MT7976CN, 802.11ax)
 - Ethernet: 1x 10/100/1000/2500 Mbps RTL8221B WAN, 1x10/100/1000 Mbps MT7981 LAN
 - USB 3.0 port
 - Buttons: 1 Reset button, 1 slider button
 - LEDs: 1x Red, 1x White
 - Power: 5 VDC, 3 A

Installation:
Cudy has distributed intermediate firmware to make installation easier
1. Go to [Cudy CN official website](https://www.cudy.com/zh-cn/pages/download-center/tr3000-1-0) and download the intermediate firmware
2. Upgrade the intermediate firmware on the page
3. Visit the intermediate firmware 192.168.1.1 webpage and use the sysupgrade image to update

other:
If you fail to flash the device, you can use TFTP to flash back to the original firmware.
1. Ask Cudy CN official customer service for the original firmware
2. With the router off, press the RESET button. While the router is turning on, the button should continue to be pressed for at least 5 seconds.
3. A u-boot shell will automatically open.
4. Connect to LAN and set your IP to 192.168.1.88/24. Configure a TFTP server and an recovery.bin firmware file.

Signed-off-by: cheng wang <typedelta@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19167
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-22 19:17:25 +02:00
Jonas Jelonek
12f13b227c realtek: remove patches, files and config for 6.6
Remove all files etc. for 6.6 because 6.12 is default now.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19139
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 16:38:11 +02:00
Jonas Jelonek
1cd68e915d realtek: switch to 6.12 as default
Use Linux 6.12 as default for all subtargets.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19139
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 16:38:11 +02:00
Markus Stockhausen
cbf0d662c2 realtek: make use of serdes helper for Zyxel XGS1210-12
Use the new INTERNAL_PHY_SDS() helper to describe the SFP ports. For
this device it is only a substitution of the existing DTS configuration.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18851
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 16:37:33 +02:00
Markus Stockhausen
eea6c5b3ea realtek: make use of serdes helper for Zyxel XGS1250-12
Use the new INTERNAL_PHY_SDS() helper to describe the SFP ports. For
this device it is only a substitution of the existing DTS configuration.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18851
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 16:37:33 +02:00
Markus Stockhausen
761b5d3906 realtek: make use of serdes helper for TP-Link TL-ST1008F v2.0
Use the new INTERNAL_PHY_SDS() helper to describe the SFP ports. For
this device it is only a substitution of the existing DTS configuration.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18851
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 16:37:33 +02:00
Markus Stockhausen
44df763825 realtek: make use of serdes helper for XIKESTOR SKS8300-8X
Use the new INTERNAL_PHY_SDS() helper to describe the SFP ports. For
this device it is only a substitution of the existing DTS configuration.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18851
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 16:37:33 +02:00
Markus Stockhausen
880565956d realtek: make use of serdes helper for Zyxel GS1900-24(HP) v1/v2
Use the new INTERNAL_PHY_SDS() helper to describe the SFP ports. With
this change the driver now knows that ports 24/26 are driven by serdes
4/5.

For the RTL838x devices this is currently only an additional information
for the mdio bus. It is not evaluated further because everything is
hardcoded.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18851
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 16:37:33 +02:00
Markus Stockhausen
13a6e0620f realtek: make use of serdes helper for D-Link DGS-1210-26
Use the new INTERNAL_PHY_SDS() helper to describe the SFP ports. With
this change the driver now knows that ports 24/26 are driven by serdes
4/5.

For the RTL838x devices this is currently only an additional information
for the mdio bus. It is not evaluated further because everything is
hardcoded.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18851
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 16:37:33 +02:00
Markus Stockhausen
cfd2db41a4 realtek: make use of serdes helper for D-Link DGS-1210-10P
Use the new INTERNAL_PHY_SDS() helper to describe the SFP ports. With
this change the driver now knows that ports 24/26 are driven by serdes
4/5.

For the RTL838x devices this is currently only an additional information
for the mdio bus. It is not evaluated further because everything is
hardcoded.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18851
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 16:37:33 +02:00
Markus Stockhausen
5fd72e7518 realtek: make use of serdes helper for Zyxel GS1900-10HP
Use the new INTERNAL_PHY_SDS() helper to describe the SFP ports. With
this change the driver now knows that ports 24/26 are driven by serdes
4/5.

For the RTL838x devices this is currently only an additional information
for the mdio bus. It is not evaluated further because everything is
hardcoded.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18851
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 16:37:33 +02:00
Markus Stockhausen
8b04cddd2e realtek: make use of serdes helper for TP-Link SG2xxx
Use the new INTERNAL_PHY_SDS() helper to describe the SFP ports. With
this change the driver now knows that ports 24/26 are driven by serdes
4/5.

For the RTL838x devices this is currently only an additional information
for the mdio bus. It is not evaluated further because everything is
hardcoded.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18851
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 16:37:33 +02:00
Markus Stockhausen
7b2b095cc9 realtek: make use of serdes helper for Panasonic M8EG PN28080K
Use the new INTERNAL_PHY_SDS() helper to describe the SFP ports. With
this change the driver now knows that ports 24/26 are driven by serdes
4/5.

For the RTL838x devices this is currently only an additional information
for the mdio bus. It is not evaluated further because everything is
hardcoded.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18851
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 16:37:33 +02:00
Markus Stockhausen
0cf2db1fa1 realtek: make use of serdes helper for Netgear GS310TP v1
Use the new INTERNAL_PHY_SDS() helper to describe the SFP ports. With
this change the driver now knows that ports 24/26 are driven by serdes
4/5.

For the RTL838x devices this is currently only an additional information
for the mdio bus. It is not evaluated further because everything is
hardcoded.

REMARK! The original commit c829bc1f2c ("realtek: Add support for
Netgear S350 series switches GS308T and GS310TP") says that the SFP
ports are untested. Looking at device internal pictures from
https://techinfodepot.shoutwiki.com/wiki/Netgear_GS310TP there are no
external phys for the SFP ports. So fix port description.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18851
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 16:37:33 +02:00
Markus Stockhausen
d3dbd97043 realtek: make use of serdes helper for HPE 1920 8G
Use the new INTERNAL_PHY_SDS() helper to describe the SFP ports. With
this change the driver now knows that ports 24/26 are driven by serdes
4/5.

For the RTL838x devices this is currently only an additional information
for the mdio bus. It is not evaluated further because everything is
hardcoded.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18851
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 16:37:33 +02:00
Markus Stockhausen
4b72463f3c realtek: make use of serdes helper for Engenius EWS2910P
Use the new INTERNAL_PHY_SDS() helper to describe the SFP ports. With
this change the driver now knows that ports 24/26 are driven by serdes
4/5.

For the RTL838x devices this is currently only an additional information
for the mdio bus. It is not evaluated further because everything is
hardcoded.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18851
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 16:37:32 +02:00
Markus Stockhausen
b172a2473b realtek: make use of serdes helper for D-Link DGS-1210-10MP
Use the new INTERNAL_PHY_SDS() helper to describe the SFP ports. With
this change the driver now knows that ports 24/26 are driven by serdes
4/5.

For the RTL838x devices this is currently only an additional information
for the mdio bus. It is not evaluated further because everything is
hardcoded.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18851
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 16:37:32 +02:00
Markus Stockhausen
9512db4362 realtek: make use of serdes helper for Linksys LGS310C
Use the new INTERNAL_PHY_SDS() helper to describe the SFP ports. With
this change the driver now knows that ports 24/26 are driven by serdes
4/5.

For the RTL838x devices this is currently only an additional information
for the mdio bus. It is not evaluated further because everything is
hardcoded.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18851
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 16:37:32 +02:00
Markus Stockhausen
5703ca465c realtek: add dts helper for internal phy with serdes
Until now only the RTL930x devices make use of the following notation.

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

This indicates that the link is driven by a serdes directly without
external phy. As the devices have multiple serdes it must be clarified
what serdes is responsible for that port.

Nevertheless all other devices have the same requirements. E.g. RTL838x
usually drives port 24 from serdes 4 and port 26 from serdes 5. All this
currently works because the driver has a lot of hardcoded port/serdes
mapping.

Make the situation better by adding dts helpers that can describe the
topology as needed.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18851
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 16:37:32 +02:00
Hauke Mehrtens
f62c33bc4a kernel: Fix IPv6 UDP fragmentation regression
Fixes a IPv6 UDP fragmentation regression introduced in v6.6.93.

Fixes: https://github.com/openwrt/openwrt/issues/19198
Link: https://github.com/openwrt/openwrt/pull/19199
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-22 13:32:51 +02:00
Hauke Mehrtens
a944a6d6b1 kernel: Add missing config option
This broke the armsr/armv8 build.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Link: https://github.com/openwrt/openwrt/pull/19200
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 11:28:09 +02:00
Hauke Mehrtens
c695cf6109 kernel: Refresh kernel configs
Run this script:
./scripts/kconfig-reorder.sh

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Link: https://github.com/openwrt/openwrt/pull/19200
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 11:28:09 +02:00
Joe Holden
502b2f4ee5 realtek: switch HP-1920-48G to new shared gpio driver
This allows the SFPs to work without manually switching port type.

Signed-off-by: Joe Holden <jwh@zorins.us>
Link: https://github.com/openwrt/openwrt/pull/18914
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 11:13:01 +02:00
Joe Holden
a37b47a512 rtl839x: fix sfp ports on HPE 1920-48G PoE
The 4 sfp ports on the RTL8214FC are actually wired to the gpio expander instead of internal.

Relatively minor changes to the dts are required, simply overriding some of the properties
inherited from rtl8393_hpe_1920.dtsi.

The speed is reported as 100/full and the media type is incorrect, but the ports pass traffic
just fine.

Signed-off-by: Joe Holden <jwh@zorins.us>
Link: https://github.com/openwrt/openwrt/pull/18914
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 11:13:01 +02:00
Zheng Zhang
f1584bc733 qualcommbe: enable CONFIG_THERMAL and CONFIG_THERMAL_HWMON
The Qualcomm TSENS driver only exposes sensors to as a thermal
zone without registering hwmon, making these temperature sensors
unreadable by lm-sensors. This commit enables CONFIG_THERMAL and
CONFIG_THERMAL_HWMON for qualcommbe target to access the sensors
from hwmon.

Suggested-by: Yao Zi <ziyao@disroot.org>
Signed-off-by: Zheng Zhang <everything411@qq.com>
Link: https://github.com/openwrt/openwrt/pull/19137
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 09:51:01 +02:00
Zheng Zhang
7c22fce0f5 qualcommax: enable CONFIG_THERMAL and CONFIG_THERMAL_HWMON
The Qualcomm TSENS driver only exposes sensors to as a thermal
zone without registering hwmon, making these temperature sensors
unreadable by lm-sensors. This commit enables CONFIG_THERMAL and
CONFIG_THERMAL_HWMON for qualcommax targets to access the sensors
from hwmon.

Suggested-by: Yao Zi <ziyao@disroot.org>
Signed-off-by: Zheng Zhang <everything411@qq.com>
Link: https://github.com/openwrt/openwrt/pull/19137
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-22 09:51:01 +02:00
Thomas Richard
dd57c070e9 stm32: modules: add missing dependency for stm32-dfsdm-adc
Now on Linux 6.12, stm32-dfsdm-adc also depends on
kmod-industrialio-backend.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18740
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-21 14:28:42 +02:00
Thomas Richard
774a22e00e stm32: modules: add kmod-stm32-dcmipp package
Add kernel module package for Digital Camera Memory Interface Pixel
Processor (DCMIPP) support for kernel 6.12.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18740
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-21 14:28:42 +02:00
Thomas Richard
b1e93ee54f stm32: enable 6.12 testing kernel
The stm32 target now supports 6.12 kernel as testing.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18740
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-21 14:28:42 +02:00
Thomas Richard
db05331f38 stm32: 6.12: update kernel 6.12 config
Update stm32mp1 kernel config for 6.12.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18740
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-21 14:28:42 +02:00
Thomas Richard
1cdbddae6e stm32: 6.12: refresh kernel patches
Drop upstreamed patches and refresh remaining ones.

Manually rebased:
- 033-ARM-dts-stm32-rtc-add-LSCO-to-WLAN-BT-module-on-stm3.patch
- 035-ARM-dts-stm32-rtc-add-pin-to-provide-LSCO-on-stm32mp.patch

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18740
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-21 14:28:42 +02:00
Thomas Richard
234eadd07e kernel/stm32: Restore kernel files for v6.6
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: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18740
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-21 14:28:42 +02:00
Thomas Richard
9e57133944 kernel/stm32: Create kernel files for v6.12 (from v6.6)
This is an automatically generated commit.

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

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18740
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-21 14:25:44 +02:00
John Audia
836a4cc6d3 kernel: bump 6.6 to 6.6.94
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.94

Removed upstreamed:
	generic/backport-6.6/421-01-v6.16-spi-bcm63xx-spi-fix-shared-reset.patch[1]
	generic/backport-6.6/421-02-v6.16-spi-bcm63xx-hsspi-fix-shared-reset.patch[2]
	generic/backport-6.6/725-01-v6.16-net-dsa-tag_brcm-legacy-fix-pskb_may_pull-length.patch[3]
	mvebu/patches-6.6/0001-v6.16-pinctrl-armada-37xx-use-correct-OUTPUT_VAL-register-.patch[4]
	mvebu/patches-6.6/0002-v6.16-pinctrl-armada-37xx-set-GPIO-output-value-before-set.patch[5]

Added new back-port:
	generic/backport-6.6/001-powerpc-kernel-Fix-pcc_save_regs-inclusion.patch[6]
All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.94&id=29abb7fc82443bee273ba4623ce319bf7ba1d43d
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.94&id=59d5f3134b5c265df233b7f385bbe718191411be
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.94&id=2e02edb66427e3b8752e1f3dd3cfc1bef3f2357b
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.94&id=39ed85ae485d991ffb24d25629a679c0b22e2d8f
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.94&id=8f0f45a312151a52aae920a091ea4b454ac97caf
6. Addresses a build failure for pcc

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/19183
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-21 13:54:17 +02:00
Shiji Yang
cb1b656027 kernel: bump 6.12 to 6.12.34
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.34

Remove upstreamed patches:
  generic/backport-6.12/421-01-v6.16-spi-bcm63xx-spi-fix-shared-reset.patch [1]
  generic/backport-6.12/421-02-v6.16-spi-bcm63xx-hsspi-fix-shared-reset.patch [2]
  generic/backport-6.12/610-06-v6.16-net-dsa-b53-do-not-enable-RGMII-delay-on-bcm63xx.patch [3]
  generic/backport-6.12/610-08-v6.16-net-dsa-b53-allow-RGMII-for-bcm63xx-RGMII-ports.patch [4]
  generic/backport-6.12/610-09-v6.16-net-dsa-b53-do-not-touch-DLL_IQQD-on-bcm53115.patch [5]
  generic/backport-6.12/611-v6.16-net-dsa-tag_brcm-legacy-fix-pskb_may_pull-length.patch [6]

Manually rebased patches:
  bcm27xx/patches-6.12/950-0665-drm-vc4-tests-Drop-drm-parameter-for-vc4_find_crtc_f.patch [7]

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.34&id=408ca1d1803b223d615f9021055f9ccb4f4863ea
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.34&id=2a98786e258718ff93ef6d6bd26a9a39076e0cb7
[3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.34&id=6d1c93a5c6b0ae87bb7001d8d6fdef3b3be9c6c6
[4] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.34&id=1aa31695bf0dc1ee3e6c559c14db7fd05b6bb102
[5] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.34&id=b2fc08d276797e529cacad6fa9d704a7367090b5
[6] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.34&id=2c32fc56c05aa69439fdfd5e0b25f57e2a158627
[7] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.34&id=aba86d49e5ac3700295ab8c417436abacc19cc32

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19184
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-21 13:50:11 +02:00
Stefan Kalscheuer
7e014bbe0b mvebu: add 6.12 testing kernel
Add 6.12 testing kernel for mvebu target.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/18975
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 23:09:40 +02:00
Stefan Kalscheuer
819f78463c mvebu: 6.12: refresh kernel config
Add new and remove obsolete symbols for Kernel 6.12

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/18975
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 23:09:40 +02:00
Stefan Kalscheuer
1738e87632 mvebu: 6.12: refresh patches
Drop upstreamed patches:
0001-v6.16-pinctrl-armada-37xx-use-correct-OUTPUT_VAL-register-.patch
0002-v6.16-pinctrl-armada-37xx-set-GPIO-output-value-before-set.patch
820-v6.11-01-dt-bindings-firmware-add-cznic-turris-omnia-mcu-bind.patch
820-v6.11-02-platform-cznic-Add-preliminary-support-for-Turris-Om.patch
820-v6.11-03-platform-cznic-turris-omnia-mcu-Add-support-for-MCU-.patch
820-v6.11-04-platform-cznic-turris-omnia-mcu-Add-support-for-powe.patch
820-v6.11-05-platform-cznic-turris-omnia-mcu-Add-support-for-MCU-.patch
820-v6.11-06-platform-cznic-turris-omnia-mcu-Add-support-for-MCU-.patch
820-v6.11-07-ARM-dts-turris-omnia-Add-MCU-system-controller-node.patch
820-v6.11-08-ARM-dts-turris-omnia-Add-GPIO-key-node-for-front-but.patch
820-v6.11-09-platform-cznic-turris-omnia-mcu-Depend-on-OF.patch
820-v6.11-10-platform-cznic-turris-omnia-mcu-Depend-on-WATCHDOG.patch
820-v6.11-11-platform-cznic-turris-omnia-mcu-fix-Kconfig-dependen.patch

Manually refreshed:
310-linksys-use-eth0-as-cpu-port.patch
350-drivers-thermal-step_wise-add-support-for-hysteresis.patch
901-dt-bindings-Add-IEI-vendor-prefix-and-IEI-WT61P803-P.patch
902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch
910-drivers-leds-wt61p803-puzzle-improvements.patch

All other patches automatically refreshed.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/18975
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 23:09:40 +02:00
Stefan Kalscheuer
6354ac76a4 kernel/mvebu: Restore kernel files for v6.6
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: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/18975
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 23:09:40 +02:00
Stefan Kalscheuer
1e1e91a213 kernel/mvebu: Create kernel files for v6.12 (from v6.6)
This is an automatically generated commit.

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

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/18975
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 23:09:40 +02:00
Chukun Pan
782afec6c1 mediatek: 6.12: fix cci driver probe for mt7988d
The patch of kernel 6.12 missing cpufreq part for
mt7988d, causing the ccifreq driver probe to fail.
Add it to avoid mt7988d devices boot hang.

Fixes: a9822e8 ("kernel/mediatek: 6.12: drop patches which have been applied upstream")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2025-06-19 22:53:04 +02:00
Shiji Yang
9817c9186a x86: move common kconfig symbols into target shared config
These kernel config symbols are selected by all sub-targets. We
can merge them together to simplify the config files.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18632
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 22:49:43 +02:00
Shiji Yang
805b5d893c x86: refresh kernel symbol configs
All kernel config symbols are refreshed by `make kernel_oldconfig`.
Some symbols are moved to the generic/config-6.12 because the
refresh tool will automatically trim them.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18632
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 22:49:43 +02:00
Markus Stockhausen
23faf4c485 realtek: activate MIPS power cluster controller for RTL931x
The SMP environment is prepared well for the RTL93X. Now describe the
power cluster controller in the DTS. Tested on RTL9311 based Linksys
LGS352C.

Without patch:

root@OpenWrt:~# dmesg | grep CPU
[    0.140425] CPU1 revision is: 0001a120 (MIPS interAptiv (multi))
[    0.191952] Synchronize counters for CPU 1: done.
[    1.232191] CPU2: failed to start
[    1.237863] No online CPU in core 1 to start CPU3
[    2.273784] CPU3: failed to start
[    2.277589] smp: Brought up 1 node, 2 CPUs

root@OpenWrt:~# cat /proc/cpuinfo  | grep -E "model|proc"
processor               : 0
cpu model               : MIPS interAptiv (multi) V2.0
processor               : 1
cpu model               : MIPS interAptiv (multi) V2.0

With patch:

root@OpenWrt:~# dmesg | grep CPU
[    0.000000] CPU0 revision is: 0001a120 (MIPS interAptiv (multi))
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Failed to get CPU clock: -2
[    0.000000] CPU frequency from device tree: 1000MHz
[    0.133360] smp: Bringing up secondary CPUs ...
[    0.140418] CPU1 revision is: 0001a120 (MIPS interAptiv (multi))
[    0.191950] Synchronize counters for CPU 1: done.
[    0.230103] CPU2 revision is: 0001a120 (MIPS interAptiv (multi))
[    0.289220] Synchronize counters for CPU 2: done.
[    0.326189] CPU3 revision is: 0001a120 (MIPS interAptiv (multi))
[    0.378861] Synchronize counters for CPU 3: done.
[    0.413829] smp: Brought up 1 node, 4 CPUs

processor               : 0
cpu model               : MIPS interAptiv (multi) V2.0
processor               : 1
cpu model               : MIPS interAptiv (multi) V2.0
processor               : 2
cpu model               : MIPS interAptiv (multi) V2.0
processor               : 3
cpu model               : MIPS interAptiv (multi) V2.0

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19110
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 21:56:49 +02:00
Markus Stockhausen
a51359aafd kernel: mtdsplit_uimage: return 0 if not fatal
Introduced with Linux 6.7, in commit:
5c2f7727d437 ("mtd: mtdpart: check for subpartitions parsing result"),
when a parser returns an error, this will be passed up, and
consequently, all parent mtd partitions get torn down.

Adjust the mtdsplit_uimage driver to only return an error if there is a
critical problem in reading from the mtd device or allocating memory.
Otherwise return 0 to indicate that no partitions were found.
Also add logging to indicate what went wrong.

E.g. on Realtek devices that are booted for the first time through
initramfs with OpenWrt never installed before boot log will show

[    0.975518] Creating 7 MTD partitions on "spi0.0":
[    0.981062] 0x000000000000-0x0000000e0000 : "u-boot"
[    1.041320] 0x0000000e0000-0x0000000f0000 : "u-boot-env"
[    1.060683] 0x0000000f0000-0x000000100000 : "u-boot-env2"
[    1.080992] 0x000000100000-0x000000200000 : "jffs2-cfg"
[    1.100988] 0x000000200000-0x000000300000 : "jffs2-log"
[    1.120599] 0x000000300000-0x000000fe0000 : "firmware"
[    1.157426] mtdsplit_uimage: no rootfs after uImage in "firmware"
[    1.176456] mtdsplit_uimage: no rootfs after uImage in "firmware"
[    1.200262] 0x000000fe0000-0x000001000000 : "log"

Similar issues were fixed before with commit ade045084b
("kernel: mtdsplit_minor: return 0 if not fatal") and
c78765213e ("kernel: mtdsplit_uimage: return 0 if not fatal")

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19163
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 20:51:18 +02:00
Valeriy Manzhos
f7dba4ebbc ath79: enable USB by default on hAP ac
Due to a bug, USB is not powered on after boot on hAP ac.
This prevents extroot configurations from working as overlayfs is mounted
before USB device can be powered on. This commit fixes this by enabling USB
in devicetree.

Related discussion links:
- https://forum.openwrt.org/t/usb-power-is-off-on-boot/229007

---

Extroot configuration requires the USB to be powered on before
preinit_main/80_mount_root. Probably the simplest approach is to enable
it in the devicetree. Another approach would be to add a script into
/lib/preinit that will power on USB via /sys/class/gpio/usb-power/value
E.g.
cat /lib/preinit/79_power_on_usb
do_power_on_usb(){
  echo '1' > /sys/class/gpio/usb-power/value
}
boot_hook_add preinit_main do_power_on_usb

Signed-off-by: Valeriy Manzhos <manzhos.va@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19149
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 20:42:02 +02:00
Yijie Jin
c35f2a23c8 ramips: mt7621: add support for JDCloud RE-SP-01B
JDCloud RE-SP-01B is a dual-band WiFi 5 router based on the MT7621AT.

Specifications:
- SoC: MediaTek MT7621AT
- RAM: 512MB DDR3
- Flash: 32MB SPI NOR
- WiFi: MediaTek MT7603EN (2.4GHz), MediaTek MT7615N (5GHz)
- Ethernet: 1x WAN, 2x LAN (Gigabit Ethernet)
- LEDs: red, blue, green (GPIO controlled)
- Button: Reset (GPIO controlled)
- eMMC: Single onboard (32GB/64GB/128GB)
- USB: 1x USB 2.0 port

MAC Address Structure:
The MAC addresses share the structure DC:D8:7C:XX:XX:XX, where:
- WAN, LAN, and 2.4GHz WiFi: same as the label MAC address.
- 5GHz WiFi: label MAC address + 0x800000.

The manufacturer writes the label MAC address at different
offsets depending on the storage version of the device:

e.g.
128GB version:  &config + 0x442a
64GB version:   &config + 0x4429

So `get_mac_ascii()` is used here to search for the
base label MAC address of the device.

Ref:
https://github.com/openwrt/openwrt/pull/17409#discussion_r1899674262
https://github.com/immortalwrt/immortalwrt/commit/c0c480d

Flash Instruction:
A 3rd party bootloader is required to boot the image. You can
use a SOP16 test clip to burn the image/bootloader to the flash.

The official bootloader does provide a web recovery interface
which only accepts an official image. To access it, you will
need to hold the reset button and power on the device, set your
IP address to 192.168.68.2 and visit http://192.168.68.1.

Co-authored-by: Chukun Pan <amadeus@jmu.edu.cn>
Signed-off-by: Yijie Jin <jinyijie@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/17409
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 20:33:57 +02:00
Markus Stockhausen
22854586c6 realtek: fix/add switchcore syscon nodes for RTL838x/RTL839x/RTL931x
The switchcore node is the central location that describes the Realtek switch
register addresses starting at 0x1b000000. It will be used by current and
future regmap enabled device drivers. The upstream MDIO driver already makes
use of it by calling syscon_node_to_regmap(dev->parent->of_node);

In the current DTS base we have 3 issues that should be fixed:

- rtl838x.dtsi has a length of 0x20000 instead of 0x10000
- rtl839x.dtsi has a length of 0x20000 instead of 0x10000
- rtl931x.dtsi has no switchcore node at all

Align these mismatches with the "good" RTL930x template.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18642
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 20:28:30 +02:00
Jonas Jelonek
0bd5d5f748 realtek: rtl931x: fix I2C sda pin
The drivers for I2C bus and mux for RTL931x have an incorrectly defined
SDA0 pin number, causing an error with correct pin numbers specified in
the device tree.

Using the `show tech-support board` on the vendor firmware of a Netgear
MS510TXM shows the correct pin numbers but they don't work with the
drivers. So fix this.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19171
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 19:31:41 +02:00
Jonas Jelonek
24d9fdff2e realtek: rtl931x: add missing function reference for l2_hash_seed
Add missing function reference for the l2_hash_seed call in rtl931x_reg
in the rtl83xx DSA driver part.
While at it, rename the referenced function to proper naming convention
and simplify its content.

The missing reference causes a hard crash after a short time (on
MS510TXM) because the driver assumes the reference always exists.

[  111.785559] CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 00000000, ra == 805469a0
[  111.800991] Oops[#1]:
[  111.801026] CPU: 0 PID: 11 Comm: kworker/u8:0 Tainted: G           O       6.12.33 #0
[  111.801046] Workqueue: dsa_ordered dsa_slave_switchdev_event_work
...
[  111.880600] epc   : 00000000 0x0
[  111.884219] ra    : 805469a0 rtl83xx_port_fdb_add+0x7c/0x204
[  111.890570] Status: 11000403 KERNEL EXL IE
[  111.895263] Cause : 50800008 (ExcCode 02)
[  111.899731] BadVA : 00000000
[  111.902946] PrId  : 0001a120 (MIPS interAptiv (multi))
[  111.956086] Process kworker/u8:0 (pid: 11, threadinfo=0b107c25, task=265aeb31, tls=00000000)
...
[  112.015167] Call Trace:
[  112.019549] [<80170b04>] load_balance+0x494/0x708
[  112.025022] [<807bb368>] dsa_port_do_fdb_add+0x24c/0x340
[  112.031048] [<807bc868>] dsa_switch_event+0xd44/0x13cc
[  112.036845] [<8015867c>] raw_notifier_call_chain+0x48/0x88
[  112.043031] [<807bcf3c>] dsa_tree_notify+0x10/0x3c
[  112.048395] [<807b2a64>] dsa_port_bridge_host_fdb_add+0x15c/0x190
[  112.055459] [<807b4e40>] dsa_slave_switchdev_event_work+0x164/0x1cc
...

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19170
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 19:22:45 +02:00
Shiji Yang
9b777547be ramips: PCIe driver improvements for mt7620 and mt7628
This patchset fixes some PCIe bridge register access issues and
reworks the initialization procedure. It may bring some stability
improvements. To match the driver changes, the memory remap range
was extended and a PCIe reset pinctrl was added to mt7628an.dtsi.

Link: https://lore.kernel.org/all/OSBPR01MB1670555F549B69B9A5E7F133BC72A@OSBPR01MB1670.jpnprd01.prod.outlook.com/
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/18299
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-18 20:35:23 +02:00
Shiji Yang
8e1d58a596 generic: net: phy: psb6970: fix missing-prototypes warnings
Fix the following build warnings on 6.12 kernel:

drivers/net/phy/psb6970.c:426:12: error: no previous prototype for 'psb6970_init' [-Werror=missing-prototypes]
  426 | int __init psb6970_init(void)
      |            ^~~~~~~~~~~~
drivers/net/phy/psb6970.c:434:13: error: no previous prototype for 'psb6970_exit' [-Werror=missing-prototypes]
  434 | void __exit psb6970_exit(void)
      |             ^~~~~~~~~~~~

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19174
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-18 20:23:20 +02:00
Álvaro Fernández Rojas
3f69fe3907 bmips: update BCM531x5 RGMII delays patch
Replace BCM531x5 patch with the one sent upstream.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-18 11:12:00 +02:00
Álvaro Fernández Rojas
0bd694ea22 generic: 6.12: backport accepted BCM5325 patches
Backport accepted BCM5325 patches from net-next.
These patches will be merged in the v6.17 kernel window.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-18 11:11:54 +02:00
Markus Stockhausen
c131870c34 realtek: switch LGS310C devicetree to new i2s-gpio-shared driver
From now on both SFP ports can be used without manual intervention.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18737
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-17 10:52:42 +02:00
Markus Stockhausen
5b8155d434 realtek: activate i2c-gpio-shared driver
Currently only RTL83xx devices are known with shared SCL pins.
So activate the driver only for those targets.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18737
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-17 10:52:42 +02:00
Markus Stockhausen
acd7ecc9ed realtek: add new i2c-gpio-shared driver for shared SCL lines
Some Realtek switches have been designed with I2C busses that share a
single SCL line. The clock line is used for 2 or more busses. This cannot
be used with the standard i2c-gpio driver that relies on distinct SDA
and SCL pairs.

Provide a derived i2c-gpio-shared driver that can be used instead. This
driver can handle up to 4 busses with only a single clock line.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18737
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-17 10:52:42 +02:00
Zoltan HERPAI
326c634829 sunxi: add support for OrangePi Zero 2W
Specifications:
SoC:     Allwinner H618 SoC (Quad core Cortex-A53)
DRAM:    1/1.5/2/4 GB LPDDR4 DRAM (1.5GB version not supported)
Power:   5V USB-C
Video:   HDMI (Type 2.0A - micro)
Storage: microSD / 16MByte SPI flash
Network: Unisoc UWE5622 (no driver currently)
Debug:   serial UART

Flashing instructions:
  Standard sunxi SD card installation procedure - copy image to SD card,
  insert into SD card slot on the device and boot.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2025-06-16 23:10:54 +02:00
Marius Durbaca
c908fc7d95 mediatek: add support for Zbtlink ZBT-Z8102AX v2
Specifications:
SoC: MediaTek MT7981B
RAM: 1024MiB
Flash: SPI-NAND 128 MiB
Switch: 1 WAN, 4 LAN (Gigabit)
USB: two M.2 slots for 5G modems via USB 3.0 hub, external USB 3.0 port
Buttons: Reset, Mesh
Power: DC 12V 1A
WiFi: MT7976CN
UART: 115200n8
UART Layout:
VCC-RX-TX-GND

Installation:
1. Power down the router and hold in the Reset button.
2. While holding in the button power up the router again.
3. Hold the button in for 10 seconds and then release.
4. Use your browser to go to 192.168.1.1
5. If you see a GUI that is for flashing firmware then you have the V2 model.
	If there is no GUI and the router continues to boot up normally
	you have the V1 model.
6. Now use the V2 sysugrade file.

Note: Recovery GUI it can be used to recover from an incorrect firmware flash.

Based on patches adding support for this device by Yannick Chabanois (openmptcprouter)
and Dairyman (ofmodemsandmen)

Signed-off-by: Marius Durbaca <mariusd84@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18514
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-16 22:46:55 +02:00
Shiji Yang
143cfd6113 ramips: dts: increase maximum MMC clock frequency
The High-Speed SD mode stability issue should have been fixed.
Increase the MMC max-frequency to improve the IO speed. We can
still use the sysfs to limit the clock frequency, e.g.

root@OpenWrt:~# echo 25000000 > /sys/kernel/debug/mmc0/clock

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18896
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-16 19:31:51 +02:00
Shiji Yang
3f78e5c918 ramips: mtk-sd: stability improvements for MIPS mt762x SoCs
* Add tuning parameters to improve the stability of 48~50 MHz
  High-Speed SD mode.

* Fix I/O errors on EMMC mode by disabling unsupported auto CMD23
  feature.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18896
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-16 19:31:51 +02:00
Shiji Yang
db76fe6a02 ramips: mtk-sd: backport Host Software Queue support
This new feature has some improvements for random RW performance.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18896
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-16 19:31:51 +02:00
Shiji Yang
e69c867cdf ramips: mtk-mmc: fix data timeout value
The MT7628 programing guide shows that the correct DTOC unit is
1048576 clocks instead of 65536 clocks. This value is also used
by linux upstream mtk-sd driver. Correct the DTOC register and
also round up its value.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18896
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-16 19:31:51 +02:00
Anton Yu. Ivanusev
ca866328d5 ramips: mt76x8: add support for Keenetic Start (KN-1112)
Specification:
SoC: MediaTek MT7628NN
RAM: 128 MB, EtronTech EM68C16CWQG-25H (DDR2)
Flash: 32MB, Winbond 25Q256JVFQ (Dual Boot, SPI)
Switch: MediaTek MT7628AN, 4 ports 100 Mbps
WiFi: MediaTek MT7603 2T2R/2.4GHz 802.11n
GPIO: 2 buttons (Wi-Fi, Reset), 3 LEDs (Power, Internet, Wi-Fi), 1 mode switch

Disassembly:
At the bottom, under the LEDs, there are 2 screws hidden by rubber feet. After removing the screws, pry the gray plastic part around (it is secured with latches) and remove it.

Serial Interface:
The serial interface can be connected to the 5 pin dots located on the right between the operating mode switch and the antenna.
Pins (from antenna to operating mode switch):
VCC
TX
RX
NC
GND
Settings: 115200, 8N1

Flashing via OEM recovery software:
1. Download the OEM recovery software from the manufacturer's website
2. Download the firmware image (for OpenWRT it is *-squashfs-factory.bin), rename it to KN-1112_recovery.bin
3. Replace the file in the fw folder OEM recovery software with the file from step 2.
4. Run the OEM recovery software and follow the instructions.

Flashing via TFTP:
1. Connect your PC and router to port 1-3, configure PC interface using IP 192.168.1.2, mask 255.255.255.252
2. Serve the firmware image (for OpenWRT it is *-squashfs-factory.bin) renamed to KN-1112_recovery.bin via TFTP
3. Power up the router while pressing Reset button on the back
4. Release Restart button when Power LED starts blinking

To revert back to OEM firmware:
The return to the OEM firmware is carried out by using the methods described above with the help of the appropriate firmware image.

When using OEM bootloader, the firmware image size cannot exceed the size of one OEM «Firmware_x» partition or Kernel + rootFS size.

Signed-off-by: Anton Yu. Ivanusev <ivanusevanton@yandex.ru>
Link: https://github.com/openwrt/openwrt/pull/19091
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-16 19:01:18 +02:00
Nicolas BERTRAND
6af9476b8a realtek: Add support for Zyxel XGS1210-12 Switch
The Zyxel XGS1210-12 Switch is a 10 + 2 port multi-GBit switch with
8 x 1000BaseT, 2 x 10/100/1000/2500BaseT Ethernet ports and
2 SFP+ module slot.

Hardware:
- RTL9302B SoC
- Macronix MX25L12833F (16MB flash)
- Nanja NT5CC64M16GP-1 (128MB DDR3 SDRAM)
- RTL8231 GPIO extender to control the port LEDs
- RTL8218D 8x Gigabit PHY
- RTL8226 2x 10m/100m/1/2.5 Gigabit PHY
- SFP+ 2x 10GBit slot

Power is supplied via a 12V 1.5A standard barrel connector. At the
right side behind the grid is UART serial connector. A Serial
header can be connected to from the outside of the switch trough
the airvents with a standard 2.54mm header.
Pins are from top to bottom Vcc(3.3V), TX, RX and GND. Serial
connection is via 115200 baud, 8N1.

A reset button is accessble through a hole in the front panel

At the time of this commit, all ethernet ports work under OpenWrt,
including the various NBaseT modes, SFP+ slots are supported with i2c bus.

Installation
--------------
* Connect serial as per the layout above. Connection parameters: 115200 8N1.
* Navigate to 'Management' in the OEM web interface and click on 'Firmware upgrade'
  to the left.
* Upload the OpenWrt initramfs image, and wait till the switch reboots.
* Connect to the device through serial and change the U-boot boot command.
  > fw_setenv bootcmd 'rtk network on; boota'
* Reboot, scp the sysupgrade image to /tmp, verify the checksum and flash it:
  > sysupgrade openwrt-realtek-rtl930x-Zyxel_xgs1210-12-squashfs-sysupgrade.bin
* Upon reboot, you have a functional OpenWrt installation. Leave the bootcmd
  value as is - without 'rtk network on' the switch will fail to initialise
  the network.

Debug
------------
* Connect serial as per the layout above. Connection parameters: 115200 8N1.
* A tftp server is requiered, tftpd-hpa works well.
* Power the device, at U-Boot start rapidly hit Esc key to stop autoboot
* Enable network:
  > rtk network on
* Change ip address (default is 192.168.1.1):
  > setenv ipaddr 192.168.1.6
* Download initramfs:
  > tftpboot 0x84f00000 192.168.1.111:openwrt-realtek-rtl930x-Zyxel_xgs1210-12-initramfs-kernel.bin
* Boot loaded file:
  > bootm 0x84f00000

This prodecudre also apply to the sock firmware with the file XGS1210-12_V2.00(ABTY.1)C0.bix.

More information can be found on the page of XGS1250-12 as they share the same base.

Signed-off-by: Nicolas BERTRAND <nicolasbertrand89@gmail.com>
[fixed white space error]
Signed-off-by: Paul Spooren <mail@aparcar.org>
2025-06-16 13:46:51 +02:00
Jonas Jelonek
39b9b491bb realtek: add support for TP-Link TL-ST1008F v2.0
The TP-Link TL-ST1008F is an 8-port multi-gig switch with 8x SFP+ ports
which support 1G/2.5G/10G speeds. Out of the box it is an unmanaged
switch but with RTL9303 and sufficient RAM + Flash it easily can run as
a managed Linux switch.

Hardware:
 - Realtek RTL9303 Switch SoC
 - Winbond 25Q256JVFQ (32MB flash)
 - Samsung K4B4G1646E-BYMA (512MB DDR3 SDRAM)
 - TCA9534 GPIO extender to control the port LEDs
 - 8x SFP+ 1/2.5/10G slot
 - Serial: 3V3 logic, 115200 8N1
 - 5-pin JTAG
 - physical tri-state switch (used by stock firmware for port speed
   config)
 - 24-LED port speed matrix
 - robust full-metal case

Power is supplied via a 12V 2A standard barrel connector.
There are THT holes on the PCB for serial console next to the flash chip
and JTAG pads. Serial uses 3V3 logic and standard 115200-8N1 config.
Pinout is labeled on the PCB.

All ports/connectors and LEDs are on the back, only Power LED is on the
front.

Hints before flashing
----------------------

* It is recommended to backup the stock flash contents before proceeding.
  Backup can be done from U-Boot (with memory display), from OpenWrt
  initramfs or probably with SPI flash programmer.
  There is no stock recovery functionality.
* Use a small image for RAM boot or first flash. Since you need to use
  ymodem, this is really slow and takes time.
* This does not keep the dual-partition layout for firmware to have more
  space available for a single OpenWrt installation.

Initial flashing
----------------------

The stock U-boot has broken networking thus no TFTP available. Serial
transfer only.

1. Open device and connect serial as per layout and settings
   (recommended to use picocom, ymodem not working with minicom)
2. Connect power to device and press Esc when prompted to enter
   the U-Boot console.
3. Boot initramfs
  * in the U-Boot console:
      loady 0x82000000			(load OpenWrt image via ymodem)
      CTRL-A CTRL-S <initramfs.bin>	(specify initramfs image for
                                         picocom to upload)
      bootm 0x82000000			(boot initramfs from RAM)
(Just to be on the safe side, backup your flash now while RAM-booted)
4. Connect network to your device
5. Upload the sysupgrade image (e.g. with scp)
6. Do sysupgrade

There's no need to adjust the bootcmd in U-Boot. Networking is running
fine once the realtek driver initialized everything in OpenWrt. No
functional difference with running 'rtk network on' within U-Boot
before. Running this even fails and returns with an error.

Return to stock
------------------

This only works if you did a backup of the flash before flashing
OpenWrt. Stock dump then can be flashed from within U-Boot or OpenWrt.
There is no vendor firmware image because this is an unmanaged switch!

CAUTION: Make sure to not overwrite the U-Boot partition(s). If you do
	 not have a flash programmer, you may not be able to debrick
	 your device then.

Co-authored-by: Balázs Triszka <balika011@gmail.com>
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2025-06-16 13:30:52 +02:00
Tianling Shen
53b213b99b rockchip: add kernel 6.12 as testing kernel
Add kernel 6.12 as testing kernel.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/18683
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-14 17:22:52 +02:00
Tianling Shen
966b365614 rockchip: refresh kernel configs
Refresh kernel configs with `make kernel_oldconfig CONFIG_TARGET=subtarget`.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/18683
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-14 17:22:52 +02:00
Tianling Shen
9a59eac049 rockchip: refresh kernel patches
Remove upstreamed patches and refresh remaining ones.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/18683
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-14 17:22:52 +02:00
Tianling Shen
eb974c3b3e rockchip: Restore kernel files for v6.6
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: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/18683
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-14 17:22:52 +02:00
Tianling Shen
23b5f3a90a rockchip: Create kernel files for v6.12 (from v6.6)
This is an automatically generated commit.

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

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/18683
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-14 17:22:52 +02:00
Zoltan HERPAI
7f2d7fbc23 starfive: drop 6.6 support
Drop configs and patches for Linux 6.6.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2025-06-14 00:53:19 +02:00
Zoltan HERPAI
e2e4dcfe75 starfive: usb3 and pcie support is compiled into kernel now
As support for these peripherals are now compiled into the kernel, the
respective kmods can be dropped.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2025-06-14 00:53:19 +02:00
Zoltan HERPAI
4801c5bec3 starfive: use kernel 6.12 by default
Switch to Linux kernel version 6.12.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2025-06-14 00:53:19 +02:00
Chukun Pan
86abc4640e starfive: remove useless aic8800 driver
AIC8800 is a WiFi/BT module based on Ceva's IP.
This driver is old and not enabled in the starfive target,
so remove it. We can add out of tree drivers if necessary.

Fixes: 8f0f02d2 ("starfive: 6.12: refresh patches and drop upstreamed ones")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2025-06-14 00:53:19 +02:00
George Moussalem
d7f9e240c2 qualcommax: ipq50xx: Add support for Xiaomi AX6000
Add support for Xiaomi AX6000.

Speficiations:
* SoC: Qualcomm IPQ5018 (64-bit dual-core ARM Cortex-A53 @ 1.0Ghz)
* Memory: Etrontech EM6HE16EWAKG 512 MiB DDR3L-933
* Serial Port: 1v8 TTL 115200n8
* Wi-Fi: IPQ5018 (2x2 2.4 Ghz 802.11b/g/n/ax - up to 574 Mbps)
	 QCN9024 (4x4 5 Ghz 802.11an/ac/ax - up to 4804 Mbps)
 	 QCA9887 (1x1 5 Ghz 802.11ac/n - up to 433 Mbps)
* Ethernet: IPQ5018 integrated virtual switch connected to:
	- external QCA8337 switch   (3 LAN Ports 10/100/1000)
	- QCA8081 Phy WAN port  (10/100/1000/2500)
* Flash: Either of:
	- Gigadevice GD5F1GQ4RE9IGD (128 MiB)
	- ESMT F50D1G41LB (128 MiB)
* LEDs: 1x WLAN Link (GPIO 23 Active High)
	1x System Blue   (GPIO 24 Active High)
	1x System Yellow (GPIO 25 Active High)
	1x WAN Link Blue (GPIO 26 Active High)
	1x WAN Link Yellow   (GPIO 27 Active High)
	1x Green - Unused(GPIO 28 Active High)
	3x LAN Phy Green
	1x WAN Phy Green
* Buttons: 1x Reset  (GPIO 38 Active Low)

Known issue:
- QCA9887 doesn't come up (possibly due to 1-lane PCIe phy not coming up or missing method to drive power),
  hence the host PCIe controller is disabled in the DTS.

Flash instructions:

Download XMIR Patcher: https://github.com/openwrt-xiaomi/xmir-patcher

First flash a ubinized OpenWrt initramfs that will serve as the intermediate step, since
OpenWrt uses unified rootfs in order to fully utilize NAND and provide enough space for
packages, through either of the below two methods:

Installation via XMIR Patcher:

1. Load the initramfs image: openwrt-qualcommax-ipq50xx-xiaomi_ax6000-initramfs-factory.ubi

Installation via ubiformat method, through SSH:

1. If needed, enable SSH using XMIR Patcher.
2. Copy the file openwrt-qualcommax-ipq50xx-xiaomi_ax6000-initramfs-factory.ubi to the /tmp directory
3. Open an SSH shell to the router
4. Check which rootfs partition is your router booted in (0 = rootfs | 1 = rootfs_1):
nvram get flag_boot_rootfs
5. Find the rootfs and rootfs_1 mtd indexes respectively:
cat /proc/mtd
Please confirm if mtd18 and mtd19 are the correct indexes from above!
6. Use the command ubiformat to flash the opposite mtd with UBI image:
If nvram get flag_boot_rootfs returned 0:
ubiformat /dev/mtd19 -y -f /tmp/openwrt-qualcommax-ipq50xx-xiaomi_ax6000-initramfs-factory.ubi && nvram set flag_boot_rootfs=1 && nvram set flag_last_success=1 && nvram commit
otherwise:
ubiformat /dev/mtd18 -y -f /tmp/openwrt-qualcommax-ipq50xx-xiaomi_ax6000-initramfs-factory.ubi && nvram set flag_boot_rootfs=0 && nvram set flag_last_success=0 && nvram commit
7. Reboot the device by:
reboot

Continue in order to pernamently flash OpenWrt:
1. Upload the sysupgrade image to /tmp/ using SCP:
scp -O <path to image> root@192.168.1.1:/tmp/
2. Open an SSH shell to 192.168.1.1 from a PC within the same subnet
3. Use sysupgrade to flash the sysupgrade image:
sysupgrade -n -v /tmp/openwrt-qualcommax-ipq50xx-xiaomi_ax6000-squashfs-sysupgrade.bin

Device will reboot with OpenWrt, and then sysupgrade can be used to upgrade the device when desired.

Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19004
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-13 12:02:39 +02:00
George Moussalem
f2221a0903 mtd: spinand: esmt: fix id code for F50D1G41LB
Upon detecting the ID for the ESMT F50D1G41LB chip, the fifth byte
returned is always 0x00 instead of the expected JEDEC continuation code
of 0x7f. This causes detection to fail:

[    0.304399] spi-nand spi0.0: unknown raw ID c8117f7f00
[    0.508943] spi-nand: probe of spi0.0 failed with error -524

So let's revert back to the 4 byte ID code for this chip
specifically.

Fixes: 4bd14b2fd8a8 ("mtd: spinand: esmt: Extend IDs to 5 bytes")
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/19004
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-13 12:02:39 +02:00
George Moussalem
a23f841289 net: dsa: qca8k: fix led devicename when using external mdio bus
The qca8k dsa switch can use either an external or internal mdio bus.
This depends on whether the mdio node is defined under the switch node
itself and, as such, the internal_mdio_mask is populated with its
internal phys. Upon registering the internal mdio bus, the
internal_mdio_bus of the dsa switch is assigned to this bus.
When an external mdio bus is used, it is left unassigned, though its id
is used to create the device names of the leds.
This leads to the leds being named '(efault):00:green:lan' and so on as
the internal_mdio_bus is null. So let's fix this by adding a null check
and use the devicename of the external bus instead when an external bus
is configured.

Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19004
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-13 12:02:39 +02:00
Chukun Pan
323bbce600 generic: 6.12: disable cont read for MX35LFxGE4AD
Continuous read does not work properly in on-die ECC mode.
Disable it to fix ubi io error on the GL.iNet GL-MT3000.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2025-06-13 11:15:08 +02:00
Chukun Pan
f60207a2d3 mediatek: cleanup device tree for mt7988 devices
Fix wrong pwm-fan node for bpi-r4.
Remove useless status for pwm-fan.
Remove blank lines added by b992aa11.

Fixes: b992aa11 ("mediatek: dts: bring mt7988a.dtsi closer to upstream")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2025-06-13 11:15:08 +02:00
Joe Holden
e67b70b8f4 realtek: align port names
Only 2 devices use leading zeroes to pad interface names,
align the remaining ones so that it is consistent.

Signed-off-by: Joe Holden <jwh@zorins.us>
Link: https://github.com/openwrt/openwrt/pull/18913
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-12 14:12:38 +02:00
John Audia
98ead2c70f kernel: bump 6.12 to 6.12.33
https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.33

All patches automatically rebased.

Build system: x86/64
Build-tested: x86/64
Run-tested: x86/64

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/19084
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-12 12:42:15 +02:00
Álvaro Fernández Rojas
fd3e1f0c4d bmips: bcm6358: add support for Huawei HG553
Specifications:
- SoC: Broadcom BCM6358 dual 300MHz MIPS
- Flash: 16MB NOR
- RAM: 64MB DDR
- Ethernet: 4x 100M
- Wifi: Broadcom BCM4318
- 2x USB 2.0 port
- 2x Button
- 9x LED
- RJ11 2x FXS VoIP (unsupported)
- RJ11 xDSL (unsupported)

Install instructions:
- Assign static IP 192.168.1.100 to PC.
- Unplug the power source.
- Press the RESTART button at the router, don't release it yet!
- Plug the power source and wait at least 15 seconds.
- Release the RESTART button.
- Browse to http://192.168.1.1 with your PC.
- Upload the openwrt-bmips-bcm6358-huawei_hg553-squashfs-cfe.bin file.
- Wait some minutes until the firmware upgrade completes.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-12 12:38:31 +02:00
INAGAKI Hiroshi
0cbdab5038 qualcommax: add support for I-O DATA WN-DAX3000GR
I-O DATA WN-DAX3000GR is a 2.4/5 GHz band 11ax (Wi-Fi 6) router, based
on IPQ5018.

Specification:

- SoC             : Qualcomm IPQ5018
- RAM             : DDR3 512 MiB
- Flash           : SPI-NAND 128 MiB (Macronix MX35UF1G24AD-Z4I)
- WLAN            : 2.4/5 GHz 2T2R
  - 2.4 GHz       : Qualcomm IPQ5018 (SoC)
  - 5 GHz         : Qualcomm Atheros QCN6102
- Ethernet        : 5x 10/100/1000 Mbps
  - wan (phy)     : Qualcomm IPQ5018 (SoC)
  - lan (switch)  : Qualcomm Atheros QCA8337
- LEDs/Keys (GPIO): 7x/5x
- UART            : through-hole on PCB (J3)
  - assignment    : 3.3V, TX, RX, NC, GND from tri-angle marking
  - settings      : 115200n8
- USB             : USB 2.0 Type-A (through-hole on PCB, "J6")
- Power           : 12 VDC, 1A (Typ. 930 mA)

Flash instruction using factory.bin image:

1. Boot WN-DAX3000GR with router mode
2. Access to the WebUI ("http://192.168.0.1/") on the device and open
   the firmware update page ("ファームウェア")
3. Select the OpenWrt factory.bin image and click update ("更新") button
4. Wait ~120 seconds to complete flashing

Switching to the stock firmware:

1. Load the elecom.sh script

   . /lib/upgrade/elecom.sh

2. Check the current index of rootfs

   bootconfig_rw_index 0:bootconfig rootfs

3. Set the index to inverted value

   bootconfig_rw_index 0:bootconfig rootfs <value>
   bootconfig_rw_index 0:bootconfig1 rootfs <value>

   example:

   - step2 returned "0":

     bootconfig_rw_index 0:bootconfig rootfs 1
     bootconfig_rw_index 0:bootconfig1 rootfs 1

   - step2 returned "1":

     bootconfig_rw_index 0:bootconfig rootfs 0
     bootconfig_rw_index 0:bootconfig1 rootfs 0

4. Reboot

Partition Layout (Stock FW, bootconfig(rootfs)=1):

0x000000000000-0x000000080000 : "0:SBL1"
0x000000080000-0x000000100000 : "0:MIBIB"
0x000000100000-0x000000140000 : "0:BOOTCONFIG"
0x000000140000-0x000000180000 : "0:BOOTCONFIG1"
0x000000180000-0x000000280000 : "0:QSEE"
0x000000280000-0x000000380000 : "0:QSEE_1"
0x000000380000-0x0000003c0000 : "0:DEVCFG"
0x0000003c0000-0x000000400000 : "0:DEVCFG_1"
0x000000400000-0x000000440000 : "0:CDT"
0x000000440000-0x000000480000 : "0:CDT_1"
0x000000480000-0x000000500000 : "0:APPSBLENV"
0x000000500000-0x000000640000 : "0:APPSBL"
0x000000640000-0x000000780000 : "0:APPSBL_1"
0x000000780000-0x000000880000 : "0:ART"
0x000000880000-0x000000900000 : "0:TRAINING"
0x000000900000-0x000003c40000 : "rootfs_1"
0x000003c40000-0x000003fc0000 : "Config"
0x000003fc0000-0x000007300000 : "rootfs"
0x000007300000-0x000007680000 : "Config_2"
0x000007680000-0x000007700000 : "idmkey"
0x000007700000-0x000007c00000 : "Reserved"
0x000007c00000-0x000007c80000 : "FWHEADER"
0x000007c80000-0x000007d00000 : "Factory"

Known Issues:

- This device has a Macronix MX35UF1G24AD SPI-NAND chip registered as
  oobsize=128 in Linux Kernel. But using BCH8 breaks I/O on the chip
  with the following errors, so this support uses BCH4 instead.

  [    1.542261] 0x000000480000-0x000000500000 : "0:appsblenv"
  [    1.547959] 1 fixed-partitions partitions found on MTD device 0:appsblenv
  [    1.551265] Creating 1 MTD partitions on "0:appsblenv":
  [    1.558096] 0x000000000000-0x000000040000 : "env-data"
  [    1.627282] u-boot-env-layout 79b0000.qpic-nand:flash@0:partitions:partition-0-appsblenv:partition@0:nvmem-layout: probe with driver u-boot-env-layout failed with error -74

  root@OpenWrt:~# strings /dev/mtdblock10
  [   77.806720] mtdblock: MTD device '0:appsblenv' is NAND, please consider using UBI block devices instead.
  [   77.807554] I/O error, dev mtdblock10, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 4 prio class 0
  [   77.815977] I/O error, dev mtdblock10, sector 8 op 0x0:(READ) flags 0x80700 phys_seg 3 prio class 0
  [   77.824721] I/O error, dev mtdblock10, sector 16 op 0x0:(READ) flags 0x80700 phys_seg 2 prio class 0
  [   77.834095] I/O error, dev mtdblock10, sector 24 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
  [   77.843278] I/O error, dev mtdblock10, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
  [   77.851577] Buffer I/O error on dev mtdblock10, logical block 0, async page read

Notes:

- This device has dual-boot feature and it's managed by the index in the
  0:bootconfig and 0:bootconfig1 partitions.

- There are through-holes on PCB for USB 2.0, but it cannot be accessed
  without disassembly of the housing. So it's not enabled in this
  support.

- WN-DAX3000GR has the "bt_fw" volume in the firmware UBI in addition to
  the volumes that will be removed in the section of ELECOM WRC-X3000GS2
  in /lib/upgrade/platform.sh.
  That volume is unnecessary for OpenWrt and add
  `remove_oem_ubi_volume bt_fw` to remove that volume when sysupgrade.
  (that function doesn't anything without errors if no specified volume)

MAC Addresses:

LAN    : 50:41:B9:xx:xx:64 (0:APPSBLENV, "ethaddr"/"eth1addr" (text))
WAN    : 50:41:B9:xx:xx:66 (0:APPSBLENV, "eth0addr" (text))
2.4 GHz: 50:41:B9:xx:xx:64 (0:APPSBLENV, "wifi0"    (text))
5 GHz  : 50:41:B9:xx:xx:65 (0:APPSBLENV, "wifi1"    (text))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19053
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-12 10:54:34 +02:00
INAGAKI Hiroshi
2186f4aa75 qualcommax: make header length configurable on Build/mstc-header
I-O DATA WN-DAX3000GR has a MSTC (Mitra Star Technology Corp.) specific
header with a different length than ELECOM WRC-X3000GS2.
Make the header length configurable by parameterizing on
Build/mstc-header.

- WRC-X3000GS2: 0x400
- WN-DAX3000GR: 0x480

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19053
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-12 10:54:34 +02:00
George Moussalem
b9704413c4 qualcommax: ipq50xx: correct fw memory mode for ipq5018 and qcn6122 wifi
The reason fwmode 2 was used for ipq5018 and qcn6122 wifi was that
coldboot calibration doesn't work and causes the firmware to crach
during wifi bringup. Since coldboot calibration is now disabled in the
driver, all boards can now use their respective firmware memory mode, so
let's the property in all board DTS files accordingly.

Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19083
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-12 10:47:44 +02:00
Álvaro Fernández Rojas
9117ff7b39 bcm27xx: select I2C/SPI packages by default
The I2C and SPI packages required for each RPi generation is different.
Therefore, in order to avoid confusion let's select them by default.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-12 07:25:32 +02:00
Markus Stockhausen
c9e934ffd8 realtek: 6.12: refactor EEE for RTL8218B/D and RTL8214FC
Three different code paths for the same phy model. Now the bus
is prepared to handle c45 (mmd) read/writes correctly. Remove
the custom implementations and let generic kernel functions do
their best. To achieve this

- disable the PHY-mode EEE in rtl821x_config_init() as upstream does
- provide mmd read/write functions that avoid EEE via c45 over c22

While chaning the phy_driver functions sort them alphabetically.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:22 +02:00
Markus Stockhausen
ec310a0993 realtek: 6.12: allow fiber media status to be read without lock
rtl8214fc_media_is_fibre() will need to be run when bus lock is held.
Split the function into two versions.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:22 +02:00
Markus Stockhausen
30fae30e03 realtek: 6.12: proper mdio c45 handling in DSA driver
As the mdio bus has been hardened and can now handle c45 requests
the DSA driver must honor that as well. For this

- add proper upstreamed bus read_c45 and write_c45 functions
- take over the disabled port mask from upstream bus

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:22 +02:00
Markus Stockhausen
65cf5b74c5 realtek: 6.12: harden the mdio bus even more
With the follow up EEE patches the mdio bus will run c22 and c45
accesses during initial scan. Especially when accessing addresses
beyond the CPU port phy requests might fail in a way that cannot
be handled gratefully. Do two things

- do not allow access to addresses starting from cpu port
- set the scan disable bitmask to ports starting from cpu port

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:22 +02:00
Markus Stockhausen
debb69ccb5 realtek: 6.12: enhance mdio max port patch (once again)
Some bits where missed during the last enhancement of the mdio
patch. In the forthcoming patches the phy_mask will be populated
to avoid unwanted ports (>= cpu port) from being scanned. Add
additional locations where 32 bit values need to be converted
to 64 bits.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:22 +02:00
Markus Stockhausen
8917301b72 realtek: 6.12: allow mixed c22/c45 bus access
If mmd and normal phy ops are issued the bus is lost because
of wrong park page settings. Force it to 0x1f as in GPL.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:22 +02:00
Markus Stockhausen
6d9f5a0ccf realtek: 6.12: activate testing kernel
Allow to build the new kernel.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:22 +02:00
Markus Stockhausen
bb7e91243d realtek: 6.12: add missing include
The new kernel has relocated the definition of struct platform_device.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:22 +02:00
Markus Stockhausen
22beb4fbc4 realtek: 6.12: align internal/external mac eee function names
The DSA driver uses set_mac_eee() for the outside API while
the interal helper is called port_eee_set(). Align that.
Additionally do not call the internal helpers directly by
the function names but use the register assignments.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:22 +02:00
Markus Stockhausen
d7f51c1917 realtek: 6.12: refactor get_mac_eee
Upstream will get rid of the get_mac_eee() function in the DSA
driver and replace it by a boolean alternative. While we fill a
lot of data here (because of EEE bugs in the Realtek phy layer)
other DSA drivers only return if EEE is available or not for a
port. To make the next kernel upgrade easier follow that design.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:22 +02:00
Markus Stockhausen
e124859587 realtek: 6.12: relocate R4K deactivation to late CPU init
To avoid unneeded interrupts the R4K timer is deactivated during
secondary cpu initialization. This is currently done during
phase init_secondary(). With the upgrade to 6.12 the kernel runs
a primary/secondary cpu timer/counter synchronization to verify the
proper setup in synchronise_count_slave(). That runs at a later
point in time and expects the secondary counter to be fully
functional. Finding a deactivated counter results in the following
messages:

WARNING: CPU: 1 PID: 0 at arch/mips/kernel/sync-r4k.c:99 check_counter_warp+0x220/0x254
Warning: zero counter calibration delta: 0 [max: 6500000]
Counter synchronization [CPU#0 -> CPU#1]:
Measured 278760029 cycles counter warp between CPUs

Relocate the deactivation to smp_finsh() at the end of the cpu
startup sequence. Additionally polish the startup code and remove
all unneeded parts.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:22 +02:00
Markus Stockhausen
09440d9858 realtek: 6.12: fix phy-mode for XGS1250-12 port 1-8
Per IEEE 802.3 definition we have:
- parallel XGMII for single 10GBit ONLY links
- serial USGMII for 8 port 1GBit links (not known by kernel)
- serial USXGMII: for single/multiple links with a total bandwidth of 10GBit

The phy-mode of the first eight ports of the XGS1250-12 have always been
defined as XGMII (without S). This came from a confusion with the similar
named Realtek proprietary XSGMII (with S) mode that is basically 10GB SGMII.
From the above definition this is wrong but worked until kernel 6.6. With
the upgrade to 6.12 there is an enforced capabilities check within
phy_caps_from_interface() and link validation fails with

lan1: validation of xgmii with support 62ef and advertisement 62c0 failed: -EINVAL
lan1: failed to connect to PHY: -EINVAL
lan1: error -22 setting up PHY for tree 0, switch 0, port 0

Switch the ports to USXGMII as the most flexible option. This might be no
final solution but at least it better describes the phy/mac link.

Fixes 5b8b382df9 ("realtek: Add support for ZxXEL XGS1250-12 Switch")
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:22 +02:00
Markus Stockhausen
abee1c2040 realtek: 6.12: adapt RTL9300 i2c bus & mux drivers
Fix minor compilation errors due to kernel changes.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:22 +02:00
Markus Stockhausen
d9a5cafc40 realtek: 6.12: adapt platform patch
Upstream has integrated the Realtek target into the generic MIPS
initialization and so MACH_REALTEK_RTL has gained some new features.
Especially:

- CONFIG_MACH_GENERIC_CORE generates central modules
- board-realtek module adds device specific extensions

The current downstream initialization works well and upgrading to
kernel 6.12 is not the right time to harmonize this. Modify the
MACH definitions to the current needs.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:22 +02:00
Markus Stockhausen
48b6a011c7 realtek: 6.12: drop validate from phylink_mac_ops
The validate function no longer exists in phylink_mac_ops. Remove
it for the internal ethernet interface. Instead provide some
meaningful mac capabilities.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:22 +02:00
Markus Stockhausen
34a070bfe1 realtek: 6.12: add mac capabilities to rtl83xx_phylink_get_caps()
Not only the link but also the mac capabilities are needed here.
Additionally do some alphabetical sorting.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:22 +02:00
Markus Stockhausen
7234c7757c realtek: 6.12: rename dsa functions/structures to conduit/user
The old upstream notation has been changed to something not so racist.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:22 +02:00
Markus Stockhausen
a4a40ab6ea realtek: 6.12: replace ethtool_eee with ethtool_keee
EEE functions are now called with ethtool_keee instead of
ethtool_eee. Replace all occurrences. This will fix function
signature checks but still produces compilation errors due
to structure changes.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:22 +02:00
Markus Stockhausen
e9a093818c realtek: 6.12: refresh patches with slightly changed anchors
Patches where fuzz had to be cleaned up.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:22 +02:00
Markus Stockhausen
081786887b realtek: 6.12: refresh patches with only source line changes
All these patches needed no manual intervention and applied cleanly
with new source code positions.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:22 +02:00
Markus Stockhausen
ba707201ff realtek: 6.12: drop upstreamed otto timer
Thanks to Chris Packham this driver got upstreamed. Drop the
downstream files and patches.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:22 +02:00
Markus Stockhausen
c056cc8bb5 realtek: 6.12: restore config-6.6
Automatically generated commit.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:21 +02:00
Markus Stockhausen
296a16bc28 realtek: 6.12: create config-6.12 from config-6.6
Automatically generated commit.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:21 +02:00
Markus Stockhausen
8da7a1bfa9 realtek: 6.12: restore patches-6.6
Automatically generated commit.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:21 +02:00
Markus Stockhausen
b943c746d2 realtek: 6.12: create patches-6.12 from patches-6.6
Automatically generated commit.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:21 +02:00
Markus Stockhausen
ade52b291e realtek: 6.12: restore files-6.6
Automatically generated commit.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:21 +02:00
Markus Stockhausen
ac1be95438 realtek: 6.12: create files-6.12 from files-6.6
Automatically generated commit.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18935
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-11 22:27:21 +02:00
Álvaro Fernández Rojas
59f8312400 bcm27xx: add support for BRCMSTB I2C controller
Add kernel package for Broadcom Settop/DSL I2C controller.
This controller is used on RPi devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-11 20:28:51 +02:00
Christian Schmidbauer
710ec82367 ipq806x: fix Extreme Networks AP3935 LAN/WAN ports
This commit changes LAN1 to be WAN and LAN2 to be LAN, like all other
dual port Extreme Networks devices.

This partially reverts commit 84a489b7cf

Signed-off-by: Christian Schmidbauer <github@grische.xyz>
2025-06-11 18:42:54 +02:00
Christian Schmidbauer
f02e614f50 ipq806x: fix Extreme Networks AP3935 LAN LED order
Fixes LAN LED "1" to show activity of LAN1 and LAN LED "2" to show
activity of LAN2, not vice versa.

Signed-off-by: Christian Schmidbauer <github@grische.xyz>
2025-06-11 18:42:54 +02:00
Yin Ni
f7735158f3 mediatek: update pinconf for GL.iNet eMMC boards
Update the pin-configuration as well as maximum frequency for the eMMC
flash.

 - Use 26 MHz as the maximum clock of the eMMC memory
 - Configure 12mA as the pin drive-strength
 - Enable internal pull-reistors

Signed-off-by: Yin Ni <yin.ni@gl-inet.com>
[adapt commit message]
Signed-off-by: David Bauer <mail@david-bauer.net>
2025-06-11 18:40:26 +02:00
David Bauer
5b0f169f28 mpc85xx: fix function name
The function name is misspelled and does not exist. Fix the function
name so the correct function is called.

Signed-off-by: David Bauer <mail@david-bauer.net>
2025-06-11 18:39:55 +02:00
Mateusz Jończyk
b7fa9d92ae ramips/mt7621: mark EEE as broken in devicetree
Multiple users have reported a regression [1] in OpenWRT 24.10 with the
ramips/mt7621 target, which has the MT7530 PHYs: the Ethernet link is
periodically going down for a brief period of time:

        mt7530-mdio mdio-bus:1f lan1: Link is Down
        br-lan: port 1(lan1) entered disabled state
        mt7530-mdio mdio-bus:1f lan1: Link is Up - 1Gbps/Full - flow control rx/tx

The symptoms stop after disabling EEE and it was reported by Mediatek in
2021 that EEE is unstable for the MT7530 PHYs [2]:

> EEE of the 10-year-old MT7530 internal gephy has many IOT problems, so
> it is recommended to disable its EEE.

EEE is enabled by default for these devices in OpenWRT 24.10 whereas in the
previous version (OpenWRT 23.05, Linux 5.15) it was not. It was determined
that in Linux 6.6, the PHY driver tries to disable EEE in
mtk_gephy_config_init() in drivers/net/phy/mediatek-ge.c, but this is later
overridden by a subsequent execution of the genphy_c45_write_eee_adv()
function, which enables every EEE mode supported.

The best way forward for now seems to be to mark EEE as broken directly in
the devicetree, which affects the genphy_c45_write_eee_adv() function.

There are some devices, like GnuBee GB-PC2, that define additional PHYs,
for example ethernet-phy@5 or ethernet-phy@7. As reported by Chester A.
Unal, these are not MT7530 PHYs and they are not affected.

This would need to be cherrypicked for the OpenWRT 24.10 branch.

[1] https://github.com/openwrt/openwrt/issues/17351

[2] https://lore.kernel.org/all/0adde34f936a2dafca40b06b408d82afe0852327.camel@mediatek.com/

Tested-by: Darren Tucker
Signed-off-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
Closes: https://github.com/openwrt/openwrt/issues/17351
Link: https://github.com/openwrt/openwrt/pull/18585
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-11 15:38:25 +02:00
Álvaro Fernández Rojas
733067fc9a bmips: bcm6358: add support for Huawei HG556a ver C
Specifications:
- SoC: Broadcom BCM6358 dual 300MHz MIPS
- Flash: 16MB NOR Macronix MX29GL128EHT2I-90G
- RAM: 64MB DDR
- Ethernet: 4x 100M
- Wifi: Ralink RT3062F
- 3x USB 2.0 port
- 4x Button
- 13x LED
- RJ11 2x FXS VoIP (unsupported)
- RJ11 xDSL (unsupported)

Install instructions:
- Assign static IP 192.168.1.100 to PC.
- Unplug the power source.
- Press the RESTART button at the router, don't release it yet!
- Plug the power source and wait at least 15 seconds.
- Release the RESTART button.
- Browse to http://192.168.1.1 with your PC.
- Upload the openwrt-bmips-bcm6358-huawei_hg556a-c-squashfs-cfe.bin file.
- Wait some minutes until the firmware upgrade completes.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-11 15:10:46 +02:00
Álvaro Fernández Rojas
f9ea340288 generic: improve patches documentation
It's time to give the patches documentation some love by:
- Using Markdown.
- Differentiating between generic and specific target patches.
- Adding deeper explanation about patch numbering.

Link: https://github.com/openwrt/openwrt/pull/19092
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-11 15:09:46 +02:00
Shiji Yang
09c2ceb7a5 ramips: a workaround for system halt issue on 6.12 kernel
Fix potential invalid memory address access on ip_fast_csum().

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18654
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-11 14:16:21 +02:00
Mieczyslaw Nalewaj
4f62facf10 mips: ralink: add missing include
Missing headers causes an error on kernel 6.12:
arch/mips/ralink/irq.c:86:5: error: no previous prototype for 'get_c0_perfcount_int' [-Werror=missing-prototypes]
   86 | int get_c0_perfcount_int(void)
      |     ^~~~~~~~~~~~~~~~~~~~
arch/mips/ralink/irq.c:92:14: error: no previous prototype for 'get_c0_compare_int' [-Werror=missing-prototypes]
   92 | unsigned int get_c0_compare_int(void)
      |              ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18654
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-11 14:16:21 +02:00
Mieczyslaw Nalewaj
92fec1ff24 mtk-mmc: replace empty body macros
Replace macros with empty body with 'do {} while (0)'.
Remove unnecessary semicolons.

Fixes:
drivers/mmc/host/mtk-mmc/sd.c: In function 'msdc_irq':
drivers/mmc/host/mtk-mmc/sd.c:1969:87: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body]
 1969 |                                 IRQ_MSG("XXX CMD<%d> MSDC_INT_RSPCRCERR", cmd->opcode);
      |                                                                                       ^
drivers/mmc/host/mtk-mmc/sd.c:1975:84: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body]
 1975 |                                 IRQ_MSG("XXX CMD<%d> MSDC_INT_CMDTMO", cmd->opcode);
      |                                                                                    ^
cc1: all warnings being treated as errors

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18654
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-11 14:16:21 +02:00
Mieczyslaw Nalewaj
fa90484c6a ramips: enable 6.12 testing kernel
The ramips now supports 6.12 kernel as testing.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18654
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-11 14:16:21 +02:00
Mieczyslaw Nalewaj
e09d6ce9f3 kernel/ramips: update config for kernel 6.12
Update target ramips config for kernel 6.12.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18654
[Remove some more option already in generic config]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-11 14:15:57 +02:00
Mieczyslaw Nalewaj
02c991a141 ramips: pci-rt2880: 6.12: change pcibios_init declaration
Fixes error:
arch/mips/pci/pci-rt2880.c:267:12: error: no previous prototype for 'pcibios_init' [-Werror=missing-prototypes]
  267 | int __init pcibios_init(void)
      |            ^~~~~~~~~~~~
cc1: all warnings being treated as errors
make[8]: *** [scripts/Makefile.build:229: arch/mips/pci/pci-rt2880.o] Error 1
make[7]: *** [scripts/Makefile.build:478: arch/mips/pci] Error 2

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18654
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-11 14:12:26 +02:00
Mieczyslaw Nalewaj
d798bef016 ramips: 6.12: automatically rebuilding patches
Automatic rebasing of patches.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18654
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-11 14:12:26 +02:00
Mieczyslaw Nalewaj
65add58add ramips: 6.12: manually rebuilding patches
Manually rebuilding patches:
 - 001-v6.13-clocksource-drivers-ralink-Add-Ralink-System-Tick-Co.patch
 - 311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch
 - 314-MIPS-add-bootargs-override-property.patch
 - 405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch
 - 810-uvc-add-iPassion-iP2970-support.patch
 - 821-SPI-ralink-add-Ralink-SoC-spi-driver.patch
 - 825-i2c-MIPS-adds-ralink-I2C-driver.patch
 - 845-pwm-add-mediatek-support.patch
 - 860-ramips-add-eip93-driver.patch

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18654
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-11 14:12:26 +02:00
Mieczyslaw Nalewaj
5f34c308bc ramips: 6.12: remove obsolete patches
Remove obsolete patches already included in kernel 6.12.

Removed (already included):
 - 805-01-v6.9-pinctrl-Add-driver-for-Awinic-AW9523-B-I2C-GPIO-Expa.patch
 - 805-02-v6.9-pinctrl-aw9523-Add-proper-terminator.patch
 - 805-03-v6.10-pinctrl-aw9523-Destroy-mutex-on-remove.patch
 - 805-04-v6.10-pinctrl-aw9523-Use-correct-error-code-for-not-suppor.patch
 - 805-05-v6.10-pinctrl-aw9523-Always-try-both-ports-in-aw9523_gpio_.patch
 - 805-06-v6.10-pinctrl-aw9523-Make-use-of-struct-pinfunction-and-PI.patch
 - 805-07-v6.10-pinctrl-aw9523-Use-temporary-variable-for-HW-IRQ-num.patch
 - 805-08-v6.10-pinctrl-aw9523-Get-rid-of-redundant-U8_MAX-pieces.patch
 - 805-09-v6.10-pinctrl-aw9523-Remove-unused-irqchip-field-in-struct.patch
 - 805-10-v6.10-pinctrl-aw9523-Make-use-of-dev_err_probe.patch
 - 805-11-v6.10-pinctrl-aw9523-Sort-headers-and-group-pinctrl.patch
 - 805-12-v6.10-pinctrl-aw9523-Fix-indentation-in-a-few-places.patch

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18654
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-11 14:12:26 +02:00
Mieczyslaw Nalewaj
e0f7afef1a kernel/ramips: Restore kernel files for v6.6
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/18654
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-11 14:12:25 +02:00
Mieczyslaw Nalewaj
2b4223c0db kernel/ramips: Create kernel files for v6.12 (from v6.6)
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/18654
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-11 14:12:25 +02:00
Álvaro Fernández Rojas
83648084cc generic: 6.12: reorganize backports
Reorganize backported 6.12 generic patches, grouping them by following
a standard naming XXX-XX-v6.x-patch-file-name.patch.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-11 07:37:25 +02:00
Álvaro Fernández Rojas
84922a1e34 kernel: add support for DesignWare I2C Platform controller
Add kernel package for DesignWare I2C platform controller.
This controller is used on the RP1 SoC found on RPi 5 devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-10 14:49:40 +02:00
Albrecht Lohofener
82d20a0fbd kernel: add support for DesignWare SPI MMIO controller
Add kernel packages for DesignWare SPI core and MMIO controllers.
This is needed for the RP1 SoC found on RPi 5 devices.

Tested with a Microchip ENC28J60 Ethernet controller on a RPi 5.

Signed-off-by: Albrecht Lohofener <albrechtloh@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19049
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-09 11:43:46 +02:00
Christian Lamparter
11c2326b2a uml: drop 6.6 config+patches
Drop configs+patches for UML's Linux 6.6 support.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2025-06-09 11:10:19 +02:00
Christian Lamparter
6f59a2e6b0 uml: use kernel 6.12 by default
This patch switches the UML target Linux kernel version to 6.12.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2025-06-09 11:10:19 +02:00
Mario Andrés Pérez
6dffaf9316 ramips: mt7621: include uboot-envtools in some missed devices
Add uboot-envtools (removing -uboot-envtools) to devices which were
missed in the commit 79bd017 ("ramips: mt7621: add uboot-envtools to
all devices")

- Mi Router 3G
- Mi Router AC2100

While at here remove two redundant entries from devices which were added
just after the referenced commit 79bd017 and did not account for the
new DEFAULT_PACKAGES member:

- SNR-CPE-ME1
- SNR-CPE-ME2-SFP

Fixes: 79bd017 ("ramips: mt7621: add uboot-envtools to all devices")
Fixes: https://github.com/openwrt/openwrt/issues/18960

Signed-off-by: Mario Andrés Pérez <mapb_@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19012
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-08 20:42:19 +02:00
John Audia
bf05b83305 kernel: add backport to fix build with GCC 15.1
Add the following to fix builds with GCC 15.1:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/arch/mips/vdso?h=next-20250606&id=0f4ae7c6ecb89bfda026d210dcf8216fb67d2333

% dmesg | grep gcc
[    0.000000] Linux version 6.6.93 (facade@redline) (mipsel-openwrt-linux-musl-gcc (OpenWrt GCC 15.1.0 r29972+15-7d617804cfe7) 15.1.0, GNU ld (GNU Binutils) 2.44) #0 SMP Sat Jun  7 12:13:18 2025

Error for reference:
./include/linux/stddef.h:11:9: error: cannot use keyword 'false' as enumeration constant
   11 |         false   = 0,
      |         ^~~~~
./include/linux/stddef.h:11:9: note: 'false' is a keyword with '-std=c23' onwards
./include/linux/types.h:35:33: error: 'bool' cannot be defined via 'typedef'
   35 | typedef _Bool                   bool;
      |                                 ^~~~
./include/linux/types.h:35:33: note: 'bool' is a keyword with '-std=c23' onwards
./include/linux/types.h:35:1: error: useless type name in empty declaration [-Werror]
   35 | typedef _Bool                   bool;
      | ^~~~~~~
  CC      arch/mips/lib/delay.o
  AR      arch/mips/fw/lib/built-in.a
  AR      arch/mips/fw/lib/lib.a
  CC      arch/mips/ralink/of.o
  CC      fs/read_write.o
  CC      block/elevator.o
cc1: all warnings being treated as errors
make[9]: *** [scripts/Makefile.build:243: arch/mips/vdso/vgettimeofday.o] Error 1
make[8]: *** [scripts/Makefile.build:480: arch/mips/vdso] Error 2

Build system: x86/64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/19058
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-08 20:34:43 +02:00
Shiji Yang
dd0476aca0 ramips: some minor FDT improvements for HiWiFi devices
This patch contains various minor FDT improvements for ramips
HiWiFi series devices:

* Add mt76 driver compatibles.
* Remove useless platform compatibles.
* Add default USB LED trigger for HC5861.
* Disable unused usbphy for HC5661, HC5661A and HC581B.
* Add switch port map properties based on 02_network scripts.
* Move aliases node to device dts because the LED nodes it
  references only exist in the device specific dts.
* Rename gpio-leds nodes to follow the upstream dt-bindings
  suggested pattern "(^led-[0-9a-f]$|led)".
* Convert deprecated LED label property to color and function.
  "system" LED has been renamed to "status", it is acceptable
  because these LEDs do not have text labels.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18251
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-08 19:37:49 +02:00
Shiji Yang
9e08350b10 ramips: convert HiWiFi devices MAC address to NVMEM format
For all HiWiFi series devices, the base MAC address is stored on
"bdinfo" partition, offset 0x18a, ASCII text format. The recently
introduced "mac-base" nvmem layout can handle the ASCII text now,
so it's time to move MAC address configurations to dts. There is
no valid MAC info in the "factory" partition, hence they will be
replaced with the correct ones.

Tested on HiWiFi HC5661A and HC5861.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18251
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-08 19:37:49 +02:00
Simonas Tamošaitis
7264a913a3 ramips: mt76x8: add Teltonika RUT951/RUT901 support
Specification:
- MediaTek MT7628AN SoC
- 128 MB of RAM EtronTech EM68C16CWQG-25IH
- 16MB of Flash Winbond W25Q128 SPI
- 4x 10/100 Mbps Ethernet, with passive PoE support on LAN1
- MediaTek MT7628AN 2.4 GHz 802.11n WiFi
- Quectel EC25-EUX 4G cat 4 modem (RUT951) or Quectel EC200A-EU 4G cat 4 modem (RUT901)
- 1x Digital input
- 1x Digital output
- 2x SIM slot (can be swapped via GPIO)
- eSIM (depends on hardware configuration, can be swapped via GPIO)

GPIO:
 - 1 button (Reset)
 - 7 LEDs (power, status green/red, RSSI 1,2,3,4,5)
 - 5 Modem control (power button, reset, status, SIM select, eSIM select)
 - 1 Digital input
 - 1 Digital output

Flashing via OEM WebUI:
1. Download the firmware image *-squashfs-factory.bin
2. Upload firmware image via OEM WebUI firmware update, do not keep settings

To revert back to OEM firmware:
https://wiki.teltonika-networks.com/view/Bootloader_menu

Mobile data connection:
Quectel EC200A-EU send command to modem:
    echo -ne 'AT+QNETDEVCTL=3,1\r\n' > /dev/ttyUSB2
    Create DHCP interface with usb0 device.
Quectel EC25-EUX create proto qmi interface.

Signed-off-by: Simonas Tamošaitis <simsasss@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18788
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-08 17:10:03 +02:00
Simonas Tamošaitis
85e300c93d ramips: mt76x8: add Teltonika RUT956/RUT906 support
Specification:
- MediaTek MT7628AN SoC
- 128 MB of RAM EtronTech EM68C16CWQG-25IH
- 16MB of Flash Winbond W25Q128 SPI
- 4x 10/100 Mbps Ethernet, with passive PoE support on LAN1
- MediaTek MT7628AN 2.4 GHz 802.11n WiFi
- Quectel EC25-EUX (RUT956) or Meig SLM770A (RUT906) modem
- GNSS
- RS232, DB9 connector, Cypress ACM via USB, /dev/ttyACM0
- RS485 /dev/ttyS1
- microSD card slot
- 2.0 USB Type-A HOST port
- analog 0-24V input (MCP3221)
- Relay
- 2x Digital input
- 2x Digital output
- 2x SIM slot (can be swapped via GPIO)
- eSIM (depends on hardware configuration, can be swapped via GPIO)

GPIO:
 - 1 button (Reset)
 - 7 LEDs (power, status green/red, RSSI 1,2,3,4,5)
 - 5 Modem control (power button, reset, status (v5 hw), SIM select, eSIM select)
 - 2 Digital input
 - 2 Digital output
 - 1 Isolated input
 - 1 RS485 tx enable
 - 1 RS485 rx enable
 - 1 Relay
 - 1 Data Carrier Detect (DCD)

Flashing via OEM WebUI:
1. Download the firmware image *-squashfs-factory.bin
2. Upload firmware image via OEM WebUI firmware update, do not keep settings

To revert back to OEM firmware:
https://wiki.teltonika-networks.com/view/Bootloader_menu

Mobile data connection:
Meig SLM770 create proto DHCP interface with usb0 device.
Quectel EC25-EUX create proto qmi interface.

Signed-off-by: Simonas Tamošaitis <simsasss@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18788
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-08 17:10:02 +02:00
Mieczyslaw Nalewaj
b44f85f51c kernel: remove duplicate PREEMPT settings
Remove duplicate PREEMPT settings PREEMPT_NONE_BUILD and PREEMPT_RT
which are already in target/linux/generic/config-6.12.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18986
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-08 15:59:55 +02:00
Álvaro Fernández Rojas
5ab72cfc40 bmips: bcm6358: add support for Huawei HG556a ver A
Specifications:
- SoC: Broadcom BCM6358 dual 300MHz MIPS
- Flash: 16MB NOR Spansion S29GL128P10
- RAM: 64MB DDR
- Ethernet: 4x 100M
- Wifi: Atheros AR9223
- 3x USB 2.0 port
- 4x Button
- 13x LED
- RJ11 2x FXS VoIP (unsupported)
- RJ11 xDSL (unsupported)

Install instructions:
- Assign static IP 192.168.1.100 to PC.
- Unplug the power source.
- Press the RESTART button at the router, don't release it yet!
- Plug the power source and wait at least 15 seconds.
- Release the RESTART button.
- Browse to http://192.168.1.1 with your PC.
- Upload the openwrt-bmips-bcm6358-huawei_hg556a-a-squashfs-cfe.bin file.
- Wait some minutes until the firmware upgrade completes.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-08 05:09:24 +02:00
Álvaro Fernández Rojas
975f4de1c8 bmips: fix LAN LEDs configuration
Commit Fixes: 15430a1348 ("bmips: use wan ports as standalone ports")
removed bridge devices and therefore switch.1 no longer exists, so let's
use br-lan instead.

Fixes: 15430a1348 ("bmips: use wan ports as standalone ports")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-07 21:13:23 +02:00
Sander van Deijck
b6a07dd091 ramips: mt7621: add support for Arcadyan WE410443
The Arcadyan WE410443 is a WiFi AC access point distributed by various ISPs
under various names, including KPN SuperWifi and BT Whole Home Wi-Fi. It
features one ethernet port, dual MT7615N radios and four internal antennas.

Hardware:
- SoC: Mediatek MT7621AT
- Flash: 32 MB
- RAM: 128 MB
- Ethernet: 1x 10/100/1000 Mbps, built into the SoC
- WLAN: 2x MediaTek MT7615N
- Buttons: 1 Reset button, 1 WPS button
- LEDs: 1x Green, 1x Blue, 1x Red, all unmarked
- Power: 12 VDC, 1.5A barrel plug

Installation:
The bootloader is locked with a password, so the image needs to be written
directly to the SPI flash chip. To do this, you need to open up the case,
remove the heatsink and connect the flash chip to a Raspberry Pi. Use the
following connections:

Flash chip --> Raspberry Pi

VCC --> 3v3
RESET --> 3v3
/CS --> GPIO 8
DO --> GPIO 9
CLK --> GPIO 11
DI --> GPIO 10
GND --> Ground

You can solder wires to the flash chip, or use a SOIC16 clip. More details on
the Raspberry Pi and SPI chip pinouts are available on the wiki [1]
When you have the Raspberry Pi connected to the flash chip, boot your Pi and
follow the instructions:

1) Make sure your Pi has SPI enabled with sudo raspi-config

2) Install necessary tools: sudo apt install xxd libubootenv-tool mtd-utils

3) Upload overlay and execute:
sudo dtc -@ -I dts -O dtb -o
/boot/overlays/we410443.dtbo we410443-overlay.dts

4) Enable in /boot/firmware/config.txt by adding a new line containing
dtoverlay=we410443

5) Reboot your Pi and verify the mtd partitions with
cat /proc/mtd, you should see:

dev:    size   erasesize  name
mtd0: 02000000 00001000 "all"
mtd1: 00030000 00001000 "u-boot"
mtd2: 00010000 00001000 "u-boot-env"
mtd3: 00010000 00001000 "factory"
mtd4: 01f60000 00001000 "firmware"
mtd5: 00010000 00001000 "glbcfg"
mtd6: 00010000 00001000 "config"
mtd7: 00010000 00001000 "glbcfg2"
mtd8: 00010000 00001000 "config2"

6) Optionally (but recommended), make a backup:
sudo dd if=/dev/mtd0 of=backup.bin
It can be restored with: sudo flashcp backup.bin /dev/mtd0

7) Set the variables for the bootloader:
echo '/dev/mtd2 0x0 0x1000 0x1000' > fw_env.config
sudo fw_setenv -c fw_env.config bootpartition 0

8) Finally, flash the image:
sudo flashcp openwrt-ramips-mt7621-arcadyan_we410443-
squashfs-sysupgrade.bin /dev/mtd4

MAC addresses
The label address is stored in ASCII in the config partition

Use --> Address

Device --> label
Ethernet --> label
WLAN 2g --> + 1
WLAN 5g --> + 2

References:
[1] https://openwrt.org/toh/arcadyan/astoria/we410443

Signed-off-by: Sander van Deijck <sander@vandeijck.com>
Link: https://github.com/openwrt/openwrt/pull/17981
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-07 21:04:53 +02:00
Shiji Yang
afdf88b9a1 ramips: dts: adjust the power regulators of MMC controller
- Fix MMC bus IO voltage. The GPIO voltage of mt762x series SoCs
  is fixed 3.3V. There are no visible registers that can control
  the voltage level. Also add "no-1-8-v" property to indicate that
  MMC controller doesn't support 1.8V IO.

- Drop useless property "enable-active-high". These dummy fixed
  voltage regulators are not controlled by the GPIO. We don't need
  to set the GPIO polarity.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18886
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-07 20:28:11 +02:00
Shiji Yang
a617ab6639 ramips: dts: mt7621: reuse the default USB dummy regulators
To simplify the device specific dts, reuse the mt7621 default
XHCI voltage regulators by adding the corresponding GPIO pin
and polarity properties.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18886
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-07 20:28:11 +02:00
Shiji Yang
548d993a04 ramips: dts: mt7621: remove redundant USB regulators
We have added the default voltage regulators for the mt7621 SoC
dtsi. These redundant voltage regulators can be removed now.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18886
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-07 20:28:11 +02:00
Shiji Yang
51b77a3298 ramips: dts: mt7621: add the missing XHCI power regulators
The USB power regulators are essential for the Mediatek XHCI
controller. If any of them is missing, the kernel will throw
a warning. Add fixed voltage io/vbus regulators to workaround
this issue. Fix the following warnings:

[    7.514572] xhci-mtk 1e1c0000.xhci: supply vbus not found, using dummy regulator
[    7.522375] xhci-mtk 1e1c0000.xhci: supply vusb33 not found, using dummy regulator

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18886
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-07 20:28:11 +02:00
Roland Reinl
300335f1ff mediatek: filogic: add support for Cudy WR3000E v1
The WR3000E has the same board layout as the WR3000S. Differences:
- Different flash chip
- LEDs with red/blue colour intead of white

Hardware:
- MediaTek MT7981 WiSoC
- 256MB DDR3 RAM
- 128MB SPI-NAND (F50L1G41LB)
- MediaTek MT7981 2x2 DBDC 802.11ax 2T2R (2.4 / 5)

MAC Addresses in OEM firmware:
- There is one on the label, e.g. AA:BB:CC:DD:EE:FF
- WLAN (2.4G) uses the same as on the label
- WLAN (5G) is the one on the label but
  - first byte (e.g. AA) + 2
  - fourth byte (e.g. DD) - 0x40
- WAN is the one on the label + 1
- LAN is the one on the label

MAC Addresses in OpenWrt:
- Same handling as in WR3000s is used

GPIO:
- 2 Buttons (all low active):
  - WPS on GPIO 0
  - Reset on GPIO 1
- 6 LEDs (all low active):
  - Power: Blue on GPIO 8, no red LED
  - WPS: Blue on GPIO 10, Red on GPIO 4
  - Internet: Blue on GPIO 11, no red LED
  - LAN: Blue on GPIO 9, Red on GPIO 5
  - WiFi 2.4G: Blue on GPIO 6, no red LED
  - WiFi 5G: Blue on GPIO 7, no red LED

Disassembly:
- Remove the 4 screws at the bottom of the case
- Cover is clipped to the bottom part of the case with clips in the front and the back

UART:
- UART pins are accessible on the bottom of the board
- The connector with the square shape is TX
- Pins: [ ] TX, ( ) RX, ( ) GND, ( ) VCC
- Settings: 115200 8N1 3.3V

Migration to OpenWrt via OEM firmware:
- There should be a migration image available from Cudy as soon as there is official OpenWrt support
- Download the migration image via OEM web interface
- After flashing, OpenWrt is accessible via 192.168.1.1
- Flash the official OpenWrt image

Migration to OpenWrt using TFTP:
- Connect UART as described above
- Press the reset button while powering on the device
- U-Boot will now try to load a recovery.bin via TFTP, this must be ignored
- After detecting a timeout, the U-Boot console is available via UART
- Set up a TFTP server on IP 192.168.1.88 and connect it to one of the LAN ports
- Provide the initramfs image via TFTP as cudy3000e.bin
- Run the following command in U-Boot: tftpboot 0x46000000 cudy3000e.bin; bootm 0x46000000
- OpenWrt initramfs image is now booting and accessible via 192.168.1.1
- Flash the sysupgrade image

Revert back to OEM:
- Set up a TFTP server on IP 192.168.1.88 and connect it to one of the LAN ports
- Provide the Cudy firmware via TFTP as recovery.bin
- Press the reset button while powering on the device
- Recovery process will start now
- After recovery is done, the OEM firmware is available at 192.168.10.1 again

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18609
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-07 18:07:03 +02:00
Álvaro Fernández Rojas
b0c8780604 bmips: add RFC v2 bcm5325 patches
Update BCM5325 patches to the latest version sent to netdev.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-07 16:08:30 +02:00
Álvaro Fernández Rojas
7d617804cf bmips: bcm6358: revert use wan ports as standalone ports
This reverts commit 15430a1348 for bcm6358 subtarget since it breaks
network configuration.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-07 13:21:31 +02:00
Jonas Gorski
15430a1348 bmips: use wan ports as standalone ports
With the recent fixes backported to 6.12, b53 ports should now fully
work as standalone ports outside of a switch.

So move them out of the switch and use them as standalone ports, which
makes configuring easier as VLANs don't need to be defined and reserved
anymore to use the wan port.

Tested on DGND3700v1.

While most devices do not define a wan port, I dropped the
ucidef_set_bridge_device() from all devices for consistency.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2025-06-07 09:58:19 +02:00
Álvaro Fernández Rojas
1a97278ee1 generic: 6.12: backport b53 RGMII port patches
Update b53 RGMII port patches to the accepted upstream version.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-07 09:48:43 +02:00
Tim Harvey
c70e987f05 imx: add 6.12 kernel as testing
Allow selecting 6.12 as testing kernel on imx.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/19029
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-06-07 08:38:07 +02:00
Tim Harvey
b0d2b33e3c imx: 6-12: refresh patches and kernel configs
patches:
 - remove patches from 6.7-6.12 that are now upstream.
 - refresh remaining patches
 - 502-6.13-arm64-dts-freescale-rename-gw7905-to-gw75xx.patch was
   misnamed as that patch went upstream in 6.12 and thus is also removed
 - 504-6.13-arm64-dts-imx-Add-i.MX8M-Plus-Gateworks-GW82XX-2X-support.patch
   was refreshed to the final version that was accepted upstream
 - 600-PCI-imx6-Start-link-at-max-gen-first-for-IMX8MM-and-IMX8MP.patch
   was removed while I investigate an upstream approach for the issue
   it was working around.

configs:
 - config-6.12: unset new configs not needed for all cortexa7/a9/a53
 - cortexa53/config-default: added new CONFIG_PCI_IMX6_HOST config for cortexA53 (IMX8M)

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/19029
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-06-07 08:38:07 +02:00
Tim Harvey
a8feb51e71 kernel/imx: Restore kernel files for v6.6
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: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/19029
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-06-07 08:38:06 +02:00
Tim Harvey
a882f0fc60 kernel/imx: Create kernel files for v6.12 (from v6.6)
This is an automatically generated commit.

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

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/19029
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-06-07 08:38:06 +02:00
John Audia
a2eaadeed2 ipq806x: config-6.6: add new option
6.6.93 introduced new config option[1]

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.93&id=fba6e5d44fb8df6bdadb1e90d2ddca715462248f

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/19026
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-06-06 10:01:31 +02:00
John Audia
45e53284e6 ipq40xx: config-6.6: add new option
6.6.93 introduced new config option[1]

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.93&id=fba6e5d44fb8df6bdadb1e90d2ddca715462248f

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/19026
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-06-06 10:01:31 +02:00
John Audia
a878dd24e7 kernel: bump 6.6 to 6.6.93
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.93

Removed upstreamed:
	backport-6.6/780-51-v6.15-r8169-don-t-scan-PHY-addresses-0.patch[1]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.93&id=961ee132104b09e054308e53d8ab4a2386a21904

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/19026
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-06-06 10:01:31 +02:00
Zheng Zhang
1f7304a0cc ramips: mt7621: fix file permissions in source tree
They don't need +x permission.

Fixes: 502916468e ("ramips: add support for ASUS 4G-AX56")
Signed-off-by: Zheng Zhang <everything411@qq.com>
Link: https://github.com/openwrt/openwrt/pull/19034
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-06-06 09:38:43 +02:00
Shiji Yang
c947e37e61 starfive: fix 6.12 kernel patch conflict
The recently committed starfive 6.12 kernel support patchset[1] has
conflict with the 6.12.32 kernel update[2]. Remove upstreamed patch
to fix the issue:

  0031-phy-starfive-jh7110-usb-Fix-usb-2.0-host-detection-f.patch [3]

[1] https://github.com/openwrt/openwrt/pull/18997
[2] https://github.com/openwrt/openwrt/pull/19027
[3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.32&id=2c09a5cbc0100e88b8872b11f4da01a656c97fbc

Fixes: ebfd69a3e3 ("kernel: bump 6.12 to 6.12.32")
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19039
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-06 07:42:35 +02:00
Sergey Shlukov
8b24289a52 mediatek: add support for TP-Link Archer AX80v1(US/RU/CA)
This commit adds support for TP-Link Archer AX80v1(US/RU/CA).

Device specification
SoC Type:   MediaTek MT7986AV, Cortex-A53, 64-bit
RAM:        ESMT M15T4G16256 (512MB)
Flash:      ESMT F50L1G41LB (128 MB)
Ethernet:   MediaTek MT7531AE + 2.5GbE MaxLinear GPY211C0VC (SLNW8)
Ethernet:   1x2.5Gbe (WAN/LAN 2.5Gbps), 4xGbE (WAN/LAN 1Gbps, LAN1, LAN2, LAN3)
WLAN 2g:    MediaTek MT7976GN
WLAN 5g:    MediaTek MT7976AN
LEDs:       1 red,1 green,1 blue status LEDs,

Buttons:    4 (Reset,ledswitch,wps,wlan),
USB ports:  1 (USB 3.0)
Power:      12 VDC, 3,3 A
Connector:  Barrel
Bootloader: Main U-Boot - U-Boot 2022.01-rc4. Additionally, both UBI
            slots contain "seconduboot" (also U-Boot 2022.01-rc4)
Serial console (UART)
                            V
+-------+-------+-------+-------+
| +3.3V |  GND  |  TX   |  RX   |
+---+---+-------+-------+-------+
    |
    +--- Don't connect

Installation (UART)
Place OpenWrt initramfs image on tftp server with IP 192.168.1.2

Attach UART, switch on the router and interrupt the boot process by pressing 'Ctrl-C'

Load and run OpenWrt initramfs image:

      tftpboot initramfs-kernel.bin
      bootm

!!Attention!! is very important! After entering OpenWrt, please set / update the environment variables:

fw_setenv bootargs "ubi.mtd=ubi0 console=ttyS0,115200n1 loglevel=8 earlycon=uart8250,mmio32,0x11002000 init=/etc/preinit"
fw_setenv mtdids "spi-nand0=spi-nand0"
fw_setenv mtdparts "spi-nand0:2M(boot),1M(u-boot-env),50M(ubi0),50M(ubi1),8M(userconfig),4M(tp_data),8M(mali_data)"
fw_setenv tp_boot_idx 0

Run 'sysupgrade -n' with the sysupgrade OpenWrt image from console or Luci WebUI.

Recovery

Press Reset button and power on the router
Navigate to U-Boot recovery web server (192.168.1.1) and upload the OEM firmware

Stock layout

0x000000000000-0x000000200000 : "boot"
0x000000200000-0x000000300000 : "u-boot-env"
0x000000300000-0x000003500000 : "ubi0"
0x000003500000-0x000006700000 : "ubi1"
0x000006700000-0x000006f00000 : "userconfig"
0x000006f00000-0x000007300000 : "tp_data"
0x000007300000-0x000007B00000 : "mali_data"

ubi0/ubi1 format
U-Boot at boot checks that all volumes are in place:

+-------------------------------+
| Volume Name: uboot   Vol ID: 0|
| Volume Name: kernel  Vol ID: 1|
| Volume Name: rootfs  Vol ID: 2|
+-------------------------------+
MAC addresses
+---------+-------------------+-----------+
| label   | 00:eb:xx:xx:xx:be | label     |
| LAN     | 00:eb:xx:xx:xx:be | label     |
| WAN     | 00:eb:xx:xx:xx:bf | label+1   |
| WLAN 2g | 00:eb:xx:xx:xx:be | label     |
| WLAN 5g | 00:eb:xx:xx:xx:bd | label-1   |
+---------+-------------------+-----------+
label MAC address was found in UBI partition "tp_data", file "default-mac".
OEM wireless eeprom is also there (file "MT7986_EEPROM.bin").

Signed-off-by: Sergey Shlukov <ichizakurain@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17753
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-05 22:55:55 +02:00
Roland Reinl
54febbc55b mediatek: Create common DTSI for WR3000H and WR3000S
This change moves common elements of the WR3000H and the WR3000S to mt7981b-cudy-wr3000-nand.dtsi.
This will simplify adding of new similar devices, for exapmle WR3000E.

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18619
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-05 21:13:24 +02:00
Shiji Yang
ebfd69a3e3 kernel: bump 6.12 to 6.12.32
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.32

All patches are automatically refreshed.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Tested-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/19027
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-05 21:11:28 +02:00
Zoltan HERPAI
ee129da777 starfive: add 6.12 as testing kernel
Runtime-tested on:
 - Visionfive v2-1.3b (JH7110)
 - Visionfive v1 (JH7100)

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2025-06-05 16:39:15 +02:00
Zoltan HERPAI
f97609a10f starfive: jh7110: update bootscript to use addresses in bootloader
Rather than hardcoding the kernel/fdt addresses in the boot.scr script,
use the addresses provided by the bootloader.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2025-06-05 16:39:15 +02:00
Zoltan HERPAI
8f0f02d297 starfive: 6.12: refresh patches and drop upstreamed ones
- refresh, rebase and reorder patches
 - JH7110 media drivers have been dropped for now
 - JH7110 E24 and mailbox drivers were added
 - JH7100 DMA- and errata-patches have been dropped as they were
   upstreamed

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2025-06-05 16:39:15 +02:00
Zoltan HERPAI
91ee157b9d kernel/starfive: Restore kernel files for v6.6
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: Zoltan HERPAI <wigyori@uid0.hu>
2025-06-05 16:39:15 +02:00
Zoltan HERPAI
ec54e841b9 kernel/starfive: Create kernel files for v6.12 (from v6.6)
This is an automatically generated commit.

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

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2025-06-05 16:39:15 +02:00
Robert Marko
df9ffedb75 archs38: drop target
archs38 has been on life support for the last couple of releases,eventually
leading to marking it as source-only in 2023.

It has been basically only touched to do a kernel bump so that we can make
the new OpenWrt release.

Link: https://github.com/openwrt/openwrt/pull/19001
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-05 10:43:00 +02:00
Mathew McBride
1304d8b064 armsr: enable 6.12 as a testing kernel version
Allow the armsr target to be built with a 6.12 kernel
when CONFIG_TESTING_KERNEL is set.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
Link: https://github.com/openwrt/openwrt/pull/18849
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-04 20:18:27 +02:00
Mathew McBride
08c4948ac6 armsr: 6.12: add new KConfigs and refresh
This includes both new additions to 6.12
and an attempted "refresh" of the config
to remove duplicates from target/generic/config-6.12.

(The OpenWrt kernel_makeoldconfig does not
work well with the armv8 subtarget for reasons
I am yet to determine, so that file has been
pruned manually)

Most new options are in armv8, where the
KConfig relates to a platform that will likely
be armsr compatible (like the i.MX91/93/95),
it has been enabled.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
Link: https://github.com/openwrt/openwrt/pull/18849
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-04 20:18:27 +02:00
Mathew McBride
46cf1dacd3 armsr: patches: refresh printk console patch for 6.12
This carries the text console behaviour fix as described in
[1] over to the 6.12 kernel.

Signed-off-by: Mathew McBride <matt@traverse.com.au>

[1] https://github.com/openwrt/openwrt/pull/17012#issuecomment-2591751115
Link: https://github.com/openwrt/openwrt/pull/18849

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-04 20:18:27 +02:00
Mathew McBride
1218717c05 kernel/armsr: Restore kernel files for v6.6
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: Mathew McBride <matt@traverse.com.au>
Link: https://github.com/openwrt/openwrt/pull/18849
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-04 20:18:26 +02:00
Mathew McBride
386f1a1a1e kernel/armsr: Create kernel files for v6.12 (from v6.6)
This is an automatically generated commit.

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

Signed-off-by: Mathew McBride <matt@traverse.com.au>
Link: https://github.com/openwrt/openwrt/pull/18849
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-04 20:18:26 +02:00
Markus Stockhausen
c78765213e kernel: mtdsplit_uimage: return 0 if not fatal
Introduced with Linux 6.7, in commit:
5c2f7727d437 ("mtd: mtdpart: check for subpartitions parsing result"),
when a parser returns an error, this will be passed up, and
consequently, all parent mtd partitions get torn down.

Adjust the mtdsplit_uimage driver to only return an error if there is a
critical problem in reading from the mtd device or allocating memory.
Otherwise return 0 to indicate that no partitions were found.
Also add logging to indicate what went wrong.

E.g. on Realtek devices that are booted for the first time through
initramfs with OpenWrt never installed before boot log will show

[    0.932985] Creating 8 MTD partitions on "spi0.0":
[    0.938412] 0x000000000000-0x000000080000 : "u-boot"
[    0.990151] 0x000000080000-0x0000000c0000 : "u-boot-env"
[    0.999907] 0x0000000c0000-0x000000100000 : "board-name"
[    1.019971] 0x000000100000-0x000000e80000 : "firmware"
[    1.051582] mtdsplit_uimage: no uImage found in "firmware"
[    1.069365] 0x000000e80000-0x000001000000 : "kernel2"
[    1.078959] 0x000001000000-0x000001040000 : "sysinfo"
[    1.099747] 0x000001040000-0x000001c40000 : "rootfs2"
[    1.119865] 0x000001c40000-0x000002000000 : "jffs2"

Similar issue was fixed before with commit ade045084b
("kernel: mtdsplit_minor: return 0 if not fatal")

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19016
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-04 12:50:12 +02:00