31073 Commits

Author SHA1 Message Date
Daniel Golle
9e9f6875bc generic: fitblk: close block device if mapping image failed
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
In case a broken fit image is present on flash the fitblk driver would
not map any /dev/fit* devices, but also not always close the block device
the image resides on. In case of ubiblock devices this is fatal as one
then cannot remove the ubiblock device (-EBUSY), and hence cannot replace
the broken image.
Always close the block device in case no sub-image was mapped.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 2b9c81d1cbc65eeb9304b7274058418efa8a9c78)
2025-04-14 18:32:05 +01:00
Daniel Golle
be1b254888 kernel: move accepted patch from pending-6.6 to backport-6.6
742-net-phy-air_en8811h-reset-netdev-rules-when-LED-is-s.patch has been
accepted a while ago as
https://git.kernel.org/torvalds/linux/c/87bfdbbb1992

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 7a303d861a58bdcdd37430fcbf54bdd76b7cf6e0)
2025-04-14 18:32:05 +01:00
INAGAKI Hiroshi
c0ae5d2071 ath79: fix initramfs execution for NEC Aterm devices
Fix execution of initramfs image on NEC Aterm devices by increasing
available memory for lzma extraction of lzma-loader.

The size of initramfs image of v24.10.0 exceeds available memory
(LZMA_TEXT_START - LOADADDR) and loader data running at LZMA_TEXT_START
will be overwritten by extracted data. As a result, LZMA extraction will
be broken and stuck (or unexpectedly reset).
Fix that issue by setting higher LZMA_TEXT_START address to increase
available memory for LZMA extraction by lzma-loader.

log (v24.10.0):

boot> tftpd
tftpd start 192.168.0.1
boot> start tftp load openwrt-24.10.0-ath79-generic-ne
end tftp load length = 6569768
start memory load ...
memory load complete
  begin  : 0x80040000
  length : 6567044
  startup: 0x80040000

boot> boot
begin  : 0x80040000
length : 6567044
startup: 0x80040000
option: 0x0
NEC Aterm series (QCA9558)

Calibrating SGMII
SGMII cal value = 0xe

Configuring SGMII force mode
  SGMII_CONFIG : 0x000000a2
  MR_AN_CONTROL: 0x00008140
  MR_AN_CONTROL: 0x00000140

OpenWrt kernel loader for AR7XXX/AR9XXX
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Decompressing kernel... [:<syntax:value>]');retu  <--- (stuck)
IPL:SOFT-RESET                    <--- (reset by WDT)
memory test ... ok
flinstall OK

boot version: 1.0.0
...

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18476
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 10a674d27738020384a1bfcca693200999a9e406)
2025-04-13 16:55:16 +02:00
Shiji Yang
31c3ab3b45 ipq40xx: dts: fix "qcom,coexist-support" property type
Convert the property variable type of "qcom,coexist-support" from
u32 to u8 to match the definition in the dt-bindings document.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18393
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 3526dbabdc63c6ac8a932333ab989d1f99b6945b)
2025-04-10 20:51:56 +02:00
Fil Dunsky
d47f6a365f mediatek: filogic: add support for Huasifei WH3000
**Huasifei WH3000 eMMC / Fudy MT3000**
Portable Wi-Fi 6 travel router based on MediaTek MT7981A SoC.
MT7981B+MT7976CN+RTL8221B Dual Core 1.3GHZ

**Specifications**
SoC: Filogic 820 MT7981A (1.3GHz)
RAM: DDR4 1GB
Flash: eMMC 8GB
WiFi: 2.4GHz and 5GHz with 3 antennas
Ethernet:
1x WAN (10/100/1000M)
1x LAN (10/100/1000/2500M)
USB: 1x USB 3.0 port
Two buttons: power/reset and mode (BTN_0)
LEDS: blue, red, blue+red=pink
UART: 3.3V, TX, RX, GND / 115200 8N1

**Installation via U-Boot rescue**
1. Set static IP 192.168.1.2 on your computer and default route as 192.168.1.1
2. Connect to the WAN port and hold the reset button while booting the device.
3. Wait for the LED to blink 5 times, and release the reset button.
4. Open U-boot web page on your browser at http://192.168.1.1
5. Select the OpenWRT sysupgrade image, upload it, and start the upgrade.
6. Wait for the router to flash the new firmware.
7. Wait for the router to reboot itself.

**Installation via sysupgrade**
Just flash sysupgrade file via [LuCI upgrade page](http://192.168.1.1/cgi-bin/luci/admin/system/flash) without saving the settings.

**Installation via SSH**
Upload the file to the router `/tmp` directory, `ssh root@192.168.1.1` and issue a command:
```
sysupgrade -n /tmp/openwrt-mediatek-filogic-huasifei_wh3000-emmc-squashfs-sysupgrade.bin
```

**Factory MAC**
You can find your Factory MAC which is mentioned on the box at `/dev/mmcblck0p2` partition `factory` starting from `0x4`
```
dd if=/dev/mmcblk0p2 bs=1 skip=4 count=6 | hexdump -C
```

**Enlarging a partition**
Though device has 8GB eMMC, it uses only 2GB `/dev/mmcblck0p6` as `rootfs` for `/rom` and `/overlay` leaving `/dev/mmcblck0p7` as empty unused space.
```
sgdisk -p /dev/mmcblk0
```
```
Disk /dev/mmcblk0: 15269888 sectors, 7.3 GiB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 2BD17853-102B-4500-AA1A-8A21D4D7984D
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 14942174
Partitions will be aligned on 1024-sector boundaries
Total free space is 11197 sectors (5.5 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            8192            9215   512.0 KiB   8300  u-boot-env
   2            9216           13311   2.0 MiB     8300  factory
   3           13312           21503   4.0 MiB     8300  fip
   4           21504           29695   4.0 MiB     8300  config
   5           29696           62463   16.0 MiB    8300  kernel
   6           62464         4256767   2.0 GiB     8300  rootfs
   7         4257792        14940159   5.1 GiB     8300
```

You can fix that by loading into `initramfs-kernel`, deleting empty `mmcblck0p7` partition and resizing `mmcblck0p6`
```
sysupgrade -F /tmp/openwrt-initramfs-kernel.bin
```
Install and run cfdisk
```
opkg update && opkg install cfdisk
cfdisk /dev/mmcblck0
```
- Select `mmcblck0p7` -> Delete
- Select `mmcblck0p6` -> Resize -> Write -> yes -> Quit

You will not see any difference in `cat /proc/partitions` after that but just flash a `sysupgrade` and you'll get the whole 7.3GB space for the `/overlay`.

Co-developed-by: hecatae <horus.ra@gmail.com>
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18220
(cherry picked from commit 99ea96c297305c632a23e966df6aea1bfac241f9)
Link: https://github.com/openwrt/openwrt/pull/18434
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-10 20:29:37 +02:00
Mikhail Zhilkin
8e8cafcd0e mediatek: add support for netis NX31
This PR adds support for netis NX31 router.

Specification
-------------
- SoC       : MediaTek MT7981BA dual-core ARM Cortex-A53 1.3 GHz
- RAM       : 256 MiB DDR3
- Flash     : SPI-NAND 128 MiB (ESMT)
- WLAN      : MediaTek MT7976CN dual-band WiFi 6
  - 2.4 GHz : b/g/n/ax, MIMO 2x2
  - 5 GHz   : a/n/ac/ax, MIMO 2x2
- Ethernet  : 10/100/1000 Mbps x3 (LAN, MediaTek MT7531AE)
              10/100/1000 Mbps x1 (WAN, SoC internal phy)
- USB       : No
- Buttons   : Mesh, Reset
- LEDs      : 1x Power (blue), unmanaged
              1x Status (blue), gpio-controlled
              1x WiFi 2.4 GHz (blue), gpio-controlled
              1x WiFi 5 GHz (blue), gpio-controlled
              3x LAN activity (blue), switch-controlled
              1x WAN activity (blue), gpio-controlled
- Power     : 12 VDC, 1 A

Installation
------------
1. Connect to the router using ssh (user: admin, pass: web interface
   password)
2. Make mtd backup:
   cat /dev/mtd0 | gzip -1 -c > /tmp/mtd0_spi0.0.bin.gz
   cat /dev/mtd1 | gzip -1 -c > /tmp/mtd1_BL2.bin.gz
   cat /dev/mtd2 | gzip -1 -c > /tmp/mtd2_u-boot-env.bin.gz
   cat /dev/mtd3 | gzip -1 -c > /tmp/mtd3_Factory.bin.gz
   cat /dev/mtd4 | gzip -1 -c > /tmp/mtd4_FIP.bin.gz
   cat /dev/mtd5 | gzip -1 -c > /tmp/mtd5_ubi.bin.gz
3. Download mtd backup from the /tmp dir of the router to your PC using
   scp protocol
4. Upload OpenWrt 'bl31-uboot.fip', 'preloader.bin' images to the /tmp
   dir of the router using scp protocol
5. Write FIP and BL2 (replace bootloader):
   mtd write /tmp/openwrt-mediatek-filogic-netis_nx31-bl31-uboot.fip FIP
   mtd write /tmp/openwrt-mediatek-filogic-netis_nx31-preloader.bin BL2
6. Place OpenWrt
   'openwrt-mediatek-filogic-netis_nx31-initramfs-recovery.itb' image on
   the tftp server (IP: 192.168.1.254)
7. Erase 'ubi' partition and reboot the router:
   mtd erase ubi
   reboot
8. U-Boot automatically boot OpenWrt recovery image from tftp server to
   the RAM
9. Upload OpenWrt 'sysupgrade.itb' image to the /tmp dir of the router
   (IP: 192.168.1.1) using scp protocol
10. Connect to the router using ssh and run:
    sysupgrade -n openwrt-mediatek-filogic-netis_nx31-squashfs-sysupgrade.itb

Return to stock
---------------
1. Unpack stock BL2 and FIP partitions backup
2. Upload stock BL2 and FIP partitions backup to the /tmp dir of the
   router using scp protocol
3. Connect to the router using ssh and run:
   apk update && apk add kmod-mtd-rw
   insmod mtd-rw i_want_a_brick=1
   mtd unlock BL2
   mtd unlock FIP
4. Restore backup:
   mtd write /tmp/mtd4_FIP.bin FIP
   mtd write /tmp/mtd1_BL2.bin BL2
5. Erase ubi and reboot:
   mtd erase ubi
   reboot
6. Power off the router
7. Press Reset button and power on the router. Release the button after
   ~10 sec
8. Navigate to U-Boot recovery web server (http://192.168.1.1/) and
   upload the OEM firmware

Recovery
--------
1. Place OpenWrt
   'openwrt-mediatek-filogic-netis_nx31-initramfs-recovery.itb' image on
   the tftp server (IP: 192.168.1.254)
2. Press “Reset” button and power on the router. After ~10 sec release
   the button.
3. Use OpenWrt initramfs system for recovery

MAC addresses
-------------
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| LAN     | dc:xx:xx:d1:xx:18 | label     |
| WAN     | dc:xx:xx:d1:xx:1a | label+2   |
| WLAN 2g | de:xx:xx:11:xx:19 |           |
| WLAN 5g | de:xx:xx:71:xx:19 |           |
+---------+-------------------+-----------+
The LAN MAC was found in 'Factory', 0x1fef20
The WAN MAC was found in 'Factory', 0x1fef26
The WLAN 2g/5g MAC prototype was found in 'Factory', 0x4

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18324
(cherry picked from commit d8002cb627edcbef27dedf9768a45ab0435ac55e)
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18438
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-10 20:18:23 +02:00
Mieczyslaw Nalewaj
b16a42159b kernel: bump 6.6 to 6.6.86
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.86

Removed upstreamed:
        generic/pending-6.6/155-usbnet-restore-usb%d-name-exception-for-local-mac-addresses.patch[1]

1. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.86&id=2beb999f73b48f3cb04d7cb9c4b5400d59f80f89

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18443
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit f7c0331c50f1bb123255e76fd544021576b4e477)
Link: https://github.com/openwrt/openwrt/pull/18451
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-10 20:14:56 +02:00
Álvaro Fernández Rojas
2b1847c781 bcm27xx: pull 6.6 patches from RPi repo
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Adds latest 6.6 patches from the Raspberry Pi repository.

These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.6.y/
With the following command:
git format-patch -N v6.6.85..HEAD
(HEAD -> bba53a117a4a5c29da892962332ff1605990e17a)

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 4618d09587c4e3d5fdc7643494474be602710815)
2025-04-10 13:43:36 +02:00
Matthias Schiffer
2868202df3
ipq40xx: qca8k: hook up IPQ4019 bridge flag offloading
Some checks failed
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build Kernel / Build all affected Kernels (push) Has been cancelled
Adds support for setting bridge port learning and isolation flags on
ipq40xx.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Link: https://github.com/openwrt/openwrt/pull/18375
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit af93874f4e5e4f6a8646964fecf385711d527e89)
2025-04-08 18:24:33 +02:00
Matthias Schiffer
eb1f411036
generic: qca8k: backport bridge port isolation support
Bridge port isolation offload support has been added to the bridge core
and many DSA drivers. mt7530 support was backported in OpenWrt commit
c4e6a147a6c0 ("generic: 6.6: mt7530: add support for bridge port
isolation").

Backport qca8k support as well.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Link: https://github.com/openwrt/openwrt/pull/18375
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 5d1dedd9f7fc7a7c893e14ec6c1548e2be7a1a13)
2025-04-08 18:24:33 +02:00
Jan Hoffmann
8729666926 realtek: refactor RTL930x MAC config to fix PHY ports
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Currently, network ports using PHYs get a link, but there is no traffic.
Make it work again by moving the MAC config to phylink_mac_link_up.

A similiar change has been previously applied for RTL83xx in commit
cd958d945be0 ("realtek: 6.6: refactor mac config and link up for
RTL83xx").

Fixes: https://github.com/openwrt/openwrt/issues/17010
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Tested-by: Christoph Krapp <achterin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18268
Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit a7e1e138172a1e4f9c35db93c11d026bb3338e24)
2025-04-08 10:51:39 +02:00
John Audia
cf3988c266 kernel: bump 6.6 to 6.6.85
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.85

Removed upstreamed:
        bcm27xx/patches-6.6/950-1498-dts-bcm2711-PL011-UARTs-are-actually-r1p5.patch[1]
        bcm27xx/patches-6.6/950-1551-drm-v3d-Don-t-run-jobs-that-have-errors-flagged-in-i.patch[2]

Manually rebased:
        bcm27xx/patches-6.6/950-1512-dts-bcm2711-Don-t-mark-timer-regs-unconfigured.patch

All other patches automatically rebased.

1. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.85&id=61820187b3ef5a15aed7ef49ed1fcc13398b449c
2. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.85&id=7cd375d46afcce906cfcddf5aec6b318199d1f16

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/18379
(cherry picked from commit 2e71e41ce66077515a8c4f5be82c75aeeead659d)
Link: https://github.com/openwrt/openwrt/pull/18419
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-05 17:07:43 +02:00
John Audia
52870ddf62 kernel: bump 6.6 to 6.6.84
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.84

All patches automatically rebased.

Build system: x86/64
Build-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, x86/64
Run-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, x86/64

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18326
Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit 314ca0387743e5d18850d9c7c959a3206ec6fbc5)
Link: https://github.com/openwrt/openwrt/pull/18419
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-05 17:07:43 +02:00
Kyle Hendry
f31675b69b bmips: add support for Actiontec T1200H
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Specifications:
- SoC: Broadcom BCM63168 dual 400MHz MIPS
- Flash: 128MB NAND ESMT F59L1G81A
- RAM: 128MB DDR3
- Ethernet: 5x 1000M
- Wifi: BCM435F
- 1x USB 2.0 port
- 2x Button
- 11x LED
- Coax HPNA (unsupported)
- RJ11 xDSL (unsupported)

Install instructions:
The booloader will only install signed firmware so the image has to
be manually flashed.

- Set up a TFTP server on 192.168.1.0/24 to serve the initramfs image
- Interrupt the bootloader and run from RAM with
  r 192.168.1.100:openwrt-bmips-bcm63268-actiontec_t1200h-initramfs.elf
- On the openwrt console, copy the wfi image using wget/tftp/scp, i.e
  scp user@192.168.1.100:~/openwrt/bin/targets/bmips/bcm63268/openwrt-bmips-bcm63268-actiontec_t1200h-squashfs-cfe.bin /tmp/
- Erase half the flash partition where openwrt will be installed with
  flash_erase -j /dev/mtd1 0 491
- Flash the openwrt image with
  nandwrite -p /dev/mtd1 /tmp/openwrt-bmips-bcm63268-actiontec_t1200h-squashfs-cfe.bin
- Reboot
- Interrupt the bootloader again and use the c command to boot from
  previous firmware if vendor image is loaded

Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
[Minor improvements to DTS file]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 65b8a978deac05894d1fd20dfe63494f4b43848d)
2025-04-02 19:11:49 +02:00
Tomas Lara
0073a7bc93 rockchip: fix missing ".patch" file extension
Fixes missing .patch file extension in:
- de9ad11dac
- 2e7d060fd1

Signed-off-by: Tomas Lara <tl849670@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18281
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit f86476b18bb99f9f9491c30430bfa9fa110cb394)
Link: https://github.com/openwrt/openwrt/pull/18347
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-01 00:26:09 +02:00
Michel Lespinasse
092ee8bf07 rockchip: set network IRQ affinity to fast CPU cores
The nanopi R6S, R6C and nanopc T6 platforms are based on rk3588(s) SoC,
which has fast and slow CPU cores. Set up network interrupt affinity to be
on the fast CPU cores by default. This is similar to the way this was
already configured on nanopi R4S.

Signed-off-by: Michel Lespinasse <michel@lespinasse.org>
Link: https://github.com/openwrt/openwrt/pull/17638
(cherry picked from commit 59215154a0eba77f0a79a6e30069a3037603ebf2)
Link: https://github.com/openwrt/openwrt/pull/18347
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-01 00:26:09 +02:00
Michel Lespinasse
f9d59735c6 rockchip: configure reset button on nanopi R6
Set up openwrt to handle the reset button appropriately (so that it
can trigger the various recovery modes) on the nanopi R6S and R6C models.

Signed-off-by: Michel Lespinasse <michel@lespinasse.org>
Link: https://github.com/openwrt/openwrt/pull/17638
(cherry picked from commit 2e7d060fd1ba6160067df1a2ba303c7c2efe2a7e)
Link: https://github.com/openwrt/openwrt/pull/18347
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-01 00:26:09 +02:00
Michel Lespinasse
ec231bf564 rockchip: show boot stages on nanopi R6 system LED
Set up openwrt to show boot progress on the nanopi R6S or R6C system LED.

The LED blinking states indicate the boot stage. The LED is defined as
a power LED, but can still be set to heartbeat in /etc/config/system
after the system is done booting.

Signed-off-by: Michel Lespinasse <michel@lespinasse.org>
Link: https://github.com/openwrt/openwrt/pull/17638
(cherry picked from commit de9ad11dac094b6074c9b23341acbc28806404ae)
Link: https://github.com/openwrt/openwrt/pull/18347
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-01 00:26:09 +02:00
Coia Prant
76c1d0f493 ramips: Fix Hongdian H8922 v30 pinctrl default state
According to the MT7620A hardware datasheet, GPIO/14 was originally used for RIN of UARTF, but is now used as the WPS LED.

Corrected pinctrl to ensure it works properly in the future.

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18278
Link: https://github.com/openwrt/openwrt/pull/18279
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 612bedaf5b0a0186e34e521ebfc122404aeff265)
2025-04-01 00:17:10 +02:00
Rui Salvaterra
1c1c373943 kernel: backport igc hw vlan patch to 24.10
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Fix an abysmal out-of-the-box performance issue with igc-supported Ethernet
controllers and 802.1Q.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2025-03-28 16:26:03 +00:00
Christian Marangi
53479294fb
generic: globally enable CONFIG_PCPU_DEV_REFCNT
Some checks failed
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build Kernel / Build all affected Kernels (push) Has been cancelled
Quoting the kconfig description for CONFIG_PCPU_DEV_REFCNT:

network device refcount are using per cpu variables if this option is
set. This can be forced to N to detect underflows (with a performance
drop).

This was introduced from kernel 5.13 and was wrongly set as disabled.
Some target actually enables it but this should be always enabled unless
refcount needs to be debugged (unlikely for production images)

Enable in generic and drop the entry in every other target.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18174
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit ea6f3e49d6509f3bddb43364cf7225b4935fee82)
2025-03-19 09:24:43 +01:00
Tomasz Maciej Nowak
5c533d7a89 mediatek: u7623: fix network switch enumeration
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
With upstream changes hitting kernel 6.4 the dtb for u7623 ends up with
both mac (gmac) disabled, since this is now the default status in
mt7623.dtsi. Fix this by including mt7623a.dtsi (which already has all
necessary bits) and enabling all revlevant ports. This will also do
a side hustle of assigning proper clocks for power controller and
specifying proper power domain for few devices.

Link: https://lore.kernel.org/all/20230210182505.24597-1-arinc.unal@arinc9.com
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250304164507.60511-2-tmn505@terefe.re/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit adc4d95c742139411c551a20d93103c9a1155ddd)
2025-03-17 16:21:23 +01:00
J. S. Seldenthuis
3c1edff293 ramips: use openwrt,netdev-name to fix port name conflict on TP-Link Deco M4R v4
Since 24.10.0, eth0, used for the WAN interface, does not work. From dmesg:

...
[    1.831126] mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
[    1.846204] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 19
...
[    1.933969] mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
[    1.967668] mt7530-mdio mdio-bus:1f: configuring for fixed/rgmii link mode
[    1.975999] mt7530-mdio mdio-bus:1f eth0 (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7530 PHY] (irq=21)
[    1.986907] mt7530-mdio mdio-bus:1f: Link is Up - 1Gbps/Full - flow control rx/tx
[    1.987149] mtk_soc_eth 1e100000.ethernet eth0: error -17 registering interface eth0
[    2.004157] mt7530-mdio mdio-bus:1f eth1 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7530 PHY] (irq=22)
[    2.017698] mtk_soc_eth 1e100000.ethernet eth0: entered promiscuous mode
[    2.024849] DSA: tree 0 setup
...
[    4.249680] mtk_soc_eth 1e100000.ethernet dsa: renamed from eth0
...

Like #15865, it seems that gmac0 does not rename eth0 to dsa until after the
switch ports are initialized, leading to a name collision (error -17 = EEXIST).

This patch follows #17062 by using openwrt,netdev-name to fix the collision.

Signed-off-by: J. S. Seldenthuis <jseldenthuis@lely.com>
Link: https://github.com/openwrt/openwrt/pull/18082
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 4fed462454469e9af89bc92cd12d30c47d43efe4)
2025-03-17 16:21:23 +01:00
Shiji Yang
9db716b6dc stm32: modules: fix stm32-hash package build
* Remove misplaced backslash to fix the build warning:

WARNING: can't parse line: FILES:=/drivers/crypto/stm32/stm32-hash.ko

* Add missing dependency package kmod-crypto-engine:

Package kmod-stm32-hash is missing dependencies for the following libraries:
crypto_engine.ko

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/18241
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 4efb4a26d28ecdd5fec9dc3a85bcb46a45a75f60)
2025-03-17 16:21:23 +01:00
Tianling Shen
a748c1af75 ramips: fix reading mac address for hiwifi hc5962
The spaces in variables have been stripped since commit 551e04f3c9c0
("base-files: strip space and tab characters from ASCII mac address"),
resulting "Vfac_mac " matches nothing. Fix the issue by removing the
space at end.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/18150
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 2091c29578ca99b468e79695149be6f4b6cccb36)
2025-03-17 16:21:23 +01:00
Mikhail Zhilkin
d5a9ec601d mediatek: Xiaomi AX3000t: enable SPI calibration
Xiaomi enabled SPI calibration in new firmware:
- 1.0.84 and newer (rd03 model)
- 1.0.76 and newer (rd23 model)

This enables SPI calibration routines in OpenWrt too.

Tested-by: Aleksandr Danilov <sc16me@gmail.com>
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17976
(cherry picked from commit 043df82cea89786f1dcdfe47af1736bf8833fde9)
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18270
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 16:14:27 +01:00
Roland Reinl
4e69539953 ramips: Add support for Cudy M1200 v1
The M1200 v1 is similar to the TR1200 series from Cudy. Differences:
- Only 1 LAN port
- No USB

Specifications:
- MT7628
- MT7628AN (2.4G b/g/n) and MT7613BE (5G ac/n) wifi
- 128 MB RAM
- 16 MB flash

MAC Addresses:
- There is one on the label, e.g. xx:xx:xx:xx:xx:A4
- LAN (bottom connector) is the same as the label, e.g. xx:xx:xx:xx:xx:A4
- WAN (top connector) is label + 1, e.g. xx:xx:xx:xx:xx:A5
- WLAN (2.4G) is the same as the label, e.g. xx:xx:xx:xx:xx:A4
- WLAN (5G) is label + 2, e.g. xx:xx:xx:xx:xx:A6

UART:
- is available via the pin holes on the board
- The pinout is printed to the board: P: VCC, G: GND, R: RX, T:TX
- RX and TX require solder bridges to be installed
- Do NOT connect VCC
- Settings: 3.3V, 115200, 8N1

GPIO:
- There are two LEDs: Red (GPIO 4) and White (GPIO 0)
- There are two buttons: Reset (GPIO 11) and WPS (GPIO 5)

Migration to OpenWrt:
- Download the migration image from the Cudy website (it should be available as soon as OpenWrt officially supports the device)
- Connect computer to LAN (bottom connector) and flash the migration image via OEM web interface
- OpenWrt is now accessible via 192.168.1.1

Revert back to OEM firmware:
- Set up a TFTP server on IP 192.168.1.88 and connect to the WAN port (upper port)
- Provide the Cudy firmware as recovery.bin in the TFTP server
- Press the reset button while powering on the device
- Recovery process is started now
- When recovery process is done, OEM firmware is accessible via 192.168.10.1 again

General information:
- No possibility to load a initramfs image via U-Boot because there is no option to interrupt U-Boot

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18233
(cherry picked from commit c13a050d5ad55ab090a592823a9f964af8614fc2)
Link: https://github.com/openwrt/openwrt/pull/18252
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 16:12:47 +01:00
Álvaro Fernández Rojas
5872633b9d bcm27xx: pull 6.6 patches from RPi repo
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Adds latest 6.6 patches from the Raspberry Pi repository.

These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.6.y/
With the following command:
git format-patch -N v6.6.83..HEAD
(HEAD -> 08d4e8f52256bd422d8a1f876411603f627d0a82)

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 251f76c1c67d62c585d799c38dab31e1385d2ad5)
2025-03-16 21:08:29 +01:00
John Audia
a3213ab1b5 kernel: bump 6.6 to 6.6.83
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build host tools / Build host tools for linux and macos based systems (push) Waiting to run
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.83

Removed upstreamed:
	bcm27xx/patches-6.6/950-0483-usb-xhci-borrow-upstream-TRB_FETCH-quirk-on-VL805-ho.patch[1]

Manually rebased:
	bcm27xx/patches-6.6/950-0061-Revert-Revert-xhci-add-quirk-for-host-controllers-th.patch
	bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch
	bcm27xx/patches-6.6/950-0519-usb-dwc3-Set-DMA-and-coherent-masks-early.patch

All other patches automatically rebased.

1. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/usb/host/xhci-pci.c?h=linux-6.6.y&id=c401b1b4b835d66792e884b76264d742a20d931d

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

Signed-off-by: John Audia <therealgraysky@proton.me>
[fixed issues with bcm27xx patches]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 748682e8556d27d904d3fe363228e16eff47afd9)
2025-03-16 08:10:32 +01:00
John Audia
24db615450 kernel: bump 6.6 to 6.6.82
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build host tools / Build host tools for linux and macos based systems (push) Waiting to run
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.82

All patches automatically rebased.

Added CONFIG_MICROCODE_INITRD32=y to x86: config-6.6[1]

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/Kconfig?id=v6.6.82&id2=v6.6.81

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18188
(cherry picked from commit 7cf8f61eb24c32bb47925cbd11f1cde68c9ba0b9)
Link: https://github.com/openwrt/openwrt/pull/18208
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 12:34:29 +01:00
John Audia
0fb8d7bc73 kernel: bump 6.6 to 6.6.81
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.81

All patches automatically rebased.

For x86, CONFIG_MICROCODE_LATE_FORCE_MINREV was introduced in this bump
with hrecommendation to enable it[1].

1. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/Kconfig?id=v6.6.81&id2=v6.6.80

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18188
(cherry picked from commit aabc61d93f89bf3253bad98fd2fe8d5450c352bf)
Link: https://github.com/openwrt/openwrt/pull/18208
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 12:34:29 +01:00
John Audia
41613c0f7b kernel: bump 6.6 to 6.6.80
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.80

Removed upstreamed:
	generic/backport-6.6/819-v6.8-0002-nvmem-Create-a-header-for-internal-sharing.patch[1]
	generic/backport-6.6/819-v6.8-0003-nvmem-Simplify-the-add_cells-hook.patch[2]
	generic/backport-6.6/819-v6.8-0004-nvmem-Move-and-rename-fixup_cell_info.patch[3]

All other patches automatically rebased.

1. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.80&id=39dfc17a38f77b14f7cb2619bd3488a18d797d5d
2. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.80&id=276dae17ad9757c3813d9e736a0210f05ccdf8b7
3. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.80&id=a0ee898a5024f12572e4ce45202df9b149dadc05

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18140
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 86fd00b0fb83300ed7bd39af137a495c61253713)
Link: https://github.com/openwrt/openwrt/pull/18208
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 12:34:29 +01:00
Roland Reinl
b16b75efba ramips: Add support for Cudy M1300 v2
The M1300 v2 is similar to the WR1300 series from Cudy. Differences:
- Only 1 LAN port
- No USB

Specifications:
- MT7621
- MT7603E (2.4G b/g/n) and MT7613BE (5G ac/n) wifi
- 128 MB RAM
- 16 MB flash

MAC Addresses:
- There is one on the label, e.g. xx:xx:xx:xx:xx:1C
- LAN (bottom connector) is the same as the label, e.g. xx:xx:xx:xx:xx:1C
- WAN (top connector) is label +2, e.g. xx:xx:xx:xx:xx:1E
- WLAN (2.4G) is the same as the label, e.g. xx:xx:xx:xx:xx:1C
- WLAN (5G) is the same as WAN, e.g. xx:xx:xx:xx:xx:1E

UART:
- is available via the pin holes on the board
- From inner to outer pin: TX, RX, GND, VCC
- Do NOT connect VCC
- Settings: 3.3V, 115200, 8N1

GPIO:
- There are two LEDs: Red (GPIO 3) and White (GPIO 4)
- There are two buttons: Reset (GPIO 8) and WPS (GPIO 10)

Migration to OpenWrt:
- Download the migration image from the Cudy website (it should be available as soon as OpenWrt officially supports the device)
- The migration image is also available here until a image is provided by Cudy: https://github.com/RolandoMagico/openwrt-build/releases/tag/M1300_Build_20240222
- File: openwrt-ramips-mt7621-cudy_m1300-v2-squashfs-flash-signed.bin
- Connect computer to LAN (bottom connector) and flash the migration image via OEM web interface
- In the migration image, LAN and WAN are swapped. Computer must be connected to the other port after flashing
- OpenWrt is now accessible via 192.168.1.1
- After flashing an up to date OpenWrt image, LAN and WAN settings are again the same as in the OEM firmware
- So use the other connector again

Revert back to OEM firmware:
- Set up a TFTP server on IP 192.168.1.88 and connect to the LAN port (lower port)
- Provide the Cudy firmware as recovery.bin in the TFTP server
- Press the reset button while powering on the device
- Recovery process is started now
- When recovery process is done, OEM firmware is accessible via 192.168.10.1 again

General information:
- No possibility to load a initramfs image via U-Boot because there is no option to interrupt U-Boot

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18139
(cherry picked from commit 8a7863767056ca0dec69a6b383b6e0c0d5fc3af7)
Link: https://github.com/openwrt/openwrt/pull/18204
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 12:30:44 +01:00
Andreas Gnau
76565015f5 ramips: mt7621: Reduce hardcoded metadata for Inteno Y3 imgs
Instead of hardcoded metadata, put some sensible data instead.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/17551
(cherry picked from commit 4e3342f5f17d5d227f036b4b16e2a3721a2e8493)
Link: https://github.com/openwrt/openwrt/pull/18238
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 12:03:19 +01:00
Andreas Gnau
dd0c2839a8 ramips: Add support for Genexis / Inteno Pulse EX400
Add support for Genexis Pulse EX400 / Inteno Pulse EX400. A branded
variant for the Finnish ISP DNA has already been added in fea2264d9fdd
(ramips: mt7621: Add DNA Valokuitu Plus EX400, 2023-07-31). This commit
adds support for the generic variants with Inteno and Genexis branding.
Inteno changed its name to Genexis and both brandings exist.

In terms of electronics, there is no difference between the DNA-branded
version and other brandings. LED markings on the case are different,
though. While the DNA-version has a "software-update" LED, the other
versions have a WPS LED. To reduce user confusion, create a separate
image.

Add the different device-tree with the different LED and rename things
to work the same way for both variants.

Specifications:
- Device: Genexis Pulse EX400 / Inteno Pulse EX400
- SoC: MT7621A
- Flash: 256 MB NAND
- RAM: 256 MB
- Ethernet: Built-in, 2 x 1 GbE
- Wifi: MT7603 2.4 GHz 2x2 MIMO, MT7615 5 GHz 4x4 MU-MIMO
- USB: 1x 2.0
- LEDs (GPIO): green/red status, green WPS
- LEDs (SX9512, unsupported): Broadband, Wi-Fi 2.4G, Wi-Fi 5G
- Buttons (GPIO): Reset
- Buttons (SX9512, unsupported): Wi-Fi 2.4G, Wi-Fi 5G, WPS

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

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

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

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

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

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

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

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

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

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

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

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

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

Reverting to the vendor firmware:

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

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

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

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/17551
(cherry picked from commit 3e7337feead8e0a0f5a05f5b91d7d0fd7f14ec56)
Link: https://github.com/openwrt/openwrt/pull/18238
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 12:03:19 +01:00
Andreas Gnau
6e27a13205 ramips: mt7621: Move common DNA EX400 defs to dtsi
Move common definitions for DNA Valokuitu Plus EX400 to a dtsi include.
This is in preparation of adding the non-branded variant of the device
produced by Genexis / Inteno in the next commit. The device with DNA
branding differs in the LED labling on the device.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/17551
(cherry picked from commit e8603f3b5a15856fccee2e02a5406ca9c8b2ba1d)
Link: https://github.com/openwrt/openwrt/pull/18238
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 12:03:19 +01:00
Coia Prant
55e8ac5312 ramips: add support for Hongdian H8922 v30
This is an industrial 4G router equipped with OpenWrt 14.07 OEM
customized version

WARNING: The original firmware device tree is common to multiple
boards, and the device tree name is H9350. This submitted device
tree is a modified version, which deletes the non-this-device parts
and adds GPIO watchdog.

Specification:
- SoC: MediaTek MT7620A
- Flash: 16 MB
- RAM: 128 MB
- Power: DC 5V-36V 1.5A
- Ethernet: 1x WAN, 4x LAN (10/100 Mbps)
- Wireless radio: 802.11n 2.4g-only
- LED:
  System/Power (RUN): GPIO/26 active-low
  Ethernet: 1x WAN, 4x LAN
  Modem 1: GPIO/66 active-low
  RF 1 (Modem 1 Signal): GPIO/67 active-low
  Modem 2: GPIO 71 active-low
  RF 2 (Modem 2 Signal): GPIO/24 active-low
  WLAN: GPIO/72 active-low
  WPS: GPIO/12 active-low
- Button:
  WPS / RESET: GPIO/34 active-low
- UART: 1x UART on PCB - 115200 8N1
- GPIO Watchdog: GPIO/62 mode=toggle timeout=1s
- PCIe: 2x miniPCIe for modem
- SIM Slots: 2x SIM Slots

Issue:
- No factory partition, eeprom is located
 at /lib/firmware/mt7620a.eeprom

Flash instruction:
Using UART:
1. Configure PC with a static IP address and setup an TFTP server.
2. Put rootfs into the tftp directory.
3. Connect the UART line as described on the PCB.
4. Power up the device and press Ctrl+C to break auto boot.
5. Use `system 6` command and follow the instruction to set device
   and tftp server IP address and input the rootfs file name.
   U-boot will then load the rootfs and write it into
   the flash.
6. Use `system 1` command and follow the instruction to set device
   and tftp server IP address and input the firmware file name.
   U-boot will then load the firmware once.
7. Login to LuCI and use LuCI upgrade firmware.

Original Firmware Dump / More details:
https://blog.gov.cooking/archives/research-hongdian-h8922-and-flash.html

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Tested-by: Coia Prant <coiaprant@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17472
Link: https://github.com/openwrt/openwrt/pull/18221
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 6a1bdcf545eec8f9ed5130e7f5794fca6ee54cb3)
2025-03-15 11:54:54 +01:00
Tianling Shen
df8679e29f mediatek: add support for CMCC A10
This board is also as known as SuperElectron ZN-M5 and ZN-M8. However,
for ZN-M5 and ZN-M8, there's another version uses ZX279128 as CPU
chip, which is unsupported.
You can check it in "高级设置" > "系统日志" > "内核日志" page from webUI.

Hardware specification:
  SoC: MediaTek MT7981B 2x A53
  Flash: 128 MB SPI-NAND
  RAM: 256MB
  Ethernet: 4x 10/100/1000 Mbps
  Switch: MediaTek MT7531AE
  WiFi: MediaTek MT7976C
  Button: Reset, WPS
  Power: DC 12V 1A

Stock layout flash instructions:
Login into webUI and upload sysupgrade firmware in "系统管理" > "升级固件" page.
Remember to unselect "保留配置" ("Keep configurations") first before doing that.

OpenWrt U-Boot layout flash instructions:
1. Flash stock layout firmware first.
2. Connect to the device via SSH, and backup everything,
   especially 'Factory' partition.
3. Unlock MTD partitions:
   opkg update && opkg install kmod-mtd-rw
   insmod mtd-rw i_want_a_brick=1
4. Write new BL2 and FIP:
   mtd write openwrt-mediatek-filogic-cmcc_a10-ubootmod-preloader.bin BL2
   mtd write openwrt-mediatek-filogic-cmcc_a10-ubootmod-bl31-uboot.fip FIP
5. Set static IP on your PC:
   IP 192.168.1.254/24, GW 192.168.1.1
6. Serve OpenWrt initramfs image using TFTP server.
7. Cut off the power and re-engage, wait for TFTP recovery to complete.
8. After OpenWrt has booted, perform sysupgrade.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/18121
(cherry picked from commit 96c6608346758ceffebf30d74cab00db58874bb9)
[sync uboot defconfigs with 24.10 branch, change apk to opkg]
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/18218
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 11:48:57 +01:00
Mieczyslaw Nalewaj
7f512e602a ramips: mt7621: 02_network optimization
Merging repeating blocks inside the ramips_setup_interfaces() function.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18146
(cherry picked from commit a0449f8cf3a53f746c409ce033a6c78065c5edde)
Link: https://github.com/openwrt/openwrt/pull/18205
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-13 21:52:51 +01:00
Martin Schiller
d00ed19ed4 mediatek: filogic: enable CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY
The Cortex-A73 in MediaTek Filogic 880 (MT7988A) is vulnerable to
multiple Spectre variants including Spectre-BHB.

Ref: https://developer.arm.com/Arm%20Security%20Center/Speculative%20Processor%20Vulnerability
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/18182
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 6af46a69846e4e92fa8dcf6c3dccbaf87d513064)
2025-03-08 17:04:29 +01:00
Martin Schiller
c70d0a6304 mediatek: Refresh kernel configuration
I selected one subtarget after the other and refreshed their
configuration using this command:
  make kernel_oldconfig CONFIG_TARGET=subtarget

For MT7629 I had to re-add CONFIG_LEDS_SMARTRG_LED manually.
Otherwise, building MT7629 with ALL_KMODS we get prompted for
LEDS_SMARTRG_LED and this will break CI and in future buildbot
compilation. See commit 6bdea8c7bd85 ("mediatek: mt7629: 6.6: disable
LEDS_SMARTRG_LED by default") for more details.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/18182
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 5013efc4f907550fadbf15e2fb1bdb2ead3325db)
2025-03-08 17:04:20 +01:00
Ahmed Naseef
315943c616 kernel: usbnet: Restore usb%d naming for cdc-ethernet devices with local MAC
Prior to commit 8a7d12d674,
cdc-ethernet USB LTE modems (e.g. Quectel EC200A) were consistently named
usb0. After 8a7d12d67, devices began renaming to eth1 due to an assumption
that local MAC addresses originate exclusively from the kernel. Some
devices provide driver-assigned local MACs, causing point-to-point
interfaces with driver-set MACs to adopt eth%d names instead of usb%d.

Restore the naming exception for point-to-point devices: interfaces
without driver MACs or with driver-provided local MACs will retain the
usb%d convention. This addresses issues reported in [1] and fixed in [2].

[1] https://lore.kernel.org/all/Z00udyMgW6XnAw6h@atmark-techno.com/
[2] https://lore.kernel.org/all/20241203130457.904325-1-asmadeus@codewreck.org/

Tested-by: Ahmed Naseef <naseefkm@gmail.com>
Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17757
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit ecd609f509f29ed1f75db5c7a623f359c64efb72)
2025-03-06 16:55:10 +01:00
Maxim Anisimov
d7d560b84b mediatek/filogic: add Keenetic KN-3811 support
Some checks failed
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Specification:
 * Mediatek MT7981BA
 * 256 MB SPI-NAND
 * 512 MB DDR4 RAM
 * MT7976CN DBDC AX Wi-Fi
 * MediaTek MT7531AE (3x LAN Gigabit ports) + Internal Gbe Phy (1x WAN Gigabit port)
 * 4x LED (power, internet, fn, wifi)
 * 3x buttons (wps, fn, reset)
 * 1x USB 3.0 port

Serial Interface:
 * 3 Pins GND, RX, TX
 * Settings: 115200, 8N1

Notes:
 * The device supports dual boot mode
 * Fn led reassigned to wlan 2.4

Flash instruction:
The only way to flash OpenWrt image is to use tftp recovery mode in U-Boot:

1. Configure PC with static IP 192.168.1.2/24 and tftp server.
2. Rename "openwrt-mediatek-filogic-keenetic_kn-3811-squashfs-factory.bin"
   to "KN-3811_recovery.bin" and place it in tftp server directory.
3. Connect PC with ethernet port, press the reset button, power up
   the device and keep button pressed until status led start blinking.
4. Device will download file from server, write it to flash and reboot.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17135
(cherry picked from commit d087a79b7b03fe93a221fd6246ce437c5c5325c3)
Link: https://github.com/openwrt/openwrt/pull/18055
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-26 23:32:40 +01:00
Maxim Anisimov
895531f5c5 mediatek/filogic: add Keenetic KN-3911 support
Specification:
 - MT7981 CPU using 2.4GHz and 5GHz WiFi (both AX)
 - 512MB RAM
 - 128MB SPI NAND
 - 2 LEDs (green, orange)
 - 3 buttons (fn, reset, wps)
 - 2 2.5Gbit ethernet ports based on Airoha EN8811H phy

Serial Interface:
 - 3 Pins GND, RX, TX
 - Settings: 115200, 8N1

Notes:
 - The device supports dual boot mode

Flash instruction:
The only way to flash OpenWrt image is to use tftp recovery mode in U-Boot:

1. Configure PC with static IP 192.168.1.2/24 and tftp server.
2. Rename "openwrt-mediatek-filogic-keenetic_kn-3911-squashfs-factory.bin"
   to "KN-3911_recovery.bin" and place it in tftp server directory.
3. Connect PC with ethernet port, press the reset button, power up
   the device and keep button pressed until status led start blinking.
4. Device will download file from server, write it to flash and reboot.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16830
(cherry picked from commit 5a4eb56a7bc7d1d8028d103d50b0dba2ff7808c4)
Link: https://github.com/openwrt/openwrt/pull/18055
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-26 23:32:40 +01:00
Maxim Anisimov
13e9117861 mediatek/filogic: enable mtd virtual concat support
This is required for upcoming Keenetic KN-3911 support

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16830
(cherry picked from commit 0d651dd302cf2b6968268f27a084363b9b398760)
Link: https://github.com/openwrt/openwrt/pull/18055
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-26 23:32:40 +01:00
Maxim Anisimov
d93b6a2bc2 ramips: move zyimage creation to include/image-commands.mk
This is required for upcoming Keenetic KN-3911 support

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16830
(cherry picked from commit 79db5d65ca5a19fb37e7fb428dec798f713a8632)
Link: https://github.com/openwrt/openwrt/pull/18055
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-26 23:32:40 +01:00
Mieczyslaw Nalewaj
652fe915de ramips: improve MT7621S core detection
The proposed detection method was based on reading the LAUNCH_FREADY core flag.
However, this method only works before the cores are launched.
For this reason, the core number detection method has been changed to a simpler one.
For mt6721s the 17th revision bit is zero, hence we know that it is this chip,
so the number of cores is 1.

Fixes: https://github.com/openwrt/openwrt/issues/17764
Tested-by: Enrico Mioso <mrkiko.rs@gmail.com>
Tested-by: Simon Etzlstorfer <simon@etzi.at>
Tested-by: Mauri Sandberg <maukka@ext.kapsi.fi>
Co-authored-by: Shiji Yang <yangshiji66@qq.com>
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/17834
(cherry picked from commit bb84c256e701a21a97443ffe9dd1d510bd6c1c40)
Link: https://github.com/openwrt/openwrt/pull/18015
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-25 23:20:05 +01:00
John Audia
22943245a5 kernel: bump 6.6 to 6.6.79
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.79

Manually rebased:
	ramips/patches-6.6/810-uvc-add-iPassion-iP2970-support.patch

All other patches automatically rebased.

Build system: x86/64
Build-tested: bcm27xx/bcm2712, filogic/glinet_gl-mt6000, filogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64
Run-tested: bcm27xx/bcm2712, filogic/glinet_gl-mt6000, filogic/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/18066
Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit d664d7466958d3c70e1be9258280d39825ba9ba8)
Link: https://github.com/openwrt/openwrt/pull/17987
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-25 23:16:17 +01:00
John Audia
b9c6aeb628 kernel: bump 6.6 to 6.6.78
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.78

Removed upstreamed:
	bcm27xx/patches-6.6/950-0487-drivers-media-imx296-Add-standby-delay-during-probe.patch[1]
	mediatek/patches-6.6/256-clk-mediatek-mt2701-vdec-fix-conversion-to-mtk_clk_s.patch[2]
	mediatek/patches-6.6/257-clk-mediatek-mt2701-aud-fix-conversion-to-mtk_clk_si.patch[3]
	mediatek/patches-6.6/258-clk-mediatek-mt2701-bdp-add-missing-dummy-clk.patch[4]
	mediatek/patches-6.6/259-clk-mediatek-mt2701-mm-add-missing-dummy-clk.patch[5]
	mediatek/patches-6.6/260-clk-mediatek-mt2701-img-add-missing-dummy-clk.patch[6]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.78&id=25abffee5ceb6691ecd4f089be2bb28842e2d2fd
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.78&id=b6c5237ab7af82c9f1d8d772dbf309bb4aadfdbb
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.78&id=20210b5c775d2d96f706591c64bc2ad975c37eaf
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.78&id=a1fa3dda6bf0b7ecd95fa8f9125e5486b699a81f
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.78&id=fc60e9357f15372698da373ee76de8f52d22aac2
6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.78&id=6f4868e6b2887b55531bc8e0a4106ef0150e6326

Build system: x86/64
Build-tested: bcm27xx/bcm2712, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64
Run-tested: bcm27xx/bcm2712, 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/18000
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 57b0304ce93b9e84701de3091c9f272e6b14e6fa)
Link: https://github.com/openwrt/openwrt/pull/17987
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-25 23:16:17 +01:00
John Audia
667b131ad1 kernel: bump 6.6 to 6.6.76
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.76

Manually rebased:
	bcm27xx/patches-6.6/950-0519-usb-dwc3-Set-DMA-and-coherent-masks-early.patch
	imx/patches-6.6/600-PCI-imx6-Start-link-at-max-gen-first-for-IMX8MM-and-IMX8MP.patch

Removed upstreamed:
	bcm27xx/patches-6.6/950-1446-media-i2c-ov9282-Correct-the-exposure-offset.patch[1]
	bcm47xx/patches-6.6/701-bgmac-reduce-max-frame-size-to-support-just-MTU-1500.patch[2]
	bcm53xx/patches-6.6/700-bgmac-reduce-max-frame-size-to-support-just-MTU-1500.patch[3]
	ramips/patches-6.6/003-v6.14-clk-ralink-mtmips-remove-duplicated-xtal-clock-for-Ralink.patch[4]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.76&id=11c7649c9ec3dcaf0a7760551ad30747d9e02d81
2, 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.76&id=5e6e723675e54ced5200bcc367e2526badc4070c
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.76&id=d0edcd0d18d700d76c61c091a24568b8b8c3b387

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17822
(cherry picked from commit 84e370f16ca044896e6529d683067c17b565e6fa)
Link: https://github.com/openwrt/openwrt/pull/17987
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-25 23:16:17 +01:00