Commit Graph

63008 Commits

Author SHA1 Message Date
Shiji Yang
f5996ae947 ramips: fix SDXC function for mt76x8 one eth port devices
There are only 5 devices in mt76x8 sub-target selected the MTK SDXC
driver package. And they are all single ethernet port routers or dev
boards:

* LinkIt Smart 7688
* Onion Omega2+
* RAVPower RP-WD009
* VoCore VoCore2
* VoCore VoCore2-Lite

For these devices, they are using the ephy p1 - p4 as the SDXC IO
pins. Therefore, these GPIO pads must be configured in "digital"
IO mode.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17446
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-01-04 14:47:53 +01:00
Shiji Yang
cea4aae0a9 ramips: add back SDXC card reader support for HiWiFi HC5x61A
After adding the correct package and pin group configurations,
the SDXC card slot can now function properly.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17446
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-01-04 14:47:53 +01:00
Shiji Yang
05ec3b50a8 ramips: pinctrl: allow mux SDXC pins for mt76x8
The mt76x8 SDXC pin register definition is incompatible with the
mtmips generic pinctrl driver structure. This hack allows us to
mux the SDXC IO to different pin groups in device tree.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17446
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-01-04 14:47:53 +01:00
Shiji Yang
f70cdfd682 ramips: mmc-mtk: add more vendor driver register init values
In the MTK vendor driver, mt762x SDXC registers MSDC_PATCH_BIT and
MSDC_PATCH_BIT1 have different init values than upstream driver.
These magical values should have some help for the stability.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17446
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-01-04 14:47:53 +01:00
Shiji Yang
5ef71eaafd uboot-mediatek: add missing LED command for OpenWrt One
The u-boot LED command "led_loop_done" is missing from the OpenWrt
One NAND flash u-boot. Copy it from the OpenWrt One NOR flash u-boot
default environment to fix this issue.

Fixes: https://github.com/openwrt/openwrt/issues/17310
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17338
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-01-04 14:08:05 +01:00
Shiji Yang
9f97e39a93 uboot-mediatek: fix Routerich AX3000 support patch
It seems that the original patch has been manually modified. The
newly added line number is incorrect.

Fixes: c0581520b1 ("uboot-mediatek: add Routerich AX3000 support")
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17338
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-01-04 14:08:05 +01:00
John Audia
f105d1a9a9 bcm27xx/bcm2712: Fix-up RP1 modules
Correct a few mistakes around dependencies and naming and unset
CONFIG_FIRMWARE_RP1 in RPi5B's config and instead of a builtin, build it
as a module.

Without this change, there are two entries for rp1.ko in
/lib/modules/$(uname -r)/modules.builtin due to how we strip the leading
directories when we generate it. See: package/kernel/linux/Makefile
around line 63.

  % grep rp1.ko /lib/modules/$(uname -r)/modules.builtin
  pwm-rp1.ko
  clk-rp1.ko
  rp1.ko
  rp1.ko

The kernel log gets spammed with tons of superfluous warnings as a
results of the double entry:

  daemon.warn modprobe: found duplicate builtin module rp1

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17461
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-01-04 12:16:03 +01:00
Felix Fietkau
b795e5cbcf wifi-scripts: fix setting tx power on some drivers
On some drivers, setting the tx power on the interface is not enough.
Set it for the phy as well.

Fixes: 04fb05914e ("wifi-scripts: add multi-radio config support")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-01-04 11:55:04 +01:00
Felix Fietkau
f11bc4f201 mt76: update to Git HEAD (2025-01-04)
35bcf68a6297 wifi: mt76: scan: fix setting tx_info fields
4d8d6e2e7710 wifi: mt76: scan: set vif offchannel link for scanning/roc
e354436db440 wifi: mt76: mt7996: use the correct vif link for scanning/roc

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-01-04 11:54:41 +01:00
Álvaro Fernández Rojas
484f670ed3 rockchip: refresh patch
Commit 8a477bafb4 backported an upstream patch
without refreshing the patches.

Fixes: 8a477bafb4 ("rockchip: fix phy reset on rk356x")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17474
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-01-04 00:54:47 +01:00
Álvaro Fernández Rojas
0eeba04a16 generic: 6.6: backport upstream r8169 patches
7a3bcd39ae1f r8169: use helper r8169_mod_reg8_cond to simplify rtl_jumbo_config
e3e9e9039fa6 r8169: align WAKE_PHY handling with r8125/r8126 vendor drivers
330dc2297c82 r8169: improve rtl_set_d3_pll_down
c507e96b5763 r8169: improve __rtl8169_set_wol
83cb4b470c66 r8169: remove leftover locks after reverted change
2cd02f2fdd8a r8169: improve initialization of RSS registers on RTL8125/RTL8126
a3d8520e6a19 r8169: align RTL8126 EEE config with vendor driver
4af2f60bf737 r8169: align RTL8125/RTL8126 PHY config with vendor driver
eb90f876b796 r8169: align RTL8125 EEE config with vendor driver
b8bd8c44a266 r8169: fix inconsistent indenting in rtl8169_get_eth_mac_stats
f75d1fbe7809 r8169: add support for RTL8125D
c4e64095c00c r8169: enable EEE at 2.5G per default on RTL8125B
d64113c6bb5e r8169: remove rtl_dash_loop_wait_high/low
1c105bacb160 r8169: avoid duplicated messages if loading firmware fails and switch to warn level
ac48430368c1 r8169: don't take RTNL lock in rtl_task()
e3fc5139bd8f r8169: implement additional ethtool stats ops
b8bf38440ba9 r8169: enable SG/TSO on selected chip versions per default
854d71c555df r8169: remove original workaround for RTL8125 broken rx issue
1ffcc8d41306 r8169: add support for the temperature sensor being available from RTL8125B

The following patches require backporting additional linux patches:
e2015942e90a r8169: replace custom flag with disable_work() et al
e340bff27e63 r8169: copy vendor driver 2.5G/5G EEE advertisement constraints

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-01-04 00:41:05 +01:00
Álvaro Fernández Rojas
fedb1f86b5 generic: 6.6: backport upstream Realtek PHY patches
8989bad54113 net: phy: realtek: add RTL8125D-internal PHY
f87a17ed3b51 net: phy: realtek: merge the drivers for internal NBase-T PHY's

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-01-04 00:37:21 +01:00
Felix Fietkau
2b70b32aef kernel: add workaround for page_pool_release warnings
defer_list skbs held by NAPI can block releasing page pools.
Work around this by scheduling rx softirq on all CPUs while trying to release
a page pool.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-01-03 20:23:08 +01:00
Tianling Shen
8a477bafb4 rockchip: fix phy reset on rk356x
The commit 7160820d742a ("phy: rockchip: naneng-combphy: fix phy reset")
was backported to kernel 6.6 branch by upstream, however the correspond
dtsi fixes was not, resulting the following error:
```
[    0.225521] rockchip-naneng-combphy fe830000.phy: error -ENOENT: failed to get phy reset
[    0.227467] rockchip-naneng-combphy fe840000.phy: error -ENOENT: failed to get phy reset
```

So backport the dtsi fixes here manually.

Fixes: 89b2356b8c ("kernel: bump 6.6 to 6.6.69")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/17468
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-01-03 15:59:25 +01:00
Florian Maurer
b2b6955f80 ipq40xx: fix label MAC address for FritzBox 7520/7530
The MAC address of the GMAC is contained inside the CWMP-Account number on the label.

Similar fix as to the 4040 in b22d382ae4
Link #13240

Signed-off-by: Florian Maurer <f.maurer@outlook.de>
Link: https://github.com/openwrt/openwrt/pull/17467
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-01-03 15:48:33 +01:00
Felix Fietkau
65aff89f64 mt76: update to Git HEAD (2025-01-03)
46715044ecd2 wifi: mt76: mt7996: implement driver specific get_txpower function
959a2d40007f wifi: mt76: mt7996: initialize phy txpower

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-01-03 11:06:25 +01:00
James Sweeney
0b54029a6e realtek: add 1920-24g-poe-180w to mac address
Add 1920-24g-poe-180w to the mac address retrieval part of 02_network to
properly set the device's port MAC addresses.

This piece was missed when this device was added.

Fixes: b948c1e39b ("realtek: add support for HPE 1920-24G PoE-180W (JG925A)")
Link: https://github.com/openwrt/openwrt/pull/17460
Signed-off-by: James Sweeney <code@swny.io>
2025-01-03 10:15:10 +01:00
John Audia
89b2356b8c kernel: bump 6.6 to 6.6.69
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.69

All patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17459
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-01-02 20:56:33 +01:00
Tony Ambardar
389dd8dcf6 strace: Update to version 6.12
Release Notes:
https://github.com/strace/strace/releases/tag/v6.12

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/17457
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-01-02 20:52:14 +01:00
Felix Fietkau
f0df6e3a4a ubus: update to Git HEAD (2025-01-02)
d996988ae55b libubus: close file descriptor after sending it from a request
afa57cce0aff libubus: add support for using channels

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-01-02 14:08:59 +01:00
Sander Vanheule
a3391d871d realtek: drop extraneous ')' in 02_network
The extraneous closing parenthesis inside the case matching breaks
syntax of the network initialization script 02_network.

/bin/board_detect: /etc/board.d/02_network:
    line 40: syntax error: unexpected newline (expecting ")")

Remove this character so board init is functional again.

Fixes: c8ea1aa970 ("realtek: add support for HPE 1920-24G-PoE-370w")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2025-01-02 09:45:12 +01:00
Linus Walleij
2456a2fd7f ixp4xx: Break out mv88e6060 DSA switch to package
Just one of the devices uses the Marvell MV88E6060 DSA
switch so break this out from the generic kernel config
and into a package selected only by that single device
and probed at boot instead.

The big win is from being able to drop the dsa_core
(~600KB) kernel module out of the common kernel on
devices with no DSA switch.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-01-02 02:30:24 +01:00
Linus Walleij
804bc79ed0 ixp4xx: Add LEDs to supported devices
This adds the OpenWrt-only LED aliases to the supported IXP4xx
devices.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-01-02 02:30:01 +01:00
Linus Walleij
d15da125eb ixp4xx: Support single zcom_npe_esa hw address
Some ixp4xx platforms with a proper RedBoot config do not
contain the per-ethernet interface npe_eth0_esa, but rather
a single entry named zcom_npe_esa.

Let's use this if fconfig can't find the primary key.
This is needed on the Netgear WG302 v1.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-01-02 02:29:51 +01:00
Linus Walleij
6e2a842d62 ixp4xx: Support sysupgrade on WG302 v1
The WG302 v1 have a separate rootfs partition that we
simply just upgrade with a new rootfs image. The kernel
need to be updated on the TFTP server.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-01-02 02:29:44 +01:00
Linus Walleij
0fda3b14c7 ixp4xx: Add back support for Netgear WG302 v1
The WG302 v1 has 32MB of RAM so it can easily run OpenWrt,
however it lacks much flash: only 8 MB.

By just using the flash for rootfs and booting a kernel over
TFTP it works just fine.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-01-02 02:29:37 +01:00
James Sweeney
b948c1e39b realtek: add support for HPE 1920-24G PoE-180W (JG925A)
Hardware information: (largely copied from 11275be)
---------------------

The HPE 1920-24G-PoE+ (180W) (JG925A) is a switch that is
part of the 1920 family which has 180W nominal PoE+ support.

Common with HPE 1920-24G:
- RTL8382 SoC
- 24 Gigabit RJ45 ports (built-in RTL8218B, 2 external RTL8218D)
- 4 SFP ports (external RTL8214FC)
- RJ45 RS232 port on front panel
- 32 MiB NOR Flash
- 128 MiB DDR3 DRAM
- PT7A7514 watchdog

HPE 1920-24G-PoE+ (180W):
- PoE chip
- 2 fans (40mm)

Known issues:
---------------------
- PoE LEDs are uncontrolled.

(Manual taken from f2f09bc)
Booting initramfs image:
------------------------

- Prepare a FTP or TFTP server serving the OpenWrt initramfs image and
connect the server to a switch port.

- Connect to the console port of the device and enter the extended
boot menu by typing Ctrl+B when prompted.

- Choose the menu option "<3> Enter Ethernet SubMenu".

- Set network parameters via the option "<5> Modify Ethernet Parameter".
Enter the FTP/TFTP filename as "Load File Name" ("Target File Name"
can be left blank, it is not required for booting from RAM). Note that
the configuration is saved on flash, so it only needs to be done once.

- Select "<1> Download Application Program To SDRAM And Run".

Initial installation:
---------------------

- Boot an initramfs image as described above, then use sysupgrade to
install OpenWrt permanently. After initial installation, the
bootloader needs to be configured to load the correct image file

- Enter the extended boot menu again and choose "<4> File Control",
then select "<2> Set Application File type".

- Enter the number of the file "openwrt-kernel.bin" (should be 1), and
use the option "<1> +Main" to select it as boot image.

- Choose "<0> Exit To Main Menu" and then "<1> Boot System".

NOTE: The bootloader on these devices can only boot from the VFS
filesystem which normally spans most of the flash. With OpenWrt, only
the first part of the firmware partition contains a valid filesystem,
the rest is used for rootfs. As the bootloader does not know about this,
you must not do any file operations in the bootloader, as this may
corrupt the OpenWrt installation (selecting the boot image is an
exception, as it only stores a flag in the bootloader data, but doesn't
write to the filesystem).

Example PoE config file (/etc/config/poe):
---------------------
config global
        option budget   '180'

config port
        option enable   '1'
        option id       '1'
        option name     'lan8'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '2'
        option name     'lan7'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '3'
        option name     'lan6'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '4'
        option name     'lan5'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '5'
        option name     'lan4'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '6'
        option name     'lan3'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '7'
        option name     'lan2'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '8'
        option name     'lan1'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '9'
        option name     'lan16'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '10'
        option name     'lan15'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '11'
        option name     'lan14'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '12'
        option name     'lan13'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '13'
        option name     'lan12'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '14'
        option name     'lan11'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '15'
        option name     'lan10'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '16'
        option name     'lan9'
        option poe_plus '1'
        option priority '2'

config port
        option enable   '1'
        option id       '17'
        option name     'lan24'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '18'
        option name     'lan23'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '19'
        option name     'lan22'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '20'
        option name     'lan21'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '21'
        option name     'lan20'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '22'
        option name     'lan19'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '23'
        option name     'lan18'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '24'
        option name     'lan17'
        option poe_plus '1'
        option priority '2'

Signed-off-by: James Sweeney <code@swny.io>
Link: https://github.com/openwrt/openwrt/pull/17444
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2025-01-01 22:32:10 +01:00
Jonathan Sturges
f8a8a2c5c7 ramips: mt7621: enable lzma-loader for Amped Wireless ALLY
Switch to using loader-kernel to accommodate
larger image sizes that are problematic for
many mt7621 uboots.

Signed-off-by: Jonathan Sturges <jsturges@redhat.com>
Link: https://github.com/openwrt/openwrt/pull/17389
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-01-01 21:28:01 +01:00
Sander Vanheule
777c6106ed realtek: move debounce-interval to correct node
The debounce-interval of a gpio-keys node should be placed in the key
node itself, not in the main node. Move the properties added earlier and
fix the key node name while we're here.

Fixes: 4357f32d41 ("realtek: debounce reset key for Zyxel GS1900")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2025-01-01 20:36:44 +01:00
John Audia
ae0fd92699 bcm27xx/bcm2712: add RP1 camera front-end
Add kmod for RP1 camera front-end for RPi5B

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17412
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-01-01 20:32:16 +01:00
Roland Reinl
616621120b mediatek: Fix primary MAC of D-Link M60
During port to gluon, I saw that the primary mac is not correct. Updated DTS accordingly.

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17429
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-01-01 17:28:01 +01:00
Tianling Shen
6881b48dc6 rockchip: enable USB3 port on NanoPC T6
Enable the USB3 port on FriendlyELEC NanoPC-T6.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/17349
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-01-01 14:11:55 +01:00
Tianling Shen
8ad02ca2f8 rockchip: backport recent rk3588 clk updates
Backport recent rk3588 clk updates from upstream,
including one bug fix.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/17349
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-01-01 14:11:55 +01:00
Robert Marko
72b5935956 Revert "mac80211: remove ath9k_platform_data"
This reverts commit fdc2c6ab99.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-01-01 11:22:40 +01:00
Robert Marko
be3bc3df90 Revert "kernel: remove custom ath9k_platform.h"
This reverts commit da0016b274.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-01-01 11:22:39 +01:00
Robert Marko
caee153f8d Revert "mac80211: ath9k: remove platform leds"
This reverts commit ad2e55e02b.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-01-01 11:22:37 +01:00
Robert Marko
04601004be Revert "mac80211: ath9k: clean up gpiochip"
This reverts commit 2af552372d.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-01-01 11:22:30 +01:00
Sander Vanheule
4357f32d41 realtek: debounce reset key for Zyxel GS1900
When the reset button is next to the SFP cages, I2C operations on the
modules might cause interference on the button's GPIO line. Add a
debounce-interval of 5 times the poll-interval to ensure the line is
actually stable for some time and not just glitching.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2025-01-01 11:06:08 +01:00
Paweł Owoc
adfb1b7696 qualcommax: ipq807x: add support for Linksys MX4300 (LN1301)
Hardware specification:
========
SoC: Qualcomm IPQ8174
Flash: 1GB (Micron MT29F8G08ABBCAH4 or AMD/Spansion S34MS08G2)
RAM: 2GB (2x Kingston B5116ECMDXGJD or ESMT M15T2G16128A DDR3L)
Ethernet: 4x 10/100/1000Mbps (Qualcomm QCA8075)
WiFi1: 5GHz ax 2x2 (Qualcomm QCN5054 + Skyworks SKY85755-11) - channels 36-64 (low band)
WiFi2: 2.4GHz ax 2x2 (Qualcomm QCN5024 + Skyworks SKY85340-11)
WiFi3: 5GHz ax 4x4 (Qualcomm QCN5054 + Skyworks SKY85755-11) - channels 100-177 (high band)
LED: 1x RGB status (NXP PCA9633)
USB: 1x USB 3.0
Button: WPS, Reset

Flash instructions:
========
1. Manually upgrade firmware using openwrt-qualcommax-ipq807x-linksys_mx4300-squashfs-factory.bin image.
More details can be found here: https://support.linksys.com/kb/article/6564-en/
After first boot check actual partition:
- fw_printenv -n boot_part
and install firmware on second partition using command in case of 2:
- mtd -r -e kernel -n write openwrt-qualcommax-ipq807x-linksys_mx4300-squashfs-factory.bin kernel
and in case of 1:
- mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx4300-squashfs-factory.bin alt_kernel

2. Installation using serial connection from OEM firmware (default login: root, password: admin):
- fw_printenv -n boot_part
In case of 2:
- flash_erase /dev/mtd21 0 0
- nandwrite -p /dev/mtd21 openwrt-qualcommax-ipq807x-linksys_mx4300-squashfs-factory.bin
or in case of 1:
- flash_erase /dev/mtd23 0 0
- nandwrite -p /dev/mtd23 openwrt-qualcommax-ipq807x-linksys_mx4300-squashfs-factory.bin
After first boot install firmware on second partition:
- mtd -r -e kernel -n write openwrt-qualcommax-ipq807x-linksys_mx4300-squashfs-factory.bin kernel
or:
- mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx4300-squashfs-factory.bin alt_kernel

3. Installation from initramfs image using USB drive:
Put the initramfs image on the USB drive:
- dd bs=1M if=openwrt-qualcommax-ipq807x-linksys_mx4300-initramfs-uImage.itb of=/dev/sdX
Stop u-boot and run:
- usb start && usbboot $loadaddr 0 && bootm $loadaddr
Write firmware to the flash from initramfs:
- mtd -e kernel -n write openwrt-qualcommax-ipq807x-linksys_mx4300-squashfs-factory.bin kernel
and:
- mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx4300-squashfs-factory.bin alt_kernel

4. Back to the OEM firmware:
- mtd -e kernel -n write FW_MX4300_1.0.4.215382_prod.img kernel
and:
- mtd -r -e alt_kernel -n write FW_MX4300_1.0.4.215382_prod.img alt_kernel

5. USB recovery:
Put the initramfs image on the USB:
- dd bs=1M if=openwrt-qualcommax-ipq807x-linksys_mx4300-initramfs-uImage.itb of=/dev/sdX
Set u-boot env:
- fw_setenv bootusb 'usb start && usbboot $loadaddr 0 && bootm $loadaddr'
- fw_setenv bootcmd 'run bootusb; if test $auto_recovery = no; then bootipq; elif test $boot_part = 1; then run bootpart1; else run bootpart2; fi'

Co-authored-by: Qiyuan Zhang <zhang.github@outlook.com>
Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16070
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-12-31 17:44:10 +01:00
Qiyuan Zhang
d6459091fd mtd: check the return value of malloc and pread
Check the return value of malloc and pread in case they fail.

Signed-off-by: Qiyuan Zhang <zhang.github@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/16070
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-12-31 17:44:10 +01:00
Qiyuan Zhang
f7ee30120f qualcommax: add kernel cmdline replacement hack
Add kernel command line replacement hack to qualcommax. Now we can
find and replace arguments in the kernel command line by setting
bootargs-find-1, bootargs-replace-1, bootargs-exact-match-1
and bootargs-find-2, bootargs-replace-2, bootargs-exact-match-2
under the chosen node in the device tree.

This hack replaces the first occurence of bootargs-find-X with
bootargs-replace-X. When bootargs-exact-match-X is set to "y",
then the replacement happens only if the kernel command line is
identical to bootargs-find-X.

Signed-off-by: Qiyuan Zhang <zhang.github@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/16070
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-12-31 17:44:10 +01:00
Qiyuan Zhang
5b3044e8e3 mtd: fix resetbc on nand w/ min I/O size > 2048
Fix a bug in linksys_bootcount.c that resetbc  won't work on nand
with min I/O size> 2048.

Check the boot-log entry's intergrity with checksum.

Signed-off-by: Qiyuan Zhang <zhang.github@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/16070
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-12-31 17:44:10 +01:00
Paweł Owoc
f96b3383d5 qualcommax: ipq807x: fix mac setup for Linksys MX4200v2
Currently for Linksys MX4200v2 all u-boot ethXaddr variables share the same MAC address
and there is no need to check them one by one.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16070
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-12-31 17:44:10 +01:00
Paweł Owoc
dbafc95cc5 qualcommax: ipq807x: define configuration for Linksys MX4x00 devices
Define shared configuration for Linksys MX4x00 devices.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16070
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-12-31 17:44:10 +01:00
Paweł Owoc
c9b324d3ac qualcommax: ipq807x: create generic Linksys MX4x00 dts
Create a generic Linksys MX4x00 dts file and extract the specific configuration
for MX4200v1/v2 to a new file.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16070
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-12-31 17:44:10 +01:00
Paweł Owoc
738eb514c6 qualcommax: ipq807x: remove unnecessary bootargs-append for MX4200
The default value for the "root" parameter is "/dev/ubiblock0_0"
and there is no need to append it to bootargs.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16070
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-12-31 17:44:10 +01:00
Rosen Penev
e0eca57b6e iproute2: fix GCC14 compilation
Missing limits.h. Upstream backport.

Add extra backports. Replace Alpine Linux patch with upstream one. Same
with patch 400.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17426
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-12-31 13:17:34 +01:00
Evan Jobling
c8ea1aa970 realtek: add support for HPE 1920-24G-PoE-370w
Hardware information:
---------------------

The HPE 1920-24G-PoE+ (370W) (JG926A) is a switch that is
part of the 1920 family wich 370W nominal PoE+ support.

Common with HPE 1920-24G:
  - RTL8382 SoC
  - 24 Gigabit RJ45 ports (built-in RTL8218B, 2 external RTL8218D)
  - 4 SFP ports (external RTL8214FC)
  - RJ45 RS232 port on front panel
  - 32 MiB NOR Flash
  - 128 MiB DDR3 DRAM
  - PT7A7514 watchdog

HPE 1920-24G-PoE+ (370W):
  - PoE chip
  - 3 fans (40mm)

Known issues:
---------------------
- PoE LEDs are uncontrolled.

(Manual taken from f2f09bc)
Booting initramfs image:
------------------------

- Prepare a FTP or TFTP server serving the OpenWrt initramfs image and
  connect the server to a switch port.

- Connect to the console port of the device and enter the extended
  boot menu by typing Ctrl+B when prompted.

- Choose the menu option "<3> Enter Ethernet SubMenu".

- Set network parameters via the option "<5> Modify Ethernet Parameter".
  Enter the FTP/TFTP filename as "Load File Name" ("Target File Name"
  can be left blank, it is not required for booting from RAM). Note that
  the configuration is saved on flash, so it only needs to be done once.

- Select "<1> Download Application Program To SDRAM And Run".

Initial installation:
---------------------

- Boot an initramfs image as described above, then use sysupgrade to
  install OpenWrt permanently. After initial installation, the
  bootloader needs to be configured to load the correct image file

- Enter the extended boot menu again and choose "<4> File Control",
  then select "<2> Set Application File type".

- Enter the number of the file "openwrt-kernel.bin" (should be 1), and
  use the option "<1> +Main" to select it as boot image.

- Choose "<0> Exit To Main Menu" and then "<1> Boot System".

NOTE: The bootloader on these devices can only boot from the VFS
filesystem which normally spans most of the flash. With OpenWrt, only
the first part of the firmware partition contains a valid filesystem,
the rest is used for rootfs. As the bootloader does not know about this,
you must not do any file operations in the bootloader, as this may
corrupt the OpenWrt installation (selecting the boot image is an
exception, as it only stores a flag in the bootloader data, but doesn't
write to the filesystem).

Example PoE config file (/etc/config/poe):
---------------------
config global
        option budget   '370'

config port
        option enable   '1'
        option id       '1'
        option name     'lan8'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '2'
        option name     'lan7'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '3'
        option name     'lan6'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '4'
        option name     'lan5'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '5'
        option name     'lan4'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '6'
        option name     'lan3'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '7'
        option name     'lan2'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '8'
        option name     'lan1'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '9'
        option name     'lan16'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '10'
        option name     'lan15'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '11'
        option name     'lan14'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '12'
        option name     'lan13'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '13'
        option name     'lan12'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '14'
        option name     'lan11'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '15'
        option name     'lan10'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '16'
        option name     'lan9'
        option poe_plus '1'
        option priority '2'

config port
        option enable   '1'
        option id       '17'
        option name     'lan24'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '18'
        option name     'lan23'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '19'
        option name     'lan22'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '20'
        option name     'lan21'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '21'
        option name     'lan20'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '22'
        option name     'lan19'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '23'
        option name     'lan18'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '24'
        option name     'lan17'
        option poe_plus '1'
        option priority '2'

Signed-off-by: Evan Jobling <evan.jobling@mslsc.com.au>
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Link: https://github.com/openwrt/openwrt/pull/17436
[fix space indentation in DTS]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2024-12-31 08:34:38 +01:00
Evan Jobling
41b49a157a realtek: rtl838x: refactor hpe_1920-24g dts
The HPE JG924A, JG925A and JG926A share the same base.
Prepare base device for adding the PoE enabled switch support.

Signed-off-by: Evan Jobling <evan.jobling@mslsc.com.au>
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Link: https://github.com/openwrt/openwrt/pull/17436
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2024-12-31 08:29:56 +01:00
Felix Fietkau
bff5260d7b mt76: update to Git HEAD (2024-12-30)
109114146f9c mt76: only enable tx worker after setting the channel
5fe42ec88fd1 mt76: mt7915: ensure that only one sta entry is active per mac address
1884f568ba02 wifi: mt76: do not add wcid entries to sta poll list during MCU reset
71fa9124d107 wifi: mt76: mt7996: fix NULL pointer dereference in mt7996_mcu_sta_bfer_he
eb85bb3fd5bf wifi: mt76: mt7915: fix eifs value on older chipsets
83e4d4a82e65 wifi: mt76: introduce mt792x_config_mac_addr_list routine
b47e20b440ae wifi: mt76: mt7925: fix NULL deref check in mt7925_change_vif_links
3e3c484726f3 wifi: mt76: mt7925: fix wrong band_idx setting when enable sniffer mode
3f1401a0f035 wifi: mt76: mt7925: fix get wrong chip cap from incorrect pointer
eede99f524e8 wifi: mt76: mt7925: fix the invalid ip address for arp offload
c99e4d51b340 wifi: mt76: mt7996: fix overflows seen when writing limit attributes
af983b2543ed wifi: mt76: mt7915: fix overflows seen when writing limit attributes
af494e2dcc94 wifi: mt76: mt7915: exclude tx backoff time from airtime
6f6a1f7cb381 wifi: mt76: mt7996: exclude tx backoff time from airtime
7f65b1b28b4c wifi: mt76: connac: Extend mt76_connac_mcu_uni_add_dev for MLO
1b5e6abc2e7a wifi: mt76: mt7925: Fix incorrect MLD address in bss_mld_tlv for MLO support
72b4688b3912 wifi: mt76: mt7925: Fix incorrect WCID assignment for MLO
6bd2c044e67a wifi: mt76: mt7925: Fix incorrect WCID phy_idx assignment
1c04e9693466 wifi: mt76: mt7925: fix wrong parameter for related cmd of chan info
01e02947bdbf wifi: mt76: mt7925: Fix CNM Timeout with Single Active Link in MLO
b90b1a1dc71b wifi: mt76: mt7925: Enhance mt7925_mac_link_bss_add to support MLO
53ec7a551f17 wifi: mt76: Enhance mt7925_mac_link_sta_add to support MLO
3c99ef40e0e7 wifi: mt76: mt7925: Update mt7925_mcu_sta_update for BC in ASSOC state
285efc6afaec wifi: mt76: mt7925: Update mt792x_rx_get_wcid for per-link STA
e5c0d1289e6c wifi: mt76: mt7925: Update mt7925_unassign_vif_chanctx for per-link BSS
67dcd5c888c4 wifi: mt76: mt7925: Update secondary link PS flow
fd4d6f87072f wifi: mt76: mt7925: Init secondary link PM state
6d972b5b9d6a wifi: mt76: mt7925: Update mt7925_mcu_uni_[tx,rx]_ba for MLO
3acc6cbb9556 wifi: mt76: mt7925: Cleanup MLO settings post-disconnection
0aab0c61ce92 wifi: mt76: mt7925: Properly handle responses for commands with events
15bead1b0041 wifi: mt76: do not hold queue lock during initial rx buffer alloc
732044a949d5 wifi: mt76: mt7925: config the dwell time by firmware
9ba311ec6afa wifi: mt76: mt7921: introduce CSA support
5d12c7404c22 wifi: mt76: mt7921: add rfkill_poll for hardware rfkill
ef965d408b79 wifi: mt76: mt7925: replace zero-length array with flexible-array member
f8563589c72d wifi: mt76: mt7921u: Add VID/PID for TP-Link TXE50UH

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-12-30 21:28:09 +01:00