Commit Graph

30571 Commits

Author SHA1 Message Date
Rosen Penev
3da8e385e0 mediatek: fix wrong compatible string
The u-boot,env driver does not have layout in compatible.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16616
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-06 21:56:04 +02:00
Goetz Goerisch
cffc52bb9a ramips: ER605v2 fix LED function definition
commit 665c2154ef
added support for ER605v2

All three LEDs where configured with LED_FUNCTION_STATUS
which worked for 23.05 and kernel 5.15.

With the upgrade to kernel 6.6 this leads to a name collision.

Therefore the USB and Power LED now use the common.h function
LED_FUNCTION_USB and LED_FUNCTION_POWER respectivly.

* fixes https://github.com/openwrt/openwrt/issues/16596

Link: https://github.com/openwrt/openwrt/pull/16606
Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16606
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-06 18:58:47 +02:00
Shiji Yang
b62e6f5beb ramips: use OKLI loader for TP-Link RE200 v1 and RE210 v1
Using OKLI image to fix the booting stuck issue.

Tested with u-boot extracted from TP-Link stock images
"RE200(EU)_V1_171206.zip" and "RE210(US_CA)_V1_171205.zip".

Fixes: https://github.com/openwrt/openwrt/issues/16296
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16473
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-06 14:07:37 +02:00
Shiji Yang
08eecec355 ramips: introduce TP-Link v1 header OKLI image recipe
It can be used to workaround the booting stuck issue caused by the
u-boot LZMA decompression error.

The new kernel image structure:
+------+------------------+------------------+---------------+-----------------+
| name | tplink-v1 header | OKLI lzma-loader | uImage header | lzma kernel+dtb |
+------+------------------+------------------+---------------+-----------------+
| size |      0x200       |       0xe00      |     0x40      |     dynamic     |
+------+------------------+------------------+---------------+-----------------+

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16473
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-06 14:07:37 +02:00
Hauke Mehrtens
ca325ee516 gemini: apm821xx: Ignore return value of e2fsck
This fixes the build of the gemini and the apm821xx target.
The e2fsck application returns an error code now and that makes the
build fail. The tune2fs command adds an extra option and the e2fsck
should later fix the file system. It is intentionally broken in this
place.

e2fsprogs was patched before to ignore this error.

Fixes: 95e4664b5e ("tools: e2fsprogs: drop e2fsck patch")
Link: https://github.com/openwrt/openwrt/pull/16607
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-06 03:46:45 +02:00
Hauke Mehrtens
0852d814f0 gemini: Use absolute paths for tools
Use the absolute path to access the e2fsprogs applications. It is also
working with relative paths, but this makes sure that we use our
versions.

Link: https://github.com/openwrt/openwrt/pull/16607
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-06 03:46:45 +02:00
Leo Barsky
3a168e3595 rockchip: config-6.6: remove CONFIG_FORTIFY_SOURCE
The symbol CONFIG_FORTIFY_SOURCE is enable in the generic CONFIG
so remove it from the rockchip CONFIG as is conflicts with the default 'y'
Fixes: https://github.com/openwrt/openwrt/issues/16600

Signed-off-by: Leo Barsky <leobrsky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/16603
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-05 12:52:33 +02:00
John Audia
51db334005 kernel: bump 6.6 to 6.6.54
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.54

Removed upstreamed:
	generic/backport-6.6/780-24-v6.12-r8169-disable-ALDPS-per-default-for-RTL8125.patch[1]
	generic/pending-6.6/360-selftests-bpf-portability-of-unprivileged-tests.patch[2]

Manually rebased:
	bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
	bmips/patches-6.6/200-mips-bmips-automatically-detect-CPU-frequency.patch

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.54&id=50d062b6cc90c45a0de54e9bd9903c82777d66bf
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.54&id=103c0431c7fb4790affea121126840dbfb146341

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: x86/64/AMD Cezanne, 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/16602
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-05 12:43:51 +02:00
Mauri Sandberg
c1c2b61254 ramips: dts: DNA EX400 has redundant type u-boot environment
Set compatible string and specify redundant type U-boot environment.

Fixes: fea2264d9f ("ramips: mt7621: Add DNA Valokuitu Plus EX400")
Signed-off-by: Mauri Sandberg <maukka@ext.kapsi.fi>
Link: https://github.com/openwrt/openwrt/pull/16573
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-05 00:54:44 +02:00
Mauri Sandberg
758f320ebe mt7621: enable CONFIG_MTD_UBI_NVMEM, CONFIG_NVMEM_LAYOUT_U_BOOT_ENV
Enable above drivers for mt7621 targets. They are needed for retrieving a MAC
address stored in a U-boot environment residing on an UBI volume.

Signed-off-by: Mauri Sandberg <maukka@ext.kapsi.fi>
Link: https://github.com/openwrt/openwrt/pull/16573
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-05 00:54:44 +02:00
Rosen Penev
8c36040f04 ath79: rb91x-key: replace fwnode with pdev
There's no specific fwnode handling here. Simpler to just use pdev.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16506
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-03 17:16:50 +02:00
Rosen Penev
dedeb28755 ath79: rb91x-key: use more devm
Use devm_gpiochip_add_data to get rid of the remove function. No need
for it.

Also use dev_err_probe to simplify the error path and avoid having to
handle -EPROBE_DEFER manually.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16506
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-03 17:16:50 +02:00
John Audia
c38f04a092 x86: generic: config-6.6: refresh config
Add CONFIG_ARCH_CONFIGURES_CPU_MITIGATIONS=y which was introduced
back in April of this year[1]

1. ce0abef6a1

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/16535
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-03 16:51:03 +02:00
Rosen Penev
d1157090ff ramips: modernize ralink i2c driver
Use more devm and remove _remove function.

Remove owner as the kernel sets it automatically.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16546
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-03 16:48:29 +02:00
Nikolay Martynov
4705398bbf ramips: rename interfaces for tplink er605v2
Currently eth1 (which is the first "lan" interface) doesn't work on this device.
During boot the following can be seen in logs:

```
[    2.252804] mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
[    2.266060] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 19
[    2.277889] mtk_soc_eth 1e100000.ethernet eth1: mediatek frame engine at 0xbe100000, irq 19
...
[    2.355157] mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
[    2.390312] mt7530-mdio mdio-bus:1f: configuring for fixed/rgmii link mode
[    2.398597] mt7530-mdio mdio-bus:1f: Link is Up - 1Gbps/Full - flow control rx/tx
[    2.403872] mt7530-mdio mdio-bus:1f eth1 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7530 PHY] (irq=21)
[    2.416988] mtk_soc_eth 1e100000.ethernet eth0: error -17 registering interface eth1
[    2.426973] mt7530-mdio mdio-bus:1f eth2 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7530 PHY] (irq=22)
[    2.440996] mt7530-mdio mdio-bus:1f eth3 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7530 PHY] (irq=23)
[    2.454405] mt7530-mdio mdio-bus:1f eth4 (uninitialized): PHY [mt7530-0:04] driver [MediaTek MT7530 PHY] (irq=24)
[    2.467198] mtk_soc_eth 1e100000.ethernet eth0: entered promiscuous mode
[    2.474117] DSA: tree 0 setup
...
[    6.820998] mtk_soc_eth 1e100000.ethernet dsa: renamed from eth0
[    6.919904] mtk_soc_eth 1e100000.ethernet wan: renamed from eth1
```

So the problem seems to be the fact that built-in gmacs get default
names (eth0/eth1) and are renamed after switch ports are initialized. This means
that when switch port with name `eth1` is brought up this name is still used by
gmac1 causing switch port's init to fail.

This patch just renames the ports to avoid name collision.
Note: this will break existing configs for this device because it renames all
the ports. This should not be major problem because this device doesn't have a
proper OEM image and is only flashable with serial access, meaning there should
not be many users.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15865
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-03 16:36:05 +02:00
Álvaro Fernández Rojas
f9a0485c99 generic: backport upstream r8169 patches
These patches have been added in linux v6.12 release.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-10-02 20:30:47 +02:00
Markus Stockhausen
d03f3dcf3b realtek: add support for Linksys LGS310C
Hardware specification
----------------------

* RTL8380M SoC, 1 MIPS 4KEc core @ 500MHz
* 256MB DRAM
* 32MB NOR Flash
* 8 x 10/100/1000BASE-T ports
* 2 x SFP ports
* Power LED, Fault LED
* Reset button on front panel
* UART (115200 8N1) via populated standard pin header marked JP1

TODO: The SFP ports use a shared SCL GPIO that the driver cannot handle.
The left SFP port (lan9) is defined and fully functional while the laser
on the right SFP port (lan10) is off by default.

UART pinout
-----------

[o]ooo|JP1
 | ||`------ GND
 | |`------- RX
 | `-------- TX
 `---------- Vcc (3V3)

Installation using OEM webinterface
-----------------------------------

1. Make sure you are running OEM firmware in secondary slot
2. Install squashfs-factory.imag to primary slot by upload via http

Installation using serial interface
-----------------------------------

1. Press "a" "c" "p" during message "Enter correct key to stop autoboot"
2. Load image with "upgrade runtime <TFTP IP>:squashfs-sysupgrade.bin" command
3. Switch to primary slot with "setsys bootpartition 0"
4. Store config with "savesys"
5. Boot the image with `boota` command

Dual-boot with stock firmware using writable u-boot-env
-------------------------------------------------------

From stock to OpenWrt / primary image 1 (CLI as admin):
   - > boot system image1
   - > reboot

From OpenWrt to stock / boot image 2: (shell as root)
   - # fw_setsys bootpartition 1
   - # reboot

Debrick using serial interface
------------------------------

1. Press "a" "c" "p" during message "Enter correct key to stop autoboot"
2. Load vendor image with "upgrade runtime <TFTP IP>:LGS310xxxxx.imag"
3. switch to primary partition "setsys bootpartition 0"
4. safe config "savesys"

Further documentation
---------------------
See https://openwrt.org/toh/linksys/lgs352c

It has been developed and tested on device with v1 revision.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/16068
[Add missing 'w' in name of firmware partition]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2024-10-02 20:15:21 +02:00
John Crispin
8344ff8524 mediatek: change the the default SUBTARGET to filogic
Signed-off-by: John Crispin <john@phrozen.org>
2024-10-02 15:12:18 +02:00
John Audia
123cb3793f kernel: bump 6.6 to 6.6.53
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.53

All patches automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/glinet_gl-mt6000, flogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: x86/64/AMD Cezanne, flogic/glinet_gl-mt6000, flogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/16554
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-02 00:05:38 +02:00
Aleksander Jan Bajkowski
5ca8a4a03a lantiq: backport latest upstream patches
Backport patch that fixes memory disclosure in packet padding.
The downstream driver supports statistics, so when a packet
cannot be padded the statistics of dropped packets are incremented.
The other patches do not introduce any functional changes.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/16563
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-01 23:47:06 +02:00
Daniel González Cabanelas
04c5c1ff70 bmips: fix kernel panic caused by missing CBR address
The cbr-reg DTS property uses a wrong name causing the RAC kernel
panic again on BCM6358 BCM6368 boards.

Use the correct cbr-reg name property.

Fixes: 7c9644a7b5 ("bmips: backport upstreamed RAC patches")
Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16561
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-01 19:15:45 +02:00
Robert Marko
7e972fe242 generic: backport ("net: free_netdev: exit earlier if dummy")
Currently, when removing ath11k or any other driver that uses dummy netdev
kernel will crash with:
[  365.004961] ------------[ cut here ]------------
[  365.004992] kernel BUG at net/core/dev.c:10979!
[  365.008642] Internal error: Oops - BUG: 00000000f2000800 [#1] SMP
[  365.012898] Modules linked in: pppoe ppp_async nft_fib_inet nf_flow_table_inet ath11k_ahb(O) ath11k(O) pppox ppp_generic nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject nft_redir nft_quota nft_numgen nft_nat nft_masq nft_log nft_limit nft_hash nft_flow_offload nft_fib_c
[  365.064794] CPU: 3 PID: 3896 Comm: procd Tainted: G           O       6.6.52 #0
[  365.087031] Hardware name: QNAP 301w (DT)
[  365.094058] pstate: 20400005 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  365.098229] pc : free_netdev+0x164/0x1a0
[  365.104994] lr : free_netdev+0xec/0x1a0
[  365.109159] sp : ffffffc081d33b90
[  365.112718] x29: ffffffc081d33b90 x28: ffffff80039d3c00 x27: ffffff800307f000
[  365.116199] x26: ffffff800538a000 x25: ffffff8005388000 x24: ffffff800538a4c0
[  365.123317] x23: 00000000000023a4 x22: ffffff8005388f68 x21: ffffff8004e37050
[  365.130434] x20: ffffff8004e37000 x19: ffffff8004e36ee8 x18: 0000000000000152
[  365.137552] x17: 63775f357636712e x16: 3030303030646320 x15: ffffffc081436e20
[  365.144670] x14: ffffff80033f261c x13: 00000000000000d9 x12: 0000000000000002
[  365.151789] x11: 0000000000000000 x10: 00000000000008a0 x9 : ffffffc081d33980
[  365.158906] x8 : ffffff80039d4500 x7 : ffffff803fdda6c0 x6 : 0000000000000007
[  365.166025] x5 : 0000000000000000 x4 : 00000000000000c1 x3 : 00000000000001f4
[  365.173143] x2 : ffffff803fdd4b78 x1 : ffffff8004e37050 x0 : 0000000000000005
[  365.180261] Call trace:
[  365.187370]  free_netdev+0x164/0x1a0
[  365.189630]  0xffffffc079b373f0
[  365.193447]  0xffffffc079b374c0
[  365.196311]  platform_shutdown+0x24/0x34
[  365.199438]  device_shutdown+0x160/0x268
[  365.203605]  kernel_restart+0x40/0xc0
[  365.207510]  __do_sys_reboot+0x104/0x220
[  365.211070]  __arm64_sys_reboot+0x24/0x30
[  365.215063]  invoke_syscall.constprop.0+0x5c/0x108
[  365.218971]  do_el0_svc+0x40/0xc8
[  365.223655]  el0_svc+0x30/0xb8
[  365.227041]  el0t_64_sync_handler+0x120/0x12c
[  365.229995]  el0t_64_sync+0x178/0x17c
[  365.234424] Code: f94013f5 a8c37bfd d50323bf d65f03c0 (d4210000)
[  365.238072] ---[ end trace 0000000000000000 ]---

Wireless backports include alloc_netdev_dummy() backport but they dont have
the required free_netdev change first, so backport it.

Fixes: #16531
Fixes: 384d079fd8 ("mac80211: update to version 6.11")
Link: https://github.com/openwrt/openwrt/pull/16549
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-30 21:12:00 +02:00
Daniel Golle
3f98f68573 mediatek: filogic: select MT7996 2+3+3 firmware
Select MT7996 2+3+3 firmware for the Adtran SmartRG SDG-8733A device
and also add it to the image for the BPi-R4 which supports both,
BE19000 (4+5+5) as well as BE14000 (2+3+3) Wi-Fi 7 modules.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-09-29 23:04:34 +01:00
Rosen Penev
fb3d681783 ramips: mtk_eth_soc: don't allocate 4 queues
This driver does not support more than 1 queue.

Fixes: ba24b94e0b ("ramips: use more devm in mtk_eth_soc")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-09-29 07:46:33 +08:00
Tianling Shen
17ea41eabb kernel: make 'no port node found' output a debug message
There are cases where an unavailable port is not an error, making
this error message a false-positive. The kernel log is flooded with
the messages like:
  OF: graph: no port node found in /soc@0/bus@42000000/i2c@42530000/usb-typec@50

Silence this message by making it a debug message.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/16524
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-28 18:47:42 +02:00
Mieczyslaw Nalewaj
9c413397d9 ath79: Refresh kernel patches
Make the patches apply cleanly again.

Fixes: 774badd8a8 ("kernel: fix crashes after linearizing fraglist GSO skbs")
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16517
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-27 00:01:55 +02:00
Felix Fietkau
7ea086bb89 mediatek: remove "Ralink" from the target name
None of the supported chips have been sold under the Ralink brand.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-09-26 15:05:27 +02:00
Felix Fietkau
774badd8a8 kernel: fix crashes after linearizing fraglist GSO skbs
This fixes some corner cases triggered by enabling fraglist GRO, where some
protocols may accidentally or intentionally linearize fraglist skbs.
Previously, these skbs became unusable and segmenting them led to crashes.
With this patch, they are properly handled by passing them to skb_segment
instead of skb_segment_list.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-09-26 11:00:26 +02:00
Felix Fietkau
d23e0a0086 kernel: backport MHI patch required by an upcoming mac80211 update
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-09-26 10:55:11 +02:00
Rosen Penev
ba24b94e0b ramips: use more devm in mtk_eth_soc
These got added to the kernel after this driver was written.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16415
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-25 23:16:50 +02:00
Rosen Penev
65ed475450 ath79: gpio-latch-mikrotik: remove fwnode
Not needed. Can just use dev.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16350
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-25 22:56:56 +02:00
Rosen Penev
c4f2626694 ath79: gpio-latch-mikrotik: remove _remove
Not needed with devm.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16350
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-25 22:56:56 +02:00
Rosen Penev
1e8dde776a ath79: gpio-latch-mikrotik: use dev_err_probe
It automatically adds the error code at the end of the message. It also
deals with -EPROBE_DEFER automatically (doesn't output). Simpler code.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16350
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-25 22:56:56 +02:00
Luiz Angelo Daros de Luca
23ac1ad951 realtek: d-link: add support for dgs-1210-28p-f
General hardware info:
----------------------

D-Link DGS-1210-28P rev. F1 is a switch with 24 ethernet ports and 4
combo ports, all ports Gbit capable. It is based on a RTL8382 SoC
@500MHz, DRAM 128MB and 32MB flash. 24 ethernet ports are 802.3af/at PoE
capable with a total PoE power budget of 193W.

Power over Ethernet:
--------------------

The PSE hardware consists of three BCM59121 PSE chips, serving 8 ports
each. They are controlled by a Nuvoton MCU.  In order to enable PoE, the
realtek-poe package is required. It is installed by default, but
currently it requires the manual editing of /etc/config/poe. Keep in
mind that the port number assignment does not match on this switch,
alway 8 ports are in reversed order: 8-1, 16-9 and 24-17.

LEDs and Buttons:
-----------------

On stock firmware, the mode button is supposed to switch the LED
indicators of all port LEDs between Link Activity and PoE status. The
currently selected mode is visualized using the respective LEDs. PoE Max
indicates that the maximum PoE budget has been reached.  Since there is
currently no support for this behavior, these LEDs and the mode button
can be used independently.

Serial connection:
------------------
The UART for the SoC (115200 8N1) is available via unpopulated standard
0.1" pin header marked J6. Pin1 is marked with arrow and square.

Pin 1: Vcc 3.3V
Pin 2: Tx
Pin 3: Rx
Pin 4: Gnd

OEM installation from Web Interface:
------------------------------------

    1. Make sure you are booting using OEM in image 2 slot. If not,
       switch to
        image2 using the menus
        System > Firmware Information > Boot from image2
        Tools > reboot
    2. Upload image in vendor firmware via Tools > Backup / Upgrade
        Firmware > image1
    3. Toggle startup image via System > Firmware Information > Boot
       from
        image1
    4. Tools > reboot

Other installation methods not tested, but since the device shares the
board with the DGS-1210-28, the following should work:

Boot initramfs image from U-Boot:
---------------------------------

    1. Press Escape key during `Hit Esc key to stop autoboot` prompt
    2. Press CTRL+C keys to get into real U-Boot prompt
    3. Init network with `rtk network on` command
    4. Load image with `tftpboot 0x8f000000
        openwrt-rtl838x-generic-d-link_dgs-1210-28p-f-initramfs-kernel.bin`
        command
    5. Boot the image with `bootm` command

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15938
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2024-09-24 20:59:50 +02:00
Rodrigo Balerdi
3b221ba5af ipq807x: sax1v1k: fix sysupgrade not touching rootfs_data
Before this commit, sysupgrade saved the settings backup data to
the area following rootfs even though the device has an actual
rootfs_data partition. The backup data was completely ignored on
the following boot, but since rootfs_data was not being cleared
during sysupgrade, the issue was not noticed earlier.

Note that this commit changes the filesystem of rootfs_data from
ext4 to F2FS (if OEM partitioning is used).

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16463
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-24 00:07:55 +02:00
Tianling Shen
76a75b43ba rockchip: add ArmSoM Sige7 support
This board is also as known as Bananapi BPi-M7.

Hardware
--------
RockChip RK3588 ARM64 (8 cores)
8/16/32GB LPDDR4/LPDDR4x RAM
2x 2500 Base-T (PCIe, rtl8125b)
2 LEDs (RED / GREEN)
16GB/32GB/64GB/128GB eMMC on-board
Micro-SD Slot
USB 2.0 Port
USB 3.0 Port
M.2 M-Key
40-Pin Header
USB PD 2.0 9/12/15V Power

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>
Link: https://github.com/openwrt/openwrt/pull/16462
Signed-off-by: Nick Hainke <vincent@systemli.org>
2024-09-23 20:04:50 +02:00
Tianling Shen
e05b24175d rockchip: reorder nanopc t6 patches
Reorder nanopc t6 patches to 055 to avoid conflict with nanopi r6c patches.

Fixes: 55c46cbabd ("rockchip: add FriendlyElec NanoPi R6C")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/16461
Signed-off-by: Nick Hainke <vincent@systemli.org>
2024-09-23 19:36:33 +02:00
Robert Marko
7f46e231eb generic: phy: aquantia: fix MDI pair property parsing
of_property_read_u32 returns -EINVAL when property does not exist,
according to the documentation -ENOENT is not a valid return code.

So, instead of checking for -ENOENT check for -EINVAL as otherwise the
blamed commit breaks AQR probe since it will return -EINVAL during probe.

Fixes: cb2a11f49c ("generic: phy: aquantia: add pending patch to force MDI pair order")
Link: https://github.com/openwrt/openwrt/pull/16466
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-23 18:38:44 +02:00
John Audia
2eb39308c9 x86: generic: disable rust support
Add missing ksym CONFIG_RUST

Building r27563 without this commit will fail due to this ksym
being undefined in the generic config.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/16464
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-23 15:51:13 +02:00
Shiji Yang
04bdf9b332 ath79: disable ath79 USB phy drivers by default
We already have an kernel module package "kmod-phy-ath79-usb" to
drive the ath79 USB. It will be selected by the usb base package
"kmod-usb2" and "kmod-usb-ohci".

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16380
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-22 23:58:47 +02:00
Chris Webb
7eda44f536 uboot-mediatek: support GL.iNet GL-X3000 and GL-XE3000
Add u-boot support based on the kernel dts introduced in d1016446 and
the GL-MT6000 u-boot support in fe10f974.

The pcie-mediatek-gen3 kernel driver doesn't like hotplug, so to work in
PCIe mode, the 5G modem on this device needs to be switched on by u-boot
before starting the kernel. Include an init_modem step in the boot_system
action to set the relevant gpios. (The factory bootloader does the same,
using Mediatek SDK-specific gpio_power_clr and gpio_pull_up.)

Ideally the modem would be started using gpio-hog in the device tree, but
this will need to wait until mediatek gpio-hog support is fixed upstream:

  https://lore.kernel.org/u-boot/6ef2583e85eea60560d7776377d662779e7c44e5.1722419839.git.chris@arachsys.com/

The bootloader can be replaced using the built-in web interface of the
factory bootloader. Hold the reset button for five seconds while powering
on the device and it will boot into a recovery http server.

http://192.168.1.1/uboot.html and http://192.168.1.1/bl2.html can then
be used to upload openwrt-mediatek-filogic-glinet_gl-x3000-bl31-uboot.fip
and openwrt-mediatek-filogic-glinet_gl-x3000-preloader.bin respectively.

Alternatively, from a root shell on the running system, unlock the boot
partition with

  echo 0 >/sys/block/mmcblk0boot0/force_ro

then write openwrt-mediatek-filogic-glinet_gl-x3000-bl31-uboot.fip to
/dev/mmcblk0p4 and openwrt-mediatek-filogic-glinet_gl-x3000-preloader.bin
to /dev/mmcblk0boot0.

Signed-off-by: Chris Webb <chris@arachsys.com>
Link: https://github.com/openwrt/openwrt/pull/15645
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-22 23:50:40 +02:00
Alan Luck
a1a8cd8282 ramips: Add support for D-Link DIR-2150-R1
Hardware Specification:
SoC: Mediatek MT7621DAT (MIPS1004Kc 880 MHz, dual core)
RAM: 128 MB
Storage: 128 MB NAND flash
Ethernet: 5x 10/100/1000 Mbps LAN1,LAN2,LAN3,LAN4 & WAN
Wireless: 2.4GHz: Mediatek MT7603EN up to 300Mbps (802.11b/g/n MIMO 2x2)
Wireless: 5GHz: Mediatek MT7615N up to 1733Mbps (802.11n/ac MU-MIMO 4x4)
LEDs: Power (white & amber), Internet (white & amber)
LEDs: 2.4G (White), 5Ghz (White)
Buttons: WPS, Reset
USB: Front V3.0 & Rear V2.0

MAC Table
Label xx:xx:xx:xx:xx:38
LAN xx:xx:xx:xx:xx:39
2.4Ghz xx:xx:xx:xx:xx:3A
5Ghz xx:xx:xx:xx:xx:3C
WAN xx:xx:xx:xx:xx:38

Flash Instructions:
D-Link normal OEM firmware update page
1. upload OpenWRT factory.bin like any D-Link upgrade image

D-Link Fail Safe GUI:
1. Push and hold reset button (on the bottom of the device) until power led starts flashing (about 10 secs or so) while plugging in the power cable.
2. Give it ~30 seconds, to boot the fail safe GUI
3. Connect your client computer to LAN1 of the device
4. Set your client IP address manually to 192.168.0.2 / 255.255.255.0
5. Call the fail safe page for the device at http://192.168.0.1/
6. Use the provided fail safe web GUI to upload the factory.bin to the device

Signed-off-by: Alan Luck <luckyhome2008@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16269
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-22 19:38:21 +02:00
Shiji Yang
656c9847d5 ramips: add back the missing periph clock for Ralink RT3883
periph clock is the parent clock of some other clocks.

Link: https://lore.kernel.org/all/CAMhs-H_NS-n2tx5SZpCMiVZtBFzX_nTa_vnS8We0UevkwFq93Q@mail.gmail.com/
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16318
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-22 19:12:16 +02:00
Shiji Yang
285f87d2c7 ramips: merge dtsi included file for Belkin F9K1109
Only one device uses the dtsi file "rt3883_belkin_f9k110x.dtsi".
So there is no need to split the device tree.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16318
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-22 19:12:16 +02:00
Shiji Yang
4069233936 ramips: disable 2 GHz band for Belkin F9K1109 V1
2 GHz WiFi doesn't work on the wmac of this device.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16318
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-22 19:12:16 +02:00
Mieczyslaw Nalewaj
13aa1fad5d generic: mtd: spinand: winbond: more serial NAND flash types
Add support for W25N01JW, W25N02JWZEIF, W25N512GW, W25N02KWZEIR and W25N01GWZEIG.
Add support for W25N04KV.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16272
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-22 19:03:22 +02:00
Yahor Leonenka
0f0aadcff4 ramips: Add support for Ruijie RG-EW1200G PRO v1.1
SoC: MediaTek MT7621
    Flash: 16MB (Macronix MX25L12805D)
    RAM: 128MB
    Serial: As marked on PCB, baudrate is 57600, DO NOT CONNECT 3.3V!!!
    Ethernet: 4x 10/100/1000 Mbps (3x LAN + WAN)
    WIFI0: MT7615 2.4GHz 802.11b/g/n
    WIFI1: MT7615 5GHz 802.11ac
    Antennas: 6x external (3 per radio), non-detachable
    LEDs: Programmable power-LED (blue-colored)
    Buttons: Reset

INSTALLATION:

    Get rootshell using insructions from https://gist.github.com/ZIKH26/18693c67ee7d2f8d2c60231b19194c37

    Download and flash image
    On computer:
    python -m http.server
    On router:
    cd /tmp
    wget http://:8000/factory.bin
    mtd -r write factory.bin firmware

Device should reboot at this point.

Reverting to stock:
Download archive with firmware from Ruijie's site and
get .bin file from it. Then write that binary to firmware
partition. After reboot, factory-reset the router using
reset button.

Signed-off-by: Yahor Leonenka <staryjakau@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16202
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-22 18:59:54 +02:00
INAGAKI Hiroshi
9415d7861e ramips: add support for ELECOM WSC-X1800GS
ELECOM WSC-X1800GS is a 2.4/5 GHz band 11ax (Wi-Fi 6) mesh extender,
based on MT7621A

Specification:

- SoC             : MediaTek MT7621A
- RAM             : DDR3 512 MiB (Nanya NT5CC256M16ER-EK)
- Flash           : RAW-NAND 128 MiB (Winbond W29N01HVSINF)
- WLAN            : 2.4/5 GHz 2T2R (MediaTek MT7915D + MT7975D)
- Ethernet        : 2x 10/100/1000 Mbps
  - switch        : MediaTek MT7530 (SoC)
- LEDs/Keys (GPIO): 9x/2x
- UART            : through-hole on PCB ("J4")
  - arrangement   : 3.3V, GND, TX, RX from tri-angle marking
  - settings      : 115200n8
- Power           : 12 VDC, 1 A (Max. 10.5 W)

Flash instruction using initramfs-factory image

1. Boot WMC-X1800GST normally
2. Access to "http://192.168.2.1/" and open firmware update page
   ("ファームウェア更新")
3. Select the OpenWrt initramfs-factory image and click apply ("適用")
   button
4. On initramfs image, download sysupgrade image to the device and
   perform sysupgrade with that image
5. Wait ~120 seconds to complete flashing

Notes:

- The "firmware" partition on the stock image is only 0xF00000 (15 MiB)
  and it's too small for the current OpenWrt firmware with UBI format.
  So use the unused area at the end of NAND flash for rootfs (UBI).

MAC addresses:

LAN    : 04:AB:18:xx:xx:6E (Factory, 0x3fff4 (hex))
2.4 GHz: 04:AB:18:xx:xx:6F (Factory, 0x3fffa (hex))
5 GHz  : 04:AB:18:xx:xx:70 (Factory,     0x4 (hex))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16384
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-22 18:52:07 +02:00
INAGAKI Hiroshi
9e906c875b ramips: add support for ELECOM WMC-X1800GST
ELECOM WMC-X1800GST is a 2.4/5 GHz band 11ax (Wi-Fi 6) mesh router,
based on MT7621A

Specification:

- SoC             : MediaTek MT7621A
- RAM             : DDR3 512 MiB (Nanya NT5CC256M16ER-EK)
- Flash           : RAW-NAND 128 MiB (Winbond W29N01HVSINF)
- WLAN            : 2.4/5 GHz 2T2R (MediaTek MT7915D + MT7975D)
- Ethernet        : 3x 10/100/1000 Mbps
  - switch        : MediaTek MT7530 (SoC)
- LEDs/Keys (GPIO): 9x/5x
- UART            : through-hole on PCB ("J4")
  - arrangement   : 3.3V, GND, TX, RX from tri-angle marking
  - settings      : 115200n8
- Power           : 12 VDC, 1 A (Max. 11.5 W)

Flash instruction using initramfs-factory image

1. Boot WMC-X1800GST normally with "Router" mode
2. Access to "http://192.168.2.1/" and open firmware update page
   ("ファームウェア更新")
3. Select the OpenWrt initramfs-factory image and click apply ("適用")
   button
4. On initramfs image, download sysupgrade image to the device and
   perform sysupgrade with that image
5. Wait ~120 seconds to complete flashing

Notes:

- The "firmware" partition on the stock image is only 0xF00000 (15 MiB)
  and it's too small for the current OpenWrt firmware with UBI format.
  So use the unused area at the end of NAND flash for rootfs (UBI).

MAC addresses:

LAN    : 04:AB:18:xx:xx:BF (Factory, 0x3fff4 (hex))
WAN    : 04:AB:18:xx:xx:C0 (Factory, 0x3fffa (hex))
2.4 GHz: 04:AB:18:xx:xx:C1 (Factory,     0x4 (hex))
5 GHz  : 04:AB:18:xx:xx:C2

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16384
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-22 18:52:07 +02:00
Oskari Lemmela
cf8d32745e ath79: qca955x ag71xx upstream driver fix
Fix mdio probe in qca95xx devices and add mandatory clocks to dtsi

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
Link: https://github.com/openwrt/openwrt/pull/15926
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-22 18:42:58 +02:00