Commit Graph

26754 Commits

Author SHA1 Message Date
John Audia
ce014b1e39 kernel: bump 5.15 to 5.15.55
All patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, mt7622/RT3200
Run-tested: bcm2711/RPi4B, mt7622/RT3200

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-07-31 18:55:22 +02:00
John Audia
e4af991220 kernel: bump 5.15 to 5.15.54
All patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, mt7622/RT3200
Run-tested: bcm2711/RPi4B, mt7622/RT3200

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-07-31 18:55:22 +02:00
John Audia
7be62b1187 kernel: bump 5.10 to 5.10.134
All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-07-29 23:03:41 +02:00
John Audia
56760c0b13 x86: update defconfig for 5.10.133
Add some new/missing symbols relating to speculative execution mitigations[1].

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/Kconfig?id=v5.10.133&id2=v5.10.132

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-07-29 23:03:41 +02:00
John Audia
913f160ac6 kernel: bump 5.10 to 5.10.133
All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-07-29 23:03:41 +02:00
John Audia
7d3c0928de kernel: bump 5.10 to 5.10.132
All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-07-29 23:03:41 +02:00
Rafał Miłecki
57cad53f4e bcm4908: enable & setup packet steering
Without packet steering NAT masquarade speed on BCM4908 /jumps/ between
two speeds:
1. 826 Mb/s (±3 Mb/s)
2. 909 Mb/s (±8 Mb/s)
and it never reaches ~940 Mb/s.

Proper packet steering can improve it. Below are testing results for
running iperf TCP traffic from LAN to WAN. They were used to pick up
golden values.

┌──────────┬──────────┬───────────┐
│   eth0   │  br-lan  │   speed   │
│ rps_cpus │ rps_cpus │   [Mbps]  │
├──────────┼──────────┼───────────┤
│        0 │        0 │ 743 / 804 │
│        0 │        1 │ 738 / 821 │
│        0 │        2 │     ✓ 940 │
│        0 │        4 │     ✓ 938 │
│        0 │        8 │     ✓ 941 │
├──────────┼──────────┼───────────┤
│        1 │        0 │       829 │
│        1 │        1 │       829 │
│        1 │        2 │     ✓ 942 │
│        1 │        4 │     ✓ 941 │
│        1 │        8 │     ✓ 941 │
├──────────┼──────────┼───────────┤
│        2 │        0 │     ✓ 942 │
│        2 │        1 │       926 │
│        2 │        2 │     ✓ 942 │
│        2 │        4 │     ✓ 942 │
│        2 │        8 │     ✓ 941 │
├──────────┼──────────┼───────────┤
│        4 │        0 │     ✓ 941 │
│        4 │        1 │       925 │
│        4 │        2 │     ✓ 941 │
│        4 │        4 │     ✓ 941 │
│        4 │        8 │     ✓ 941 │
├──────────┼──────────┼───────────┤
│        8 │        0 │     ✓ 942 │
│        8 │        1 │       925 │
│        8 │        2 │     ✓ 941 │
│        8 │        4 │     ✓ 942 │
│        8 │        8 │     ✓ 942 │
└──────────┴──────────┴───────────┘

Ref: fcbd39689e ("bcm53xx: enable & setup packet steering")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-28 17:46:33 +02:00
Daniel Golle
a49212d762 Revert "realtek: remove support for HPE 1920 series"
This reverts commit a63aeaecf1.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-07-28 16:45:19 +02:00
Sander Vanheule
a63aeaecf1 realtek: remove support for HPE 1920 series
Support for HPE 1920 images depends on two non-existent tools (mkh3cimg
and mkh3cvfs) from the in the firmware-utils package. Revert commit
f2f09bc002 ("realtek: add support for HPE 1920 series") until support
for these tools is merged and made available in OpenWrt.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-07-28 15:17:04 +02:00
Jan Hoffmann
f2f09bc002 realtek: add support for HPE 1920 series
Hardware information:
---------------------

- HPE 1920-8G:
  - RTL8380 SoC
  - 8 Gigabit RJ45 ports (built-in RTL8218B)
  - 2 SFP ports (built-in SerDes)

- HPE 1920-16G / HPE 1920-24G (same board):
  - RTL8382 SoC
  - 16/24 Gigabit RJ45 ports (built-in RTL8218B, 1/2 external RTL8218D)
  - 4 SFP ports (external RTL8214FC)

- Common:
  - RJ45 RS232 port on front panel
  - 32 MiB NOR Flash
  - 128 MiB DDR3 DRAM
  - PT7A7514 watchdog

Booting initramfs image:
------------------------

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
2022-07-28 14:08:56 +02:00
Jan Hoffmann
3b1261224a kernel: mtdsplit: add support for H3C VFS filesystem
The bootloader on some H3C devices (for example HPE 1920 switches) only
supports booting from flash by reading an image from an "VFS" filesystem
which spans most of the available flash. The filesystem size is hard-
coded in the bootloader. However, as long as no write operations are
performed in the bootloader menu, it is sufficient if the start of the
partition contains a valid filesystem with the kernel image.

This mtdsplit parser reads the size and location of the kernel image and
finds the location of the rootfs stored after it. It assumes that the
filesystem image matches the layout of one generated by mkh3cvfs, with
a filename of "openwrt-kernel.bin" for the kernel image.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
2022-07-28 14:08:56 +02:00
Jan Hoffmann
81e3017609 realtek: clean up rtl838x MDIO busy wait loop
Don't use udelay to allow other kernel tasks to execute if the kernel
has been built without preemption. Also determine the timeout based on
jiffies instead of loop iterations.

This is especially important on devices containing a watchdog with a
short timeout. Without this change, the watchdog is not serviced during
PHY patching which can take multiple seconds.

Tested-by: Birger Koblitz <mail@birger-koblitz.de>
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
2022-07-28 14:08:51 +02:00
Jan Hoffmann
b6a0d50b7f realtek: add SFP support for RTL8214FC PHY
Probe the SFP module during PHY initialization and implement
insertion/removal handlers to automatically configure the media type
of the respective port.

Suggested-by: Birger Koblitz <git@birger-koblitz.de>
Tested-by: Birger Koblitz <mail@birger-koblitz.de>
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
2022-07-28 14:08:43 +02:00
Jan Hoffmann
c6a7ea9f7f realtek: rtl83xx-phy: decouple RTL8214FC media change and power config
Move RTL8214FC power configuration to newly created suspend and resume
methods. A media change now only results in power configuration if the
PHY is not suspended, to avoid powering up a port when the interface is
currently not up.

While at it, remove the rtl8380 prefix from function names, as this is
actually not SoC-specific.

Tested-by: Birger Koblitz <mail@birger-koblitz.de>
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
2022-07-28 14:08:07 +02:00
Jan Hoffmann
bac50e39a7 realtek: rtl83xx-phy: fix RTL8214FC media change
Toggle power on the individual PHY instead of the package. Otherwise
a media change always toggles power on the first port, and not the one
that is being configured.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
2022-07-28 14:07:10 +02:00
Markus Stockhausen
b2681e584c realtek: make DGS-1210 u-boot-env partition writeable
We are close to provide enduser friendly OpenWrt images for DGS-1210
switches that do not need serial console. Nevertheless a small bit is
missing. We cannot switch back to the vendor partition or initiate a
download of a vendor firmware image. To issue this from inside OpenWrt
we need write access to U-Boot environment.

Case 1: Switch back to secondary (vendor) image
> fw_setenv bootcmd run addargs\; bootm 0xb4e80000
> fw_setenv image /dev/mtdblock7
> reboot

Case 2: Issue D-Link Network Assistant based download on next reboot.
This is a combination of some vendor specific protocol (DDP) and a
TFTP download afterwards.
> fw_setenv bootstop on
> reboot

Allow these commands by opening up u-boot-env for write access.
Tested on DGS-1210-20.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2022-07-26 09:15:38 +02:00
Rafał Miłecki
a8e1e30543 uboot-bcm4908: include SoC in output files
This fixes problem of overwriting BCM4908 U-Boot and DTB files by
BCM4912 ones. That bug didn't allow booting BCM4908 devices.

Fixes: f4c2dab544 ("uboot-bcm4908: add BCM4912 build")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-25 18:13:12 +02:00
Rafał Miłecki
6ae2f7ff47 bcm4908: build bootfs image per-SoC
In theory we could have just 1 bootfs image for all devices as each
device has its own entry in the "configurations" node. It doesn't work
well with default configuration though.

If something goes wrong U-Boot SPL can be interrupted (by pressing A) to
enter its minimalistic menu. It allows ignoring boardid. In such case
bootfs default configuration is used.

For above reason each SoC family (BCM4908, BCM4912) should have its own
bootfs built. It allows each of them to have working default
configuration.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-25 18:13:12 +02:00
Daniel Kestrel
0f301b0b1d lantiq: fix network port GPIO settings for Fritzbox 3390
There are forum reports that 2 LAN ports are not working, the
GPIO settings are adjusted to fix the problem.

Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
2022-07-22 22:05:23 +02:00
Christian Lamparter
69ea671320 ipq806x: Archer VR2600: fix switch ports numbering
The order of LAN ports shown in Luci is reversed compared to what is
written on the case of the device.  Fix the order so that they match.

Fixes: #10275
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-07-22 22:03:27 +02:00
Martin Blumenstingl
8083d225f3 generic: 5.15: Disable more config symbols
These came up while trying to build the lantiq target with Linux 5.15.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2022-07-22 16:53:20 +02:00
Sander Vanheule
a3e4949998 realtek: clear spurious GPIO interrupts
The interrupt controller in the internal GPIO peripheral will sometimes
generate spurious interrupts. If these are not properly acknowledged, the
system will be held busy until reboot. These spurious interrupts are identified
by the fact that there is no system IRQ number associated, since the interrupt
line was never allocated. Although most prevalent on RTL839x, RTL838x SoCs have
also displayed this behaviour.

Reported-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> # DGS-1210-52
Reported-by: Birger Koblitz <mail@birger-koblitz.de> # Netgear GS724TP v2
Reported-by: Jan Hoffmann <jan@3e8.eu> # HPE 1920-16G
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-07-21 22:44:01 +02:00
David Bauer
a0b7fef0ff ramips: add support for ZyXEL NWA50AX / NWA55AXE
Hardware
--------
CPU:    Mediatek MT7621
RAM:    256M DDR3
FLASH:  128M NAND
ETH:    1x Gigabit Ethernet
WiFi:   Mediatek MT7915 (2.4/5GHz 802.11ax 2x2 DBDC)
BTN:    1x Reset (NWA50AX only)
LED:    1x Multi-Color (NWA50AX only)

UART Console
------------
NWA50AX:
Available below the rubber cover next to the ethernet port.
NWA55AXE:
Available on the board when disassembling the device.

Settings: 115200 8N1

Layout:

<12V> <LAN> GND-RX-TX-VCC

Logic-Level is 3V3. Don't connect VCC to your UART adapter!

Installation Web-UI
-------------------
Upload the Factory image using the devices Web-Interface.

As the device uses a dual-image partition layout, OpenWrt can only
installed on Slot A. This requires the current active image prior
flashing the device to be on Slot B.

If the currently installed image is started from Slot A, the device will
flash OpenWrt to Slot B. OpenWrt will panic upon first boot in this case
and the device will return to the ZyXEL firmware upon next boot.

If this happens, first install a ZyXEL firmware upgrade of any version
and install OpenWrt after that.

Installation TFTP
-----------------
This installation routine is especially useful in case
 * unknown device password (NWA55AXE lacks reset button)
 * bricked device

Attach to the UART console header of the device. Interrupt the boot
procedure by pressing Enter.

The bootloader has a reduced command-set available from CLI, but more
commands can be executed by abusing the atns command.

Boot a OpenWrt initramfs image available on a TFTP server at
192.168.1.66. Rename the image to owrt.bin

 $ atnf owrt.bin
 $ atna 192.168.1.88
 $ atns "192.168.1.66; tftpboot; bootm"

Upon booting, set the booted image to the correct slot:

 $ zyxel-bootconfig /dev/mtd10 get-status
 $ zyxel-bootconfig /dev/mtd10 set-image-status 0 valid
 $ zyxel-bootconfig /dev/mtd10 set-active-image 0

Copy the OpenWrt ramboot-factory image to the device using scp.
Write the factory image to NAND and reboot the device.

 $ mtd write ramboot-factory.bin firmware
 $ reboot

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-07-20 21:52:06 +02:00
Rafał Miłecki
3f2b2fe084 bcm4908: prepare for Asus GT-AX6000 support
It isn't tested & Linux DT will surely need more work.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-20 20:04:50 +02:00
Rafał Miłecki
d63ef7c90f bcm4908: backport bcmbca DT patches queued for 5.20
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-20 20:04:50 +02:00
Wenli Looi
0f068e7c4a
ramips: add support for Netgear WAX202
Netgear WAX202 is an 802.11ax (Wi-Fi 6) router.

Specifications:
* SoC: MT7621A
* RAM: 512 MiB NT5CC256M16ER-EK
* Flash: NAND 128 MiB F59L1G81MB-25T
* Wi-Fi:
  * MT7915D: 2.4/5 GHz (DBDC)
* Ethernet: 4x 1GbE
  * Switch: SoC built-in
* USB: None
* UART: 115200 baud (labeled on board)

Load addresses (same as ipTIME AX2004M):
* stock
  * 0x80010000: FIT image
  * 0x81001000: kernel image -> entry
* OpenWrt
  * 0x80010000: FIT image
  * 0x82000000: uncompressed kernel+relocate image
  * 0x80001000: relocated kernel image -> entry

Installation:
* Flash the factory image through the stock web interface, or TFTP to
  the bootloader. NMRP can be used to TFTP without opening the case.
* Note that the bootloader accepts both encrypted and unencrypted
  images, while the stock web interface only accepts encrypted ones.

Revert to stock firmware:
* Flash the stock firmware to the bootloader using TFTP/NMRP.

References in WAX202 GPL source:
https://www.downloads.netgear.com/files/GPL/WAX202_V1.0.5.1_Source.rar

* openwrt/target/linux/ramips/dts/mt7621-ax-nand-wax202.dts
  DTS file for this device.

Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
2022-07-19 14:49:04 +02:00
John Audia
d0d6b8e183
mt7622: remove 300 MHz from dts
Due to the bug described here[1], remove the 300 MHz clock to avoid a low
voltage condition that can cause a hang when rebooting the RT3200/E8450.

This solution is probably better than the script-based work-around[2].

1. https://forum.openwrt.org/t/belkin-rt3200-linksys-e8450-wifi-ax-discussion/94302/1490
2. https://github.com/openwrt/openwrt/pull/5025

Signed-off-by: John Audia <therealgraysky@proton.me>
Tested-by: Rui Salvaterra <rsalvaterra@gmail.com>
Tested-by: John Audia <therealgraysky@proton.me>
2022-07-19 14:26:30 +02:00
Rafał Miłecki
79af0593a3 kernel: switch back 5.15 to fw_devlink=permissive
Kernel switching to fw_devlink=on as default broke probing some devices.
Revert it until we get a proper fix.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-19 06:26:32 +02:00
John Audia
c50d462e34 kernel: bump 5.10 to 5.10.131
All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-07-18 23:14:30 +02:00
John Audia
c600d1cb00 kernel: bump 5.10 to 5.10.130
All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-07-18 23:14:30 +02:00
John Audia
06c9e8bfdf kernel: bump 5.10 to 5.10.129
All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-07-18 23:14:30 +02:00
Rafał Miłecki
864fdf2bf3 bcm4908: use upstream-accepted watchdog patches
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-18 18:39:20 +02:00
Rafał Miłecki
001856fa51 bcm4908: backport latest DT patches
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-18 18:39:20 +02:00
Rafał Miłecki
bb2a2b1dbe kernel: update leds-bcm63138 driver
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-18 18:39:20 +02:00
Felix Fietkau
af8771751c kernel: backport mtk wlan flow offloading fix
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-07-18 15:14:16 +02:00
Mark Mentovai
7f54bf6fe2
ipq40xx: add MikroTik wAP ac (RBwAPG-5HacD2HnD) support
The MikroTik wAP ac (RBwAPG-5HacD2HnD) is a dual-band dual-radio
802.11ac wireless access point with integrated antenna and two Ethernet
ports in a weatherproof enclosure. See
https://mikrotik.com/product/wap_ac for more information.

Important: this is the new ipq40xx-based wAP ac, not the older
ath79-based wAP ac (RBwAPG-5HacT2HnD), already supported in OpenWrt.

Specifications:
 - SoC: Qualcomm Atheros IPQ4018
 - CPU: 4x ARM Cortex A7
 - RAM: 128MB
 - Storage: 16MB NOR flash
 - Wireless
    - 2.4GHz: Built-in IPQ4018 (SoC) 802.11b/g/n 2x2:2, 2.5 dBi antennae
    - 5GHz: Built-in IPQ4018 (SoC) 802.11a/n/ac 2x2:2, 2.5 dBi antennae
 - Ethernet: Built-in IPQ4018 (SoC, QCA8075), 2x 1000/100/10Mb/s ports,
   one with 802.3af/at PoE in

Installation:
Boot the initramfs image via TFTP, then flash the sysupgrade image using
sysupgrade. Details at https://openwrt.org/toh/mikrotik/common.

Notes:
This preserves the MAC addresses of the physical Ethernet ports:
 - eth0 corresponds to the physical port labeled ETH1 and has the base
   MAC address. This port can be used to power the device.
 - eth1 corresponds to the physical port labeled ETH2 and has a MAC
   address one greater than the base.

MAC addresses are set from /lib/preinit/05_set_iface_mac_ipq40xx.sh
rather than /etc/board.d/02_network so that they are in effect for
preinit. This should likely be done for other MikroTik devices and
possibly other non-MikroTik devices as well.

As this device has 2 physical ports, they are each connected to their
respective PHYs, allowing the link status to be visible to software.
Since they are not marked on the case with any role (such as LAN or
WAN), both are bridged to the lan network by default, although this can
easily be changed if needed.

Signed-off-by: Mark Mentovai <mark@mentovai.com>
2022-07-18 01:45:47 +02:00
Rafał Miłecki
d9ab1e56d8 kernel: backport LEDs driver for BCMBCA devices
This includes BCM63xx and BCM4908 families.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-17 18:44:41 +02:00
Christian Lamparter
b479db9062 sdk: add spidev-test to the bundle of userspace sources
moves and extends the current facilities, which have been
added some time ago for the the usbip utility, to support
more utilites that are shipped with the Linux kernel tree
to the SDK.

this allows to drop all the hand-waving and code for
failed previous attempts to mitigate the SDK build failures.

Fixes: bdaaf66e28 ("utils/spidev_test: build package directly from Linux")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-07-17 14:19:21 +02:00
Sander Vanheule
1773264a0c realtek: correct egress frame port verification
Destination switch ports for outgoing frame can range from 0 to
CPU_PORT-1.

Refactor the code to only generate egress frame CPU headers when a valid
destination port number is available, and make the code a bit more
consistent between different switch generations. Change the dest_port
argument's type to 'unsigned int', since only positive values are valid.

This fixes the issue where egress frames on switch port 0 did not
receive a VLAN tag, because they are sent out without a CPU header.
Also fixes a potential issue with invalid (negative) egress port numbers
on RTL93xx switches.

Reported-by: Arınç ÜNAL <arinc.unal@xeront.com>
Suggested-by: Birger Koblitz <mail@birger-koblitz.de>
Tested-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-07-17 10:06:51 +02:00
Sander Vanheule
0b35a08a05 realtek: correct egress frame priority assignment
Priority values passed to the egress (TX) frame header initialiser are
invalid when smaller than 0, and should not be assigned to the frame.
Queue assignment is then left to the switch core logic.

Current code for RTL83xx forces the passed priority value to be
positive, by always masking it to the lower bits, resulting in the
priority always being set and enabled. RTL93xx code doesn't even check
the value and unconditionally assigns the (32 bit) value to the (5 bit)
QID field without masking.

Fix priority assignment by only setting the AS_QID/AS_PRI flag when a
valid value is passed, and properly mask the value to not overflow the
QID/PRI field.

For RTL839x, also assign the priority to the right part of the frame
header. Counting from the leftmost bit, AS_PRI and PRI are in bits 36
and 37-39. The means they should be assigned to the third 16 bit value,
containing bits 32-47.

Tested-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-07-17 10:06:46 +02:00
Sander Vanheule
d6165ea75b realtek: fix egress L2 learning on rtl839x
The flag to enable L2 address learning on egress frames is in CPU header
bit 40, with bit 0 being the leftmost bit of the header. This
corresponds to BIT(7) in the third 16-bit value of the header.

Correctly set L2LEARNING by fixing the off-by-one error.

Fixes: 9eab76c84e ("realtek: Improve TX CPU-Tag usage")
Tested-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-07-17 10:06:40 +02:00
Sander Vanheule
d9516cacb0 realtek: fix egress port mask on rtl839x
The flag to enable the outgoing port mask is in CPU header bit 43, with
bit 0 being the leftmost bit of the header. This corresponds to BIT(4)
in the third 16-bit value of the header.

Correctly set AS_DPM by fixing the off-by-one error.

Fixes: 9eab76c84e ("realtek: Improve TX CPU-Tag usage")
Tested-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-07-17 10:06:32 +02:00
Christian Lamparter
e37ba80633 bcm53xx: add support for Meraki MR26
Meraki MR26 is an EOL wireless access point featuring a
PoE ethernet port and two dual-band 3x3 MIMO 802.11n
radios and 1x1 dual-band WIFI dedicated to scanning.

Thank you Amir for the unit and PSU.

Hardware info:
SOC   : Broadcom BCM53015A1KFEBG (dual-core Cortex-A9 CPU at 800 MHz)
RAM   : SK hynix Inc. H5TQ1G63EFR, 1 Gbit DDR3 SDRAM = 128 MiB
NAND  : Spansion S34ML01G100TF100, 1 Gbit SLC NAND Flash = 128 MiB
ETH   : 1 GBit Ethernet Port - PoE
WIFI1 : Broadcom BCM43431KMLG, BCM43431 802.11 abgn
WIFI1 : Broadcom BCM43431KMLG, BCM43431 802.11 abgn
WIFI3 : Broadcom BCM43428 abgn (1x1:1 - id: 43428)
BUTTON: one reset button
LEDS  : RGB-LED
MISC  : Atmel AT24C64 8KiB EEPROM (i2c - seems empty)
      : Ti INA219 26V, 12-bit, i2c output current/voltage/power monitor
      : TPS23754, High Power/High Efficiency PoE Interface+DC/DC Controller

SERIAL:
	WARNING: The serial port needs a TTL/RS-232 3V3 level converter!
	The Serial setting is 115200-8-N-1. The board has a populated
	right angle 1x4 0.1" pinheader.
	The pinout is: VCC (next to J3, has little white arrow), RX, TX, GND.

This flashing procedure for the MR26 was tested with firmware:
    "22-143410M-gf25cbf5a-asa".
    U-Boot 2012.10-00063-g83f9fe4 (Jun 04 2014 - 21:22:39)

A guide how to open up the device is available on the wiki:
<https://openwrt.org/toh/meraki/mr26>

Notes:
 - The WIFI do work to a degree. Limited to 802.11bg in the 2.4GHz band.
 - the WIFI macs are made up.

0. Create a separate Ethernet LAN which can't have access to the internet.
   Ideally use 192.168.1.2 for your PC. The new OpenWrt firmware will setup
   the network via DHCP Discovery, so make sure your PC is running
   a DHCP-Server (i.e.: dnsmasq)
   '# dnsmasq -i eth# -F 192.168.1.5,192.168.1.50
   Download the openwrt-meraki-mr26 initramfs file from openwrt.org and
   rename it to something simple like mr26.bin. Then put it into the tftp's
   server directory.

1. Disassemble the MR26 device by removing all screws (4 screws are located
   under the 4 rubber feets!) and prying open the plastic covers without
   breaking the plastic retention clips. Once inside, remove the plastic
   back casing. Be careful, there some "hidden" retention clips on both
   sides of the LAN port, you need a light to see those. Next, you want to
   remove all the screws on the outer metal shielding to get to the PCB.
   It's not necessary to remove the antennas!

2. Connect the serial cable to the serial header and Ethernet patch cable
   to the device.

4. Before connecting the power, get ready flood the serial console program
   with the magic:   xyzzy  . This is necessary in order to get into the
   u-boot prompt. Once Ready: connect power cable.

5. If you don't get the "u-boot>" prompt within the first few seconds,
   you have to disconnect and reconnect the power cable and try again.

6. In the u-boot prompt enter:

   setenv ipaddr 192.168.1.4
   setenv serverip 192.168.1.2
   tftpboot ${meraki_loadaddr} mr26.bin; bootm

   this will boot a in-ram-only OpenWrt image.

7. Once it booted use sysupgrade to permanently install OpenWrt.
   To do this: Download the latest sysupgrade.bin file and move
   it to the device. Then use sysupgrade *sysupgrade.bin to install it.

    WARNING: DO NOT DELETE the "storage" ubi volume!

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-07-15 15:21:44 +02:00
Christian Lamparter
50c232d6f4 ipq-wifi: drop upstreamed board-2.bin
The BDFs for the:
	GL.iNet GL-B2200

were upstreamed to the ath10k-firmware repository
and landed in linux-firmware.git

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-07-15 15:21:44 +02:00
Christian Lamparter
3b3eaf31cb ipq40xx: R619AC: replace space with - separator in variant string
Kalle:
"I see that variant has a space in it, does that work it correctly? My
original idea was that spaces would not be allowed, but didn't realise
to add a check for that."

Is this an easy change? Because the original author (Tim Davis) noted:
"You may substitute the & and space with something else saner if they
prove to be problematic."

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-07-15 15:21:44 +02:00
Sieng-Piaw Liew
3acd2ea148
ath79: fix Tx cleanup when NAPI poll budget is zero
NAPI poll() function may be passed a budget value of zero, i.e. during
netpoll, which isn't NAPI context.
Therefore, napi_consume_skb() must be given budget value instead of
!flush to truly discern netpoll-like scenarios.

https://lore.kernel.org/netdev/20220707141056.2644-1-liew.s.piaw@gmail.com/t/#m470f5c20225e76fb08c44d6cfa2f1b739ffaaea4
Signed-off-by: Sieng-Piaw Liew <liew.s.piaw@gmail.com>
2022-07-14 12:51:16 +02:00
Nick Hainke
e34ed3a833
mediatek: mt7622: add linux-next tag to bpi-wps-button fix
920-dts-mt7622-bpi-r64-fix-wps-button.patch is now merged upstream in
linux-next [0]. Add "linux-next" as tag so people know it is upstreamed.

[0] - https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/arch/arm64/boot/dts?id=c98e6e683632386a3bd284acda4342e68aec4c41

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-07-14 08:35:55 +02:00
Christian Marangi
4b924fe6df
generic: fix warning orphan section from module exports in aarch64
kernel linux now have 2 different export.h include, one from
linux/export.h and one from asm-generic/export.h

While most of our target user linux/export.h, aarch64 based target use
asm-generic/export.h that is not patched with the changes of
221-module_exports.

Patch also this additional header to fix multiple

aarch64-openwrt-linux-musl-ld: warning: orphan section `__ksymtab_strings' from `arch/arm64/kernel/head.o' being placed in section `__ksymtab_strings'

warning during kernel compilation.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-07-14 07:15:35 +02:00
Florian Eckert
8857387913
linux/generic/hack-5.15: add missing patch headers
This patches does not have a valid patch headers and does not apply on
an external git tree with 'git am'. To fix this add the missing headers.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-07-14 06:45:24 +02:00
Florian Eckert
2ed7f6cbb0
linux/generic/pending-5.15: add missing patch headers
This patches does not have a valid patch headers and does not apply on
an external git tree with 'git am'. To fix this add the missing headers.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-07-14 06:45:24 +02:00
Florian Eckert
a9573a029a
target/linux/pending-5.15: rename patches
The consecutive number 483 is assigned twice.
This change fixes this.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-07-14 06:45:21 +02:00
Rodrigo B. de Sousa Martins
ae07b9cc61 ath79: tplink-archer-c6-v2-us: fix inverted LED colors
The amber and green wan led color was inverted in dts file, which ends
up leaving the wan led amber when the connection is established, so,
switch gpio led number (7 and 8) in qca9563_tplink_archer-c6-v2-us.dts.

Tip: the /etc/config/system file needs to be regenerated.

Signed-off-by: Rodrigo B. de Sousa Martins <rodrigo.sousa.577@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [commit subject]
2022-07-12 09:25:43 +02:00
Daniel Golle
7c02a4a00b
bcm27xx: update patch to fix build
Linux stable v5.15.51 brought commit 7a3a4683562e
("ARM: dts: bcm2711-rpi-400: Fix GPIO line names") which was already
part of a local patch which then failed to apply. Remove the already
applied and now failing hunk from the patch to fix the build.

Fixes: 552d76f2be ("kernel: bump 5.15 to 5.15.51")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-07-11 23:39:13 +01:00
Piotr Dymacz
b68e9f2e19 generic: 5.15: add missing symbols
These were found during work on new device support under the
imx/cortexa7 target.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-07-11 14:28:09 +02:00
Piotr Dymacz
28e476191b imx: keep common kernel symbols in target's config
Move common kernel symbols from subtargets to target config.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-07-11 14:28:09 +02:00
Lech Perczak
fa26cdacc2 imx: cortexa7: add support for TechNexion PICO-PI-IMX7D
TechNexion PICO-PI-IMX7D is a NXP i.MX 7Dual based development board in
the well-known "Raspberry Pi" form factor, comprising of PICO-IMX7 SoM
and the PICO-PI-IMX7D carrier board.

Usually bundled with a 5" 800x480 LVDS display with I2C touchscreen and
an Omnivision OV5645 camera on a MIPI CSI bus, on a daughterboard. The
board was previously used primarily with "Android Things" ecosystem, but
the project was killed by Google.

This would not be possible, if not for the great tutorial of setting up
Debian on this board, by Robert C. Nelson [1].

Hardware highlights:

  CPU: NXP i.MX 7Dual SoC, dual-core Cortex-A7 at 1000 MHz
  RAM: 512 MiB DDR3 SDRAM
  Storage: 4 GB eMMC
  Networking:
    - built-in Gigabit Ethernet with Atheros AR8035 PHY,
    - Broadcom BCM4339 1x1 802.11ac Wi-Fi (over SDIO) + Bluetooth 4.1
      (over SDIO + UART + IS2) combo, with Hirose u.FL connector on the
      board,
    - dual CAN interfaces on the 40-pin connector,
  Interfaces:
    - USB-C power input plus USB 2.0 OTG host/device port,
    - single USB-A host port,
    - serial console over built-in FT232BL USB-UART converter with
      micro-USB connector (configuration: 115200-8-N-1),
    - analog audio interface with TRRS connector in CTIA standard,
    - SPI, I2C and UART interfaces available on the 40-pin,
    - mikroBUS connector,
    - I2C connector for the optional touch panel,
    - parallel LCD output for the optional display,
    - MIPI CSI connector for the optional camera

Installation:

1. Connect the serial console to debug USB connector and the terminal of
   choice in another window, at 115200-8-N-1. Ensure you can switch to
   it quickly after next step.

2. Power-on the board from your PC. Ensure your PC can supply required
   current, the board can take more than 1 A in the peak load during
   booting and brownout will result in power-on reset loop. Preferably,
   use charging-capable USB port or connect through self-powered USB
   hub. If U-Boot is present already on the eMMC, interrupt the booting
   sequence by pressing any key and skip to point 7.

3. Ensure the boot mode jumpers J1 and J2 are in correct position for
   USB recovery:

       2   6  2   6
      --------------
      |o o-o||o-o o|
      |o o-o||o-o o|
   J1 -------------- J2
       1   5  1   5

   The jumpers are located just underneath the 40-pin expansion header
   and are of the smaller 2 mm pitch.

4. Download and build 'imx_usb_loader' from:
   https://github.com/boundarydevices/imx_usb_loader.

5. Power-on the board again from your PC through USB OTG connector.

6. Use 'imx_usb_loader' to load 'SPL' and 'u-boot-dtb.img' to the board:

   $ sudo imx_usb u-boot-pico-pi-imx7d/SPL
   $ sudo imx_usb u-boot-pico-pi-imx7d/u-boot-dtb.img

7. Switch to the terminal from step 2 and interrupt boot sequence by
   pressing any key within 2 seconds.

8. Configure mmc 0 to boot from the data partition and disable access to
   boot partitions:

   => mmc partconf 0 0 7 0

   This only needs to be set once. If you were running Debian previously,
   this is probably already set.

9. Enable USB mass storage passthrough for eMMC from U-boot

   => ums 0 mmc 0

10. Optionally, backup previous eMMC contents by reading out its image.

11. Copy over the factory image to the USB device, for example:

    $ sudo dd if=openwrt-imx-cortexa7-pico-pi-imx7d-squashfs.combined.bin \
      of=/dev/disk/by-id/usb-Linux_UMS_disk_0-0:0 \
      bs=8M status=progress oflag=direct

12. Detach USB MSC interface from your PC and U-Boot by pressing Ctrl+C.

13. Ensure that boot mode jumpers are at the default settings for eMMC
    boot:

       2   6  2   6
      --------------
      |o-o o||o o-o|
      |o-o o||o-o o|
   J1 -------------- J2
       1   5  1   5

   If they are not, power-off the board, restore them and power-on the
   board again. Otherwise, if jumpers are set, just reset the board from
   U-Boot CLI:

   => reset

14. The installation is now complete and board should boot successfully.

Upgrading: just use sysupgrade image, as usual in OpenWrt.

Known issues/current limitations:

- OV5645 camera - not described in upstream device tree as of kernel
  5.15. There are staging drivers present in upstream Linux tree for
  i.MX 7 CSI, MIPI-CSI and video mux, and the configuration is there in
  imx7s.dtsi - so this is expected to get supported eventually,
- on-chip ADCs are disabled in upstream device tree, so the kernel
  driver remains disabled as well.

[1] https://forum.digikey.com/t/debian-getting-started-with-the-pico-pi-imx7/12429

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
[pepe2k@gmail.com: commit description reworded]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-07-11 14:26:24 +02:00
Lech Perczak
703a1cafe0 imx: add DT aliases for imx7d-pico-pi
Add OpenWrt specific aliases for system LED and label MAC device,
also set default serial console.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-07-11 14:18:40 +02:00
Lech Perczak
4436d7bae8 imx: make sdcard/eMMC sysupgrade more resilient
Ensure, that kernel update is performed atomically on filesystem, to
reduce likelihood of failure if power-cut occurs during sysupgrade. If
kernel update fails for whatever reason, skip updating rootfs as well.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-07-11 14:18:40 +02:00
Lech Perczak
70a9c75ef3 imx: decouple sdcard sysupgrade from Apalis boards
Sysupgrade procedure for i.MX 6 Apalis boards is suitable for most other
i.MX boards booting from eMMC or SD card. Extract the common parts and
decouple the procedure from "apalis" board name in sysupgrade TAR
contents, so the procedure is reusable for i.MX 7 boards.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-07-11 14:18:40 +02:00
Lech Perczak
f987887e14 imx: create sdcard image recipe with raw U-Boot
Most i.MX boards booting off eMMC or SD cards use raw U-Boot located at
69 kB offset from beginning of the device - create a recipe for such
image.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-07-11 14:18:40 +02:00
Lech Perczak
d545825cb3 imx: extract common combined image operations between subtargets
The same combined image format can be used to boot both i.MX 6 and
i.MX 7 platforms - extract the common part.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-07-11 14:18:40 +02:00
Lech Perczak
0b7e8f44ad imx: cortexa7: enable framebuffer console + DRM
The PICO-PI-IMX7D board is equipped with external LCD display with
touchscreen. To allow displaying console on it, enable framebuffer,
fbcon and DRM support at early boot.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
[pepe2k@gmail.com: refreshed subtarget kernel config]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-07-11 14:14:01 +02:00
Lech Perczak
f430600d73 imx: bundle correct SDMA firmware for i.MX 7 boards
Import sdma-imx7d.bin from linux-firmware repository at commit:
55edf5202154: ("imx: sdma: update firmware to v3.5/v4.5")

Cortex-A7 boards (i.MX 7 based) use different SDMA firmware than i.MX 6
boards - bundle the correct files in per-subtarget kernel options.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-07-11 14:14:01 +02:00
Lech Perczak
345e981707 imx: cortexa7: adjust kernel config defaults for i.MX 7
Add initial symbols required for i.MX 7 boards, based on devices
available on TechNexion PICO-PI-IMX7D board.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
[pepe2k@gmail.com: refreshed subtarget kernel config]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-07-11 14:14:01 +02:00
Piotr Dymacz
baa753ab8b imx: refresh (sub)target kernel configs
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-07-11 14:14:01 +02:00
Rui Salvaterra
3e9ad2cdce kernel: bump 5.15 to 5.15.53
Patches automatically rebased.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-07-11 00:50:18 +02:00
John Audia
552d76f2be kernel: bump 5.15 to 5.15.51
Manual rebase by Marty Jones:
  bcm27xx/patches-5.15/950-0078-BCM2708-Add-core-Device-Tree-support.patch

All other patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
Signed-off-by: Marty Jones <mj8263788@gmail.com>
[Apply same changes to new dts entry in modified file]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-07-11 00:49:25 +02:00
Sander Vanheule
eae5e55a79 realtek: remove hardcoded sys-led configurations
setup.c unconditionally sets the sys-led mode (blinking rate) to a
permanent high output. This may cause issues when a board expects this
pin to toggle periodically, e.g. when hooked up to an external watchdog.

If the sys-led peripheral is used to control an LED, the mux should be
configured to use the pin as GPIO0, allowing for better control as a
GPIO LED.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-07-10 09:54:35 +02:00
Sander Vanheule
b03109c094 realtek: add mux pinctrl for rtl931x
Add a pinctrl-single node to manage the sys-led mux and JTAG mux.
This allows using the associated pins as GPIOs:
  - sys-led: GPIO0
  - JTAG: GPIO6, GPIO7, others unknown (TDO, TDI, TMS, TCK /TRST)

Suggested-by: Birger Koblitz <mail@birger-koblitz.de>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-07-10 09:54:35 +02:00
Sander Vanheule
3edb5e841c realtek: add system LED for ZyXEL XGS1250-12
The devicetree for the ZyXEL XGS1250-12 was missing the description of
the front panel LED labeled "PWR SYS". Let's add it so it can be
controlled by the user.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-07-10 09:54:35 +02:00
Sander Vanheule
cd7a225d28 realtek: add sys-led disable pinctrl for rtl930x
Like for RTL838x devices, add a pinctrl-single node to manage the
sys-led/gpio0 mux, and allow using the pin as GPIO.

Co-developed-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-07-10 09:54:35 +02:00
Sander Vanheule
f4065485d3 realtek: add missing gpio0 pinctrl properties
Not all devices using the gpio0/sys-led pin as a GPIO, configure the
pinmux. Add the necessary pinctrl properties to these devices to ensure
the pin is set up for use as GPIO.

Co-developed-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Tested-by: Bjørn Mork <bjorn@mork.no>
2022-07-10 09:54:35 +02:00
Markus Stockhausen
fae3ac3560 realtek: build sane factory images for DGS-1210 models
During upload of firmware images the WebUI and CLI patch process
extracts a version information from the uploaded file and stores it
onto the jffs2 partition. To be precise it is written into the
flash.txt or flash2.txt files depending on the selected target image.
This data is not used anywhere else. The current OpenWrt factory
image misses this label. Therefore version information shows only
garbage. Fix this.

Before:
DGS-1210-20> show firmware information
IMAGE ONE:
Version      : xfo/QE~WQD"A\Scxq...
Size         : 5505185 Bytes

After:
DGS-1210-20> show firmware information
IMAGE ONE:
Version      : OpenWrt
Size         : 5505200 Bytes

Tested-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2022-07-08 20:15:22 +02:00
Markus Stockhausen
2b49ec3a28 realtek: build factory images for all DGS-1210 models
Currently we build factory images only for DGS-1210-28 model. Relax
that constraint and take care about all models. Tested on DGS-1210-20
and should work on other models too because of common flash layout.

Tested-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2022-07-08 20:15:22 +02:00
Christian Marangi
1a9ee36734 kernel: backport mtd dynamic partition patch
Backport upstream solution that permits to declare nvmem cells with
dynamic partition defined by special parser.

This provide an OF node for NVMEM and connect it to the defined dynamic
partition.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-08 10:19:58 +02:00
Rafał Miłecki
41e1e838fb kernel: backport mtd patch adding of_platform_populate() calls
This is required for non-parser drivers handling MTD devices.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-08 10:19:53 +02:00
Ronny Kotzschmar
9b00e97956
rockchip: reliably distribute net interrupts
On the NanoPI R4S it takes an average of 3..5 seconds for the network devices
to appear in '/proc/interrupts'.
Wait up to 10 seconds to ensure that the distribution of the interrupts
really happens.

Signed-off-by: Ronny Kotzschmar <ro.ok@me.com>
2022-07-07 13:13:26 +02:00
Andrew Sim
3872b422ff mediatek: mt7622: add missing vbus regulator node to totolink-a8000ru dts
On boot, kernel log complains no vbus supply is found:

`xhci-mtk 1a0c0000.usb: supply vbus not found, using dummy regulator`

so add the dts node entries to solve the issue

Signed-off-by: Andrew Sim <andrewsimz@gmail.com>
2022-07-07 00:22:23 +01:00
Hauke Mehrtens
dcc0fe24ea kernel: Add missing mediatek configuration options
When building the mediatek/mt7629 target in OpenWrt 22.03 the kernel
does not have a configuration option for CONFIG_CRYPTO_DEV_MEDIATEK. Add
this option to the generic kernel configuration and also add two other
configuration options which are removed when we refresh the mt7629
kernel configuration.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-07-06 20:32:11 +02:00
Luiz Angelo Daros de Luca
8b798dbb39 realtek: rename u-boot-env2 to board-name
Some realtek boards have two u-boot-env partitions. However, in the
DGS-1210 series, the mtdblock2 partition is not a valid u-boot env
and simply contains the board/device name, followed by nulls.

00000000  44 47 53 2d 31 32 31 30  2d 32 38 2d 46 31 00 00 |DGS-1210-28-F1..|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
*
00040000

00000000  44 47 53 2d 31 32 31 30  2d 35 32 2d 46 31 00 00 |DGS-1210-52-F1..|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
*
00040000

The misleading u-boot-env2 name also confuses uboot-envtools.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2022-07-05 21:52:14 +02:00
Markus Stockhausen
e763c4c89f realtek: build DGS-1210 images with CAMEO tag
From now on we will insert CAMEO tags into sysupgrade images for
DGS-1210 devices. This will make the "OS:...FAILED" and "FS:...FAILED"
messages go away.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2022-07-05 09:56:37 +02:00
Daniel Golle
f58e562b07
mediatek: mt7622: fix white dome LED of UniFi 6 LR
The recent differentiation between v1 and v2 of the UniFi 6 LR added
support for the v2 version which has GPIO-controlled LEDs instead of
using an additional microcontroller to drive an RGB led.
The polarity of the white LED, however, was inverted and the default
states didn't make a lot of sense after all. Fix that.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-07-04 19:19:52 +01:00
Daniel Golle
1d3b57dbee
mvebu: cortexa72: fix ImageBuilder for IEI Puzzle devices
The line trying to generate the standard sdcard.img.gz fails due to
boot.scr not being generated.
Remove the line in order to use the default sdcard.img.gz which is
exactly the same but includes generating the boot.scr file.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-07-04 18:36:09 +01:00
Sieng Piaw Liew
265f402fbd
ath79: ag71xx: reuse skbuff_head with napi skb api
napi_build_skb() reuses NAPI skbuff_head cache in order to save some
cycles on freeing/allocating skbuff_heads on every new Rx or completed
Tx.
Use napi_consume_skb() to feed the cache with skbuff_heads of completed
Tx so it's never empty.

Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
[ fixed commit title ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-07-04 17:14:39 +02:00
Nita Vesa
1a8c74da70 ramips: Add Xiaomi Mi Router 4A 100M International
The international version of Mi Router 4A 100M is physically
identical to the non-international one, but appears to be
using a different partitioning scheme with the "overlay"
partition being 2MiB in size instead of 1MiB. This means
the following "firmware" partition starts at a different
address and the DTS needs to be adjusted for the firmware
to work.

Signed-off-by: Nita Vesa <werecatf@outlook.com>
2022-07-03 22:14:05 +02:00
Sergei Iudin
4b0c433c39 ramips: Add suport for COMFAST CF-WR617AC
Specifications:
Chipset:MT7628DA+MT7612E
Antenna : 2.4Ghz:2x5dbi Antenna + 5.8Ghz:2x5dbi Antenna
Wireless Rate:2.4Ghz 300Mbps , 5.8Ghz 867Mbps
Output Power :100mW(20dbm)
Physical port:110/100Mbps RJ45 WAN Port , 310/100Mbps RJ45 LAN Port
Flash: 8Mb
DRam: 64Mb
Flashing: default bootloader attempts to boot from tftp://192.168.1.10/firmware_auto.bin using 192.168.1.1

Known issues:
mac-address-increment for 5GHZ doesnt work, i failed to figure out why. Original firmware using +1 from original value in factory partition.

Signed-off-by: Sergei Iudin <tsipa740@gmail.com>
2022-07-03 22:14:05 +02:00
Mikhail Zhilkin
bd783fd60a ramips: add support for Beeline SmartBox GIGA
Beeline SmartBox GIGA is a wireless WiFi 5 router manufactured by
Sercomm company.

Device specification
--------------------
SoC Type: MediaTek MT7621AT
RAM: 256 MiB, Nanya NT5CC128M16JR-EK
Flash: 128 MiB, Macronix MX30LF1G18AC
Wireless 2.4 GHz (MT7603EN): b/g/n, 2x2
Wireless 5 GHz (MT7613BE): a/n/ac, 2x2
Ethernet: 3 ports - 2xGbE (WAN, LAN1), 1xFE (LAN2)
USB ports: 1xUSB3.0
Button: 1 button (Reset/WPS)
PCB ID: DBE00B-1.6MM
LEDs: 1 RGB LED
Power: 12 VDC, 1.5 A
Connector type: barrel
Bootloader: U-Boot

Installation
-----------------
1. Downgrade stock (Beeline) firmware to v.1.0.02;
2. Give factory OpenWrt image a shorter name, e.g. 1001.img;
3. Upload and update the firmware via the original web interface.

Remark: You might need make the 3rd step twice if your running firmware
is booted from the Slot 1 (Sercomm0 bootflag). The stock firmware
reverses the bootflag (Sercomm0 / Sercomm1) on each firmware update.

Revert to stock
---------------
1. Change the bootflag to Sercomm1 in OpenWrt CLI and then reboot:
      printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
2. Optional: Update with any stock (Beeline) firmware if you want to
   overwrite OpenWrt in Slot 0 completely.

MAC Addresses
-------------
+-----+-----------+---------+
| use | address   | example |
+-----+-----------+---------+
| LAN | label     | *:16    |
| WAN | label + 1 | *:17    |
| 2g  | label + 4 | *:1a    |
| 5g  | label + 5 | *:1b    |
+-----+-----------+---------+
The label MAC address was found in Factory 0x21000

Notes
-----
1. The following scripts are required for the build:
      sercomm-crypto.py - already exists in OpenWrt
      sercomm-partition-tag.py - already exists in OpenWrt
      sercomm-payload.py - already exists in OpenWrt
      sercomm-pid.py - new, the part of this pull request
      sercomm-kernel-header.py - new, the part of this pull request
2. This device (same as other Sercomm S2,S3-based devices) requires
   special LZMA and LOADADDR settings for successful boot:
      LZMA_TEXT_START=0x82800000
      KERNEL_LOADADDR=0x81001000
      LOADADDR=0x80001000
3. This device (same as several other Sercomm-based devices - Beeline,
   Netgear, Etisalat, Rostelecom) has partition map (mtd1) containing
   real partition offsets, which may differ from device to device
   depending on the number and location of bad blocks on NAND.
   "fixed-partitions" is used if the partition map is not found or
   corrupted. This behavour (it's the same as on stock firmware) is
   provided by MTD_SERCOMM_PARTS module.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2022-07-03 20:25:38 +02:00
Rui Salvaterra
90a6350423 kernel: bump 5.15 to 5.15.50
Patches automatically rebased.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-07-03 20:25:38 +02:00
Alexandru Gagniuc
36acb3db03 realtek: EnGenius EWS2910P: declare and hog the poe-enable GPIO
GPIO 1 on the RTL8231 is used to force the PoE MCU to disable power
outputs. It is not used by any driver, but if accidentally set low,
PoE outputs are disabled. This situation is hard to debug, and
requires knowledge of the Broadcom PoE protocol used by the MCU.

To prevent this situation, hog it as an output high. This is
consistent with the ZyXel GS1900 series handles it.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2022-07-02 11:50:47 +02:00
Nick Hainke
04545c4325
mediatek: 5.15: refresh patches
Refresh patches:
- 510-net-mediatek-add-flow-offload-for-mt7623.patch
- 920-dts-mt7622-bpi-r64-fix-wps-button.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-07-01 20:24:44 +02:00
Nick Hainke
3c3367f03e
generic: 5.15: refresh patches
Refresh patches:
- 402-mtd-blktrans-call-add-disks-after-mtd-device.patch
- 420-mtd-set-rootfs-to-be-root-dev.patch
- 495-mtd-core-add-get_mtd_device_by_node.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-07-01 20:24:43 +02:00
Nick Hainke
6686194255
mediatek: mt7622: fix banana pi r64 wps button
Fix the wps button to prevent wrongly detected recovery procedures.
In the official banana pi r64 git the wps button is set to
GPIO_ACTIVE_LOW and not GPIO_ACTIVE_HIGH.

Import patch to fix on boot unwanted recovery entering:

  Press the [f] key and hit [enter] to enter failsafe mode
  Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
  - failsafe button wps was pressed -
  - failsafe -

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-07-01 20:24:43 +02:00
Luiz Angelo Daros de Luca
6e0f0eae5b
ath79: use rtl8366s and rtl8366_smi as a module
rtl8366s is used only by dlink_dir-825-b1 and the netgear_wndr family
(wndr3700, wndr3700-v2, wndr3800ch, wndr3800.dts, wndrmac-v1,
wndrmac-v2).

Not tested in real hardware.

With rtl8366rb, rtl8366s, rtl8367 as modules, rtl8366_smi can also be a
loadable module. This change was tested with tl-wr2543-v1.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2022-07-01 20:22:53 +02:00
Luiz Angelo Daros de Luca
b168a07799
ath79: use rtl8367 as a module
rtl8367 is used only by tl-wr2543-v1. Tested both normal and failsafe
modes.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2022-07-01 20:22:52 +02:00
Luiz Angelo Daros de Luca
575ec7a4b1
ath79: use rtl8366rb as a module
It looks like rtl8366rb is used only by tplink_tl-wr1043nd-v1 and
buffalo_wzr-hp-g300nh-rb. There is no need to have it built-in as it
works as a loadable module.

Tested both failsafe and normal boot on tl-wr1043nd-v1.
buffalo_wzr-hp-g300nh-rb was not tested.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2022-07-01 20:22:52 +02:00
Thibaut VARÈNE
a0e1d3ab7b
ramips: improve YunCore AX820 LEDs
At least two AX820 hardware variants are known to exist, but they cannot
be distinguished (same hardware revision, no specific markings).

They appear to have the same LED hardware, but wired differently:

- One has a red system LED at GPIO 15, a green wlan2g LED at GPIO 14 and
  a blue wlan5g LED at GPIO 16;
- The other only offers a green system LED at GPIO 15, with GPIO 14 and
  16 being apparently not connected

Finally, a Yuncore datasheet says the canonical wiring should be:
- Blue wlan2g GPIO 14, green system GPIO 15, red wlan5g GPIO 16

All GPIOs are tied to a single RGB LED which is exposed via lightpipe on
the device front casing.

Considering the above, this patch exposes all three LEDs, preserves the
common system LED (GPIO 15) as the openwrt status LED, and removes the
color information from the LEDs names since it is not consistent across
hardware. The LED naming is made consistent with other YunCore devices.
A note is added in DTS to ensure this information is always available
and prevent unwanted changes in the future.

Fixes: #10131 "YunCore AX820: GPIO LED not correct"

Reviewed-by: Sander Vanheule <sander@svanheule.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2022-07-01 20:13:46 +02:00
Stijn Tintel
04071cb111 qoriq: enable Book-E Watchdog Timer
Enable PowerPC Book-E Watchdog Timer support. Having this enabled
in-kernel will result in procd starting it during boot.

This effectively solves the problem of the WDT in the Winbond W83793 chip
potentially resetting the system during sysupgrade, which could result
in an unbootable device. While the driver is modular, resulting in procd
not starting the WDT during boot (because that happens before kmod
load), the WDT handover during sysupgrade results in the WDT being
started. This normally shouldn't be a problem, but the W83793 WDT does
not like procd's defaults, nor the handover happening during sysupgrade.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-07-01 16:26:51 +03:00
Stijn Tintel
e9f9cd14cc bcm27xx: add support for Raspberry Pi Zero 2
Due to licensing uncertainty, we do not include the firmwares for the
wireless chips used in the Raspberry Pi Zero 2 W. To have working
wireless, follow the instructions below.

For people building their own images:

  mkdir -p files/lib/firmware/brcm
  wget -P files/lib/firmware/brcm/ https://github.com/RPi-Distro/firmware-nonfree/raw/bullseye/debian/config/brcm80211/brcm/brcmfmac43436-sdio.bin
  wget -P files/lib/firmware/brcm/ https://github.com/RPi-Distro/firmware-nonfree/raw/bullseye/debian/config/brcm80211/brcm/brcmfmac43436-sdio.txt
  wget -P files/lib/firmware/brcm/ https://github.com/RPi-Distro/firmware-nonfree/raw/bullseye/debian/config/brcm80211/brcm/brcmfmac43436s-sdio.bin
  wget -P files/lib/firmware/brcm/ https://github.com/RPi-Distro/firmware-nonfree/raw/bullseye/debian/config/brcm80211/brcm/brcmfmac43436s-sdio.txt

Now build the OpenWrt image as usual, and it will include the firmware
files in the correct location.

For people using ext4 images:

Write the ext4 image to the sdcard, then mount the 2nd partition and put
the firmware files from the links above in /lib/firmware/brcm relative
from the mount point where the partition is mounted.

For people using squashfs images:

Write the squashfs image to the sdcard, place it in the Raspberry Pi
Zero 2 W, boot it and wait for the overlay filesystem to be created.
Find the offset of the overlay filesystem in sysfs:

  # cat /sys/devices/virtual/block/loop0/loop/offset
  25755648

Shut down the device, unplug the power and move the SD card to a Linux
computer. Mount the 2nd partition of the sdcard as a loop device with
the offset found earlier.

  sudo mount /dev/sdh2 -o loop,offset=25755648 /mnt/temp

Put the firmware files from the links above in /upper/lib/firmware/brcm
relative to the mount point where the loop device is mounted.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Tested-by: Peter van Dijk <peter@7bits.nl>
2022-07-01 12:56:56 +03:00
Tamas Balogh
416d4483e8 ath79: add support for ASUS RP-AC51
Asus RP-AC51 Repeater
Category:
AC750 300+433 (OEM w. unstable driver)
AC1200 300+866 (OpenWrt w. stable driver)

Hardware specifications:
Board: AP147
SoC: QCA9531 2.4G b/g/n
WiFi: QCA9886 5G n/ac
DRAM: 128MB DDR2
Flash: gd25q128 16MB SPI-NOR
LAN/WAN: AR8229 1x100M
Clocks: CPU:650MHz, DDR:600MHz, AHB:200MHz

MAC addresses as verified by OEM firmware:
use address source
Lan/W2G *:C8 art 0x1002 (label)
5G *:CC art 0x5006

Installation:

Asus windows recovery tool:

install the Asus firmware restoration utility
unplug the router, hold the reset button while powering it on
release when the power LED flashes slowly
specify a static IP on your computer:
IP address: 192.168.1.75
Subnet mask 255.255.255.0
Start the Asus firmware restoration utility, specify the factory image
and press upload
Do not power off the device after OpenWrt has booted until the LED flashing.
TFTP Recovery method:

set computer to a static ip, 192.168.1.10
connect computer to the LAN 1 port of the router
hold the reset button while powering on the router for a few seconds
send firmware image using a tftp client; i.e from linux:
$ tftp
tftp> binary
tftp> connect 192.168.1.1
tftp> put factory.bin
tftp> quit

Signed-off-by: Tamas Balogh <tamasbalogh@hotmail.com>
2022-06-30 00:23:42 +02:00
Tamas Balogh
e1dcaeb55c ath79: add support for ASUS PL-AC56
Asus PL-AC56 Powerline Range Extender Rev.A1
(in kit with Asus PL-E56P Powerline-slave)

Hardware specifications:
Board: AP152
SoC: QCA9563 2.4G n 3x3
PLC: QCA7500
WiFi: QCA9882 5G ac 2x2
Switch: QCA8337 3x1000M
Flash: 16MB 25L12835F SPI-NOR
DRAM SoC: 64MB w9751g6kb-25
DRAM PLC: 128MB w631gg6kb-15

Clocks: CPU:775.000MHz, DDR:650.000MHz, AHB:258.333MHz, Ref:25.000MHz

MAC addresses as verified by OEM firmware:
use address source
Lan/Wan/PLC *:10 art 0x1002 (label)
2G *:10 art 0x1000
5G *:14 art 0x5000

Important notes:

the PLC firmware has to be provided and copied manually onto the
device! The PLC here has no dedicated flash, thus the firmware file
has to be uploaded to the PLC controller at every system start
the PLC functionality is managed by the script /etc/init.d/plc_basic,
a very basic script based on the the one from Netadair (netadair dot de)
Installation:

Asus windows recovery tool:

have to have the latest Asus firmware flashed before continuing!
install the Asus firmware restoration utility
unplug the router, hold the reset button while powering it on
release when the power LED flashes slowly
specify a static IP on your computer:
IP address: 192.168.1.75
Subnet mask 255.255.255.0
start the Asus firmware restoration utility, specify the factory image
and press upload
do NOT power off the device after OpenWrt has booted until the LED flashing
TFTP Recovery method:

have to have the latest Asus firmware flashed before continuing!
set computer to a static ip, 192.168.1.75
connect computer to the LAN 1 port of the router
hold the reset button while powering on the router for a few seconds
send firmware image using a tftp client; i.e from linux:
$ tftp
tftp> binary
tftp> connect 192.168.1.1
tftp> put factory.bin
tftp> quit
do NOT power off the device after OpenWrt has booted until the LED flashing
Additional notes:

the pairing buttons have to have pressed for at least half a second,
it doesn't matter on which plc device (master or slave) first
it is possible to pair the devices without the button-pairing requirement
simply by pressing reset on the slave device. This will default to the
firmware settings, which is also how the plc_basic script is setting up
the master device, i.e. configuring it to firmware defaults
the PL-E56P slave PLC has its dedicated 4MByte SPI, thus it is capable
to store all firmware currently available. Note that some other
slave devices are not guarantied to have the capacity for the newer
~1MByte firmware blobs!
To have a good overlook about the slave device, here are its specs:
same QCA7500 PLC controller, same w631gg6kb-15 128MB RAM,
25L3233F 4MB SPI-NOR and an AR8035-A 1000M-Transceiver

Signed-off-by: Tamas Balogh <tamasbalogh@hotmail.com>
2022-06-30 00:16:59 +02:00
John Audia
433dc5892a kernel: bump 5.10 to 5.10.127
All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-06-29 23:38:47 +02:00
Robert Marko
57a38c8d3e mvebu: add Methode euroDPU support
Add support for Methode euroDPU which is based on uDPU but does not
have a second SFP cage, instead of which a Maxlinear G.hn IC is used.

PHY mode is set to 1000Base-X despite Maxlinear IC being capable of
2500Base-X since until 5.15 support for mvebu is available trying to use
2500Base-X will cause buffer overruns for which the fix is not easily
backportable.

Installation instructions:
1. Boot the FIT initramfs image (openwrt-mvebu-cortexa53-methode_edpu-initramfs.itb)
2. sysupgrade using the openwrt-mvebu-cortexa53-methode_edpu-firmware.tgz

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-06-29 13:08:59 +02:00
Robert Marko
7f73acade0 mvebu: update and refactor uDPU DTS
uDPU DTS has pending upstream fixups, so backport those as well as split
the DTS into a DTSI and DTS in preparation for euroDPU support which
uses uDPU as the base.

Ethernet aliases have not yet been sent upstream but will be soon in order
for U-boot to set the correct MAC on both ethernet interfaces instead of
just one.

Since U-boot environment now has its own partition, update the envtools
config script to search for it instead.

Patch hardcoding PHY mode is also not applicable anymore, so drop it and
set in the uDPU DTS directly.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-06-29 13:08:59 +02:00
Thibaut VARÈNE
e1223dbee3 ath79: add support for RouterBOARD mAP
The MikroTik mAP-2nd (sold as mAP) is an indoor 2.4Ghz AP with
802.3af/at PoE input and passive PoE passthrough.

See https://mikrotik.com/product/RBmAP2nD for more details.

Specifications:
 - SoC: QCA9533
 - RAM: 64MB
 - Storage: 16MB NOR
 - Wireless: QCA9533 802.11b/g/n 2x2
 - Ethernet: 2x 10/100 ports,
    802.3af/at PoE in port 1, 500 mA passive PoE out on port 2
 - 7 user-controllable LEDs

Note: the device is a tiny AP and does not distinguish between both
ethernet ports roles, so they are both assigned to lan.
With the current setup, ETH1 is connected to eth1 and ETH2 is connected
to eth0 via the embedded switch port 2.

Flashing:
 TFTP boot initramfs image and then perform sysupgrade. The "ETH1" port
 must be used to upload the TFTP image. Follow common MikroTik procedure
 as in https://openwrt.org/toh/mikrotik/common.

Tested-By: Andrew Powers-Holmes <aholmes@omnom.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2022-06-29 12:36:04 +02:00
Thibaut VARÈNE
bb929a0f9c ipq40xx: mikrotik: make RouterBoot partition writeable
Linux MTD requires the parent partition be writable for a child
partition to be allowed write permission.
In order for soft_config to be writeable (and modifiable via sysfs),
the parent RouterBoot partition must be writeable

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2022-06-29 12:34:49 +02:00
John Thomson
86fb287ad5 ath79: mikrotik: add rw soft_config to extra devices
Linux MTD requires the parent partition be writable for a child
partition to be allowed write permission.

Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
2022-06-29 12:34:49 +02:00
John Thomson
4f7065ed25 kernel: fix variable erasesize patch
Update this pending patch to remove the untested (variable eraseregions)
section, alongside simplifying the patch.

Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
[refresh and split out unrelated refreshes]
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2022-06-29 12:34:49 +02:00
John Thomson
ef69ab7a35 kernel: cut broken SPI_NOR 4K eraseblock LIMIT patch
Since 4e0c54bc5b ("kernel: add support for kernel 5.4"),
the spi-nor limit 4k erasesize to spi-nor chips below a configured size
patch has not functioned as intended.

For uniform erasesize SPI-NOR devices, both
nor->erase_opcode & mtd->erasesize are used in erase operations.
These are set before, and not modified by, this
CONFIG_MTD_SPI_NOR_USE_4K_SECTORS_LIMIT patch.
Thus, an SPI-NOR device with CONFIG_MTD_SPI_NOR_USE_4K_SECTORS will
always use 4k erasesize (where the device supports it).

If this patch was fixed to function as intended, there would be
cases where devices change from a 4K to a 64K erasesize.

Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
2022-06-29 12:34:49 +02:00
Hauke Mehrtens
aae3a8a254 x86: 64: Add kmod-igc to default packages
This adds the igc driver for the Intel 2.5GBit Ethernet chip to the
default packages.

Fixes: #10064
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-06-29 00:57:57 +02:00
Tamas Balogh
74dd7f9c36 ramips: add support for ASUS RP-AC87
Asus RP-AC87 ac2600 Repeater
2.4GHz 800Mbps
5GHz 1733Mbps

Hardware specifications:
SoC: MT7621A 2 cores 4 threads @880MHz
WiFi2G: MT7615E 2G 4x4 b/g/n
Wifi5G: MT7615E 5G 4x4 n/ac
DRAM: 128MB DDR3 @1200mhz
Flash: 16MB MX25L12805D SPI-NOR
LAN/WAN: MT7530 1x1000M

MAC addresses as verified by OEM firmware:
use address source
Lan/W5G *:B0 factory 0x8004 (label)
W2G *:B4 factory 0x0

Installation:

Asus windows recovery tool:

install the Asus firmware restoration utility
unplug the router, hold the reset button while powering it on
release when the power LED flashes slowly
specify a static IP on your computer:
IP address: 192.168.1.75
Subnet mask 255.255.255.0
Start the Asus firmware restoration utility, specify the factory image
and press upload
Do not power off the device after OpenWrt has booted until the LED flashing.
TFTP Recovery method:

set computer to a static ip, 192.168.1.2
connect computer to the LAN 1 port of the router
hold the reset button while powering on the router for a few seconds
send firmware image using a tftp client; i.e from linux:
$ tftp
tftp> binary
tftp> connect 192.168.1.1
tftp> put factory.bin
tftp> quit

Signed-off-by: Tamas Balogh <tamasbalogh@hotmail.com>
2022-06-29 00:57:56 +02:00
Stijn Tintel
a5796a4db3 qoriq: add kernel 5.15 support
Add support for kernel 5.15 as testing kernel for qoriq.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-06-29 01:16:46 +03:00
Stijn Tintel
61587c9242 qoriq: enable HARDENED_USERCOPY
The random crashes observed with HARDENED_USERCOPY enabled no longer
seem to occur. Enable HARDENED_USERCOPY to improve security.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-06-29 00:51:41 +03:00
Stijn Tintel
3e1848ee0f qoriq: disable CONFIG_COMPAT
We do not need support for 32 bit applications, as we're building
everything for 64 bit.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-06-29 00:12:23 +03:00
Thibaut VARÈNE
5fdbae463c qoriq: 02_network fix sweth globbing logic
This prevents invalid configuration of non-existent sweth devices.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2022-06-29 00:09:53 +03:00
Thibaut VARÈNE
19231cf838 qoriq: define reset button for Firebox M300
This patch provides support for the Firebox M300 reset button.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2022-06-29 00:09:53 +03:00
Thibaut VARÈNE
4ab421b81d qoriq: define leds for Firebox M300
This patch provides support for the Firebox M300 only user-controllable
bi-color LED, and makes the green "shield" LED act as the typical
OpenWrt status led.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2022-06-29 00:09:53 +03:00
Stijn Tintel
e02406e3cc kernel: add missing symbol to 5.15 config
Kernel 5.15.49 introduced a new symbol 'LIB_MEMNEQ'. Add it to the
generic 5.15 config.

Fixes: f1cd144482 ("kernel: bump 5.15 to 5.15.49")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-06-29 00:09:53 +03:00
Stijn Tintel
f3caba679b kernel: add missing symbol to 5.10 config
Kernel 5.10.124 introduced a new symbol 'LIB_MEMNEQ'. Add it to the
generic 5.10 config.

Fixes: 9e5d743422 ("kernel: bump 5.10 to 5.10.124")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-06-29 00:09:53 +03:00
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