31670 Commits

Author SHA1 Message Date
Lech Perczak
b5367180b9 ath79: support switch LEDs on TL-WDR4300 family
Add switch LED definitions for TP-Link TL-WDR4300 family, based on data
extracted from ar71xx board file. Update the LED labels to match current
pattern, i.e. drop the "tp-link:" prefix.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/12487
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 16:40:46 +01:00
Lech Perczak
acd6f48e87 ath79: TP-link TL-WDR4300: use fixed-link for AR8327 switch connection
Attaching PHY driver to the switch, while adding LEDs binding causes the
PHY driver to create additional LED instances, handled incorrectly by
the PHY driver, which are non-functional. Use fixed-link to attach the
switch driver, instead of PHY driver, to prevent that.

This has a side effect of not logging switch port up/down events in the kernel
log.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/12487
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 16:40:46 +01:00
Lech Perczak
3ba4a4e32c kernel: ar8327: support LED device tree bindings
The ar8216 switch driver supports exposing configuration of AR8327 and
AR8337 switch LEDs to the userspace, however it is only configurable
through platform data, causing the devices ported from ar71xx target to
lack the support.
Since there is still a long way to go until we can migrate the target to
qca8k, an interim solution is needed.
Extend ar8327_hw_config_of function to parse a "leds"
subnode, which will populate the missing platform data based on device
tree contents, and restore the existing support for the LEDs.
Standard bindings apply, mapping "reg" property to LED index, with
addition of "qca,led-mode" property, which selects HW (0) or SW (1)
mode, defaulting to HW mode.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/12487
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 16:40:46 +01:00
Lech Perczak
5a4f8b26f0 kernel: ar8327: fix active-low LED initialization
Switch LEDs configured as active-low remain low instead of high upon
initialization, because in ar8327_leds_init, no distinction is made with
regards to LED pattern based on active_low property - only whether HW
mode is active. Select the proper initial pattern based also on
active_low to fix that.

While at that, simplify the equation ruling pattern selection for
setting brightness, avoiding unnecessary binary XOR operation, not
really valid for 'bool' type.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/12487
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 16:40:46 +01:00
Simonas Tamošaitis
9f1f918aed ath79: fix chipidea usb controller detection
Devices with chipidea usb controller does not detect usb hub after
phy-names change to "usb", revert it back to "usb-phy"

Fixes: 787cb9d87edb ("ath79: change phy-names to only usb")
Signed-off-by: Simonas Tamošaitis <simsasss@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18230
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 15:23:45 +01:00
Henrik Ginstmark
929b3d0e52 ramips: add missing LEDs and modem control for ASUS 4G-AX56
Add missing LEDs and modem control for ASUS 4G-AX56
 - wifi2.4G white
 - wifi5G   white
 - wan      two-coloured, white and red
 - modem    four-coloured white, blue, yellow and red
   change
      label = "xxxx:modem";
   to
      color = <LED_COLOR_ID_xxxx>;
      function = LED_FUNCTION_MOBILE;
 - rssi-1   white
 - rssi-2   white
 - rssi-3   white

and modem reboot and reset

Combined into one commit

Signed-off-by: Henrik Ginstmark <henrik@ginstmark.se>
Link: https://github.com/openwrt/openwrt/pull/17927
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 15:13:42 +01:00
Tomasz Maciej Nowak
adc4d95c74 mediatek: u7623: fix network switch enumeration
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
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>
2025-03-16 22:43:02 +01:00
J. S. Seldenthuis
4fed462454 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>
2025-03-16 22:26:20 +01:00
Rosen Penev
148f82ad45 ipq806x: use nvmem for wifi mac
Userspace handling is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16229
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 22:19:46 +01:00
Til Kaiser
86a691cd25 x86: add Supermicro SuperServer E302-9D
This adds a default network configuration for the
Supermicro SuperServer SYS-E302-9D by adding all
onboard network ports to the default `lan` interface.

The network ports `eth0` till `eth3` use the `igb`
driver, whereas `eth4` till `eth7` use `i40e`.

--- Hardware Highlights ---
CPU: Intel Xeon D-2123IT, 2.20GHz, 4 cores
RAM: Up to 256GB in 4 DIMM Slots
Ports: 4x 1GbE, 2x 10GBase-T, 2x 10G SFP+, 1x IPMI 2.0
Video: 1x VGA
USB: 2x 3.0

Signed-off-by: Til Kaiser <mail@tk154.de>
Link: https://github.com/openwrt/openwrt/pull/17990
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 22:14:29 +01:00
Lech Perczak
8951ac6f65 ath79: ZTE MF281: use specific board definition file for qca9888
Using board definition file extracted from stock firmware yields 50%
throughput improvement in RX direction under iperf3 test.
Make the device use temporary files from firmware_qca-wireless.git
temporarily, as well as select the specific variant in the device tree
files. The device uses same board file as the MF286C.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17620
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 22:10:05 +01:00
Lech Perczak
5ac6f56dbe ath79: support ZTE MF286C
ZTE MF286 is an indoor LTE category 12 CPE router with simultaneous
dual-band 802.11ac plus 802.11n Wi-Fi radios and quad-port gigabit
Ethernet switch, FXS and external USB 2.0 port.

Software-wise it's compatible with previous MF286A, save for different
5GHz Wi-Fi board definition file, requiring a separate image.

Hardware highlights:
- CPU: QCA9563 SoC at 775MHz,
- RAM: 128MB DDR2,
- NOR Flash: MX25L1606E 2MB SPI Flash, for U-boot only,
- NAND Flash: W25N01GV 128MB SPI NAND-Flash, for all other data,
- Wi-Fi 5GHz: QCA9886 2x2 MIMO 802.11ac Wave2 radio,
- WI-Fi 2.4GHz: QCA9563 3x3 MIMO 802.11n radio,
- Switch: QCA8337v2 4-port gigabit Ethernet, with single SGMII CPU port,
- WWAN: MDM9250-based category 12 internal LTE modem
  in extended  mini-PCIE form factor, with 5 internal antennas and
  2 external antenna connections, single mini-SIM slot.
- FXS: one external ATA port (handled entirely by modem part) with two
  physical connections in parallel,
- USB: Single external USB 2.0 port,
- Switches: power switch, WPS, Wi-Fi and reset buttons,
- LEDs: Wi-Fi, Test (internal). Rest of LEDs (Phone, WWAN, Battery,
  Signal state) handled entirely by modem. 4 link status LEDs handled by
  the switch on the backside.
- Label MAC device: eth0

Internal modem of MF286C is supported via uqmi.

Console connection: connector X2 is the console port, with the following
pinout, starting from pin 1, which is the topmost pin when the board is
upright:
- VCC (3.3V). Do not use unless you need to source power for the
  converer from it.
- TX
- RX
- GND
Default port configuration in U-boot as well as in stock firmware is
115200-8-N-1.

Installation:
Due to different flash layout from stock firmware, sysupgrade from
within stock firmware is impossible, despite it's based on QSDK which
itself is based on OpenWrt.

STEP 0: Stock firmware update:
As installing OpenWrt cuts you off from official firmware updates for
the modem part, it is recommended to update the stock firmware to latest
ath79: support ZTE MF286C

STEP 1: Booting initramfs image:

Method 1: using serial console (RECOMMENDED):
- Have TFTP server running, exposing the OpenWrt initramfs image, and
  set your computer's IP address as 192.168.0.22. This is the default
  expected by U-boot. You may wish to change that, and alter later
  commands accordingly.
- Connect the serial console if you haven't done so already,
- Interrupt boot sequence by pressing any key in U-boot when prompted
- Use the following commands to boot OpenWrt initramfs through TFTP:

  setenv serverip 192.168.0.22
  setenv ipaddr 192.168.0.1
  tftpboot 0x81000000 openwrt-ath79-nand-zte_mf286c-initramfs-kernel.bin
  bootm 0x81000000

  (Replace server IP and router IP as needed). There is no  emergency
  TFTP boot sequence triggered by buttons, contrary to MF283+.
- When OpenWrt initramfs finishes booting, proceed to actual
  installation.

STEP 2: Backing up original software:
As the stock firmware may be customized by the carrier and is not
officially available in the Internet, IT IS IMPERATIVE to back up the
stock firmware, if you ever plan to returning to stock firmware.
It is highly recommended to perform backup using both methods, to avoid
hassle of reassembling firmware images in future, if a restore is
needed.

Method 1: after booting OpenWrt initramfs image via TFTP:
- Connect your USB-UART adapter
- Dump stock firmware located on stock kernel and ubi partitions:

  ssh root@192.168.1.1: cat /dev/mtd9 > mtd3_ubiconcat0.bin
  ssh root@192.168.1.1: cat /dev/mtd4 > mtd4_kernel.bin
  ssh root@192.168.1.1: cat /dev/mtd9 > mtd5_ubiconcat1.bin

And keep them in a safe place, should a restore be needed in future.

Method 2: using stock firmware:
- Connect an external USB drive formatted with FAT or ext4 to the USB
  port.
- The drive will be auto-mounted to /var/usb_disk
- Check the flash layout of the device:

  cat /proc/mtd

  It should show the following:
  mtd0: 000a0000 00010000 "u-boot"
  mtd1: 00020000 00010000 "u-boot-env"
  mtd2: 00140000 00010000 "reserved1"
  mtd3: 000a0000 00020000 "fota-flag"
  mtd4: 00080000 00020000 "art"
  mtd5: 00080000 00020000 "mac"
  mtd6: 000c0000 00020000 "reserved2"
  mtd7: 00400000 00020000 "cfg-param"
  mtd8: 00400000 00020000 "log"
  mtd9: 000a0000 00020000 "oops"
  mtd10: 00500000 00020000 "reserved3"
  mtd11: 00800000 00020000 "web"
  mtd12: 00300000 00020000 "kernel"
  mtd13: 01a00000 00020000 "rootfs"
  mtd14: 01900000 00020000 "data"
  mtd15: 03200000 00020000 "fota"
  mtd16: 01d00000 00020000 "firmware"

  Differences might indicate that this is NOT a MF286C device but
  one of other variants.
- Copy over all MTD partitions, for example by executing the following:

  for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do cat /dev/mtd$i > \
  /var/usb_disk/mtd$i; done

  "Firmware" partition can be skipped, it is a concatenation
  of "kernel" and "rootfs".

- If the count of MTD partitions is different, this might indicate that
  this is not a MF286C device, but one of its other variants.
- (optionally) rename the files according to MTD partition names from
  /proc/mtd
- Unmount the filesystem:

  umount /var/usb_disk; sync

  and then remove the drive.
- Store the files in safe place if you ever plan to return to stock
  firmware. This is especially important, because stock firmware for
  this device is not available officially, and is usually customized by
  the mobile providers.

STEP 3: Actual installation:
- Set your computer IP to 192.168.1.22/24
- scp the sysupgrade image to the device:

  scp -O openwrt-ath79-nand-zte_mf286a-squashfs-sysupgrade.bin \
  root@192.168.1.1:/tmp/

- ssh into the device and execute sysupgrade:

  sysupgrade -n /tmp/openwrt-ath79-nand-zte_mf286a-squashfs-sysupgrade.bin

- Wait for router to reboot to full OpenWrt.

STEP 4: WAN connection establishment
Since the router is equipped with LTE modem as its main WAN interface, it
might be useful to connect to the Internet right away after
installation. To do so, please put the following entries in
/etc/config/network, replacing the specific configuration entries with
one needed for your ISP:

config interface 'wan'
        option proto 'qmi'
        option device '/dev/cdc-wdm0'
        option auth '<auth>' # As required, usually 'none'
        option pincode '<pin>' # If required by SIM
        option apn '<apn>' # As required by ISP
        option pdptype '<pdp>' # Typically 'ipv4', or 'ipv4v6' or 'ipv6'

For example, the following works for most polish ISPs
config interface 'wan'
        option proto 'qmi'
        option device '/dev/cdc-wdm0'
        option auth 'none'
        option apn 'internet'
        option pdptype 'ipv4'

The required minimum is:
config interface 'wan'
        option proto 'qmi'
        option device '/dev/cdc-wdm0'
In this case, the modem will use last configured APN from stock
firmware - this should work out of the box, unless your SIM requires
PIN which can't be switched off.

If you have build with LuCI, installing luci-proto-qmi helps with this
task.

Restoring the stock firmware:

- Boot to initramfs as in step 3:
- Completely detach ubi0 partition using ubidetach /dev/ubi0_0
- Copy over the stock kernel image using scp to /tmp
- Erase kernel and restore stock kernel:
  (scp mtd4_kernel.bin root@192.168.1.1:/tmp/)
  mtd write kernel /tmp/mtd4_kernel.bin
  rm /tmp/mtd4_kernel.bin
- Copy over the stock partition backups one-by-one using scp to /tmp, and
  restore them individually. Otherwise you might run out of space in
  tmpfs:

  (scp -O mtd3_ubiconcat0.bin root@192.168.1.1:/tmp/)

  mtd write ubiconcat0 /tmp/mtd3_ubiconcat0.bin
  rm /tmp/mtd3_ubiconcat0.bin

  (scp -O mtd5_ubiconcat1.bin root@192.168.1.1:/tmp/)

  mtd write ubiconcat1 /tmp/mtd5_ubiconcat1.bin
  rm /tmp/mtd5_ubiconcat1.bin

- If the write was correct, force a device reboot with

  reboot -f

Quirks and known issues
- It was observed, that CH340-based USB-UART converters output garbage
  during U-boot phase of system boot. At least CP2102 is known to work
  properly.
- Kernel partition size is increased to 4MB compared to stock 3MB, to
  accomodate future kernel updates - at this moment OpenWrt 5.10 kernel
  image is at 2.5MB which is dangerously close to the limit. This has no
  effect on booting the system - but keep that in mind when reassembling
  an image to restore stock firmware.
- uqmi seems to be unable to change APN manually, so please use the one
  you used before in stock firmware first. If you need to change it,
  please use protocok '3g' to establish connection once, or use the
  following command to change APN (and optionally IP type) manually:
  echo -ne 'AT+CGDCONT=1,"IP","<apn>' > /dev/ttyUSB0
- The only usable LED as a "system LED" is the blue debug LED hidden
  inside the case. All other LEDs are controlled by modem, on which the
  router part has some influence only on Wi-Fi LED.
- GPIO5 used for modem reset is a suicide switch, causing a hardware
  reset of whole board, not only the modem. It is attached to
  gpio-restart driver, to restart the modem on reboot as well, to ensure
  QMI connectivity after reboot, which tends to fail otherwise.
- Modem, as in MF283+, exposes root shell over ADB - while not needed
  for OpenWrt operation at all - have fun lurking around.
  The same modem module is used as in older MF286.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17620
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 22:10:04 +01:00
Lech Perczak
b60d241f2d ath79: ZTE MF286A: use specific board definition file for qca9888
Using board definition file extracted from stock firmware yields 50%
throughput improvement in RX direction under iperf3 test.
Make the device use temporary files from firmware_qca-wireless.git
temporarily, as well as select the specific variant in the device tree
files.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17620
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 22:09:20 +01:00
Chukun Pan
3a1bc14733 generic: silence led set_brightness error message
Currently, if the phy driver does not implement the led_brightness_set
function, setting the LED will result in the following error message:

leds mdio-bus:*:green:lan: Setting an LED's brightness failed (-524)

Backport a patch to silence this error message.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/18080
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 19:50:21 +01:00
Mikhail Zhilkin
043df82cea 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
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 19:21:49 +01:00
Andrew LaMarche
054b870196 generic: import rtl8261n patches from mediatek
RTL8261N is used on some Airoha and Realtek devices. Move the driver
from Mediatek to generic so it can be used everywhere.

Signed-off-by: Andrew LaMarche <andrewjlamarche@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18163
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 19:05:56 +01:00
Simon Etzlstorfer
06142cc1e7 ramips: mt7621: add support for Maginon MC-1200AC
This commit adds support for Maginon MC-1200AC.

Hardware specifications:

SoC: MediaTek MT7621
Flash: 16 MB SPI Flash
RAM: 128 MB RAM
Ethernet:
2x 1G RJ45 ports
WLAN:
2.4GHz: MediaTek MT7603E
5GHz: MediaTek MT7613BE
LEDs: Red and blue status lights
Power: 12V DC
UART: 3.3V, 115200 baud, 8N1, like printed on silkscreen (GND,TX,RX,3.3V)

MAC addresses
-------------
+---------+-------------------+
|         | MAC example       |
+---------+-------------------+
| LAN     | 80:3F:5D:xx:xx:72 |
| WAN     | 80:3F:5D:xx:xx:73 |
| WLAN 2g | 80:3F:5D:xx:xx:74 |
| WLAN 5g | 80:3F:5D:xx:xx:75 |
+---------+-------------------+

Installation:

The firmware can be flashed via the U-Boot recovery web interface.
To access it, hold the reset button while powering on the device.
U-Boot recovery web interface is then avaiable at 192.168.10.1.

Alternatively, the image can be loaded using the U-Boot serial interface and TFTP.

Signed-off-by: Simon Etzlstorfer <simon@etzi.at>
Link: https://github.com/openwrt/openwrt/pull/17671
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 18:24:08 +01:00
Álvaro Fernández Rojas
1f20752be0 bcm27xx: refresh kernel configs
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
Refresh kernel config for all bcm27xx subtargets.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-03-16 15:48:10 +01:00
Álvaro Fernández Rojas
251f76c1c6 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>
2025-03-16 08:04:48 +01:00
Hauke Mehrtens
abd0418684 kernel: Activate CONFIG_NET_SWITCHDEV in generic config
The CONFIG_NET_SWITCHDEV option is needed by CONFIG_DSA and some other
options. It is boolean, we have to compile it into the kernel it self.
Activate it for all targets in the generic configuration, it is already
activated for most of them. This allows to install DSA drivers as a
module.

On the ramips/mt7620 target the kernel would grown by 4.5kB.

For some small targets which do not support a DSA switch by default the
option is deactivated.

Link: https://github.com/openwrt/openwrt/pull/17668
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 13:54:59 +01:00
Aleksander Jan Bajkowski
a18d95f35b lantiq-gphy-firmware: add package
This has several advantages:
* reduction in the size of the kernel and the complete image. Individual
devices only need two of the four binaries. In combination with the second
commit it reduces kernel size by 64.2 kB and image size by 22.8 kB,
* the option to extend this package with firmware for future SoCs,
* combining the kernel and binary blobs with another licence may not be
fully compatible with the licence used by Linux. The current PHY firmware
is built into the kernel. This comit converts it to a package.

Tested on AVM 5490 and BT Home Hub 5A.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/17669
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 13:52:40 +01:00
Aleksander Jan Bajkowski
62bf028732 lantiq: xrx200: convert switch driver to package
The next commit converts the firmware used by this driver
to a package. Due to the fact that the driver is shipped
as a package the firmware is already available.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/17669
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 13:52:40 +01:00
Boyang Sun
f4ba980f15 mediatek: Update mt7622-reyee-ax3200-e5.dts
fixed wrong reg.
The original commit assumed the size part was the end of the reg.

Fixes: 7dbac3433fef ("mediatek: add support for reyee AX3200-E5")
Signed-off-by: Boyang Sun <boyinthesun@163.com>
Link: https://github.com/openwrt/openwrt/pull/18074
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 13:48:00 +01:00
Eric Schäfer
f3eca7cbc1 ramips: add support for Zyxel LTE7490-M904
The Zyxel LTE7490-M904 is an 802.3at PoE powered LTE outdoor (IP68) CPE
with integrated directional antennas.

Specifications:

- SoC: MediaTek MT7621AT
- RAM: 256 MB
- Flash: 128 MB MB NAND (MX30LF1G18AC)
- WiFi: MediaTek MT7603E 802.11b/g/n
- Switch: 1 LAN port (1 Gbps)
- LTE/3G/2G: Quectel EG18-EA LTE-A Cat. 18 connected by USB3 to SoC
- SIM: 1 micro-SIM slots under transparent cover
- Buttons: Reset, WLAN under same cover
- LEDs: Multicolour green/red/amber under same cover (visible)
- Power: 802.3at PoE via LAN port

The device is built as an outdoor ethernet to LTE bridge or router.
The wifi interface is intended for installation and/or temporary
management purposes only.

UART Serial:

57600N1, located on populated 5 pin header J5:

 [o] GND
 [ ] key - no pin
 [o] RX
 [o] TX
 [o] 3.3V Vcc

Remove the SIM/button/LED cover and 12 screws holding the back plate
and antenna cover together. Be careful with the cables.

Installation from OEM web GUI:

- Log in as "admin" on OEM web GUI
- Upload OpenWrt initramfs-recovery.bin image on the
  Maintenance -> Firmware page
- Wait for OpenWrt to boot and ssh to root@192.168.1.1
- Sysupgrade to the OpenWrt sysupgrade image and reboot

For more details about flashing see:
2449a63208 (ramips: mt7621: Add support for ZyXEL NR7101, 2021-04-19)

Main porting work done by Ernesto Castellotti <ernesto@castellotti.net>:
bf1c12f68b (ramips: add support for ZyXEL LTE7490-M904, 2023-12-20)

Signed-off-by: Eric Schäfer <eric@es86.de>
Link: https://github.com/openwrt/openwrt/pull/17485
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 13:39:41 +01:00
Roy H
3961b71776 ath79: add support for Longdata APS256
Forum discussion : https://forum.openwrt.org/t/aps-256va-help-for-identification/143653/52

Specification:
Power: 12-36V input via 5,5/2,1 DC barrel jack, or 5V Micro USB-B
CPU: Atheros AR9344 rev 2
RAM: 128MB
Flash: 16MB
WI-Fi: 2.4GHz
Fast Ethernet: 1 WAN and 2 LAN
USB: 2 x USB-A, 1 x micro-USB-B (for power input)
WWAN: 3G modem via extended mini-PCIE form factor (can be replaced with Wifi 5GHz card)

The device come with custom openwrt BB an CC.

Because of limited LAN port, I disable GMAC0, so the WAN port can be connected to GMAC1 and function as LAN port as well.

Enable ssh access and Backup:

1.  open router admin page via LAN cable
2.  browse 192.168.111.1:8000
3.  login with password 123456
4.  click wifi icon on top menu
5.  change the path at the end of the url (after random hash) with /admin/system/flashops
        it will looks like this:
        http://192.168.111.1:8000/cgi-bin/luci/;stok=29698152cf64c980177a04f86c99ea0d/admin/system/flashops
        (the hash after "stok=" will be different)
6.  restore the config with this modified backup (can be created manually by changing dropbear config to allow ssh)
        https://drive.google.com/file/d/1Vs-k7DHBSRZFfkxv1cMOmgAPZfB-RUen/view?usp=sharing
7.  now you can login to ssh with root user and 123456 password, and backup all partition and upgrade firmware

!!! BACKUP EVERY PARTITION !!!

Flashing instructions:
- Flash directly from factory web interface accessed from "Enable ssh access" step 5

Signed-off-by: Roy H <roy@altbytes.com>
Link: https://github.com/openwrt/openwrt/pull/17939
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 13:35:41 +01:00
Roland Reinl
c13a050d5a 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
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 10:54:32 +01:00
Shiji Yang
4efb4a26d2 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>
2025-03-15 10:44:30 +01:00
Michel Lespinasse
59215154a0 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
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 10:37:59 +01:00
Michel Lespinasse
2e7d060fd1 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
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 10:37:59 +01:00
Michel Lespinasse
de9ad11dac 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
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 10:37:59 +01:00
John Audia
748682e855 kernel: bump 6.6 to 6.6.83
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>
2025-03-15 10:25:57 +01:00
Mieczyslaw Nalewaj
bdd5587b6b generic: rename backport patch 852
Rename 852-stable-bus-mhi-host-pci_generic-constify-modem_telit_fn980_.patch
to 852-v6.9-stable-bus-mhi-host-pci_generic-constify-modem_telit_fn980.patch
because it is used since kernel 6.9-rc1 (https://lore.kernel.org/lkml/Zfwv2y7P7BneKqMZ@kroah.com/).

Link: https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.9.y&id=2ec11b5d6d900b17c7d001fbee4751fd2aa58917
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18237
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 10:22:22 +01:00
Mauri Sandberg
a53417cc30 ramips: Cleanup Genexis EX400 upgrade script
The code can be made more efficient by not extracting the sysupgrade.tar but
rather just querying for the filesize within the archive. Resorting to
manual update of UBI volume is extra work too, setting CI_KERNPART=rootfs_0
is enough.

Suggested-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Signed-off-by: Mauri Sandberg <maukka@ext.kapsi.fi>
Link: https://github.com/openwrt/openwrt/pull/17806
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 10:18:50 +01:00
Daniel Golle
6c8cc86295 mediatek: filogic: openwrt-one: drop kmod-nvme
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
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
The OpenWrt One is the only board listing kmod-nvme as part of it's
default package set.

Remove kmod-nvme from the default package set as the board is sold
without an NVMe SSD and the M.2 slot can also be used for other
purposes.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-03-14 11:23:57 +00:00
Andreas Gnau
4e3342f5f1 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
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-13 21:33:47 +01:00
Andreas Gnau
3e7337feea 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
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-13 21:33:46 +01:00
Andreas Gnau
e8603f3b5a 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
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-13 21:33:46 +01:00
John Audia
7cf8f61eb2 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
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-13 00:08:36 +01:00
John Audia
aabc61d93f 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
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-13 00:08:36 +01:00
Hauke Mehrtens
8d69613125 armsr: Fix kmod-fsl-dpaa2-net build
The build failed because the CONFIG_FSL_DPAA2_ETH_DCB option was not
set. Activate this option to build the driver with DCB support when it
is available.

Fixes: 40f1db9cb11d ("kernel: Add KERNEL_DCB (Data Center Bridging)")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-12 23:56:09 +01:00
Martin Schiller
843e50f4fa mediatek: bpi-r4: create additional emmc gpt artifact
This makes it possible to initialize the eMMC from scratch like it is
done for the BPI-R3 mini (without an SD card).

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2025-03-12 12:04:08 +01:00
Martin Schiller
bbe58f9830 generic: net: phy: sfp: backport some FS copper SFP fixes
This fixes the handling of some FS copper SFP modules using the RollBall
protocol and needing some extra treatment.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2025-03-12 12:01:53 +01:00
Rui Salvaterra
17cfcaa754 generic: enable CONFIG_USB_NET_DRIVERS
This is only relevant for devices with USB support, and in itself changes
nothing in the kernel build. However, it is useful to further simplify the
dependencies of some USB network devices.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2025-03-10 12:39:42 +00:00
Rosen Penev
0cdcba238f ramips: use regulator for USB
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
The DWC2 driver used here supports a vbus-supply property to control
the GPIO. Use it instead of the local gpio,exports solution.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17357
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-10 10:42:13 +01:00
Coia Prant
6a1bdcf545 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
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-10 00:42:44 +01:00
Bernardus Jansen
6da7352ebe ath79: add support for Fortinet FAP-221-C
FCC ID: TVE-121402

Fortinet FAP-221-C is an indoor access point with 1gb ethernet port,
dual-band wireless, internal antenna plates, and 802.3at PoE+.

Hardware and board design are from Senao. The device appears very
similar to the EnGenius EAP1200H, albeit with double the flash and RAM.

**Specifications:**

  - QCA9557 SOC
  - QCA9882 WLAN PCI card, 5 GHz, 2x2, 26dBm
  - AR8035-A PHY RGMII GbE with PoE+ IN
  - 40 MHz clock
  - 32 MB FLASH FL256SAIFR0
  - 2x 128 MB RAM NT5TU64M16HG
  - UART populated
  - 4 internal antenna plates
  - 5 LEDs, 1 button (power, 'warning', eth0, wifi1, wifi2) (reset)

  Amber LAN LED appears hardwired to ethernet port. Power LED is green
only. Other LEDs are amber/green.

**MAC addresses:**

1 MAC Address in flash at end of uboot
ASCII encoded, no delimiters
Labeled as "MAC Address" on case

**Serial Access:**

Pinout: (arrow) VCC GND RX TX

Pins are populated with a header and traces not blocked.
Bootloader is set to 9600 baud, 8 data, 1 stop.

**Console Access:**

Bootloader:

Interrupt boot with Ctrl+C
Press "k" and enter password "1"
OR
Hold reset button for 5 sec during power on
Interrupt the TFTP transfer with Ctrl+C

to print commands available, enter "help"

OEM:

default username is "admin", password blank
telnet is available at default address 192.168.1.2
serial is available with baud 9600

to print commands available, enter "help"
or tab-tab (busybox list of commands)

**Installation:**

Use factory.bin with OEM upgrade procedures
OR
Use initramfs.bin with uboot TFTP commands.
Then perform a sysupgrade with sysupgrade.bin

**TFTP Recovery:**

Using serial console, load initramfs.bin using TFTP
to boot openwrt without touching the flash.

**Return to OEM:**

The best way to return to OEM firmware
is to have a copy of the MTD partitions
before flashing Openwrt.

Backup copies should be made of partitions
"fwconcat0", "loader", and "fwconcat1"
which together is the same flash range
as OEM's "rootfs" and "uimage"
by loading an initramfs.bin
and using LuCI to download the mtdblocks.

It is also possible to extract from the
OEM firmware upgrade image by splitting it up
in parts of lengths that correspond
to the partitions in openwrt
and write them to flash,
after gzip decompression.

After writing to the firmware partitions,
erase the "reserved" partition and reboot.

Signed-off-by: Bernardus Jansen <bernardus@bajansen.nl>
Link: https://github.com/openwrt/openwrt/pull/18109
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-09 19:57:26 +01:00
Hauke Mehrtens
40f1db9cb1 kernel: Add KERNEL_DCB (Data Center Bridging)
The kmod-mlxsw-spectrum driver activated CONFIG_DCB indirectly already
on all targets which are building this driver. All other DCB capable
driver did not activate their DCB support.

CONFIG_DCB increases the uncompressed kernel size by about 7.8KB.

CONFIG_DCB is only needed some data center Ethernet cards and not used
on normal routers. Activate it only on the x86_64 and the armsr_arm64
target which are used on normal servers or in VMs.

Link: https://github.com/openwrt/openwrt/pull/17672
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-09 17:05:26 +01:00
Roland Reinl
8a78637670 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
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-09 16:51:26 +01:00
Aleksander Jan Bajkowski
a2fd837e2e lantiq: xrx200_legacy: migrate ECI V-2FUb/R to upstream PHY LED control
This commit switches the control of the leds connected to the Lantiq PEF7071V
PHY to an upstream solution. There should be no functional changes.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/18153
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-08 20:26:03 +01:00
Tianling Shen
2091c29578 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>
2025-03-08 20:12:11 +01:00