Commit Graph

430 Commits

Author SHA1 Message Date
Oskari Lemmela f0818706eb mediatek: mt7622-bananapi-bpi-r64-rootdisk rebase to upstream dts
simplify maintaining mt7622-bananapi-bpi-r64-rootdisk.dts by
storing only differences between upstream dts

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
2021-02-24 19:31:19 +00:00
Oskari Lemmela 7befce2bb1 mediatek: mt7622: fix bpi-r64 emmc f2fs overlay
f2fs tools are needed for generating f2fs overlay.
vfat modules are used for recovery mounting.

Fixes: f72a2b004c ("mediatek: add bpi-r64 emmc support")
Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
2021-02-24 19:31:19 +00:00
Oskari Lemmela ec2fca7c65 mediatek: mt7622: enable support for f2fs overlay
f2fs filesystem and loop device support are needed for f2fs
overlay over squashfs.

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
2021-02-24 19:31:19 +00:00
Oskari Lemmela 567a5f7739 mediatek: mt7622: add missing CONFIG_MMC_BLK
CONFIG_MMC_BLK enables block devices for SD/eMMC

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
2021-02-24 19:31:19 +00:00
Adrian Schmutzler 45e8d9b480 mediatek: fix SPDX license identifier on local DTS files
The SPDX license identifier must be in the first line of a file,
unless there is a shebang (then it's the second line).

Fix this for the local files, do not care about the upstream patches.

While at it, update the identifiers where necessary.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-19 13:47:45 +01:00
Daniel Golle c7293bcfcc
mediatek: move mt7623a-unielec-u7623*.dts* out of patch
Instead of adding those device tree sources using a patch, simply move
them to the newly created dts folder.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-02-19 10:00:46 +00:00
Daniel Golle e3b8849088
mediatek: more clean solution for out-of-tree DTS
Use approach suggested by Adrian Schmutzler instead of introducing
another device variable.
Also revert the unnecessary white-space changes accidentally introduced
by the previous commit.

Fixed: c067b1e79b ("mediatek: move out-of-tree DTS files to dedicated dts folder")
Suggested-by: Adrian Schmutzler <mail@adrianschmutzler.de>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-02-19 01:25:49 +00:00
Daniel Golle c067b1e79b
mediatek: move out-of-tree DTS files to dedicated dts folder
Use dedicated dts folder like on ramips to store device tree source
files for boards not already supported in vanilla Linux.
Doing so instead of having them in files-* has several advantages:
 * we don't need to duplicate them for several kernel versions
 * changes to a device tree don't trigger a complete kernel rebuild
 * the files are more obvious to find

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-02-19 00:05:53 +00:00
David Bauer 634c13c186 mediatek: add support for Ubiquiti UniFi 6 LR
Hardware
--------

MediaTek MT7622
512MB DDR3 RAM
64M SPI-NOR Flash (Winbond W25Q512JV)
MediaTek MT7622 802.11bgn 4T4R WMAC
MediaTek MT7915 802.11ax 4T4R
Marvell AQR1112 100/1000/2500 NBase-T PHY
Holtek HT32F52241 LED controller
Reset Switch

UART
----

CPU UART0 at the pinout next to the Holtek MCU.

Pinout (first pin next to SoC / MCU)

0 3V3
1 RX
2 TX
3 GND

Settings are 115200 8N1.

Opening the case
----------------

Opening the case is not a nice task, as itis glued together. Insert a
flat knife between the front and back casing below the ethernet port.
Open up a gap this way and insert a flat scredriver, remove the knife.

Work your way around the casing by applying force to seperate the front
and back casing. This losens the glue and opens the plastic clips. Be
gentle, as these clips are very cheap and break quickly.

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

1. Connect to the booted device at 192.168.1.20 using username/password
   "ubnt".

2. Transfer the OpenWrt sysupgrade image to the device using SCP.

3. Check the mtd partition number for bs / kernel0 / kernel1

   $ cat /proc/mtd

4. Set the bootselect flag to boot from kernel0

   $ dd if=/dev/zero bs=1 count=1 of=/dev/mtdblock6

5. Write the OpenWrt sysupgrade image to both kernel0 as well as kernel1

   $ dd if=openwrt.bin of=/dev/mtdblock8
   $ dd if=openwrt.bin of=/dev/mtdblock9

6. Reboot the device. It should boot into OpenWrt.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-02-18 01:15:45 +01:00
David Bauer c9137e2ddf mediatek: add Ubiquiti LED driver
Add a driver for controlling the RGB LED via Ubiquitis own "LEDBAR" LED
controller based on the Holtek HT32F52241 MCU.

This driver is initially used by the Ubiquiti UniFi 6 LR, however
judging from FCC pictures the MCU is also found on the U6-Mesh as well
as the U6-Extender.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-02-18 01:15:33 +01:00
Adrian Schmutzler 7157c77c6d target: use SPDX license identifiers on scripts
Use SPDX license tags to allow machines to check licenses.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-10 15:47:23 +01:00
Adrian Schmutzler 598b29585e target: use SPDX license identifiers on Makefiles
Use SPDX license tags to allow machines to check licenses.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-10 15:47:18 +01:00
John Audia f3b827a965 kernel: bump 5.4 to 5.4.96
Ran update_kernel.sh in a fresh clone without any existing toolchains.

Build system: x86_64
Build-tested: ipq806x/R7800, bcm27xx/bcm2711
Run-tested: ipq806x/R7800
Run-tested [*]: ramips/mt7621 (R6800, DIR-878 A1, EAP235-Wall)

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Stijn Segers <foss@volatilesystems.org> [*]
2021-02-08 16:34:18 +01:00
Adrian Schmutzler 331892f85f treewide: drop shebang from non-executable lib files
This drops the shebang from another bunch of files in various /lib
folders, as these are sourced and the shebang is useless.

Fix execute bit in one case, too.

This should cover almost all trivial cases now, i.e. where /lib is
actually used for library files.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-29 14:29:41 +01:00
Adrian Schmutzler 44f2d71edd mediatek: remove generic profiles
We have support for reference boards available on this target, so
support for an additional generic profile does not make much sense.

Remove it to have one thing less to maintain.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Paul Spooren <mail@aparcar.org>
2021-01-27 21:31:20 +01:00
John Audia 9ad912d159 kernel: bump 5.4 to 5.4.92
All modification made by update_kernel.sh in a fresh clone without
existing toolchains.

Build system:       x86_64
Build-tested:       ipq806x/R7800, bcm27xx/bcm2711
Run-tested:         ipq806x/R7800
Compile-tested [*]: ath79/{tiny,generic}, ipq40xx, octeon,
                    ramips/mt7621, realtek, x86/64.
Run-tested [*]:     ath79/generic, octeon, ramips/mt7621, realtek.

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Stijn Segers <foss@volatilesystems.org> [*]
2021-01-26 00:49:53 +01:00
Tony Ambardar 0faa172356 config: limit CONFIG_PERF_EVENTS to top-level generic configs
Remove redundant target-level settings.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2021-01-25 14:37:41 +01:00
Adrian Schmutzler f52081bcf9 treewide: provide global default for SUPPORTED_DEVICES
The majority of our targets provide a default value for the variable
SUPPORTED_DEVICES, which is used in images to check against the
compatible on a running device:

  SUPPORTED_DEVICES := $(subst _,$(comma),$(1))

At the moment, this is implemented in the Device/Default block of
the individual targets or even subtargets. However, since we
standardized device names and compatible in the recent past, almost
all targets are following the same scheme now:

  device/image name:  vendor_model
  compatible:         vendor,model

The equal redundant definitions are a symptom of this process.

Consequently, this patch moves the definition to image.mk making it
a global default. For the few targets not using the scheme above,
SUPPORTED_DEVICES will be defined to a different value in
Device/Default anyway, overwriting the default. In other words:
This change is supposed to be cosmetic.

This can be used as a global measure to get the current compatible
with: $(firstword $(SUPPORTED_DEVICES))
(Though this is not precisely an achievement of this commit.)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-23 12:45:21 +01:00
John Audia 38bdff29aa kernel: bump 5.4 to 5.4.90
All modification made by update_kernel.sh in a fresh clone without
existing toolchains.

Build system: x86_64
Build-tested: ipq806x/R7800, bcm27xx/bcm2711
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Curtis Deptuck <curtdept@me.com> [x86/64]
2021-01-19 15:39:36 +01:00
John Audia 945a704fab kernel: bump 5.4 to 5.4.89
All modification made by update_kernel.sh in a fresh clone without
existing toolchains.

Build system: x86_64
Build-tested: ipq806x/R7800, bcm27xx/bcm2711
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Curtis Deptuck <curtdept@me.com> [x86/64]
2021-01-15 17:29:41 +01:00
Sungbo Eo 2eb336b79d mediatek: remove unnecessary execute permission bit
Kernel config does not need to be executable. 644 is enough.

Fixes: 25d9df670b ("mediatek: add v5.4 support")
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[split by targets]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-03 15:48:25 +01:00
Adrian Schmutzler 9b1b89229f kernel: bump 5.4 to 5.4.86
Removed upstreamed patches:
  pending-5.4/499-mtd-parser-cmdline-Fix-parsing-of-part-names-with-co.patch

Manually merged:
  pending-5.4/611-netfilter_match_bypass_default_table.patch
  layerscape/302-dts-0112-arm64-dts-fsl-ls1028a-prepare-dts-for-overlay.patch

Build-tested: ipq806x/R7800, bcm27xx/bcm2711, ath79/{generic,tiny},
              ipq40xx, octeon, ramips/mt7621, realtek, x86/64
Run-tested: ipq806x/R7800, realtek

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: John Audia <graysky@archlinux.us>
Tested-by: Stijn Segers <foss@volatilesystems.org>
2021-01-01 17:07:28 +01:00
Aleksander Jan Bajkowski 77575d4c02 kernel: move some disabled symbols to generic
Move some disabled config options found in lantiq target to generic.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2020-12-22 19:11:50 +01:00
John Audia a282a04538 kernel: bump 5.4 to 5.4.85
All modifications made by update_kernel.sh run in a fresh clone
without any existing toolchains.

Build system: x86_64
Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2020-12-22 19:11:50 +01:00
Felix Fietkau 6244b0b6c9 kernel: improve skb hash on the mtk ethernet driver
The PPE only provides a 14 bit hash, however many uses of the skb hash
expect the hash to use the full 32 bit range.
Use jhash to extend the hash to the full size

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-12-18 18:10:52 +01:00
John Audia 3f165fa7cc kernel: bump 5.4 to 5.4.82
Removed since included upstream and could be reverse-applied by quilt:
  backport-5.4/315-v5.10-usbnet-ipeth-fix-connectivity-with-ios-14.patch

Remaining modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Curtis Deptuck <curtdept@me.com> [build/run x86_64]
2020-12-09 17:05:40 +01:00
John Audia 4e39949dd1 kernel: bump 5.4 to 5.4.80
Removed since could be reverse-applied by quilt and found to be
included upstream:
  backport-5.4/789-net-usb-qmi_wwan-Set-DTR-quirk-for-MR400.patch

All modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x/R7800, bcm27xx/bcm2711, ath79/generic
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Curtis Deptuck <curtdept@me.com> [x86_64 build/run]
2020-11-26 11:17:55 +01:00
John Audia 667f6c7f49 kernel: bump 5.4 to 5.4.77
Manually rebased patches:
 bcm27xx/patches-5.4/950-0135-spi-spi-bcm2835-Disable-forced-software-CS.patch
 generic-backport/744-v5.5-net-sfp-soft-status-and-control-support.patch
 layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch
 mvebu/patches-5.4/521-arm64-dts-marvell-espressobin-Add-ethernet-switch-al.patch

Removed:
 layerscape/patches-5.4/819-uart-0012-tty-serial-lpuart-add-LS1028A-support.patch

All modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711,
              lantiq/Easybox 904 xDSL, x86_64
Run-tested: ipq806x/R7800, lantiq/Easybox 904 xDSL, x86_64

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
Co-developed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-11-18 21:13:46 +01:00
Adrian Schmutzler 7661b83768 mediatek: fix mixed indent in DTS files
mediatek frequently had mixed indent (tabs vs. spaces) in DTS files
and DTS file kernel patches (probably due to careless copy/paste).

The harmonizes these cases to tabs-only, as usual for DTS(I).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-11-16 13:43:39 +01:00
Adrian Schmutzler 2658008a2a treewide: remove default-state off for LEDs
default-state = "off" is default for LEDs, no need to specify it
explicitly.

https://www.kernel.org/doc/Documentation/devicetree/bindings/leds/common.yaml

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-11-16 13:43:39 +01:00
John Audia a47279154e kernel: bump 5.4 to 5.4.75
Manually rebased patches:
  bcm27xx:
    patches-5.4/950-0267-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch
  bcm53xx:
    patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
  layerscape:
    patches-5.4/802-can-0025-can-flexcan-add-LPSR-mode-support-for-i.MX7D.patch
    patches-5.4/808-i2c-0002-MLK-10893-i2c-imx-add-irqf_no_suspend.patch
    patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch

Removed since could be reverse-applied by quilt:
  mediatek:
    patches-5.4/0700-arm-dts-mt7623-add-missing-pause-for-switchport.patch

All modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711, x86_64
Run-tested: ipq806x/R7800, x86_64

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Curtis Deptuck <curtdept@me.com> [x86_64]

Rebase of 802-can-0025-can-flexcan-add-LPSR-mode-support-for-i.MX7D.patch
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2020-11-10 13:11:32 +01:00
John Audia b4c02c9998 kernel: bump 5.4 to 5.4.73
Removed upstreamed patches:
 generic/pending-5.4
   445-mtd-spinand-gigadevice-Only-one-dummy-byte-in-QUA.patch
   446-mtd-spinand-gigadevice-Add-QE-Bit.patch
 pistachio/patches-5.4
   150-pwm-img-Fix-null-pointer-access-in-probe.patch

Manually rebased:
 layerscape/patches-5.4
   801-audio-0011-Revert-ASoC-fsl_sai-add-of_match-data.patch
   801-audio-0039-MLK-16224-6-ASoC-fsl_sai-fix-DSD-suspend-resume.patch
   801-audio-0073-MLK-21957-3-ASoC-fsl_sai-add-bitcount-and-timestamp-.patch
   820-usb-0009-usb-dwc3-Add-workaround-for-host-mode-VBUS-glitch-wh.patch

All modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711,
              mvebu (mamba, rango), x86_64, ramips/mt7621
Run-tested: ipq806x/R7800, mvebu (mamba, rango), x86_64, ramips (RT-AC57U)

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[alter 820-usb-0009-usb-dwc3-Add-workaround-for-host-mode-VBUS-glitch-wh]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-11-01 14:44:06 +01:00
Adrian Schmutzler 2785126650 kernel: remove support for kernel 4.19
We use 5.4 on all targets by default, and 4.19 has never been released
in a stable version. There is no reason to keep it.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-10-30 19:29:59 +01:00
John Audia dd20ba98e7 kernel: bump 5.4 to 5.4.72
All modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2020-10-20 03:01:27 +02:00
Felix Fietkau b59d5c8f0e mediatek: rewrite flow offload code
The code is now much cleaner and works better than the old code.
Preparation for submitting it upstream (though with a different API)
Also add back MT7621 support and fix flow table coherence issues on
MT7622

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-10-16 21:37:39 +02:00
John Audia 0efec6a008 kernel: bump 5.4 to 5.4.71
All modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711,
              lantiq/Easybox 904 xDSL
Run-tested:   ipq806x/R7800, lantiq/Easybox 904 xDSL

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[add lantiq test reports]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-10-15 17:46:54 +02:00
Hauke Mehrtens 722906d144 kernel: move CONFIG_F2FS_CHECK_FS to generic kernel config
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-10-11 16:38:16 +02:00
Hauke Mehrtens 6542615e41 kernel: Move CONFIG_F2FS_FS_SECURITY to generic kernel config
Move the CONFIG_F2FS_FS_SECURITY kernel configuration option to the
generic kernel configuration.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-10-11 16:38:16 +02:00
Hauke Mehrtens 18deed29be kernel: Remove 2FS_FS_XATTR and F2FS_STAT_FS symbols from target configs
This config option was moved to the generic kernel configuration.

Fixes: ab1bd57656 ("kernel: move F2FS_FS_XATTR and F2FS_STAT_FS symbols to generic")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-10-11 16:38:16 +02:00
Paul Spooren 0f5b5cf730 kernel: clean up XATTR config symbols
Extended attributes are required for overlayfs and have hence been long
ago enabled for jffs2, but should be enabled unconditionally for all
other filesystems which may potentially serve as overlayfs' upper
directory. Previously it was inconsistently added in multiple targets.
Add symbols to generic kernel config and remove all *_XATTR symbols
from target configs.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[keep things as they are for squashfs, improve commit message]
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2020-10-09 01:49:22 +01:00
John Audia d6a9a92e32 kernel: bump 5.4 to 5.4.69
Seemingly unneeded based on new upstream code so manually deleted:
 layerscape:
  820-usb-0007-usb-dwc3-gadget-increase-timeout-value-for-send-ep-c.patch

Manually merged:
 generic-hack:
  251-sound_kconfig.patch

All other modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711
Run-tested: ipq806x/R7800, lantiq/Easybox 904 xDSL

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[add lantiq test report, minor commit message clarification]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-10-02 22:02:26 +02:00
John Audia 3ea1b5b745 kernel: bump 5.4 to 5.4.67
All modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x, lantiq/xrx200 and ath79/generic
Run-tested: ipq806x (R7800), lantiq (Easybox 904 xDSL)

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[add test on lantiq]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-24 18:53:23 +02:00
Adrian Schmutzler 0cfdc7d446 target: update SPDX license names
SPDX moved from GPL-2.0 to GPL-2.0-only and from GPL-2.0+ to
GPL-2.0-or-later. Reflect that in the SPDX license headers.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-22 20:58:26 +02:00
Chuanhong Guo 006cd489f0 mediatek: mt7622: select bluetooth module instead of firmware
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2020-09-22 21:13:54 +08:00
Chuanhong Guo 20f2bd044a mediatek: build btmtkuart as a kernel module
bluetooth on mt7622 needs a firmware to start. It can't be built-in or
it tries to load firmware before rootfs is mounted, and then fails.
build it as a kernel module to fix that.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2020-09-22 21:07:50 +08:00
David Woodhouse 7190fb2da4 mediatek: mt7623: use bash for generating bootable images
It turns out that 'echo -e' isn't portable; it doesn't work in the dash
builtin echo and Ubuntu users are complaining.

I can't even get octal (specified by POSIX) to work consistently because
those  variants of 'echo' which *do* support -e don't seem to interpret
octalwithout it.

I could switch to /bin/echo but using -e with that isn't actually
portable *either* even though it works today.

For now just stick with bash, and use its builtin. We may end up using
something else entirely; perhaps perl.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2020-09-19 13:39:29 +01:00
David Woodhouse d10b738c4b mediatek: fix missing pause on switch port for Banana Pi R2
This causes rx drops when running iperf.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2020-09-19 13:39:29 +01:00
John Audia 770a9c6787 kernel: bump 5.4 to 5.4.66
All modifications made by update_kernel.sh/no manual intervention needed

Run-tested: ipq806x (R7800), ath79 (Archer C7v5), x86/64

No dmesg regressions, everything appears functional

Signed-off-by: John Audia <graysky@archlinux.us>
[add run test from PR]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-19 12:41:29 +02:00
Felix Fietkau 4fb58813f9 mediatek: fix hardware flow offload
Add support for dealing with DSA ports

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-17 21:08:32 +02:00
Felix Fietkau f0cc5f6c0a ramips/mediatek: improve GRO performance, fix PPE packet parsing
Backport upstream changes to initialize GDM settings and reset PPE
Allow GMAC to recognize the special tag to fix PPE packet parsing
Improve GRO performance by passing PPE L4 hash as skb hash

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-13 11:14:32 +02:00
John Audia bee76f1bfa kernel: bump 5.4 to 5.4.64
Remove upstreamed patches:
 generic-backport
  701-v5.5-net-core-use-listified-Rx-for-GRO_NORMAL-in-napi_gro.patch

Manually merged:
 mediatek/patches-5.4
  0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch

All other modifications made by update_kernel.sh

Build-tested: ipq806x, lantiq/xrx200, mvebu, x86/64
Run-tested: ipq806x (R7800), mvebu (mamba, rango),
  lantiq/xrx200 (Easybox 904 xDSL), x86/64

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[add community build/run tests to commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-12 01:28:50 +02:00
Felix Fietkau 668c988fc5 mediatek/ramips: remove an ethernet optimization patch that was reported to cause a regression
In some tests, crashes were observed

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-09 11:51:47 +02:00
Felix Fietkau c18a872825 mediatek: backport the latest version of the mt7531 support patches
Fixes unknown unicast flooding issue

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-09 11:51:47 +02:00
John Audia 2c2fcbd2e0 kernel: bump 5.4 to 5.4.63
Manually merged:
 hack-5.4
  230-openwrt_lzma_options.patch
 bcm27xx
  950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch
 x86
  011-tune_lzma_options.patch

Remove upstreamed patches in collaboration with Ansuel Smith:
 ipq806x
  093-1-v5.8-ipq806x-PCI-qcom-Add-missing-ipq806x-clocks-in-PCIe-driver.patch
  093-2-v5.8-ipq806x-PCI-qcom-Change-duplicate-PCI-reset-to-phy-reset.patch
  093-3-v5.8-ipq806x-PCI-qcom-Add-missing-reset-for-ipq806x.patch

All other modifications made by update_kernel.sh

Build-tested: bcm27xx/bcm2708, ipq806x, x86/64
Run-tested: ipq806x (R7800), x86/64

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[update commit message/tested]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-06 19:55:19 +02:00
Felix Fietkau 21ab979c70 mediatek/mt7622: adjust kernel cpu features to match the hardware
Disable unnecessary errata/features
Enable potentially needed ones

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-06 15:35:57 +02:00
Felix Fietkau 920d975cab mediatek: enable coherent DMA for ethernet and PCI
Improves performance by eliminating the need for extra cache flushes

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-04 19:42:35 +02:00
Felix Fietkau 44fe9e6f84 mediatek: fix an irq handling issue
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-04 19:42:35 +02:00
Felix Fietkau 7081b1704e mediatek/ramips: add patch to avoid unnecessary rearming of interrupts
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-04 19:42:35 +02:00
Felix Fietkau 1fe914d9b4 mediatek: disable packet steering by default
mt76 now spreads the load over multiple CPUs more smoothly, processing
ethernet packets should be faster running on one core

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-04 19:42:35 +02:00
Felix Fietkau a38b6efbc1 mediatek: enable kernel PCIe ASPM support, refresh kernel config
Improves performance on PCIe devices

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-04 12:42:46 +02:00
Felix Fietkau b5d425af23 mediatek/ramips: unify ethernet driver fixes and add performance optimizations
Increase DMA burst size and tx ring size and optimize tx processing

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-01 17:01:56 +02:00
John Crispin 4841ac042e mediatek: pull in some fixes fromt he latest SDK
Signed-off-by: John Crispin <john@phrozen.org>
2020-09-01 09:09:13 +02:00
John Audia 05b8e84362 kernel: bump 5.4 to 5.4.61
Manually merged:
  backport-5.4
     011-kbuild-export-SUBARCH.patch
  layerscape
    701-net-0262-net-dsa-ocelot-add-tagger-for-Ocelot-Felix-switches.patch

All other modifications made by update_kernel.sh

Build-tested: x86/64, lantiq/xrx200, ramips/mt7621
Run-tested: ipq806x (R7800), lantiq/xrx200, x86/64, ramips (RT-AC57U)

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[minor commit message adjustments]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-30 19:44:47 +02:00
Petr Štetiar a14f5bb4bd treewide: use wpad-basic-wolfssl as default
In order to support SAE/WPA3-Personal in default images. Replace almost
all occurencies of wpad-basic and wpad-mini with wpad-basic-wolfssl for
consistency. Keep out ar71xx from the list as it won't be in the next
release and would only make backports harder.

Build-tested (build-bot settings):
ath79: generic, ramips: mt7620/mt76x8/rt305x, lantiq: xrx200/xway,
sunxi: a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
[rebase, extend commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-20 14:19:39 +02:00
John Audia da98603597 kernel: bump 5.4 to 5.4.58
This PR is a blend of several kernel bumps authored by ldir taken from his
staging tree w/ some further adjustments made by me and update_kernel.sh

Summary:
Deleted upstreamed patches:
  generic:
    742-v5.5-net-sfp-add-support-for-module-quirks.patch
    743-v5.5-net-sfp-add-some-quirks-for-GPON-modules.patch
  bcm63xx:
    022-v5.8-mtd-rawnand-brcmnand-correctly-verify-erased-pages.patch
    024-v5.8-mtd-rawnand-brcmnand-fix-CS0-layout.patch
  mediatek:
    0402-net-ethernet-mtk_eth_soc-Always-call-mtk_gmac0_rgmii.patch

Deleted patches applied differently upstream:
  generic:
    641-sch_cake-fix-IP-protocol-handling-in-the-presence-of.patch

Manually merged patches:
  generic:
    395-v5.8-net-sch_cake-Take-advantage-of-skb-hash-where-appropriate.patch
  bcm27xx:
    950-0132-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch
  layerscape:
    701-net-0231-enetc-Use-DT-protocol-information-to-set-up-the-port.patch

Build system: x86_64
Build-tested: ath79/generic, bcm27xx/bcm2708, bcm27xx/bcm2711,
  imx6, mvebu/cortexa9, sunxi/a53
Run-tested: Netgear R7800 (ipq806x)

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-By: Lucian Cristian <Lucian.cristian@gmail.com> [mvebu]
Tested-By: Curtis Deptuck <curtdept@me.com> [x86/64]
[do not remove 395-v5.8-net-sch_cake-Take-advantage-... patch,
adjust and refresh patches, adjust commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-By: John Audia <graysky@archlinux.us> [ipq806x]
2020-08-18 18:14:54 +02:00
Felix Fietkau ed19ba04e8 mediatek: disable btif in device tree to make the WMAC work again
btif and wmac access the same resources and at the moment enabling one
breaks the other

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-08-12 13:02:13 +02:00
Felix Fietkau 74a66c0204 mediatek: fix PCI device tree node for elecom wrc-2533gent
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-08-12 13:02:13 +02:00
Hauke Mehrtens b35c54227b kernel: Move CONFIG_IONIC to generic kernel config
It is deactivated everywhere, just set this in the generic config.

Acked-by: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-08-10 23:58:58 +02:00
Felix Fietkau 431b177afa mediatek: fix mt7622-rfb1 board support
Make GPIO keys active-low.
Add DSA support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-08-06 12:42:43 +02:00
Felix Fietkau b0f7ea2853 kernel: unify CONFIG_GPIO_SYSFS in kernel configs
Enable it for all platforms

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-08-06 12:37:04 +02:00
Adrian Schmutzler 356866c481 target: replace remaining occurrences of ifconfig with ip
ifconfig is effectively deprecated for quite some time now. Let's
replace the remaining occurrences for our target setup by the
corresponding ip commands now.

Note that this does not touch ar71xx, as it will be dropped anyway,
and changing it would only make backports harder.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-03 10:42:04 +02:00
David Woodhouse b36422b914 mediatek: mt7623: add full system image for UniElec U7623
This adds a full eMMC image including U-Boot, which means that the
kernel can inherit the true RAM size detected by the preloader.

As implemented in previous commits, sysupgrade to this image from
the legacy layout (and via that, from the vendor-installed image)
is supported.

Rename the legacy image for the 512MiB board, for clarity.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2020-07-26 17:08:31 +08:00
David Woodhouse 1113dcab05 mediatek: mt7623: rename gen_banana_pi_img.sh → gen_mtk_mmc_img.sh
As I buy more hardware and continue to work on consolidation, This will
apply to a lot of MediaTek platforms; rename it accordingly.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2020-07-26 17:08:21 +08:00
David Woodhouse f5cebbe2e4 mediatek: mt7623: make gen_banana_pi_img.sh more generic
This actually covers fairly much all the MediaTek platforms; they
only have different images because they don't include the preloader
and U-Boot, and rely on preinstalled stuff from the vendor.

So this script can slowly take over the world as we complete the
support for various other platforms, starting with UniElec U7623…

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2020-07-26 17:08:21 +08:00
David Woodhouse 5787684cb4 mediatek: mt7623: add scatter file for unbricking with SP Flash Tool
Many MediaTek SoCs can be unbricked by using the SP Flash Tool from
http://spflashtool.com/ along with a "scatter list" file, which is
just a text file listing which image gets loaded where.

We use a trivial partition layout for the tool, with the whole eMMC
image as a single "partition", which means users just need to unzip
the sysupgrade image. Doing the real partition layout would be overly
complex and would require the individual partitions to be shipped
as artifacts — or users to extract them out of the sysupgrade image
just for the tool to put them adjacent to each other on the eMMC
anyway.

The tool does require a copy of the preloader in order to operate,
even when it isn't flashing the preloader to the eMMC boot region.
So drop that into the bin directory as an artifact too.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2020-07-26 17:07:52 +08:00
Chuanhong Guo 65fc47cac5 mediatek: mt7623: build lzma fit for bpi-r2
bpi-r2 images are shipped with mainline u-boot which can extract lzma
with no problem.
remove custom kernel recipe to build lzma fit image instead of
uncompressed fit with zboot.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2020-07-26 17:04:49 +08:00
David Woodhouse 29fa5526a2 mediatek: mt7623: prepare for full sysupgrade support on UniElec U7623
An upcoming commit will add a full system image for U7623 which will
contain the MBR partition table and U-Boot too.

That contrasts with the current image which only owns the eMMC from
sector 0xa00 onwards, and must start with a legacy uImage.

Prepare for sysupgrade to the new images, and cope with the fact that
the recovery partition will be /dev/mmcblk0p2 instead of /dev/mmcblk0p1
after the upgrade.

This commit could potentially be backported to 19.07 to allow for direct
sysupgrade to the new image layout.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2020-07-26 16:42:36 +08:00
David Woodhouse 7a1eaa446b mediatek: mt7623: increase flexibility of finding recovery partition
I'm about to change the layout of the images for UniElec U7623 so make it
find the recovery partition based on which the root partition is too.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2020-07-26 16:42:36 +08:00
David Woodhouse ff8cc137fb mediatek: mt7623: fix Ethernet setup for TRGMII mode
This fixes the TX performance issues seen on MT7623 boards.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2020-07-26 16:42:36 +08:00
David Woodhouse be3c8f8b2b mediatek: fix Ethernet support on UniElec U7623
The definition of the switch in the device-tree was not correct. Make it
look more like the Banana Pi R2, which works.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2020-07-26 16:42:35 +08:00
David Woodhouse 6eb63019af mediatek: mt7623: fix sysupgrade from vendor OpenWrt on UniElec U7623
This board ships with an ancient 14.07-based OpenWrt using block2mtd, and
the MBR partition table contains nonsense.

It is possible to sysupgrade to an upstream OpenWrt image, but the
legacy layout of the OpenWrt images start at 0xA00 in the eMMC, with
a raw uImage. The legacy OpenWrt image doesn't "own" the beginning
of the device, including the MBR and U-Boot.

This means that when a user upgrades to upstream OpenWrt, it doesn't
boot because it can't find the right partitions. So hard-code them on
the kernel's command line using CONFIG_CMDLINE_PARTITION (for block).

Additionally, the vendor firmware doesn't cope with images larger than
about 36MiB, because it only overwrites the contents of its "firmware"
MTD partition. The current layout of the legacy image wastes a lot of
space, allowing over 32MiB for the kernel and another 10MiB for the FAT
recovery file system which is only created as 3MiB. So pull those in
to allow 4¾ MiB for the kernel, 3MiB for recovery, and then we have over
20MiB for the root file system.

This doesn't affect the new images which ship with a full eMMC image
including a different MBR layout and a partition for U-Boot, because
our modern U-Boot can actually pass the command line to the kernel, and
the built-in one doesn't get used anyway.

Tested by upgrading from vendor OpenWrt to the current legacy image,
from legacy to itself, to the previous legacy layout, and then to
finally the full-system image.

This commit probably wants backporting to 19.07, which also doesn't
install over the vendor OpenWrt and doesn't even have a full-system
installation option.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2020-07-26 16:42:35 +08:00
David Woodhouse ea9ef8c945 mediatek: mt7623: add explicit console= to U7623 kernel
The bootloader for legacy builds can't set it, so we end up unable to
log in on the serial port.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2020-07-26 16:42:35 +08:00
Adrian Schmutzler 739d282c2f mediatek: remove condition in Device/Default
The current condition with part of the variables set dependent on
the subtarget in Device/Default isn't really nice to read and also
defeats the purpose of having a default node.

This removes the special settings for mt7623 and moves them to the
individual devices, which is not much of a problem as there are
actually just two of them and they partly use different settings
anyway.

While at it, slightly adjust the order of variables and wrap some
long lines.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-25 23:19:19 +02:00
John Audia b6443367d8 kernel: bump 5.4 to 5.4.52
update_kernel.sh refreshed all patches, no human interaction was needed

Build system: x86_64
Run-tested: Netgear R7800 (ipq806x)

Signed-off-by: John Audia <graysky@archlinux.us>
2020-07-17 11:00:33 +02:00
John Crispin eff87b8f93 mediatek: backport latest pci/e driver from upstream
Signed-off-by: John Crispin <john@phrozen.org>
2020-07-16 09:18:28 +02:00
John Crispin 5a5031e70b mediatek: generate UBI images for the rev board
Signed-off-by: John Crispin <john@phrozen.org>
2020-07-16 09:16:34 +02:00
John Crispin ea2884e018 mediatek: minor fix to eip97 driver
This patch makes the driver work on the newer v2.3 core.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-16 09:14:49 +02:00
David Woodhouse f632747704 mediatek: fix bashism in gen_banana_pi_img.sh
There was a bashism in the script. This fixes the script so that it
doesn't actually require bash, and can be run with any POSIX shell as
its shebang suggests.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2020-07-09 11:11:31 +02:00
Sungbo Eo 36105880ee mediatek: re-add u3phy2 phy-switch patch
This patch is required for pcie@2,0 in mt7623 to work. The patch was originally
added in kernel 4.14, but it has not been ported to 4.19 and later.

Fixes: FS#3217
Tested-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2020-07-09 10:28:40 +02:00
Sungbo Eo 923792369e mediatek: do not create device nodes in uci-defaults script
Since commit 298814e6be ("base-files: config_generate: split macaddr with
multiple ifaces") uci MAC address setup will create a device node for each
member iface. But this script might override the device nodes and interfere
with the MAC address setup.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2020-07-09 10:28:40 +02:00
Petr Štetiar c7b750e7ac treewide: kernel: drop redundant USB_EHCI_HCD=n config symbol
Commit e53ec043ba ("kirkwood: move usb support to modules") has moved
this config symbol into generic configs, so it could be removed from
other configs.

Suggested-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-07-09 10:28:40 +02:00
David Woodhouse af9932c9b7 mediatek: Implement sysupgrade support for Banana Pi R2
Based on work by Alexey Loukianov <lx2@lexa2.ru> and others.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2020-07-08 23:22:30 +02:00
David Woodhouse e19ffb25d9 mediatek: store MAC address in boot partition on Banana Pi R2
Like many boards, the Banana Pi R2 doesn't have permanant storage of
its MAC address, and we store the first random one that the kernel
generates in order to use it later and at least be consistent.

Store it in the FAT boot partition, just as the U7623 board (and others)
do.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2020-07-08 23:22:30 +02:00
David Woodhouse 7adc29f59e mediatek: add SD card image creation for Banana Pi R2
Based on work by Alexey Loukianov <lx2@lexa2.ru> and others.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2020-07-08 23:22:30 +02:00
David Woodhouse 91e43a1d7a mediatek: enable SATA for mt7623
The MT7623 SoC has the same SATA block as the MT7622, so enable it in
MT7623 builds too and add it to the DEVICE_PACKAGES for those boards.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2020-07-08 23:22:30 +02:00
David Woodhouse c848bc6cd5 mediatek/mt7623: unify features and packages, add ext4 and usb
The supported MT7623 boards are mostly identical (what with being a
System-on-Chip and all), so unify the DEVICE_PACKAGES for them, and add
ext4 and usb support for them.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2020-07-08 23:22:30 +02:00
David Woodhouse c07d0d7f3e mediatek: mt7623: refresh 5.4 kernel config
Some options were not explicitly specified, causing the kernel build to
drop to interactive mode. Set the missing options.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2020-07-08 23:22:30 +02:00
Hauke Mehrtens 68d9cb8214 kernel: Update kernel 5.4 to version 5.4.50
Run tested: ath79, ipq40xx
Build tested: ath79, ipq40xx

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-07-04 21:12:42 +02:00
Hauke Mehrtens 6062d85892 kernel: Update kernel 4.19 to version 4.19.131
Fixes:
- CVE-2020-10757

The "mtd: rawnand: Pass a nand_chip object to nand_release()" commit was
backported which needed some adaptations to other code.

Run tested: ath79
Build tested: ath79

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-07-04 21:12:42 +02:00
Sungbo Eo c4037a5b9e mediatek: mt7623: refresh kernel 5.4 config
By running make kernel_oldconfig and selecting relevant options.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2020-06-16 15:54:58 +02:00
Adrian Schmutzler 636b62e8e2 mediatek: fix IPv4-only corner case and commit in 99-net-ps
The uci config section network.globals set up in /bin/config_generate
will only be created if /proc/sys/net/ipv6 exists.

Correspondingly, lacking IPv6 support, the command
uci set network.globals.packet_steering=1
will fail with "uci: Invalid argument" as the network.globals config
has not been set up.

Fix that by adding the setup there as well.

While at it, limit the uci commit to the network config file.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-06-16 14:46:42 +02:00
Adrian Schmutzler 48c1fdd046 treewide: drop shebang from non-executable target files
This drops the shebang from all target files for /lib and
/etc/uci-defaults folders, as these are sourced and the shebang
is useless.

While at it, fix the executable flag on a few of these files.

This does not touch ar71xx, as this target is just used for
backporting now and applying cosmetic changes would just complicate
things.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-06-16 14:26:33 +02:00
Petr Štetiar e5aa498acb kernel: bump 5.4 to 5.4.45
Fixes CVE-2020-10757 via upstream commit df4988aa1c96 ("mm: Fix mremap
not considering huge pmd devmap").

Resolved merge conflict in the following patches:

 bcm27xx: 950-0128-gpiolib-Don-t-prevent-IRQ-usage-of-output-GPIOs.patch

Refreshed patches, removed upstreamed patch:

 generic: 751-v5.8-net-dsa-mt7530-set-CPU-port-to-fallback-mode.patch
 generic: 754-v5.7-net-dsa-mt7530-fix-roaming-from-DSA-user-ports.patch

Run tested: qemu-x86-64
Build tested: x86/64, imx6, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-06-09 16:59:33 +02:00
John Crispin c37487a63d mediatek: fix image/mt7622.mk
Signed-off-by: John Crispin <john@phrozen.org>
2020-06-07 20:59:39 +02:00
John Crispin ad39d06df7 mediatek: add mt7531 DSA support
Signed-off-by: John Crispin <john@phrozen.org>
2020-06-07 19:10:51 +02:00
John Crispin f72a2b004c mediatek: add bpi-r64 emmc support
Signed-off-by: John Crispin <john@phrozen.org>
2020-06-07 17:53:37 +02:00
John Crispin 55b97b6885 mediatek: make emmc image generation work on mt7622
Signed-off-by: John Crispin <john@phrozen.org>
2020-06-07 17:52:21 +02:00
John Crispin 127ad76311 mediatek: switch over to extended upstream eip97 driver
Signed-off-by: John Crispin <john@phrozen.org>
2020-06-07 17:52:21 +02:00
Sungbo Eo 3559b46b62 mediatek: tidy up image subtarget Makefiles
- sort device recipes alphabetically
- adjust board name of ELECOM WRC-2533GENT
- harmonize line wrapping

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[rebased]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-06-07 15:23:16 +02:00
Felix Fietkau 81b59efefd ramips/mediatek: select kmod-mt7615-firmware where kmod-mt7615e is selected
The new mt76 version splits out the firmware, because the driver can also be
used for MT7663/MT7613

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-06-04 21:52:57 +02:00
Petr Štetiar d1d2c0b557 kernel: bump 5.4 to 5.4.39
Refreshed patches.

Run tested: qemu-x86-64
Build tested: x86/64, imx6, sunxi/a53, layerscape/armv7+armv8_64b

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-05-07 12:53:06 +02:00
John Crispin 220f43e0f2 mediatek: fix image building
Signed-off-by: John Crispin <john@phrozen.org>
2020-05-04 16:28:46 +02:00
John Crispin abb0452cd8 mediatek: update patches
Signed-off-by: John Crispin <john@phrozen.org>
2020-05-04 16:27:30 +02:00
Yong-hyu, Ban 8fdf77878f mediatek: fix compile error caused by upstreamed mtk_m32 function
This fixes following compile error:

```
  CC      drivers/net/ethernet/mediatek/mtk_eth_soc.o
drivers/net/ethernet/mediatek/mtk_eth_soc.c:70:5: error: conflicting types for 'mtk_m32'
 u32 mtk_m32(struct mtk_eth *eth, u32 mask, u32 set, unsigned reg)
     ^~~~~~~
In file included from drivers/net/ethernet/mediatek/mtk_eth_soc.c:25:
drivers/net/ethernet/mediatek/mtk_eth_soc.h:964:6: note: previous declaration of 'mtk_m32' was here
 void mtk_m32(struct mtk_eth *eth, u32 clear, u32 set, unsigned reg);
      ^~~~~~~
```

which caused by 5.4.34 mainlining of mtk_m32 function.

Fixes: faf668be35 ("kernel: bump 5.4 to 5.4.34")
Signed-off-by: Yong-hyu, Ban <perillamint@quendi.moe>
2020-04-27 22:32:07 +02:00
Felix Fietkau df27e949fb mediatek: disable the unused pcie port for elecom wrc-2533gent
Fixes MSI support for the primary device

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-04-22 10:50:15 +02:00
Petr Štetiar faf668be35 kernel: bump 5.4 to 5.4.34
Refreshed patches.

Run tested: qemu-x86-64, apalis, a64-olinuxino
Build tested: x86/64, imx6, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-04-21 22:16:33 +02:00
Petr Štetiar b299002877 kernel: bump 5.4 to 5.4.31
Refreshed patches, removed upstreamed patches:

 oxnas:   003-ARM-dts-oxnas-Fix-clear-mask-property.patch
 generic: 184-USB-serial-option-add-Wistron-Neweb-D19Q1.patch

Run tested: apu2, qemu-x86-64, apalis
Build tested: sunxi/a53, imx6, x86/64, ipq40xx

Tested-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> [apu2]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-04-09 00:12:46 +02:00
John Crispin 86db1f69c4 mediatek: set v5.4 as default
Signed-off-by: John Crispin <john@phrozen.org>
2020-04-06 07:07:42 +02:00
John Crispin 8021652478 mediatek: add hw flow table offloading
Signed-off-by: John Crispin <john@phrozen.org>
2020-04-06 07:07:42 +02:00
John Crispin af5a17dbb2 mediatek: add support for rtl8367c
Signed-off-by: John Crispin <john@phrozen.org>
2020-04-06 07:07:42 +02:00
John Crispin 08df22e2ab mediatek: drop v4.14 support
Signed-off-by: John Crispin <john@phrozen.org>
2020-04-06 07:07:42 +02:00
John Crispin e2ceb8dd93 mediatek: more v5.4 fixes
These are all backports and/or on their way upstream.

Signed-off-by: John Crispin <john@phrozen.org>
2020-04-06 07:07:42 +02:00
John Crispin beb9820ed3 mediatek: consolidate partition names and settings
Signed-off-by: John Crispin <john@phrozen.org>
2020-04-06 07:07:42 +02:00
John Crispin bce39e1d00 mediatek: fix elecom board name
menuconfig was showing the the company name twice.

Signed-off-by: John Crispin <john@phrozen.org>
2020-04-06 07:07:42 +02:00
John Crispin 3a8dbcf5c2 mediatke: add support for elecom-wrc-2533gent
This commit adds support for the MT7622-based Elecom WRC-2533gent router,
with spi-nand storage and 512MB RAM.

The device has the following specifications:

* MT7622 (arm64 dual-core)
* 512MB RAM (DDR3)
* 4GB storage (spi-nand)
* 5x 1Gbps Ethernet (RTL8337C switch)
* 1x UART header
* 1x USB 3.0 port
* 5x LEDs
* 1x reset button
* 1x WPS button
* 1x slider switch
* 1x DC jack for main power (12V)

The following has been tested and is working:
* Ethernet switch
* 2.4g and 5g wifi
* USB 3.0 port
* sysupgrade
* buttons/leds

Not working:
* bluetooth firmware does not load even though it is present int he rootfs

Signed-off-by: John Crispin <john@phrozen.org>
2020-03-27 16:18:57 +01:00
John Crispin d3f058db1c mediatek: more v5.4 mtd fixes
Signed-off-by: John Crispin <john@phrozen.org>
2020-03-27 16:18:57 +01:00
Chuanhong Guo ed7751f968 mediatek: move mt76 and wpad-bacic to mt7622 subtarget
mt76 is a target default package for mt7622-wmac only.
mt7623 doesn't have integrated wireless support and wifi drivers for
pcie cards should be added as device specific package.
mt7629-wmac isn't supported by mt76 yet.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2020-03-21 12:58:29 +08:00
Chuanhong Guo b7fe92b915 mediatek: mt7629: fix firmware partition
rename "kernel" partition in upstream dts to "firmware" and add
denx,fit as compatible string for mtdsplit.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2020-03-21 12:58:29 +08:00
Chuanhong Guo 2d2e9d2956 mediatek: backport spi-mem based mtk spinor driver
This new driver has full quadspi and DMA support, providing way better
reading performance.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2020-03-21 12:58:29 +08:00
Chuanhong Guo a73ee0fe35 mediatek: mt7629: refresh config for linux 5.4
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2020-03-21 12:58:29 +08:00
Chuanhong Guo 1bbb8807fa mediatek: mt7629: fix ethernet default config
1. fix typo: ucidef_set_interfaces_wan -> ucidef_set_interface_wan
2. change board name to mt7629-rfb to match upstream dts

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2020-03-21 12:58:29 +08:00
Tomasz Maciej Nowak ddc0e87fae kernel: move TEO governor to generic config
This new symbol popped up in few places. Disable it in generic config.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
[fixed merge conflict in generic/config-5.4]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-03-17 00:51:48 +01:00
Petr Štetiar 9ba09653ad treewide: remove maintainer variable from targets
There is no such role as target maintainer anymore, one should always
send corresponding changes for the review and anyone from the commiters
is allowed to merge them or eventually use the hand break and NACK them.

Lets make it clear, that it is solely a community doing the maintenance
tasks.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Piotr Dymacz <pepe2k@gmail.com>
2020-03-16 22:21:45 +01:00
Sungbo Eo 228bb84744 kernel: make kmod-ata-core selected by dependent modules
Currently kmod-ata-* will not get into images unless kmod-ata-core is added to
DEVICE_PACKAGES as well. By changing the dependencies from "depends on" to
"select", we do not have the issue anymore.

Furthermore, we can remove most occurrences of the package from DEVICE_PACKAGES
and similar variables, as it is now pulled by dependent modules such as:
- kmod-ata-ahci
- kmod-ata-ahci-mtk
- kmod-ata-sunxi

While at it, use AddDepends/ata for kmod-ata-pdc202xx-old.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2020-03-11 19:40:03 +01:00
Yousong Zhou 860652f4b9 kernel: 5.4: move some kconfig options to generic
CONFIG_64BIT_TIME=y
	CONFIG_KASAN_STACK=1
	CONFIG_UBSAN_ALIGNMENT=y
	CONFIG_UNIX_SCM=y
	CONFIG_DMA_DECLARE_COHERENT=y
	CONFIG_OF_RESERVED_MEM=y

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2020-03-10 10:05:50 +08:00
Koen Vandeputte f9f62d43e4 kernel: bump 5.4 to 5.4.24
Refreshed all patches.

Compile-tested on: imx6
Runtime-tested on: imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-03-09 20:43:53 +01:00
Koen Vandeputte e64564920a kernel: bump 4.19 to 4.19.108
Refreshed all patches.

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-03-09 20:43:53 +01:00
Koen Vandeputte d5a3536631 kernel: bump 4.14 to 4.14.172
Refreshed all patches.

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-03-09 20:43:53 +01:00
Alan Swanson 401023ae51 mediatek: update uci-defaults for renamed smp packet steering option
Leave as enabled by default for mediatek. Also remove obsolete
settings from when packet steering was moved from netifd to a
simplified hotplug script.

Signed-off-by: Alan Swanson <reiver@improbability.net>
2020-03-03 22:43:09 +01:00
David Bauer 0d727f231f treewide: move commonly disabled symbols to generic config
Move new commonly disabled kernel 5.4 symbols to the generic kernel
configuration.

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-03-01 00:51:23 +01:00
Mark-MC Lee (李明昌) 25d9df670b mediatek: add v5.4 support
Signed-off-by: Mark-MC Lee (李明昌) <Mark-MC.Lee@mediatek.com>
2020-02-28 17:50:46 +01:00
John Crispin 083eb80bf2 mediatek: add latest fixes provided by MTK
Signed-off-by: John Crispin <john@phrozen.org>
2020-02-25 17:15:32 +01:00
Koen Vandeputte 20b5a4ca01 kernel: bump 4.19 to 4.19.101
Refreshed all patches.

Fixes:
- CVE-2019-14896
- CVE-2019-14897

Remove upstreamed:
- 023-0007-crypto-crypto4xx-Fix-wrong-ppc4xx_trng_probe-ppc4xx_.patch
- 950-0202-staging-bcm2835-camera-fix-module-autoloading.patch
- 001-4.22-01-MIPS-BCM63XX-drop-unused-and-broken-DSP-platform-dev.patch

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-02-04 18:10:13 +01:00
Koen Vandeputte 1b310cff0f kernel: bump 4.14 to 4.14.169
Refreshed all patches.

Fixes:
- CVE-2019-14896
- CVE-2019-14897

Remove upstreamed:
- 023-0007-crypto-crypto4xx-Fix-wrong-ppc4xx_trng_probe-ppc4xx_.patch
- 001-4.22-01-MIPS-BCM63XX-drop-unused-and-broken-DSP-platform-dev.patch

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-02-04 18:10:13 +01:00
Sungbo Eo 64648e29fc mediatek: remove unnecessary execute permission bit
kernel config and patch files do not need to be executable. 644 is enough.

Fixes: 01c8f2e97c ("mediatek: bump to v4.19")

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2020-02-04 17:09:20 +01:00
Adrian Schmutzler 997d89cdf5 mediatek: remove KERNEL_PATCHVER overwrite for mt7629
Since whole target has been bumped to kernel 4.19 in 01c8f2e97c
("mediatek: bump to v4.19") we do not need the overwrite in mt7629
subtarget anymore.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-02-04 12:15:45 +01:00
John Crispin 01c8f2e97c mediatek: bump to v4.19
Signed-off-by: John Crispin <john@phrozen.org>
2020-02-04 07:48:09 +01:00
John Crispin a067862518 mediatek: add wmac devicetree node for MT7622
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-02-02 20:20:11 +01:00
Adrian Schmutzler 1ab81bf02d mediatek: mt7623: remove left-over fragments of mt7623a-rfb-emmc
The image creation for the mt7623a-rfb-emmc has been removed during
a patch refresh without specific comment. The corresponding base-files
entries and DTS patches for 4.14 are still there.

Since mt7623 is pretty dead and nobody has missed this device, let's
just remove the rest.

Fixes: 050da2107a ("mediatek: backport upstream mediatek patches")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: John Crispin <john@phrozen.org>
2020-01-30 19:08:09 +01:00
Adrian Schmutzler 49d66e0468 mediatek: use consistent naming scheme for device nodes
This harmonizes the device node names (and thus the image names, too)
between subtargets of the mediatek target. So far, each subtarget
has somewhat used its own naming scheme. Now, we use the vendor_device
syntax there, too.

Since DTS names have different patterns and the target only contains
a few devices, this does not replace DEVICE_DTS by a calculated
default value (like for other targets).

SUPPORTED_DEVICES is adjusted based on the node rename where necessary,
though it looks like for several older devices it was not set up
correctly so far.

While at it, this also changes the DTS name for u7623-02-emmc-512m
to all-lower-case.

Cc: John Crispin <john@phrozen.org>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-01-26 22:11:48 +01:00