Commit Graph

24893 Commits

Author SHA1 Message Date
Robert Marko b126d9c3a3 ipq40xx: add netgear wac510 support
This adds support for the Netgear WAC510 Insight Managed Smart Cloud
Wireless Access Point, an indoor dual-band, dual-radio 802.11ac
business-class wireless AP with integrated omnidirectional antennae
and two 10/100/1000 Mbps Ethernet ports.

For more information see:
<https://www.netgear.com/business/wifi/access-points/wac510>

Specifications:
SoC:        Qualcomm IPQ4018 (DAKOTA) ARM Quad-Core
RAM:        256 MiB
Flash1:     2 MiB Winbond W25Q16JV SPI-NOR
Flash2:     128 MiB Winbond W25N01GVZEIG SPI-NAND
Ethernet:   Built-in IPQ4018 (SoC, QCA8072 PHY), 2x 1000/100/10 port,
            WAN port active IEEE 802.3af/at PoE in
Wireless1:  Built-in IPQ4018 (SoC) 802.11b/g/n 2x2:2, 3 dBi antennae
Wireless2:  Built-in IPQ4018 (SoC) 802.11a/n/ac 2x2:2, 4 dBi antennae
Input:      (Optional) Barrel 12 V 2.5 A Power, Reset button SW1
LEDs:       Power, Insight, WAN PoE, LAN, 2.4G WLAN, 5G WLAN
Serial:     Header J2
1 - 3.3 Volt (Do NOT connect!)
2 - TX
3 - RX
4 - Ground
WARNING: The serial port needs a TTL/RS-232 3.3 volt level converter!
         The Serial settings are 115200-8-N-1.

Installation via Stock Web Interface:
BTW: The default factory console/web interface login user/password are
admin/password.

In the web interface navigating to Management - Maintenance - Upgrade -
'Firmware Upgrade' will show you what is currently installed e.g.:
Manage Firmware
Current Firmware Version: V5.0.10.2
Backup Firmware Version: V1.2.5.11
Under 'Upgrade Options' choose Local (alternatively SFTP would be
available) then click/select 'Browse File' on the right side, choose
openwrt-ipq40xx-generic-netgear_wac510-squashfs-nand-factory.tar
and hit the Upgrade button below. After a minute or two your browser
should indicate completion printing 'Firmware update complete.' and
'Rebooting AP...'.

Note that OpenWrt will use the WAN PoE port as actual WAN port
defaulting to DHCP client but NOT allowing LuCI access, use LAN port
defaulting to 192.168.1.1/24 to access LuCI.

Installation via TFTP Requiring Serial U-Boot Access:
Connect to the device's serial port and hit any key to stop autoboot.
Upload and boot the initramfs based OpenWrt image as follows:
(IPQ40xx) # setenv serverip 192.168.1.1
(IPQ40xx) # setenv ipaddr 192.168.1.2
(IPQ40xx) # tftpboot openwrt-ipq40xx-generic-netgear_wac510-initramfs-fit-uImage.itb
(IPQ40xx) # bootm

Note: This only runs OpenWrt from RAM and has not installed anything
to flash as of yet. One may permanently install OpenWrt as follows:

Check the MTD device number of the active partition:
root@OpenWrt:/# dmesg | grep 'set to be root filesystem'
[    1.010084] mtd: device 9 (rootfs) set to be root filesystem
Upload the factory image ending with .ubi to /tmp (e.g. using scp or
tftp). Then flash the image as follows (substituting the 9 in mtd9
below with whatever number reported above):
root@OpenWrt:/# ubiformat /dev/mtd9 -f /tmp/openwrt-ipq40xx-generic-netgear_wac510-squashfs-nand-factory.ubi
And reboot.

Dual Image Configuration:
The default U-Boot boot command bootipq uses the U-Boot environment
variables primary/secondary to decide which image to boot. E.g.
primary=0, secondary=3800000 uses rootfs while primary=3800000,
secondary=0 uses rootfs_1.
Switching their values changes the active partition. E.g. from within
U-Boot:
(IPQ40xx) # setenv primary 0
(IPQ40xx) # setenv secondary 3800000
(IPQ40xx) # saveenv
Or from a OpenWrt userspace serial/SSH console:
fw_setenv primary 0
fw_setenv secondary 3800000
Note that if you install two copies of OpenWrt then each will have its
independent configuration not like when switching partitions on the
stock firmware.
BTW: The kernel log shows which boot partition is active:
[    2.439050] ubi0: attached mtd9 (name "rootfs", size 56 MiB)
vs.
[    2.978785] ubi0: attached mtd10 (name "rootfs_1", size 56 MiB)
Note: After 3 failed boot attempts it automatically switches partition.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
[squashed netgear-tar commit into main and rename netgear-tar for
now, until it is made generic.]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-06-05 23:29:46 +02:00
Philipp Borgers fbc2feadd4 ramips: enable additional UART on MikroTik RouterBOARD M33G
The RouterBOARD M33G has an additional UART that should be enabled
by default.

Signed-off-by: Philipp Borgers <borgers@mi.fu-berlin.de>
2021-06-05 01:17:11 +02:00
Zoltan HERPAI 1eb481206d ath79: add support for Qualcomm AP143 reference boards
Specifications:

SoC:    QCA9533
DRAM:   32Mb DDR1
Flash:  8/16Mb SPI-NOR
LAN:    4x 10/100Mbps via AR8229 switch (integrated into SoC)
        on GMII
WAN:    1x 10/100Mbps via MII
WLAN:   QCA9530
USB:    1x 2.0
UART:   standard QCA UART header
JTAG:   yes
Button: 1x WPS, 1x reset
LEDs:   8x LEDs

A version with 4Mb flash is also available, but due to lack of
enough space it's not supported.

As the original flash layout does not provide enough space for
the kernel (1472k), the firmware uses OKLI and concat flash to
overcome the limitation without changing the boot address of the
bootloaders.

Installation:

1. Original bootloader

  Connect the board to ethernet
  Set up a server with an IP address of 192.168.1.10
  Make the openwrt-ath79-generic-qca_ap143-8m-squashfs-factory.bin
  available via TFTP

  tftpboot 0x80060000 openwrt-ath79-generic-qca_ap143-8m-squashfs-factory.bin
  erase 0x9f050000 +$filesize
  cp.b $fileaddr 0x9f050000 $filesize

  Reboot the board.

2. pepe2k's u-boot_mod

  Connect the board to ethernet
  Set up a server with an IP address of 192.168.1.10
  Make the openwrt-ath79-generic-qca_ap143-8m-squashfs-factory.bin
  available via TFTP, as "firmware.bin"

  run fw_upg

  Reboot the board.

For the 16M version of the board, please use
openwrt-ath79-generic-qca_ap143-16m-squashfs-factory.bin

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
[use fwconcatX names, drop redundant uart status, fix IMAGE_SIZE,
set up IMAGE/factory.bin without metadata]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-06-05 01:17:11 +02:00
Sven Eckelmann 9a172797e5 ath79: Add support for OpenMesh A40
Device specifications:
======================

* Qualcomm/Atheros QCA9558 ver 1 rev 0
* 720/600/240 MHz (CPU/DDR/AHB)
* 128 MB of RAM
* 16 MB of SPI NOR flash
  - 2x 7 MB available; but one of the 7 MB regions is the recovery image
* 2T2R 2.4 GHz Wi-Fi (11n)
* 2T2R 5 GHz Wi-Fi (11ac)
* multi-color LED (controlled via red/green/blue GPIOs)
* 1x GPIO-button (reset)
* external h/w watchdog (enabled by default))
* TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX)
* 2x ethernet
  - eth0
    + Label: Ethernet 1
    + AR8035 ethernet PHY (RGMII)
    + 10/100/1000 Mbps Ethernet
    + 802.3af POE
    + used as WAN interface
  - eth1
    + Label: Ethernet 2
    + AR8035 ethernet PHY (SGMII)
    + 10/100/1000 Mbps Ethernet
    + used as LAN interface
* 1x USB
* internal antennas

Flashing instructions:
======================

Various methods can be used to install the actual image on the flash.
Two easy ones are:

ap51-flash
----------

The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be
used to transfer the image to the u-boot when the device boots up.

initramfs from TFTP
-------------------

The serial console must be used to access the u-boot shell during bootup.
It can then be used to first boot up the initramfs image from a TFTP server
(here with the IP 192.168.1.21):

   setenv serverip 192.168.1.21
   setenv ipaddr 192.168.1.1
   tftpboot 0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr

The actual sysupgrade image can then be transferred (on the LAN port) to the
device via

  scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/

On the device, the sysupgrade must then be started using

  sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-06-05 01:17:11 +02:00
Sven Eckelmann eaf2e32c12 ath79: Add support for OpenMesh A60
Device specifications:
======================

* Qualcomm/Atheros QCA9558 ver 1 rev 0
* 720/600/240 MHz (CPU/DDR/AHB)
* 128 MB of RAM
* 16 MB of SPI NOR flash
  - 2x 7 MB available; but one of the 7 MB regions is the recovery image
* 3T3R 2.4 GHz Wi-Fi (11n)
* 3T3R 5 GHz Wi-Fi (11ac)
* multi-color LED (controlled via red/green/blue GPIOs)
* 1x GPIO-button (reset)
* external h/w watchdog (enabled by default))
* TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX)
* 2x ethernet
  - eth0
    + Label: Ethernet 1
    + AR8035 ethernet PHY (RGMII)
    + 10/100/1000 Mbps Ethernet
    + 802.3af POE
    + used as WAN interface
  - eth1
    + Label: Ethernet 2
    + AR8031 ethernet PHY (SGMII)
    + 10/100/1000 Mbps Ethernet
    + used as LAN interface
* 1x USB
* internal antennas

Flashing instructions:
======================

Various methods can be used to install the actual image on the flash.
Two easy ones are:

ap51-flash
----------

The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be
used to transfer the image to the u-boot when the device boots up.

initramfs from TFTP
-------------------

The serial console must be used to access the u-boot shell during bootup.
It can then be used to first boot up the initramfs image from a TFTP server
(here with the IP 192.168.1.21):

   setenv serverip 192.168.1.21
   setenv ipaddr 192.168.1.1
   tftpboot 0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr

The actual sysupgrade image can then be transferred (on the LAN port) to the
device via

  scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/

On the device, the sysupgrade must then be started using

  sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-06-05 01:17:11 +02:00
David Bauer c5a8b85b72 kernel: ar8216: remove soft_reset
ar8xxx_soft_reset is effectively a NOP function. In the PHY state
machine, the availability and result of a soft_reset function
makes no difference for the code flow.

Thus, we can safely remove this method.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-06-03 00:00:55 +02:00
David Bauer 766e0f584a kernel: ar8216: add get_features method
Modifying PHY capabilities in the probe function broke with upstream
commit 92ed2eb7f4b7 ("net: phy: probe the PHY before determining the
supported features").

AR8316 switches only support 10/100 Mbit/s link modes because of this
change.

Provide a get_features method for the PHY driver, so Gigabit link mode
will be advertised to link partners again.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-06-03 00:00:46 +02:00
Felix Fietkau 9bda91d805 kernel: backport fix for hang on napi_disable with threaded NAPI
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-01 23:20:07 +02:00
Adrian Schmutzler 296aa0781b layerscape: refresh kernel config
Run `make kernel_oldconfig CONFIG_TARGET=subtarget`

This mostly aims at getting rid of redundant/unneeded symbols.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-05-30 02:21:02 +02:00
Yangbo Lu 37b5f7c267 kernel: add missing symbol CONFIG_AHCI_XGENE
Add missing symbol CONFIG_AHCI_XGENE.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
[also add for 5.10, remove from layerscape target config]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-05-30 02:21:02 +02:00
John Audia 19bf164291 kernel: bump 5.4 to 5.4.123
All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2021-05-29 18:31:49 +02:00
Thomas Aldrian f755d81999 ramips: add support for Wavlink WL-WN578A2
This commit adds support for the Wavlink WL-WN578A2 dual-band wall-plug
wireless router. This device is also sold under the name SilverCrest
SWV 733 A2.

Device Specifications:

- CPU: MediaTek MT7628AN (580MHz)
- Flash: 8MB
- RAM: 64MB
- Bootloader: U-Boot
- Ethernet: 2x 10/100 Mbps
- 2.4 GHz: 802.11b/g/n SoC
- 5 GHz: 802.11a/n/ac MT7610E
- Antennas: internal
- 4 green LEDs: WPS/Power, LAN, WAN, wifi-low, wifi-med, wifi-high
- Buttons: Reset, WPS
- Sliding mode switch: AP, repeater, client
- Small sliding power switch

Flashing instructions:

U-Boot launches TFTP client if WPS button is pressed during power-on.
Configure as follows:

- Server IP: 192.168.10.100
- Filename (rename sysupgrade file to this): firmware.bin

Flashing should not take more than a minute, device will reboot
automatically.

Signed-off-by: Thomas Aldrian <dev.aldrian@gmail.com>
2021-05-28 01:12:21 +02:00
Rui Salvaterra 53b9cc442f kernel: bump 5.10 to 5.10.40
Automatically refreshed:
generic/hack-5.10/902-debloat_proc.patch
generic/pending-5.10/110-perf-jevents-fix-getting-maximum-number-of-fds.patch

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-05-27 18:32:10 +01:00
Rafał Miłecki 4b9a67362d base-files: generate network config with "device" options
Replace "ifname" with "device" as netifd has been recently patches to
used the later one. It's more clear and accurate.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-05-27 10:58:49 +02:00
David Bauer 862bc9f597 ath79: add missing v5.4 SPI chipselect patch
The patch was not applied to the v5.4 target, thus breaking Kernel 5.4
on devices with multiple flash chips attache to the SPI bus.

Fixes commit bd54e73954 ("ath79: set number of chipselect lines")

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-05-26 23:11:00 +02:00
Chukun Pan 57cb387cfe ramips: add support for JCG Q20
JCG Q20 is an AX 1800M router.

Hardware specs:
  SoC: MediaTek MT7621AT
  Flash: Winbond W29N01HV 128 MiB
  RAM: Winbond W632GU6NB-11 256 MiB
  WiFi: MT7915 2.4/5 GHz 2T2R
  Ethernet: 10/100/1000 Mbps x3
  LED: Status (red / blue)
  Button: Reset, WPS
  Power: DC 12V,1A

Flash instructions:
  Upload factory.bin in stock firmware's upgrade page,
  do not preserve settings.

MAC addresses map:
  0x00004 *:3e wlan2g/wlan5g
  0x3fff4 *:3c lan/label
  0x3fffa *:3c wan

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2021-05-26 23:10:45 +02:00
Leon M. George 3501db9b9b ramips: add support for cudy WR2100
Specifications

  SoC:       MT7621
  CPU:       880 MHz
  Flash:     16 MiB
  RAM:       128 MiB
  WLAN:      2.4 GHz b/g/n, 5 GHz a/n/ac
             MT7603E / MT7615E
  Ethernet:  5x Gbit ports

Installation

There are two known options:
1) The Luci-based UI.
2) Press and hold the reset button during power up.
   The router will request 'recovery.bin' from a TFTP server at
   192.168.1.88.

Both options require a signed firmware binary.
The openwrt image supplied by cudy is signed and can be used to
install unsigned images.

R4 & R5 need to be shorted (0-100Ω) for the UART to work.

Signed-off-by: Leon M. George <leon@georgemail.eu>
[remove non-required switch-port node - remove trgmii phy-mode]
Signed-off-by: David Bauer <mail@david-bauer.net>
2021-05-26 23:10:37 +02:00
Georgi Vlaev a46ad596a3 ramips: add support for TP-Link Archer C6U v1 (EU)
This patch adds support for TP-Link Archer C6U v1 (EU).
The device is also known in some market as Archer C6 v3.
This patch supports only Archer C6U v1 (EU).

Specifications:
--------------

* SoC: Mediatek MT7621AT 2C2T, 880MHz
* RAM: 128MB DDR3
* Flash: 16MB SPI NOR flash (Winbond 25Q128)
* WiFi 5GHz: Mediatek MT7613BEN (2x2:2)
* WiFi 2.4GHz: Mediatek MT7603EN (2x2:2)
* Ethernet: MT7630, 5x 1000Base-T.
* LED: Power, WAN, LAN, WiFi 2GHz and 5GHz, USB
* Buttons: Reset, WPS.
* UART: Serial console (115200 8n1), J1(GND:3)
* USB: One USB2 port.

Installation:
------------

Install the OpenWrt factory image for C6U is from the
TP-Link web interface.

1) Go to "Advanced/System Tools/Firmware Update".
2) Click "Browse" and upload the OpenWrt factory image:
openwrt-ramips-mt7621-tplink_archer-c6u-v1-squashfs-factory.bin.
3) Click the "Upgrade" button, and select "Yes" when prompted.

Recovery to stock firmware:
--------------------------

The C6U bootloader has a failsafe mode that provides a web
interface (running at 192.168.0.1) for reverting back to the
stock TP-Link firmware. The failsafe interface is triggered
from the serial console or on failed kernel boot. Unfortunately,
there's no key combination that enables the failsafe mode. This
gives us two options for recovery:

1) Recover using the serial console (J1 header).
The recovery interface can be selected by hitting 'x' when
prompted on boot.

2) Trigger the bootloader failsafe mode.
A more dangerous option is force the bootloader into
recovery mode by erasing the OpenWrt partition from the
OpenWrt's shell - e.g "mtd erase firmware". Please be
careful, since erasing the wrong partition can brick
your device.

MAC addresses:
-------------

OEM firmware configuration:
D8:07:B6:xx:xx:83 : 5G
D8:07:B6:xx:xx:84 : LAN (label)
D8:07:B6:xx:xx:84 : 2.4G
D8:07:B6:xx:xx:85 : WAN

Signed-off-by: Georgi Vlaev <georgi.vlaev@konsulko.com>
2021-05-26 23:10:25 +02:00
Vinay Patil f8f8935adb ramips: add support for TP-Link Archer A6 v3
The patch adds support for the TP-Link Archer A6 v3
The router is sold in US and India with FCC ID TE7A6V3

Specification
-------------
MediaTek MT7621 SOC
RAM:         128MB DDR3
SPI Flash:   W25Q128 (16MB)
Ethernet:    MT7530 5x 1000Base-T
WiFi 5GHz:   Mediatek MT7613BE
WiFi 2.4GHz: Mediatek MT7603E
UART/Serial: 115200 8n1

Device Configuration & Serial Port Pins
---------------------------------------
ETH Ports:    LAN4 LAN3 LAN2 LAN1 WAN
             _______________________
             |                     |
Serial Pins: |   VCC GND TXD RXD   |
             |_____________________|

LEDs:         Power Wifi2G Wifi5G LAN WAN

Build Output
------------
The build will generate following set of files
[1] openwrt-ramips-mt7621-tplink_archer-a6-v3-initramfs-kernel.bin
[2] openwrt-ramips-mt7621-tplink_archer-a6-v3-squashfs-factory.bin
[3] openwrt-ramips-mt7621-tplink_archer-a6-v3-squashfs-sysupgrade.bin

How to Use - Flashing from TP-Link Web Interface
------------------------------------------------
* Go to "Advanced/System Tools/Firmware Update".
* Click "Browse" and upload the OpenWrt factory image: factory.bin[2]
* Click the "Upgrade" button, and select "Yes" when prompted.

TFTP Booting
------------
Setup a TFTP boot server with address 192.168.0.5.
While starting U-boot press '4' key to stop autoboot.
Copy the initramfs-kernel.bin[1] to TFTP server folder, rename as test.bin
From u-boot command prompt run tftpboot followed by bootm.

Recovery
--------
Archer A6 V3 has recovery page activated if SPI booting from flash fails.
Recovery page can be activated from serial console only.
Press 'x' while u-boot is starting
Note: TFTP boot can be activated only from u-boot serial console.
Device recovery address: 192.168.0.1

Thanks to: Frankis for Randmon MAC address fix.

Signed-off-by: Vinay Patil <post2vinay@gmail.com>
[remove superfluous factory image definition, whitespacing]
Signed-off-by: David Bauer <mail@david-bauer.net>
2021-05-26 23:10:14 +02:00
Piotr Dymacz 8dba71dd33 imx6: image: drop BOOT_SCRIPT and fix DEVICE_NAME
This fixes Gateworks Ventana 'DEVICE_NAME' variable which value wasn't
adjusted during migration to common 'vendor_model' image naming scheme
(fixes: FS#3825).

Furthermore, drop unused 'Build/boot-scr' recipe, get rid of redundant
'BOOT_SCRIPT' variable (use already provided 'DEVICE_NAME' instead) and
drop custom 'DEVICE_NAME' variable from SolidRun CuBox-i image recipe
(use default one instead).

Fixes: cbc8bcfbaa ("imx6: image: use vendor_model scheme")
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-05-26 14:12:46 +02:00
Felix Fietkau 5f1338e983 kernel: fix a perf build error
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-05-25 19:01:16 +02:00
Hauke Mehrtens a6616eea40 mediatek: update mtd parser patches
This updates the patches to match the versions included in the mtd
subsystem for the next Linux kernel version.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-05-23 17:10:17 +02:00
Daniel González Cabanelas d683175236 kernel: backport "mvmdio avoid error message for optional IRQ"
Rid of kernel error message:
  [    0.780828] orion-mdio d0072004.mdio: IRQ index 0 not found

on Marvell targets backporting the kernel commit fa2632f74e57

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
2021-05-23 15:11:38 +02:00
DENG Qingfang 8d1567ba61 generic: mt7530: fix EEE patch
The higher 16-bit of EEE register was overwritten by mistake, fix that.

Fixes: 5b9ba4a93e ("generic: mt7530: support adjusting EEE")
Signed-off-by: DENG Qingfang <dqfext@gmail.com>
2021-05-23 15:11:38 +02:00
Robert Marko 080a0b74e3 mvebu: 5.10 fix DVFS caused random boot crashes
5.10.37 and 5.4.119 introduced a lot of DVFS changes for Armada 37xx from 5.13 kernel.

Unfortunately commit:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/cpufreq/armada-37xx-cpufreq.c?h=v5.10.37&id=a13b110e7c9e0dc2edcc7a19d4255fc88abd83cc

This patch actually corrects the things so that 1 or 1.2GHz models would actually get scaled to their native frequency.

However, due to a AVS setting voltages too low this will cause random crashes on 1.2GHz models.

So, until a new safe for everybody voltage is agreed on
lets revert the patch.

Fixes: d337731 ("kernel: bump 5.10 to 5.10.37")
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2021-05-23 15:11:38 +02:00
Tan Zien 7efc0d4d06 apm821xx: MR24: Change default config of WLAN LED
The previous config will only show 2.4G radio activity status

This change mr24:green:wifi4 and mr24:green:wifi2 to
show 2.4G and 5G radio on and off status

change mr24:green:wifi3 and mr24:green:wifi1 to
show 2.4G and 5G radio activity status

Signed-off-by: Tan Zien <nabsdh9@gmail.com>
2021-05-23 15:10:37 +02:00
Ansuel Smith 21d4b228d1 ipq806x: fix warning about tsens debugfs already registered
Backport a pending patch already reviewed that fix some warning about tsens debugs already registered.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-23 15:09:06 +02:00
Ansuel Smith e5d50f69e8 ipq806x: reduce pci IO space to 64k
With some talk with the ARM maintainer, it was notice that enlarging the limit
to the current value is VERY wrong and clash with other memory.
A better solution would be to reduce the IO space from 1MB to 64K as probably
it's a long lasting typo and even x86 arch doesn't have a IO space that big.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-23 15:09:06 +02:00
John Audia cb919f2220 kernel: bump 5.4 to 5.4.121
All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2021-05-23 15:09:06 +02:00
John Audia fec92f1ec3 kernel: bump 5.4 to 5.4.120
Removed upstreamed:
  generic/pending-5.4/770-02-net-ethernet-mtk_eth_soc-fix-rx-vlan-offload.patch

All other patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Note that since I rebased the previous commit, I removed my Run-tested line
although I confirm building the image successfully.

Signed-off-by: John Audia <graysky@archlinux.us>
2021-05-23 15:09:06 +02:00
John Audia 08593db128 kernel: bump 5.4 to 5.4.119
Removed upstreamed:
  generic/backport-5.4/050-gro-fix-napi_gro_frags-Fast-GRO-breakage-due-to-IP-a.patch
  bcm63xx/patches-5.4/434-nand-brcmnand-fix-OOB-R-W-with-Hamming-ECC.patch*

Removed/code was included upstream and therefore redundant:
  ramips/patches-5.4/999-fix-pci-init-mt7620.patch

All other patches automatically rebased.

* update_kernel.sh did not flag this yet it was included in 5.4.119[1], as a
  result of the rebase, I removed my testing lines since I did not go back to
  test built or to run test 5.4.119 with the removed patch present.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.4.119&id=e5b3e69eb36ac1178a7a2392616fd29afd288c4e

Signed-off-by: John Audia <graysky@archlinux.us>
2021-05-23 15:09:06 +02:00
John Audia 3e1c92f9e1 kernel: bump 5.4 to 5.4.118
Manually rebased:
  ath79/patches-5.4/0033-spi-ath79-drop-pdata-support.patch

Removed uneeded patch:
  ath79/patches-5.4/0050-spi-ath79-remove-spi-master-setup-and-cleanup-assign.patch

All other patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2021-05-23 15:09:06 +02:00
Kevin Darbyshire-Bryant f726b37b68 kernel: bump 5.10 to 5.10.39
Automatically refreshed:

generic/pending-5.10/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2021-05-22 21:57:31 +01:00
Rui Salvaterra 8615573ac1 kernel: bump 5.10 to 5.10.38
Automatically refreshed:
apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch
generic/backport-5.10/610-v5.13-31-net-ethernet-mtk_eth_soc-fix-parsing-packets-in-GDM.patch
generic/backport-5.10/610-v5.13-32-net-ethernet-mtk_eth_soc-add-support-for-initializin.patch
generic/backport-5.10/610-v5.13-33-net-ethernet-mtk_eth_soc-add-flow-offloading-support.patch
generic/hack-5.10/204-module_strip.patch
generic/hack-5.10/911-kobject_add_broadcast_uevent.patch
ipq806x/patches-5.10/104-1-drivers-thermal-tsens-Add-VER_0-tsens-version.patch
ipq806x/patches-5.10/104-8-drivers-thermal-tsens-Add-support-for-ipq8064-tsens.patch

Deleted (reverse-appliable):
generic/backport-5.10/610-v5.13-37-net-ethernet-mtk_eth_soc-fix-RX-VLAN-offload.patch
ipq806x/patches-5.10/106-5.13-net-stmmac-Set-FIFO-sizes-for-ipq806x.patch

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-05-22 21:54:17 +01:00
Piotr Dymacz 9a99903005 imx6: image: cleanup variables order within device's defines
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-05-20 13:45:12 +02:00
Piotr Dymacz f13c0bffc2 imx6: image: keep devices in alphabetical order
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-05-20 13:45:12 +02:00
Piotr Dymacz cbc8bcfbaa imx6: image: use vendor_model scheme
This switches device names to the common 'vendor_model' approach as in
most of other targets in OpenWrt.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-05-20 13:45:12 +02:00
Piotr Dymacz 7e7cef6334 imx6: image: cleanup image recipes
- drop unused 'UBOOT' variable from 'Device/apalis' recipe
- fix 'KERNEL_SUFFIX' for 'Device/cubox-i' (should be '-zImage')
- drop redundant 'DEVICE_{VENDOR,MODEL}' from 'Device/ventana-large'
- other, minor fixes

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-05-20 13:45:12 +02:00
Piotr Dymacz 368c20f06b imx6: rename Freescale to NXP in BOARDNAME and profiles
Freescale no longer exists, it was acquired by NXP in 2015.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-05-20 13:45:11 +02:00
Álvaro Fernández Rojas f2844a6338 bmips: remove duplicated brcmnand patch
brcmnand patch was applied upstream on 5.10.37 update.

Fixes: d337731f85 ("kernel: bump 5.10 to 5.10.37")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-05-17 12:25:34 +02:00
Adrian Schmutzler 4508b12b08 octeon: use shared function for platform_copy_config()
This reduces redundant instructions.

The solution is inspired by a different implemention of
Roman Kuzmitskii.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-05-17 01:01:32 +02:00
Giulio Lorenzo b108ed0ab0 ath79: add support for ZiKing CPE46B
ZiKing CPE46B is a POE outdoor 2.4ghz device with an integrated directional
antenna. It is low cost and mostly available via Aliexpress, references can
be found at:
- https://forum.openwrt.org/t/anddear-ziking-cpe46b-ar9331-ap121/60383
- https://git.lsd.cat/g/openwrt-cpe46b

Specifications:

- Atheros AR9330
- 32MB of RAM
- 8MB of flash (SPI NOR)
- 1 * 2.4ghz integrated antenna
- 2 * 10/100/1000 ethernet ports (1 POE)
- 3 * Green LEDs controlled by the SoC
- 3 * Green LEDs controlled via GPIO
- 1 * Reset Button controlled via GPIO
- 1 * 4 pin serial header on the PCB
- Outdoor packaging

Flashing instruction:

You can use sysupgrade image directly in vendor firmware which is based
on OpenWrt/LEDE. In case of issues with the vendor GUI, the vendor
Telnet console is vulnerable to command injection and can be used to gain
a shell directly on the OEM OpenWrt distribution.

Signed-off-by: Giulio Lorenzo <salveenee@mortemale.org>
[fix whitespaces, drop redundant uart status and serial0, drop
num-chipselects, drop 0x1002 MAC address for wmac]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-05-17 01:01:32 +02:00
Adrian Schmutzler 3dd9f82fec ath79: fix leading whitespaces in generic 01_leds
Use tabs consistently.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-05-17 01:01:32 +02:00
Joao Henrique Albuquerque 4f07966696 ath79: add support for COMFAST CF-E375AC
COMFAST CF-E375AC is a ceiling mount AP with PoE support,
based on Qualcomm/Atheros QCA9563 + QCA9886 + QCA8337.

Short specification:

    2x 10/100/1000 Mbps Ethernet, with PoE support
    128MB of RAM (DDR2)
    16 MB of FLASH
    3T3R 2.4 GHz, 802.11b/g/n
    2T2R 5 GHz, 802.11ac/n/a, wave 2
    built-in 5x 3 dBi antennas
    output power (max): 500 mW (27 dBm)
    1x RGB LED, 1x button
    built-in watchdog chipset

Flash instruction:
1) Original firmware is based on OpenWrt.
Use sysupgrade image directly in vendor GUI.

2) TFTP
2.1) Set a tftp server on your machine with a fixed IP address of
     192.168.1.10. A place the sysupgrade as firmware_auto.bin.
2.2) boot the device with an ethernet connection on fixed ip route
2.3) wait a few seconds and try to login via ssh

3) TFTP trough Bootloader
3.1) open the device case and get a uart connection working
3.2) stop the autoboot process and test connection with serverip
3.3) name the sysupgrade image firmware.bin and run firmware_upg

MAC addresses:
Though the OEM firmware has four adresses in the usual locations,
it appears that the assigned addresses are just incremented in a
different way:

interface    address    location
LAN:          *:DC      0x0
WAN           *:DD      0x1002
WLAN 2.4g     *:E6      n/a (0x0 + 10)
WLAN 5g       *:DE      0x6
unused        *:DF      0x5006

The MAC address pointed at the label is the one assign to the LAN
interface.

Signed-off-by: Joao Henrique Albuquerque <joaohccalbu@gmail.com>
[add label-mac-device, remove redundant uart status, fix whitespace
issues, fix commit message wrapping, remove x bit on DTS file]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-05-17 01:01:32 +02:00
Dan Brown 6ee3680614 octeon: add new target and support for Ubiquiti EdgeRouter 6P
Ubiquiti EdgeRouter 6P is 6 port router with similar
specifications as the EdgeRouter 4, support for which was added
in commit dd651e54cc

There are five 10/100/1000 Mbps RJ/Copper ports and
one 1000 Mbps SFP port.

SoC: Octeon Cavium 7130 (Cavium 3) at 1000MHz
Memory: 1GiB DDR3
Flash: 2x2M chips with uboots (chainloaded) + 512K eeprom
LEDs: 1x for power status (white/blue, controllable)
  and 6x for ethernet and SFP ports (no control over them)
Buttons: 1x Reset
Serial: 1x RJ45 port on front panel. 115200 baud, 8N1
USB: 1x USB3.0 on front panel
MII: 1x QSGMII from SoC
PHY: 1x Vitesse VSC8504 of which 4 ports are used (phys 4-7)
     1x Vitesse VSC8514 of which 2 ports are used (phys 8-9)

Network port mapping
 - eth0 on device maps to lan0 and phy5
 - eth1 on device maps to lan1 and phy6
 - eth2 on device maps to lan2 and phy7
 - eth3 on device maps to lan3 and phy8
 - eth4 on device maps to lan4 and phy9
 - eth5 (SFP) on device maps to lan5 and phy4

What is not working:
 - There is no port status available before it goes up
 - SFP have no additional status and presented as no different from eth
 - Power-over-ethernet (passive) support has not been tested

How to flash the firmware:
  - copy openwrt-octeon-ubnt_edgerouter-6p-initramfs-kernel.bin and
    openwrt-octeon-ubnt_edgerouter-6p-squashfs-sysupgrade.tar to
    USB flash drive that is formatted to vfat/fat32
  - connect USB flash drive to EdgeRouter 6P front USB port
  - connect serial cable using front RJ45 port (115200 baud, 8N1)
  - connect power to cable to EdgeRouter 6P
  - connect terminal to the console to see uboot boot process
  - interrupt boot by pressing button(s) on your keyboard to log
    in to the uboot
  - detect usb connected flash drives by typing to the console:
    usb start
  - after drive is detected load initramfs+kernel to the memory by typing:
    fatload usb 0:1 0x20000000 openwrt-octeon-ubnt_edgerouter-6p-initramfs-kernel.bin
  - after initramfs+kernel is loaded to the memory load it by typing:
    bootoctlinux 0 numcores=4 endbootargs mem=0
  - boot process should finish and you will be greeted with console
    after pressing enter
  - create directory to mount usb flash drive to by typing:
    mkdir /tmp/sda
  - mount flash drive to that directory by typing:
    mount /dev/sda1 /tmp/sda
  - flash firmware to router internal storage by typing:
    sysupgrade /tmp/sda/openwrt-octeon-ubnt_edgerouter-6p-squashfs-sysupgrade.tar
  - device will reboot and after it gets up you will have
    edgerouter 6p running openwrt

Signed-off-by: Dan Brown <danbrown@gmail.com>
[reorder/squash patches, move ethernet@0 to DTS, share image setup]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-05-17 01:01:26 +02:00
Dan Brown 8e7c9f5393 octeon: create shared DTSI for Ubiquiti E300 platform
EdgeRouter 4 and upcoming EdgeRouter 6P and 12 have similar setup,
so create a shared DTSI to prevent duplicate code.

Signed-off-by: Dan Brown <danbrown@gmail.com>
[reorder/squash commits, add description, move ethernet@0 to DTS]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-05-17 01:01:14 +02:00
Piotr Dymacz cf3f1f82ea ramips: fix SUPPORTED_DEVICES for ALFA Network devices
Vendor firmware expects model name without manufacturer name inside
'supported_devices' part of metadata. This allows direct upgrade to
OpenWrt from vendor's GUI.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-05-16 23:59:13 +02:00
Michael Pratt bf8c16dfa2 ath79: set lzma-loader variables to null by default
This fixes a small regression where the lzma-loader variable values
are being shared between boards that require different configurations.

If not set to "" globally, a device without these settings will just take
the last values another device has set before in the queue.

Fixes: 1b8bd17c2d ("ath79: lzma-loader: allow setting custom kernel magic")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
[add detailed explanation to the commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-05-16 13:05:42 +02:00
Rui Salvaterra d337731f85 kernel: bump 5.10 to 5.10.37
Automatically refreshed:
ath79/patches-5.10/0032-MIPS-ath79-sanitize-symbols.patch
bcm63xx/patches-5.10/322-MIPS-BCM63XX-switch-to-IRQ_DOMAIN.patch
bcm63xx/patches-5.10/434-nand-brcmnand-fix-OOB-R-W-with-Hamming-ECC.patch
bmips/patches-5.10/001-v5.11-mips-bmips-select-ARCH_HAS_RESET_CONTROLLER.patch
bmips/patches-5.10/041-v5.13-mtd-rawnand-brcmnand-fix-OOB-R-W-with-Hamming-ECC.patch
bmips/patches-5.10/202-mips-bmips-disable-ARCH_HAS_SYNC_DMA_FOR_CPU_ALL.patch
bmips/patches-5.10/600-mips-bmips-add-pci-support.patch
generic/backport-5.10/103-v5.13-MIPS-select-CPU_MIPS64-for-remaining-MIPS64-CPUs.patch
generic/hack-5.10/301-mips_image_cmdline_hack.patch
generic/hack-5.10/402-mtd-blktrans-call-add-disks-after-mtd-device.patch
generic/hack-5.10/902-debloat_proc.patch
generic/pending-5.10/300-mips_expose_boot_raw.patch
generic/pending-5.10/495-mtd-core-add-get_mtd_device_by_node.patch
generic/pending-5.10/630-packet_socket_type.patch
ipq806x/patches-5.10/0072-add-ipq806x-with-no-clocks.patch
ipq806x/patches-5.10/099-1-mtd-nand-raw-qcom_nandc-add-boot_layout_mode-support.patch
lantiq/patches-5.10/0001-MIPS-lantiq-add-pcie-driver.patch
lantiq/patches-5.10/0023-NET-PHY-add-led-support-for-intel-xway.patch
lantiq/patches-5.10/0152-lantiq-VPE.patch

Deleted (reverse-appliable):
bmips/patches-5.10/052-v5.13-gpio-guard-gpiochip_irqchip_add_domain-with-GPIOLIB_.patch
generic/backport-5.10/499-v5.13-mtd-don-t-lock-when-recursively-deleting-partitions.patch

Deleted (alternative upstream fix):
ramips/patches-5.10/330-fix-pci-init-mt7620.patch

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-05-14 14:50:03 +01:00
Rui Salvaterra 6a57e1fbfc kernel: bump 5.10 to 5.10.36
Automatically refreshed:
apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch
ath79/patches-5.10/410-spi-ath79-Implement-the-spi_mem-interface.patch
bcm63xx/patches-5.10/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch
generic/pending-5.10/465-m25p80-mx-disable-software-protection.patch
ipq806x/patches-5.10/0069-arm-boot-add-dts-files.patch
ipq806x/patches-5.10/101-dwmac-ipq806x-qsgmii-pcs-all-ch-ctl.patch
ipq806x/patches-5.10/106-5.13-net-stmmac-Set-FIFO-sizes-for-ipq806x.patch

Deleted (empty or reverse-appliable):
ath79/patches-5.10/411-spi-ath79-add-SPI_MASTER_GPIO_SS-flag.patch
ath79/patches-5.10/0050-spi-ath79-remove-spi-master-setup-and-cleanup-assign.patch
ath79/patches-5.10/0054-spi-sync-up-initial-chipselect-state.patch

Manually refreshed:
ath79/patches-5.10/0033-spi-ath79-drop-pdata-support.patch

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-05-14 08:46:45 +01:00
Adrian Schmutzler 6780019892 ath79: fix sorting in generic 02_network
The two device strings were not ordered properly.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-05-14 00:19:11 +02:00
Leonardo Mörlein b993b68b6c build: introduce $(MKHASH)
Before this commit, it was assumed that mkhash is in the PATH. While
this was fine for the normal build workflow, this led to some issues if

    make TOPDIR="$(pwd)" -C "$pkgdir" compile

was called manually. In most of the cases, I just saw warnings like this:

    make: Entering directory '/home/.../package/gluon-status-page'
    bash: line 1: mkhash: command not found
    bash: line 1: mkhash: command not found
    bash: line 1: mkhash: command not found
    bash: line 1: mkhash: command not found
    bash: line 1: mkhash: command not found
    bash: line 1: mkhash: command not found
    bash: line 1: mkhash: command not found
    bash: line 1: mkhash: command not found
    [...]

While these were only warnings and the package still compiled sucessfully,
I also observed that some package even fail to build because of this.

After applying this commit, the variable $(MKHASH) is introduced. This
variable points to $(STAGING_DIR_HOST)/bin/mkhash, which is always the
correct path.

Signed-off-by: Leonardo Mörlein <me@irrelefant.net>
2021-05-13 15:13:15 +02:00
Petr Štetiar ce8af0ace0 ipq806x: base-files: asrock: fix bootcount include
Fixes following error while executing the init script on the buildhost:

 Enabling boot
 ./etc/init.d/bootcount: line 5: /lib/upgrade/asrock.sh: No such file or directory
 Enabling bootcount

While at it fix following shellcheck issue:

 base-files/etc/init.d/bootcount line 11:
    if [ $? -eq 0 ]; then
         ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.

Cc: Ansuel Smith <ansuelsmth@gmail.com>
Cc: Pawel Dembicki <paweldembicki@gmail.com>
Cc: Christian Lamparter <chunkeey@gmail.com>
Fixes: 98b86296e6 ("ipq806x: add support for ASRock G10")
References: https://gitlab.com/ynezz/openwrt/-/jobs/1243290743#L1444
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2021-05-13 15:13:15 +02:00
Thibaut VARÈNE 4e385a27d6 generic: platform/mikrotik: release mtd device after use
The code uses get_mtd_device_nm() which must be followed by a call to
put_mtd_device() once the handle is no longer used.

This fixes spurious shutdown console messages such as:
[ 2256.334562] Removing MTD device #7 (soft_config) with use count 1

Reported-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2021-05-12 10:13:12 +02:00
Daniel Golle e7249669d2
kernel: move three accepted patches from pending to backports
311-MIPS-zboot-put-appended-dtb-into-a-section.patch
commit d2e850e96183 in kernel, part of v5.11

499-mtd-don-t-lock-when-recursively-deleting-partitions.patch
commit cb4543054c5c in kernel, part of v5.13

103-MIPS-select-CPU_MIPS64-for-remaining-MIPS64-CPUs.patch
commit 5a4fa44f5e1b in kernel, part of v5.13

Move them to backports folder to make maintainance easier.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-05-11 01:05:38 +01:00
Shiji Yang e57e460dc7 ramips: fix mac addresses of Youku YK1
MAC addresses read from official firmware

        value       location
Wlan    xx 71 de    factory@0x04
Lan     xx 71 dd    factory@0x28
Wan     xx 71 df    factory@0x2e
Label   xx 71 dd    factory@0x28

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
[fix sorting in 02_network, redact commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-05-10 14:41:06 +02:00
Adrian Schmutzler f4940d2229 ramips: use standard naming scheme for Zyxel NR7101 LED nodes
Make naming and DT label consistent with other devices at this
target.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-05-10 14:41:06 +02:00
David Bauer a273ac4d61 ath79: ag71xx: fix error handling for of_get_phy_mode
Errors are not indicated by the phy_mode value but returned separately
from the function.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-05-10 01:19:32 +02:00
Birger Koblitz 204956aea5 realtek: Fix VLAN issues introduced by multicast patches
This adds the CPU port to the unknown multicast flooding port mask,
which fixes the VLAN issues introduced by the multicast group patches

Tested-by: Russell Senior <russell@personaltelco.net> [Netgear GS108Tv3]
Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
Signed-off-by: Bjørn Mork <bjorn@mork.no> [whitespace fix]
Signed-off-by: Petr Štetiar <ynezz@true.cz> [unknwon typo fix]
2021-05-09 16:19:31 +02:00
Kevin Darbyshire-Bryant f35dbef6d2 kernel: bump 5.10 to 5.10.35
Refresh kernel patches.

Built under MacOS

Run tested: x86_64 (apu2)

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2021-05-09 09:55:58 +01:00
Bjørn Mork 2449a63208 ramips: mt7621: Add support for ZyXEL NR7101
The ZyXEL NR7101 is an 802.3at PoE powered 5G outdoor (IP68) CPE
with integrated directional 5G/LTE antennas.

Specifications:

 - SoC: MediaTek MT7621AT
 - RAM: 256 MB
 - Flash: 128 MB MB NAND (MX30LF1G18AC)
 - WiFi: MediaTek MT7603E
 - Switch: 1 LAN port (Gigabiti)
 - 5G/LTE: Quectel RG502Q-EA connected by USB3 to SoC
 - SIM: 2 micro-SIM slots under transparent cover
 - Buttons: Reset, WLAN under same cover
 - LEDs: Multicolour green/red/yellow under same cover (visible)
 - Power: 802.3at PoE via LAN port

The device is built as an outdoor ethernet to 5G/LTE bridge or
router. The Wifi interface is intended for installation and/or
temporary management purposes only.

UART Serial:

57600N1
Located on populated 5 pin header J5:

 [o] GND
 [ ] key - no pin
 [o] RX
 [o] TX
 [o] 3.3V Vcc

Remove the SIM/button/LED cover, the WLAN button and 12 screws
holding the back plate and antenna cover together. The GPS antenna
is fixed to the cover, so be careful with the cable.  Remove 4
screws fixing the antenna board to the main board, again being
careful with the cables.

A bluetooth TTL adapter is recommended for permanent console
access, to keep the router water and dustproof. The 3.3V pin is
able to power such an adapter.

MAC addresses:

OpenWrt OEM   Address          Found as
lan     eth2  08:26:97:*:*:BC  Factory 0xe000 (hex), label
wlan0   ra0   08:26:97:*:*:BD  Factory 0x4 (hex)
wwan0   usb0  random

WARNING!!

ISP managed firmware might at any time update itself to a version
where all known workarounds have been disabled.  Never boot an ISP
managed firmware with a SIM in any of the slots if you intend to use
the router with OpenWrt. The bootloader lock can only be disabled with
root access to running firmware. The flash chip is physically
inaccessible without soldering.

Installation from OEM web GUI:

- Log in as "supervisor" on https://172.17.1.1/
- Upload OpenWrt initramfs-recovery.bin image on the
  Maintenance -> Firmware page
- Wait for OpenWrt to boot and ssh to root@192.168.1.1
- (optional) Copy OpenWrt to the recovery partition. See below
- Sysupgrade to the OpenWrt sysupgrade image and reboot

Installation from OEM ssh:

- Log in as "root" on 172.17.1.1 port 22022
- scp OpenWrt initramfs-recovery.bin image to 172.17.1.1:/tmp
- Prepare bootloader config by running:
    nvram setro uboot DebugFlag 0x1
    nvram setro uboot CheckBypass 0
    nvram commit
- Run "mtd_write -w write initramfs-recovery.bin Kernel" and reboot
- Wait for OpenWrt to boot and ssh to root@192.168.1.1
- (optional) Copy OpenWrt to the recovery partition. See below
- Sysupgrade to the OpenWrt sysupgrade image and reboot

Copying OpenWrt to the recovery partition:

- Verify that you are running a working OpenWrt recovery image
  from flash
- ssh to root@192.168.1.1 and run:
    fw_setenv CheckBypass 0
    mtd -r erase Kernel2
- Wait while the bootloader mirrors Image1 to Image2

NOTE: This should only be done after successfully booting the OpenWrt
  recovery image from the primary partition during installation.  Do
  not do this after having sysupgraded OpenWrt!  Reinstalling the
  recovery image on normal upgrades is not required or recommended.

Installation from Z-Loader:

- Halt boot by pressing Escape on console
- Set up a tftp server to serve the OpenWrt initramfs-recovery.bin
  image at 10.10.10.3
- Type "ATNR 1,initramfs-recovery.bin" at the "ZLB>" prompt
- Wait for OpenWrt to boot and ssh to root@192.168.1.1
- Sysupgrade to the OpenWrt sysupgrade image

NOTE: ATNR will write the recovery image to both primary and recovery
  partitions in one go.

Booting from RAM:

- Halt boot by pressing Escape on console
- Type "ATGU" at the "ZLB>" prompt to enter the U-Boot menu
- Press "4" to select "4: Entr boot command line interface."
- Set up a tftp server to serve the OpenWrt initramfs-recovery.bin
  image at 10.10.10.3
- Load it using "tftpboot 0x88000000 initramfs-recovery.bin"
- Boot with "bootm  0x8800017C" to skip the 380 (0x17C) bytes ZyXEL
  header

This method can also be used to RAM boot OEM firmware. The warning
regarding OEM applies!  Never boot an unknown OEM firmware, or any OEM
firmware with a SIM in any slot.

NOTE: U-Boot configuration is incomplete (on some devices?). You may
  have to configure a working mac address before running tftp using
   "setenv eth0addr <mac>"

Unlocking the bootloader:

If you are unebale to halt boot, then the bootloader is locked.

The OEM firmware locks the bootloader on every boot by setting
DebugFlag to 0.  Setting it to 1 is therefore only temporary
when OEM firmware is installed.

- Run "nvram setro uboot DebugFlag 0x1; nvram commit" in OEM firmware
- Run "fw_setenv DebugFlag 0x1" in OpenWrt

  NOTE:
    OpenWrt does this automatically on first boot if necessary

  NOTE2:
    Setting the flag to 0x1 avoids the reset to 0 in known OEM
    versions, but this might change.

  WARNING:
    Writing anything to flash while the bootloader is locked is
    considered extremely risky. Errors might cause a permanent
    brick!

Enabling management access from LAN:

Temporary workaround to allow installing OpenWrt if OEM firmware
has disabled LAN management:

- Connect to console
- Log in as "root"
- Run "iptables -I INPUT -i br0 -j ACCEPT"

Notes on the OEM/bootloader dual partition scheme

The dual partition scheme on this device uses Image2 as a recovery
image only. The device will always boot from Image1, but the
bootloader might copy Image2 to Image1 under specific conditions. This
scheme prevents repurposing of the space occupied by Image2 in any
useful way.

Validation of primary and recovery images is controlled by the
variables CheckBypass, Image1Stable, and Image1Try.

The bootloader sets CheckBypass to 0 and reboots if Image1 fails
validation.

If CheckBypass is 0 and Image1 is invalid then Image2 is copied to
Image1.

If CheckBypass is 0 and Image2 is invalid, then Image1 is copied to
Image2.

If CheckBypass is 1 then all tests are skipped and Image1 is booted
unconditionally.  CheckBypass is set to 1 after each successful
validation of Image1.

Image1Try is incremented if Image1Stable is 0, and Image2 is copied to
Image1 if Image1Try is 3 or larger.  But the bootloader only tests
Image1Try if CheckBypass is 0, which is impossible unless the booted
image sets it to 0 before failing.

The system is therefore not resilient against runtime errors like
failure to mount the rootfs, unless the kernel image sets CheckBypass
to 0 before failing. This is not yet implemented in OpenWrt.

Setting Image1Stable to 1 prevents the bootloader from updating
Image1Try on every boot, saving unnecessary writes to the environment
partition.

Keeping an OpenWrt initramfs recovery as Image2 is recommended
primarily to avoid unwanted OEM firmware boots on failure. Ref the
warning above. It enables console-less recovery in case of some
failures to boot from Image1.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
2021-05-09 09:15:44 +02:00
Ilya Lipnitskiy 89b99e9c1a treewide: consolidate named GPIO patch into hack-5.10
ath79, lantiq, ipq40xx, ramips all use the OpenWrt-specific gpio-export
functionality. Consolidate the patch that adds it under hack-5.10 since
this logic is obviously not target-specific. For those who want to
disable it, unsetting CONFIG_GPIO_SYSFS symbol will disable this code.

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-05-09 09:15:44 +02:00
Mark Mentovai 62850e7a77 ipq806x: Bring missing patches from 5.4 to 5.10
Kernel 5.10 support for ipq806x was added at the same time that these
patches were developed for kernel 5.4. This carries the patches forward
to kernel 5.10.

fa731838c5 ipq806x: dwmac: clear forced speed during probe
75ca641f1b ipq806x: Add "snps,dwmac" to all gmac compatible=
d62825dd77 ipq806x: dwmac: set forced speed when using fixed-link

Signed-off-by: Mark Mentovai <mark@moxienet.com>
Run-tested: ipq806x/ubnt,unifi-ac-hd
Cc: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-09 09:15:44 +02:00
Mark Mentovai a1afeb9270 ipq806x: Add mising devices to kernel 5.10
d53be2a2e9 migrated 0069-arm-boot-add-dts-files.patch from patches-5.4
to patches-5.10, but a subsequent patch in that set, 1e25423be8,
erroneously removed several devices:

ipq8062/nec,wg2600hp3 from 3bb1618573
ipq8064/asrock,g10 from 98b86296e6
ipq8064/ubnt,unifi-ac-hd from 4e46beb313

Signed-off-by: Mark Mentovai <mark@moxienet.com>
Run-tested: ipq806x/ubnt,unifi-ac-hd
Cc: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-09 09:15:44 +02:00
John Audia da16b801a3 kernel: bump 5.4 to 5.4.117
All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2021-05-09 09:15:44 +02:00
Daniel Golle e1adb1fa39
mediatek: reserve memory for ramoops and enable PSTORE
Reserve 64KiB of memory for crashlogs and enable PSTORE feature in
kernel config for MT7622.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-05-08 23:36:18 +01:00
Stefan Lippers-Hollmann 435dc2e77e ipq806x: ecw5410: case-insensitive qcom-smem partitions
The out-of-tree qcom-smem patches traditionally displayed mtd partition names
in upper case, starting with the new mainline qcom-smem support in kernel v5.10,
it switches to normalizing the partition names to lower case.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
2021-05-08 18:45:42 +02:00
Stefan Lippers-Hollmann f70e11cd97 ipq806x: g10: case-insensitive qcom-smem partitions
The out-of-tree qcom-smem patches traditionally displayed mtd partition names
in upper case, starting with the new mainline qcom-smem support in kernel v5.10,
it switches to normalizing the partition names to lower case.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
2021-05-08 18:45:42 +02:00
Stefan Lippers-Hollmann 2db9dded0a ipq806x: nbg6817: case-insensitive qcom-smem partitions
The out-of-tree qcom-smem patches traditionally displayed mtd partition names
in upper case, starting with the new mainline qcom-smem support in kernel v5.10,
it switches to normalizing the partition names to lower case.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
2021-05-08 18:45:42 +02:00
Mark Mentovai d62825dd77 ipq806x: dwmac: fix GMACs connected via SGMII fixed-link
fa731838c5 cleared the forced speed in the QSGMII PCS_ALL_CH_CTL
register during probe, but this is only correct for GMACs that are not
configured with fixed-link. This prevented GMACs configured with both
phy-mode = "sgmii" and fixed-link from working properly, as discussed at
https://github.com/openwrt/openwrt/pull/3954#issuecomment-834625090 and
the comments that follow. Notably, this prevented all communication
between gmac2 and the switch on the Netgear R7800.

The correct behavior is to set the QSGMII PCS_ALL_CH_CTL register by
considering the gmac's fixed-link child, setting the speed as directed by
fixed-link if present, and otherwise clearing it as was done previously.

Fixes: fa731838c5 ("ipq806x: dwmac: clear forced speed during probe")
Signed-off-by: Mark Mentovai <mark@moxienet.com>
Tested-by: Hannu Nyman <hannu.nyman@iki.fi>
Run-tested: ipq806x/ubnt,unifi-ac-hd, ipq806x/netgear,r7800
Cc: Petr Štetiar <ynezz@true.cz>
Cc: Ansuel Smith <ansuelsmth@gmail.com>
Tested-by:  Ansuel Smith <ansuelsmth@gmail.com>
2021-05-08 18:45:42 +02:00
Baptiste Jonglez 979f406366 ipq40xx: fix hard_config partition size on MikroTik hAP-ac2
The routerbootparts driver dynamically discovers the location of MikroTik
partitions, but it cannot determine their size (except by extending them
up to the start of the next discovered partition).

The hard_config partition has a default size of 0x1000 in the driver,
while it actually takes 0x2000 on the hAP-ac2.  Set the correct size in
the hAP-ac2 DTS.

On most devices, this isn't a problem as the actual data fits in 0x1000
bytes.  However, some devices have larger data that doesn't fit in 0x1000
bytes.  In any case, all devices seen so far have enough space for a
0x2000 hard_config partition before the start of the dtb_config partition.
With the current 0x1000 size:

0x00000000e000-0x00000000f000 : "hard_config"
0x000000010000-0x000000017bbc : "dtb_config"

With this patch extending the size to 0x2000:

0x00000000e000-0x000000010000 : "hard_config"
0x000000010000-0x000000017bbc : "dtb_config"

Other ipq40xx boards may need the same fix but it needs testing.

References: https://forum.openwrt.org/t/support-for-mikrotik-hap-ac2/23333/324
Acked-by: Thibaut VARÈNE <hacks@slashdirt.org>
Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
2021-05-08 12:18:43 +02:00
Sven Roederer 1e4b191ac8 sdk: unset BINARY_FOLDER and DOWNLOAD_FOLDER in final archives
Using these config-options to customize the folders used at build-time makes these
folder settings appear in generated archive. This causes the SDK to be not
portable, as it's going to use the build-time folders on the new systems.
The errors vary from passing the build, disk out-of-space to permission denied.

The build-time settings of these folders are passed into the archive via Config.build.
The expected behavior is that the SDK acts after unpacking like these settings have
their defaults, using intree folders. So just filter these folders out when running
convert-config.pl to create Config.build.

This addresses the same issue that's fixed in the previous commit for the imagebuilder.

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
2021-05-08 12:14:04 +02:00
Sven Roederer 6967903b01 imagebuilder: unset BINARY_FOLDER and DOWNLOAD_FOLDER in final archive
Using these config-options to customize the folders used at build-time
makes these folder settings appear in generated archive. This causes the
imagebuilder to be not portable, as it's going to use the build-time folders
on the new systems. Errors look like:

  mkdir: cannot create directory '/mnt/build': Permission denied
  Makefile:116: recipe for target '_call_image' failed
  make[2]: *** [_call_image] Error 1
  Makefile:241: recipe for target 'image' failed
  make[1]: *** [image] Error 2

The build-time settings of these folders are passed into the archives via
.config file.
The expected behavior is that after unpacking the imagebuilder acts like
these settings have their defaults, using intree folders. So unset the
build-time settings.

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
2021-05-08 12:14:00 +02:00
Birger Koblitz cde31976e3 realtek: Add support for Layer 2 Multicast
Adds support for Layer 2 multicast by implementing the DSA port_mdb_*
callbacks. The Kernel bridge listens to IGMP/MLD messages trapped to
the CPU-port, and calls the Multicast Forwarding Database updates.
The updates manage the L2 forwarding entries and the multicast
port-maps.

Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
2021-05-07 07:05:16 +02:00
Birger Koblitz 4342d27ec9 realtek: Setup all VLANs with default configurations
This sets up all VLANs with a default configuration on reset:
 - forward based on VLAN-ID and not the FID/MSTI
 - forward based on the inner VLAN-ID (not outer)

Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
2021-05-07 07:05:16 +02:00
Birger Koblitz d4649942ad realtek: Add SoC-specific VLAN setup routine
This adds SoC specific VLAN configuration routines, which
alsoe sets up the portmask table entries that are referred to
in the vlan profiles registers for unknown multicast flooding.

Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
2021-05-07 07:05:16 +02:00
Birger Koblitz 408990464c realtek: Add support for clause45 PHYs
This adds support for the MMD access registers the RTL-SoCs use to access clause 45
PHYs via mdio.
This new interface is used to add EEE-support for the RTL8226

Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
2021-05-07 07:05:16 +02:00
Birger Koblitz 515d9c85f2 realtek: improve EEE support for RTL8380/8390/9300
Clean up and fix bugs in the EEE support for RTL8380/90
Adds EEE support for RTL9300

Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
2021-05-07 07:05:16 +02:00
Birger Koblitz 637deabb4a realtek: Add L2 hash bucket size
Adds a hash-bucket size attribute for the different SoCs, in order to
accomodate the buckets with 8 entries of the L2-forwarding tables
on RTL93XX in contrast to only 4 on RTL83XX.

Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
2021-05-07 07:05:16 +02:00
Birger Koblitz d497262748 realtek: remove unused FDB print routing
remove fdb_dump debugging function

Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
2021-05-07 07:05:16 +02:00
Birger Koblitz cf4edabefd realtek: add IGMP/MLD snooping support
This adds snooping support for IGMP and MLD on RTL8380/90/9300
by trapping IGMP and MLD packets to the CPU.

Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
2021-05-07 07:05:16 +02:00
Birger Koblitz 9e8d62e421 realtek: enable CRC offloading
Enables CRC calculation offloading on RTL8380/8390/9300.

Tested on Zyxel XGS1210-10 (RTL9302)/GS1900-48 (RTL8390)/GS1900-10HP (RTL8382)
On the Zyxel GS1900-10HP, an increase of 5% in iperf3 send throughput
and 11% in receive throughput is seen.

Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
2021-05-07 07:05:16 +02:00
Ansuel Smith 3bae740311 ipq806x: add missing wakeup-source for gpio keys
wakeup-source is required for gpio keys to fix error
genirq: irq_chip msmgpio did not update eff. affinity mask

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith 1603d09964 ipq806x: apply correct voltage tolerance
Voltage tolerance was 5%, not 5000. Update min and max voltage of the target opp.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith 4cd43af0de ipq806x: fix missing tx/rx fifo depth gmac configuration
tx/rx-fifo-depth is required to set mtu to the gmac. Backport upstream patch.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith db2c147cf4 ipq806x: refresh 5.10 patches
make target/linux/kernel refresh

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith d079c8fa48 ipq806x: simplify ecw5410 dts
Simplify ecw5410 dts instead of redefine nodes.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith e3daef34a0 ipq806x: set boot layout for nandc compatible
Set boot layout size to fix io error on block scan.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith 85adcec3ba ipq806x: add kernel 5.10 as testing kernel
Add kernel 5.10 as testing kernel

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith 9e843a9b8a ipq806x: refresh config 5.10
Refresh config for kernel 5.10.
- Added new symbol.
- Refreshed with make kernel_oldconfig

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith 1e25423be8 ipq806x: refresh dtsi patches
- Add new tsens node
- Add new cpufreq required nodes
- Drop arm cpuidle compatible
- Fix duplicate node set upstream
- Add voltage tolerance value for cpu opp

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith 62cc66fa67 ipq806x: introduce nandc boot layout mode
ipq806x have different ecc configuration for boot partition and rootfs partition. Add support for this to fix IO error on mtd block scan.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith fdb739bef6 ipq806x: fix broken pci2 and pci3
pci2 and pci3 has a too big io address space. Enlarge the IO_SPACE_LIMIT define for the arm arch.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith 6e411b8416 ipq806x: backport cpufreq changes to 5.4
The new cpufreq driver requires different dts bindings.
Backport the new driver to kernel 5.4

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith 5dbbefcbcc ipq806x: introduce dedicated krait cpufreq
- Drop cpufreq patchs that tweak the cpufreq-dt driver
- Add dedicated krait cpufreq driver

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith e17fb62293 ipq806x: drop upstream patch
Drop upstream patch already included in the kernel 5.10

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith e2b0ad1114 ipq806x: drop cpuidle generic support from QCOM
The spm driver now has dedicated support for krait cpu idle state. We don't need to add generic arm cpuidle support for qcom.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith c864f587a2 ipq806x: backport mtd adm and smem driver
- Backport mtd adm driver from kernel 5.12
- Backport mtd parser smem from kernel 5.11
- Fix mtd rootfs patch
- Update qcom,smem compatible to qcom,smem-parts

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith cde218d14b ipq806x: fix missing clk and reset
Patch 0030 wrongly disables gsbi1 instead of gsbi4.
Fix the wrong patch and also include other fix from the original qsdk source.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith 96f10c9d7a ipq806x: use newer tsens patch
Use improved tsens patch proposed upstream.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith d53be2a2e9 ipq806x: copy kernel 5.4 patches to 5.10
Copy kernel 5.4 patches and config to 5.10

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
Ansuel Smith 861b82d36a ipq806x: improve system latency
Various report and data show that the freq 384000 is too low and cause some
extra latency to the entire system. OEM qsdk code also set the min frequency
for this target to 800 mhz.
Also some user notice some instability with this idle frequency, solved by
setting the min frequency to 600mhz. Fix all these kind of problem by
introducing a boot init.d script that set the min frequency to 600mhz and set
the ondemand governor to be more aggressive. The script set these value only if
the ondemand governor is detected. 384 mhz freq is still available and user can
decide to restore the old behavior by disabling this script.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-07 07:05:16 +02:00
INAGAKI Hiroshi 4c0c860846 realtek: add support for INABA Abaniact AML2-17GP
INABA Abaniact AML2-17GP is a 17 port gigabit switch, based on RTL8382.

Specification:

- SoC		: Realtek RTL8382
- RAM		: DDR3 128 MiB (SK hynix H5TQ1G63EFR)
- Flash		: SPI-NOR 32 MiB (Macronix MX25L25635FZ2I-10G)
- Ethernet	: 10/100/1000 Mbps x17
  - port 1-8	: RTL8218B (SoC)
  - port 8-16	: RTL8218D
  - port wan	: RTL8214FC
- LEDs/Keys	: 1x, 1x
- UART		: pin header on PCB (Molex 530470410 compatible)
  - J14: 3.3V, GND, RX, TX from rear side
  - 115200n8
- Power		: 100-240 VAC, 50/60 Hz, 0.21 A
  - Plug	: IEC 60320-C13

Flash instruction using initramfs image:

1.  Boot AML2-17GP normally
2.  Set the IP address of computer to the range of 192.168.1.0/24, other
    than 192.168.1.248 and connect computer to "WAN/CONSOLE" port of
    AML2-17GP
3.  Access to "http://192.168.1.248" and open firmware setting page

    -- UI Language: 日本語 --
    "メンテナンス" -> "デュアルイメージ"

    -- UI Language: ENGLISH --
    "Maintenance" -> "Dual Image"

4.  Check "イメージ情報 (en: "Images Information")" and set the first
    image to active by choosing "アクティブイメージ" (en: "Active
    Image") in the partition "0"
5.  open firmware upgrade page

    -- UI Language: 日本語 --
    "メンテナンス" -> "アップグレードマネージャー"

    -- UI Language: ENGLISH --
    "Maintenance" -> "Upgrade Manager"

6.  Set the properties as follows

    -- UI Language: 日本語 --
    "アップグレード方式"	: "HTTP"
    "アップグレードタイプ"	: "イメージ"
    "イメージ"			: "アクティブ"
    "ブラウズファイル"		: (select the OpenWrt initramfs image)

    -- UI Language: ENGLISH --
    "Upgrade Method"		: "HTTP"
    "Upgrade Type"		: "Image"
    "Image"			: "(Active)"
    "Browse file"		: (select the OpenWrt initramfs image)

7.  Press "アップグレード" (en: "Upgrade") button and perform upgrade
8.  Wait ~150 seconds to complete flashing
9.  After the flashing, the following message is showed and press "OK"
    button to reboot

    -- UI Language: 日本語 --
    "成功!! 今すぐリブートしますか?"

    -- UI Language: ENGLISH --
    "Success!! Do you want to reboot now?"

10. After the rebooting, reconnect the cable to other port (1-16) and
    open the SSH connection, download the sysupgrade image to the device
    and perform sysupgrade with it
11. Wait ~120 seconds to complete sysupgrade

Note:

- The uploaded image via WebUI will only be written with the length
  embedded in the uImage header. If the sysupgrade image is specified,
  only the kernel is flashed and lacks the rootfs, this causes a kernel
  panic while booting and bootloops.
  To avoid this issue, initramfs image is required for flashing on WebUI
  of stock firmware.

- This device has 1x LED named as "POWER", but it's not connected to the
  GPIO of SoC and cannot be controlled.

- port 17 is named as "WAN/CONSOLE". This port is for the upstream
  connection and console access (telnet/WebUI) on stock firmware.

Back to stock firmware:

1. Set "bootpartition" variable in u-boot-env2 partition to "1" by
   fw_setsys

   fw_setsys bootpartition 1

2. Reboot AML2-17GP

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-05-07 07:05:16 +02:00
Raylynn Knight c829bc1f2c realtek: Add support for Netgear S350 series switches GS308T and GS310TP
The Netgear GS308T v1 is an 8 port gigabit switch.  The GS310TP v1 is an 8
port POE+ gigabit switch with 2 SFP Ports (currently untested).

The GS308T v1 and GS310TP v1 are quite similar to the Netgear GS1xx
devices already supported.  Theses two devices use the same Netgear
firmware and are very similar to there corresponding GS1xx devices. For
this reason they share a large portion of the device tree with the GS108T
and GS110TP with exception of the uimage magic and model and compatible
values.

All of the above feature a dual firmware layout, referred to as Image0
and Image1 in the Netgear firmware.

In order to manipulate the PoE+ on the GS310TP v1 , one needs the
rtl83xx-poe package

Specifications (GS308T)
----------------------

 * RTL8380M SoC, 1 MIPS 4KEc core @ 500MHz
 * 128MB DDR3-1600 DRAM (Winbond W631GG8MB-12)
 * 32MB 3v NOR SPI Flash (Winbond W25Q256JVFQ)
 * RTL8231 GPIO extender to control the LEDs and the reset button
 * 8 x 10/100/1000BASE-T ports, internal PHY (RTL8218B)
 * UART (115200 8N1) via unpopulated standard 0.1" pin header marked J1
 * Power is supplied via a 12V 1A barrel connector

Specifications (GS310TP)
----------------------

 * RTL8380M SoC, 1 MIPS 4KEc core @ 500MHz
 * Nuvoton M0516LDN for controlling PoE
 * 128MB DDR3-1600 DRAM (Winbond W631GG8MB-12)
 * 32MB 3v NOR SPI Flash (Winbond W25Q256JVFQ)
 * RTL8231 GPIO extender to control the LEDs and the reset button
 * 8 x 10/100/1000BASE-T PoE+ ports, 2 x Gigabit SFP ports,
 internal PHY (RTL8218B)
 * UART (115200 8N1) via unpopulated standard 0.1" pin header marked J1
 * Power is supplied via a 54V 1.25A barrel connector

Both devices have UART pinout
-----------

J1 | [o]ooo
      ^ ||`------ GND
      | |`------- RX         [TX out of the serial adapter]
      | `-------- TX         [RX into the serial adapter]
      `---------- Vcc (3V3)  [the square pin]

The through holes are filled with PB-free solder which melts at 375C.
They can also be drilled using a 0.9mm bit.

Installation
------------
Instructions are identical to those for the similar Negear devices
and apply both to the GS308T v1 and GS310TP v1 as well.
-------------------
Boot initramfs image from U-Boot
--------------------------------

 1. Press the Escape key at the `Hit Esc key to stop autoboot` prompt
 2. Init network with `rtk network on` command
 3. Load image with `tftpboot 0x8f000000
openwrt-realtek-generic-netgear_gs308t-v1-initramfs-kernel.bin` command
 4. Boot the image with `bootm` command

The switch defaults to IP 192.168.1.1 and tries to fetch the image via
TFTP from 192.168.1.111.

Updating the installed firmware
-------------------------------

The OpenWRT ramdisk image can be flashed directly from the Netgear UI.
The Image0 slot should be used in order to enable sysupgrade.

As with similar switches, changing the active boot partition can be
accomplished in U-Boot as follows:

 1. Press the Escape key at the `Hit Esc key to stop autoboot` prompt
 2. Run `setsys bootpartition {0|1}` to select the boot partition
 3. Run `savesys` followed by `boota` to proceed with the boot process

Signed-off-by: Raylynn Knight <rayknight@me.com>
2021-05-07 07:05:16 +02:00
John Audia daa5860827 kernel: bump 5.4 to 5.4.116
All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2021-05-07 07:05:16 +02:00
Mark Mentovai 75ca641f1b ipq806x: Add "snps,dwmac" to all gmac compatible=
This was introduced to gmac2 and gmac3 in 57ea767a53 without fanfare.
There's no indication of why it was added to those devices, but not to
gmac0 or gmac1. It was probably an unintentional omission. It should be
present on all four gmac devices.

This property is considered by
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
stmmac_probe_config_dt.

Signed-off-by: Mark Mentovai <mark@moxienet.com>
Build-tested: ipq806x/ubnt,unifi-ac-hd
Run-tested: ipq806x/ubnt,unifi-ac-hd
2021-05-07 07:05:16 +02:00
Mark Mentovai 565814a5ee ipq806x: ubnt,unifi-ac-hd: reorder eth0 and eth1
The Ubiquiti UniFi AC HD (UAP-AC-HD, UAP301) has two Ethernet ports,
labeled MAIN and SECONDARY, connected to gmac2 and gmac1, respectively.
The standard probe order results in gmac1/SECONDARY being eth0 and
gmac2/MAIN being eth1. This does not match the stock firmware, is
contrary to user expectation, causes the wrong (high) MAC address to be
used in a bridged configuration (the default for this device), and makes
the gmac2/MAIN port unusable in the preinit environment (such as for
failsafe). Until a recent patch, gmac1/SECONDARY (eth0) was not even
usable.

This reorders the ports so that gmac2/MAIN is eth0, and the now-working
gmac1/SECONDARY is eth1. eth0 has the low MAC address and eth1 has the
high; when bridged, the bridge takes on the correct low MAC address.
This matches the stock firmware. The MAIN port is usable for failsafe
during preinit.

This device does not have a switch on board, so there's no possibility
to remap ports via switch configuration. "ip link set $interface name"
is used instead, during preinit before networking is configured.

Signed-off-by: Mark Mentovai <mark@moxienet.com>
Build-tested: ipq806x/ubnt,unifi-ac-hd
Run-tested: ipq806x/ubnt,unifi-ac-hd
2021-05-07 07:05:16 +02:00
Mark Mentovai 4f74966852 ipq806x: ubnt,unifi-ac-hd: use on-board PHYs
Unlike many ipq806x devices, Ubiquiti UniFi AC HD (UAP-AC-HD, UAP301)
has no switch on board. Its two Ethernet ports are connected to Atheros
AR8033 PHYs. It is not appropriate to use fixed-link in this
configuration. Instead, configure the correct PHYs in the device tree
configuration to allow the at803x driver to load.

Signed-off-by: Mark Mentovai <mark@moxienet.com>
Build-tested: ipq806x/ubnt,unifi-ac-hd
Run-tested: ipq806x/ubnt,unifi-ac-hd
2021-05-07 07:05:16 +02:00
Mark Mentovai fa731838c5 ipq806x: dwmac: clear forced speed during probe
On a Ubiquiti UniFi AC HD (ubnt,unifi-ac-hd, UAP-AC-HD, UAP301), a
forced speed on gmac1 is set in the QSGMII PCS_ALL_CH_CTL register,
presumably by the bootloader (4.3.28), preventing the interface from
being usable. The QSDK NSS GMAC driver takes care to clear the forced
speed in nss_gmac_qsgmii_dev_init
(https://source.codeaurora.org/quic/qsdk/oss/lklm/nss-gmac/tree/ipq806x/nss_gmac_init.c?h=nss
at d5bb14925861).

gmac1 is connected to the port on the device labeled SECONDARY, and is
currently eth0 but will be switched to eth1 by a subsequent patch. By
clearing the QSGMII PCS forced speed during dwmac initialization when
SGMII is in use, this port becomes usable.

This patch is upstreamable, and will be sent upstream after successful
testing in OpenWrt.

Signed-off-by: Mark Mentovai <mark@moxienet.com>
Build-tested: ipq806x/ubnt,unifi-ac-hd
Run-tested: ipq806x/ubnt,unifi-ac-hd
2021-05-07 07:05:16 +02:00
Rafał Miłecki ed4641e9f1 kernel: fix parsing fixed subpartitions
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-05-06 14:53:25 +02:00
Hauke Mehrtens 5d8ea6d34f ath79: Deactivate ZyXEL NBG6716 by default
The kernel image is too big now and the build fails.

WARNING: Image file zyxel_nbg6716-kernel.bin is too big: 4205404 > 4194304

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-05-02 15:00:40 +02:00
Daniel Golle 01a9d22086
mediatek: bpi-r64: add eMMC bootloader artifacts
In order to allow easily updating the bootloader on eMMC also provide
artifacts for that. Support for updating bootloader via TFTP will be
added to the loader CLI menu in a follow-up commit.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-05-01 22:55:14 +01:00
Hauke Mehrtens 7ab3d94681 kernel: add missing kernel config option
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-05-01 22:11:56 +02:00
Hauke Mehrtens fa93902a23 mediatek: Add missing config options
It is possible to select CONFIG_MTD_PARSER_TRX on the mediatek now. Add
this option to the kernel configuration file.

Fixes: 58c5e25664 ("mediatek: support non standard trx magic values")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-05-01 22:11:56 +02:00
Hauke Mehrtens 63d8117d37 kernel: Reorder kernel configuration options
Reorder the options and remove double entries.
This was generated by running this:
$ ./scripts/kconfig.pl '+' target/linux/generic/config-5.10 /dev/null > target/linux/generic/config-5.10.new
$ mv target/linux/generic/config-5.10.new target/linux/generic/config-5.10
$ ./scripts/kconfig.pl '+' target/linux/generic/config-5.4 /dev/null > target/linux/generic/config-5.4.new
$ mv target/linux/generic/config-5.4.new target/linux/generic/config-5.4

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-05-01 22:11:56 +02:00
Hauke Mehrtens d31bd7aa3b kernel: partly revert: update mt7530 EEE patch from upstream
This partly reverts commit 20a924d2ae.

This commit broke the build of the Mediatek target with kernel 5.4, for
kernel 5.10 it is fine.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-05-01 22:11:53 +02:00
David Bauer 2352fbc8c4 mediatek: correct address of ethernet PHY
We still have no driver for the PHY, however we can fix it's
address.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-05-01 13:18:07 +02:00
David Bauer e5f81ea3fe ath79: drop cs-gpios property
The spi-ath79 driver performs the chipselect by writing to dedicated
register in the SPI register block. So the GPIO numbers were not used.

Tested-on: Enterasys WS-AP3705i

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-05-01 13:17:57 +02:00
David Bauer bd54e73954 ath79: set number of chipselect lines
All chipsets from AR7100 up to QCA9563 have three dedicated chipselect
lines for the integrated SPI controller. Remove the number of
chipselects from the platform data, as there is no need to manually set
this to a different value.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-05-01 13:17:48 +02:00
David Bauer a1d405ff8a ath79: add SPI_MASTER_GPIO_SS flag
Add the SPI_MASTER_GPIO_SS flag for the spi-ath79 driver. Otherwise,
the custom chipselect function is never called. This breaks hardware,
where the three dedicated chipselect lines are used instead of generic
GPIO pins.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-05-01 13:17:41 +02:00
Christian Lamparter df07bafcd2 apm821xx: MBL: correct phy-mode delay settings
This came up in an upstream commit: "
b1dd9bf688b0 "net: phy: broadcom: Fix RGMII delays for BCM50160 and BCM50610M"

The PHY driver entry for BCM50160 and BCM50610M calls
bcm54xx_config_init() but does not call bcm54xx_config_clock_delay() in
order to configuration appropriate clock delays on the PHY, fix that."

So the "rgmii" phy-mode has always been wrong, but went unnoticed since
the broadcom phy driver didn't push the delay settings to the chip.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-05-01 12:25:12 +02:00
Daniel González Cabanelas 26a5aea9bc mvebu: LS421DE: improve pin configuration
The CLK125 output pin at the ethernet PHY is connected via capacitor to
GND and nowhere else. Disable it. Also tune the LED masks.

The MPP56 and MPP60 pins at the SoC are conected to the μPD720202 USB3.0
chip:
  - MPP56: wired to PCIe CLKREQ# (out)
  - MPP60: wired to PCIe RESET# (in)
Configure the pcie pinmux for these pins.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
2021-05-01 00:37:15 +02:00
Rui Salvaterra d7956c5728 netfilter: remove no-op kconfig symbols
These have long been obsolete. For reference, here's the Linux version where
each symbol has been dropped:

CONFIG_IP6_NF_QUEUE - 3.5
CONFIG_IP6_NF_TARGET_LOG - 3.4
CONFIG_IP_NF_MATCH_DSCP - 2.6.19
CONFIG_NF_CONNTRACK_IPV4 - 4.19
CONFIG_NF_CONNTRACK_IPV6 - 4.19
CONFIG_NF_CONNTRACK_RTCACHE - out-of-tree, superseded by flow offloading

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-05-01 00:37:15 +02:00
Chen Minqiang e219b7f38b kernel: add kmod-ipvlan support
This kmod is similar to macvlan with the difference being that the
endpoints have the same mac address.

It is useful on cloud where only one mac address allowed on port,
where macvlan not works but ipvlan would.

One use case is where multiple IPs and gateways assign on one net port

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2021-04-30 23:51:23 +02:00
Hauke Mehrtens 9ffa2f8193 kernel: Activate FORTIFY_SOURCE for MIPS kernel 5.4
CONFIG_FORTIFY_SOURCE=y is already set in the generic kernel
configuration, but it is not working for MIPS on kernel 5.4, support for
MIPS was only added with kernel 5.5, other architectures like aarch64
support FORTIFY_SOURCE already since some time.

This patch adds support for FORTIFY_SOURCE to MIPS with kernel 5.4,
kernel 5.10 already supports this and needs no changes.

This backports one patch from kernel 5.5 and one fix from 5.8 to make
fortify source also work on our kernel 5.4.

The changes are not compatible with the
306-mips_mem_functions_performance.patch patch which was also removed
with kernel 5.10, probably because of the same problems. I think it is
not needed anyway as the compiler should automatically optimize the
calls to memset(), memcpy() and memmove() even when not explicitly
telling the compiler to use the build in variant.

This increases the size of an uncompressed kernel by less than 1 KB.

Acked-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-04-30 23:51:19 +02:00
DENG Qingfang 20a924d2ae kernel: update mt7530 EEE patch from upstream
The new EEE patch is accepted upstream, so backport it and replace the
current one.

Cc: René van Dorst <opensource@vdorst.com>
Signed-off-by: DENG Qingfang <dqfext@gmail.com>
2021-04-30 23:48:37 +02:00
Ilya Lipnitskiy 0d6f207230 kernel: backport mtk_soc_eth fixes from v5.13
Fixes logic that leads to this error when booting mt7621 and other
devices that use the mediatek ethernet driver:
  [   23.144378] mtk_soc_eth 1e100000.ethernet: PPE table busy

The rest are mostly moved from pending-5.10 to backport-5.10 with a
couple of cleanups and improvements from upstream.

Refresh patches.

Links:
    https://git.kernel.org/netdev/net-next/c/c5d66587b890
    https://git.kernel.org/netdev/net-next/c/3f57d8c40fea
    https://git.kernel.org/netdev/net-next/c/5196c4178549
    https://git.kernel.org/netdev/net-next/c/787082ab9f7b
    https://git.kernel.org/netdev/net-next/c/c30c4a827390
    https://git.kernel.org/netdev/net-next/c/3630d519d7c3
    https://git.kernel.org/netdev/net-next/c/16ef670789b2
    https://git.kernel.org/netdev/net-next/c/59555a8d0dd3
    https://git.kernel.org/netdev/net-next/c/6b4423b258b9
    https://git.kernel.org/netdev/net-next/c/e9229ffd550b
    https://git.kernel.org/netdev/net-next/c/4e6bf609569c
    https://git.kernel.org/netdev/net-next/c/816ac3e6e67b
    https://git.kernel.org/netdev/net-next/c/16769a8923fa
    https://git.kernel.org/netdev/net-next/c/db2c7b353db3
    https://git.kernel.org/netdev/net-next/c/fa817272c37e
    https://git.kernel.org/netdev/net-next/c/3bc8e0aff23b

Fixes: f07fe36f22 ("kernel: update flow offload patches to upstream version")
Cc: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-04-30 23:48:37 +02:00
Mauri Sandberg 4b14b42abf kernel: Move an upstreamed patch under backports
This CFI patch was accepted upstream for 5.13. Move it away from under
ath79 and place under backports to be removed in due time.

Signed-off-by: Mauri Sandberg <sandberg@mailfence.com>
2021-04-30 23:48:37 +02:00
John Audia c03e98b130 kernel: bump 5.4 to 5.4.115
All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2021-04-30 23:48:37 +02:00
John Audia 0d2873df15 kernel: bump 5.4 to 5.4.114
Manually rebased*
  generic/backport-5.4/700-v5.5-net-core-allow-fast-GRO-for-skbs-with-Ethernet-heade.patch

Added new backport*
  generic/backport-5.4/050-gro-fix-napi_gro_frags-Fast-GRO-breakage-due-to-IP-a.patch

All others updated automatically.

The new backport was included based on this[1] upstream commit that will be
mainlined soon.  This change is needed because Eric Dumazet's check for
NET_IP_ALIGN (landed in 5.4.114) causes huge slowdowns on drivers which use
napi_gro_frags().

Build system: x86_64
Build-tested: ipq806x/R7800
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

*Credit to Alexander Lobakin
1. https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=7ad18ff6449cbd6beb26b53128ddf56d2685aa93

Signed-off-by: John Audia <graysky@archlinux.us>
2021-04-30 23:48:37 +02:00
Roger Pueyo Centelles 14a95b36b1 ath79: mikrotik: swap RB922UAGS-5HPaCD eth0/1 MACs
Since support for SFP on the MikroTik RouterBOARD 922UAGS-5HPacD was
added by 4387fe00cb, the MAC addresses for eth0 (Ethernet) and eth1
(SFP) were swapped. This patch fixes the 02_network script to assign MAC
addresses correctly, so they match the label and the vendor's OS.

Tested on a RouterBOARD 922UAGS-5HPacD board.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
2021-04-30 10:01:00 +02:00
Ilya Lipnitskiy 0e3c31c14c kernel: backport mtk_ppe busy-wait loop fix
Fixes logic that leads to this error when booting mt7621 and other
devices that use the mediatek ethernet driver:
  [   23.144378] mtk_soc_eth 1e100000.ethernet: PPE table busy

Link: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=c5d66587b8900201e1530b7c18d41e87bd5812f4
Fixes: f07fe36f22 ("kernel: update flow offload patches to upstream version")
Cc: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-04-29 11:28:43 +02:00
Roger Pueyo Centelles d1f1e5269e ipq40xx: add support for MikroTik SXTsq 5 ac
This commit adds support for the MikroTik SXTsq 5 ac (RBSXTsqG-5acD),
an outdoor 802.11ac wireless CPE with one 10/100/1000 Mbps Ethernet
port.

Specifications:
 - SoC: Qualcomm Atheros IPQ4018
 - RAM: 256 MB
 - Storage: 16 MB NOR
 - Wireless: IPQ4018 (SoC) 802.11a/n/ac 2x2:2, 16 dBi antennae
 - Ethernet: IPQ4018 (SoC) 1x 10/100/1000 port, 10-28 Vdc PoE in
 - 1x Ethernet LED (green)
 - 7x user-controllable LEDs
  · 1x power (blue)
  · 1x user (green)
  · 5x rssi (green)

Note:
 Serial UART is probably available on the board, but it has not been
 tested.

Flashing:
 Boot via TFTP the initramfs image. Then, upload a sysupgrade image
 via SSH and flash it normally. More info at the "Common procedures
 for MikroTik products" page https://openwrt.org/toh/mikrotik/common.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
2021-04-29 10:55:07 +02:00
Stijn Tintel f4473baf6e ath79: add missing kernel config symbol
Commit f724a583dc updated the nand-rb4xx driver to the 5.10 testing
kernel, but forgot to add the new kernel config symbol it introduces to
the 5.10 config.

Fixes: f724a583dc ("ath79: mikrotik: update nand-rb4xx driver")
Reported-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2021-04-25 13:18:35 +03:00
Daniel Golle 210916c9e6
mediatek: bpi-r64: fix sdcard.img.gz in ImageBuilder
Generating the sdcard.img.gz file requires the initramfs/recovery
image to be present. Use the newly introduced 'append-image-stage'
build command to fix the ImageBuilder for the BPi-R64.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-04-23 23:16:54 +01:00
Daniel Golle 95ac3f82c6
mediatek: mt7622: build AHCI driver as module
Build the driver for the in-SoC AHCI SATA host as module, just like for
the other subtargets. No board requires booting off SATA, so we don't
need to have it built-in. All boards with SATA support already select
kmod-ata-ahci-mtk which provides the module.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-04-23 23:15:32 +01:00
Rui Salvaterra 182eaa4916 kernel: bump 5.10 to 5.10.32
Deleted (reverse-appliable):
mediatek/patches-5.10/360-mtd-rawnand-mtk-Fix-WAITRDY-break-condition-and-time.patch

Automatically refreshed:
ath79/patches-5.10/0036-GPIO-add-named-gpio-exports.patch
generic/backport-5.10/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch
generic/backport-5.10/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch
generic/backport-5.10/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch
generic/backport-5.10/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch
generic/pending-5.10/600-netfilter_conntrack_flush.patch
generic/pending-5.10/613-netfilter_optional_tcp_window_check.patch
generic/pending-5.10/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
generic/pending-5.10/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch
lantiq/patches-5.10/0030-GPIO-add-named-gpio-exports.patch
ramips/patches-5.10/800-GPIO-add-named-gpio-exports.patch

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-04-22 15:13:56 +01:00
Rui Salvaterra 17576b1b2a kernel: drop the conntrack rtcache patch
It's in backports-5.4, but it wasn't ever merged. Upstream followed another
approach, with flow offloading, which has much better performance. Drop this
obsolete patch and refresh the kernel patches.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Acked-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Felix Fietkau <nbd@nbd.name>
2021-04-22 09:08:56 +01:00
Rui Salvaterra 3326b5e75c treewide: switch the timer frequency to 100 Hz
Some targets select HZ=100, others HZ=250. There's no reason to select a higher
timer frequency (and 100 Hz are available in every architecture), so change all
targets to 100 Hz.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-04-21 10:31:10 +01:00
Rui Salvaterra 27b5bae2ec treewide: remove redundant ubifs kconfig symbols
For the targets which enable ubifs, these symbols are already part of the
generic kconfigs. Drop them from the target kconfigs.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-04-21 10:31:07 +01:00
Rui Salvaterra be7b560278 kernel: enable lzo, zlib and zstd in ubifs
Make sure all compression algorithms are enabled, for the time being, in order
not to break sysupgrade. In the future, we'd like to disable all except zstd, as
it's the best all-around performer.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-04-21 10:31:07 +01:00
Rui Salvaterra c4d39c4d5f kernel: default to zstd compression in ubifs
Compared to both lzo and zlib, zstd is the best all-around performer. Backport
a kernel patch [1] (to both 5.4 and 5.10), in order to set it as default for
ubifs, if available.

[1] https://lore.kernel.org/linux-mtd/CAFLxGvwhtRY-6kT-sN=AgjvyssHb5qdTS6WQHkhKu3YrPuTkdw@mail.gmail.com/

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-04-21 10:31:07 +01:00
Rafał Miłecki 53546c3e94 bcm53xx: fix Luxul XWR-3150 LAN ports numbering
Port numbers were reverted.

Fixes: c459a6bf48 ("bcm53xx: add support for Luxul FullMAC WiFi devices")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-04-21 07:35:10 +02:00
Ilya Lipnitskiy b96db94fb7 kernel: move patch to backport after upstreaming
The patch is now in net-next so keep it in backport-5.10 to keep things
more organized.

Link: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=6ecaf81d4ac6365f9284f9d68d74f7c209e74f98
Cc: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-04-20 10:31:06 +01:00
Stijn Tintel 4dcdc8249c kernel/generic: add missing config symbol
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2021-04-19 19:34:38 +03:00
Linus Walleij f7e00d81bc gemini: Bump to kernel v5.10
Only two patches against mainline remains. Switch to v5.10
which works very nicely with all Gemini devices.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
[backported don't disable option CONFIG_BPF_SYSCAL]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-04-18 16:14:52 +02:00
Stijn Tintel de6080fa8e octeon: add 5.10 as testing kernel
Remove upstreamed parts from 100-ubnt_edgerouter2_support.patch.
Compile and runtime tested on Ubiquiti EdgeRouter Lite.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2021-04-18 17:00:30 +03:00
David Bauer 75c01ee2b9 ramips: fix at803x patch
This patch broke while refreshing on a kernel bump. It adds the
config_aneg function twice to the AR8035 PHY now.

Restore the old behavior to restore the patches original intent.

Fixes commit 57e32650ef ("kernel: bump 5.10 to 5.10.31")
Signed-off-by: David Bauer <mail@david-bauer.net>
2021-04-18 14:42:06 +02:00
David Bauer eb85ab9ab6 rockchip: use alternative CID path
Use an alternative path to access the CID of the SD card in MMC0, used
for the generation of MAC addresses. With Kernel 5.10, the device name
of the MMC controller changed, breaking MAC address generation.

The new path is compatible with Kernel 5.4 as well as Kernel 5.10.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-04-18 14:41:51 +02:00
David Bauer 4a5aece2e6 rockchip: add missing config symbols
Signed-off-by: David Bauer <mail@david-bauer.net>
2021-04-18 14:41:38 +02:00