Commit Graph

26636 Commits

Author SHA1 Message Date
Luiz Angelo Daros de Luca
1005dc0a64 realtek: add DGS-1210-28 factory image
DGS-1210 switches support dual image, with each image composed of a
kernel and a rootfs partition. For image1, kernel and rootfs are in
sequence. The current OpenWrt image (written using a serial console),
uses those partitions together as the firmware partition, ignoring the
partition division. The current OEM u-boot fails to validate image1 but
it will only trigger firmware recovery if both image1 and image2 fail,
and it does not switch the boot image in case one of them fails the
check.

The OEM factory image is composed of concatenated blocks of data, each
one prefixed with a 0x40-byte cameo header. A normal OEM firmware will
have two of these blocks (kernel, rootfs). The OEM firmware only checks
the header before writing unconditionally the data (except the header)
to the correspoding partition.

The OpenWrt factory image mimics the OEM image by cutting the
kernel+rootfs firmware at the exact size of the OEM kernel partition
and packing it as "the kernel partition" and the rest of the kernel and
the rootfs as "the rootfs partition". It will only work if written to
image1 because image2 has a sysinfo partition between kernel2 and
rootfs2, cutting the kernel code in the middle.

Steps to install:

1) switch to image2 (containing an OEM image), using web or these CLI
   commands:
   - config firmware image_id 2 boot_up
   - reboot
2) flash the factory_image1.bin to image1. OEM web (v6.30.016)
   is crashing for any upload (ssh keys, firmware), even applying OEM
   firmwares. These CLI commands can upload a new firmware to the other
   image location (not used to boot):
   - download firmware_fromTFTP <tftpserver> factory_image1.bin
   - config firmware image_id 1 boot_up
   - reboot

To debrick the device, you'll need serial access. If you want to
recover to an OpenWrt, you can replay the serial installation
instructions. For returning to the original firmware, press ESC during
the boot to trigger the emergency firmware recovery procedure. After
that, use D-Link Network Assistant v2.0.2.4 to flash a new firmware.

The device documentation does describe that holding RESET for 12s
trigger the firmware recovery. However, the latest shipped U-Boot
"2011.12.(2.1.5.67086)-Candidate1" from "Aug 24 2021 - 17:33:09" cannot
trigger that from a cold boot. In fact, any U-Boot procedure that relies
on the RESET button, like reset settings, will only work if started from
a running original firmware. That, in practice, cancels the benefit of
having two images and a firmware recovery procedure (if you are not
consider dual-booting OpenWrt).

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2022-06-28 22:20:09 +02:00
Sven Hauer
7e21ce8e2b ath79: support for TP-Link EAP225 v4
This model is almost identical to the EAP225 v3.
Major difference is the RTL8211FS PHY Chipset.

Device specifications:
* SoC: QCA9563 @ 775MHz
* RAM: 128MiB DDR2
* Flash: 16MiB SPI-NOR
* Wireless 2.4GHz (SoC): b/g/n, 3x3
* Wireless 5Ghz (QCA9886): a/n/ac, 2x2 MU-MIMO
* Ethernet (RTL8211FS): 1× 1GbE, 802.3at PoE

Flashing instructions:
* ssh into target device and run `cliclientd stopcs`
* Upgrade with factory image via web interface

Debricking:
* Serial port can be soldered on PCB J4 (1: TXD, 2: RXD, 3: GND, 4: VCC)
    * Bridge unpopulated resistors R225 (TXD) and R237 (RXD).
      Do NOT bridge R230.
    * Use 3.3V, 115200 baud, 8n1
* Interrupt bootloader by holding CTRL+B during boot
* tftp initramfs to flash via LuCI web interface
    setenv ipaddr 192.168.1.1 # default, change as required
    setenv serverip 192.168.1.10 # default, change as required
    tftp 0x80800000 initramfs.bin
    bootelf $fileaddr

MAC addresses:
MAC address (as on device label) is stored in device info partition at
an offset of 8 bytes. ath9k device has same address as ethernet, ath10k
uses address incremented by 1.

Signed-off-by: Sven Hauer <sven.hauer+github@uniku.de>
2022-06-28 10:58:16 +02:00
Sander Vanheule
7bf73e270e kernel: backport RTL8211F clkout-disable patch
In Linux v5.14 an extra feature was introduced for the RTL8211F phy,
allowing to disable a clock output from the phy. Part of that patch is to
always (soft) reset the phy upon initialisation.

This phy reset is required to have a working ethernet on the TP-Link
EAP225-Outdoor v3 and EAP225 v4 after a reboot. Otherwise the ethernet
port will only function properly on cold boots.

Tested-by: Andre Klärner <kandre@ak-online.be> # EAP225-Outdoor v3
Tested-by: Sven Hauer <sven.hauer+github@uniku.de> # EAP225 v4
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-27 21:56:20 +02:00
Martin Blumenstingl
9d06e5a773 lantiq: dts: td-w8980: Remove duplicate PCI properties
lantiq,bus-clock, interrupt-map-mask and interrupt-map are already
defined with these exact values in vr9.dtsi. Drop them from
vr9_tplink_tdw8980.dts to just have one place where these are
maintained.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2022-06-27 00:57:16 +02:00
Rui Salvaterra
f1cd144482 kernel: bump 5.15 to 5.15.49
Deleted (upstreamed):
generic/backport-5.15/702-v5.19-34-net-ethernet-mtk_eth_soc-fix-misuse-of-mem-alloc-int.patch [1]

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.49&id=fcba12a4308143f1f1dcb0face8b3ffb51edcc5c

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-06-27 00:57:16 +02:00
Rui Salvaterra
b55efebb1f kernel: bump 5.15 to 5.15.47
Deleted (upstreamed):
generic/backport-5.15/702-v5.19-32-net-ethernet-mtk_eth_soc-out-of-bounds-read-in-mtk_h.patch [01]

[01] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.47&id=b24ca1cf846273361d5bd73a35de95a486a54b6d

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
[Removed 702-v5.19-32-net-ethernet-mtk_eth_soc-out-of-bounds-read-in-mtk_h.patch]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-06-27 00:57:16 +02:00
Rui Salvaterra
251a382c28 kernel: bump 5.15 to 5.15.46
Deleted (upstreamed):
generic/backport-5.15/400-mtdblock-warn-if-opened-on-NAND.patch [01]
generic/backport-5.15/420-v5.19-01-mtd-spinand-gigadevice-fix-Quad-IO-for-GD5F1GQ5UExxG.patch [02]
bcm27xx/patches-5.15/950-0029-Revert-mailbox-avoid-timer-start-from-callback.patch [03]
bcm27xx/patches-5.15/950-0417-bcm2711_thermal-Don-t-clamp-temperature-at-zero.patch [04]
bcm27xx/patches-5.15/950-0740-drm-vc4-hvs-Fix-frame-count-register-readout.patch [05]
bcm27xx/patches-5.15/950-0755-drm-vc4-hvs-Reset-muxes-at-probe-time.patch [06]
bcm27xx/patches-5.15/950-0759-drm-vc4-txp-Don-t-set-TXP_VSTART_AT_EOF.patch [07]
bcm27xx/patches-5.15/950-0760-drm-vc4-txp-Force-alpha-to-be-0xff-if-it-s-disabled.patch [08]
bcm53xx/patches-5.15/031-v5.17-0005-ARM-dts-BCM5301X-update-CRU-block-description.patch [09]
mediatek/patches-5.15/102-mt7629-enable-arch-timer.patch [10]

Manually rebased:
bcm27xx/patches-5.15/950-0741-drm-vc4-hvs-Use-pointer-to-HVS-in-HVS_READ-and-HVS_W.patch

[01] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.46&id=f41c9418c5898c01634675150696da290fb86796
[02] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.46&id=d5b66645305c6f3a1b2cf75cee4157b07f293309
[03] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.46&id=119f99209d8531359bcb935f252ec435f9d21b13
[04] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.46&id=c4e1280abead1552e1764684079a43e222ccd163
[05] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.46&id=08465a1889cb48ec64431e9db745b5be15399251
[06] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.46&id=0e26a6da02e63b75b629573d13966c36aa6264f0
[07] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.46&id=01c9020b2e7c85e394879f34851805179ac3d1d8
[08] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.46&id=d47f85cc0171a5d3c5bd8cbb8a98983ca3357cbd
[09] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.46&id=5151f24ac937ff7eb1f078257c66e3c0f0296010
[10] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.46&id=ffea838686b82fbb2801cdfad6ba5309d15c032d

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-06-27 00:57:16 +02:00
Rui Salvaterra
aee1215c0e kernel: 5.15: x86-64: enable CONFIG_SLS
Starting with GCC 12, we have the possibility of mitigating straight-line
speculation vulnerabilities in x86-64 targets. Make it so.

Reported-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-06-27 00:57:16 +02:00
John Audia
53d99fedc7 kernel: bump 5.10 to 5.10.125
All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-06-27 00:57:16 +02:00
John Audia
9e5d743422 kernel: bump 5.10 to 5.10.124
All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-06-27 00:57:15 +02:00
John Audia
9edc514e3d kernel: bump 5.10 to 5.10.122
All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-06-27 00:57:15 +02:00
John Audia
706a4ec40c kernel: bump 5.10 to 5.10.121
Manually rebased:
    oxnas/patches-5.10/100-oxnas-clk-plla-pllb.patch

All other patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-06-27 00:57:15 +02:00
Markus Stockhausen
78b7be9f6c realtek: cleanup LAG logging
Setting up DSA bond silently fails if mode is not 802.3ad. Add log message
to fix it. As we are already here harmonize all logging messages in the
add/delete functions.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2022-06-26 11:02:15 +02:00
Alexandru Gagniuc
4d1fc8916c realtek: EnGenius EWS2910P: add support for SFP ports
The SFP cages 9F and 10F share the same SCL line. Currently, there
isn't a good way to model this. Thus, only one SFP port can be fully
supported.

Cage 10F is fully supported with an I2C bus and sfp handle. Linux
automatically handles enabling or disabling the TX laser.

Cage 9F is only parially supported, without the sfp handle. The SDA
line is hogged as an input, so that it remains high. SCL transitions
sould not affect modules connected to this cage. The default value of
the tx-disable line is high (active). It is exported as a gpio, but
the laser is off by default. To enable the laser:

    echo 0 > /sys/class/gpio/sff-p9-tx-disable/value

Thus, both modules can be used for networking, but only 10F will be
able to detect and identify a plugged in SFP module.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2022-06-25 15:45:30 +02:00
Alexandru Gagniuc
2cfaab4549 realtek: add support for EnGenius EWS2910P
Add support for the Engenius EWS2910P PoE switch. This is an RTL8380
based switch with two SFP slots, and PoE 802.3af one every RJ-45 port.

The specs say 802.3af, but the vendor firmware configures the PSE for
a budget of 31W, indicating 802.3at support.

Specifications:
---------------
* SoC:       Realtek RTL8380M
* Flash:     32 MiB SPI flash Macronix MX25L25635E
* RAM:       256 MiB (As reported by bootloader)
* Ethernet:  16x 10/100/1000 Mbps with PoE
              2x SFP slots
* Buttons:   1 "Reset" button on front panel
             1 "LED mode: button on front panel
             1 "On/Off" Toggle switch on the back
* Power:     48V-54V DC barrel jack
* UART:      1 serial header (JP1) with populated 2.54mm pitch header
             Labeled GRTV for ground, rx, tx, and 3.3V respectively
* PoE:       1 STM ST32F100 microcontroller
             2 BCM59111 PSE chips
Works:
------
  - (8) RJ-45 ethernet ports
  - Switch functions
  - LEDs and buttons

Not yet enabled:
----------------
  - SFP ports (will be enabled in a subsequent change)
  - Power-over-Ethernet (requires realtek-poe package)

Install via web interface:
-------------------------

The factory firmware will accept and flash the initramfs image. It is
recommended to flash to "Partition 0". Flashing to "Partition 1" is
not supported at this point.

The factory web GUI will show the following warning:

 " Warning: The firmware version is v0.00.00-c0.0.00
     The firmware image you are uploading is older than the current
     firmware of the switch. The device will reset back to default
     settings. Are you sure you want to proceed?"

This is expected when flashing OpenWrt. After the initramfs image
boots, flash the -sysupgrade using either the commandline or LuCI.

Install via serial console/tftp:
--------------------------------

The u-boot firmware will not stop the boot, regardless of which key is
pressed. To access the u-boot console, ground out the CLK (pin 16) of
the ROM (U22) when u-boot is reading the linux image. If timed
correctly, the image CRC will fail, and u-boot will drop to a shell:
    > rtk network on
    > setenv ipaddr <address of tftp server>
    > tftp $(freemem) <name-of-initramfs-image.bin>
    > bootm

Then flash the -sysupgrade using either the commandline or luci.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
[gpio-led node names, OpenWrt and LuCI capitalization in commit message]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-25 15:43:46 +02:00
Semih Baskan
530c0a2068 ramips: add support for Asus RT-N12+ B1 and RT-N300 B1
Asus RT-N12+ B1 and Asus RT-N300 B1 are the same device
with a different name.

The OEM firmwares have the same MD5 with Asus RT-N11P B1.

Same instructions for Asus RT-N11P B1 see:
commit c3dc52e39a ("ramips: add support for Asus RT-N10P V3 / RT-N11P B1 / RT-N12 VP B1")

Signed-off-by: Semih Baskan <strstgs@gmail.com>
(Added id from the PR review to commit message)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-25 10:14:18 +02:00
Chuncheng Chen
8c00fd9b45 ramips: add support for ASUS RT-AX53U
Specifications:
- Device: ASUS RT-AX53U
- SoC: MT7621AT
- Flash: 128MB
- RAM: 256MB
- Switch: 1 WAN, 3 LAN (10/100/1000 Mbps)
- WiFi: MT7905 2x2 2.4G + MT7975 2x2 5G
- Ports: USB 3.0
- LEDs: 1x POWER (blue, configurable)
        3x LAN (blue, configurable)
        1x WAN (blue, configurable)
        1x USB (blue, not configurable)
	1x 2.4G (blue, not configurable)
	1x 5G (blue, not configurable)

Flash by U-Boot TFTP method:
- Configure your PC with IP 192.168.1.2
- Set up TFTP server and put the factory.bin image on your PC
- Connect serial port(rate:115200) and turn on AP, then interrupt "U-Boot Boot Menu" by hitting any key
   Select "2. Upgrade firmware"
   Press enter when show "Run firmware after upgrading? (Y/n):"
   Select 0 for TFTP method
   Input U-Boot's IP address: 192.168.1.1
   Input TFTP server's IP address: 192.168.1.2
   Input IP netmask: 255.255.255.0
   Input file name: openwrt-ramips-mt7621-asus_rt-ax53u-squashfs-factory.bin
- Restart AP aftre see the log "Firmware upgrade completed!"

Signed-off-by: Chuncheng Chen <ccchen1984@gmail.com>
(replaced led label, added key-* prefix to buttons, added note about
BBT)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-25 10:14:18 +02:00
Christian Lamparter
36483600d3 apm821xx: WNDAP660: fix ethernet port ordering
Tim Small reported:
| Viewing the 'Network' -> 'Switch' config page in LuCI:
|
| The LuCI LAN 1 port corresponds to the port physically
|     labelled 2 at the rear of the device.
| [...]
|
| When a patch cord is attached to the port labelled 1 [...],
| the LED labelled 2 illuminates. [...]

=> Ports, LuCI and LEDs are reversed/don't match.

Reported-by: Tim Small
Fixes: #10111
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-25 00:06:46 +02:00
Christian Lamparter
9fc2d58bf8 x86: fix damaged config 5.10 refresh
Restore CONFIG_I8K + CONFIG_INTEL_INT0002_VGPIO that got
removed when I refreshed the config. Each x86 target gets
its own CONFIG_CRYPTO_BLAKE2S + LIB settings as only the
x86_64 can use the accelerated x86 version.

Also remove two extra spaces that sneaked into geode's config.

Fixes: 539e60539a ("generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM]")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-24 23:59:14 +02:00
Clemens Hopfer
8c0930b70b octeon: add support for Ubiquiti UniFi Security Gateway
Ubiquiti UniFi Security Gateway (USG) is largely identical to
the EdgeRouter Lite (ERLite-3) apart from a different board ID
and two dome leds.

Device data (from WikiDev):
  CPU: Cavium Octeon Plus CN5020 @500MHz 2-cores
  Ethernet: 3x Atheros AR8035-A GbE PHY's
  Flash: On-board 4MB Flash
  Storage: Internal 3.8GB USB Flash (Kingston ID) drive
    w/ 1.5GB free for use occupies single internal USB port.
  Serial: 1x RJ45 port on front panel. 115200, 8N1
  Buttons: 1x Reset

Flash instructions are identical to EdgeRouter Lite.

Signed-off-by: Clemens Hopfer <openwrt@wireloss.net>
2022-06-24 23:59:14 +02:00
Sebastian Schaper
f770c33d7b ath79: fix rootfs padding for D-Link DAP-2xxx
It was observed that `rootfs_data` was sometimes not correctly erased
after performing sysupgrade, resulting in previous settings to prevail.

Add call to `wrgg-pad-rootfs` in sysupgrade image recipe to ensure any
previous jffs2 will be wiped, consistent with DAP-2610 from the ipq40xx
target, which introduced the double-flashing procedure for these devices.

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
2022-06-24 17:10:24 +02:00
Tomasz Maciej Nowak
539e60539a generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM]
This is now built-in, enable so it won't propagate on target configs.

Link: https://lkml.org/lkml/2022/1/3/168
Fixes: 79e7a2552e ("kernel: bump 5.15 to 5.15.44")
Fixes: 0ca93670693b ("kernel: bump 5.10 to 5.10.119")
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
(Link to Kernel's commit taht made it built-in,
CRYPTO_LIB_BLAKE2S[_ARM|_X86] as it's selectable, 5.10 backport)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-24 17:10:24 +02:00
Tomasz Maciej Nowak
ecf936a70c ath79: bsap18x0: specify FIS directory location in dts
The redboot-fis parser has option to specify the location of FIS
directory, use that, instead of patching the parser to scan for it, and
specifying location in kernel config.

Tested-by: Brian Gonyer <bgonyer@gmail.com>
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2022-06-24 17:10:24 +02:00
Tomasz Maciej Nowak
5fca475b1a treewide: use upstream compatible for RedBoot FIS parser
No reason to keep that around, since upstream one does the same.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2022-06-24 17:10:24 +02:00
Tomasz Maciej Nowak
9decd2a843 ath79: bsap18x0: pad rootfs image
This image is supposed to be written with help of bootloader to the
flash, but as it stands, it's not aligned to block size and RedBoot will
happily create non-aligned partition size in FIS directory. This could
lead to kernel to mark the partition as read-only, therefore pad the
image to block erase size boundary.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2022-06-24 17:10:24 +02:00
Tomasz Maciej Nowak
b52719b71a ath79: ja76pf2: use nvmem cells to specify MAC addresses
The bootloader on this board hid the partition containig MAC addresses
and prevented adding this space to FIS directory, therefore those had to
be stored in RedBoot configuration as aliases to be able to assigne them
to proper interfaces. Now that fixed partition size are used instead of
redboot-fis parser, the partition containig MAC addresses could be
specified, and with marking it as nvmem cell, we can assign them without
userspace involvement.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2022-06-24 17:10:24 +02:00
Tomasz Maciej Nowak
5897c52e78 ath79: move image check for devices with RedBoot
Don't comence the switch to RAMFS when the image format is wrong. This
led to rebooting the device, which could lead to false impression that
upgrade succeded.
Being here, factor out the code responsible for upgrading RedBoot
devices to separate file.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2022-06-24 17:10:24 +02:00
Tomasz Maciej Nowak
5c142aad7b ath79: switch some RedBoot based devices to OKLI loader
After the kernel has switched version to 5.10, JA76PF2 and
RouterStations lost the capability to sysupgrade the OpenWrt version.
The cause is the lack of porting the patches responsible for partial
flash erase block writing and these boards FIS directory and RedBoot
config partitions share the same erase block. Because of that the FIS
directory can't be updated to accommodate kernel/rootfs partition size
changes. This could be remedied by bootloader update, but it is very
intrusive and could potentially lead to non-trivial recovery procedure,
if something went wrong. The less difficult option is to use OpenWrt
kernel loader, which will let us use static partition sizes and employ
mtd splitter to dynamically adjust kernel and rootfs partition sizes.
On sysupgrade from ath79 19.07 or 21.02 image, which still let to modify
FIS directory, the loader will be written to kernel partition, while the
kernel+rootfs to rootfs partition.

The caveats are:
* image format changes, no possible upgrade from ar71xx target images
* downgrade to any older OpenWrt version will require TFTP recovery or
  usage of bootloader command line interface

To downgrade to 19.07 or 21.02, or to upgrade if one is already on
OpenWrt with kernel 5.10, for RouterStations use TFTP recovery
procedure. For JA76PF2 use instructions from this commit message:
commit 0cc87b3bac ("ath79: image: disable sysupgrade images for routerstations and ja76pf2"),
replacing kernel image with loader (loader.bin suffix) and rootfs
image with firmware (firmware.bin suffix).

Fixes: b10d604459 ("kernel: add linux 5.10 support")
Fixes: 15aa53d7ee ("ath79: switch to Kernel 5.10")
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
(mkubntimage was moved to generic-ubnt.mk)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-24 17:09:54 +02:00
Tomasz Maciej Nowak
4cca0947ff ath79: jj76pf2: enable TCN75 sensor
This SBC has Microchip TCN75 sensor, wich measures ambient temperature.
Specify it in dts to allow readout by applications using kernel hwmon
API.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2022-06-24 17:09:53 +02:00
Alexey Smirnov
ed4d743a2c omap: enable 5.15 as testing kernel
Compiled for and run-tested on BBB

Signed-off-by: Alexey Smirnov <s.alexey@gmail.com>
2022-06-24 09:18:03 +02:00
Alexey Smirnov
97d9f515b7 omap: update config for 5.15
This was done by executing make kernel_oldconfig

Signed-off-by: Alexey Smirnov <s.alexey@gmail.com>
2022-06-24 09:18:03 +02:00
Alexey Smirnov
3b548d091e omap: copy config from 5.10 to 5.15
copy config from 5.10 to 5.15

Signed-off-by: Alexey Smirnov <s.alexey@gmail.com>
2022-06-24 09:18:03 +02:00
Stefan Kalscheuer
f8fa38c13f kernel: add kmod-leds-turris-omnia
Add support for LEDs of the CZ.NIC Turris Omnia using the upstream
driver.

There is no generic way to control the LEDs in UCI manner, however
the kernel module is the first step to actually use the RGB LEDs in
custom logic.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
(removed DMARC notice, added driver to Turris Omnia, moved module
recipe to target/linux/mvebu/modules.mk)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-24 09:18:03 +02:00
Bjørn Mork
79112e7d47 ramips: force ZyXEL NR7101 to boot from "Kernel" partition
Make sure BootingFlag points to the system partition we install to.

The BootingFlag variable selects which system partition the system
boots from (0 => "Kernel", 1 => "Kernel2"). OpenWrt does not yet have
device specific support for this dual image scheme, and can therefore
only boot from "Kernel".

This has not been an issue until now, since all known OEM firmware
versions have ignored "Kernel2" - leaving the BootingFlag fixed at 0.
But the newest OEM firmware has a new upgrade procedure, installing
to the "inactive" system partition and setting BootingFlag accordingly.

This workaround is needed until the dual image scheme is fully
supported.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
2022-06-24 09:18:03 +02:00
Arınç ÜNAL
a1ad837735 ramips: mt7621-dts: fix claiming rgmii2 pin group for EdgeRouter X SFP
For a TX->TX connected external phy to transmit/receive data, the rgmii2
pin group needs to be claimed with gpio function, at least for EdgeRouter X
SFP. We already claim the pin group under the pinctrl node with gpio
function on the gpio node on mt7621_ubnt_edgerouter-x.dtsi.

However, we should claim a pin group under its consumer node. It's the
ethernet node in this case, which we already claim the rgmii2 pin group
under it on mt7621.dtsi. Therefore, set the function as gpio on the rgmii2
node for EdgeRouter X SFP and get rid of claiming the rgmii2 pin group
under the pinctrl node. With this change, we also get to remove a
definition from mt7621_ubnt_edgerouter-x.dtsi which is specific to
EdgeRouter X SFP.

This change is tested on an EdgeRouter X SFP.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
2022-06-24 09:18:03 +02:00
Rafał Miłecki
c6f16b63fa bcm53xx: copy patch disabling GRO to kernel 5.15
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-06-24 09:09:27 +02:00
Rafał Miłecki
fcbd39689e bcm53xx: enable & setup packet steering
Packet steering can improve NAT masquarade performance on Northstar by
40-50%. It makes reaching 940-942 Mb/s possible on BCM4708 (and
obviously BCM47094 too). Add scripts setting up the most optimal
Northstar setup.

Below are testing results for running iperf TCP traffic from LAN to WAN.
They were used to pick up golden values.

┌──────────┬──────────┬────────────────────┬────────────────────┐
│   eth0   │  br-lan  │ flow_offloading=0  │ flow_offloading=1  │
│          │          ├─────────┬──────────┼─────────┬──────────┤
│ rps_cpus │ rps_cpus │ BCM4708 │ BCM47094 │ BCM4708 │ BCM47094 │
├──────────┼──────────┼─────────┼──────────┼─────────┼──────────┤
│        0 │        0 │     387 │      671 │     707 │      941 │
│        0 │        1 │     343 │      576 │     705 │      941 │
│        0 │        2 │   ✓ 574 │    ✓ 941 │     704 │      940 │
│        1 │        0 │     320 │      549 │     561 │      941 │
│        1 │        1 │     327 │      551 │     553 │      941 │
│        1 │        2 │     523 │    ✓ 940 │     559 │      940 │
│        2 │        0 │     383 │      652 │   ✓ 940 │      941 │
│        2 │        1 │     448 │      754 │   ✓ 942 │      941 │
│        2 │        2 │     404 │      655 │   ✓ 941 │      941 │
└──────────┴──────────┴─────────┴──────────┴─────────┴──────────┘

Above tests were performed with all eth0 interrupts handled by CPU0.
Setting "echo 2 > /proc/irq/38/smp_affinity" was tested on BCM4708 but
it didn't increased speeds (just required different steering):

┌──────────┬──────────┬───────────┐
│   eth0   │  br-lan  │ flow_offl │
│   rx-0   │   rx-0   │ oading=0  │
│ rps_cpus │ rps_cpus │  BCM4708  │
├──────────┼──────────┼───────────┤
│        0 │        0 │       384 │
│        0 │        1 │     ✓ 574 │
│        0 │        2 │       348 │
│        1 │        0 │       383 │
│        1 │        1 │       412 │
│        1 │        2 │       448 │
│        2 │        0 │       321 │
│        2 │        1 │       520 │
│        2 │        2 │       327 │
└──────────┴──────────┴───────────┘

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-06-24 07:39:51 +02:00
Rafał Miłecki
82d0dd8f8a bcm53xx: disable GRO by default at kernel level
This improves NAT masquarade network performance.

An alternative to kernel change would be runtime setup but that requires
ethtool and identifying relevant network interface and all related
switch ports interfaces.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-06-24 07:39:27 +02:00
Bjørn Mork
d6eebaf995 realtek: fix gcc-12 build with -Werror=array-compare
Removing this gcc-12 error:

arch/mips/rtl838x/setup.c:64:30: error: comparison between two arrays [-Werror=array-compare]
   64 |         else if (__dtb_start != __dtb_end)

Signed-off-by: Bjørn Mork <bjorn@mork.no>
2022-06-22 18:37:40 +02:00
Andreas Böhler
d9e12c21fa realtek: make "u-boot-env" partition writable for Netgear 3xx series
The Netgear GS3xx devices do not properly initialise the port LEDs during
startup unless the boot command in U-Boot is changed. Making the U-Boot
env partition writable allows this modification to be done from within
OpenWrt by calling "fw_setenv bootcmd rtk network on\; boota".

Signed-off-by: Andreas Böhler <dev@aboehler.at>
2022-06-22 17:52:30 +02:00
Stijn Segers
9c381d3386 realtek: make Netgear GS1xx u-boot env partition writable
Make the u-boot environment partition for the NETGEAR
GS108T v3 and GS110TPP writable (they share a DTS), so
the values can be manipulated from userspace.

See https://forum.openwrt.org/t/57875/1567 for a real
world example.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
2022-06-22 17:51:02 +02:00
Paul Maruhn
7e4de89e63 ath79: support for TP-Link EAP225-Outdoor v3
This model is almost identical to the EAP225-Outdoor v1.
Major difference is the RTL8211FS PHY Chipset.

Device specifications:
* SoC: QCA9563 @ 775MHz
* Memory: 128MiB DDR2
* Flash: 16MiB SPI-NOR
* Wireless 2.4GHz (SoC): b/g/n 2x2
* Wireless 5GHz (QCA9886): a/n/ac 2x2 MU-MIMO
* Ethernet (RTL8211FS): 1× 1GbE, PoE

Flashing instructions:
* ssh into target device with recent (>= v1.6.0) firmware
* run `cliclientd stopcs` on target device
* upload factory image via web interface

Debricking:
To recover the device, you need access to the serial port. This requires
fine soldering to test points, or the use of probe pins.
* Open the case and solder wires to the test points: RXD, TXD and TPGND4
  * Use a 3.3V UART, 115200 baud, 8n1
* Interrupt bootloader by holding ctrl+B during boot
* upload initramfs via built-in tftp client and perform sysupgrade
    setenv ipaddr 192.168.1.1 # default, change as required
    setenv serverip 192.168.1.10 # default, change as required
    tftp 0x80800000 initramfs.bin
    bootelf $fileaddr

MAC addresses:
MAC address (as on device label) is stored in device info partition at
an offset of 8 bytes. ath9k device has same address as ethernet, ath10k
uses address incremented by 1.
From stock ifconfig:

    ath0      Link encap:Ethernet  HWaddr D8:...:2E
    ath10     Link encap:Ethernet  HWaddr D8:...:2F
    br0       Link encap:Ethernet  HWaddr D8:...:2E
    eth0      Link encap:Ethernet  HWaddr D8:...:2E

Signed-off-by: Paul Maruhn <paulmaruhn@posteo.de>
Co-developed-by: Philipp Rothmann <philipprothmann@posteo.de>
Signed-off-by: Philipp Rothmann <philipprothmann@posteo.de>
[Add pre-calibraton nvme-cells]
Tested-by: Tido Klaassen <tido_ff@4gh.eu>
Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-06-22 17:47:11 +02:00
Philipp Rothmann
8bd5bbad1e ath79: generic: add support for Realtek PHY
Some models of the TP-Link EAP225 series use a Realtek PHY,
therefore the driver is added.

Signed-off-by: Philipp Rothmann <philipprothmann@posteo.de>
2022-06-22 17:47:11 +02:00
Florian Fainelli
5f10805094 bcm47xx: Fix Netgear WNR3500L v2 image format
CFE on these devices expects to find the kernel compressed with LZMA but
with no dictionnary and no loader, adjust the image generation
accordingly.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-06-20 14:29:12 -07:00
Florian Fainelli
0c9d07a3b4 bcm47xx: Updated devices database for Netgear WNR3500L V2
Update the device databases to contain an entry for the Netgear WNR3500L
v2 router, the same buttons and LEDs mapping as v1 is used.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-06-20 14:29:12 -07:00
Florian Fainelli
acff8aec0c bcm47xx: Add support for brcmnand controller on BCMA bus
Back port the patches being submitted upstream in order to make the NAND
controller work on BCM47187/5358. This is a prerequisite for supporting
devices like the Netgear WNR3500L V2.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-06-20 14:29:12 -07:00
Rafał Miłecki
22168ae681 kernel: drop patch adding hardcoded kernel compilation flags
1. KCFLAGS should be used for custom flags
2. Optimization flags are arch / SoC specific
3. -fno-reorder-blocks may *worsen* network performace on some SoCs
4. Usage of flags was *reversed* since 5.4 and noone reported that

If we really need custom flags then CONFIG_KERNEL_CFLAGS should get
default value adjusted properly (per target).

Ref: 4e0c54bc5b ("kernel: add support for kernel 5.4")
Link: http://lists.openwrt.org/pipermail/openwrt-devel/2022-June/038853.html
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20190409093046.13401-1-zajec5@gmail.com/
Cc: Felix Fietkau <nbd@nbd.name>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Rui Salvaterra <rsalvaterra@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-06-20 22:17:38 +02:00
Martin Blumenstingl
a1354accc0 lantiq: dts: fix reset controller reference on Danube and AR9
ar9.dtsi and danube.dtsi only have one reset controller and they are
naming it "reset". This is equivalent to "reset0" in vr9.dtsi. Fix the
references to the reset controller in the recently added PCI controller
reset line.

Fixes: 087f2cba26 ("lantiq: dts: Add the reset line for the PCI controller")
Reported-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2022-06-20 19:43:33 +02:00
Piotr Dymacz
fd72e595c2 ramips: fix booting on ZyXEL NBG-419N v2
This fixes a well known "LZMA ERROR 1" error, reported previously on
numerous of other devices from 'ramips' target.

Fixes: #9842
Fixes: #8964

Reported-by: Juergen Hench <jurgen.hench@gmail.com>
Tested-by: Juergen Hench <jurgen.hench@gmail.com>
Signed-off-by: Demetris Ierokipides <ierokipides.dem@gmail.com>
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-06-20 11:05:41 +02:00
Rafał Miłecki
1d42af720c kernel: use KCFLAGS for passing EXTRA_OPTIMIZATION flags
This uses kernel's generic variable and doesn't require patching it with
a custom Makefile change. It's expected *not* to change any behaviour.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-06-19 23:23:18 +02:00
Rafał Miłecki
77692d6112 kernel: backport mtd parser for Sercomm partitions
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-06-19 22:10:03 +02:00
Logan Blyth
36e46c3c13 mvebu: add SolidRun ClearFog GT 8K
ClearFog GT 8K is device sold by SolidRun. It is marketed as a
development board, not a consumer product. The device tree file for this board
is upstream in kernel.org.

Signed-off-by: Logan Blyth <mrbojangles3@gmail.com>
2022-06-19 12:40:30 +02:00
Christian Lamparter
cd1b4ea5aa apm821xx: align gpio-keys node names with dt-schema
As per the series:
<https://www.spinics.net/lists/devicetree/msg508906.html>

"Enforce specific naming pattern for children (keys) to narrow the
pattern thus do not match other properties.  This will require all
children to be properly prefixed or suffixed (button, event, switch
or key)."

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-19 12:40:30 +02:00
Martin Blumenstingl
087f2cba26 lantiq: dts: Add the reset line for the PCI controller
The PCI controller has it's reset line wired up to bit 13 of RCU.
Describe this in our .dtsi files.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2022-06-19 12:31:02 +02:00
Chris Blake
949e8ba521 ath79: add support for Netgear PGZNG1
This adds support for the Netgear PGZNG1, also known as the ADT Pulse
Gateway.

Hardware:
CPU: Atheros AR9344
Memory: 256MB
Storage: 256MB NAND Hynix H27U2G8F2CTR-BC
USB: 1x USB 2.0
Ethernet: 2x 100Mb/s
WiFi: Atheros AR9340 2.4GHz 2T2R
Leds: 8 LEDs
Button: 1x Reset Button
UART:
Header marked JPE1. Pinout is VCC, TX, RX, GND. The marked pin, closest
to the JPE1 marking, is VCC. Note VCC isn't required to be connected
for UART to work.

Enable Stock Firmware Shell Access:
1. Interrupt u-boot and run the following commands
setenv console_mode 1
saveenv
reset

This will enable a UART shell in the firmware. You can then login using
the root password of `icontrol`. If that doesn't work, the device is
running a firmware based on OpenWRT where you can drop into failsafe to
mount the FS and then modify /etc/passwd.

Installation Instructions:
1. Interupt u-boot and run the following commands
setenv active_image 0
setenv stock_bootcmd nboot 0x81000000 0 \${kernel_offset}
setenv openwrt_bootcmd nboot 0x82000000 0 \${kernel_offset}
setenv bootcmd run openwrt_bootcmd
saveenv

2. boot initramfs image via TFTP u-boot
tftpboot 0x82000000 openwrt-ath79-nand-netgear_pgzng1-initramfs-kernel.bin; bootm 0x82000000

3. Once booted, use LuCI sysupgrade to
flash openwrt-ath79-nand-netgear_pgzng1-squashfs-sysupgrade.bin

MAC Table:
WAN (eth0): xx:xa - caldata 0x0
LAN (eth1): xx:xb - caldata 0x6
WLAN (phy0): xx:xc - burned into ath9k caldata

Not Working:
Z-Wave
RS422

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
(added more hw-info, fixed file permissions)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-19 12:31:02 +02:00
Chris Blake
78ecaebdff kernel: add upstream patches for pca955x led driver
These patches are to support the pca955x led with OpenWRT correctly via
device tree on linux 5.10. Without these, the new LED function/color/reg
features can not be used.

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
2022-06-19 12:31:02 +02:00
Josef Schlehofer
dc7f78da97 mpc85xx: p2020: add RTC ds1307 to kernel
If the RTC module is compiled as a module, the hctosys fails to
initialize because ds1307 is loaded later.

Fixes:
[    2.004145] hctosys: unable to open rtc device (rtc0)
[   11.957997] rtc-ds1307 0-006f: registered as rtc0

This is similar to commit 5481ce9a11,
which was done for imx6 target.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2022-06-19 12:31:02 +02:00
Matthew Hagan
811538ab22 ipq40xx: add support for Meraki MR74
The Meraki MR74 is part of the "Insect" series. This device is
essentially an outdoor variant of the MR33 with identical hardware, but
requiring a config@3 DTS option to be set to allow booting with the
stock u-boot.

The install procedure is replicated from the MR33, with the exception
being that the MR74 sysupgrade image must be used.

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
2022-06-19 12:31:02 +02:00
Christian Lamparter
5f7828fcc2 apm821xx: MBL: make mtd chip work
The MBL has a 512KiB Microchip SST39VF040 chip for uboot and
not much else.

Thanks to Ewald who figured out that the "jedec-probe" vs.
"jedec-flash" was the wrong binding. With this information
and the jedec-probe support enabled => the chip works.

| physmap-flash 4fff80000.nor_flash: physmap platform flash device: [mem 0x4fff80000-0x4ffffffff]
| Found: SST 39LF040
| 4fff80000.nor_flash: Found 1 x8 devices at 0x0 in 8-bit bank

Suggested-by: Ewald Comhaire <e.comhaire@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-19 12:31:02 +02:00
Josef Schlehofer
6006f73383 mpc85xx: enable NAND support for all subtargets
In subtarget p2020, there wasn't enabled nand support, and because of
that there weren't available tools from mtd-utils package, which has
utilities for NAND flash memory even though reference board, which
is the only currently supported device in p2020 subtarget has NAND [1].

All subtargets in mpc85xx has already enabled nand support, let's do it
globally.

[1] https://www.nxp.com/design/qoriq-developer-resources/p2020-reference-design-board:P2020RDB

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2022-06-19 12:31:02 +02:00
Marek Behún
742926e5f5 kernel: Backport mv88e6xxx patch to keep pvid at 0 if VLAN-unaware and remove hack
Keeping the pvid at 0 when VLAN-unaware makes it possible to drop the
hack introduced in commit 920eaab1d8 ("kernel: DSA roaming fix for
Marvell mv88e6xxx"). Dropping the hack makes it possible to use VLAN
interfaces with VID 1 on DSA ports without problems with FDB.

Signed-off-by: Marek Behún <kabel@kernel.org>
(cherry picked from commit 9caa6f0aa7)
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
[drop kernel patch hack from Linux version 5.15, drop paragraph about
backport patch, which is not necessary as it is included in kernel 5.15]
2022-06-19 12:31:02 +02:00
Christian Lamparter
554ca44730 bcm53xx: remove 07_set_preinit_iface_bcm53xx
with the switch to DSA setup, the switch gets correctly
programmed via the device-tree now. This hack is no
longer necessary.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-19 12:31:02 +02:00
Christian Lamparter
ac2166b135 kernel: move Toshiba-TC58NVG0S3H patch to ipq40xx redux
Linux' upstream MTD-Maintainer Miquèl Raynal noted:
|Reverting seems the safest option here, not knowing how many devices
|have these damaged/counterfeit chips. If it is just a couple and only on
|Fritzboxes, as suggested in the Github issue this patch could be
|carried through OpenWrt and that would seem more future proof IMHO.

This patch follows up with the first patch. It actually
moves the patches out of target/linux/generic/pending into
the ipq40xx's patch heap and adds a little note what happend.

For more information, discussions or reports about bad TC58NVG0S3Hs,
please visit the OpenWrt's Github Issue #9962:
<https://github.com/openwrt/openwrt/issues/9962>

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-19 12:31:02 +02:00
Pascal Ernster
adbdfc9366 realtek: add support for power LED on Netgear GS108Tv3
The Netgear GS108Tv3 is already supported by OpenWrt, but is missing LED
support. After OpenWrt installation, all LEDs are off which makes the
installation quite confusing.
This enables support for the green/amber power LED to give feedback
about the current status.

This is basically just a verbatim copy of commit c4927747d2 ("realtek:
add support for power LED on Netgear GS308Tv1").

Please note that both LEDs are wired up in an anti-parallel fashion,
which means that only one of both LEDs/colors can be switched on at the
same time. If both LEDs/colors are switched on simultanously, the LED
goes dark.

Tested-by: Pascal Ernster <git@hardfalcon.net>
Signed-off-by: Pascal Ernster <git@hardfalcon.net>
[add title to commit reference]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-19 10:58:40 +02:00
Markus Stockhausen
6153c530cc realtek: add support for D-Link DGS-1210-20
Hardware specification
 ----------------------

 * RTL8382M SoC, 1 MIPS 4KEc core @ 500MHz
 * 128MB DRAM
 * 32MB NOR Flash
 * 16 x 10/100/1000BASE-T ports
    - Internal PHY with 8 ports (RTL8218B)
    - External PHY with 8 ports (RTL8218B)
 * 4 x Gigabit RJ45/SFP Combo ports
    - External PHY with 4 SFP ports (RTL8214FC)
 * Power LED
 * Reset button on front panel
 * UART (115200 8N1) via unpopulated standard 0.1" pin header marked J6

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

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

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

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

To install, upload the sysupgrade image to the OEM webpage or sysupgrade
from the system running from initramfs image.

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

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
[correct initramfs image name]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-19 08:36:21 +02:00
Juergen Wurzer
acbe1d4d36 rockchip: add kernel 5.15 as testing
Add kernel 5.15 as testing kernel for the rockchip-armv8 target.

Signed-off-by: Juergen Wurzer <wurzer.juergen@gmail.com>
[squash commits, update commit message]
Signed-off-by: David Bauer <mail@david-bauer.net>
2022-06-18 22:11:26 +02:00
David Bauer
535b0c70b1 ramips: fix RT-AC57U button level
Both buttons on the RT-AC57U are active-low. Fix the GPIO flag for the
WPS cutton to fix button behavior.

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-06-18 22:11:19 +02:00
Sander Vanheule
7154a1dc7b ath79: TP-Link EAP225 v3: use pre-calibration nvmem-cell
ath10k Wave-2 hardware requires an nvmem-cell called "pre-calibration"
to load the device specific caldata, not "calibration". Rename the nvmem
cell node and label to match the updated cell name.

Fixes: eca0d73011 ("ath79: TP-Link EAP225 v3: convert ath10k to nvmem-cells")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-18 19:30:44 +02:00
Sander Vanheule
9a329668af ath79: TP-Link EAP225-Wall v2: use pre-calibration nvmem-cell
ath10k Wave-2 hardware requires an nvmem-cell called "pre-calibration"
to load the device specific caldata, not "calibration". Rename the nvmem
cell node and label to match the updated cell name.

Fixes: 48625a0445 ("ath79: TP-Link EAP225-Wall v1: convert radios to nvmem-cells")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-18 19:30:44 +02:00
Nick Hainke
0cb851cad1 ath79: TP-Link EAP225-Outdoor v1: use pre-calibration nvmem-cell
Fixes errors in the form of:
  ath10k_pci 0000:00:00.0: failed to fetch board data for bus=pci,
  vendor=168c,device=0056,subsystem-vendor=0000,subsystem-device
  =0000 from ath10k/QCA9888/hw2.0/board-2.bin
  ath10k_pci 0000:00:00.0: failed to fetch board-2.bin or board.bin
  from ath10k/QCA9888/hw2.0
  ath10k_pci 0000:00:00.0: failed to fetch board file: -12
  ath10k_pci 0000:00:00.0: could not probe fw (-12)

As described already in 2d3321619b ("ath79: TP-Link EAP245 v3: use
pre-calibration nvmem-cell"):
  Ath10k Wave-2 hardware requires an nvmem-cell called "pre-calibration"
  to load the device specific caldata, not "calibration".

Further rename the nvmem cell node and label to match the updated cell name.

Fixes: 23b9040745 ("ath79: TP-Link EAP225-Outdoor v1: convert ath10k to nvmem-cells")
Suggested-by: Sander Vanheule <sander@svanheule.net>
Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-06-18 19:30:44 +02:00
Daniel Golle
692d87a27b
mediatek: UniFi 6 LR: disable RTC
There is not RTC battery connected to the SoC of the UniFi 6 LR board.
Disable the RTC to prevent the system coming up with time set to
2000-01-01 00:00:00 after each reboot.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-06-18 17:32:07 +01:00
Sander Vanheule
849ffbd5ab ath79: D-Link DAP-2xxx (QCA953x): convert ath9k caldata to nvmem
Convert the calibration data reference for the ath9k radio to an
nvmem-cell, replacing the downstream mtd-cal-data property.

Since the 'art' label is no longer used, it can be dropped.

Cc: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-18 11:57:21 +02:00
Sander Vanheule
b4e7b49a92 ath79: D-Link DAP-2xxx (QCA953x): move art partition to DTSI
The art partition containing the radio calibration data is in the same
location for all supported devices. Move the definition to the base file
so the reference from the wmac node can reference the same file.

Cc: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-18 11:57:21 +02:00
Sander Vanheule
7868f7ad0f ath79: D-Link DAP-3662 A1: convert ath10k caldata to nvmem
Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the calibration data using nvmem-cells.

MAC address assignment is moved to '10_fix_wifi_mac', so the device can
then be removed from the caldata extraction script '11-ath10k-caldata'.

Cc: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-18 11:57:21 +02:00
Sander Vanheule
e5df381208 ath79: D-Link DAP-2695 A1: convert ath10k caldata to nvmem
Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the calibration data using nvmem-cells.

MAC address assignment is moved to '10_fix_wifi_mac', so the device can
then be removed from the caldata extraction script '11-ath10k-caldata'.

Cc: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-18 11:57:21 +02:00
Sander Vanheule
abf28b79c8 ath79: D-Link DAP-2660 A1: convert ath10k caldata to nvmem
Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the calibration data using nvmem-cells.

MAC address assignment is moved to '10_fix_wifi_mac', so the device can
then be removed from the caldata extraction script '11-ath10k-caldata'.

Cc: Sebastian Schaper <openwrt@sebastianschaper.net>
Tested-by: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-18 11:57:21 +02:00
Sander Vanheule
8ccbc95d50 ath79: D-Link DAP-2680 A1: convert ath10k caldata to nvmem
Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the pre-calibration data using nvmem-cells.

MAC address assignment is moved to '10_fix_wifi_mac', so the device can
then be removed from the caldata extraction script '11-ath10k-caldata'.

Cc: Sebastian Schaper <openwrt@sebastianschaper.net>
Tested-by: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-18 11:57:19 +02:00
Sander Vanheule
e2bf11639b ath79: D-Link DAP-2xxx (QCA955x): convert ath9k caldata to nvmem
Convert the calibration data reference for the ath9k radio to an
nvmem-cell, replacing the downstream mtd-cal-data property.

Cc: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-18 11:54:40 +02:00
Sander Vanheule
3a1eb93b27 ath79: D-Link DAP-2xxx (QCA955x): move art partition to DTSI
The art partition containing the radio calibration data is in the same
location for all supported devices. Move the definition to the base file
so the reference from the wmac node can refer to the same file.

Cc: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-18 11:54:39 +02:00
Felix Fietkau
7676808434 kernel: backport upstream mtk_eth_soc patches
Includes MT7986 ethernet support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-06-18 10:33:30 +02:00
Felix Fietkau
0e0058a870 kernel: move mtk flow offload patches to backport-5.15
They were accepted upstream

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-06-18 10:33:30 +02:00
Sander Vanheule
2d3321619b ath79: TP-Link EAP245 v3: use pre-calibration nvmem-cell
ath10k Wave-2 hardware requires an nvmem-cell called "pre-calibration"
to load the device specific caldata, not "calibration".

Update the nvmem-cell name to make the 5GHz radio work again.

Fixes: d4b3b23942 ("ath79: TP-Link EAP245 v3: convert radios to nvmem-cells")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-18 09:36:21 +02:00
Andreas Böhler
c4927747d2 realtek: add support for power LED on Netgear GS308Tv1
The Netgear GS308Tv1 is already supported by OpenWrt, but is missing LED
support. After OpenWrt installation, all LEDs are off which makes the
installation quite confusing.
This enables support for the green/amber power LED to give feedback
about the current status.

Signed-off-by: Andreas Böhler <dev@aboehler.at>
2022-06-18 09:21:50 +02:00
Rafał Miłecki
d19c37486b bcm53xx: copy bgmac revert (performance fix) to 5.15
Ref: 230c9da963 ("bcm53xx: revert bgmac back to the old limited max frame size")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-06-17 08:04:31 +02:00
Sander Vanheule
9320516613 ath79: move ethernet phy node for TP-Link EAP devices
Move the ethernet phy definition from the eap2x5-1port include to the
device-specific DTS files. This is to prepare for new devices that have
a different ethernet phy, at another MDIO address.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-16 21:39:32 +02:00
Sander Vanheule
48625a0445 ath79: TP-Link EAP225-Wall v1: convert radios to nvmem-cells
Replace the mtd-cal-data phandle by an nvmem-cell reference to the art
partition for the 2.4GHz ath9k radio.

Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the calibration data using nvmem-cells.

Use mac-address-increment to ensure the MAC address is set correctly,
and remove the device from the caldata extraction and patching script.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-16 21:39:32 +02:00
Sander Vanheule
d4b3b23942 ath79: TP-Link EAP245 v3: convert radios to nvmem-cells
Replace the mtd-cal-data phandle by an nvmem-cell reference from the art
partition for the 2.4GHz ath9k radio.

Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the calibration data using an nvmem-cell.

Use mac-address-increment to ensure the MAC address is set correctly,
and remove the device from the caldata extraction and patching script.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-16 21:39:32 +02:00
Sander Vanheule
eca0d73011 ath79: TP-Link EAP225 v3: convert ath10k to nvmem-cells
Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the calibration data using nvmem-cells.

Use mac-address-increment to ensure the MAC address is set correctly,
and remove the device from the caldata extraction and patching script.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-16 21:39:32 +02:00
Sander Vanheule
23b9040745 ath79: TP-Link EAP225-Outdoor v1: convert ath10k to nvmem-cells
Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the calibration data using nvmem-cells.

Use mac-address-increment to ensure the MAC address is set correctly,
and remove the device from the caldata extraction and patching script.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-16 21:39:32 +02:00
Sander Vanheule
7cf3a37957 ath79: TP-Link EAP225 v1: convert ath10k to nvmem-cells
Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the calibration data using nvmem-cells.

Use mac-address-increment to ensure the MAC address is set correctly,
and remove the device from the caldata extraction and patching script.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-16 21:39:32 +02:00
Sander Vanheule
d61882783d ath79: TP-Link EAP245 v1: convert ath10k to nvmem-cells
Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the calibration data using nvmem-cells.

Use mac-address-increment to ensure the MAC address is set correctly,
and remove the device from the caldata extraction and patching script.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-16 21:39:32 +02:00
Sander Vanheule
e71b5d2db7 ath79: convert 1-port TP-Link EAP ath9k to nvmem-cells
Replace the mtd-cal-data phandle with an nvmem-cell reference for the
2.4GHz ath9k radio. This affects the following devices:
  - TP-Link EAP225 v1
  - TP-Link EAP225 v3
  - TP-Link EAP225-Outdoor v1
  - TP-Link EAP245 v1

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-16 21:39:32 +02:00
Sander Vanheule
dae3927527 ath79: drop phy-mask property
The phy-mask property is no longer supported by the ag71xx-mdio driver,
so let's drop it.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-15 20:07:26 +02:00
Sander Vanheule
c8c96b22c6 ath79: ag71xx-mdio: remove phy-mask property
The phy-mask property is read by the ag71xx-mdio driver to set the
mii_bus's phy_mask field. On OF platforms, the devicetree is expected to
provide all present ethernet phy-s however, so the phy_mask field is
later set to all-ones. Having a devicetree override is of no use then,
so let's drop it.

Cc: David Bauer <mail@david-bauer.net>
Cc: John Crispin <john@phrozen.org>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Acked-by: David Bauer <mail@david-bauer.net>
2022-06-15 20:07:26 +02:00
Rafał Miłecki
230c9da963 bcm53xx: revert bgmac back to the old limited max frame size
Bumping max frame size has significantly affected network performance.
It was done by upstream commit that first appeared in the 5.7 release.

This change bumps NAT masquarade speed from 196 Mb/s to 383 Mb/s for the
BCM4708 SoC.

Ref: f55f1dbaad ("bcm53xx: switch to the kernel 5.10")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-06-15 10:44:32 +02:00
Stijn Tintel
c4b499bc03 qoriq: use FIT uImage for Firebox M300 kernel
This requires U-Boot environment changes:

  setenv OpenWrt_kernel watchguard_firebox-m300-fit-uImage.itb
  setenv loadaddr 0x20000000
  setenv wgBootSysA 'setenv bootargs root=/dev/mmcblk0p2 rw rootdelay=2 console=$consoledev,$baudrate fsl_dpaa_fman.fsl_fm_max_frm=1530; mmc dev 0; ext2load mmc 0:1 $loadaddr $OpenWrt_kernel; bootm $loadaddr'

Trying to sysupgrade an image containing this change on an M300 already
running OpenWrt will fail with the following error:

  Tue Jun 14 12:06:21 EEST 2022 upgrade: The device is supported, but the config is incompatible to the new image (1.0->1.1). Please upgrade without keeping config (sysupgrade -n).
  Tue Jun 14 12:06:21 EEST 2022 upgrade: Kernel switched to FIT uImage. Update U-Boot environment.
  Tue Jun 14 12:06:21 EEST 2022 upgrade: Reading partition table from bootdisk...
  Tue Jun 14 12:06:21 EEST 2022 upgrade: Extract boot sector from the image
  Tue Jun 14 12:06:21 EEST 2022 upgrade: Reading partition table from image...
  Image check failed.

This is to prevent rendering your device unbootable. Make the U-Boot
environment changes as instruced above, and then flash the image using
sysupgrade -F. The config can be kept, there is no need to use -n.

After the new image booted successfully, you can increase the compat_version:

  uci set system.@system[0].compat_version='1.1'
  uci commit

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-06-14 12:06:31 +03:00
Stijn Tintel
86948716db qoriq: use KERNEL_SUFFIX in Build/sdcard-img
Use the KERNEL_SUFFIX variable in Build/sdcard-img, rather than
using hardcoded "-kernel.bin", to allow overriding KERNEL_SUFFIX for a
device.

Fixes: 080a769b4d ("qoriq: new target")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-06-14 12:03:55 +03:00
Mikhail Zhilkin
498c15376b ramips: add support for MTS WG430223
MTS WG430223 is a wireless AC1300 (WiFi 5) router manufactured by
Arcadyan company. It's very similar to Beeline Smartbox Flash (Arcadyan
WG443223).

Device specification
--------------------
SoC Type: MediaTek MT7621AT
RAM: 128 MiB
Flash: 128 MiB (Winbond W29N01HV)
Wireless 2.4 GHz (MT7615DN): b/g/n, 2x2
Wireless 5 GHz (MT7615DN): a/n/ac, 2x2
Ethernet: 3xGbE (WAN, LAN1, LAN2)
USB ports: No
Button: 1 (Reset/WPS)
LEDs: 2 (Red, Green)
Power: 12 VDC, 1 A
Connector type: Barrel
Bootloader: U-Boot (Ralink UBoot Version: 5.0.0.2)
OEM: Arcadyan WG430223

Installation
------------
1. Login to the router web interface (superadmin:serial number)
2. Navigate to Administration -> Miscellaneous -> Access control lists &
   enable telnet & enable "Remote control from any IP address"
3. Connect to the router using telnet (default admin:admin)
4. Place *factory.trx on any web server (192.168.1.2 in this example)
5. Connect to the router using telnet shell (no password required)
6. Save MAC adresses to U-Boot environment:
   uboot_env --set --name eth2macaddr --value $(ifconfig | grep eth2 | \
    awk '{print $5}')
   uboot_env --set --name eth3macaddr --value $(ifconfig | grep eth3 | \
    awk '{print $5}')
   uboot_env --set --name ra0macaddr --value $(ifconfig | grep ra0 | \
    awk '{print $5}')
   uboot_env --set --name rax0macaddr --value $(ifconfig | grep rax0 | \
    awk '{print $5}')
7. Ensure that MACs were saved correctly:
   uboot_env --get --name eth2macaddr
   uboot_env --get --name eth3macaddr
   uboot_env --get --name ra0macaddr
   uboot_env --get --name rax0macaddr
8. Download and write the OpenWrt images:
   cd /tmp
   wget http://192.168.1.2/factory.trx
   mtd_write erase /dev/mtd4
   mtd_write write factory.trx /dev/mtd4
9. Set 1st boot partition and reboot:
   uboot_env --set --name bootpartition --value 0

Back to Stock
-------------
1. Run in the OpenWrt shell:
   fw_setenv bootpartition 1
   reboot
2. Optional step. Upgrade the stock firmware with any version to
   overwrite the OpenWrt in Slot 1.

MAC addresses
-------------
+-----------+-------------------+----------------+
| Interface | MAC               | Source         |
+-----------+-------------------+----------------+
| label     | A4:xx:xx:51:xx:F4 | No MACs was    |
| LAN       | A4:xx:xx:51:xx:F6 | found on Flash |
| WAN       | A4:xx:xx:51:xx:F4 | [1]            |
| WLAN_2g   | A4:xx:xx:51:xx:F5 |                |
| WLAN_5g   | A6:xx:xx:21:xx:F5 |                |
+-----------+-------------------+----------------+
[1]:
a. Label wasb't found neither in factory nor in other places.
b. MAC addresses are stored in encrypted partition "glbcfg". Encryption
   key hasn't known yet. To ensure the correct MACs in OpenWrt, a hack
   with saving of the MACs to u-boot-env during the installation was
   applied.
c. Default Ralink ethernet MAC address (00:0C:43:28:80:A0) was found in
   "Factory" 0xfff0. It's the same for all MTS WG430223 devices. OEM
   firmware also uses this MAC when initialazes ethernet driver. In
   OpenWrt we use it only as internal GMAC (eth0), all other MACs are
   unique. Therefore, there is no any barriers to the operation of several
   MTS WG430223 devices even within the same broadcast domain.

Stock firmware image format
---------------------------
The same as Beeline Smartbox Flash but with another trx magic
+--------------+---------------+----------------------------------------+
| Offset       |               | Description                            |
+==============+===============+========================================+
| 0x0          | 31 52 48 53   | TRX magic "1RHS"                       |
+--------------+---------------+----------------------------------------+

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2022-06-13 15:26:23 +08:00
Mikhail Zhilkin
5b59137a16 ramips: create new dtsi for Arcadyan routers
This commit moves common properties for the boards below to a new dtsi:
Beeline Smartbox Flash (Arcadyan WG443223)
MTS WG430223 (Arcadyan WG430223)

The boards are almost the same. Here is the differences:
+------+----------+----------+
|      | WG430223 | WG443223 |
+------+----------+----------+
| RAM  | 128      | 256      |
+------+----------+----------+
| USB  | -        | 1x3.0    |
+------+----------+----------+
| LEDS | RG       | RGB      |
+------+----------+----------+

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2022-06-13 15:26:23 +08:00
Mikhail Zhilkin
109c503bee ramips: allow custom trx magic for Arcadyan
This commit:
1. Renames beeline-trx recipe in mt7621.mk to arcadyan-trx. The recipe
   is necessary for:
   - MTS WG430223 (Arcadyan WG430223)
   - Beeline Smartbox Flash (Arcadyan WG443223)
2. Allows specify custom trx magic which is different for the routers
   mentined above.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2022-06-13 15:26:23 +08:00
Aviana Cruz
857ea3f690 ramips: decrease SPI frequency for Phicomm K2P
Some K2P comes with the worse boards with GD25Q128 (may be A2), which
only works with 50MHz frequency and less. Reduce spi frequency so that
these routers can boot.
remove m25p,fast-read because it isn't needed for 50MHz SPI.

Signed-off-by: Aviana Cruz <gwencroft@proton.me>
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2022-06-13 15:26:23 +08:00
Nick Hainke
f4415f7635 ath79: move ubnt-xm to tiny
ath79 has was bumped to 5.10. With this, as with every kernel change,
the kernel has become larger. However, although the kernel gets bigger,
there are still enough flash resources. But the RAM reaches its capacity
limits. The tiny image comes with fewer kernel flags enabled and
fewer daemons.

Improves: 15aa53d7ee ("ath79: switch to Kernel 5.10")

Tested-by: Robert Foss <me@robertfoss.se>
Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-06-11 21:22:58 +02:00
Henrik Riomar
31d86a1a11 mediatek: add Ubiquiti UniFi 6 LR v2 targets
Add targets:
 * Ubiquiti UniFi 6 LR v2
 * Ubiquiti UniFi 6 LR v2 (U-Boot mod)

This target does not have a RGB led bar like v1 did

Used target/linux/ramips/dts/mt7621_ubnt_unifi.dtsi as inspiration

The white dome LED is default-on, blue will turn on when the system is
in running state

Signed-off-by: Henrik Riomar <henrik.riomar@gmail.com>
2022-06-11 19:51:33 +01:00
Henrik Riomar
5c8d3893a7 mediatek: new target ubnt_unifi-6-lr-v1-ubootmod
based on current ubnt_unifi-6-lr-ubootmod

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[added SUPPORTED_DEVICES for compatibility with existing setups]
Signed-off-by: Henrik Riomar <henrik.riomar@gmail.com>
2022-06-11 19:51:18 +01:00
Henrik Riomar
15a02471bb mediatek: new target mt7622-ubnt-unifi-6-lr-v1
Based on current mt7622-ubnt-unifi-6-lr, this is a preparation for
adding a v2 version of this target

* v1 - with led-bar
* v2 - two simple GPIO connected LEDs (in later commits)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[added SUPPORTED_DEVICES for compatibility with existing setups]
Signed-off-by: Henrik Riomar <henrik.riomar@gmail.com>
2022-06-11 19:50:26 +01:00
Stijn Segers
0dc056eb66 ath79: D-Link DAP-2680: select QCA9984 firmware
The DAP-2680 has a QCA9984 radio [1], but the commit adding support
mistakenly adds the QCA99x0 firmware package. See forum topic [2].

[1] https://wikidevi.wi-cat.ru/D-Link_DAP-2680_rev_A1
[2] https://forum.openwrt.org/t/missing-5ghz-radio-on-dlink-dap-2680/

Fixes: 5b58710fad ("ath79: add support for D-Link DAP-2680 A1")
Signed-off-by: Stijn Segers <foss@volatilesystems.org>
Tested-by: Alessandro Fellin <af.registrazioni@gmail.com>
2022-06-11 10:20:06 +02:00
Paul Spooren
2a07270180 octeon: add SUPPORTED_DEVICES to er/erlite
Using the BOARD_NAME variable results for both er and erlite devices to
identify themselfs as `er` and `erlite` (via `ubus call system board`).

This is problematic when devices search for firmware upgrades since the
OpenWrt profile is actually called `ubnt_edgerouter` and
`ubnt_edgerouter-lite`.

By adding the `SUPPORTED_DEVICE` a mapping is created to point devices
called `er` or `erlite` to the corresponding profile.

FIXES: https://github.com/openwrt/asu/issues/348

Signed-off-by: Paul Spooren <mail@aparcar.org>
2022-06-09 17:14:28 +02:00
Luiz Angelo Daros de Luca
f5a87a0a7b realtek: add gpio-restart for D-Link DGS-1210-28
A GPIO assert is required to reset the system. Otherwise, the system
will hang on reboot.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2022-06-07 17:11:28 +02:00
Luiz Angelo Daros de Luca
8121e7dd75 realtek: add reset button for D-Link DGS-1210-28
Tested in a DGS-1210-28 F3, both triggering failsafe and reboot.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2022-06-07 17:11:28 +02:00
Arınç ÜNAL
5c1b1918ab bcm53xx: remove BROKEN flag from Asus RT-AC88U
The image builds and works fine on Asus RT-AC88U. Therefore, remove the
BROKEN flag from the makefile.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
2022-06-07 16:16:56 +02:00
Rui Salvaterra
fbf6992f2b kernel: bump 5.15 to 5.15.45
Patches automatically rebased.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-06-06 19:20:28 +02:00
Rui Salvaterra
79e7a2552e kernel: bump 5.15 to 5.15.44
Delete the crypto-lib-blake2s kmod package, as BLAKE2s is now built-in.

Patches automatically rebased.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-06-06 19:20:28 +02:00
Rui Salvaterra
2454342e06 kernel: bump 5.15 to 5.15.42
Deleted (upstreamed):
generic/backport-5.15/610-v5.18-netfilter-flowtable-move-dst_check-to-packet-path.patch [1]
generic/pending-5.15/704-00-netfilter-flowtable-fix-excessive-hw-offload-attempt.patch [2]
generic/pending-5.15/704-01-netfilter-nft_flow_offload-skip-dst-neigh-lookup-for.patch [3]
generic/pending-5.15/704-02-net-fix-dev_fill_forward_path-with-pppoe-bridge.patch [4]
generic/pending-5.15/704-03-netfilter-nft_flow_offload-fix-offload-with-pppoe-vl.patch [5]

Manually rebased:
generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.42&id=88b937673b3552d54da20f648e61a123f4c1fa67
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.42&id=5f4197a020c049a59ea7907c31f9ab037dcefefe
[3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.42&id=7613dcaceee281973145588f4244f2f78ef85b7f
[4] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.42&id=f96b2e06721249ebf8da3254cfef29dcb6583948
[5] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.42&id=b329889974aed47e1167c85653c07097013e01a7

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-06-06 19:20:28 +02:00
Rui Salvaterra
ed1536e0b6 kernel: bump 5.15 to 5.15.41
Deleted (upstreamed):
generic/backport-5.15/890-v5.19-net-sfp-Add-tx-fault-workaround-for-Huawei-MA5671A-SFP-ON.patch [1]

Other patches automatically rebased.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.41&id=99858114a3b2c8f5f8707d9bbd46c50f547c87c0

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-06-06 19:20:28 +02:00
John Audia
f800f8d6fc kernel: bump 5.10 to 5.10.120
All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800, x86/64

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-06-06 19:20:02 +02:00
John Audia
cd634afe6c kernel: bump 5.10 to 5.10.119
Delete the crypto-lib-blake2s kmod package, as BLAKE2s is now built-in.
Patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800, x86/64

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-06-06 19:20:02 +02:00
John Audia
b789a588b1 kernel: bump 5.10 to 5.10.118
Removed upstreamed:
    generic-backport/774-v5.15-1-igc-remove-_I_PHY_ID-checking.patch
    generic-backport/774-v5.15-2-igc-remove-phy-type-checking.patch

All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-06-06 19:20:02 +02:00
John Audia
01a6a5c731 kernel: bump 5.10 to 5.10.117
Removed upstreamed:
    backport-5.10/890-v5.19-net-sfp-Add-tx-fault-workaround-for-Huawei-MA5671A-SFP-ON.patch

All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-06-06 19:20:02 +02:00
Hauke Mehrtens
c9929fabcb kernel: bump 5.10 to 5.10.116
Removed upstreamed:
  generic/backport-5.10/900-regulator-consumer-Add-missing-stubs-to-regulator-co.patch

All other patches automatically rebased.

Compile-tested: lantiq/xrx200, armvirt/64
Run-tested: lantiq/xrx200, armvirt/64

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-06-06 19:20:02 +02:00
Raylynn Knight
b515ad10a6 realtek: add support for ZyXEL GS1900-24E
The ZyXEL GS1900-24E is a 24 port gigabit switch similar to other GS1900
switches.

Specifications
--------------
* Device:    ZyXEL GS1900-24E
* SoC:       Realtek RTL8382M 500 MHz MIPS 4KEc
* Flash:     16 MiB Macronix MX25L12835F
* RAM:       128 MiB DDR2 SDRAM Nanya NT5TU128M8GE
* Ethernet:  24x 10/100/1000 Mbps
* LEDs:      1 PWR LED (green, not configurable)
             1 SYS LED (green, configurable)
             24 ethernet port link/activity LEDs (green, SoC controlled)
* Buttons:   1 "RESET" button on front panel
* Switch:    1 Power switch on rear of device
* Power      120-240V AC C13
* UART:      1 serial header (JP2) with populated standard pin connector on
             the left side of the PCB.
             Pinout (front to back):
             + Pin 1 - VCC marked with white dot
             + Pin 2 - RX
             + Pin 3 - TX
             + PIn 4 - GND

Serial connection parameters:  115200 8N1.

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

OEM upgrade method:

* Log in to OEM management web interface
* Navigate to Maintenance > Firmware
* Select the HTTP radio button
* Select the Active radio button
* Use the browse button to locate the
realtek-rtl838x-zyxel_gs1900-24e-initramfs-kernel.bin
file and select open so File Path is updated with filename.
* Select the Apply button. Screen will display "Prepare
for firmware upgrade ...".
*Wait until screen shows "Do you really want to reboot?"
then select the OK button
* Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it:
   > sysupgrade -n /tmp/realtek-rtl838x-zyxel_gs1900-24e-squashfs-sysupgrade.bin
   it may be necessary to restart the network (/etc/init.d/network restart) on
   the running initramfs image.

U-Boot TFTP method:

* Configure your client with a static 192.168.1.x IP (e.g. 192.168.1.10).
* Set up a TFTP server on your client and make it serve the initramfs image.
* Connect serial, power up the switch, interrupt U-boot by hitting the
  space bar, and enable the network:
   > rtk network on
* Since the GS1900-24E is a dual-partition device, you want to keep the OEM
  firmware on the backup partition for the time being. OpenWrt can only boot
  from the first partition anyway (hardcoded in the DTS). To make sure we are
  manipulating the first partition, issue the following commands:
  > setsys bootpartition 0
  > savesys
* Download the image onto the device and boot from it:
   > tftpboot 0x84f00000 192.168.1.10:openwrt-realtek-rtl838x-zyxel_gs1900-24e-initramfs-kernel.bin
   > bootm
* Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it:
   > sysupgrade -n /tmp/openwrt-realtek-rtl838x-zyxel_gs1900-24e-squashfs-sysupgrade.bin
   it may be necessary to restart the network (/etc/init.d/network restart) on
   the running initramfs image.

Signed-off-by: Raylynn Knight <rayknight@me.com>
2022-06-06 10:30:50 +02:00
Ptilopsis Leucotis
493080815d ath79: allow use GPIO17 as regular gpio on GL-AR300M devices
Small update to my previous path 'fix I2C on GL-AR300M devices'.
This update allow using GPIO17 as regular GPIO in case it not used
as I2C SDA line.

Signed-off-by: Ptilopsis Leucotis <PtilopsisLeucotis@yandex.com>
2022-06-05 21:19:32 +02:00
Lech Perczak
5ca45e0a21 ath79: ZTE MF286[,A,R]: use GPIO19 as ath9k LED
With the pinctrl configuration set properly by the previous commit, the
LED stays lit regardless of status of 2.4GHz radio, even if 5GHz radio
is disabled. Map GPIO19 as LED for ath9k, this way the LED will show
activity for both bands, as it is bound by logical AND with output of
ath10k-phy0 LED. This works well because during management traffic,
phy*tpt triggers typically cause LEDs to blink in unison.

Link: <https://github.com/openwrt/openwrt/pull/9941>
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-06-05 21:19:32 +02:00
Lech Perczak
82b5984636 ath79: ZTE MF286[,A,R]: fix WLAN LED mapping
The default configuration of pinctrl for GPIO19 set by U-boot was not a
GPIO, but an alternate function, which prevented the GPIO hog from
working. Set GPIO19 into GPIO mode to allow the hog to work, then the
ath10k LED output can control the state of actual LED properly.

Link: <https://github.com/openwrt/openwrt/pull/9941>
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-06-05 21:19:32 +02:00
Peter Adkins
b4184c666c ipq40xx: add support for Linksys WHW01 v1
This patch adds support for Linksys WHW01 v1 ("Velop") [FCC ID Q87-03331].

Specification
-------------

SOC:             Qualcomm IPQ4018
WiFi 1:          Qualcomm QCA4019 IEEE 802.11b/g/n
WiFi 2:          Qualcomm QCA4019 IEEE 802.11a/n/ac
Bluetooth:       Qualcomm CSR8811 (A12U)
Ethernet:        Qualcomm QCA8072 (2-port)
SPI Flash 1:     Mactronix MX25L1605D (2MB)
SPI Flash 2:     Winbond W25M02GV (256MB)
DRAM:            Nanya NT5CC128M16IP-DI (256MB)
LED Controller:  NXP PCA963x (I2C)
Buttons:         Single reset button (GPIO).

Notes
-----

There does not appear to be a way to trigger TFTP recovery without entering
U-Boot. The device must be opened to access the serial console in order to
first flash OpenWrt onto a device from factory.

The device has automatic recovery backed by a second set of partitions on
the larger of the two SPI flash ICs. Both the primary and secondary must
be flashed to prevent accidental rollback to "factory" after 3 failed boot
attempts.

Serial console
--------------

A serial console is available on the following pins of the populated J2
connector on the device mainboard (115200 8n1).

(<-- Top of PCB / Device)

  J2
  [o o o o o o]
       |   | |
       |   |  `-- GND
       |    `---- TX
       `--------- RX

Installation instructions
-------------------------

1. Setup TFTP server with server IP set to 192.168.1.236.
2. Copy compiled `...squashfs-factory.bin` to `nodes-jr.img` in tftp root.
3. Connect to console using pinout detailed in the serial console section.
4. Power on device and press enter when prompted to drop into U-Boot.
5. Flash first partition device via `run flashimg`.
6. Once complete, reset device and allow to power up completely.
7. Once comfortable with device upgrade reboot and drop back into U-Boot.
8. Flash the second partition (recovery) via `run flashimg2`.

Revert to "factory"
-------------------

1. Download latest firmware update from vendor support site.
2. Copy extracted `.img` file to `nodes-jr.img` in tftp root.
3. Connect to console using pinout detailed in the serial console section.
4. Power on device and press enter when prompted to drop into U-Boot.
5. Flash first partition device via `run flashimg`.
6. Once complete, reset device and allow to power up completely.
7. Once comfortable with device upgrade reboot and drop back into U-Boot.
8. Flash the second partition (recovery) via `run flashimg2`.

Link: https://github.com/openwrt/openwrt/pull/3682
Signed-off-by: Peter Adkins <peter@sunkenlab.com>
(calibration from nvmem, updated to 5.10+5.15)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-05 21:19:32 +02:00
Josef Schlehofer
06c1328d55 generic: remove patch to fix vlan setup on mv88e6xxx
This patch was present in Linux kernel [1] since version 5.11rc1, but it
was superseded by another patch, which set configure_vlan_while_not_filtering
to true by default since kernel v5.12-rc2 [2].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/net/dsa/mv88e6xxx/chip.c?h=v5.15.41&id=b8b79c414eca4e9bcab645e02cb92c48db974ce9

[2] 0ee2af4ebb#

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2022-06-05 21:19:32 +02:00
Christian Lamparter
b047ca1aa0 kernel: move Toshiba-TC58NVG0S3H patch to ipq40xx
Hannu Nyman wrote in openwrt's github issue #9962:
|Based on forum discussion, the commit 0bc794a
|"kernel: add support for Toshiba TC58NVG0S3HTA00 NAND flash"
|causes flash memory chip misdetection for some other
|Fritzbox devices, as the commit only defines a 4-byte flash
|memory chip ID that matches several chips used in the devices.
|
|See discussion from this onward
|<https://forum.openwrt.org/t/openwrt-22-03-0-rc1-first-release-candidate/126045/182>
|
|OpenWrt 22.03.0-rc2 and rc3 are causing on a Fritzbox 7412
|bootloops due to a misdetected flash chip.
|
|Yup, that patch is missing the 5th ID byte entirely - both chips
|share the same first 4;
|
| TC58NVG0S3HTA00 = 0x98 0xf1 0x80 0x15 0x72 (digikey datasheet, page 35)
| TC58BVG0S3HTA00 = 0x98 0xf1 0x80 0x15 0xf2 (digikey datasheet, page 28)
|
|The commit has also been backported to openwrt-22.03 after rc1,
|so both rc2 and rc3 suffer from this bug."

Andreas' TC58NVG0S3H seems not to follow Toshibas/Kioxa's own datasheet.
It only reports the first four bytes: "98 f1 80 15 00 00 00 00".

This patch changes the id_len in the entry to 8. This makes it so that
Andreas' NAND is still detected. At the same time, this prevents other
Toshiba NAND flash chips - that share the same four bytes - from being
misdetected.

The issue has been reported upstream, since they also accepted the initial
patch... so if not addressed, 5.19/5.20 will also break those affected
devices again.

Reported-by: Peter-vdL
Fixes: 0bc794a668 ("kernel: add support for Toshiba TC58NVG0S3HTA00 NAND flash")
Link: <https://github.com/openwrt/openwrt/issues/9962>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-05 21:05:17 +02:00
Christian 'Ansuel' Marangi
156488d1d6 kernel: modules: make ar8216/8327 modularizable
Make ar8216/8327 swconfig driver modularizable and add
entry to the netdevices.mk kernel modules file.

Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth@gmail.com>
2022-06-05 16:58:48 +02:00
Christian 'Ansuel' Marangi
1d910fa852 generic: 5.15: fix wrong PACKET_MANGLE select in swconfig switch patch
In the rebase process of 5.15 hack patch the ETHERNET_PACKET_MANGLE got
wrongly swapped from AR8216_PHY to PSB6970_PHY.
Restore the ETHERNET_PACKET_MANGLE select to the right place.

Fixes: 1f302afd73 ("generic: 5.15: rework hack patch")
Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth@gmail.com>
2022-06-05 16:58:33 +02:00
Eneas U de Queiroz
9be35180f4 sunxi/cortexa53: enable armv8-CE crypto algorithms
This enables armv8 crypto extensions version of AES, GHASH, SHA1, and
CRC T10 algorithms in the kernel.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2022-06-04 12:39:01 +02:00
Eneas U de Queiroz
306861cf38 sunxi/cortexa53: refresh kernel 5.15 config
This is result of a make kernel_oldconfig CONFIG_TARGET=subtarget.

One new option popped up:
Support for the Allwinner H616 CCU (SUN50I_H616_CCU) [Y/n/?] (NEW) n

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2022-06-04 12:39:01 +02:00
Eneas U de Queiroz
b1346d35e4 rockchip/armv8: enable armv8-CE crypto algorithms
This enables armv8 crypto extensions version of AES, GHASH, and CRC T10
algorithms in the kernel.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2022-06-04 12:39:01 +02:00
Eneas U de Queiroz
1b94e4aab8 octeontx: add armv8-CE version of CRC T10
Adds the crypto extensions version of the CRC T10 algorithm that is
already built into the kernel.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2022-06-04 12:39:01 +02:00
Eneas U de Queiroz
06bb5ac1f2 mvebu/cortexa72: enable armv8-CE crypto algos
This enables armv8 crypto extensions version of AES, GHASH, SHA1,
SHA256, and SHA512 algorithms in the kernel.

The choice of algorithms match the 32-bit versions that are enabled in
the target config-5.10 file, but were only used by the cortexa9
subtarget.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2022-06-04 12:39:01 +02:00
Eneas U de Queiroz
39b6af1147 mvebu/cortexa72: refresh kernel 5.10 config
This is result of a plain make kernel_oldconfig CONFIG_TARGET=subtarget.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2022-06-04 12:39:01 +02:00
Eneas U de Queiroz
f5167e11bf mvebu/cortexa53: enable armv8-CE crypto algos
This enables armv8 crypto extensions version of AES, GHASH, SHA1,
SHA256, and SHA512 algorithms in the kernel.

The choice of algorithms match the 32-bit versions that are enabled in
the target config-5.10 file, but were only used by the cortexa9
subtarget.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2022-06-04 12:39:01 +02:00
Eneas U de Queiroz
a4c6384d93 mvebu/cortexa53: refresh kernel 5.10 config
This is result of a plain make kernel_oldconfig CONFIG_TARGET=subtarget.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2022-06-04 12:39:01 +02:00
Eneas U de Queiroz
eb33232420 layerscape/armv8_64b: enable armv8-CE crypto algos
This enables armv8 crypto extensions version of AES, GHASH, SHA256 and
CRC T10 algorithms in the kernel.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2022-06-04 12:39:01 +02:00
Eneas U de Queiroz
b2cb87bc98 bcm4908: enable armv8-CE crypto algorithms
This enables armv8 crypto extensions version of AES and GHASH algorithms
in the kernel.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2022-06-04 12:39:01 +02:00
Eneas U de Queiroz
7b6beb7489 bcm27xx/bcm2711: enable asm crypto algorithms
This enables arm64/neon version of AES, SHA256 and SHA512 algorithms in
the kernel.  bcm2711 does not support armv8 crypto extensions, so they
are not included.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2022-06-04 12:39:01 +02:00
Eneas U de Queiroz
38ebb210a9 bcm27xx/bcm2710: enable asm crypto algorithms
This enables arm64/neon version of AES, SHA256 and SHA512 algorithms in
the kernel.  bcm2710 does not support armv8 crypto extensions, so they
are not included.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2022-06-04 12:39:01 +02:00
Stijn Tintel
ce90ba1f31 ramips: use hotplug script for EAP615-Wall MACs
Using nvmem-cells to set the MAC address for a DBDC device results in
both PHY devices using the same MAC address. This in turn will result in
multiple BSSes using the same BSSID, which can cause various problems.

Use the hotplug script for the EAP615-Wall instead to avoid this.

Fixes: a1b8a4d7b3 ("ramips: support TP-Link EAP615-Wall")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Tested-by: Stijn Segers <foss@volatilesystems.org>
Tested-By: Andrew Powers-Holmes <aholmes@omnom.net>
2022-06-03 13:45:38 +03:00
Felix Fietkau
38a5b593ef kernel: fix crashes in bridge offload code
- fix an issues when accessing the port pointer of an expired/invalid fdb entry

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-06-02 21:31:57 +02:00
David Bauer
b21b98627d ipq40xx: add Aruba AP-365 specific BDF
Aruba deploys a BDF in the root filesystem, however this matches the one
used for the DK04 reference board.

The board-specific BDFs are built into the kernel. The AP-365 shows
sinificant degraded performance with increased range when used with the
reference BDF.

Replace the BDF with the one extracted from Arubas kernel.

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-06-02 16:50:12 +02:00
Rui Salvaterra
4eed715694 kernel: add two ksyms to the generic kconfigs
These will be prompted for with GCC 12.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-06-01 15:03:40 +02:00
Christian 'Ansuel' Marangi
03685d3470 generic: 5.15: fix panic on tcp_no_window_check set with interface up
The current reworked version cause kernel panic when the value is changes and
an interface is up. Following the tcp_be_liberal impelementation,
reimplement this to permit a safe change of this value without any
panic.
This has been tested with a QSDK package where tcp_no_window_check is used.

Fixes: 92fb51bc98 ("generic: 5.15: standardize tcp_no_window_check pending patch")
Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth@gmail.com>
2022-05-29 22:37:36 +02:00
Sander Vanheule
bde6311569 realtek: don't unmask non-maskable GPIO IRQs
On uniprocessor builds, for_each_cpu(cpu, mask) will assume 'mask'
always contains exactly one CPU, and ignore the actual mask contents.
This causes the loop to run, even when it shouldn't on an empty mask,
and tries to access an uninitialised pointer.

Fix this by wrapping the loop in a cpumask_empty() check, to ensure it
will not run on uniprocessor builds if the CPU mask is empty.

Fixes: af6cd37f42 ("realtek: replace RTL93xx GPIO patches")
Reported-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Reported-by: Robert Marko <robimarko@gmail.com>
Tested-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-05-30 07:21:03 +02:00
Sebastian Schaper
4bed263af7 ath79: fix label MAC address for D-Link DIR-825B1
The label MAC address for DIR-825 Rev. B1 is the WAN address located
at 0xffb4 in `caldata`, which equals LAN MAC at 0xffa0 incremented by 1.

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
2022-05-29 00:00:52 +02:00
David Bauer
275a76e59a ramips: disable unsupported background-radar
The UniFi 6 Lite as well as the Tenbay T-MB5EU do not have the third
background-radar chain. For the Tenbay, the connector is present,
however no antenna is connected to it.

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-05-29 00:00:39 +02:00
Hauke Mehrtens
fb1ba92202 malta: use default OpenWrt network configuration
Currently malta configures the first Ethernet device as WAN interface.
If it finds a second one it will configure it as LAN.

This commit reverses it to match armvirt and x86. If there is only one
network device it will be configured as LAN device now. If we find two
network devices the 2. one will be WAN.

If no board.d network configuration is given it will be configured in
package/base-files/files/etc/board.d/99-default_network

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
[minor typos]
Signed-off-by: Paul Spooren <mail@aparcar.org>
2022-05-28 17:35:34 +02:00
Ritaro Takenaka
efff48529b kernel: backport flow offload fixes
Some dst in IPv6 flow offload table become invalid after the table is created.
So check_dst is needed in packet path.

Signed-off-by: Ritaro Takenaka <ritarot634@gmail.com>
[Add patch for kernel 5.15 too and rename file]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-05-27 14:15:43 +02:00