openwrt/staging/xback.git
11 months agompc85xx: fix some dtc warnings
Rosen Penev [Thu, 30 Nov 2023 22:15:11 +0000 (14:15 -0800)]
mpc85xx: fix some dtc warnings

Mostly missing/wrong addresses.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agokernel: backport fixes for realtek r8152
Marty Jones [Tue, 28 Nov 2023 18:27:18 +0000 (13:27 -0500)]
kernel: backport fixes for realtek r8152

Fixes issues with RTL8156 2.5G USB adapters

- # ethtool eth1
Settings for eth1:
        Supported ports: [ ]
        Supported link modes:   Not reported
        Supported pause frame use: No
        Supports auto-negotiation: No
        Supported FEC modes: Not reported
        Advertised link modes:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Advertised FEC modes: Not reported
        Speed: 2500Mb/s
        Duplex: Half
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: off
        MDI-X: Unknown
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: yes
- #

- r8152: break the loop when the budget is exhausted
- r8152: Block future register access if register access fails
- r8152: Rename RTL8152_UNPLUG to RTL8152_INACCESSIBLE
- r8152: add vendor/device ID pair for D-Link DUB-E250
- r8152: try to use a normal budget
- r8152: set bp in bulk
- r8152: adjust generic_ocp_write function
- r8152: fix the autosuspend doesn't work
- r8152: Add __GFP_NOWARN to big allocations
- r8152: reduce the control transfer of rtl8152_get_version()
- r8152: remove rtl_vendor_mode function
- r8152: avoid to change cfg for all devices
- r8152: add USB device driver for config selection
- r8152: use napi_gro_frags
- cdc_ether: no need to blacklist any r8152 devices
- cdc_ether: add u-blox 0x1313 composition

Build system: x86_64
Build-tested: bcm2711, rockchip, x86/64
Run-tested: bcm2711/RPi4B, rockchip/nanopi r2s, x86/64

Signed-off-by: Marty Jones <mj8263788@gmail.com>
11 months agomediatek: filogic: Update bootcount init script permissions
Chen Minqiang [Mon, 27 Nov 2023 03:30:53 +0000 (11:30 +0800)]
mediatek: filogic: Update bootcount init script permissions

Change permissions of the bootcount init script from old mode 100644
to new mode 100755 to ensure its executability.

Fixes: 6cc14bf66aa9 ("filogic: support Telenor branded ZyXEL EX5700")
Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
11 months agoipq40xx: update ASUS RT-AC58U leds DTS nodes
Christian Lamparter [Fri, 1 Dec 2023 20:38:40 +0000 (21:38 +0100)]
ipq40xx: update ASUS RT-AC58U leds DTS nodes

 - use color, function, function-enumerator properties.
 - removes the label properties from LED nodes.
 - add panic-indicator to the blue power/status LED.

Note: yes this brings the combined LAN/"switch" LED sort of back,
though I fully admit, it's a bit jank. Do you know a better option?
then please tell/make a PR!

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
11 months agoipq40xx: enable CONFIG_LED_TRIGGER_PHY for AC42U
Christian Lamparter [Fri, 1 Dec 2023 20:20:47 +0000 (21:20 +0100)]
ipq40xx: enable CONFIG_LED_TRIGGER_PHY for AC42U

The AC42U already had PHY Triggers in the DTS.
We are probably going to use them at some point.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
11 months agobase-files: support parse DT LED color and function
Shiji Yang [Tue, 31 Oct 2023 10:47:49 +0000 (18:47 +0800)]
base-files: support parse DT LED color and function

The 'label' property in led node has been deprecated and we'd better
to avoid using it. This patch allows us to extract DT OF LED name
from the newly introduced LED properties "color", "function" and
"function-enumerator".

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
11 months agogeneric: add more DT LED color and function definitions
Shiji Yang [Tue, 31 Oct 2023 10:21:37 +0000 (18:21 +0800)]
generic: add more DT LED color and function definitions

Openwrt supports hundreds of devices. These newly added LED colors
and functions can help developers better describe LED indicators.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
11 months agoqoriq: pad rootfs with zeros
Russell Senior [Fri, 1 Dec 2023 21:48:56 +0000 (13:48 -0800)]
qoriq: pad rootfs with zeros

Presently, sysupgrade -n does *not* reset the overlayfs, retaining
unwanted filesystem contents. Adding PADDING=1 in front of
gen_image_generic.sh in image/Makefile ensures that the overlayfs is
recreated on firstboot.

Fixes: 080a769b4da8 ("qoriq: new target")
Signed-off-by: Russell Senior <russell@personaltelco.net>
[add Fixes tag, rewrite commit subject and message to respect line
length]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
11 months agoqoriq: set compat_version in board.d
Russell Senior [Fri, 1 Dec 2023 21:48:55 +0000 (13:48 -0800)]
qoriq: set compat_version in board.d

Currently, sysupgrade without the -n option complains:

  # sysupgrade -v tmp/openwrt-qoriq-generic-watchguard_firebox-m300-squashfs-sysupgrade.img.gz
  upgrade: The device is supported, but the config is incompatible to the new image (1.0->1.1). Please upgrade without keeping config (sysupgrade -n).
  upgrade: Kernel switched to FIT uImage. Update U-Boot environment.
  upgrade: Reading partition table from bootdisk...
  upgrade: Extract boot sector from the image
  upgrade: Reading partition table from image...
  Image check failed.

So, add the missing 05_compat-version to /etc/board.d/ to allow
sysupgrade to save config without using -f.

Fixes: c4b499bc03ab ("qoriq: use FIT uImage for Firebox M300 kernel")
Signed-off-by: Russell Senior <russell@personaltelco.net>
[drop invalid copyright header, add SPDX license header, shorten commit
subject, add fixes tag]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
11 months agox86: Add kmod-dwmac-intel
Hauke Mehrtens [Sun, 26 Nov 2023 22:59:54 +0000 (23:59 +0100)]
x86: Add kmod-dwmac-intel

This adds the Intel Ethernet driver for the Intel Quark/EHL/TGL chips.

Fixes: #13994
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 months agoarmsr: Move kmod-stmmac-core to common place
Hauke Mehrtens [Sun, 26 Nov 2023 22:53:35 +0000 (23:53 +0100)]
armsr: Move kmod-stmmac-core to common place

Move the kmod-stmmac-core package to the common place to share it with
x86 later.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 months agomwlwifi: update to version 10.4.10-20231129
Stefan Kalscheuer [Thu, 30 Nov 2023 08:30:56 +0000 (09:30 +0100)]
mwlwifi: update to version 10.4.10-20231129

Remove upstreamed patches:
* replace usage of the deprecated "pci-dma-compat.h" API (6c03b27)
* remove uaccess and get_fs calls from PCIe for Kenel >= 5.18 (1d0d08c)

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
11 months agobpftool: Update to v7.3.0
Tony Ambardar [Fri, 24 Nov 2023 01:51:38 +0000 (17:51 -0800)]
bpftool: Update to v7.3.0

Update to the latest upstream release to include recent improvements and
bugfixes. Also refresh local patches.

Link: https://github.com/libbpf/bpftool/releases/tag/v7.3.0
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
11 months agolibbpf: Update to v1.3.0
Tony Ambardar [Fri, 24 Nov 2023 01:50:10 +0000 (17:50 -0800)]
libbpf: Update to v1.3.0

Update to the latest upstream release to include recent improvements and
bugfixes. Also refresh local patches.

Link: https://github.com/libbpf/libbpf/releases/tag/v1.3.0
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
11 months agohostapd: use new udebug ubus api to make debug rings configurable
Felix Fietkau [Thu, 30 Nov 2023 19:08:21 +0000 (20:08 +0100)]
hostapd: use new udebug ubus api to make debug rings configurable

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agoucode: update to Git HEAD (2023-11-30)
Felix Fietkau [Thu, 30 Nov 2023 18:13:35 +0000 (19:13 +0100)]
ucode: update to Git HEAD (2023-11-30)

96f74b5be829 ubus: make ubus_context first in uc_ubus_connection_t

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agoudebug: add more entries for the default config
Felix Fietkau [Tue, 28 Nov 2023 14:10:57 +0000 (15:10 +0100)]
udebug: add more entries for the default config

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agoprocd: update to Git HEAD (2023-11-28)
Felix Fietkau [Thu, 30 Nov 2023 18:19:01 +0000 (19:19 +0100)]
procd: update to Git HEAD (2023-11-28)

d852f877920b service: Fix retriggering of init.d-scripts.
7e6c6efd6fbc udebug: add support for logging via udebug

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agoubox: update to Git HEAD (2023-11-30)
Felix Fietkau [Thu, 30 Nov 2023 12:42:50 +0000 (13:42 +0100)]
ubox: update to Git HEAD (2023-11-30)

cc34fb7b922f logd: add support for subscribing to the log object
c08709cceb55 logd: add udebug support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agolibubox: update to Git HEAD (2023-11-30)
Felix Fietkau [Thu, 30 Nov 2023 11:53:29 +0000 (12:53 +0100)]
libubox: update to Git HEAD (2023-11-30)

325fea5c57cf udebug: add functions for manipulating entry length
e84c000c4756 udebug: add inline helper function to test if a buffer is allocated
40acbe34632b udebug: wait for response after buffer add/remove

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agoudebug: update to Git HEAD (2023-11-30)
Felix Fietkau [Thu, 30 Nov 2023 11:52:08 +0000 (12:52 +0100)]
udebug: update to Git HEAD (2023-11-30)

d49aadabb7a1 lib: fix dealing with udebugd restarts
9ec5fbb6aaad ubus: report ring size and data size via ubus api
86b4396baa44 ring: add debug messages for ring alloc errors
e02306af7c50 lib: add helper function for applying ring config
b613879cb049 client: send confirmation messages for ring add/remove

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agomediatek: add support for Confiabits MT7981
Luis Mita [Wed, 22 Nov 2023 19:13:04 +0000 (15:13 -0400)]
mediatek: add support for Confiabits MT7981

Confiabits MT7981 is a Wi-Fi 6 router based on MediaTek MT7981.

Specification:
 - SoC: MediaTek MT7981B
 - CPU: 2x 1.3 GHz Cortex-A53
 - Flash: 128 MiB SPI NAND
 - RAM: 256 MiB
 - WLAN: 2.4 GHz, 5 GHz (MediaTek MT7976CN, 802.11ax)
 - Ethernet: 4x 10/100/1000 Mbps MT7531AE (3xLAN, 1xWAN)
 - USB 2.0 port
 - Buttons: 1 Reset button, 1 Mesh button.
 - LEDs: 7x light-blue, 2x warm-white
 - Serial console: internal 4-pin header, 115200 8n1
 - Power: 12 VDC, 1.5 A

MAC addresses in stock firmware and in this commit:
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| WAN     | 00:0c:43:xx:xx:e1 | label+1   |
| LAN     | 00:0c:43:xx:xx:e0 | label     |
| WLAN 2g | 00:0c:43:xx:xx:e0 | label     |
| WLAN 5g | 02:0c:43:xx:xx:e0 |           |
+---------+-------------------+-----------+
The label MAC was found in 'Factory', 0x4

Installation:
The stock firmware is OpenWrt-based. If you can reach LuCI or SSH, just use the sysupgrade image
with the 'Keep settings' option turned off.

Signed-off-by: Luis Mita <luis@luismita.com>
11 months agotarget: Make TARGET_SERIAL independent of GRUB configuration
Hauke Mehrtens [Sun, 26 Nov 2023 22:04:04 +0000 (23:04 +0100)]
target: Make TARGET_SERIAL independent of GRUB configuration

GRUB_SERIAL is also used for the default serial on the target and not
only in grub. When no grub was build it was not available and the build
fails.

Rename GRUB_SERIAL to TARGET_SERIAL and make it always available on x86
and armsr targets.

Fixes: #14063
Fixes: b10768476f9d ("x86,armsr: interpolate GRUB_SERIAL into /etc/inittab")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 months agokernel: bump 5.15 to 5.15.140
John Audia [Tue, 28 Nov 2023 22:08:16 +0000 (17:08 -0500)]
kernel: bump 5.15 to 5.15.140

Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.140

Removed upstreamed:
mvebu/patches-5.15/106-Revert-i2c-pxa-move-to-generic-GPIO-recovery.patch[1]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.140&id=06d320ca170b4e59bb261e2ce3ffe84e9154d42b

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
11 months agokernel: bump 6.1 to 6.1.64
John Audia [Tue, 28 Nov 2023 19:34:53 +0000 (14:34 -0500)]
kernel: bump 6.1 to 6.1.64

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

Removed upstreamed:
ixp4xx/patches-6.1/0001-mtd-cfi_cmdset_0001-Byte-swap-OTP-info.patch[1]
mvebu/patches-6.1/106-Revert-i2c-pxa-move-to-generic-GPIO-recovery.patch[2]
qualcommax/patches-6.1/0026-v6.7-clk-qcom-ipq8074-drop-the-CLK_SET_RATE_PARENT-flag-f.patch[3]

Manually rebased:
bcm27xx/patches-6.1/950-0111-MMC-added-alternative-MMC-driver.patch

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.64&id=3b93096d29c5b9ca2af94be4ee9949c1767acf17
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.64&id=b3fd9db79e30d5eb5f76ef1f5b7e4f444af574ea
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.64&id=877080a3490102da26b8d969588159b2385f739e

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

Signed-off-by: John Audia <therealgraysky@proton.me>
11 months agomediatek: add kmod-usb3 to default package set of the ZBT-Z8102AX
Daniel Golle [Wed, 29 Nov 2023 21:10:37 +0000 (21:10 +0000)]
mediatek: add kmod-usb3 to default package set of the ZBT-Z8102AX

Include XHCI USB drivers on the ZBT-Z8102AX router, the drivers are
required to be able to use the USB-connected M.2 slots for 4G/5G modems.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agolibubox: update to Git HEAD (2023-11-28)
Felix Fietkau [Tue, 28 Nov 2023 21:12:15 +0000 (22:12 +0100)]
libubox: update to Git HEAD (2023-11-28)

b77f2a4ce903 uloop: fix build using C++ compilers
260ad5bd1566 udebug: add ulog support
e80dc00ee90c link librt if needed for shm_open

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agoubus: update to Git HEAD (2023-11-28)
Felix Fietkau [Tue, 28 Nov 2023 12:54:19 +0000 (13:54 +0100)]
ubus: update to Git HEAD (2023-11-28)

2b39a27d8bcc libubus: fix reconnect with auto subscribe
f84eb5998c6e libubus: fix initial subscribe with autosubscribe

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agoubox: add acl file for logd
Felix Fietkau [Tue, 28 Nov 2023 11:51:37 +0000 (12:51 +0100)]
ubox: add acl file for logd

Fixes ubus reconnect, since the process user id changes to 'logd'

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agoudebug: move ubus dependency to libudebug
Felix Fietkau [Mon, 27 Nov 2023 18:36:33 +0000 (19:36 +0100)]
udebug: move ubus dependency to libudebug

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agoudebug: update to Git HEAD (2023-11-27)
Felix Fietkau [Mon, 27 Nov 2023 17:37:55 +0000 (18:37 +0100)]
udebug: update to Git HEAD (2023-11-27)

a2301fa3b0c6 README: add wireshark info
cfd83ccc1e4e server: properly handle unclaimed file descriptors
cb71f64de0ec lib: remove leftover debug code
a92101631c0d lib: fix avl tree lookup
d4b99820afd0 lib: move library code to libubox, add ubus config handling code

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agolibubox: update to Git HEAD (2023-11-27)
Felix Fietkau [Mon, 27 Nov 2023 17:37:33 +0000 (18:37 +0100)]
libubox: update to Git HEAD (2023-11-27)

82fa6480de7a uloop: add support for interval timers
13d9b04fb09d uloop: add support for user defined signal handlers
f7d156911311 uloop: properly initialize signal handler mask
8a5a4319a85c uloop: fix typo in signal handling rework
b3fa3d92e3eb uloop: reset flags after __uloop_fd_delete call
d4c3066e7c5e udebug: add udebug library code

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agomediatek: copy config for Acer Predator W6
David Bauer [Mon, 20 Nov 2023 15:36:43 +0000 (16:36 +0100)]
mediatek: copy config for Acer Predator W6

Config was previously not copied on sysupgrade.

Signed-off-by: David Bauer <mail@david-bauer.net>
11 months agomediatek: add support for GL.iNet GL-MT2500
David Bauer [Thu, 20 Apr 2023 17:49:55 +0000 (19:49 +0200)]
mediatek: add support for GL.iNet GL-MT2500

Hardware
--------
SoC:  MediaTek MT7981BA
RAM:  1GB DDR4 (NANYA NT5AD512M16C4-JR)
MMC:  8GB eMMC (Samsung 8GTF4R)
ETH:  1000Base-T LAN (ePHY)
      2500Base-T WAN (MaxLinear GPY211C)
BTN:  1x Reset Button
LED:  System (blue/white)
      VPN (white)
USB:  1x USB-A (USB 3.0)
UART: 115200 8N1 - Pinout on board next to LAN port
      Don't connect 3.3V!

Known Issues
------------
U-Boot vendor recovery does not seem to accept any images, neither
GL.iNet images nor OpenWrt images. Recovery requires serial access!

Installation
------------
Upload the OpenWrt sysupgrade image to the Gl.iNet Web-UI. Make sure to
not retain existing settings.

Signed-off-by: David Bauer <mail@david-bauer.net>
11 months agorockchip: require image metadata
David Bauer [Tue, 21 Nov 2023 13:10:09 +0000 (14:10 +0100)]
rockchip: require image metadata

All devices in the rockchip target have appended image-metadata. Enforce
the presence of this metadata to avoid flashing incomplete images.

This is the de-facto standard for almost all OpenWrt targets.

Signed-off-by: David Bauer <mail@david-bauer.net>
11 months agoath79: fortinet-fap-221-b: convert to nvmem-layout
Lech Perczak [Thu, 16 Nov 2023 16:30:11 +0000 (17:30 +0100)]
ath79: fortinet-fap-221-b: convert to nvmem-layout

Now that MAC address parser supports the hex format (without
delimiters), use the canonical MAC address stored in U-boot partition.
Get rid of the userspace adjustments which are no longer necessary.
While at that, move the mac-base to the common part, as it is again
exactly the same in both models.

And convert ART partition too - keep that one separate, as calibration
data length differs between the models.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
11 months agoath79: fortinet-fap-220-b: convert to nvmem-layout
Lech Perczak [Thu, 16 Nov 2023 16:17:32 +0000 (17:17 +0100)]
ath79: fortinet-fap-220-b: convert to nvmem-layout

Now that MAC address parser supports the hex format (without
delimiters), use the canonical MAC address stored in U-boot partition.
Get rid of the "mac-address-increment" binding.
While at that, convert ART partition too.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
11 months agoath79: fortinet-fap-220-b: fix WLAN MAC addresses
Lech Perczak [Sat, 25 Nov 2023 02:09:30 +0000 (03:09 +0100)]
ath79: fortinet-fap-220-b: fix WLAN MAC addresses

Addresses were swapped compared to the factory firmware. In addition to
that, one of them was shifted by -1. Fix that by setting wlan0 MAC
offset to 9, and wlan1 MAC offset to 2.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
11 months agoustream-ssl: update to Git HEAD (2023-11-26)
Hauke Mehrtens [Sun, 26 Nov 2023 19:37:01 +0000 (20:37 +0100)]
ustream-ssl: update to Git HEAD (2023-11-26)

91666a3 ustream-mbedtls: Add compatibility with Mbed TLS 3.0.0
263b9a9 cmake: Fail if undefined symbols are used

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 months agox86 64: Add new device Cordoba Edge Platform
Xiaojun Liu [Mon, 13 Nov 2023 03:59:45 +0000 (03:59 +0000)]
x86 64: Add new device Cordoba Edge Platform

Add new device Cordoba Edge Platform
hardware specifications: CPU - Intel Atom C3000
                           Ethernet - 2 10Gbps ixgbe SPF+
                                      2 1Gbps  ixgbe RJ45/SPF
                                      4 2.5Gbps  igc RJ45
                           WiFi - mt7915e
                           LED  - 3 multicolor(red|blue|green) LEDs

Signed-off-by: Xiaojun Liu <xiaojun.liu@silicom.co.il>
11 months agodnsmasq: mark global ubus context as closed after fork
Sven Eckelmann [Sat, 18 Nov 2023 15:29:09 +0000 (16:29 +0100)]
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: d8b33dad0bb7 ("dnsmasq: add support for monitoring and modifying dns lookup results via ubus")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
11 months agorockchip: add NanoPi R5C support
Tianling Shen [Sun, 25 Jun 2023 16:37:31 +0000 (00:37 +0800)]
rockchip: add NanoPi R5C support

Hardware
--------
RockChip RK3568 ARM64 (4 cores)
1GB or 4GB LPDDR4X RAM
2x 2500 Base-T
4 LEDs (LAN / WAN / WIFI / POWER)
1 Button (Reset)
8GB or 32GB eMMC on-board
Micro-SD Slot
M.2 Slot
2x USB 3.0 Port

Installation
------------
Uncompress the OpenWrt sysupgrade and write it to a micro SD card or
internal eMMC using dd.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
11 months agouboot-rockchip: add NanoPi R5C support
Tianling Shen [Sun, 25 Jun 2023 16:37:30 +0000 (00:37 +0800)]
uboot-rockchip: add NanoPi R5C support

Add support for the FriendlyARM NanoPi R5C.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
11 months agorockchip: add NanoPi R5S support
Tianling Shen [Sun, 25 Jun 2023 16:37:30 +0000 (00:37 +0800)]
rockchip: add NanoPi R5S support

Hardware
--------
RockChip RK3568 ARM64 (4 cores)
2GB or 4GB LPDDR4X RAM
1x 1000 Base-T
2x 2500 Base-T
4 LEDs (LAN1 / LAN2 / WAN / POWER)
8GB eMMC on-board
Micro-SD Slot
M.2 Slot
2x USB 3.0 Port

Installation
------------
Uncompress the OpenWrt sysupgrade and write it to a micro SD card or
internal eMMC using dd.

Tested-by: Packet Please <pktpls@systemli.org>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
11 months agouboot-rockchip: add NanoPi R5S support
Tianling Shen [Sun, 25 Jun 2023 16:37:30 +0000 (00:37 +0800)]
uboot-rockchip: add NanoPi R5S support

Add support for the FriendlyARM NanoPi R5S support.

Tested-by: Packet Please <pktpls@systemli.org>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
11 months agorockchip: armv8: broaden boardname
Tianling Shen [Sun, 25 Jun 2023 16:37:29 +0000 (00:37 +0800)]
rockchip: armv8: broaden boardname

Now we have rk356x support :-)

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
11 months agorockchip: enable drivers for rk356x
Tianling Shen [Sun, 25 Jun 2023 16:37:29 +0000 (00:37 +0800)]
rockchip: enable drivers for rk356x

Enable all necessary drivers for the rk356x SoCs, including PHY,
SCMI, SPI etc. Also backport 2 upstream patches for sdhci fixes.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
11 months agorockchip: remove kernel 5.15 patches and config
Tianling Shen [Sun, 25 Jun 2023 16:37:29 +0000 (00:37 +0800)]
rockchip: remove kernel 5.15 patches and config

As we switched to kernel 6.1, these files can go.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
11 months agorockchip: switch to kernel 6.1
Tianling Shen [Sun, 25 Jun 2023 16:37:28 +0000 (00:37 +0800)]
rockchip: switch to kernel 6.1

Required by the following rk3568 support.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
11 months agorockchip: move image generation command to default
Tianling Shen [Sun, 25 Jun 2023 16:37:28 +0000 (00:37 +0800)]
rockchip: move image generation command to default

It's applicable for all devices so move it to default to reduce
redudant code. Addtionally introduce a new variable `BOOT_SCRIPT`
to allow custom boot script (if necessary).

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
11 months agorkbin: add new TF-A package for rk35xx
Tianling Shen [Sun, 25 Jun 2023 16:37:28 +0000 (00:37 +0800)]
rkbin: add new TF-A package for rk35xx

Currently there's no usable mainline (open source) TF-A implementation
for rk35xx SoCs, so pack the prebuilt firmware from the vendor.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
11 months agouboot-rockchip: Update to 2023.07.02
Tianling Shen [Sun, 25 Jun 2023 16:37:27 +0000 (00:37 +0800)]
uboot-rockchip: Update to 2023.07.02

* Removed swig hacks and prebuilt of-platdata
* Removed upstreamed patches
  - 101-rock64pro-disable-CONFIG_USE_PREBOOT.patch
  - 102-rockchip-rk3328-Add-support-for-FriendlyARM-NanoPi-R2C.patch
* Reordered patches

* Introduced new dependencies check
* Overrided default PATH to avoid race condition
    (host python3 vs hostpkg python3)
* Switched to use UBOOT_CUSTOMIZE_CONFIG for config update

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
11 months agouboot-sunxi: use intree dtc explicitly
Tianling Shen [Sat, 25 Nov 2023 15:17:15 +0000 (23:17 +0800)]
uboot-sunxi: use intree dtc explicitly

This replaces pylibfdt hack.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
11 months agouboot-sifiveu: use intree dtc explicitly
Tianling Shen [Sat, 25 Nov 2023 15:22:59 +0000 (23:22 +0800)]
uboot-sifiveu: use intree dtc explicitly

This replaces pylibfdt hack.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
11 months agouboot-mediatek: use intree dtc explicitly
Tianling Shen [Sat, 25 Nov 2023 15:21:22 +0000 (23:21 +0800)]
uboot-mediatek: use intree dtc explicitly

This replaces pylibfdt hack.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
11 months agou-boot: introduce dependencies check for swig and pyelftools
Tianling Shen [Sun, 25 Jun 2023 16:37:27 +0000 (00:37 +0800)]
u-boot: introduce dependencies check for swig and pyelftools

They are required by modern u-boot builds,
e.g. uboot-rockchip and uboot-sunxi.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
11 months agoipq40xx: enable UBI size checks for some Linksys NAND devices
Tony Ambardar [Sat, 11 Nov 2023 12:53:26 +0000 (04:53 -0800)]
ipq40xx: enable UBI size checks for some Linksys NAND devices

Add correct NAND_SIZE in device definitions for EA6350v3, EA8300, MR8300,
WHW01 and WHW03v2, to enable improved image size checks wrt UBI reserved
blocks on NAND devices.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
11 months agoimage: improve UBI image sizing on NAND devices
Tony Ambardar [Sat, 11 Nov 2023 12:46:14 +0000 (04:46 -0800)]
image: improve UBI image sizing on NAND devices

Many NAND devices use a build recipe with "append-ubi | check-size" to
ensure factory images don't exceed the target flash partition size.
However, UBI reserves space for bad block handling and other operational
overhead, and thus 'check-size' can overestimate the space available by
several MB. In practice, this means a failed check is definitely a failure,
while a passing check is only probably a pass.

Improve the situation by teaching 'Build/append-ubi' to check image sizes
while accounting for UBI reserved blocks. Add new device variable NAND_SIZE
and use with existing IMAGE_SIZE to derate the available space. Each UBI
device reserves 20 PEBs per 1024 PEBs of the entire NAND device for bad
blocks, plus an additional 4 PEBs overhead.

Many devices can transparently enable this check by setting NAND_SIZE based
on their flash storage, and may then remove any unneeded 'check-size'.

Link: http://www.linux-mtd.infradead.org/doc/ubi.html#L_overhead
Suggested-by: Shiji Yang <yangshiji66@qq.com>
Suggested-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
11 months agoimage: fix Linksys image alignment and simplify footer creation
Tony Ambardar [Tue, 14 Nov 2023 01:14:07 +0000 (17:14 -0800)]
image: fix Linksys image alignment and simplify footer creation

Current factory image sizes for Linksys devices are 256-byte aligned. This
is not an issue writing factory images from the OpenWrt or Linksys GUIs,
but can lead to failures using a TFTP client from the Linksys bootloader:

     NAND write: device 1 offset 0x2800000, size 0xc00100
     Attempt to write to non page aligned data
     NAND write to offset 2800000 failed -22
      0 bytes written: ERROR

Simplify Linksys footer creation by migrating to a makefile build recipe,
and pre-pad the footer (with 0xFF) to ensure the final image is $(PAGESIZE)
aligned.  Finally, remove the old linksys-image.sh script no longer needed.

Linksys footer details are given below for future reference. The 256-byte
footer is appended to factory images and tested by both the Linksys
Upgrader (observed in EA6350v3) and OpenWrt sysupgrade.

  Footer format:
    .LINKSYS.     Checked by Linksys upgrader before continuing.  (9 bytes)
    <VERSION>     Upgrade version number, unchecked so arbitrary. (8 bytes)
    <TYPE>        Model of device, space padded (0x20).          (15 bytes)
    <CRC>         CRC checksum of factory image to flash.         (8 bytes)
    <padding>     Padding ('0' + 0x20 * 7)                        (8 bytes)
    <signature>   Signature of signer, unchecked so arbitrary.   (16 bytes)
    <padding>     Padding with nulls (0x00)                     (192 bytes)

Link: https://github.com/openwrt/openwrt/pull/11405#issuecomment-1358510123
Link: https://github.com/openwrt/openwrt/pull/11405#issuecomment-1587517739
Reported-by: Stijn Segers <foss@volatilesystems.org>
Reported-by: Wyatt Martin <wawowl@gmail.com>
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
11 months agoimage: use helper function for size units
Tony Ambardar [Sat, 11 Nov 2023 12:29:26 +0000 (04:29 -0800)]
image: use helper function for size units

Add the make function 'exp_units' for helping evaluate k/m/g size units in
expressions, and use this to consistently replace many ad hoc substitutions
like '$(subst k,* 1024,$(subst m, * 1024k,$(IMAGE_SIZE)))' in makefiles.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
11 months agoipq40xx: fix typo in Linksys WHW01 image definition
Tony Ambardar [Mon, 2 Oct 2023 04:51:32 +0000 (21:51 -0700)]
ipq40xx: fix typo in Linksys WHW01 image definition

Use lower-case "k" in IMAGE_SIZE for Linksys WHW01, permitting proper unit
conversions in build recipes (e.g. 75776k -> 75776*1024).

Fixes: 2a9f3b7717 ("ipq40xx: fix up Linksys WHW01 board name, device definition")
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
11 months agoath79: add support for D-link DAP-1720 A1
Rani Hod [Sun, 12 Nov 2023 23:15:31 +0000 (01:15 +0200)]
ath79: add support for D-link DAP-1720 A1

D-Link DAP-1720 rev A1 is a mains-powered AC1750 Wi-Fi range extender,
manufactured by Alpha Networks [8WAPAC28.1A1G].
(in square brackets: PCB silkscreen markings)

Specifications:
* CPU (Qualcomm Atheros QCA9563-AL3A [U5]):
  775 MHz single core MIPS 74Kc;
* RAM (Winbond W9751G6KB-25J [U3]):
  64 MiB DDR2;
* ROM (Winbond W25Q128FV [U16]):
  16 MiB SPI NOR flash;
* Ethernet (AR8033-AL1A PHY [U1], no switch):
  1 GbE RJ45 port (no PHY LEDs);
* Wi-Fi
  * 2.4 GHz (Qualcomm Atheros QCA9563-AL3A [U5]):
    3x3 802.11n;
  * 5 GHz (Qualcomm Atheros QCA9880-BR4A [U9]):
    3x3 802.11ac Wave 1;
  * 3 foldable dual-band antennas (U.fl) [P1],[P2],[P3];
* GPIO LEDs:
  * RSSI low (red/green) [D2];
  * RSSI medium (green) [D3];
  * RSSI high (green) [D4];
  * status (red/green) [D5];
* GPIO buttons:
  * WPS [SW1], co-located with status LED;
  * reset [SW4], accessible via hole in the side;
* Serial/UART:
  Tx-Gnd-3v3-Rx [JP1], Tx is the square pin, 1.25mm pitch;
  125000-8-n-1 in U-boot, 115200-8-n-1 in kernel;
* Misc:
  * 12V VCC [JP2], fed from internal 12V/1A AC to DC converter;
  * on/off slide switch [SW2] (disconnects VCC mechanically);
  * unpopulated footprints for a Wi-Fi LED [D1];
  * unpopulated footprints for a 4-pin 3-position slide switch (SW3);

MAC addresses:
* Label = LAN;
* 2.4 GHz WiFi = LAN;
* 5 GHz WiFi = LAN+2;

Installation:
* `factory.bin` can be used to install OpenWrt from OEM firmware via the
  standard upgrade webpage at http://192.168.0.50/UpdateFirmware.html
* `recovery.bin` can be used to install OpenWrt (or revert to OEM
  firmware) from D-Link Web Recovery. To enter web recovery, keep reset
  button pressed and then power on the device. Reset button can be
  released when the red status LED is bright; it will then blink slowly.
  Set static IP to 192.168.0.10, navigate to http://192.168.0.50 and
  upload 'recovery.bin'. Note that in web recovery mode the device
  ignores ping and DHCP requests.

Note: 802.11s is not supported by the default `ath10k` driver and
firmware, but is supported by the non-CT driver and firmware variants.
The `-smallbuffers` driver variant is recommended due to RAM size.

Co-developed-by: Anthony Sepa <protectivedad@gmail.com>
Signed-off-by: Rani Hod <rani.hod@gmail.com>
11 months agoath79: ar: convert to mac-base
Rosen Penev [Sun, 26 Nov 2023 04:36:49 +0000 (20:36 -0800)]
ath79: ar: convert to mac-base

Replacement for deprecated mac-address-increment

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agoath79: ar: convert to nvmem-layout
Rosen Penev [Sun, 26 Nov 2023 03:31:17 +0000 (19:31 -0800)]
ath79: ar: convert to nvmem-layout

Will allow removing deprecated mac-address-increment.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agoath79: tp9343: convert to nvmem-layout
Rosen Penev [Sun, 26 Nov 2023 01:36:49 +0000 (17:36 -0800)]
ath79: tp9343: convert to nvmem-layout

Allows getting rid of deprecated mac-address-increment.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agoath79: qcn: convert to nvmem-layout
Rosen Penev [Sun, 26 Nov 2023 01:25:18 +0000 (17:25 -0800)]
ath79: qcn: convert to nvmem-layout

Allows getting rid of deprecated mac-address-increment.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agoath79: qca: remove mac-address-increment
Rosen Penev [Fri, 10 Nov 2023 22:55:43 +0000 (14:55 -0800)]
ath79: qca: remove mac-address-increment

nvmem-layout allows removal

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agoath79: qca: convert to nvmem-layout
Rosen Penev [Thu, 9 Nov 2023 23:18:44 +0000 (15:18 -0800)]
ath79: qca: convert to nvmem-layout

Allows replacing mac-address-increment with mac-base.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agoath79: mikrotik: fix dts warnings
Rosen Penev [Sat, 11 Nov 2023 00:21:29 +0000 (16:21 -0800)]
ath79: mikrotik: fix dts warnings

property has invalid length

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agoramips: mt7621: nix mac-address-increment
Rosen Penev [Wed, 8 Nov 2023 03:39:00 +0000 (19:39 -0800)]
ramips: mt7621: nix mac-address-increment

nvmem-layout allows removal

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agoramips: mt7621: convert to nvmem-layout
Rosen Penev [Tue, 7 Nov 2023 23:55:58 +0000 (15:55 -0800)]
ramips: mt7621: convert to nvmem-layout

Allows replacing mac-address-increment with mac-base.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agoramips: mt7621: add interrupt-controller
Rosen Penev [Wed, 8 Nov 2023 03:25:58 +0000 (19:25 -0800)]
ramips: mt7621: add interrupt-controller

Fixes dtc warning:

'#interrupt-cells' found, but node is not an interrupt provider

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agoramips: mt7620a: use mac-base
Rosen Penev [Sat, 25 Nov 2023 21:35:04 +0000 (13:35 -0800)]
ramips: mt7620a: use mac-base

mac-address-increment is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agoramips: mt7620a: convert to nvmem-layout
Rosen Penev [Sat, 25 Nov 2023 21:20:44 +0000 (13:20 -0800)]
ramips: mt7620a: convert to nvmem-layout

Allows using mac-base to replace mac-address-increment.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agoramips: mt7620n: convert to nvmem-layout
Rosen Penev [Sat, 25 Nov 2023 20:32:55 +0000 (12:32 -0800)]
ramips: mt7620n: convert to nvmem-layout

nvmem-cells is deprecated. nvmem-layout allows using mac-base.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agoramips: mt7628: use mac-base
Rosen Penev [Fri, 24 Nov 2023 02:59:35 +0000 (18:59 -0800)]
ramips: mt7628: use mac-base

mac-address-increment is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agoramips: mt7628: use nvmem-layout
Rosen Penev [Fri, 24 Nov 2023 02:31:55 +0000 (18:31 -0800)]
ramips: mt7628: use nvmem-layout

Will allow using mac-base.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agomediatek: use mac-base
Rosen Penev [Sat, 25 Nov 2023 22:11:08 +0000 (14:11 -0800)]
mediatek: use mac-base

mac-address-increment is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agomediatek: convert to nvmem-layout
Rosen Penev [Sat, 25 Nov 2023 22:03:10 +0000 (14:03 -0800)]
mediatek: convert to nvmem-layout

Will allow removing mac-address-increment.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agoramips: rtxxxx: remove mac-address-increment
Rosen Penev [Fri, 24 Nov 2023 01:40:09 +0000 (17:40 -0800)]
ramips: rtxxxx: remove mac-address-increment

Deprecated and replaced upstream with mac-base.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agoramips: rtxxxx: convert to nvmem-layout
Rosen Penev [Wed, 22 Nov 2023 23:48:24 +0000 (15:48 -0800)]
ramips: rtxxxx: convert to nvmem-layout

Allows replacing mac-adress-increment.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agomediatek: filogic: reorder alphabetically
Chukun Pan [Mon, 6 Nov 2023 15:06:05 +0000 (23:06 +0800)]
mediatek: filogic: reorder alphabetically

Reorder scripts and image recipes to keep alphabetical order.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
11 months agouboot-envtools: filogic: reorder alphabetically
Chukun Pan [Sun, 5 Nov 2023 15:02:09 +0000 (23:02 +0800)]
uboot-envtools: filogic: reorder alphabetically

Reorder scripts to keep alphabetical order.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
11 months agomediatek: filogic: remove kmod-usb2 for GL-MT6000
Chukun Pan [Fri, 17 Nov 2023 15:27:03 +0000 (23:27 +0800)]
mediatek: filogic: remove kmod-usb2 for GL-MT6000

The usb driver requires kmod-usb3, not kmod-usb2.
Remove the useless kmod-usb2 from default package.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
11 months agomediatek: Cetron CT3003: fixes typo for spi properties
Chukun Pan [Sat, 4 Nov 2023 15:50:20 +0000 (23:50 +0800)]
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>
11 months agoipq40xx: remove mac-address-increment
Rosen Penev [Mon, 13 Nov 2023 19:47:17 +0000 (11:47 -0800)]
ipq40xx: remove mac-address-increment

nvmem-layout allows removal

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agoipq40xx: convert to nvmem-layout
Rosen Penev [Mon, 13 Nov 2023 19:23:12 +0000 (11:23 -0800)]
ipq40xx: convert to nvmem-layout

Allows replacing mac-address-increment with mac-base.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agoipq40xx: fix dtc warnimg
Rosen Penev [Mon, 13 Nov 2023 20:02:38 +0000 (12:02 -0800)]
ipq40xx: fix dtc warnimg

I2C bus unit address format error, expected "62"

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agoqualcommax: convert to nvmem-layout
Rosen Penev [Mon, 13 Nov 2023 20:20:51 +0000 (12:20 -0800)]
qualcommax: convert to nvmem-layout

nvmem-cells is deprecated

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agoapm821xx: convert to nvmem-layout
Rosen Penev [Mon, 13 Nov 2023 20:23:07 +0000 (12:23 -0800)]
apm821xx: convert to nvmem-layout

nvmem-cells is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agomediatek: filogic: Fix GPIOs for Zbtlink ZBT-Z8102AX
Hauke Mehrtens [Sat, 25 Nov 2023 17:06:41 +0000 (18:06 +0100)]
mediatek: filogic: Fix GPIOs for Zbtlink ZBT-Z8102AX

The PGIO configuration should be added for the ZBT-Z8102AX and not the ZBT-Z8103AX

Fixes: c8c2f522625c ("mediatek: add support for Zbtlink ZBT-Z8102AX")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 months agoramips: mt76x8 add support for RTC class/drivers
Xiaobo Liu [Tue, 14 Nov 2023 03:07:56 +0000 (11:07 +0800)]
ramips: mt76x8 add support for RTC class/drivers

This commit adds support for RTC class/drivers to the mt76x8 target.

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
11 months agof2fs-tools: avoid dead symlinks in root
Rosen Penev [Sat, 7 Oct 2023 04:55:01 +0000 (21:55 -0700)]
f2fs-tools: avoid dead symlinks in root

When building on the host, this avoids creating dead symlinks. Matches
what is done elsewhere.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
11 months agoramips: add support for TP-Link EX220 v1
Darlan Pedro de Campos [Fri, 24 Nov 2023 00:31:05 +0000 (19:31 -0500)]
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>
11 months agomwlwifi: update to version 10.4.10-20231120
Michael Trinidad [Wed, 22 Nov 2023 02:46:27 +0000 (21:46 -0500)]
mwlwifi: update to version 10.4.10-20231120

Upstream PR 416 improvements:
 -AMPDU Optimization of priority calculation. (8864/8897)
 -8864/8897 fix wpa3
 -Add cypher suite to driver capabilities (all chip)
 -Alignment of pcie_tx_ctrl* (all chip)
 -"feature" normalization for all chips (all chip)
 -Add modprobe parameters (all chip)
 -fix monitoring (all chip)
 -Code separation by chipset (8864/8897 <=> 8997)
 -dump_prob decommissioning (8864/8897/8997)
 -fix amsdu high ping latency (8864/8897/8997)
 -drop debug info in hostcmd_get_hw_spec() (8864/8897)
 -Add wcb_base in debug info (8864)
 -Rewrite AMSDU packets (8864/8897/8997)
 -debug rewrite output mwl_debugfs_sta_read (all chip)
 -Improved encryption interoperability (8864/8897/8997)
 -factorization encrypted packet test (8864/8897/8997)
 -Change 88W8864 firmware to 7.2.9.27 (8864/8897)
 -Fix the AMPDU session lifecycle (8864/8897/8997)
 -Remove the tx done packets mechanism (8864/8897)

Signed-off-by: Michael Trinidad <trinidude4@hotmail.com>
11 months agoramips: Add support for Cudy WR1300 v3
Filip Milivojevic [Sat, 11 Nov 2023 09:57:32 +0000 (10:57 +0100)]
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 and has
eeprom_factory_8000 length fixed.

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

Signed-off-by: Filip Milivojevic <zekica@gmail.com>
11 months agouboot-envtools: add support for Zyxel EX5601-T0 ubootmod
Nicolò Veronese [Thu, 2 Nov 2023 18:53:08 +0000 (19:53 +0100)]
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>
11 months agomediatek: add Zyxel EX5601-T0 with uboot custom partition
Valerio 'ftp21' Mancini [Wed, 4 Oct 2023 09:43:25 +0000 (11:43 +0200)]
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>
11 months agouboot-mediatek: add initial Zyxel EX5601-T0 support
Valerio 'ftp21' Mancini [Sat, 26 Aug 2023 22:01:58 +0000 (00:01 +0200)]
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>
11 months agomediatek: remove DTS property added by mistake
Daniel Golle [Sat, 25 Nov 2023 03:20:50 +0000 (03:20 +0000)]
mediatek: remove DTS property added by mistake

Remove bogus 'phy-handle = <&phy0>;', an undefined reference.

Fixes: c8c2f52262 ("mediatek: add support for Zbtlink ZBT-Z8102AX")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>