Commit Graph

30486 Commits

Author SHA1 Message Date
Mieczyslaw Nalewaj
e750c22904 ramips: xiaomi,mi-ra75: cleaning up nvmem-cells definitions
Remove nvmem-cells definitions due to duplication
in mt7628an_xiaomi_mi-router-4.dtsi

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-06-16 21:24:11 +02:00
Mieczyslaw Nalewaj
3504667bbe ramips: tplink,archer-c2-v1: cleaning up nvmem-cells definitions
Remove nvmem-cells definitions due to duplication
in mt7620a_tplink_8m.dtsi

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-06-16 21:24:11 +02:00
Mieczyslaw Nalewaj
e125cf5a8c ramips: hiwifi,hc5861: cleaning up nvmem-cells definitions
Remove nvmem-cells definitions due to duplication
in mt7620a_hiwifi_hc5x61.dtsi

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-06-16 21:24:11 +02:00
Daniel Golle
487cc3831c generic: 6.6: drop patch adding support for multiple MTK PPE
Partially revert commit 98ddfbc56a ("generic: 6.6: backport upstream
commits for mtk_eth_soc") as the commit breaks WED. A better solution to
assign PPE units in case of WED has still to be found.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-06-16 18:41:40 +01:00
Daniel Golle
94e0190082 generic: 6.6: update NVMEM-on-MMC series
Allow a wider audience to test this pending series.

Use about to be submitted v3 which factors out block notification support.
Apart from dropping the no longer needed (and problematic) fallback for
for the 'partitions' node being present at the device parent there are
no intended functional changes.

As opening a block device as file is not supported yet in Kernel v6.6,
use the previous method as backporting seems a bit too involving.

Fixes: #15642
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-06-16 13:28:01 +01:00
Daniel Golle
4fd4be6bbe generic: 6.6: move NVMEM-on-UBI patches from pending to backports
The series was merged for Linux v6.9, so move it to backports.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-06-16 13:28:01 +01:00
Daniel Golle
98ddfbc56a generic: 6.6: backport upstream commits for mtk_eth_soc
Backport two commits for mtk_eth_soc:
 * net: ethernet: mtk_eth_soc: handle dma buffer size soc specific
   (torvalds/linux@c57e558194)
 * net: ethernet: mtk_eth_soc: ppe: add support for multiple PPEs
   (torvalds/linux@dee4dd10c7)

Refresh pending patches which require that.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-06-16 13:28:01 +01:00
David Bauer
e321e70ddc mpc85xx: fix label-mac-address for Enterasys WS-AP3710i
The WS-AP3710i does not correctly expose its label-mac on eth0 anymore
since the change to simpleLoader.

Fix this by obtaining the label-mac from the U-Boot environment.

Signed-off-by: David Bauer <mail@david-bauer.net>
2024-06-16 14:02:19 +02:00
Shiji Yang
05aec66d53 ramips: fix MAC address for some devices
1. Remove unused macaddr NVMEM cells.
2. Fix "mac-base" compatible cells references.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-06-15 22:54:52 +02:00
John Audia
f34620f146 kernel: bump 6.6 to 6.6.33 and adjust subarches
This commit accomplishes three goals:
1. bump 6.6 to 6.6.33
2. kernel: modules: video: change package definition for fb for
   upstream changes[1]
3. kernel/multiple subtargets: add CONFIG_FB_IOMEM_FOPS=y to all
   subtargets which also set CONFIG_FB_CORE=y.

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

Removed upstreamed:
	pending-6.6/195-block-fix-and-simplify-blkdevparts-cmdline-parsing.patch[2]
	gemini/patches-6.6/0003-net-ethernet-cortina-Locking-fixes.patch[3]

Manually rebased:
	ramips/patches-6.6/810-uvc-add-iPassion-iP2970-support.patch

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.6.y&id=c00e8fd749502c02085534c60b1edca4fc479c91
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.33&id=99bbbd9aea059f8a206736dc601be2ae61d366fb
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.33&id=8f6f82d6a205ceb3aba8d279f9ff6eeea0b1689b

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

Tested-by: Stijn Segers <foss@volatilesystems.org>
Signed-off-by: John Audia <therealgraysky@proton.me>
2024-06-15 22:44:06 +02:00
Zxl hhyccc
fc9cb9b609 kernel: bump 6.1 to 6.1.93
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.93

Removed upstreamed:
bcm27xx/patches-6.1/950-0081-smsx95xx-fix-crimes-against-truesize.patch
reference: 517e64bcc9

Manually rebased:
bcm27xx/patches-6.1/950-0712-drm-vc4-Use-phys-addresses-for-slave-DMA-config.patch

All other patches automatically rebased.

Build system: bcm53xx ath79

Signed-off-by: Zxl hhyccc <zxlhhy@gmail.com>
2024-06-15 19:55:01 +08:00
David Bauer
22f92cce22 mpc85xx: fix Enterasys WS-AP3710i eth mac-address
With the introduction of the simpleImage loader, the MAC address is not
set by the bootloader anymore.

Fix this by reading the MAC address from the U-Boot environment
partition.

Signed-off-by: David Bauer <mail@david-bauer.net>
2024-06-14 23:33:06 +02:00
Shiji Yang
2db6459ed4 ath79: fix MAC address for senao loader devices
The "mac-base" nvmem-cell-cells size is 1.

Fixes: b2f1c6ed52 ("ath79: qca: remove mac-address-increment")
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-06-14 21:05:19 +02:00
Shiji Yang
4fdc7bb8f1 ath79: switch default kernel to 6.6
We haven't received any bug reports in the past few weeks. So it's
time to set kernel 6.6 as the default and remove kernel 6.1 support.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-06-14 17:38:09 +02:00
Shiji Yang
bcbf666f69 ath79: refresh 6.6 kernel config
Add the missing kernel symbols by
`make kernel_oldconfig CONFIG_TARGET={target,subtarget}`.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-06-14 17:38:09 +02:00
Hauke Mehrtens
99aa86ef85 bcm47xx: Remove profiles for broadcom-wl
The broadcom-wl driver was removed from OpenWrt, remove also the
profiles using it.

Fixes: e772b75d5d ("broadcom-wl: remove package")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-06-14 14:54:16 +02:00
Hauke Mehrtens
2beea2943b bcm47xx: Remove exports for braodcom-wl driver
The braodcom-wl driver was removed from OpenWrt, remove the special
exports it needed.

Fixes: e772b75d5d ("broadcom-wl: remove package")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-06-14 14:54:16 +02:00
Mikhail Zhilkin
ef845675f5 ramips: fix wrong dts file permission
This file is executable:
   target/linux/ramips/dts/mt7621_dlink_dir-2150-a1.dts
Has to be fixed.

Fixes: 30e8fd73ec ("ramips: Add support for D-Link DIR-2150-A1")
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2024-06-14 14:44:04 +02:00
Mikhail Zhilkin
61dce63c04 ramips: fix random LAN MAC for sercomm dxx devices
This commit fixes random lan mac for sercomm dxx devices.

Fixes: 3395184825 ("ramips: mt7621: nix mac-address-increment")
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2024-06-14 14:43:07 +02:00
Mikhail Zhilkin
24d2519755 ramips: fix wrong eeprom data for sercomm dxx devices
This commit fixes wrong WiFi eeprom data:
   /sys/kernel/debug/ieee80211/phy0/mt76/eeprom
   /sys/kernel/debug/ieee80211/phy1/mt76/eeprom

Fixes: fb4cea45ec ("ramips: convert MT7603 EEPROM to NVMEM format")
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2024-06-14 14:41:30 +02:00
Rosen Penev
932808ebde ath79: fix wrong mac address for ecb1xx0
0db4f9785c changed the variable name from
athaddr to ethaddr. Restore.

Fixes: 0db4f9785c ("ath79: convert ath10k calibration data to NVMEM (ASCII MAC)")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-14 14:20:27 +02:00
Chukun Pan
0a76244a72 qualcommax: ipq807x: fix sysupgrade for ZBT-Z800AX
This router has two rootfs partitions and dualboot is used.
Vendor firmware may swap the rootfs partition location, u-boot append
'ubi.mtd=rootfs' in the end of cmdline. Since we use fixed-partitions,
force boot from the first rootfs partition to avoid boot failure.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/15700
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-13 18:01:03 +02:00
Tony Ambardar
ce51f27fb0
kernel: 6.6: prevent garbage-cleanup of BPF kfuncs
Backport an upstream Linux fix to prevent BPF kfunc functions from being
removed during linker optimization when building BTF-enabled vmlinux.

The telltale sign of this occurring is build log warnings (e.g. mips64el):

      BTFIDS  vmlinux
    WARN: resolve_btfids: unresolved symbol bpf_verify_pkcs7_signature
    WARN: resolve_btfids: unresolved symbol bpf_lookup_user_key
    WARN: resolve_btfids: unresolved symbol bpf_lookup_system_key
    WARN: resolve_btfids: unresolved symbol bpf_key_put
    WARN: resolve_btfids: unresolved symbol bpf_iter_task_next
    WARN: resolve_btfids: unresolved symbol bpf_iter_css_task_new
    WARN: resolve_btfids: unresolved symbol bpf_get_file_xattr
    WARN: resolve_btfids: unresolved symbol bpf_ct_insert_entry
      NM      System.map
      SORTTAB vmlinux

Link: https://lore.kernel.org/bpf/ZlkoM6%2FPSxVcGM6X@kodidev-ubuntu/
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15697
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-06-13 14:16:34 +02:00
Kristian Skramstad
75a76355cb qualcommax: ipq807x: wax620 and wax630: fix wifi mac address
The wifi radios on wax620 and wax630 got a random mac
address on boot. So fix this by using ath11k_patch_mac
and give a static mac address from label-mac-device.

Tested and working on wax620 and wax630.

Signed-off-by: Kristian Skramstad <kristian+github@83.no>
Link: https://github.com/openwrt/openwrt/pull/15597
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-13 11:01:59 +02:00
Robert Marko
169a695280 octeontx: drop target
octeontx is currently stuck on kernel 5.15 since using 6.1 breaks booting,
and unfortunately nobody has stepped up to fix this issue.

Gateworks who were primary users have supported the removal.

Link: https://github.com/openwrt/openwrt/pull/15686
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-12 21:52:41 +02:00
Koen Vandeputte
167b016a21 ipq40xx: fix invalid GPIO numbers since kernel 6.6
The bump to kernel 6.6 increased the GPIO base from
412 to 512 on this target.

We need to compensate for that in the GPIO numbers being passed
to uci to fix following kernel report:

[   24.176183] export_store: invalid GPIO 423

Tested on a Wallys DR40x9 board.

Please note that:

Boards "rtl30vw" and "wpj428" are not being altered here.
They define GPIO numbers which are even below the previous
base of 412 which looks wrong.
Actual testing on these boards should be conducted to validate
and optionally fix GPIO numbering.

Suggested-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
2024-06-12 14:25:56 +02:00
Sebastian Schaper
aa4d63c2da ramips: add support for 7Links WLR-1240
The WLR-1240 (ZX-5434) is an AC1200 Wave 2 outdoor repeater
with omnidirectional antennas for wall or pole mounting.
The device is manufactured by Todaair and meant to be used with
a tuya-based app, there is no webinterface for configuration.

Specifications:
- MT7628AN, 8 MiB SPI NOR flash, 64 MiB RAM, 2x2 802.11n
- MT7613 2x2 802.11ac Wave 2
- 802.3af PoE or 12V 1A 5.5x2.1 power supply (included)
- top RGB LED ring

TFTP installation:
- rename sysupgrade to `firmware_auto.bin`
- provide at 192.168.1.10 during boot

HTTP installation:
- keep reset button pressed for 5 seconds during power on (light blue
  LED flashes slowly, then quickly to confirm, then remains steady on)
- recovery web interface is at 192.168.1.1, upload sysupgrade

Opening the device
- use suction cup to remove top cap within LED ring
- two screws are located in holes underneath silicone sealant
- two further screws are located at the bottom

initramfs boot
- open device, connect serial console (pins are labelled)
- keep pressing `4` during second tftp attempt to enter uboot shell
- run `tftpboot 82000000` to avoid memory overlap, then `bootm`

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
2024-06-11 00:09:06 +02:00
Sebastian Schaper
3d6cbe287a ramips: add support for 7Links WLR-1230
The WLR-1230 (ZX-5207) is an AC1200 Wave 2 outdoor repeater
with sector antennas for wall or pole mounting.
The device is manufactured by Todaair and meant to be used with
a tuya-based app, there is no webinterface for configuration.

Specifications:
- MT7628AN, 8 MiB SPI NOR flash, 64 MiB RAM, 2x2 802.11n
- MT7613 2x2 802.11ac Wave 2
- 802.3af PoE or 12V 1A 5.5x2.1 power supply (included)
- 3 LEDs WLAN, LAN, RES; PWR LED is not software-controllable

TFTP installation:
- rename sysupgrade to `firmware_auto.bin`
- provide at 192.168.1.10 during boot

HTTP installation:
- keep reset button pressed for 5 seconds during power on (LEDs
  flash slowly, then quickly to confirm, then remain steady on)
- recovery web interface is at 192.168.1.1, upload sysupgrade

Opening the device
- two screws are located in the bottom left and right corners
  underneath the label, inner tray slides out easily

initramfs boot
- open device, connect serial console (pins are labelled)
- keep pressing `4` during second tftp attempt to enter uboot shell
- run `tftpboot 82000000` to avoid memory overlap, then `bootm`

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
2024-06-11 00:09:06 +02:00
Hauke Mehrtens
5be9a8790c mediatek: Ruijie RG-X60 Pro: Add kmod-mt7915e
Add the kmod-mt7915e wifi driver to the default packages for the Ruijie
RG-X60 Pro. kmod-mt7915e has to be added recently and was not done
before merging the support for Ruijie RG-X60 Pro.

Fixes: 3de3c2bdfa ("mediatek: add support for Ruijie RG-X60 Pro")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-06-10 12:42:23 +01:00
Luis Mita
d780d530dd ramips: mt76x8: sync Cudy TR1200 v1 naming
Cudy assigns hardware versions to its devices on its website, and
the Cudy TR1200 router is now Cudy TR1200 v1.
OpenWrt currently uses both variants, and this commit removes
inconsistencies using only the new name.

Signed-off-by: Luis Mita <luis@luismita.com>
2024-06-10 10:13:56 +02:00
Tianling Shen
0397932fdd mediatek: convert eeprom/macaddr to nvmem format for jdcloud re-cp-03
Switch to new nvmem binding.

Also fixes a issue that the MAC address assigned to lan/wan was reversed.

Tested-by: Yangyu Chen <cyy@cyyself.name>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-06-10 10:08:19 +02:00
Sijia Huang
33db914607 mediatek: filogic: Add support for Wavlink WL-WN586X3
Hardware
--------
- SOC: MediaTek MT7981
- ram: 256MB DDR3
- FLASH: 16MB SPI-NOR
- Ethernet: 2x1Gb Lan 1x1Gb Wan
- WIFI: MediaTek MT7981 2x2 DBDC 802.11ax 2T2R (2.4/5)
- LEDs: 2xLan 1x Wan 1x WIFI 1xSTATUS

MAC table, same as stock firmware:
LAN: 80:3F:5D:xx:xx:x1 partition "hw" at 0x44e (ASCII)
WAN: 80:3F:5D:xx:xx:x2 partition "hw" at 0x460 (ASCII)
 2G: 80:3F:5D:xx:xx:x3 partition "factory" at 0x4 (binary), on label
 5G: 80:3F:5D:xx:xx:x3 Same as 2G

Installation Method 1: ssh
--------------------------
1. Connect PC to the lan port. Set the PC IP to 192.168.10.100 if
   required.
2. Navigate to http://192.168.10.1/
3. Log into the Wavlink WebGUI. Default username/password is
   admin/admin.
4. Use WebGUI to upgrade the firmware to
   WAVLINK_WN586X3-A_M86X3A_V240113_WO-GDBYFM-modified.bin
   downloaded from
   https://github.com/themaverickdm/firmware-misc/tree/main/wavlink/wl-wn586x3
   Warning: All settings will be lost!
5. Wait about 5 minutes, and after flashing is completed, log into
   the router using (with admin123 as password):
   ssh root@192.168.10.1
6. scp the openwrt image file onto the router, usually under /tmp
   somewhere.
   openwrt-mediatek-filogic-wavlink_wl-wn586x3-squashfs-sysupgrade.bin
7. Flash openwrt image file like so:
   mtd write \
     openwrt-mediatek-filogic-wavlink_wl-wn586x3-squashfs-sysupgrade.bin \
     firmware
   Warning: Previous firmware will be overwritten!
8. Wait about 5 minutes, and after the flashing is completed, set
   the PC IP to 192.168.1.100 if required and log into the router
   like so:
   ssh root@192.168.1.1

Installation Method 2: u-boot
-----------------------------
1. Connect UART:  TX-> 586X3 RX, RX-> 586X3 TX, GND-> 586 GND.
2. Connect PC to the wan (not lan!) port.
3. Setup the tftp server on PC, set IP to 192.168.10.100,
4. Power on the device. Select '2' to upgrade firmware in Uboot.
5. Input the image name and start to upgrade.

Uboot console log:

CPU:   MediaTek MT7981
Model: mt7981-rfb
DRAM:  256 MiB
Core:  34 devices, 13 uclasses, devicetree: embed
Loading Environment from nowhere... OK
In:    serial@11002000
Out:   serial@11002000
Err:   serial@11002000
Net:
Warning: ethernet@15100000 (eth0) using random MAC address -
02:47:fb:b2:53:2d
eth0: ethernet@15100000
UBOOT WN586X3A
gpio: pin 9 (gpio 9) value is 0
gpio: pin 10 (gpio 10) value is 0
gpio: pin 5 (gpio 5) value is 0
gpio: pin 12 (gpio 12) value is 0
gpio: pin 13 (gpio 13) value is 0

  *** U-Boot Boot Menu ***

      1. Startup system (Default)
      2. Upgrade firmware
      3. Upgrade ATF BL2
      4. Upgrade ATF FIP
      5. Upgrade single image
      6. Load image
      0. U-Boot console

Co-authored-by: R Maru <deviantmaru@gmail.com>
Signed-off-by: R Maru <deviantmaru@gmail.com>
Signed-off-by: Sijia Huang <engineer31@win-star.com>
2024-06-09 14:58:25 +02:00
Rosen Penev
dd6bbbabd3 ath79: 8dev: remove wmac userspace handling
Before the nvmem rework, this was already handled in dts with
mtd-cal-data instead of qca,no-eeprom. No need to duplicate. Also, the
800 size value seems nonsensical. 440 is the standard.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-09 12:24:15 +02:00
Rosen Penev
74f2df9dbc ath79: mtd-cal-data removals
Replacement can be done with nvmem.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-09 12:24:15 +02:00
Rosen Penev
79fc4dba60 ath79: convert pcs,cap324 calibration to nvmem
Userspace handling is deprecated.

Also fix a bug with userspace handling where the wrong calibration data
was being used for the PCI card. The dts was correct but userspace was
not.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-09 12:24:15 +02:00
Rosen Penev
6483615580 ath79: cd-e380ac-v2: remove duplicate eth0
It seems in the transition to nvmem, eth0 was specified twice and was
already converted to use nvmem.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-09 12:24:15 +02:00
Rosen Penev
85c5c9aa68 ath79: remove unused dts labels
These are not referenced.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-09 12:24:15 +02:00
Rosen Penev
ff5e8476d9 ath79: fix dtc address warnings
These should match reg values.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-09 12:24:15 +02:00
Shiji Yang
2d00ed7caa kernel: trim outdated kernel config symbols
These symbols have already been removed from the upstream Linux source
code. They are automatically compared and removed by a kernel config
scanning script[1].

[1] https://github.com/openwrt/openwrt/pull/15324

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-06-09 11:45:34 +02:00
Martin Schiller
6ec7711d00 lantiq: Refresh patches and configuration for linux 6.6
Make all the patches apply. This also refreshes some of the kernel
configurations.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-06-08 23:25:35 +02:00
Martin Schiller
c80fa584e5 lantiq: set Linux 6.6 as testing kernel
Add KERNEL_TESTING_PATCHVER for Linux 6.6.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-06-08 23:25:35 +02:00
Martin Schiller
5b522e4969 kernel/lantiq: Restore kernel files for v6.1
This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-06-08 23:25:35 +02:00
Martin Schiller
e85c80edcb kernel/lantiq: Create kernel files for v6.6 (from v6.1)
This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-06-08 23:25:35 +02:00
David Bauer
c2a5cd110c mpc85xx: only build zImage on required targets
Make the OF-compatible zImage per-board selectable. This allows the
image to only be built with the wrapper if the target actually uses it.

This fixes build-failures for the mpc85xx-p2020 subtarget.

Fixes: 557c094f0579 ("mpc85xx: only build zImage on required targets")

Signed-off-by: David Bauer <mail@david-bauer.net>
2024-06-08 17:30:20 +02:00
Mieczyslaw Nalewaj
df28fe4b59 kernel: rtl8367b: remove unnecessary cpu_port setting
Set the appropriate cpu_port value based on the use of realtek,extif0 to extif2
instead of the additional cpu_port parameter.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15033
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-08 16:28:37 +02:00
Mieczyslaw Nalewaj
c1a26de1c6 kernel: rtl8367: set the correct cpu_port value
Set the appropriate cpu_port value based on the use of realtek,extif0 or realtek,extif1 parameter.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15033
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-08 16:28:36 +02:00
Zxl hhyccc
2d6cedab27 kernel: bump 6.1 to 6.1.92
https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.92

Removed upstreamed:
 bcm27xx/patches-6.1/950-0270-net-bcmgenet-Reset-RBUF-on-first-open.patch
 generic/backport-6.1/600-v6.9-03-net-gro-add-flush-check-in-udp_gro_receive_segment.patch
 generic/pending-6.1/681-net-bridge-fix-multicast-to-unicast-with-fraglist-GS.patch
 generic/pending-6.1/682-net-core-reject-skb_copy-_expand-for-fraglist-GSO-sk.patch
 generic/pending-6.1/684-net-bridge-fix-corrupted-ethernet-header-on-multicas.patch
 generic/pending-6.1/778-net-l2tp-drop-flow-hash-on-forward.patch
 imx/patches-6.1/002-6.2-phy-freescale-imx8m-pcie-Refine-i.MX8MM-PCIe-PHY-dri.patch

All other patches automatically rebased.

Signed-off-by: Zxl hhyccc <zxlhhy@gmail.com>
2024-06-08 14:16:19 +02:00
David Bauer
de59fc4540 ipq40xx: fix broken image generation for EX6150v2
All NETGEAR EX6150v2 validate the rootfs for which OpenWrt places a
fakeheader at the position, where the bootloader expects it.

Some EX6150v2 bootloaders do however make a broken assumption about
where the rootfs starts. This is due to them calculating the rootfs
start not based upon the kernel-length but the string-offset of the
FIT-image.

We have to be compatible with both this broken as well as the valid
calculation. So we do relocate the FDT string section to a
block-boundary and enlarge the FIT image to end at this boundary +
BLOCKSIZE / 2. This way, both the broken as well as correct calculations
do expect the rootfs-header at the same position.

It is worth noting, that this is a rare edge-case in which only happens
if the image-length as well as the start of the string-section are not
placed in the same erase-block. This is an edge-case which happens very
rarely (thus it was not spotted prior).

Affected:
 - U-Boot 2012.07 (Jun 16 2016 - 11:59:37)

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 8f9546f7b0a14f3afa813e39ed45c968ece24464)
2024-06-08 02:09:15 +02:00
Linus Walleij
884bef5d1b kirkwood: Add Marvell RTC to two devices
The recently added D-Link DNS-320L and the Zyxel NSA310S
is missing an RTC module so let's give them the default
Marvell RTC at least.

Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-06-07 21:48:42 +02:00
Tianling Shen
4edde98768 mediatek: fix wps button for nokia ea0326gmp
The gpio is actually low active, fix it.

Fixes: 40e7fab9e4 ("mediatek: add Nokia EA0326GMP support")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/15651
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-07 14:19:39 +02:00
Tim Harvey
0520c45f2f imx: 6.6: update kernel config
added some missing configs needed when building 6.6 with all kmods

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2024-06-06 22:04:23 +02:00
Tim Harvey
c78c71737b imx: 6.6: refresh kernel patches
refresh 6.6 kernel patches via 'make target/linux/refresh'

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2024-06-06 22:04:23 +02:00
Tim Harvey
a6d4d369eb imx: add 6.6 kernel as testing
allow to test 6.6 kernel for imx

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2024-06-06 22:04:23 +02:00
Tim Harvey
368cd88c44 imx: fix cortexa9/cortexa7 image builds due to dts move
The IMX device-tree's for arm moved from arch/arm/boot/dts to
arch/arm/boot/dts/nxp/imx. Use that if using the 6.6 kernel.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2024-06-06 22:04:23 +02:00
Tim Harvey
7dfdfac344 imx: copy config from 6.1 to 6.6
Copy the 6.1 config to 6.6

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2024-06-06 22:04:23 +02:00
Tim Harvey
e4d76cf6ae imx: copy patches from 6.1 to 6.6
copy 6.1 patches to 6.6 and fixup:
 - removed patches already upstream
 - adapted pathnames of dts patches for new kernel

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2024-06-06 22:04:23 +02:00
Daniel Golle
56bce303ce generic: 6.6: refresh patches
Patch 733-01-net-ethernet-mtk_eth_soc-use-napi_build_skb.patch needs
a refresh as line numbers no longer match.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-06-06 20:08:13 +01:00
Tianling Shen
a568540fd4 mediatek: filogic: move nand-only devices out of bootdev detection
For the first-time installation (mostly migrates from vendor firmware)
the ubiblock is not ready, but bootdev detection relies on it. This
means users must create ubiblock manually otherwise the sysupgrade
will not work.

Now a unique case is added for nand devices which use new fit format,
let's move to it.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-06-06 18:56:32 +01:00
Tianling Shen
40e7fab9e4 mediatek: add Nokia EA0326GMP support
Hardware specification:
  SoC: MediaTek MT7981B 2x A53
  Flash: 128 MB SPI-NAND
  RAM: 256MB
  Ethernet: 4x 10/100/1000 Mbps
  Switch: MediaTek MT7531AE
  WiFi: MediaTek MT7976C
  Button: Reset, WPS/Mesh
  Power: DC 12V 1A

Gain SSH access:
1. Login into web interface, and download the configuration.
2. Download the configration utilities:
   https://firmware.download.immortalwrt.eu.org/cnsztl/mediatek/filogic/openwrt-mediatek-mt7981-nokia-ea0326gmp-config-utils.tar.gz
     These binaries are extraced from the factory firmware, which are
     dynamically linked with aarch64 musl 1.1.24. To use them, you
     must run them under the same runtime environment, otherwise the
     binaries will not work properly!
3. Upload the configuration and utilities to a suitable environment.
4. Uncompress the utilities, move them to '/bin' and give them executable permisison:
   tar -zxf openwrt-mediatek-mt7981-nokia-ea0326gmp-config-utils.tar.gz
   mv mkconfig seama /bin
   chmod +x /bin/mkconfig
   chmod +x /bin/seama
5. Decrypt and uncompress the configuration:
     Enter fakeroot if you are not login as root.
   mkconfig -a de-enca -m EA0326GMP_3FE79221BAAA -i EA0326GMP_3FE79221BAAA-xxxxxxxx-backup.tar.gz -o backup.tar.gz
   tar -zxf backup.tar.gz
6. Edit 'etc/config/dropbear', set 'enable' to '1'.
7. Edit 'etc/passwd', remove root password: 'root::1:0:99999:7:::'.
8. Repack the configuration:
   tar -zcf backup.tar.gz etc/
   mkconfig -a enca -m EA0326GMP_3FE79221BAAA -i backup.tar.gz -o EA0326GMP_3FE79221BAAA-xxxxxxxx-backup.tar.gz
9. Upload new configuration via web interface, now you can SSH to EA0326GMP.

A minimum configuration which enabled SSH access is also provided
to simplify the process:
https://firmware.download.immortalwrt.eu.org/cnsztl/mediatek/filogic/openwrt-mediatek-mt7981-nokia-ea0326gmp-enable-ssh.tar.gz

Flash instructions:
1. SSH to EA0326GMP, backup everything, especially 'Factory' part.
2. Write new BL2:
   mtd write openwrt-mediatek-filogic-nokia_ea0326gmp-preloader.bin BL2
3. Write new FIP:
   mtd write openwrt-mediatek-filogic-nokia_ea0326gmp-bl31-uboot.fip FIP
4. Set static IP on your PC:
   IP 192.168.1.254/24, GW 192.168.1.1
5. Serve OpenWrt initramfs image using TFTP server.
6. Cut off the power and re-engage, wait for TFTP recovery to complete.
7. After OpenWrt has booted, perform sysupgrade.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-06-06 18:56:32 +01:00
Felix Fietkau
f352ca5a8a kernel: use napi_build_skb in mtk_eth_soc
Improves performance

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-06-06 11:47:59 +02:00
Robert Marko
458cafd0d0 generic: routerbootpart: fix compilation on 64-bit
Trying to compile routerbootpart parsers on 64-bit platforms will fail:
drivers/mtd/parsers/routerbootpart.c: In function 'routerboot_find_dynparts':
./include/linux/kern_levels.h:5:25: error: format '%X' expects argument of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=]
    5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
      |                         ^~~~~~
./include/linux/printk.h:427:25: note: in definition of macro 'printk_index_wrap'
  427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                         ^~~~
./include/linux/printk.h:498:9: note: in expansion of macro 'printk'
  498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~
./include/linux/kern_levels.h:11:25: note: in expansion of macro 'KERN_SOH'
   11 | #define KERN_ERR        KERN_SOH "3"    /* error conditions */
      |                         ^~~~~~~~
./include/linux/printk.h:498:16: note: in expansion of macro 'KERN_ERR'
  498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |                ^~~~~~~~
drivers/mtd/parsers/routerbootpart.c:170:25: note: in expansion of macro 'pr_err'
  170 |                         pr_err("%s: mtd_read error while parsing (offset: 0x%X): %d\n",

So, lets simply add the length modifier 'z' to fix compilation.

Link: https://github.com/openwrt/openwrt/pull/15640
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-06 11:45:03 +02:00
Daniel Golle
84a527417d mediatek: improve reliability of Fidelix/Dosilicon SPI-NAND
Prior to performing a PROGRAM LOAD RANDOM DATA operation, a WRITE
ENABLE (06h) command must be issued to change the contents of the
memory array. Following a WRITE ENABLE (06) command, **first a PROGRAM
LOAD (02h or 32h) command must be issued to reset the cache**, then
issue a PROGRAM LOAD RANDOM DATA (84h or 34h) command

This is dirty fix provided to use by MediaTek engineer Sky Huang which
may resolve the "OpenWrt Kiss of Death" issue we've been seeing on the
Linksys E8450 aka. Belkin RT3200. However, it means that everything has
to be re-written with that patch already applied, ie. we need to rebuild
the installer once it is part of snapshot builds to have any effect.

Users already on FIP-in-UBI layout are advised to re-write 'fip' UBI
volume and 'bl2' MTD partition manually once from within Linux after
this fix has been applied.

A similar fix will also be required for U-Boot.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-06-05 21:05:52 +01:00
INAGAKI Hiroshi
1fbfc251c9 ramips: add support for Buffalo WSR-2533DHPL2
Buffalo WSR-2533DHPL2 is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based
on MediaTek MT7621A.

Specification:

- SoC           : MediaTek MT7621AT
- RAM           : DDR3 128 MiB (Winbond W631GG6MB12J)
- Flash         : RAW-NAND 128 MiB (Winbond W29N01HVSINF)
- WLAN          : 2.4/5 GHz (2x MediaTek MT7615N)
- Ethernet      : 10/100/1000 Mbps x4
  - Switch      : MediaTek MT7530 (SoC)
- LED/keys      : 8x/6x (2x buttons, 1x slide-switch)
- UART          : through-hole on PCB (J4)
  - arrangement : 3.3V, GND, TX, RX from triangle-mark
  - settings    : 57600n8
- Power         : 12VDC 1.5A

Flash instruction using factory.bin image:

1. boot WSR-2533DHPL2 normally with "Router" mode
2. access to the WebI ("http://192.168.11.1/") on the device and open
   firmware update page
   ("管理" -> "ファームウェア更新")
3. select the OpenWrt factory.bin image and click update ("更新実行")
   button
   Attention: do not use "factory-uboot.bin" image
4. Wait ~120 seconds to complete flashing

Flash instruction using initramfs image:

1. prepare the TFTP server with the initramfs image renamed to
   "linux.trx-recovery" and IP address "192.168.11.2"
2. press the "AOSS" button while powering on the WSR-2533DHPL2
3. after 10 seconds, release the "AOSS" button, WSR-2533DHPL2 downloads
   the initramfs image and boot with it automatically
4. on the initramfs image, download the factory-uboot.bin image to the
   device and perform sysupgrade with it and "-F" option
5. wait ~120 seconds to complete flashing

Notes:

- There are 2x factory*.bin images for different purposes.

  - factory.bin      : for flashing on OEM WebUI
  - factory-uboot.bin: for flashing on OEM bootloader or initramfs image

  factory-uboot.bin is useful for recoverying the device, or refreshing
  when the kernel partition is expanded in the future. sysupgrade on
  this device accepts factory-uboot.bin with option "-F", but on that
  situation, user configurations won't be kept, so it's not for normal
  use.

MAC addresses:

LAN    : 18:EC:E7:xx:xx:E0 (board_data, "mac" (text))
WAN    : 18:EC:E7:xx:xx:E0 (board_data, "mac" (text))
2.4 GHz: 18:EC:E7:xx:xx:E1 (Factory, 0x4    (hex))
5 GHz  : 18:EC:E7:xx:xx:E4 (Factory, 0x8004 (hex))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2024-06-05 21:14:16 +02:00
INAGAKI Hiroshi
ea8d140b25 ramips: add support for Buffalo WSR-2533DHPLS
Buffalo WSR-2533DHPLS is a 2.4/5 GHz band 11ac router, based on MediaTek
MT7621A.

Very similar to Buffalo WSR-2533DHPL, but with NAND, different GPIO
and TRX partitions.

Specification:

- SoC           : MediaTek MT7621AT
- RAM           : DDR3 256 MiB (Samsung K4B2G1646F-BYMA)
- Flash         : RAW-NAND 128 MiB
                  (Winbond W29N01HV or KIOXIA TC58BVG0S3HTAI0)
- WLAN          : 2.4/5 GHz (2x MediaTek MT7615N)
- Ethernet      : 10/100/1000 Mbps
  - Switch      : MediaTek MT7530 (SoC) 4 ports
- LED/keys      : 8x/6x (2x buttons, 1x slide-switch)
- UART          : through-hole on PCB (J4)
  - arrangement : 3.3V, GND, TX, RX from triangle-mark
  - settings    : 115200n8
- Power         : 12VDC 1.5A

Flash instruction using factory.bin image:

1. boot WSR-2533DHPLS normally with "Router" mode
2. access to the WebI ("http://192.168.11.1/") on the device and open
   firmware update page
   ("管理" -> "ファームウェア更新")
3. select the OpenWrt factory.bin image and click update ("更新実行")
   button
   Attention: do not use "factory-uboot.bin" image
4. Wait ~120 seconds to complete flashing

Flash instruction using initramfs image:

1. prepare the TFTP server with the initramfs image renamed to
   "linux.trx-recovery" and IP address "192.168.11.2"
2. press the "AOSS" button while powering on the WSR-2533DHPLS
3. after 10 seconds, release the "AOSS" button, WSR-2533DHPLS downloads
   the initramfs image and boot with it automatically
4. on the initramfs image, download the factory-uboot.bin image to the
   device and perform sysupgrade with it and "-F" option
5. wait ~120 seconds to complete flashing

Notes:

- The embedded addresses in eeprom data in Factory partition have
  Buffalo's OUI, but they don't match with the actual addresses
  assigned to wlan devices. So fixup addresses by the user-space
  script.

  root@localhost:/# hexdump -C /dev/mtdblock3 | grep "^0000[08]000\s"
  00000000  15 76 a0 00 88 57 ee bc  01 a8 15 76 c3 14 00 80  |.v...W.....v....|
  00008000  15 76 a0 00 88 57 ee bc  01 f8 15 76 c3 14 00 80  |.v...W.....v....|

  See "MAC addresses" below for actual addresses.

- There are 2x factory*.bin images for different purposes.

  - factory.bin      : for flashing on OEM WebUI
  - factory-uboot.bin: for flashing on OEM bootloader or initramfs image

  factory-uboot.bin is useful for recoverying the device, or refreshing
  when the kernel partition is expanded in the future. sysupgrade on
  this device accepts factory-uboot.bin with option "-F", but on that
  situation, user configurations won't be kept, so it's not for normal
  use.

MAC addresses:

LAN    : 90:96:F3:xx:xx:30 (board_data, "mac" (text))
WAN    : 90:96:F3:xx:xx:30 (board_data, "mac" (text))
2.4 GHz: 90:96:F3:xx:xx:31
5 GHz  : 90:96:F3:xx:xx:38

[original work]
Signed-off-by: Audun-Marius Gangstø <audun@gangsto.org>
[convert to ubi, fix/improve DT, add sysupgrade support]
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2024-06-05 21:14:16 +02:00
INAGAKI Hiroshi
d529ac5da8 ramips: mt7621: switch trx parser to parser_trx from mtdsplit
Switch trx parser to parser_trx of Linux Kernel from mtdsplit_trx to
split firmware partition using model-specific trx magic number on
some Buffalo devices.
This change is tested on Buffalo WSR-2533DHPL.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2024-06-05 21:14:16 +02:00
INAGAKI Hiroshi
47d9dcd01a build: move Build/buffalo-trx to image-commands.mk
Move Build/buffalo-trx to image-commands.mk from image/mt7622.mk to use
that definition from ramips as well.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2024-06-05 21:14:16 +02:00
Ashley Lee
3de3c2bdfa mediatek: add support for Ruijie RG-X60 Pro
This pull request ports Ruijie RG-X60 Pro router support to the main branch.

Parameters:
- SoC       : MediaTek MT7986A Quad-core ARM Cortex-A53 2.0GHz
- RAM       : DDR3 512MiB (W634GU6QB)
- Flash     : SPI-NAND 128 MiB (W25N01GVZEIG)
- WLAN      : MediaTek MT7986A integration dual-band WiFi 6
  - 2.4 GHz : b/g/n/ax, MIMO 4x4
  - 5 GHz   : a/n/ac/ax, MIMO 4x4
- Ethernet  : 10/100/1000 Mbps x4 (MediaTek MT7531AE)
                    2500Mbps x 1 (Realtek RTL8221B-VB-CG)
- UART      : through-hole on PCB
  - [J500] GND, TX, RX, 3.3V (115200n1)
- Buttons   : Mesh, Reset
- LEDs      : 1x Power (Blue)
                  1x Turbo (Purple)
- Power     : 12 VDC, 3 A

How to Installation:
1. Remove the case and connect the TTL cable to the corresponding position.
2. Power on the device and quickly press "down" on the keyboard, then
   U-Boot will stay in the menu.
3. Select "1. Upgrade Firmware", select "0. TFTP Client(Default)".
4. Input the IP address, input the Openwrt image file name to be
   flashed, start the TFTP server, and press "Enter".
5. Wait for the flashing to complete.

How return to stock:

1. Remove the case and connect the TTL cable to the corresponding
   position.
2. Power on the device and quickly press "down" on the keyboard, then
   U-Boot will stay in the menu.
3. Select "1. Upgrade Firmware", select "0. TFTP Client(Default)".
4. Input the IP address, input the Stock “E-WEBOS” image file name to
   be flashed, start the TFTP server, and press "Enter".
5. Wait for the flashing to complete.

About recovery:
Connect uart, use u-boot menu to flash stock firmware image or boot
OpenWrt initramfs image.

About MAC Address:
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| WAN     | 10:82:3D:XX:XX:9E | label     |
| LAN     | 10:82:3D:XX:XX:9F | label+1   |
| WLAN 2g | 10:82:3D:XX:XX:A0 | label+2   |
| WLAN 5g | 10:82:3D:XX:XX:A1 | label+3   |
+---------+-------------------+-----------+

Signed-off-by: Ashley Lee <code@emtips.net>
2024-06-05 17:44:11 +01:00
Michał Kępień
a60721f2ed mikrotik: switch to Yafut for building MikroTik NOR images
The Yafut tool now has limited capabilities for working on filesystem
images stored in regular files.  This enables preparing Yaffs2 images
for devices with NOR flash using upstream Yaffs2 filesystem code instead
of the custom kernel2minor tool.

Since minimizing the size of the resulting filesystem image size is
important and upstream Yaffs2 code requires two allocator reserve blocks
to be available when writing a file to the filesystem, a trick is
employed while preparing an OpenWRT image: the blank filesystem image
that Yafut operates on initially contains two extra erase blocks that
are chopped off after the kernel file is written.  This is safe to do
because Yaffs2 has a true log structure and therefore only ever writes
sequentially (and the size of the kernel file is known beforehand).
While the two extra erase blocks are necessary for writes, Yaffs2 code
seems to be perfectly capable of reading back files from a "truncated"
filesystem that does not contain these extra erase blocks.

In terms of image size, this new approach is only marginally worse than
the current kernel2minor-based one: specifically, upstream Yaffs2 code
needs to write three object headers (each of which takes up an entire
data chunk) when the kernel file is written to the filesystem:

  - an object header for the kernel file when it is created,

  - an object header for the root directory when the kernel file is
    created,

  - an updated object header for the kernel file when the latter is
    fully written (so that its new size can be recorded).

kernel2minor only writes two of these headers, which is the absolute
minimum required for reading the file back.  This means that the
Yafut-based approach causes firmware images to be at most one erase
block (64 kB) larger than those created using kernel2minor, but only in
the very unfortunate scenario where the size of the kernel file is
really close to a multiple of the erase block size.

The rest of the calculations performed when the empty filesystem image
is first prepared stems from the Yaffs2 layout used by MikroTik NOR
devices: each 65,536-byte erase block contains 63 chunks, each of which
consists of 1024 bytes of data followed by 16-byte Yaffs tags without
ECC data; each such group of 63 chunks is then followed by 16 bytes of
padding, which translates to "-C 1040 -B 64k -E" in the Yafut
invocation.  Yaffs2 checkpoints and summaries are disabled (using
Yafut's -P and -S switches, respectively) as they are merely performance
optimizations that require extra storage space.  The -L and -M switches
are used to force little-endian or big-endian byte order (respectively)
in the resulting filesystem image, no matter what byte order the build
host uses.  The tr invocation is used to ensure that the filesystem
image is initialized with 0xFF bytes (which are an indicator of unused
space for Yaffs2 code).

Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
Link: https://github.com/openwrt/openwrt/pull/13453
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-05 17:03:24 +02:00
Daniel Golle
683a35098f ipq40xx: use NVMEM-on-UBI for ASUS RT-AC58U
Instead of extracting WiFi precal as well as MAC addresses in userspace
use recently introduced NVMEM-on-UBI instead.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Tested-by: Christian Lamparter <chunkeey@gmail.com>
2024-06-05 13:46:00 +01:00
Luis Mita
f1091ef7ac ramips: mt76x8: add support for Cudy TR1200 v1
Hardware:
 - SoC: MediaTek MT7628AN (MIPS 580MHz)
 - Flash: 16 MiB XMC 25QH128CH10
 - RAM: 128 MiB ESMT M14D1G1664A
 - WLAN: 2.4 GHz (MT7628), 5 GHz (MT7613BEN 802.11ac)
 - Ethernet: 1x 10/100 Mbps WAN, 1x 10/100 LAN (MT7628)
 - USB 2.0 port
 - Buttons: 1 Reset button, 1 slider button
 - LEDs: 1x Red, 1x White
 - Serial console: unpopulated header, 115200 8n1
 - Power: 5 VDC, 2 A

MAC addresses:
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| WAN     | 80:af:ca:xx:xx:x0 | label     |
| LAN     | 80:af:ca:xx:xx:x0 | label     |
| WLAN 2g | 80:af:ca:xx:xx:x0 | label     |
| WLAN 5g | 80:af:ca:xx:xx:x2 | label+2   |
+---------+-------------------+-----------+

Installation:
The installation must be done via TFTP by disassembling the router.
On other occasions Cudy has distributed intermediate firmware to make
installation easier, and so I recommend checking the Wiki for this
device if there is a more convenient solution than the one below.

To install using TFTP:
1. Upgrade to a beta firmware (signed by Cudy) that can be downloaded
from the wiki. This is required in order to use an unlocked u-boot.
2. Connect to UART.
3. While the router is turning on, press 1.
4. Connect to LAN and set your IP to 192.168.1.88/24. Configure a TFTP
server and an OpenWrt initramfs-kernel.bin firmware file as recovery.bin.
5. Press Enter three times. Verify the filename.
6. If you can reach LuCI or SSH now, just use the sysupgrade image with
the 'Keep settings' option turned off.

If you don't want to use the beta firmware nor the unlocked u-boot, you
can install the firmware writing the sysupgrade image on the firmware
partition of the SPI flash.

Signed-off-by: Luis Mita <luis@luismita.com>
2024-06-05 10:44:44 +02:00
Robert Marko
f5df45efa3 airoha: drop kernel 6.1 support
Now that 6.6 is the default, lets remove 6.1.

Link: https://github.com/openwrt/openwrt/pull/15630
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-05 09:34:06 +02:00
Robert Marko
690ec44141 airoha: default to kernel 6.6
Move airoha do kernel 6.6 as the default.

Link: https://github.com/openwrt/openwrt/pull/15630
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-05 09:34:06 +02:00
Shiji Yang
6e51b363e9 ramips: simplify multi-phy support patches
For MT7620, we should always prevent main ethernet interface from
going down due to phy link changes. And the ralink net driver does
not support cable test function, so this patch won't change any
behavior.

Ref:
6fcba5eec3 ("ramips: port 0034-NET-multi-phy-support.patch to 5.4")

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/15591
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2024-06-04 16:19:41 +08:00
Mieczyslaw Nalewaj
65f34e9928 bcm47xx: 6.6: refresh patches
CI tells us that we need to, so lets refresh them.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15010
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-03 17:57:54 +02:00
Mieczyslaw Nalewaj
a82b2e79e3 bcm47xx: 6.6: set testing kernel
Select 6.6 as testing kernel on bcm47xx.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15010
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-03 17:57:54 +02:00
Mieczyslaw Nalewaj
5285a7d2b1 bcm47xx: remove 5.15 support
Since 6.1 is now default, drop 5.15 support.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15010
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-03 17:57:54 +02:00
Mieczyslaw Nalewaj
f75b530d20 bcm47xx: default to kernel 6.1
Default to kernel 6.1 on bcm47xx.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15010
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-03 17:57:54 +02:00
Mieczyslaw Nalewaj
29aa1a94c4 bcm47xx: 6.6: refresh patches
Refresh kernel patches. Remove patches already included in the kernel.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15010
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-03 17:57:54 +02:00
Mieczyslaw Nalewaj
930eedaafe bcm47xx: 6.6: refresh kernel config
Refresh kernel config.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15010
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-03 17:57:54 +02:00
Mieczyslaw Nalewaj
83647098a1 kernel/bcm47xx: Restore kernel files for v6.1
This is an automatically generated commit which aids following Kernel patch history,
as git will see the move and copy as a rename thus defeating the purpose.

See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
for the original discussion.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15010
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-03 17:57:54 +02:00
Mieczyslaw Nalewaj
907c1c5fe1 kernel/bcm47xx: Create kernel files for v6.6 (from v6.1)
This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15010
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-03 17:57:54 +02:00
Chukun Pan
29faf53b8c qualcommax: use ath11k_patch_mac for ZBT-Z800AX
Use ath11k_patch_mac and ath11k_set_macflag functions
instead of fix_wifi_mac script.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/15580
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-03 13:15:48 +02:00
David Bauer
d4acd05218 mpc85xx: refresh patches
Signed-off-by: David Bauer <mail@david-bauer.net>
2024-06-02 22:43:46 +02:00
David Bauer
63239a939f mpc85xx: fix patch for kernel 6.6
Fixes: af329ec389 ("mpc85xx: add support for Hewlett Packard MSM460")

Signed-off-by: David Bauer <mail@david-bauer.net>
2024-06-02 22:43:46 +02:00
Keith Harrison
6707eba9f0 ramips: add support for D-Link DIR-2055 A1
Add support for D-Link DIR-2055 A1 based on similarities to DIR-1960 A1,
as well as various DIR-8xx A1 models. Existing DIR-1960 A1 openwrt
"factory" firmware installs without modifications via the D-Link Recovery
GUI and has no known incompatibilities with the DIR-2055 A1.

Changes to be committed:
new file:   target/linux/ramips/dts/mt7621_dlink_dir-2055-a1.dts
modified:   target/linux/ramips/image/mt7621.mk
modified:   target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
modified:   target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh

Specifications:

    Board: Not known
    SoC: MediaTek MT7621 Family (MT7621AT)
    RAM: 256 MB (Micron 9OK17 D9PTK, should be DDR3 MT41K128M16JT-125)
    Flash: 128 MB (Winbond W29N01HVSINA)
    WiFi: MediaTek MT7615 Family (MT7615N x2)
    Switch: 1 WAN, 4 LAN (Gigabit)
    Ports: 1 USB 3.0 (front)
    Buttons: Reset, WiFi Toggle, WPS
    LEDs: Power (white/orange), Internet (white/orange),
          WiFi 2.4G (white), WiFi 5G (white)

Notes:

    Only known difference vs. the DIR-1960 A1 is that the DIR-2055 A1
    doesn't have a USB activity LED

Serial port:

    Tested to be identical to various DIR-8xx A1 models with a similar
    enclosure/pcb design:
        Parameters: 57600, 8N1, 3.3V TTL no flow control
        Location: J1 header (close to the Reset, WiFi and WPS buttons)
        Pinout: 1 - VCC 2 - RXD 3 - TXD 4 - GND
            Did not connect VCC when using

Installation:

    D-Link Recovery GUI: power down the router, press and hold the reset
    button, then re-plug it. Keep the reset button pressed until the power
    LED starts flashing orange, manually assign a static IP address under
    the 192.168.0.xxx subnet (e.g. 192.168.0.2) and go to
    http://192.168.0.1

    Some modern browsers may have problems flashing via the Recovery GUI,
    if that occurs consider uploading the firmware through cURL:

    curl -v -i -F "firmware=@file.bin" 192.168.0.1

Signed-off-by: Keith Harrison <keithh@protonmail.com>
2024-06-02 18:41:17 +02:00
Hauke Mehrtens
21213c8156 tegra: Activate CONFIG_SND_DRIVERS
The option CONFIG_SND_DRIVERS is activated by default in the generic
configuration, do not deactivate it for tegra. This fixes the build of
the kmod-sound-dummy package on tegra.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-06-02 17:56:28 +02:00
Hauke Mehrtens
8647ce0800 kernel: Split kmod-video-dma into two kmods
Split the kmod-video-dma into kmod-video-dma-sg and
kmod-video-dma-contig. The old one contained two kmods, but sometimes
only one of them is build which caused problems. The configuration
options are not manually selectable in the kernel and hidden in OpenWrt.

Currently this causes build failures on some targets.

Fixes: 4d7cbe0a55 ("kernel: video-dma: explicitly state packaged modules")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-06-02 17:38:23 +02:00
Christian Marangi
37ff0ea726 mvebu: disable polling delay for passive trip point for puzzle thermal
We don't have any passive trip point hence we can set the polling delay
for passive trip to 0 effectively disabling this polling.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-06-01 16:40:10 +01:00
Christian Marangi
611413cc3f mvebu: split thermal zone for puzzle chassis
Split thermal zone for puzzle chassis. Thermal platform supports only
one sensor per thermal zone.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-06-01 16:40:10 +01:00
Christian Marangi
e5c7b5ec43 mvebu: fix missing property in puzzle thermal
Fix missing property in puzzle thermal. The thing was never supposed to
work.

Property #thermal-sensor-cells was missing from the puzzle hwmon, making
the entire thermal platform referencing that fail to probe with -EINVAL.

The puzzle hwmon expose 2 termistor but they probably use an userspace
downstream utility to configure and handle thermal. For this reason we
really don't know what they use the sensor for or when it's attached.

We use them to sensor if the Chassis gets too hot due to ambient
temperature and generic components getting too warm.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-06-01 16:40:10 +01:00
Daniel Golle
ac783b419b mvebu: improve thermal management of IEI Puzzle devices
- Make step_wise thermal governor respect hysteresis
   This is done by importing a downstream patch, backporting the same feature
   now present in Linux v6.10+ would be too messy.
 - Introduce thermal zone for the WT61P803 uC (chassis and board sensors)
 - Introduce thermal zones for AQR NBase-T PHYs
 - No longer modify existing SoC thermal zones (which are now only in charge
   for emergency shutdown, and can be interrupt driven instead of polled)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-06-01 16:40:10 +01:00
David Bauer
dbc9596c7e mpc85xx: add label-mac for HP MSM460
Signed-off-by: David Bauer <mail@david-bauer.net>
2024-06-01 16:53:17 +02:00
David Bauer
af329ec389 mpc85xx: add support for Hewlett Packard MSM460
Hardware
--------
CPU:  Freescale P1020 2xe500 PPC
RAM:  256M DDR3 (Micron MT41J64M16JT-15E:G "D9MNJ")
NAND: 128M (Micron 2CA1)
BTN:  1x Reset
LED:  Power - ETH - Radio1 - Radio2
UART: RJ-45 Cisco Pinout - 115200 8N1

Installation
------------
NOTE: You can find a repo with up-to-date instructions as well as
the required files here:

https://github.com/blocktrron/msm460-flashing

Required files
==============
You need a command-files as well as a U-Boot image.

The command-file has the following content (padded to 131072 bytes).

If you copy paste these, remove the newlines!

```
U-BOOT setenv ethaddr 02:03:04:05:06:07; setenv ipaddr 192.168.1.1;
setenv serverip 192.168.1.66; tftpboot 0x3000000 msm460-uboot.bin;
nand device; nand erase 0 0xC0000; nand write 0x3000000 0x0 0xC0000; reset
```

You can download the required U-Boot from this repository:

https://github.com/blocktrron/u-boot-msm/releases

Preparation
===========
Prepare a TFTP server serving two files:

 - U-Boot NAND image as `msm460-uboot.bin`.
 - OpenWrt factory image as `msm460-factory.bin`
 - Command-file names `commands.tftp`

You can start a TFTP server in the current directory using dnsmasq:

```bash
sudo dnsmasq --no-daemon --listen-address=0.0.0.0 \
    --port=0 --enable-tftp=enxd0 --tftp-root="$(pwd)" \
    --user=root --group=root
```
Replace `enxd0` with the name of your network interface.

Procedure
=========
1. Assign yourself the IP-Address 192.168.1.66/24.
3. Connect the Router to the PC while keeping the reset button
   pressed.
4. The LEDs will eventually begin to flash.
   They will start to flash faster after around 15 seconds.
5. Release the reset button.
6. Start a new shell
7. Make sure you are currently in the directory where the tftp server
   is located.
8. Run the following command:

```bash
tftp 192.168.1.1 -m binary -c put commands.tftp nflashd.cccc9999
```

You get the message "Transfer timed out."
To find out if you have been successful, please check the
blinking LED Pattern.

Signed-off-by: David Bauer <mail@david-bauer.net>
2024-06-01 14:41:11 +02:00
David Bauer
7d768a9ba6 mpc85xx: add compressed zImage for mpc85xx
Add a universal zImage which can be loaded by mpc85xx boards at
load address 0x3000000. This allows boards to boot kernels larger than
16MB even if the image is loaded temporarily from NAND at offset
0x1000000 which some bootloaders do by default.

Signed-off-by: David Bauer <mail@david-bauer.net>
2024-06-01 14:37:43 +02:00
Zoltan HERPAI
8619d7af67 kirkwood: add D-Link DNS-320L support
Dual-slot NAS based on Marvell Kirkwood.

Specifications:
 - Marvell 88F6702 @1GHz
 - 256Mb RAM
 - 128Mb NAND
 - 1x GbE LAN (Marvell 88E1318R)
 - 1x USB 2.0
 - 2x SATA
 - Weltrend WT69P3 ("supervisor" MCU chip)
 - Serial on J2 (115200,8n1)
 - Newer bootROM so kwboot-ing via serial is possible

Notes:
 - The Weltrend MCU is controlled by the package added in utils/dns320l-mcu.
 - The original MAC address is stored in the "mini firmware" image's first
   17 bytes.
 - Compared to the original MTD layout, the uImage+rootfs are now stored in
   a common ubi partition.

Installation:
1. Serial console
 - Connect your levelshifter to the serial console
   on J2 (refer to the wiki page for pinout)
2. Update u-boot
 - Download the u-boot.kwb image for the device
 - Powercycle the NAS
 - Run "kwboot -b u-boot-dns320l/u-boot.kwb /dev/ttyUSB0 -p"
 - Connect to the serial console with minicom
 - tftp 0x0800000 u-boot-dns320l/u-boot.kwb
   (Please note that "PHY reset timed out" seems to be customary
    on kirkwood devices, the egiga0 interface works regardless.)
 - nand erase 0x0 100000
 - nand write 0x0800000 0x0 0x100000
 - reset
3. Install OpenWrt
 - Boot up the initramfs image
 - tftpboot 0x800000 openwrt-kirkwood-generic-dlink_dns320l-initramfs-uImage; bootm 0x800000
 - Download the sysupgrade image and perform sysupgrade

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
Reviewed-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-06-01 01:29:09 +02:00
Christian Marangi
a39d9693e6
imagebuilder: fix broken IB_STANDALONE option
Fix broken IB_STANDALONE option for OPKG due to an error in ifdef logic
where we weren't adding the required entry to reference the local files
in repositories.conf

Rework the ifdef to more explicit and restore original functionality of
this option.

While at it also provide different README for APK or OPKG.

Fixes: d788ab376f ("build: add APK package build capabilities")
Link: https://github.com/openwrt/openwrt/pull/15599
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-05-31 15:48:00 +02:00
Tomasz Maciej Nowak
b1bddb1d35 tegra: enable VDE driver
Upstream commit 83b7f0b8aeab ("ARM: tegra: Add OPP tables and power
domains to Tegra20 device-trees") added power domains to all devices
supporting power management and one of them is Video Decoder Engine.
Because of lacking driver for VDE, its power gate couldn't be driven
which inhibited reboot of the whole device.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2024-05-31 14:38:17 +02:00
Tomasz Maciej Nowak
192ab0903f tegra: add testing 6.6 kernel
Preliminary support.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2024-05-31 14:38:17 +02:00
Tomasz Maciej Nowak
4ff770e763 tegra: 6.6: refresh config and patches
Simple refresh to get rid of any fuzz and drop serial patch. With few
bug fixes around tegra serial driver the spurious IRQ didn't appear any
more during test. Let's see how long that'll last.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2024-05-31 14:38:17 +02:00
Tomasz Maciej Nowak
2f7b5d5472 kernel/tegra: Restore kernel files for v5.15
This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2024-05-31 14:38:17 +02:00
Tomasz Maciej Nowak
b693eca468 kernel/tegra: Create kernel files for v6.6 (from v5.15)
This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2024-05-31 14:38:17 +02:00
Tomasz Maciej Nowak
c1a09173ab tegra: refresh 5.15 config
Reduce diffstat in kernel config on new version introduction.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2024-05-31 14:38:17 +02:00
Daniel Golle
2a25c6ace8 ramips: get rid of downstream network device label patch
Use a simple Shell script like on filogic target to get rid of downstream
patch for the Ethernet driver which was rejected upstream long ago.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-31 13:26:54 +01:00
Daniel Golle
983222605c mediatek: filogic: avoid sub-shell invovation in netdev rename loop
Rename network devices to their label set in DT without invocation of
a sub-shell.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-31 13:26:54 +01:00
Hauke Mehrtens
77bfe5441e x86: Activate CONFIG_FB_DEVICE
This adds the legacy /dev/fb* device file for kernel 6.6 again.
Linux upstream commit 701d2054fa31 ("fbdev: Make support for
userspace interfaces configurable") made this configurable and we
deactivated this option by default for kernel 6.6. On x86 we are not
space constrained and some users need this legacy interface.

Fixes: #15222
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-05-31 11:25:48 +02:00
Mieczyslaw Nalewaj
50e26e6fd7 x86: drop 6.1 support
Drop configs, files and patches for Linux 6.1.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-05-30 22:47:59 +02:00
Mieczyslaw Nalewaj
06d5d7b7bf x86: use kernel 6.6 by default
Switch to Linux kernel version 6.6.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-05-30 22:47:59 +02:00
Hauke Mehrtens
fd47fdf527 armsr: Remove kernel 6.1 configuration
Armsr is using kernel 6.6 by default now, remove configuration for
kernel 6.1.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-05-30 22:44:57 +02:00
Hauke Mehrtens
00f7b252c5 armsr: Use kernel 6.6 by default
All 2 subtargets are compiling fine and booting up in qemu.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-05-30 22:44:57 +02:00
Daniel Golle
a1a9572f43 generic: 6.6: net: sfp-bus: fix SFP mode detect from bitrate
Backport commit fixing detection of SFP modules which has been broken
since Linux 6.4 for some modules.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-30 12:06:26 +01:00
Daniel Golle
f3d2829b51 generic: backport accepted and pending patches for mtk_eth_soc
Backport a bunch of fixes and improvements for WED and PPE, mostly
for MT7988.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-30 10:49:59 +01:00
Daniel Golle
8730f9e536 generic: move accepted patches for mtk_eth_soc to backport-6.6
In preparation to update to upcoming Linux 6.6.33 move accepted patches
from mediatek target to backport folder, so moving to newer Linux 6.6
releases becomes easier and also other patches on top can be applied
more easily.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-30 10:49:46 +01:00
Daniel Golle
bc59bf2a35 kernel: add missing patch header
Make sure all patches can again be applied using 'git am' on the
corresponding linux-stable git tree.

Fixes: a7ae4ed0a3 ("kernel: fix tools build breakage on macos with x86")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-30 10:49:46 +01:00
John Audia
10d77b9bc3 kernel: bump 6.6 to 6.6.31
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.31

Removed upstreamed:
	backport-6.6/600-v6.9-01-net-gro-parse-ipv6-ext-headers-without-frag0-invalid.patch[1]
	backport-6.6/600-v6.9-02-net-gro-fix-udp-bad-offset-in-socket-lookup-by-addin.patch[2]
	backport-6.6/600-v6.9-03-net-gro-add-flush-check-in-udp_gro_receive_segment.patch[3]
	backport-6.6/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch[4]
	pending-6.6/681-net-bridge-fix-multicast-to-unicast-with-fraglist-GS.patch[5]
	pending-6.6/682-net-core-reject-skb_copy-_expand-for-fraglist-GSO-sk.patch[6]
	pending-6.6/684-net-bridge-fix-corrupted-ethernet-header-on-multicas.patch[7]
	pending-6.6/778-net-l2tp-drop-flow-hash-on-forward.patch[8]
	pending-6.6/440-mtd-don-t-look-for-OTP-legacy-NVMEM-cells-if-proper-.patch[9a,b]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=7f7b0ebb37afc5070d122318e3651d7cb8c4f01c
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=af276a5ac8e938c8b058e3e124073cc1e322d98b
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=78b6092d78341e423e5f6afae4d9f401b561aca7
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=26e2fe4cab10e67f116f4a2eecc393824bb294b8
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=65fbc7a11d063236e1f1dcebb38eeaa3ccbe2dbc
6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=cfe34d86ef9765c388f145039006bb79b6c81ac6
7. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=1ce60741d7e17dcf707e3bdebed4442ae30bdd02
8. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=23e25d2fc777cd0cc77c2f857f93e9b13ee789b9
9a. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=cce311f8bbbf9d24eacc39af3228cd104e079396
9b. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/drivers/mtd/mtdcore.c?id=v6.6.31&id2=v6.6.30

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>
2024-05-30 00:04:12 +02:00
Zoltan HERPAI
46ce2a36d8 d1: drop 6.1 support
Now that 6.6 is the default, remove the 6.1 config and patches.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-05-29 17:56:28 +02:00
Zoltan HERPAI
745ad016d1 d1: switch default to 6.6
Switch the default kernel to 6.6.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-05-29 17:56:28 +02:00
Zoltan HERPAI
e78a0cf3ce d1: 6.6: set testing kernel
Allow selecting 6.6 as testing kernel on d1.

Runtime-tested: Nezha D1

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-05-29 17:56:28 +02:00
Zoltan HERPAI
8b1d74371b d1: refresh kernel config
Refresh kernel config, and enable thermal features.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-05-29 17:56:28 +02:00
Zoltan HERPAI
2e0b000e0e d1: remove upstreamed patches and add new patchset
Remove patches that were upstreamed, and backport features from
later kernels.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-05-29 17:56:28 +02:00
Zoltan HERPAI
766570d60b kernel/d1: Restore kernel files for v6.1
This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-05-29 17:56:28 +02:00
Zoltan HERPAI
99fcc90270 kernel/d1: Create kernel files for v6.6 (from v6.1)
This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-05-29 17:56:28 +02:00
Shiji Yang
db49d995bb ramips: modules: remove symbol CONFIG_DW_DMAC_PCI
The DW_DMAC_PCI symbol won't be automatically selected at all.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-05-29 10:41:49 +02:00
Shiji Yang
2240320d7f ramips: gdma: remove slave_id field
Fix compile error:
drivers/dma/ralink-gdma.c: In function 'gdma_dma_config':
drivers/dma/ralink-gdma.c:197:40: error: 'struct dma_slave_config' has no member named 'slave_id'
  197 |                 chan->slave_id = config->slave_id;
      |                                        ^~
drivers/dma/ralink-gdma.c:206:40: error: 'struct dma_slave_config' has no member named 'slave_id'
  206 |                 chan->slave_id = config->slave_id;
      |                                        ^~
make[8]: *** [scripts/Makefile.build:243: drivers/dma/ralink-gdma.o] Error 1

ref: https://lore.kernel.org/all/20211122222203.4103644-1-arnd@kernel.org/

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-05-29 10:41:49 +02:00
Shiji Yang
ccd50abd9f ramips: add back the gdma driver
The gdma driver has been removed from the upstream. Let's move it
to the local files. This patch also removed unsupported compatible
string and sub-target.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-05-29 10:41:49 +02:00
Daniel Golle
4f078bf377 mediatek: add missing ';;' in shell switch case block
Add missing ';;' to the end of shell switch case statement.

Fixes: c71b68acdd ("mediatek: filogic: add Adtran SmartRG Mount Stuart series")
Reported-by: @gl-dude
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-28 23:51:38 +01:00
Hauke Mehrtens
3a2706ed10 malta: Remove kernel 6.1 configuration
Malta is using kernel 6.6 by default now, remove configuration for
kernel 6.1.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-05-28 22:10:53 +02:00
Hauke Mehrtens
5f0e591349 malta: Use kernel 6.6 by default
All 4 subtargets are compiling fine and booting up in qemu.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-05-28 22:10:52 +02:00
Nick Hainke
9ec3b11d37 lantiq: disable building of ZyXEL P-2812HNU F1
Disable image building for the board, since the kernel of the main branch
is to big to fit into the kernel partition.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2024-05-28 08:06:10 +02:00
Martin Schiller
7514d9bb6f lantiq: switch to kernel 6.1
Let's switch the lantiq target to use kernel 6.1 by default.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-05-27 15:46:13 +02:00
Tomasz Maciej Nowak
f7f8099aa3 ath79: add support for Dell SonicPoint ACe APL26-0AE
Dell/SonicWall APL26-0AE (marketed as SonicPoint ACe) is a dual band
wireless access point. End of life as of 2022-07-31.

Specification
SoC: QualcommAtheros QCA9550
RAM: 256 MB DDR2
Flash: 32 MB SPI NOR
WIFI: 2.4 GHz 3T3R integrated
      5 GHz 3T3R QCA9890 oversized Mini PCIe card
Ethernet: 2x 10/100/1000 Mbps QCA8334
          port labeled lan1 is PoE capable (802.3at)
USB: 1x 2.0
LEDs: LEDs: 6x which 5 are GPIO controlled and two of them are dual color
Buttons: 2x GPIO controlled
Serial: RJ-45 port, SonicWall pinout
        baud: 115200, parity: none, flow control: none

Before flashing, be sure to have a copy of factory firmware, in case You
wish to revert to original firmware.
All described procedures were done in following environment:
ROM Version: SonicROM (U-Boot) 8.0.0.0-11o
SafeMode Firmware Version: SonicOS 8.0.0.0-14o
Firmware Version: SonicOS 9.0.1.0
In case of other versions, following installation instructions might be
ineffective.

Installation
1. Prepare TFTP server with OpenWrt sysupgrade image and rename that
   image to "sp_fw.bin".
2. Connect to one of LAN ports.
3. Connect to serial port.
4. Hold the reset button (small through hole on side of the unit),
   power on the device and when prompted to stop autoboot, hit any key.
   The held button can now be released.
5. Alter U-Boot environment with following commands:
    setenv bootcmd bootm 0x9F110000
    saveenv
6. Adjust "ipaddr" (access point, default is 192.168.1.1) and "serverip"
   (TFTP server, default is 192.168.1.10) addresses in U-Boot
   environment, then run following commands:
    tftp 0x80060000 sp_fw.bin
    erase 0x9F110000 +0x1EF0000
    cp.b 0x80060000 0x9F110000 $filesize
7. After successful flashing, execute:
    boot
8. The access point will boot to OpenWrt. Wait few minutes, until the
    wrench LED will stop blinking, then it's ready for configuration.

Known issues
Initramfs image can't be bigger than specified kernel size, otherwise
bootloader will throw LZMA decompressing error. Switching to lzma-loader
should workaround that.
This device has Winbond 25Q256FVFG and doesn't have reliable reset, which
causes hang on reboot, thus broken-flash-reset needs to be added. This
property addition causes dispaly of "scary" warning on each boot, take
this warnig into consideration.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2024-05-27 00:32:57 +02:00
Mieczyslaw Nalewaj
1a2fc49b71 ramips: samknows whitebox v8: set wifi frequency
Set the 2.4GHz frequency for WiFi.

Fixes: #15391
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-05-25 20:20:30 +02:00
Pawel Dembicki
1b24cbeede layerscape: add 6.6 testing kernel
Support is ready. Let's enable 6.6 as testing version.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-05-25 20:18:23 +02:00
Pawel Dembicki
d73a66be61 layerscape: adjust dts path in image scripts
After the spliting dts folder of ARM architecture in upstream,
layerscape routines need to be adjusted for new solution.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-05-25 20:18:23 +02:00
Pawel Dembicki
ec956af626 layerscape: refresh 6.6 config
Mostly done by 'make kernel_oldconfig'.

armv8_64b has added one entry manually:
CONFIG_CRYPTO_CURVE25519=y

as workaround for error:
aarch64-openwrt-linux-musl-ld: crypto/crypto_engine.o: in function
	`crypto_engine_register_kpp':
crypto_engine.c:687: undefined reference to `crypto_register_kpp'
crypto_engine.c:687:(.text+0x57c): relocation truncated to fit:
	R_AARCH64_CALL26 against undefined symbol `crypto_register_kpp'
aarch64-openwrt-linux-musl-ld: crypto/crypto_engine.o: in function
	`crypto_engine_unregister_kpp':
crypto/crypto_engine.c:693: undefined reference to `crypto_unregister_kpp'
crypto_engine.c:693:(.text+0x5a0): relocation truncated to fit:
	R_AARCH64_CALL26 against undefined symbol `crypto_unregister_kpp'

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-05-25 20:18:23 +02:00
Pawel Dembicki
c9ecca141a generic: kernel add 6.6 missing symbols
Found durring works on layerscape.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-05-25 20:18:23 +02:00
Pawel Dembicki
347212085b layerscape: kernel: refresh 6.6 patches
Taken refreshed version from Layerscape 6.6 tree:
302-arm64-dts-ls1012a-update-with-ppfe-support.patch
304-arm64-dts-ls1012a-rdb-workaround-by-updating-qspi-fl.patch
400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch
701-staging-add-fsl_ppfe-driver.patch
702-phy-Add-2.5G-SGMII-interface-mode.patch
704-net-phylink-treat-PHY_INTERFACE_MODE_2500SGMII-in-ph.patch

Removed:
704-net-phylink-treat-PHY_INTERFACE_MODE_2500SGMII-in-ph.patch (meld
into 702)

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-05-25 20:18:23 +02:00
Pawel Dembicki
af1fc05cad kernel/layerscape: Restore kernel files for v6.1
This is an automatically generated commit which aids following Kernel patch history,
as git will see the move and copy as a rename thus defeating the purpose.

See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
for the original discussion.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-05-25 20:18:23 +02:00
Pawel Dembicki
0a22ccaad6 kernel/layerscape: Create kernel files for v6.6 (from v6.1)
This is an automatically generated commit.

During a `git bisect` session, `git bisect --skip` is recommended.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2024-05-25 20:18:23 +02:00
INAGAKI Hiroshi
34c875cf8b mvebu: add support for Fortinet FortiWiFi 51E
Fortinet FortiWiFi 51E (FWF-51E) is a UTM with 1x WLAN and 1x SSD, based
on Armada 385 (88F6820).

Specification:

- SoC          : Marvell Armada 385 88F6820
- RAM          : DDR3 2 GiB (4x Micron MT41K512M8DA-107, "D9SGQ")
- Flash        : SPI-NOR 128 MiB (Macronix MX66L1G45GMI-10G)
- SSD          : mSATA SSD 32 GB (A-DATA XM21E (AXM21ES3-32GM-B))
  - mode       : SATA III 6Gbps
  - power      : 3.3 VDC, 3.1 W (Max.)
- Ethernet     : 7x 10/100/1000 Mbps
  - LAN 1-5    : Marvell 88E6176
  - WAN 1, 2   : Marvell 88E1512 (2x)
- WLAN         : Fortinet EMP7618-FT (Atheros AR9382 (2T2R))
  - interface  : MiniPCIe
- LEDs/Keys    : 18x/1x
- UART         : "CONSOLE" port (RJ-45, RS-232C level)
  - port       : ttyS0
  - settings   : 9600bps 8n1
  - assignment : 1:NC , 2:NC , 3:TXD, 4:GND,
                 5:GND, 6:RXD, 7:NC , 8:NC
  - note       : compatible with Cisco console cable
- HW Monitoring: nuvoTon NCT7802Y
- Power        : 12 VDC, 2 A
  - plug       : Molex 5557-02R

Flash instruction using initramfs image:

 1. Power on FWF-51E and interrupt to show bootmenu
 2. Call "[I]: System information." -> "[S]: Set serial port baudrate."
    and set baudrate to 9600 bps
 3. Call "[R]: Review TFTP parameters.", check TFTP parameters and
    connect computer to "Image download port" in the parameters
 4. Prepare TFTP server with the parameters obtained above
 5. Rename OpenWrt initramfs image to "image.out" and put to TFTP
    directory
 6. Call "[T]: Initiate TFTP firmware transfer." to download initramfs
    image from TFTP server
 7. Type "R" key when the following message is showed, to boot initramfs
    image without flashing to spi-nor flash

    "Save as Default firmware/Backup firmware/Run image without saving:[D/B/R]?"

 8. On initramfs image, backup mtd if needed

    minimum:

    - "firmware-info"
    - "kernel"
    - "rootfs"

 9. On initramfs image, upload sysupgrade image to the device and perform
    sysupgrade
10. Wait ~200 seconds to complete flashing and rebooting.
    If the device is booted with stock firmware, login to bootmenu and
    call "[B]: Boot with backup firmware and set as default." to set the
    first OS image as default and boot it.

Notes:

- Both colors of Bi-color LEDs on the front panel cannot be turned on at
  the same time.

- "PWR" and "Logo" LEDs are connected to power source directly.

- The following partitions are added for OpenWrt.
  These partitions are contained in "uboot" partition (0x0-0x1fffff) on
  stock firmware.

  - "firmware-info"
  - "dtb"
  - "u-boot-env"
  - "board-info"

Image header for bootmenu tftp:

  0x0 - 0xf  : ?
 0x10 - 0x2f : Image Name
 0x30 - 0x17f: ?
0x180 - 0x183: Kernel Offset*
0x184 - 0x187: Kernel Length*
0x188 - 0x18b: RootFS Offset (ext2)*
0x18c - 0x18f: RootFS Length (ext2)*
0x190 - 0x193: DTB Offset
0x194 - 0x197: DTB Length
0x198 - 0x19b: Data Offset (jffs2)
0x19c - 0x19f: Data Length (jffs2)
0x1a0 - 0x1ff: ?

*: required for initramfs image

MAC addresses:

(eth0): 90:6C:AC:xx:xx:98 (board-info (OpenWrt), 0xd880 (hex))
WAN 1 : 90:6C:AC:xx:xx:99
WAN 2 : 90:6C:AC:xx:xx:9A
LAN 1 : 90:6C:AC:xx:xx:9B
LAN 2 : 90:6C:AC:xx:xx:9C
LAN 3 : 90:6C:AC:xx:xx:9D
LAN 4 : 90:6C:AC:xx:xx:9E
LAN 5 : 90:6C:AC:xx:xx:9F
WLAN  : 88:DC:96:xx:xx:xx (MiniPCIe Card)

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Tested-by: Raylynn Knight <rayknight@me.com>
2024-05-25 20:03:00 +02:00
INAGAKI Hiroshi
26a2135c6d mvebu: add support for Fortinet FortiWiFi 50E-2R
Fortinet FortiWiFi 50E-2R (FWF-50E-2R) is a UTM with 2x WLAN, based on
Armada 385 (88F6820).

Specification:

- SoC          : Marvell Armada 385 88F6820
- RAM          : DDR3 2 GiB (4x Nanya NT5CC512M8EN-EK)
- Flash        : SPI-NOR 128 MiB (Macronix MX66L1G45GMI-10G)
- Ethernet     : 7x 10/100/1000 Mbps
  - LAN 1-5    : Marvell 88E6176
  - WAN 1, 2   : Marvell 88E1512 (2x)
- WLAN         : Gemtek WMDQ-177ACN (Qualcomm Atheros QCA9892 (2T2R))
                 (2x)
  - interface  : MiniPCIe
- LEDs/Keys    : 18x/1x
- UART         : "CONSOLE" port (RJ-45, RS-232C level)
  - port       : ttyS0
  - settings   : 9600bps 8n1
  - assignment : 1:NC , 2:NC , 3:TXD, 4:GND,
                 5:GND, 6:RXD, 7:NC , 8:NC
  - note       : compatible with Cisco console cable
- HW Monitoring: nuvoTon NCT7802Y
- Power        : 12 VDC, 2.5 A
  - plug       : Molex 5557-02R

Flash instruction using initramfs image:

 1. Power on FWF-50E-2R and interrupt to show bootmenu
 2. Call "[I]: System information." -> "[S]: Set serial port baudrate."
    and set baudrate to 9600 bps
 3. Call "[R]: Review TFTP parameters.", check TFTP parameters and
    connect computer to "Image download port" in the parameters
 4. Prepare TFTP server with the parameters obtained above
 5. Rename OpenWrt initramfs image to "image.out" and put to TFTP
    directory
 6. Call "[T]: Initiate TFTP firmware transfer." to download initramfs
    image from TFTP server
 7. Type "R" key when the following message is showed, to boot initramfs
    image without flashing to spi-nor flash

    "Save as Default firmware/Backup firmware/Run image without saving:[D/B/R]?"

 8. On initramfs image, backup mtd if needed

    minimum:

    - "firmware-info"
    - "kernel"
    - "rootfs"

 9. On initramfs image, upload sysupgrade image to the device and perform
    sysupgrade
10. Wait ~200 seconds to complete flashing and rebooting.
    If the device is booted with stock firmware, login to bootmenu and
    call "[B]: Boot with backup firmware and set as default." to set the
    first OS image as default and boot it.

Notes:

- Both colors of Bi-color LEDs on the front panel cannot be turned on at
  the same time.

- "PWR" and "Logo" LEDs are connected to power source directly.

- The following partitions are added for OpenWrt.
  These partitions are contained in "uboot" partition (0x0-0x1fffff) on
  stock firmware.

  - "firmware-info"
  - "dtb"
  - "u-boot-env"
  - "board-info"

Image header for bootmenu tftp:

  0x0 - 0xf  : ?
 0x10 - 0x2f : Image Name
 0x30 - 0x17f: ?
0x180 - 0x183: Kernel Offset*
0x184 - 0x187: Kernel Length*
0x188 - 0x18b: RootFS Offset (ext2)*
0x18c - 0x18f: RootFS Length (ext2)*
0x190 - 0x193: DTB Offset
0x194 - 0x197: DTB Length
0x198 - 0x19b: Data Offset (jffs2)
0x19c - 0x19f: Data Length (jffs2)
0x1a0 - 0x1ff: ?

*: required for initramfs image

MAC addresses:

(eth0): 90:6C:AC:xx:xx:98 (board-info (OpenWrt), 0xd880 (hex))
WAN 1 : 90:6C:AC:xx:xx:99
WAN 2 : 90:6C:AC:xx:xx:9A
LAN 1 : 90:6C:AC:xx:xx:9B
LAN 2 : 90:6C:AC:xx:xx:9C
LAN 3 : 90:6C:AC:xx:xx:9D
LAN 4 : 90:6C:AC:xx:xx:9E
LAN 5 : 90:6C:AC:xx:xx:9F
WLAN 1: 1C:49:7B:xx:xx:xx (MiniPCIe Card)
WLAN 2: 1C:49:7B:xx:xx:xx (MiniPCIe Card)

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Tested-by: Raylynn Knight <rayknight@me.com>
2024-05-25 20:03:00 +02:00
INAGAKI Hiroshi
38d6c99dc0 mvebu: add support for Fortinet FortiGate 52E
Fortinet FortiGate 52E (FG-52E) is a UTM, based on Armada 385 (88F6820).

Specification:

- SoC          : Marvell Armada 385 88F6820
- RAM          : DDR3 2 GiB (4x Micron MT41K512M8DA-107, "D9SGQ")
- Flash        : SPI-NOR 128 MiB (Macronix MX66L1G45GMI-10G)
- SSD          : mSATA SSD 64 GB (2x A-DATA XM21E (AXM21ES3-32GM-B))
  - mode       : SATA III 6Gbps
  - power      : 3.3 VDC, 3.1 W (Max.)
- Ethernet     : 7x 10/100/1000 Mbps
  - LAN 1-5    : Marvell 88E6176
  - WAN 1, 2   : Marvell 88E1512 (2x)
- LEDs/Keys    : 18x/1x
- UART         : "CONSOLE" port (RJ-45, RS-232C level)
  - port       : ttyS0
  - settings   : 9600bps 8n1
  - assignment : 1:NC , 2:NC , 3:TXD, 4:GND,
                 5:GND, 6:RXD, 7:NC , 8:NC
  - note       : compatible with Cisco console cable
- HW Monitoring: nuvoTon NCT7802Y
- Power        : 12 VDC, 2.5 A
  - plug       : Molex 5557-02R

Flash instruction using initramfs image:

 1. Power on FG-52E and interrupt to show bootmenu
 2. Call "[I]: System information." -> "[S]: Set serial port baudrate."
    and set baudrate to 9600 bps
 3. Call "[R]: Review TFTP parameters.", check TFTP parameters and
    connect computer to "Image download port" in the parameters
 4. Prepare TFTP server with the parameters obtained above
 5. Rename OpenWrt initramfs image to "image.out" and put to TFTP
    directory
 6. Call "[T]: Initiate TFTP firmware transfer." to download initramfs
    image from TFTP server
 7. Type "R" key when the following message is showed, to boot initramfs
    image without flashing to spi-nor flash

    "Save as Default firmware/Backup firmware/Run image without saving:[D/B/R]?"

 8. On initramfs image, backup mtd if needed

    minimum:

    - "firmware-info"
    - "kernel"
    - "rootfs"

 9. On initramfs image, upload sysupgrade image to the device and perform
    sysupgrade
10. Wait ~200 seconds to complete flashing and rebooting.
    If the device is booted with stock firmware, login to bootmenu and
    call "[B]: Boot with backup firmware and set as default." to set the
    first OS image as default and boot it.

Notes:

- Both colors of Bi-color LEDs on the front panel cannot be turned on at
  the same time.

- "PWR" and "Logo" LEDs are connected to power source directly.

- The following partitions are added for OpenWrt.
  These partitions are contained in "uboot" partition (0x0-0x1fffff) on
  stock firmware.

  - "firmware-info"
  - "dtb"
  - "u-boot-env"
  - "board-info"

Image header for bootmenu tftp:

  0x0 - 0xf  : ?
 0x10 - 0x2f : Image Name
 0x30 - 0x17f: ?
0x180 - 0x183: Kernel Offset*
0x184 - 0x187: Kernel Length*
0x188 - 0x18b: RootFS Offset (ext2)*
0x18c - 0x18f: RootFS Length (ext2)*
0x190 - 0x193: DTB Offset
0x194 - 0x197: DTB Length
0x198 - 0x19b: Data Offset (jffs2)
0x19c - 0x19f: Data Length (jffs2)
0x1a0 - 0x1ff: ?

*: required for initramfs image

MAC addresses:

(eth0): 90:6C:AC:xx:xx:98 (board-info (OpenWrt), 0xd880 (hex))
WAN 1 : 90:6C:AC:xx:xx:99
WAN 2 : 90:6C:AC:xx:xx:9A
LAN 1 : 90:6C:AC:xx:xx:9B
LAN 2 : 90:6C:AC:xx:xx:9C
LAN 3 : 90:6C:AC:xx:xx:9D
LAN 4 : 90:6C:AC:xx:xx:9E
LAN 5 : 90:6C:AC:xx:xx:9F

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2024-05-25 20:03:00 +02:00
INAGAKI Hiroshi
d406498e1b mvebu: add support for Fortinet FortiGate 51E
Fortinet FortiGate 51E (FG-51E) is a UTM, based on Armada 385 (88F6820).

Specification:

- SoC          : Marvell Armada 385 88F6820
- RAM          : DDR3 2 GiB (4x Micron MT41K512M8DA-107, "D9SGQ")
- Flash        : SPI-NOR 128 MiB (Macronix MX66L1G45GMI-10G)
- SSD          : mSATA SSD 32 GB (A-DATA XM21E (AXM21ES3-32GM-B))
  - mode       : SATA III 6Gbps
  - power      : 3.3 VDC, 3.1 W (Max.)
- Ethernet     : 7x 10/100/1000 Mbps
  - LAN 1-5    : Marvell 88E6176
  - WAN 1, 2   : Marvell 88E1512 (2x)
- LEDs/Keys    : 18x/1x
- UART         : "CONSOLE" port (RJ-45, RS-232C level)
  - port       : ttyS0
  - settings   : 9600bps 8n1
  - assignment : 1:NC , 2:NC , 3:TXD, 4:GND,
                 5:GND, 6:RXD, 7:NC , 8:NC
  - note       : compatible with Cisco console cable
- HW Monitoring: nuvoTon NCT7802Y
- Power        : 12 VDC, 2.5 A
  - plug       : Molex 5557-02R

Flash instruction using initramfs image:

 1. Power on FG-51E and interrupt to show bootmenu
 2. Call "[I]: System information." -> "[S]: Set serial port baudrate."
    and set baudrate to 9600 bps
 3. Call "[R]: Review TFTP parameters.", check TFTP parameters and
    connect computer to "Image download port" in the parameters
 4. Prepare TFTP server with the parameters obtained above
 5. Rename OpenWrt initramfs image to "image.out" and put to TFTP
    directory
 6. Call "[T]: Initiate TFTP firmware transfer." to download initramfs
    image from TFTP server
 7. Type "R" key when the following message is showed, to boot initramfs
    image without flashing to spi-nor flash

    "Save as Default firmware/Backup firmware/Run image without saving:[D/B/R]?"

 8. On initramfs image, backup mtd if needed

    minimum:

    - "firmware-info"
    - "kernel"
    - "rootfs"

 9. On initramfs image, upload sysupgrade image to the device and perform
    sysupgrade
10. Wait ~200 seconds to complete flashing and rebooting.
    If the device is booted with stock firmware, login to bootmenu and
    call "[B]: Boot with backup firmware and set as default." to set the
    first OS image as default and boot it.

Notes:

- Both colors of Bi-color LEDs on the front panel cannot be turned on at
  the same time.

- "PWR" and "Logo" LEDs are connected to power source directly.

- The following partitions are added for OpenWrt.
  These partitions are contained in "uboot" partition (0x0-0x1fffff) on
  stock firmware.

  - "firmware-info"
  - "dtb"
  - "u-boot-env"
  - "board-info"

Image header for bootmenu tftp:

  0x0 - 0xf  : ?
 0x10 - 0x2f : Image Name
 0x30 - 0x17f: ?
0x180 - 0x183: Kernel Offset*
0x184 - 0x187: Kernel Length*
0x188 - 0x18b: RootFS Offset (ext2)*
0x18c - 0x18f: RootFS Length (ext2)*
0x190 - 0x193: DTB Offset
0x194 - 0x197: DTB Length
0x198 - 0x19b: Data Offset (jffs2)
0x19c - 0x19f: Data Length (jffs2)
0x1a0 - 0x1ff: ?

*: required for initramfs image

MAC addresses:

(eth0): 70:4C:A5:xx:xx:98 (board-info (OpenWrt), 0xd880 (hex))
WAN 1 : 70:4C:A5:xx:xx:99
WAN 2 : 70:4C:A5:xx:xx:9A
LAN 1 : 70:4C:A5:xx:xx:9B
LAN 2 : 70:4C:A5:xx:xx:9C
LAN 3 : 70:4C:A5:xx:xx:9D
LAN 4 : 70:4C:A5:xx:xx:9E
LAN 5 : 70:4C:A5:xx:xx:9F

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Tested-by: Raylynn Knight <rayknight@me.com>
2024-05-25 20:03:00 +02:00
INAGAKI Hiroshi
f69d96a8e5 mvebu: separate common parts to new dtsi for FortiGate/FortiWiFi 5xE
Add a new dtsi which contains the common parts of Fortinet
FortiGate/FortiWiFi 5xE series devices.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2024-05-25 20:03:00 +02:00
INAGAKI Hiroshi
77663df754 mvebu: separate common parts to new dtsi for FortiGate/FortiWiFi 3xE
Add a new dtsi which contains the common parts of Fortinet
FortiGate/FortiWiFi 3xE series devices.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2024-05-25 20:03:00 +02:00
INAGAKI Hiroshi
73be4b9e48 mvebu: rename common dtsi of FortiGate 30E/50E
Rename the common dtsi of Fortinet FortiGate 30E/50E for the preparation
of adding support for the other FortiGate/FortiWiFi 3xE/5xE devices.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2024-05-25 20:03:00 +02:00
INAGAKI Hiroshi
0618eae506 mvebu: add common image definition for FortiGate devices
Add a common definition of Fortinet FortiGate devices to
image/cortexa9.mk for a preparation of adding support for
other FortiGate 3xE/5xE devices.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2024-05-25 20:02:59 +02:00
Kristian Skramstad
c5b7ec8cee ath79: qca9563: add support for Amplifi Router HD
Hardware:
    SoC: Qualcomm Atheros QCA956X ver 1 rev 0
    CPU clock: 775.000 MHz
    Memory: 128 MB DDR2
    Flash: 32 MB SPI NOR mx25l25635e
    Switch: Atheros AR8327 rev. 4
    Ethernet: 5x 10/100/1000 Mbps (1 WAN + 4 LAN)
    Buttons: 1x Reset
    Serial: TX, RX, GND, VCC
    Baudrate: 115200
    Wifi: Qualcomm Atheros qca988x 802.11ac/n - 3x3
          Qualcomm Atheros AR9561 802.11b/g/n - 3x3

Not working:
    Leds: 1x via a SPI controller
    Display: ST7789V or ILI9341V
    controlled by stm32f205.

Note:
    DSA changes are ready, but we have an issue with
    ports not working after 20-30 minutes. So for now
    we use swconfig.

Installation: serial connection only
There is a J11 four pin connector. You need to connect TX, RX and GND.
You can find very good information about the device here
https://github.com/alexanderhenne/AFi-R?tab=readme-ov-file#finding-j11

Upgrading via serial port:
1.  Download the kernel initramfs image. Copy the image to a TFTP server
2.  Connect to console on the AP, and connect the LAN1 port to your PC LAN
3.  Stop autoboot to get to U-boot shell
    Interrupt the autoboot process by pressing any key when prompted
4.  Transfer the kernel image with TFTP
    Set your ip address on your TFTP server to 192.168.1.254
    # tftpboot 0x81000000 amplifi-router-hd-initramfs-kernel.bin
5.  Load the image
    # bootm 0x81000000
6.  SCP sysupgrade image from your PC to the Amplifi HD
    (If you use a newer mac use scp -O)
    # scp openwrt-ath79-generic-ubnt_amplifi-router-hd-squashfs-sysupgrade.bin root@192.168.1.1:/tmp/
7.  Write sysupgrade to the firmware partition
    # mtd write /tmp/openwrt-ath79-generic-ubnt_amplifi-router-hd-squashfs-sysupgrade.bin firmware
8.  Reboot your device
    # reboot

Credit to alexanderhenne for all the information.

Signed-off-by: Kristian Skramstad <kristian+github@83.no>
2024-05-25 19:52:42 +02:00
INAGAKI Hiroshi
50ae9337d6 ramips: add support for ELECOM WRC-X1800GS
ELECOM WRC-X1800GS is a 2.4/5 GHz band 11ax (Wi-Fi 6) router, based on
MT7621A.

Specification:

- SoC               : MediaTek MT7621A
- RAM               : DDR3 256 MiB
- Flash             : RAW-NAND 128 MiB (Macronix MX30LF1G28AD-TI)
- WLAN              : 2.4/5 GHz 2T2R (MediaTek MT7915D)
- Ethernet          : 5x 10/100/1000 Mbps
  - switch          : MediaTek MT7530 (SoC)
- LEDs/Keys (GPIO)  : 7x/4x
- UART              : pin-header on PCB ("J5")
  - arrangement     : 3.3V, TX, RX, NC, GND from tri-angle marking
  - settings        : 115200n8
- Power             : 12 VDC, 1 A

Flash instruction using initramfs-factory image:

1. Boot WRC-X1800GS 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. After flashing initramfs-factory image and reboot, upload the
   sysupgrade image and perform sysupgrade with it
5. Wait ~120 seconds to complete flashing

Notes:

- WRC-X1800GS has 2x os images. Those are switched on every firmware
  updating on stock firmware, but dual-boot feature on this device
  cannot be handled on OpenWrt. So the 1st image is always used on
  OpenWrt.
  This is controlled by "bootnum" variable embedded in "persist"
  partition (addr: 0x4).

- WRC-X1800GS has 2x HW revisions. There are some small changes, but the
  same DeviceTree in stock firmware is used for both revisions.
  On this support of WRC-X1800GS, 2x green:wlan-2g-N LEDs are defined
  for each revision and the same default triggers are set.

MAC addresses:

LAN    : 38:97:A4:xx:xx:38 (Factory, 0x1fdfa (hex) / Ubootenv, ethaddr (text))
WAN    : 38:97:A4:xx:xx:3B (Factory, 0x1fdf4 (hex))
2.4 GHz: 38:97:A4:xx:xx:39
5 GHz  : 38:97:A4:xx:xx:3A

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2024-05-25 19:33:28 +02:00
INAGAKI Hiroshi
cd2a6906da ramips: parameterize some values in Build/znet-header
Parameterize magic number and header length to use the device-specific
values.

example:

On WRC-X1800GS, an additional ELECOM-specific header and a magic number
"COMC" are required.

Stock FW v1.18:

$ hexdump -n $((0x40080)) -C wrc-x1800gs_v1.18.bin
00000000  45 4c 45 43 4f 4d 00 00  57 52 43 2d 58 31 38 30  |ELECOM..WRC-X180|
00000010  30 47 53 00 00 00 00 00  00 00 00 00 00 00 00 00  |0GS.............|
00000020  00 00 00 00 00 00 00 00  31 2e 31 38 00 00 00 00  |........1.18....|
00000030  00 00 00 00 00 00 00 00  43 4f 4d 43 04 00 ac 00  |........COMC....|
00000040  40 f0 49 74 b1 e8 6a ca  e4 20 65 1f 34 2e 30 34  |@.It..j.. e.4.04|
00000050  28 58 56 46 2e 31 29 62  31 37 00 00 00 00 00 00  |(XVF.1)b17......|
00000060  00 00 00 00 00 00 00 00  ff ff ff ff ff ff ff ff  |................|
00000070  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00040000  d0 0d fe ed 00 36 9c c0  00 00 00 38 00 36 9a e0  |.....6.....8.6..|
00040010  00 00 00 28 00 00 00 11  00 00 00 10 00 00 00 00  |...(............|
00040020  00 00 00 6c 00 36 9a a8  00 00 00 00 00 00 00 00  |...l.6..........|
00040030  00 00 00 00 00 00 00 00  00 00 00 01 00 00 00 00  |................|
00040040  00 00 00 03 00 00 00 04  00 00 00 62 65 54 97 8f  |...........beT..|
00040050  00 00 00 03 00 00 00 28  00 00 00 00 4d 49 50 53  |.......(....MIPS|
00040060  20 4f 70 65 6e 57 72 74  20 46 49 54 20 28 46 6c  | OpenWrt FIT (Fl|
00040070  61 74 74 65 6e 65 64 20  49 6d 61 67 65 20 54 72  |attened Image Tr|
00040080

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2024-05-25 19:33:28 +02:00
Ryan Castellucci
85f6f88223 ipq40xx: eap1300: add eap1300ext as alt model
The EnGenius EAP1300 and EAP1300EXT use identical boards and firmware
(as flashed) from the vendor.

As with the EAP1300, the EAP1300EXT requires a specific firmware version
to flash OpenWRT. Unfortunately, the required firmware is truncated on
the vendor's website.

A working file can be created as follows:

```
curl \
https://www.engeniustech.com/wp_firmware/eap1300-all-v3.5.3.5_c1.9.04.bin \
| perl -pe 's/\x09EAP1300_A/\x0cEAP1300EXT_A/' \
> eap1300ext-all-v3.5.3.5_c1.9.04.bin
```

The file should have sha256:
`58a1197a426139a12b03fd432334e677124cbe3384349bd7337f2ee71f1dcfd4`.

Please see commit 2b4ac79 for further
details.

The vendor firmware must be decrypted before it can be flashed from
OpenWRT. A tool able to do that is available from:

https://github.com/ryancdotorg/enfringement/blob/main/decrypt.py

Signed-off-by: Ryan Castellucci <code@ryanc.org>
2024-05-25 18:37:09 +02:00
Leon M. Busch-George
a55ab9e134 mediatek: filogic: prevent faulty mac address assignment
The vendor U-Boot on the Cudy M3000 and the Yuncore AX835 assign random
mac addresses on boot and set the 'local-mac-address' property which
prevents Openwrt from assigning the correct address from evmem.

This patch removes the alias for ethernet0 so that U-Boot doesn't add the
property, removes the workaround from 02_network, and adds back the nvmem
definition for the M3000.

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
2024-05-25 12:41:26 +02:00
Linus Walleij
e7661a808e ixp4xx: Add back support for D-Link DSM G600 A
OpenWrt supported the D-Link DSM G600 A in the past. It has
64 MB of RAM and 16 MB of flash so it will run just fine,
and should be quite usable with a rootfs on an external
harddrive.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-05-25 09:17:19 +02:00
Linus Walleij
869bbdb8f6 ixp4xx: Add back support for Freecom FSG-3
OpenWrt supported the Freecom FSG-3 in the past. It has
64 MB of RAM so will run fine, but the bare 4 MB of flash
makes it a non-default target. The generated compressed
image is currently below 4MB (just 3.3 MB) though, so it
should be possible to flash just fine with a rootfs on
a harddrive or USB stick, which is what the FSG-3 used
in the past as well.

The device has a WAN port on eth0 and three LAN ports on
eth1. The LAN ports are probably a DSA switch but the
old OpenWrt base never activated that, instead it relies
on boot defaults.

Due to questionable usablity without tweaking and further
work this image is not built by default, but made available
for developers who know what they are doing.

The TAR+CRC image generation is a rewritten version of the
earlier support code.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-05-25 09:17:10 +02:00
Linus Walleij
4220f75d1e ixp4xx: Add back support for Iomega NAS100D
OpenWrt supported the Iomega NAS100D in the past and it has
64 MB of RAM so if booted from a harddrive it will probably
work just fine. The APEX boot loader already has a build
variant for this machine that we can just pick up and use.

This device has a single ethernet port so bring this online
with DHCP as expected for a NAS device.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-05-25 09:16:45 +02:00
Linus Walleij
e824864ede ixp4xx: Add ext4 and rootfs-part to features
Several of the IXP4xx machines mount root on external harddrives
so add EXT4 and rootfs-part to the featureset so the right
features are always selected.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-05-25 09:16:34 +02:00
Daniel Golle
c71b68acdd mediatek: filogic: add Adtran SmartRG Mount Stuart series
Common specifications:
 * Mediatek MT7988A (4x Cortex-A73, up to 1.8 GHz clock speed)
 * 8 GiB eMMC
 * 2 GiB DDR4 RAM
 * 1x 10000M/1000M/100M + 3x 1000M/100M/10M LAN ports
 * MT7996 Tri-band (2.4G, 5G, 6G) 4T4R 802.11be Wi-Fi
 * Airoha AG3352 GPS
 * Renesas DA14531MOD Bluetooth
 * 2 buttons (Reset, Mesh/WPS)
 * uC-controlled RGB LED via I2C
 * 2x LED for each 1G port, 3x LED for each 10G port
 * USB 3.0 type A port
 * 3.3V-level 115200 baud UART console via 4-pin Dupont connector
   exposed at the bottom of the device
 * USB-C PD power input

SDG-8733: 1x 10000M/1000M/100M WAN port
SDG-8734: 1x USXGMII/10GBase-R/5GBase-R/2500Base-X/1000Base-X/SGMII SFP+

Both models are also available in versions including 2x FXS POTS interfaces
for analog phones. Those interfaces are not supported by OpenWrt.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-24 18:34:13 +01:00
Daniel Golle
c82e106313 mediatek: fix sysupgrade config backup on Adtran SmartRG devices
Add missing call to emmc_copy_config which either writes the sysupgrade
tar.gz backup file or clears the existing rootfs_data overlay.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-24 18:34:13 +01:00
Daniel Golle
cccf98c7e8 generic: 6.6: backports and add LED support for Aquantia PHYs
Backport patch adding support for the AQR114C PHY and add support for
PHY LEDs and polarity setting of Aquantia 3rd and 4th generation PHYs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-24 18:34:13 +01:00
Andrey Bondar
febcfadc80 ath79: add support for 8Devices Carambola3 board
Carambola3 is a WiFi module based on Qualcomm/Atheros QCA4531
http://wiki.8devices.com/carambola3

Specification:

    - 650/600/216 MHz (CPU/DDR/AHB)
    - 128 MB of RAM (DDR2)
    - 32 MB of FLASH
    - 2T2R 2.4 GHz
    - 2x 10/100 Mbps Ethernet
    - 1x USB 2.0 Host socket
    - UART for serial console
    - 12x GPIO

Flash instructions:

    Upgrading from ar71xx target:
    - Upload image into the board:
        scp openwrt-ath79-generic-8dev_carambola3-squashfs-sysupgrade.bin \
          root@192.168.1.1/tmp/
    - Run sysupgrade
        sysupgrade -F /tmp/openwrt-ath79-generic-8dev_carambola3-squashfs-sysupgrade.bin

Upgrading from u-boot:
    - Set up tftp server with openwrt-ath79-generic-8dev_carambola3-initramfs-kernel.bin
    - Go to u-boot (reboot and press ESC when prompted)
    - Set TFTP server IP
        setenv serverip 192.168.1.254
    - Set device ip from the same subnet
        setenv ipaddr 192.168.1.1
    - Copy new firmware to board
        tftpboot 0x82000000 initramfs.bin
    - Boot OpenWRT
        bootm 0x82000000
    - Upload image openwrt-ath79-generic-8dev_carambola3-squashfs-sysupgrade.bin into the board
    - Run sysupgrade.

Signed-off-by: Andrey Bondar <a.bondar@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/15514
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-24 11:29:23 +02:00
Lea Teuberth
2a2f53415e ramips: add support for TP-Link Archer MR200v5
Specifications:
	CPU:     MT7628AN 580MHz
	RAM:     64MB DDR2
	FLASH:   8MB EN25QH64 NOR SPI
	WIFI:    2.4GHz 2x2 MT7628 b/g/n internal
	WIFI:    5GHz 1x1 MT7610E ac/n PCI
	LTE:     Qualcomm MDM9207
	ETH:     4xLAN 100base-T integrated
	SWITCH:  RT3050-ESW Port 0,1,2,3: LAN, Port 6: CPU
	LEDS:    LAN, WAN, Power, 3x signal strength, WiFi
	BTNS:    Reset, WiFi toggle
	UART:    Near ETH ports, Vcc-GND-RX-TX, 115200, 8N1

Installation:
	1. Update using recovery mode
        - set your IP to 192.168.0.225, subnet mask: 255.255.255.0
        - start tftp server, rename tftp-recovery.bin to
          tp_recovery.bin and place it into the server's directory
        - while holdig the "reset" button, power on the device
        - keep holding "reset" until the file is being transferred

Notes:
	This board has only one MAC address programmed
        in the "romfile" partition:
        - MAC for phy0 (2.4GHz) at romfile 0xf100 (0)
        - MAC for phy1 (5GHz) at romfile 0xf100 (-1)
        - stock firmware re-uses phy0 MAC for ethernet
        - stock firmware uses romfile 0xf100 (1) for WWAN;
          not used since QMI interface is raw IP

Signed-off-by: Lea Teuberth <lea.teuberth@outlook.com>
2024-05-23 22:46:26 +02:00
Rafał Miłecki
e83a5618d4 mediatek: include "kmod-mt7915e" package per device
mt7915e driver supports MT7915 & MT7916 devices and MT7981 & MT7986
on-SoC wireless controllers. Devices based on MT7988 and possibly other
next chipsets are quite unlikely to need it (MT7988 was designed to be
used with MT7996).

Move kmod-mt7915e to DEVICE_PACKAGES of relevant devices.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-05-23 12:24:48 +02:00
Robert Marko
4a78c46cbd ipq40xx: dont panic on PSGMII calibration fail
Currently, in case that PSGMII calibration fails it will panic the kernel
which is not ideal and is preventing any debugging to be done.

So, since PGMII calibration failing only means that wired networking wont
work lets convet the panic() call to dev_error.

Link: https://github.com/openwrt/openwrt/pull/15542
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-22 17:24:17 +02:00
Andrew Smith
0f5c28b96b qualcommax: ipq807x support Netgear Orbi Pro SXK80
This commit adds support for Netgear Orbi Pro SXR80 and SXS80 (collectively known as SXK80)

Specifications:
---------------
* CPU: Qualcomm IPQ8074A Quad core Cortex-A53
* RAM: 1024MB
* Storage: SPI-NAND 512 MiB (Winbond W29N04GZ)
* Ethernet: 4x 1G RJ45 ports (QCA8075) 1x 2.5G RJ45 LAN/WAN (QCA8081)
* WLAN:
    - 2.4 GHz: Qualcomm QCN5024 4x4
    - 2x 5 GHz: Qualcomm QCN5054 4x4 (second radio high channels only)
* LEDs:
    - Power: (Green and red)
    - Front: (Blue, green, red and white)
* Buttons:
    - 1x Soft reset
    - 1x Sync/WPS
* Power: 12V DC Jack

Installation instructions (Telnet):
-----------------------------------

*Note, this guide assumes SXR80, for SXS80 change the firmware file name as appropriate

1. Put firmware file openwrt-qualcommax-ipq807x-netgear_sxr80-initramfs-uImage.itb in root of TFTP server available at 192.168.1.10.
2. Enable telnet by going to http://[ip of device]/debug.htm and clicking on the tickbox 'Enable telnet'
3. Telnet into the device and login using the same username and password as the web interface:
4. Run the following command:

`fw_setenv bootcmd 'env default -a; saveenv; reset'`

5. Reboot the router, once the web interface is available again re-enable telnet via http://[ip of device]/debug.htm and telnet into the device.

6. Run the following command:

`fw_printenv`

It should look similar to the below:

```
baudrate=115200
bootargs=console=ttyMSM0,115200n8
bootcmd=mii write 0x0 0x0 0x800; sleep 1; nmrp; bootdni; boot_DNI_secureboot
bootdelay=2
ipaddr=192.168.1.1
netmask=255.255.255.0
serverip=192.168.1.10
soc_version_major=2
soc_version_minor=0
```

**If you see the message:**
`Warning: Bad CRC, using default environment`
**DO NOT CONTINUE, YOU WILL BRICK YOUR DEVICE**

7. Run the following command:

`fw_setenv originalboot 'mii write 0x0 0x0 0x800; sleep 1; nmrp; bootdni; boot_DNI_secureboot'`

(This should match what's in the bootcmd variable displayed in step 6)

8. Run the following commands:
```
fw_setenv wrttftp 'mii write 0x0 0x0 0x800; sleep 1; nmrp; if tftpboot openwrt-qualcommax-ipq807x-netgear_sxr80-initramfs-uImage.itb; then bootm; fi; bootdni; boot_DNI_secureboot'
fw_setenv wrtboot 'mii write 0x0 0x0 0x800; sleep 1; nmrp; nand read 0x40000000 0x1980000 0x06d00000; bootm 0x40000000'
fw_setenv bootcmd 'run wrttftp'
```

9. Ensure SXR/S device is attached via ethernet (LAN port) to the same ethernet segment as the TFTP server.

10. Reboot the device, it should reboot into OpenWrt and be available on 192.168.1.1

11. Once OpenWrt has booted, update the bootcmd using the following command:

`fw_setenv bootcmd 'run wrtboot'`

12. Flash the sysupgrade image

13. It should boot into OpenWrt

References to SXK80 GPL source:
https://www.downloads.netgear.com/files/GPL/SXK80-V3.2.0.108_gpl_src.tar.bz2.zip

Signed-off-by: Flole Systems <flole@flole.de>
Signed-off-by: Andrew Smith <gul.code@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/14939
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-22 14:51:36 +02:00
Robert Marko
cd9241db23 qualcommax: ipq807x: sax1v1k: fix QCA8081 reset
It seems that on Spectrum SAX1V1K QCA8081 is being brought out of reset
too quickly and thus causing it to get stuck in an invalid autoneg
register configuration mode.

Setting an deasset delay seems to fix this, so lets set it.

Fixes: #15493
Link: https://github.com/openwrt/openwrt/pull/15541
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-21 20:15:03 +02:00
John Crispin
dd58ad968a mediatek/filogic: add OpenWrt One support
Specification:
 - MT7981 CPU using 2.4GHz and 5GHz WiFi (both AX)
 - 1GB RAM
 - 16MB NOR
 - 128MB NAND
 - 3 LEDs (red, green, blue, white)
 - 2 buttons (reset, user defined)
 - 1 2.5Gbit WAN port (Airoha EN8811h)
 - 1 1Gbit LAN ports
 - 1 single lane M.2 SSD slot
 - 1 mikroBus socket
 - externel HW WDT (25s refresh time)
 - i2c RTC (with battery backup)

Serial Interface
 - UBS-C CDC-ACM
 - 3 Pins GND, RX, TX
 - Settings: 115200, 8N1

MAC addresses are not populated on the early samples.

Signed-off-by: John Crispin <john@phrozen.org>
2024-05-21 11:35:38 +02:00
John Crispin
47d308a46c Revert "mediatek/filogic: add OpenWrt One support"
This reverts commit 797904b3cb.

There is a stray line in the commit description

Signed-off-by: John Crispin <john@phrozen.org>
2024-05-21 11:35:28 +02:00
John Crispin
797904b3cb mediatek/filogic: add OpenWrt One support
filogic: Add support for D-Link AQUILA PRO AI M30

Specification:
 - MT7981 CPU using 2.4GHz and 5GHz WiFi (both AX)
 - 1GB RAM
 - 16MB NOR
 - 128MB NAND
 - 3 LEDs (red, green, blue, white)
 - 2 buttons (reset, user defined)
 - 1 2.5Gbit WAN port (Airoha EN8811h)
 - 1 1Gbit LAN ports
 - 1 single lane M.2 SSD slot
 - 1 mikroBus socket
 - externel HW WDT (25s refresh time)
 - i2c RTC (with battery backup)

Serial Interface
 - UBS-C CDC-ACM
 - 3 Pins GND, RX, TX
 - Settings: 115200, 8N1

MAC addresses are not populated on the early samples.

Signed-off-by: John Crispin <john@phrozen.org>
2024-05-21 10:40:20 +02:00
John Crispin
6e060300fc mediatek/filogic: enable led PWM driver by default
Signed-off-by: John Crispin <john@phrozen.org>
2024-05-21 10:26:06 +02:00
John Crispin
27286ed524 mediatek/filogic: fix mt7981.dtsi PCIe support
* the compatible string was wrong
* the pinmux was missing

Signed-off-by: John Crispin <john@phrozen.org>
2024-05-21 10:26:06 +02:00
Linus Walleij
2eef4f7354 ixp4xx: Bump to kernel v6.6
The IXP4xx is well supported upstream and can readily be
supported with kernel v6.6. To simplify things after the
DTS directory was renamed, switch to v6.6 only.

Bring in some outstanding patches.

Tested on the Gateworks GW2348-4.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-05-20 21:04:08 +02:00
Linus Walleij
70e81efe93 gemini: In-flight ethernet patches
These patches have partial acceptance upstream and are still
a WIP, now there is merge window for kernel v6.10 so these
will not be reposted until that is over. In the meantime,
let's add the current state to OpenWrt so the ethernet on
Gemini is up and working (tested on several devices).

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-05-19 22:06:11 +02:00
Christian Marangi
5d37d8dc82
imagebuilder: fix multiple issue with manifest and sign keys handling
Fix multiple issue with manifest handling where APK was hardcoded
and fix a logic error where (TODO) APK _check_keys was called for the
OPKG codepath instead of correctly calling for the APK codepath.

Fixes: d788ab376f ("build: add APK package build capabilities")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-05-19 14:58:11 +02:00
Felix Fietkau
ba245d6bca mediatek: add firmware name for AQR PHYs on mt7988a-rfb
Fixes PHY probe in case there is no firmware in a connected EEPROM

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-19 09:47:04 +02:00
Felix Fietkau
59ac0440b1 mediatek: convert mt7988a-rfb to keep bl31/uboot in UBI
Add ubi volumes for mt7988a-rfb and support for using factory data
for Ethernet MAC addresses and MT7996 WLAN calibration data.
Also add rootdisk handle. Removes the need to keep using nmbm

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-19 09:47:04 +02:00
Paul Spooren
d788ab376f build: add APK package build capabilities
A new option called `USE_APK` is added which generated APK packages
(.apk) instead of OPKG packages (.ipk).

Some features like fstools `snapshot` command are not yet ported

Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-05-17 23:21:26 +03:00
Tomasz Maciej Nowak
6a29d32d8a tegra: trimslice: enable USB HID driver
Without serial or network access the only option for initial
configuration, is a attached display with USB keyboard, but the keyboard
driver needs to be installed first. So enable keyboard driver by default
to avoid this issue.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2024-05-17 17:04:24 +03:00
Tomasz Maciej Nowak
6660a15d72 tegra: trimslice: enable GPIO LEDs driver
LEDs are on all the time since boot, until there's driver to claim them.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2024-05-17 17:04:24 +03:00
Tomasz Maciej Nowak
a0c5efd3f7 tegra: drop console specifiers from kernel commad line
Because recent changes to procd, last "console" argument was used as
primary argument and causing no terminal to be spawned on serial
interface. So drop the hardcoded consoles in boot script, since dts has
already an alias specified, which lets procd decide where to spawn the
terminal.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2024-05-17 17:04:24 +03:00
Tomasz Maciej Nowak
82353d3e3d tegra: pad rootfs to recreate overlay after upgrade
The old overlay remained after upgrades and would cause failure on first
boot after upgrade, in which no new overlay could be created while old
one was unusable.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2024-05-17 17:04:24 +03:00
Paweł Owoc
9bdaebaff3 qualcommax: ipq807x: add support for Linksys MX8500
Hardware specification:
========
SoC: Qualcomm IPQ8072A
Flash: 512MB (Fidelix FMND4G08S3J-ID)
RAM: 1GB (2x Kingston DDR3L D2516ECMDXGJD)
Ethernet: 1x 10/100/1000/2500/5000Mbps (Marvell AQR114C)
Ethernet: 4x 10/100/1000Mbps (Qualcomm QCA8075)
WiFi1: 6GHz ax 4x4 (Qualcomm QCN9024 + Skyworks SKY85784-11) - channels 33-229
WiFi2: 5GHz ax 4x4 (Qualcomm QCN5054 + Skyworks SKY85755-11) - channels 36-177
WiFi3: 2.4GHz ax 4x4 (Qualcomm QCN5024 + Skyworks SKY8340-11)
IoT: Bluetooth 5, Zigbee and Thread (NXP K32W041)
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_mx8500-squashfs-factory.bin image.
More details can be found here: https://www.linksys.com/support-article?articleNum=47547
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_mx8500-squashfs-factory.bin kernel
and in case of 1:
- mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx8500-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_mx8500-squashfs-factory.bin
or in case of 1:
- flash_erase /dev/mtd23 0 0
- nandwrite -p /dev/mtd23 openwrt-qualcommax-ipq807x-linksys_mx8500-squashfs-factory.bin
After first boot install firmware on second partition:
- mtd -r -e kernel -n write openwrt-qualcommax-ipq807x-linksys_mx8500-squashfs-factory.bin kernel
or:
- mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx8500-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_mx8500-initramfs-uImage.itb of=/dev/sda
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_mx8500-squashfs-factory.bin kernel
and:
- mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx8500-squashfs-factory.bin alt_kernel

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

5. USB recovery:
Put the initramfs image on the USB:
- dd bs=1M if=openwrt-qualcommax-ipq807x-linksys_mx8500-initramfs-uImage.itb of=/dev/sda
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'

AQR firmware:
========
1. Firmware loading:
To properly load the firmware and initialize AQR PHY, we must use the u-boot aq_load_fw function.
To do this, you need to modify u-boot env:
With USB recovery:
- fw_setenv bootcmd 'aq_load_fw; run bootusb; if test $auto_recovery = no; then bootipq; elif test $boot_part = 1; then run bootpart1; else run bootpart2; fi'
and without:
- fw_setenv bootcmd 'aq_load_fw; if test $auto_recovery = no; then bootipq; elif test $boot_part = 1; then run bootpart1; else run bootpart2; fi'

2. Firmware updating:
Newer firmware (AQR-G4_v5.6.5-AQR_WNC_SAQA-L2_GT_ID45287_VER24005.cld) is available in the latest OEM firmware.
To load this firmware via u-boot, we need to add the MBN header and update 0:ethphyfw partition.
For MBN header we can use script from this repository: https://github.com/testuser7/aqr_mbn_tool
- python aqr_mbn_tool.py AQR-G4_v5.6.5-AQR_WNC_SAQA-L2_GT_ID45287_VER24005.cld
To update partition we need to install kmod-mtd-rw package first:
- insmod mtd-rw.ko i_want_a_brick=1
- mtd -e /dev/mtd26 -n write aqr_fw.mbn /dev/mtd26

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14883
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-16 20:27:36 +02:00
Paweł Owoc
7f1c87ebde qualcommax: ipq807x: define common Linksys MX device
Define common Linksys MX device for MX4200v1/v2 and MX5300.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14883
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-16 20:27:36 +02:00
Paweł Owoc
a7c068b935 generic: 6.6: add patch to support AQR114C PHY ID
Add support for AQR114C PHY ID.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14883
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-16 20:27:36 +02:00
Paweł Owoc
b32a17e82d qualcommax: ipq807x: Remove unused gpio from QPIC pins
Remove gpio16 from the default NAND pinctrl configuration
as its unused and only needed for LCD.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14883
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-16 20:27:36 +02:00
Robert Marko
96e402aef7 ipq806x: mr42/mr52: fix PCIe ports
All three PCIe ports are reported non working on Meraki MR42/MR52 boards
since kernel 6.1 with the issue of PCIe PHY link never coming up thus
no WLAN cards are available on the boards.

After debugging it seems that PCIe worked on 5.15 and older purely by
accident as device DTS was using /delete-property/ perst-gpios; in each
of the 3 PCIe nodes but there was no "perst-gpios" property in the SoC DTSI
as it was still using the older "perst-gpio" property so it was not getting
removed from the device DTS.

However, in kernel 6.1 commit ("ARM: dts: qcom-*: replace deprecated
perst-gpio with perst-gpios") updated all Qualcomm DTS-es to use the newer
"perst-gpios" and thus once ipq806x moved to 6.1 PCIe stopped working as
now that property was being dropped from the device DTS.

So, since the removal of PERST pins seems to have been wrong from the start
lets drop the property removal from MR42/MR52.

Fixes: #15408
Link: https://github.com/openwrt/openwrt/pull/15509
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-16 19:28:16 +02:00
Robert Marko
f12179fa15 generic: 6.6: remove kernel export stripping patch
Our kernel export stripping has been broken on 6.6 from the start since
upstream kernel really reworked stuff in ("kbuild: generate KSYMTAB entries
by modpost") and other commits as well.

So, until this is either fixed or reworked lets drop the patch as it doesnt
make sense to carry it knowing its broken and it can always be easily
restored.

Link: https://github.com/openwrt/openwrt/pull/15498
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-16 15:12:53 +02:00
Hauke Mehrtens
9c84d619fc ramips: Fix use mac-base for TP-Link TL-MR6400 v4 and v5
Use mac-base for mac-base TP-Link TL-MR6400 v4 and v5

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-05-16 13:11:08 +03:00
Hauke Mehrtens
ff3d0de095 ramips: Fix wmac dts definition for TP-Link TL-MR6400 v4 and v5
This code assumed that the mt7628an_tplink_8m.dtsi file defines
mediatek,mtd-eeprom for the wmac and sets status to okay.

The mediatek,mtd-eeprom definition was removed in commit e93f41adee
("ramips: convert MT7628 EEPROM to NVMEM format") but the dts for these
two devices was not adapted to include the eeprom position on its own.

The status = "okay" property was removed in 0a1d15642f ("ramips:
mt7628: use nvmem-layout"), but the property was not added to these dts
files.

Without this change wifi does not work for these devices.

Fixes: e93f41adee ("ramips: convert MT7628 EEPROM to NVMEM format")
Fixes: 0a1d15642f ("ramips: mt7628: use nvmem-layout")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-05-16 13:11:08 +03:00
Martin Schiller
cffd3ad8d7 lantiq: add patch to fix the reset gpio handling in the pci driver
Linux kernel commit 90c2d2eb7ab5 ("MIPS: pci: lantiq: switch to using
gpiod API") not only switched to the gpiod API, but also inverted /
changed the polarity of the GPIO.

According to the PCI specification, the RST# pin is an active-low
signal. However, most of the device trees that have been widely used for
a long time (mainly in the openWrt project) define this GPIO as
active-high and the old driver code inverted the signal internally.

Apparently there are actually boards where the reset gpio must be
operated inverted. For this reason, we cannot use the GPIOD_OUT_LOW/HIGH
flag for initialization. Instead, we must explicitly set the gpio to
value 1 in order to take into account any "GPIO_ACTIVE_LOW" flag that
may have been set.

In order to remain compatible with all these existing device trees, we
should therefore keep the logic as it was before the commit.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-05-15 08:54:58 +02:00
Martin Schiller
faaa54161e lantiq: dts: add missing irqs to mei node on AmazonSE, Danube and AR9
This adds to missing DyingGasp and USB OC interrupts to the mei node.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-05-15 08:54:58 +02:00
Martin Schiller
ece380cf28 lantiq: vmmc kernel-in-tree driver: use platform_get_irq to get irqs
This is required for linux-6.1 compatibility.

IRQs are not automatically mapped from HW to virtual IRQ numbers when
the IRQ domain is registered. This happens when the IRQ number is read
from the device tree based on the IRQ domain from the device tree now.
In kernel 5.15 it was done when the IRQ domain was registered.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-05-15 08:54:58 +02:00
Martin Schiller
83fccc42df lantiq: old gptu timer driver: use platform_get_irq to get irqs
This is required for linux-6.1 compatibility.

IRQs are not automatically mapped from HW to virtual IRQ numbers when
the IRQ domain is registered. This happens when the IRQ number is read
from the device tree based on the IRQ domain from the device tree now.
In kernel 5.15 it was done when the IRQ domain was registered.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-05-15 08:54:58 +02:00
Martin Schiller
db4bb19679 lantiq: ifxmips_pcie: use platform_get_irq to get irqs from dts
This is required for linux-6.1 compatibility.

IRQs are not automatically mapped from HW to virtual IRQ numbers when
the IRQ domain is registered. This happens when the IRQ number is read
from the device tree based on the IRQ domain from the device tree now.
In kernel 5.15 it was done when the IRQ domain was registered.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-05-15 08:54:58 +02:00
Martin Schiller
1825ea9098 lantiq: dts: vr9: add missing interrupts to pcie node
This adds the missing interrupts to the pcie node.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-05-15 08:54:58 +02:00
Martin Schiller
284f12bfa6 lantiq: ifxmips_pcie: use dev_err_probe
Use dev_err_probe() to get rid of the following warning which is
seen when the PCIe PHY has not been probed yet:
pcie-xrx200 1d900000.pcie: failed to get the PCIe PHY

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-05-15 08:54:58 +02:00
Hauke Mehrtens
783c3aace2 lantiq: Add some gswip patches
This backports some patches for the gswip switch driver.

I copied them from this repository:
https://github.com/xdarklight/linux/commits/lantiq-gswip-integration-20221022

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
[drop some patches which may break functionality at the moment]
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-05-15 08:54:58 +02:00
Hauke Mehrtens
e79dacd962 lantiq: Fix bug in error handling of timer driver
If the reverted timer driver fails to allocate interrupts handle the
error better.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
[moved printk before the cleanup for-loop]
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-05-15 08:54:58 +02:00
Hauke Mehrtens
a3659b158b lantiq: Refresh patches and configuration
Make all the patches apply and delete the ones already integrated into
upstream Linux kernel. This also refreshes some of the kernel
configurations.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
[refreshed for linux 6.1.89]
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-05-15 08:54:58 +02:00
Martin Schiller
e692742be7 lantiq: set Linux 6.1 as testing kernel
Add KERNEL_TESTING_PATCHVER for Linux 6.1.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-05-15 08:54:58 +02:00
Martin Schiller
b704c537cf kernel/lantiq: Restore kernel files for v5.15
This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-05-15 08:54:58 +02:00
Martin Schiller
2196815961 kernel/lantiq: Create kernel files for v6.1 (from v5.15)
This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-05-15 08:54:58 +02:00