Commit Graph

58271 Commits

Author SHA1 Message Date
Hauke Mehrtens 01170d518d OpenWrt v23.05.3: adjust config defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-03-22 23:26:03 +01:00
Hauke Mehrtens 234f1a2efa mt76: Fix PKG_MIRROR_HASH
Fix the PKG_MIRROR_HASH after the last upgrade.

Fixes: 5ef41b1f91 ("mt76: update to latest HEAD")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-03-22 23:09:42 +01:00
David Bauer 5ef41b1f91 mt76: update to latest HEAD
f1e1e67d wifi: mt76: fix race condition related to checking tx queue fill status
bbbac7de wifi: mt76: rename mt76_packet_id_init/flush to mt76_wcid_init/cleanup
b5d13611 mt76: mt7915: fix monitor mode issues

Signed-off-by: David Bauer <mail@david-bauer.net>
2024-03-22 19:59:24 +01:00
Daniel Golle a8f51096dd mediatek: mt7622: linksys-e8450: set driving strength for SPI-NAND
Set 12mA driving strength for SPI-NAND pins like the stock firmware's
bootloader does as well.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 45a2109353)
2024-03-20 16:32:25 +00:00
Hauke Mehrtens 03a3a729ec dnsmasq: Backport 2 upstream patches
These two patches are fixing minor problems with DNSSEC found shortly
after the dnsmasq 2.90 release.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 28c87d7ecd)
2024-03-20 01:22:10 +01:00
Robert Marko 853b638f85 dnsmasq: reset PKG_RELEASE
dnsmasq was recently updated to 2.90, but PKG_RELEASE was not reset to 1.

Fixes: 838a27f64f ("dnsmasq: version 2.90")
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 694e647784)
2024-03-18 21:55:47 +01:00
Nathaniel Wesley Filardo 875822f283 dnsmasq: version 2.90
Bump to 2.90 to get upstream's fix for DNSSEC KeyTrap (CVE-2023-50387,
CVE-2023-50868) among many other goodies and fixes (notably, upstream
568fb024... fixes a UAF in cache_remove_uid that was routinely crashing
dnsmasq in my deployment).

Catch up our 200-ubus_dns.patch, too.

Signed-off-by: Nathaniel Wesley Filardo <nwfilardo@gmail.com>
(cherry picked from commit 838a27f64f)
2024-03-18 21:55:47 +01:00
Sven Eckelmann af22a169c1 dnsmasq: mark global ubus context as closed after fork
If the dnsmasq process forks to handle TCP connections, it closes the ubus
context. But instead of changing the daemon wide pointer to NULL, only the
local variable was adjusted - and this portion of the code was even dropped
(dead store) by some optimizing compilers.

It makes more sense to change the daemon->ubus pointer because various
functions are already checking it for NULL. It is also the behavior which
ubus_destroy() implements.

Fixes: d8b33dad0b ("dnsmasq: add support for monitoring and modifying dns lookup results via ubus")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
(cherry picked from commit 711dcb7763)
2024-03-18 21:55:47 +01:00
Rafał Miłecki 0a571c9e77 mediatek: filogic: replace built-in Aquantia driver with module
Some Aquantia PHYs (e.g. AQR113C) require firmware to be uploaded by
host system. With built-in drivers this doesn't work in OpenWrt /
embeddded as filesystem isn't available during PHY probe. That results
in delays like:
[    1.588068] Aquantia AQR113C mdio-bus:00: Falling back to sysfs fallback for: Rhe-05.06-Candidate9-AQR_Mediatek_23B_P5_ID45824_LCLVER1.cld
[   64.526387] Aquantia AQR113C mdio-bus:00: failed to find FW file Rhe-05.06-Candidate9-AQR_Mediatek_23B_P5_ID45824_LCLVER1.cld (-110)

Switch to module to postpone PHY probe to init state.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 3bd79e6136)
2024-03-17 21:55:37 +01:00
Daniel Golle f02920dd98 mvebu: enable thermal zone polling for IEI Puzzle devices
Marvell's thermal sensors do not support interrupts, so we need to
poll them. Reading temperature every second should be enough to
control the fan.
While at it, also make sure fan speed is reduced again if temperature
goes down.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit fc177695e0)
2024-03-17 19:40:44 +00:00
Christian Lamparter 100a5606d6 firmware: intel-microcode: update to 20240312
Debian changelog:

intel-microcode (3.20240312.1) unstable; urgency=medium

  * New upstream microcode datafile 20240312 (closes: #1066108)
    - Mitigations for INTEL-SA-INTEL-SA-00972 (CVE-2023-39368):
      Protection mechanism failure of bus lock regulator for some Intel
      Processors may allow an unauthenticated user to potentially enable
      denial of service via network access.
    - Mitigations for INTEL-SA-INTEL-SA-00982 (CVE-2023-38575):
      Non-transparent sharing of return predictor targets between contexts in
      some Intel Processors may allow an authorized user to potentially
      enable information disclosure via local access.  Affects SGX as well.
    - Mitigations for INTEL-SA-INTEL-SA-00898 (CVE-2023-28746), aka RFDS:
      Information exposure through microarchitectural state after transient
      execution from some register files for some Intel Atom Processors and
      E-cores of Intel Core Processors may allow an authenticated user to
      potentially enable information disclosure via local access.  Enhances
      VERW instruction to clear stale register buffers.  Affects SGX as well.
      Requires kernel update to be effective.
    - Mitigations for INTEL-SA-INTEL-SA-00960 (CVE-2023-22655), aka TECRA:
      Protection mechanism failure in some 3rd and 4th Generation Intel Xeon
      Processors when using Intel SGX or Intel TDX may allow a privileged
      user to potentially enable escalation of privilege via local access.
      NOTE: effective only when loaded by firmware.  Allows SMM firmware to
      attack SGX/TDX.
    - Mitigations for INTEL-SA-INTEL-SA-01045 (CVE-2023-43490):
      Incorrect calculation in microcode keying mechanism for some Intel
      Xeon D Processors with Intel SGX may allow a privileged user to
      potentially enable information disclosure via local access.
  * Fixes for other unspecified functional issues on many processors
  * Updated microcodes:
    sig 0x00050653, pf_mask 0x97, 2023-07-28, rev 0x1000191, size 36864
    sig 0x00050656, pf_mask 0xbf, 2023-07-28, rev 0x4003605, size 38912
    sig 0x00050657, pf_mask 0xbf, 2023-07-28, rev 0x5003605, size 37888
    sig 0x0005065b, pf_mask 0xbf, 2023-08-03, rev 0x7002802, size 30720
    sig 0x00050665, pf_mask 0x10, 2023-08-03, rev 0xe000015, size 23552
    sig 0x000506f1, pf_mask 0x01, 2023-10-05, rev 0x003e, size 11264
    sig 0x000606a6, pf_mask 0x87, 2023-09-14, rev 0xd0003d1, size 307200
    sig 0x000606c1, pf_mask 0x10, 2023-12-05, rev 0x1000290, size 299008
    sig 0x000706a1, pf_mask 0x01, 2023-08-25, rev 0x0040, size 76800
    sig 0x000706a8, pf_mask 0x01, 2023-08-25, rev 0x0024, size 76800
    sig 0x000706e5, pf_mask 0x80, 2023-09-14, rev 0x00c4, size 114688
    sig 0x000806c1, pf_mask 0x80, 2023-09-13, rev 0x00b6, size 111616
    sig 0x000806c2, pf_mask 0xc2, 2023-09-13, rev 0x0036, size 98304
    sig 0x000806d1, pf_mask 0xc2, 2023-09-13, rev 0x0050, size 104448
    sig 0x000806ec, pf_mask 0x94, 2023-07-16, rev 0x00fa, size 106496
    sig 0x000806f8, pf_mask 0x87, 2024-01-03, rev 0x2b000590, size 579584
    sig 0x000806f7, pf_mask 0x87, 2024-01-03, rev 0x2b000590
    sig 0x000806f6, pf_mask 0x87, 2024-01-03, rev 0x2b000590
    sig 0x000806f5, pf_mask 0x87, 2024-01-03, rev 0x2b000590
    sig 0x000806f4, pf_mask 0x87, 2024-01-03, rev 0x2b000590
    sig 0x00090661, pf_mask 0x01, 2023-09-26, rev 0x0019, size 20480
    sig 0x00090672, pf_mask 0x07, 2023-09-19, rev 0x0034, size 224256
    sig 0x00090675, pf_mask 0x07, 2023-09-19, rev 0x0034
    sig 0x000b06f2, pf_mask 0x07, 2023-09-19, rev 0x0034
    sig 0x000b06f5, pf_mask 0x07, 2023-09-19, rev 0x0034
    sig 0x000906a3, pf_mask 0x80, 2023-09-19, rev 0x0432, size 222208
    sig 0x000906a4, pf_mask 0x80, 2023-09-19, rev 0x0432
    sig 0x000906c0, pf_mask 0x01, 2023-09-26, rev 0x24000026, size 20480
    sig 0x000906e9, pf_mask 0x2a, 2023-09-28, rev 0x00f8, size 108544
    sig 0x000906ea, pf_mask 0x22, 2023-07-26, rev 0x00f6, size 105472
    sig 0x000906ec, pf_mask 0x22, 2023-07-26, rev 0x00f6, size 106496
    sig 0x000906ed, pf_mask 0x22, 2023-07-27, rev 0x00fc, size 106496
    sig 0x000a0652, pf_mask 0x20, 2023-07-16, rev 0x00fa, size 97280
    sig 0x000a0653, pf_mask 0x22, 2023-07-16, rev 0x00fa, size 97280
    sig 0x000a0655, pf_mask 0x22, 2023-07-16, rev 0x00fa, size 97280
    sig 0x000a0660, pf_mask 0x80, 2023-07-16, rev 0x00fa, size 97280
    sig 0x000a0661, pf_mask 0x80, 2023-07-16, rev 0x00fa, size 96256
    sig 0x000a0671, pf_mask 0x02, 2023-09-14, rev 0x005e, size 108544
    sig 0x000b0671, pf_mask 0x32, 2023-12-14, rev 0x0122, size 215040
    sig 0x000b06a2, pf_mask 0xe0, 2023-12-07, rev 0x4121, size 220160
    sig 0x000b06a3, pf_mask 0xe0, 2023-12-07, rev 0x4121
    sig 0x000b06e0, pf_mask 0x11, 2023-09-25, rev 0x0015, size 138240
  * New microcodes:
    sig 0x000a06a4, pf_mask 0xe6, 2024-01-03, rev 0x001c, size 136192
    sig 0x000b06a8, pf_mask 0xe0, 2023-12-07, rev 0x4121, size 220160
    sig 0x000c06f2, pf_mask 0x87, 2023-11-20, rev 0x21000200, size 549888
    sig 0x000c06f1, pf_mask 0x87, 2023-11-20, rev 0x21000200
  * source: update symlinks to reflect id of the latest release, 20240312
  * changelog, debian/changelog: fix typos

 -- Henrique de Moraes Holschuh <hmh@debian.org>  Tue, 12 Mar 2024 20:28:17 -0300

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit 7b911a9c49)
2024-03-16 00:42:38 +01:00
Christian Lamparter e0bae5e5fe firmware: intel-microcode: update to 20231114
Debian changelog:

intel-microcode (3.20231114.1) unstable; urgency=medium

  * New upstream microcode datafile 20231114 (closes: #1055962)
    Mitigations for "reptar", INTEL-SA-00950 (CVE-2023-23583)
    Sequence of processor instructions leads to unexpected behavior for some
    Intel(R) Processors, may allow an authenticated user to potentially enable
    escalation of privilege and/or information disclosure and/or denial of
    service via local access.
    Note: "retvar" on 4th gen Xeon Scalable (sig 0x806f8 pfm 0x87), 12th gen
    Core mobile (sig 0x906a4 pfm 0x80), 13th gen Core desktop (sig 0xb0671 pfm
    0x01) were already mitigated by a previous microcode update.
  * Fixes for unspecified functional issues
  * Updated microcodes:
    sig 0x000606a6, pf_mask 0x87, 2023-09-01, rev 0xd0003b9, size 299008
    sig 0x000606c1, pf_mask 0x10, 2023-09-08, rev 0x1000268, size 290816
    sig 0x000706e5, pf_mask 0x80, 2023-09-03, rev 0x00c2, size 113664
    sig 0x000806c1, pf_mask 0x80, 2023-09-07, rev 0x00b4, size 111616
    sig 0x000806c2, pf_mask 0xc2, 2023-09-07, rev 0x0034, size 98304
    sig 0x000806d1, pf_mask 0xc2, 2023-09-07, rev 0x004e, size 104448
    sig 0x000806f8, pf_mask 0x87, 2023-06-16, rev 0x2b0004d0, size 572416
    sig 0x000806f8, pf_mask 0x87, 2023-06-16, rev 0x2b0004d0
    sig 0x000806f7, pf_mask 0x87, 2023-06-16, rev 0x2b0004d0
    sig 0x000806f6, pf_mask 0x87, 2023-06-16, rev 0x2b0004d0
    sig 0x000806f5, pf_mask 0x87, 2023-06-16, rev 0x2b0004d0
    sig 0x000806f4, pf_mask 0x87, 2023-06-16, rev 0x2b0004d0
    sig 0x000806f8, pf_mask 0x10, 2023-06-26, rev 0x2c000290, size 605184
    sig 0x000806f8, pf_mask 0x10, 2023-06-26, rev 0x2c000290
    sig 0x000806f6, pf_mask 0x10, 2023-06-26, rev 0x2c000290
    sig 0x000806f5, pf_mask 0x10, 2023-06-26, rev 0x2c000290
    sig 0x000806f4, pf_mask 0x10, 2023-06-26, rev 0x2c000290
    sig 0x00090672, pf_mask 0x07, 2023-06-07, rev 0x0032, size 222208
    sig 0x00090672, pf_mask 0x07, 2023-06-07, rev 0x0032
    sig 0x00090675, pf_mask 0x07, 2023-06-07, rev 0x0032
    sig 0x000b06f2, pf_mask 0x07, 2023-06-07, rev 0x0032
    sig 0x000b06f5, pf_mask 0x07, 2023-06-07, rev 0x0032
    sig 0x000906a3, pf_mask 0x80, 2023-06-07, rev 0x0430, size 220160
    sig 0x000906a3, pf_mask 0x80, 2023-06-07, rev 0x0430
    sig 0x000906a4, pf_mask 0x80, 2023-06-07, rev 0x0430
    sig 0x000906a4, pf_mask 0x40, 2023-05-05, rev 0x0005, size 117760
    sig 0x000a0671, pf_mask 0x02, 2023-09-03, rev 0x005d, size 104448
    sig 0x000b0671, pf_mask 0x32, 2023-08-29, rev 0x011d, size 210944
    sig 0x000b06a2, pf_mask 0xe0, 2023-08-30, rev 0x411c, size 216064
    sig 0x000b06a2, pf_mask 0xe0, 2023-08-30, rev 0x411c
    sig 0x000b06a3, pf_mask 0xe0, 2023-08-30, rev 0x411c
    sig 0x000b06e0, pf_mask 0x11, 2023-06-26, rev 0x0012, size 136192
  * Updated 2023-08-08 changelog entry:
    Mitigations for "retvar" on a few processors, refer to the 2023-11-14
    entry for details.  This information was disclosed in 2023-11-14.
  * source: update symlinks to reflect id of the latest release, 20231114

 -- Henrique de Moraes Holschuh <hmh@debian.org>  Thu, 16 Nov 2023 08:09:43 -0300

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit 7241a91c94)
2024-03-16 00:42:38 +01:00
Konstantin Demin 6549a711be dropbear: cherry-pick upstream patches
critical fixes:
- libtommath: possible integer overflow (CVE-2023-36328)
- implement Strict KEX mode (CVE-2023-48795)

various fixes:
- fix DROPBEAR_DSS and DROPBEAR_RSA config options
- y2038 issues
- remove SO_LINGER socket option
- make banner reading failure non-fatal
- fix "noremotetcp" behavior
- don't try to shutdown a pty
- fix test for multiuser kernels

adds new features:
- option to bind to interface
- allow inetd with non-syslog
- ignore unsupported command line options with dropbearkey

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
(cherry picked from commit b5cde26048)
[Only add the patches fixing security problems]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Stijn Segers <foss@volatilesystems.org>
2024-03-15 23:53:01 +01:00
Patryk Kowalczyk 6961fe98ec mediatek: filogic: Asus TUF AX6000 fix inverted LED for 2.5Gb LAN port
Router Asus TUF AX6000 have second MaxLinear GPY211 PHY controller for 2.5Gb LAN port.
The 5'th LAN port have inverted status of the LED.
Based on the commit from main branch 90fbec8 we could set proper status of the LED.

Signed-off-by: Patryk Kowalczyk <patryk@kowalczyk.ws>
(cherry picked from commit b22539b5fe)
Signed-off-by: Tom Herbers <mail@tomherbers.de>
2024-03-15 23:28:14 +01:00
Daniel Golle 5c786dcb2b kernel: hack: support inverted LEDs on MaxLinear GPY211 PHY
Add downstream DT property to setup the PHY LEDs of the MaxLinear
GPY211 PHY in such way that the VDD of the LED is driven by the SoC
pin rather than the GND (which is the default).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 90fbec89be)
[removed patches for kernel 6.1]
Signed-off-by: Tom Herbers <mail@tomherbers.de>
2024-03-15 23:28:14 +01:00
Patryk Kowalczyk b3ad42e1e3 filogic: fix wifi eeprom filename for tuf-ax6000 The router use mt7986_eeprom_mt7976_dual.bin
Fixes: d522ccecb2 ("filogic: add support for ASUS TUF AX6000")

Signed-off-by: Patryk Kowalczyk <patryk@kowalczyk.ws>
(cherry picked from commit 0c3f4bd85e)
Signed-off-by: Tom Herbers <mail@tomherbers.de>
2024-03-15 23:28:14 +01:00
Mikhail Zhilkin 200693f886 ramips: add support for Z-ROUTER ZR-2660
This commit adds support for Z-ROUTER ZR-2660 (also known as Routerich
AX1800) wireless WiFi 6 router.

Specification
-------------
- SoC       : MediaTek MT7621AT, MIPS, 880 MHz
- RAM       : 256 MiB
- Flash     : NAND 128 MiB (AMD/Spansion S34ML01G2)
- WLAN      :
  - 2.4 GHz : MediaTek MT7905D/MT7975 (14c3:7916), b/g/n/ax, MIMO 2x2
  - 5 GHz   : MediaTek MT7915E (14c3:7915), a/n/ac/ax, MIMO 2x2
- Ethernet  : 10/100/1000 Mbps x4 (1x WAN, 3x LAN)
- USB       : 1x 2.0
- UART      : 3.3V, 115200n8, pins are silkscreened on the pcb
- Buttons   : 1x Reset
- LEDs      : 1x WiFi 2.4 GHz (green)
              1x WiFi 5 GHz (green)
              1x LAN (green)
              1x WAN (green)
              1x WAN no-internet (red)
- Power     : 12 VDC, 1 A

Installation
------------
1. Run tftp server on your PC (IP: 192.168.2.2) and put OpenWrt initramfs
   image (initramfs.bin) to the tftp root dir
2. Open the following link in the browser to enable telnet:
	http://192.168.2.1/cgi-bin/telnet_ssh
3. Connect to the router (default IP: 192.168.2.1) using telnet shell
   (credentials - user:admin)
4. Run the following commands in the telnet shell (this will install
   OpenWrt initramfs image on nand flash):
	cd /tmp
	tftp -g -r initramfs.bin 192.168.2.2
	mtd write initramfs.bin firmware
	mtd erase firmware_backup
	reboot
5. Copy OpenWrt sysupgrade image (sysupgrade.bin) to the /tmp dir of the
   router
6. Connect to the router (IP: 192.168.1.1) using ssh shell and run
   sysupgrade command:
	sysupgrade -n /tmp/sysupgrade.bin

Return to stock
---------------
1. Copy stock firmware (stock.bin) to the /tmp dir of the router using scp
2. Run following command in the router shell:
	cd /tmp
	mtd write stock.bin firmware
	reboot

Recovery
--------
Connect uart (pins are silkscreened on the pcb), interrupt boot process by
pressing any key, use u-boot menu to flash stock firmware image or OpenWrt
initramfs image.

MAC addresses
-------------
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| LAN     | 24:0f:5e:xx:xx:4c | label     |
| WAN     | 24:0f:5e:xx:xx:4d | label+1   |
| WLAN 2g | 24:0f:5e:xx:xx:4e | label+2   |
| WLAN 5g | 24:0f:5e:xx:xx:4f | label+3   |
+---------+-------------------+-----------+
The WLAN 2.4 MAC was found in 'factory', 0x4
The LAN MAC was found in 'factory', 0xfff4
The WAN MAC was found in 'factory', 0xfffa

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
(cherry picked from commit 1d3d6ef826)
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2024-03-15 23:24:13 +01:00
Daniel Golle 82e2d3478a generic: mtk_eth_soc: fix PPE hanging issue
A patch to resolve an issue was found in MediaTek's GPL-licensed SDK:
In the mtk_ppe_stop() function, the PPE scan mode is not disabled before
disabling the PPE. This can potentially lead to a hang during the process
of disabling the PPE.

Without this patch, the PPE may experience a hang during the reboot test.

Reference: b40da332df

Suggested-by: Bc-bocun Chen <bc-bocun.chen@mediatek.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 003b9ff61c)
2024-03-14 02:33:26 +00:00
Daniel Golle 83e37f71fa generic: 5.15: mtk_eth_soc: backport fix for hang on link up
Backport commit faa5f17fe2 ("kernel: mtk_eth_soc: release
MAC_MCR_FORCE_LINK only when MAC is up") to Linux 5.15 as well.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 33d6ba5045)
2024-03-14 02:33:26 +00:00
Nicolò Veronese 02272df01c uboot-envtools: add support for Zyxel EX5601-T0 ubootmod
The ubootmod bootlaoder for EX5601-T0 uses two partitions
 in ubi to store enviroment variables. so proper config
 is needed.

Signed-off-by: Nicolò Veronese <nicveronese@gmail.com>
(cherry picked from commit 2a0805fd3d)
2024-03-12 23:13:38 +01:00
Valerio 'ftp21' Mancini 401d8c7051 uboot-mediatek: add initial Zyxel EX5601-T0 support
Flash procedure is described in next commit.

TLDR:
Copy preloader and uboot to /tmp and write them in the mtd.
This will also require new UBI partition and
 volumes to boot openwrt.

mtd write /tmp/openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-preloader.bin bl2
mtd write /tmp/openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-bl31-uboot.fip fip

Changelist:
 - Added profile for 4k+256 SPI NAND_TYPE
 - Added basic Zyxel EX5601-T0 uboot profile

Backported from hitech95 branch:
 - Button RESET pin fix
 - Button WPS pin fix

Signed-off-by: Valerio 'ftp21' Mancini <ftp21@ftp21.eu>
Signed-off-by: Nicolò Veronese <nicveronese@gmail.com>
(cherry picked from commit a9cf87027e)
2024-03-12 22:58:06 +01:00
Daniel Golle 63a7d5e937 ramips: add support for YunCore G720
The YunCore G720 is a dual band 802.11ax router with 5 GbE ports.

Specs:
- SoC: MediaTek MT7621
- Ethernet: 5x GbE ports (built-in MT7530)
- Wireless 2.4GHz / 5GHz: MediaTek MT7915E
- RAM: 256MiB
- ROM: 16MiB (W25Q128)
- 1 Button (reset)
- 8 LEDs (1x system, 2x wifi, 5x switch ports)

Flash instructions:
The vendor firmware is based on OpenWrt, the sysupgrade image can be
flashed using the '-F' (force) option on the CLI.
Make sure not to keep settings when doing so.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 65df33fc76)
2024-03-12 18:45:25 +00:00
Darlan Pedro de Campos 1562847cde ramips: add support for TP-Link EX220 v1
This device is very similar, if not identical, to the TP-Link AX23 v1
but is targeted at service providers and features a completely different
flash layout.

Hardware
--------

CPU:    MediaTek MT7621 DAT
RAM:    128MB DDR3 (integrated)
FLASH:  16MB SPI-NOR
WiFi:   MediaTek MT7905 + MT7975 (2.4 / 5 DBDC) 802.11ax
SERIAL: 115200 8N1
        LEDs - (3V3 - GND - RX - TX) - ETH ports

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

Flashing is only possible via a serial connection using the sysupgrade
image; the factory image must be signed. You can flash the sysupgrade
image directly through the U-Boot console, or preferably, by booting the
initramfs image and flashing with the sysupgrade command. Follow these
steps for sysupgrade flashing:

1. Establish a UART serial connection.
2. Set up a TFTP server at 192.168.0.2 and copy the initramfs image
   there.
3. Power on the device and press any key to interrupt normal boot.
4. Load the initramfs image using tftpboot.
5. Boot with bootm.
6. If you haven't done so already, back up all stock mtd partitions.
7. Copy the sysupgrade image to the router.
8. Flash OpenWrt through either LuCI or the sysupgrade command. Remember
   not to attempt saving settings.

Revert to stock firmware
------------------------

Flash stock firmware via OEM web-recovery mode. If you don't have access
to the stock firmware image, you will need to restore the firmware
partition backed up earlier.

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

The router supports an HTTP recovery mode:

1. Turn off the router.
2. Press the reset button and power on the device.
3. When all LEDs start flashing, release reset and quickly press it
   again.

The interface is reachable at 192.168.0.1 and supports installation of
the OEM factory image. Note that flashing OpenWrt this way is not
possible, as mentioned above.

Signed-off-by: Darlan Pedro de Campos <darlanpedro@gmail.com>
(cherry picked from commit 2a0c9cc8cd)
2024-03-12 18:45:22 +00:00
Filip Milivojevic 1bbb94df96 ramips: Add support for Cudy WR1300 v3
Specifications:
 - SoC: MediaTek MT7621AT
 - RAM: 128 MB (DDR3)
 - Flash: 16 MB (SPI NOR)
 - WiFi: MediaTek MT7603E, MediaTek MT7613BE
 - Switch: 1 WAN, 4 LAN (Gigabit)
 - Buttons: Reset, WPS
 - LEDs: System, Wan, Lan 1-4, WiFi 2.4G, WiFi 5G, WPS
 - Power: DC 12V 1A tip positive

Download and flash the manufacturer's built OpenWRT image available at
http://www.cudytech.com/openwrt_software_download
Install the new OpenWRT image via luci (System -> Backup/Flash firmware)
Be sure to NOT keep settings. The force upgrade may need to be checked
due to differences in router naming conventions.

Cudy WR1300 v3 differs from v2 only in swapped WiFi chip PCIe slots. Common
nodes are extracted to .dtsi and new v2 and v3 dts are created.

Cudy WR1300 v2 dts now contains ieee80211-freq-limit.

The same manufacturer's built OpenWRT image is provided for both v2 and v3
devices as a step in installing, but for proper WiFi functionality,
a separate build is required.

Recovery:
 - Loads only signed manufacture firmware due to bootloader RSA verification
 - serve tftp-recovery image as /recovery.bin on 192.168.1.88/24
 - connect to any lan ethernet port
 - power on the device while holding the reset button
 - wait at least 8 seconds before releasing reset button for image to
   download
 - See http://www.cudytech.com/newsinfo/547425.html

Backported from branch main to 23.05.

Signed-off-by: Filip Milivojevic <zekica@gmail.com>
(cherry picked from commit 288738c59d)
2024-03-11 22:14:34 +01:00
Hauke Mehrtens 2f2eceab13 lantiq: Fix build after kernel 5.15.150
This fixes the following compile problem:
````
  CC      arch/mips/kernel/vpe-mt.o
arch/mips/kernel/vpe-mt.c: In function 'vpe_run':
arch/mips/kernel/vpe-mt.c:32:23: error: unused variable 'physical_memsize' [-Werror=unused-variable]
   32 |         unsigned long physical_memsize = 0L;
      |                       ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[6]: *** [scripts/Makefile.build:289: arch/mips/kernel/vpe-mt.o] Error 1
````

physical_memsize was removed from upstream kernel, see:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=5b4f6c5ff65c8551018ccea40c569afd759734c0

Fixes: 387fde0da0 ("kernel: bump 5.15 to 5.15.150")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 9cfa5f7417)
2024-03-08 14:50:43 +01:00
Hauke Mehrtens 7f1d043b23 kernel: Remove unused schedulers
These schedulers were removed in kernel 5.15.150 and 6.1.180.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit cd450923ab)
2024-03-08 11:28:10 +01:00
Hauke Mehrtens db7b247fa9 kernel: bump 5.15 to 5.15.150
Removed because it is upstream:
bcm53xx/patches-5.15/030-v5.16-0019-ARM-dts-BCM53573-Describe-on-SoC-BCM53125-rev-4-swit.patch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=cb1003c07e746e4e82bdd3959c9ea37018ed41a3

Removed because it is upstream:
bcm53xx/patches-5.15/037-v6.6-0004-ARM-dts-BCM53573-Drop-nonexistent-default-off-LED-tr.patch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c65a23e98e38dc991f495d6bdb3cfa6163a88a0c

Removed because it is upstream:
bcm53xx/patches-5.15/037-v6.6-0005-ARM-dts-BCM53573-Drop-nonexistent-usb-cells.patch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=71475bcee001cae3844644c2787eef93b26489d1

Adapted hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch to match
the changes from the upstream flow offload patch:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7c71b831220edeab7ce603d818dc1708d9ea4137

Manually Adapted the following patch:
bcm53xx/patches-5.15/035-v6.2-0004-ARM-dts-broadcom-align-LED-node-names-with-dtschema.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 387fde0da0)
2024-03-08 11:28:10 +01:00
John Audia 3062b186bf kernel: Remove dsmark support
dsmark support was removed in kernel 5.15.150 and 6.1.80. Remove it from
the kmod package as well

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit bd6b37f463)
2024-03-08 11:28:10 +01:00
Hauke Mehrtens 4c1d13e995 kernel: bump 5.15 to 5.15.149
Removed because it is upstream:
generic/pending-5.15/540-ksmbd-only-v2-leases-handle-the-directory.patch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=81ea755b8fa57ce186f56f14b709cf491c2a5505

Manually Adapted the following patches:
ath79/patches-5.15/900-unaligned_access_hacks.patch
ipq806x/patches-5.15/113-v5.19-03-PM-devfreq-Rework-freq_table-to-be-local-to-devfr.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 26d1d52403)
2024-03-08 11:28:10 +01:00
Petr Štetiar 0844937947
umdns: update to Git 7c675979 (2024-03-04)
Backport of single commit 9040335e102 ("interface: fix interface memory
corruption").

Fixes: openwrt/openwrt/issues/14120
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2024-03-08 07:56:44 +00:00
Robert Senderek 6f70e09a00 mediatek: filogic: add support for Cudy RE3000 v1
MT7981B /256MB /16MB SPI (XM25QH128C)
AX 2.4Ghz
AX 5Ghz 160Mhz wide
1Gbit LAN

OEM:
root@RE3000:~# ifconfig |grep HWaddr
br-lan    Link encap:Ethernet  HWaddr 80:XX:XX:08:XX:X0 (label)
br-wan    Link encap:Ethernet  HWaddr 80:XX:XX:08:XX:X0
eth0      Link encap:Ethernet  HWaddr 80:XX:XX:08:XX:X0
ra0       Link encap:Ethernet  HWaddr 80:XX:XX:08:XX:X0
ra2       Link encap:Ethernet  HWaddr 82:XX:XX:28:XX:X0
rax0      Link encap:Ethernet  HWaddr 82:XX:XX:38:XX:X0
rax2      Link encap:Ethernet  HWaddr 82:XX:XX:58:XX:X0

OpenWrt
root@OpenWrt:/# ifconfig |grep HW
br-lan    Link encap:Ethernet  HWaddr 80:XX:XX:08:XX:X0
eth0      Link encap:Ethernet  HWaddr 80:XX:XX:08:XX:X0
phy0-ap0  Link encap:Ethernet  HWaddr 80:XX:XX:08:XX:X0
phy1-ap0  Link encap:Ethernet  HWaddr 82:XX:XX:08:XX:X1

 tftp Installation via u-boot:

Connect TTL3.3V converter
connector is under the radiator Set speed 115200 8 N 1
Interrupt boot process by holding down-arrow key during boot then
>> 6. Load image
>> 0 - TFTP client (Default)
enter IP adresses and initramfs-kernel.bin

write to flash via sysupgrade or gui

Signed-off-by: Robert Senderek <robert.senderek@10g.pl>
(cherry picked from commit e8f7597317)
2024-03-07 22:14:32 +01:00
Sven Eckelmann 97f6a6bfaa ath11k-firmware: Move to new upstream repository for board-2.bin
It was announced [1] that the original staging repositories are no longer
used for staging of new firmware binaries. And that the old repository will
be removed [2] in June 2024.

The ath11k-firmware package must therefore point to the new repository
before the old one is no longer accessible.

[1] https://lore.kernel.org/r/bac97f31-4a70-4c4c-8179-4ede0b32f869@quicinc.com
[2] 8d2cc160f3

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2024-03-07 09:35:15 +01:00
Jesus Fernandez Manzano 503f78f91c hostapd: fix 11r defaults when using WPA
802.11r can not be used when selecting WPA. It needs at least WPA2.

This is because 802.11r advertises FT support in-part through the
Authentication and Key Management (AKM) suites in the Robust
Security Network (RSN) Information Element, which was included in
the 802.11i amendment and WPA2 certification program.

Pre-standard WPA did not include the RSN IE, but the WPA IE.
This IE can not advertise the AKM suite for FT.

Signed-off-by: Jesus Fernandez Manzano <jesus.manzano@galgus.ai>
(cherry picked from commit cdc4c55175)
2024-03-06 14:05:22 +01:00
Jesus Fernandez Manzano e5a12edb88 hostapd: fix 11r defaults when using SAE
When using WPA3-SAE or WPA2/WPA3 Personal Mixed, we can not use
ft_psk_generate_local because it will break FT for SAE. Instead
use the r0kh and r1kh configuration approach.

Signed-off-by: Jesus Fernandez Manzano <jesus.manzano@galgus.ai>
(cherry picked from commit e2f6bfb833)
Fixes: https://github.com/openwrt/luci/issues/6930
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2024-03-06 14:01:41 +01:00
Matthias Schiffer a527b34390
build: do not depend on $(STAGING_DIR)/.prepared when in SDK
The dependency can't be satisfied when building using the SDK, breaking
package builds. As the staging and bin dirs are distributed with the SDK
archive, ignoring the dependency is fine when SDK is set.

Fixes: fbb924abff ("build: add $(STAGING_DIR) and $(BIN_DIR) ...")
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
(cherry picked from commit 2b46cbef81)
2024-03-04 23:59:24 +01:00
Álvaro Fernández Rojas e87be1bc0e bcm27xx: base-files: fix platform_copy_config
/boot/kernel*.img wildcard only works without quotation marks.

(cherry picked from commit 552c6b2472)
Fixes: 1a5e51ab00 ("bcm27xx: base-files: fix platform_copy_config")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-03-04 16:26:15 +01:00
Matthias Schiffer 81f8b93e36
build: add $(STAGING_DIR) and $(BIN_DIR) preparation to target and package subdir compile dependencies
In a pristine build, these directories are created as dependencies of
the tools subdir compile, however this step never runs when the tools
compile stamp already exists. Since commit ed6ba2801c ("tools: keep
stamp file in $(STAGING_DIR_HOST)"), this will happen after `make clean`:
$(STAGING_DIR) has been deleted, but the tools stamp still exists, so
the next build will fail because $(STAGING_DIR) has not been set up
correctly.

Fix builds after `make clean` by adding the preparation as dependencies
for the target and package directories as well.

Fixes: ed6ba2801c ("tools: keep stamp file in $(STAGING_DIR_HOST)")
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
(cherry picked from commit fbb924abff)
2024-03-03 23:17:03 +01:00
Daniel Golle c8898f46f9 kernel: lantiq: ltq-vmmc: introduce user group for vmmc
asterisk-chan-lantiq is by now the only user of the VMMC interface.
And asterisk runs as user 'asterisk' which doesn't give it permission
to open the /dev/vmmc* devices.
Introduce a new user group 'vmmc' and give permission to access the
/dev/vmmc* devices to that group.
Another commit for asterisk-chan-lantiq will add the 'asterisk' user
to that group.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 37bbed6f95)
2024-03-03 16:18:02 +00:00
Daniel Golle 37c2bc4397 mediatek: fixes for Ethernet on MT7988 SoC
* fix switch ports with modes other than 1000M/Full
 * set 32-bit dma_coherent_mask to get PPE to work with 4 GiB of RAM
 * sync driver for built-in 1GE PHY with MediaTek SDK sources

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 4ae2f43b3a)
2024-02-27 18:33:41 +00:00
Chukun Pan 9627654277 mediatek: Cetron CT3003: fixes typo for spi properties
Same as commit 3674689, correct 'buswidth' to 'bus-width'.
Also move the nmbm properties outside the partition definition.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
(cherry picked from commit 1be6347b7d)
2024-02-27 17:42:30 +00:00
Valerio 'ftp21' Mancini 6bec68062b mediatek: add Zyxel EX5601-T0 with uboot custom partition
The flash procedure is similar to the Xiaomi AX6000 router.

Load openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-initramfs-recovery.itb from original Zyxel U-Boot:

tftpboot openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-initramfs-recovery.itb
bootm 0x46000000
Load mtd-rw
insmod /lib/modules/$(uname -r)/mtd-rw.ko i_want_a_brick=1

Format ubi and create ubootenv partitions

ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5
ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
Copy openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-initramfs-recovery.itb to /tmp and create recovery partition.
If your recovery image is larger than 10MiB, size the recovery partition accordingly to make it fit.

ubimkvol /dev/ubi0 -n 2 -N recovery -s 10MiB
ubiupdatevol /dev/ubi0_2  openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-initramfs-recovery.itb
Copy preloader and uboot to /tmp and write them in the mtd

mtd write /tmp/openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-preloader.bin bl2
mtd write /tmp/openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-bl31-uboot.fip fip
Now write the firmware:
sysupgrade -n  /tmp/openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-squashfs-sysupgrade.itb

To create a correct BL2, I had to add a profile for 'spim:4k+256' as I could not find a way to value the variable 'NAND_TYPE'.

Features and fixes from hitech95 tree has been squashed, I'm attaching his commit message:

The Power LED was not working correctly and not reacting
 to the boot process and statuses.

The board has space (footprint) for an unpopulated Zigbee chip,
 while we dont know the device model having this chip populated
 we have to assure that the common dts doesnt enable
 interfaces that share pins with such device.

In this instance the PCIe and the uart1 and uart2 are disabled.
Some of the control PCIE pins seems to be used for the Zigbee chip,
 UART1 seems to be used as a flash port while UART2 should be the
 main comunication interface of Zigbee chip.

The Zigbee chip should be a EFR32MG21. But the pins used for UART
 seems to be not on standard PINS used by other adapters.
 So it cannot run firmwares shared on the web.
 But it should be possible to build a custom firmware with
 the corrtect pinmux.

This commit also contains the following squashed commit from hitech95
 - mediatek: fix sysupgrade for Zyxel EX7601-T0 ubootmod

Changes and fixes added in common board:
 - added aliases for boot status leds.
 - added aliases for the mac-label-device.
 - added pin claims for core features (MDIO and UART 0)
 - added default LEDs configuration (01_leds)
 - added default network configuration (02_network)
 - added missing kmod-usb3 module for USB3
 - fixed LED names
 - fixed reset pin for SLIC chip
 - removed unused pinmux configurations and devices
 - fix LAN (switch) port numbering
 - using nvmem cells for wifi eeprom, dropping deprecated "mediatek,mtd-eeprom"
 - proper factory partition and mac address handling
 - cleaned up spi_nand sections and partition

Changes and fixxes added in stock layout:
 - added NMBM, if u-boot has it, the kernel must be informed.

Co-authored-by: Nicolò Veronese <nicveronese@gmail.com>
Co-developed-by: Nicolò Veronese <nicveronese@gmail.com>
Signed-off-by: Nicolò Veronese <nicveronese@gmail.com>
Signed-off-by: Valerio 'ftp21' Mancini <ftp21@ftp21.eu>
(cherry picked from commit b5df398a36)
2024-02-27 17:42:30 +00:00
Roland Reinl e2954a1e1b mediatek: Add support for TP-Link EAP225v5
Device specification:
- MT7629 with 16MB NOR flash W25Q128 and 128 MB DDR3 RAM.
- MT7761N and MT7762N wireless chips (currenlty no driver in OpenWrt available)
  - WiFi is NOT working on this device
- Dual core but second CPU doesn't seem to work (Error message during boot: "CPU1: failed to come online")

There are two similar merge requests for similar devices with the same issues:
- https://github.com/openwrt/openwrt/pull/12286
- https://github.com/openwrt/openwrt/pull/5084

UART interface is next to the reset button, pinout:
- 1: TX (the pin with the arrow marker)
- 2: RX
- 3: GND
- 4: VCC

UART settings: 115200,8n1, 3.3V

U-Boot menu can be entered by pressing Ctrl+B during startup.

Booting initramfs:
- Set your computers IP adress to 192.168.1.110
- Run a TFTP server providing the initramfs image
- Power on the AP, press Ctrl+B to get to the U-Boot menu
- Select "1. System Load Linux to SDRAM via TFTP"
- Update kernel file name, input server IP and input device IP (if they deviate from the defaults)
- After booting, create a backup of all partitions, especially for kernel and root_fs. They are required for reverting back to stock firmware
- The sysupgrade image can be flashed now

MAC adresses:
- LAN and 2.4GHz use the same MAC (the one printed on the device)
- 5GHz WiFi MAC is LAN MAC + 1

GPIOs:
- GPIO 21 is the reset pin (low active)
- GPIO 55 is for the green LED (active high)
- GPIO 56 is for the yellow/amber LED (active high)

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
(cherry picked from commit 44cd32d764)
2024-02-27 17:42:30 +00:00
Roland Reinl f555fa6fd0 mediatek: Add support for D-Link EAGLE PRO AI M32
Specification:
 - MT7622BV SoC with 2.4GHz wifi
 - MT7975AN + MT7915AN for 5GHz
 - MT7531BE Switch
 - 512MB RAM
 - 128 MB flash
 - 3 LEDs (red, orange, white)
 - 2 buttons (WPS and Reset)

MAC addresses:
 - WAN MAC is stored in partition "Odm" at offset 0x83
 - LAN (as printed on the device) is WAN MAC + 1
 - WLAN MAC (2.4 GHz) is WAN MAC + 2
 - WLAN MAC (5GHz) is WAN MAC + 3

Disassembly: Remove 4 screws in the bottom and 2 screws in the top (after removing the blue cover on the top), then the board can be pulled out.

The pins for the serial console are already labeled on the board (VCC, TX, RX, GND). Serial settings: 3.3V, 115200,8n1

Flashing via Recovery Web Interface:
- Set your IP address to 192.168.0.10, subnetmask 255.255.255.25
- Press the reset button while powering on the deivce
- Keep the reset button pressed until the status LED blinks fast
- Open a Chromium based and goto http://192.168.0.1
- Download openwrt-mediatek-mt7622-dlink_eagle-pro-ai-m32-a1-squashfs-recovery.bin

Flashing via uBoot:
- Open the case, connect to the UART console
- Set your IP address to 10.10.10.3, subnet mask 255.255.255.0. Connect to one of the LAN interfaces of the router
- Run a tftp server which provides openwrt-mediatek-mt7622-dlink_eagle-pro-ai-m32-initramfs-kernel.bin. You can rename the file to iverson_uImage (no extension), then you don't have to enter the whole file name in uboot later.
- Power on the device and select "1. System Load Linux to SDRAM via TFTP." in the boot menu
- Enter image file, tftp server IP and device IP (if they differ from the default).
- TFTP download to RAM will start. After a few seconds OpenWrt initramfs should start
- The initramfs is accessible via 192.168.1.1, change your IP address accordingly (or use multiple IP addresses on your interface)
- Create a backup of the Kernel1 partition, this file is required if a revert to stock should be done later
- Perform a sysupgrade using openwrt-mediatek-mt7622-dlink_eagle-pro-ai-m32-squashfs-sysupgrade.bin
- Reboot the device. OpenWrt should start from flash now

Revert back to stock using the Recovery Web Interface:
- Set your IP address to 192.168.0.10, subnetmask 255.255.255.25
- Press the reset button while powering on the deivce
- Keep the reset button pressed until the status LED blinks fast
- Open a Chromium based and goto http://192.168.0.1
- Flash a decrypted firmware image from D-Link. Decrypting an firmware image is described below.

Decrypting a D-Link firmware image:
- Download https://github.com/RolandoMagico/firmware-utils/blob/M32/src/m32-firmware-util.c
- Compile a binary from the downloaded file, e.g. gcc m32-firmware-util.c -lcrypto -o m32-firmware-util
- Run ./m32-firmware-util M32 --DecryptFactoryImage <OriginalFirmware> <OutputFile>
- Example for firmware 1.03.01_HOTFIX: ./m32-firmware-util M32 --DecryptFactoryImage M32-REVA_1.03.01_HOTFIX.enc.bin M32-REVA_1.03.01_HOTFIX.decrypted.bin

Revert back to stock using uBoot:
- Open the case, connect to the UART console
- Set your IP address to 10.10.10.3, subnet mask 255.255.255.0. Connect to one of the LAN interfaces of the router
- Run a tftp server which provides the previously created backup of the Kernel1 partition. You can rename the file to iverson_uImage (no extension), then you don't have to enter the whole file name in uboot later.
- Power on the device and select "2. System Load Linux Kernel then write to Flash via TFTP." in the boot menu
- Enter image file, tftp server IP and device IP (if they differ from the default).
- TFTP download to FLASH will start. After a few seconds the stock firmware should start again

There is also an image openwrt-mediatek-mt7622-dlink_eagle-pro-ai-m32-a1-squashfs-tftp.bin which can directly be flashed via U-Boot and TFTP. It can be used if no backup of the Kernel1 partition is reuqired.

Flahsing via OEM web interface is currently not possible, the OEM images are encrypted and require a specific memory layout which is not compatible to the partition layout of OpenWrt.

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
(cherry picked from commit e3a6945b58)
2024-02-27 17:42:30 +00:00
INAGAKI Hiroshi 5b4df9a27e mediatek: add support for Buffalo WSR-3200AX4S
Buffalo WSR-3200AX4S is a 2.4/5 GHz band 11ax (Wi-Fi 6) router, based on
MT7622B.

Specification:

- SoC         : MediaTek MT7622B
- RAM         : DDR3 512 MiB
- Flash       : SPI-NAND 128 MiB (Winbond W25N01GVZEIG)
- WLAN        : 2.4/5 GHz 4T4R
  - 2.4 GHz   : MediaTek MT7622B (SoC)
  - 5 GHz     : MediaTek MT7915
- Ethernet    : 5x 10/100/1000 Mbps
  - Switch    : MediaTek MT7531
- LEDs/Keys   : 6x/5x (2x: buttons, 3x: slide-switches)
- UART        : through-hole on PCB (J4)
  - assignment: 3.3V, GND, TX, RX from tri-angle marking
  - settings  : 115200n8
- Power       : 12 VDC, 1.5 A

Flash instruction using factory.bin image:

1. Boot WSR-3200AX4S with "Router" mode
2. Access to "http://192.168.11.1/" and open firmware update page
   ("ファームウェア更新")
3. Select the OpenWrt factory.bin image and click update ("更新実行")
   button
4. Wait ~120 seconds to complete flashing

Note:

- This device has 2x OS images on flash. The first one will always be
  used for booting and the secondary is for backup.

- This support generates multiple factory*.bin image:

  - factory.bin      : for flashing from OEM WebUI
  - factory-uboot.bin: for flashing from U-Boot or clean installation
                       via sysupgrade (don't use for normal sysupgrade)

Known issues:

- Wi-Fi MAC addresses won't be applied to each adapter.

MAC Addresses:

LAN    : C4:3C:EA:xx:xx:60 (board_data, mac (text))
WAN    : C4:3C:EA:xx:xx:60 (board_data, mac (text))
2.4 GHz: C4:3C:EA:xx:xx:61
5 GHz  : C4:3C:EA:xx:xx:68

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
(cherry picked from commit 7383eb266b)
2024-02-27 17:42:30 +00:00
INAGAKI Hiroshi 65f9f3131e mediatek: separate dts/dtsi for Buffalo WSR series
Separate dts/dtsi from the dts of Buffalo WSR-2533DHP2 to prepare adding
suppport for WSR-3200AX4S.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
(cherry picked from commit 9f640cae75)
2024-02-27 17:42:30 +00:00
INAGAKI Hiroshi 882d20e25b mediatek: merge trx helpers in image/mt7622.mk
Merge similar helpers of trx image generation, "buffalo-kernel-trx" and
"trx-nand".

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
(cherry picked from commit d0929006f2)
2024-02-27 17:42:30 +00:00
INAGAKI Hiroshi a26ea17294 mediatek: drop pwm7_pins from Buffalo WSR-2533DHP2
MediaTek MT7622 doesn't support ch7 of PWM and pinctrl groups were dropped from
driver source[0]. So pwm7-related groups are unavailable now, then, kernel shows a
warning.

[    0.370264] mt7622-pinctrl 10211000.pinctrl: invalid group "pwm_ch7_2" for function "pwm"

Drop that pinmux from pinctrl node.

[0]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/pinctrl/mediatek/pinctrl-mt7622.c?id=57972641810a97566ffd13e4be3f6a66d61eb3b5

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
(cherry picked from commit 4d9113017b)
2024-02-27 17:42:30 +00:00
INAGAKI Hiroshi 9c793c44c9 mediatek: add label-mac-device for Buffalo WSR-2533DHP2
Add label-mac-device with "&gmac0" phandle for Buffalo WSR-2533DHP2.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
(cherry picked from commit 94606abf63)
2024-02-27 17:42:30 +00:00
INAGAKI Hiroshi 7e47913ef6 mediatek: update NVMEM bindings for Buffalo WSR-2533DHP2
Update NVMEM-related nodes and use newer binding for MAC addresses on
Buffalo WSR-2533DHP2.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
(cherry picked from commit de62e01652)
2024-02-27 17:42:30 +00:00
INAGAKI Hiroshi 04ec453970 mediatek: update LED/Key bindings for Buffalo WSR-2533DHP2
Update LED and key nodes with newer DeviceTree bindings for WSR-2533DHP2.

- LED
  - use led-[0-9] for node name of LEDs
  - add "color" and "function" properties
  - drop default-state = "on" from green:power LED
    - this LED will be turned on by led-running alias

- key
  - drop unnecessary poll-interval property
  - use key-[0-9] for node name of keys

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
(cherry picked from commit 6b8e7144c8)
2024-02-27 17:42:30 +00:00