openwrt/staging/dedeckeh.git
2 years agokernel: bump 5.4 to 5.4.117
John Audia [Fri, 7 May 2021 12:51:44 +0000 (08:51 -0400)]
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>
2 years agomediatek: reserve memory for ramoops and enable PSTORE
Daniel Golle [Fri, 7 May 2021 15:53:09 +0000 (16:53 +0100)]
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>
2 years agouboot-mediaktek: add support for PSTORE and check it on boot
Daniel Golle [Fri, 7 May 2021 15:47:26 +0000 (16:47 +0100)]
uboot-mediaktek: add support for PSTORE and check it on boot

Add support for pstore/ramoops now that DRAM content is preserved
over reboot on MT7622. On each boot, check pstore and boot to recovery
image in case there are records stored in it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agoarm-trusted-firmware-mediatek: update to git HEAD
Daniel Golle [Sat, 8 May 2021 21:34:16 +0000 (22:34 +0100)]
arm-trusted-firmware-mediatek: update to git HEAD

Most notably this enabled use of pstore/ramoops on MT7622 as DRAM
content is now preserved over reboot.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agoipq806x: ecw5410: case-insensitive qcom-smem partitions
Stefan Lippers-Hollmann [Thu, 6 May 2021 23:09:50 +0000 (01:09 +0200)]
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>
2 years agoipq806x: g10: case-insensitive qcom-smem partitions
Stefan Lippers-Hollmann [Thu, 6 May 2021 23:00:58 +0000 (01:00 +0200)]
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>
2 years agoipq806x: nbg6817: case-insensitive qcom-smem partitions
Stefan Lippers-Hollmann [Thu, 6 May 2021 22:44:03 +0000 (00:44 +0200)]
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>
2 years agoipq806x: dwmac: fix GMACs connected via SGMII fixed-link
Mark Mentovai [Sat, 8 May 2021 15:00:55 +0000 (11:00 -0400)]
ipq806x: dwmac: fix GMACs connected via SGMII fixed-link

fa731838c524 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: fa731838c524 ("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>
2 years agoExtend checks on build prerequisites for building OpenWRT core
Bas Mevissen [Mon, 19 Apr 2021 23:08:19 +0000 (01:08 +0200)]
Extend checks on build prerequisites for building OpenWRT core

OpenWRT requires a number of Perl modules to be installed. It wasn't checking on all of them.
This patch adds checks for Perl FindBin, File::Copy, File::Compare and Thread::Queue modules.

Failing to install these, will have the build break at some point. By adding these to the
prereq-build.mk script, they are checked on forehand.

Tested on a Fedora 33 and 34 (beta) that was freshly installed. Fedora appears to
break up Perl modules into small packages that need to be installed for the build to succeed.

Signed-off-by: Bas Mevissen <abuse@basmevissen.nl>
2 years agouqmi: fix network registration loop
Thomas Richard [Tue, 20 Apr 2021 14:49:02 +0000 (16:49 +0200)]
uqmi: fix network registration loop

With some debug in qmi.sh using following patch, some errors are visible
in the registration step
@@ -29,6 +29,7 @@ proto_qmi_init_config() {
 }

 proto_qmi_setup() {
+       set -x
        local interface="$1"
        local dataformat connstat plmn_mode mcc mnc
        local device apn auth username password pincode delay modes pdptype
@@ -224,6 +225,8 @@ proto_qmi_setup() {
                fi
        done

+       registration=$(uqmi -s -d "$device" --get-serving-system)
+
        [ -n "$modes" ] && uqmi -s -d "$device" --set-network-modes "$modes" > /dev/null 2>&1

        echo "Starting network $interface"

During the boot of the system, modem could not start automatically its
network registration.
netifd: wan (9235): + echo 'Waiting for network registration'
netifd: wan (9235): Waiting for network registration
netifd: wan (9235): + local 'registration_timeout=0'
netifd: wan (9235): + uqmi -s -d /dev/cdc-wdm1 --get-serving-system
netifd: wan (9235): + grep '"searching"'
netifd: wan (9235): + uqmi -s -d /dev/cdc-wdm1 --get-serving-system
netifd: wan (9235): + registration='{"registration":"not_registered","plmn_mcc":208,"plmn_mnc":20,"plmn_description":"","roaming":true}'
netifd: wan (9235): + '[' -n  ]
netifd: wan (9235): + echo 'Starting network wan'

As the while loop checks only "searching" pattern, uqmi.sh script quits
searching loop and continues whereas the modem is not registered

Other issue, after X seconds modem stops searching.
netifd: wan (9213): + uqmi -s -d /dev/cdc-wdm0 --get-serving-system
netifd: wan (9213): + grep '"searching"'
netifd: wan (9213): + '[' -e /dev/cdc-wdm0 ]
netifd: wan (9213): + '[' 3 -lt 0 -o 0 '=' 0 ]
netifd: wan (9213): + let registration_timeout++
netifd: wan (9213): + sleep 1
netifd: wan (9213): + uqmi -s -d /dev/cdc-wdm0 --get-serving-system
netifd: wan (9213): + grep '"searching"'
netifd: wan (9213): + uqmi -s -d /dev/cdc-wdm0 --get-serving-system
netifd: wan (9213): + registration='{"registration":"not_registered"}'
netifd: wan (9213): + '[' -n  ]
netifd: wan (9213): + echo 'Starting network wan'
netifd: wan (9213): Starting network wan

If registration_timeout is not expired, registration can be restarted

Signed-off-by: Thomas Richard <thomas.richard@kontron.com>
Tested-by: Florian Eckert <fe@dev.tdt.de>
2 years agoipq40xx: fix hard_config partition size on MikroTik hAP-ac2
Baptiste Jonglez [Mon, 3 May 2021 10:39:47 +0000 (12:39 +0200)]
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>
2 years agosdk: unset BINARY_FOLDER and DOWNLOAD_FOLDER in final archives
Sven Roederer [Fri, 7 May 2021 19:35:21 +0000 (21:35 +0200)]
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>
2 years agoimagebuilder: unset BINARY_FOLDER and DOWNLOAD_FOLDER in final archive
Sven Roederer [Fri, 7 May 2021 19:35:20 +0000 (21:35 +0200)]
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>
2 years agouboot-envtools: change size for unifi-6-lr
Daniel Golle [Thu, 29 Apr 2021 22:48:28 +0000 (23:48 +0100)]
uboot-envtools: change size for unifi-6-lr

The previous commit increased the U-Boot environment size of the
UniFi 6 LR to 0x4000. Also change it uboot-envtools accordingly.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agouboot-mediatek: unifi-6-lr: fix erase of production parition
Daniel Golle [Thu, 29 Apr 2021 01:06:09 +0000 (02:06 +0100)]
uboot-mediatek: unifi-6-lr: fix erase of production parition

mtd erase needs to be aligned with erase blocks. Use padded image size
for erasing the production volume.
As the environment grew above the current size of 0x1000 bytes by
introducing the new padding function, increase the env size to 0x4000.
While at it, clean up reset button function to work to more reliable on
that board.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agorealtek: Add support for Layer 2 Multicast
Birger Koblitz [Sat, 1 May 2021 18:39:59 +0000 (20:39 +0200)]
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>
2 years agorealtek: Setup all VLANs with default configurations
Birger Koblitz [Sat, 1 May 2021 14:36:32 +0000 (16:36 +0200)]
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>
2 years agorealtek: Add SoC-specific VLAN setup routine
Birger Koblitz [Sat, 1 May 2021 09:22:05 +0000 (11:22 +0200)]
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>
2 years agorealtek: Add support for clause45 PHYs
Birger Koblitz [Sat, 1 May 2021 07:18:48 +0000 (09:18 +0200)]
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>
2 years agorealtek: improve EEE support for RTL8380/8390/9300
Birger Koblitz [Sat, 1 May 2021 06:22:36 +0000 (08:22 +0200)]
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>
2 years agorealtek: Add L2 hash bucket size
Birger Koblitz [Sat, 1 May 2021 04:48:29 +0000 (06:48 +0200)]
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>
2 years agorealtek: remove unused FDB print routing
Birger Koblitz [Sat, 1 May 2021 04:31:30 +0000 (06:31 +0200)]
realtek: remove unused FDB print routing

remove fdb_dump debugging function

Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
2 years agorealtek: add IGMP/MLD snooping support
Birger Koblitz [Thu, 29 Apr 2021 20:59:55 +0000 (22:59 +0200)]
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>
2 years agorealtek: enable CRC offloading
Birger Koblitz [Thu, 29 Apr 2021 20:53:59 +0000 (22:53 +0200)]
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>
2 years agoipq806x: add missing wakeup-source for gpio keys
Ansuel Smith [Thu, 8 Apr 2021 13:09:32 +0000 (15:09 +0200)]
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>
2 years agoipq806x: apply correct voltage tolerance
Ansuel Smith [Tue, 23 Mar 2021 16:41:11 +0000 (17:41 +0100)]
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>
2 years agoipq806x: fix missing tx/rx fifo depth gmac configuration
Ansuel Smith [Thu, 8 Apr 2021 14:47:33 +0000 (16:47 +0200)]
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>
2 years agoipq806x: refresh 5.10 patches
Ansuel Smith [Wed, 3 Mar 2021 22:01:37 +0000 (23:01 +0100)]
ipq806x: refresh 5.10 patches

make target/linux/kernel refresh

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2 years agoipq806x: simplify ecw5410 dts
Ansuel Smith [Wed, 3 Mar 2021 10:46:52 +0000 (11:46 +0100)]
ipq806x: simplify ecw5410 dts

Simplify ecw5410 dts instead of redefine nodes.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2 years agoipq806x: set boot layout for nandc compatible
Ansuel Smith [Wed, 3 Mar 2021 23:52:45 +0000 (00:52 +0100)]
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>
2 years agoipq806x: add kernel 5.10 as testing kernel
Ansuel Smith [Mon, 1 Mar 2021 00:22:54 +0000 (01:22 +0100)]
ipq806x: add kernel 5.10 as testing kernel

Add kernel 5.10 as testing kernel

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2 years agoipq806x: refresh config 5.10
Ansuel Smith [Mon, 1 Mar 2021 01:04:11 +0000 (02:04 +0100)]
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>
2 years agoipq806x: refresh dtsi patches
Ansuel Smith [Sun, 28 Mar 2021 12:17:36 +0000 (14:17 +0200)]
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>
2 years agoipq806x: introduce nandc boot layout mode
Ansuel Smith [Mon, 1 Mar 2021 00:21:08 +0000 (01:21 +0100)]
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>
2 years agoipq806x: fix broken pci2 and pci3
Ansuel Smith [Mon, 1 Mar 2021 00:13:27 +0000 (01:13 +0100)]
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>
2 years agoipq806x: backport cpufreq changes to 5.4
Ansuel Smith [Thu, 8 Apr 2021 14:20:36 +0000 (16:20 +0200)]
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>
2 years agoipq806x: introduce dedicated krait cpufreq
Ansuel Smith [Mon, 1 Mar 2021 00:11:16 +0000 (01:11 +0100)]
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>
2 years agoipq806x: drop upstream patch
Ansuel Smith [Mon, 1 Mar 2021 00:10:03 +0000 (01:10 +0100)]
ipq806x: drop upstream patch

Drop upstream patch already included in the kernel 5.10

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2 years agoipq806x: drop cpuidle generic support from QCOM
Ansuel Smith [Mon, 1 Mar 2021 00:08:56 +0000 (01:08 +0100)]
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>
2 years agoipq806x: backport mtd adm and smem driver
Ansuel Smith [Mon, 1 Mar 2021 00:06:22 +0000 (01:06 +0100)]
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>
2 years agoipq806x: fix missing clk and reset
Ansuel Smith [Mon, 1 Mar 2021 00:03:55 +0000 (01:03 +0100)]
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>
2 years agoipq806x: use newer tsens patch
Ansuel Smith [Mon, 1 Mar 2021 00:02:09 +0000 (01:02 +0100)]
ipq806x: use newer tsens patch

Use improved tsens patch proposed upstream.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2 years agoipq806x: copy kernel 5.4 patches to 5.10
Ansuel Smith [Sun, 28 Feb 2021 23:58:57 +0000 (00:58 +0100)]
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>
2 years agoipq806x: improve system latency
Ansuel Smith [Sun, 28 Mar 2021 01:29:59 +0000 (03:29 +0200)]
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>
2 years agorealtek: add support for INABA Abaniact AML2-17GP
INAGAKI Hiroshi [Wed, 16 Sep 2020 05:11:05 +0000 (14:11 +0900)]
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>
2 years agorealtek: Add support for Netgear S350 series switches GS308T and GS310TP
Raylynn Knight [Wed, 5 May 2021 16:11:44 +0000 (12:11 -0400)]
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>
2 years agokernel: bump 5.4 to 5.4.116
John Audia [Sun, 2 May 2021 11:28:04 +0000 (07:28 -0400)]
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>
2 years agoipq806x: Add "snps,dwmac" to all gmac compatible=
Mark Mentovai [Mon, 12 Apr 2021 15:59:50 +0000 (11:59 -0400)]
ipq806x: Add "snps,dwmac" to all gmac compatible=

This was introduced to gmac2 and gmac3 in 57ea767a53c1 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

2 years agoipq806x: ubnt,unifi-ac-hd: reorder eth0 and eth1
Mark Mentovai [Mon, 12 Apr 2021 15:59:20 +0000 (11:59 -0400)]
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

2 years agoipq806x: ubnt,unifi-ac-hd: use on-board PHYs
Mark Mentovai [Mon, 12 Apr 2021 15:59:19 +0000 (11:59 -0400)]
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

2 years agoipq806x: dwmac: clear forced speed during probe
Mark Mentovai [Mon, 12 Apr 2021 15:59:18 +0000 (11:59 -0400)]
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

2 years agokernel: fix parsing fixed subpartitions
Rafał Miłecki [Thu, 6 May 2021 11:10:17 +0000 (13:10 +0200)]
kernel: fix parsing fixed subpartitions

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agotplink-safeloader: fix product_name of TP-Link AD7200
Alex Henrie [Tue, 4 May 2021 03:07:17 +0000 (21:07 -0600)]
tplink-safeloader: fix product_name of TP-Link AD7200

The stock firmware does not accept firmware with "Talon" in the name.

Tested on firmware version 1.0.10 Build 20160902 rel. 57400 which came
preinstalled, as well as latest firmware version 2.0.1 Build 20170103
rel.71053 flashed from
AD7200v1-up-ver2-0-1-P1[20170103-rel71053]_2017-01-04_10.08.28.bin.

Fixes: 1a775a4fd033 ("ipq806x: add support for TP-Link Talon AD7200")
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
[added details about vendor firmware]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2 years agoprocd: update to git HEAD
Daniel Golle [Wed, 5 May 2021 12:17:30 +0000 (13:17 +0100)]
procd: update to git HEAD

 021ece8 procd: Use /dev/console for serial console if exists

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agobase-files: upgrade: take down loop and LVM before upgrade
Daniel Golle [Sat, 1 May 2021 19:21:54 +0000 (20:21 +0100)]
base-files: upgrade: take down loop and LVM before upgrade

Users of devices with large block storage may choose to have an LVM
partition on the same device which is used for booting OpenWrt.
The presents a problem during sysupgrade as the root device is then
still busy and changing partitions will not work as desired,
leading to data corruption in case the newly flashed image is larger
than the currently installed one.
Having loop devices setup causes similar havoc.
Make sure all volume groups are offline and all loop devices have been
released before sysupgrade.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agodnsmasq: Update to version 2.85
Alan Swanson [Tue, 27 Apr 2021 15:24:05 +0000 (16:24 +0100)]
dnsmasq: Update to version 2.85

Fixes issue with merged DNS requests in 2.83/2.84 not being
retried on the firsts failed request causing lookup failures.

Also fixes the following security problem in dnsmasq:
* CVE-2021-3448:
  If specifiying the source address or interface to be used
  when contacting upstream name servers such as:
  server=8.8.8.8@1.2.3.4, server=8.8.8.8@1.2.3.4#66 and
  server=8.8.8.8@eth0 then all would use the same socket
  bound to the explicitly configured port. Now only
  server=8.8.8.8@1.2.3.4#66 will use the explicitly
  configured port and the others random source ports.

Remove upstreamed patches and update remaining patch.

Signed-off-by: Alan Swanson <reiver@improbability.net>
[refreshed old runtime support patch]
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2 years agoltq-dsl-base: Make package nonshared to fix image builder
Hauke Mehrtens [Sun, 2 May 2021 20:59:36 +0000 (22:59 +0200)]
ltq-dsl-base: Make package nonshared to fix image builder

This package depends on the lantiq target and is only build for that
target. A normal package would be build by the SDK builder probably
under a different target and then this package will not be selected.
Mark it as nonshared to build it when the lantiq target gets build.

Fixes: FS#3773, FS#3774
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agomac80211: Update to version 5.10.34-1
Hauke Mehrtens [Sun, 2 May 2021 16:45:40 +0000 (18:45 +0200)]
mac80211: Update to version 5.10.34-1

The removed patches were applied upstream and are not needed anymore.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agobusybox: backport fix for CVE-2021-28831
Hauke Mehrtens [Sun, 2 May 2021 15:42:19 +0000 (17:42 +0200)]
busybox: backport fix for CVE-2021-28831

This backports a fix for the low priority CVE-2021-28831:
  decompress_gunzip.c in BusyBox through 1.32.1 mishandles the error bit
  on the huft_build result pointer, with a resultant invalid free or
  segmentation fault, via malformed gzip data.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agoath79: Deactivate ZyXEL NBG6716 by default
Hauke Mehrtens [Sun, 2 May 2021 13:00:40 +0000 (15:00 +0200)]
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>
2 years agoiwinfo: update to latest Git HEAD
David Bauer [Sat, 1 May 2021 22:22:56 +0000 (00:22 +0200)]
iwinfo: update to latest Git HEAD

c45f0b5 iwinfo: add 802.11ax HE rate information

Signed-off-by: David Bauer <mail@david-bauer.net>
2 years agouboot-mediatek: bpi-r64: add TFTP update options to eMMC bootmenu
Daniel Golle [Sat, 1 May 2021 21:32:54 +0000 (22:32 +0100)]
uboot-mediatek: bpi-r64: add TFTP update options to eMMC bootmenu

Just like on SPI-NAND, also allow updating the bootloader comfortably
on eMMC installations.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agomediatek: bpi-r64: add eMMC bootloader artifacts
Daniel Golle [Sat, 1 May 2021 21:31:28 +0000 (22:31 +0100)]
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>
2 years agokernel: add missing kernel config option
Hauke Mehrtens [Sat, 1 May 2021 19:11:22 +0000 (21:11 +0200)]
kernel: add missing kernel config option

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agomediatek: Add missing config options
Hauke Mehrtens [Sat, 1 May 2021 20:00:15 +0000 (22:00 +0200)]
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: 58c5e2566482 ("mediatek: support non standard trx magic values")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agokernel: Reorder kernel configuration options
Hauke Mehrtens [Sat, 1 May 2021 19:58:26 +0000 (21:58 +0200)]
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>
2 years agokernel: partly revert: update mt7530 EEE patch from upstream
Hauke Mehrtens [Sat, 1 May 2021 19:49:23 +0000 (21:49 +0200)]
kernel: partly revert: update mt7530 EEE patch from upstream

This partly reverts commit 20a924d2ae378fe35b74f81be3b7f58366472e80.

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>
2 years agokernel: qlcnic: fix typo in module description
Chukun Pan [Sat, 1 May 2021 11:08:01 +0000 (19:08 +0800)]
kernel: qlcnic: fix typo in module description

Fixes: f88c64d28ccf ("kernel: netdev: add qlcnic")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2 years agoglibc: update to latest 2.33 HEAD (bug 27744)
Hans Dedecker [Wed, 28 Apr 2021 18:48:01 +0000 (20:48 +0200)]
glibc: update to latest 2.33 HEAD (bug 27744)

3f5080aedd nptl: Do not build nptl/tst-pthread-gdb-attach as PIE
36783141cf nptl: Check for compatible GDB in nptl/tst-pthread-gdb-attach
ea299b62e8 nptl_db: Support different libpthread/ld.so load orders (bug 27744)
162df872f0 x86: tst-cpu-features-supports.c: Update AMX check

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2 years agomediatek: correct address of ethernet PHY
David Bauer [Tue, 20 Apr 2021 01:14:10 +0000 (03:14 +0200)]
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>
2 years agoath79: drop cs-gpios property
David Bauer [Wed, 3 Mar 2021 09:23:00 +0000 (10:23 +0100)]
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>
2 years agoath79: set number of chipselect lines
David Bauer [Thu, 29 Apr 2021 12:07:40 +0000 (14:07 +0200)]
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>
2 years agoath79: add SPI_MASTER_GPIO_SS flag
David Bauer [Thu, 29 Apr 2021 12:07:01 +0000 (14:07 +0200)]
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>
2 years agoapm821xx: MBL: correct phy-mode delay settings
Christian Lamparter [Sat, 1 May 2021 09:36:10 +0000 (11:36 +0200)]
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>
2 years agokernel: qlcnic: add dependency to kmod-hwmon-core
Hauke Mehrtens [Sat, 1 May 2021 09:58:47 +0000 (11:58 +0200)]
kernel: qlcnic: add dependency to kmod-hwmon-core

QLCNIC_HWMON was activated when hwmon was set, but the dependency was
missing. This broke the build bot builds. Fix this by explicitly
activating HWMON support and adding a dependency.

Fixes: f88c64d28ccf ("kernel: netdev: add qlcnic")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agomac80211/rtl: backport a rtl8192cu AP mode fix
Rui Salvaterra [Wed, 21 Apr 2021 11:09:17 +0000 (12:09 +0100)]
mac80211/rtl: backport a rtl8192cu AP mode fix

Running USB devices in AP mode is never a good idea. That said, fix the TIM
issue in rtl8192cu [1], allowing these devices to "work" in AP mode.

[1] https://patchwork.kernel.org/project/linux-wireless/patch/20210419065956.6085-1-pkshih@realtek.com/

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2 years agotoolchain/binutils: add binutils 2.36.1
DENG Qingfang [Mon, 26 Apr 2021 04:13:51 +0000 (12:13 +0800)]
toolchain/binutils: add binutils 2.36.1

Add binutils version 2.36.1

Signed-off-by: DENG Qingfang <dqfext@gmail.com>
2 years agotoolchain/binutils: update to 2.35.2
DENG Qingfang [Mon, 26 Apr 2021 04:13:50 +0000 (12:13 +0800)]
toolchain/binutils: update to 2.35.2

Update binutils 2.35 to 2.35.2

Signed-off-by: DENG Qingfang <dqfext@gmail.com>
2 years agomvebu: LS421DE: improve pin configuration
Daniel González Cabanelas [Tue, 27 Apr 2021 08:58:15 +0000 (10:58 +0200)]
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>
2 years agonetfilter: remove no-op kconfig symbols
Rui Salvaterra [Wed, 28 Apr 2021 12:54:17 +0000 (13:54 +0100)]
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>
2 years agofeeds: management: remove dead and out of project feed
Sven Roederer [Sat, 17 Apr 2021 14:18:43 +0000 (16:18 +0200)]
feeds: management: remove dead and out of project feed

Remove management feed which has not been active since some years.

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
2 years agokernel: netdev: add qlcnic
Vieno Hakkerinen [Tue, 20 Apr 2021 13:37:44 +0000 (15:37 +0200)]
kernel: netdev: add qlcnic

Add driver for QLogic QLE8240 and QLE8242 Converged Ethernet devices.

Signed-off-by: Vieno Hakkerinen <vieno@hakkerinen.eu>
2 years agokernel: add kmod-ipvlan support
Chen Minqiang [Wed, 21 Apr 2021 05:27:42 +0000 (13:27 +0800)]
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>
2 years agouboot-envtools: add support for Buffalo WZR-HP-G300NH
Mauri Sandberg [Thu, 22 Apr 2021 07:52:41 +0000 (10:52 +0300)]
uboot-envtools: add support for Buffalo WZR-HP-G300NH

This adds an entries for wzr-hp-g300nh-rb and wzr-hp-g300nh-s.

Signed-off-by: Mauri Sandberg <sandberg@mailfence.com>
2 years agokernel: Activate FORTIFY_SOURCE for MIPS kernel 5.4
Hauke Mehrtens [Sat, 3 Apr 2021 18:02:54 +0000 (20:02 +0200)]
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>
2 years agokernel: update mt7530 EEE patch from upstream
DENG Qingfang [Thu, 22 Apr 2021 05:08:11 +0000 (13:08 +0800)]
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>
2 years agokernel: backport mtk_soc_eth fixes from v5.13
Ilya Lipnitskiy [Sat, 24 Apr 2021 00:19:22 +0000 (17:19 -0700)]
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: f07fe36f22fc ("kernel: update flow offload patches to upstream version")
Cc: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2 years agokernel: Move an upstreamed patch under backports
Mauri Sandberg [Fri, 16 Apr 2021 14:52:59 +0000 (17:52 +0300)]
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>
2 years agokernel: bump 5.4 to 5.4.115
John Audia [Wed, 28 Apr 2021 14:51:49 +0000 (10:51 -0400)]
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>
2 years agokernel: bump 5.4 to 5.4.114
John Audia [Tue, 27 Apr 2021 22:18:36 +0000 (18:18 -0400)]
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>
2 years agoath79: mikrotik: swap RB922UAGS-5HPaCD eth0/1 MACs
Roger Pueyo Centelles [Thu, 29 Apr 2021 09:38:16 +0000 (11:38 +0200)]
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>
2 years agokernel: bump 5.10 to 5.10.33
Rui Salvaterra [Wed, 28 Apr 2021 14:08:11 +0000 (15:08 +0100)]
kernel: bump 5.10 to 5.10.33

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2 years agokernel: backport mtk_ppe busy-wait loop fix
Ilya Lipnitskiy [Sat, 17 Apr 2021 22:33:39 +0000 (15:33 -0700)]
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: f07fe36f22fc ("kernel: update flow offload patches to upstream version")
Cc: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2 years agoipq40xx: add support for MikroTik SXTsq 5 ac
Roger Pueyo Centelles [Fri, 23 Oct 2020 14:05:28 +0000 (16:05 +0200)]
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>
2 years agouboot-mediatek: unifi6lr: mtd erase before write to flash
Chen Minqiang [Tue, 27 Apr 2021 03:54:34 +0000 (11:54 +0800)]
uboot-mediatek: unifi6lr: mtd erase before write to flash

Erase firmware ereas before writing to recovery or production partition
when updating them via the bootloader menu.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agoarm-trusted-firmware-mediatek: fix boot hang on unifi-6-lr
Daniel Golle [Wed, 28 Apr 2021 19:46:46 +0000 (20:46 +0100)]
arm-trusted-firmware-mediatek: fix boot hang on unifi-6-lr

The Ubiquiti Networks UniFi 6 LR access point comes with a total of
512 MB RAM provided by 2x 8-bit DDR3 SDRAM. This combination lead to
problems with the DDR calibration on boot resulting in occasional hang
on boot. Use updated calibration binary provided by MediaTek to make
boot on that device more reliable.
The binary has also been tested on the BananaPi BPi-R64 board and that
also works just fine with the new binary.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agomac80211: minstrel_ht: fix issue in calculating success probability
Felix Fietkau [Wed, 28 Apr 2021 19:06:36 +0000 (21:06 +0200)]
mac80211: minstrel_ht: fix issue in calculating success probability

Missing braces in a macro were leading to badly working rates sometimes
getting a success probabilty of 1.0

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agoiwinfo: update to latest Git HEAD
David Bauer [Mon, 12 Apr 2021 22:13:33 +0000 (00:13 +0200)]
iwinfo: update to latest Git HEAD

50b64a6 iwinfo: add basic IEEE 802.11ax support
70d2136 iwinfo: nl80211: perform split wiphy dump
cd23727 iwinfo: cli: fix hwmode formatting

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoath79: add missing kernel config symbol
Stijn Tintel [Sat, 24 Apr 2021 12:54:24 +0000 (15:54 +0300)]
ath79: add missing kernel config symbol

Commit f724a583dcf7 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: f724a583dcf7 ("ath79: mikrotik: update nand-rb4xx driver")
Reported-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
3 years agodnsmasq: add ignore hosts dir to dnsmasq init script
João Henriques [Sun, 18 Apr 2021 22:41:30 +0000 (23:41 +0100)]
dnsmasq: add ignore hosts dir to dnsmasq init script

When running multiple instances of dnsmasq, for example one being for the lan
and another for a guest network, it might not be desirable to have the same dns names
configured in both networks

Signed-off-by: João Henriques <joaoh88@gmail.com>