Commit Graph

27302 Commits

Author SHA1 Message Date
Brian Norris
a3da858ab0 ipq40xx: Convert Google Wifi to DSA, reenable
Undo parts of these:

116feb4a1c ipq40xx: remove non-converted network configs
db19efee95 ipq40xx: disable boards not converted to DSA

Reintroduce the DT paths /soc/edma@c080000/gmac{0,1}, because the stock
bootloader has memorized them (instead of following aliases); then plug
the MAC address back in via 05_set_iface_mac_ipq40xx.sh, since the
'local-mac-address' property is no longer in the correct node.

Cc: David Bauer <mail@david-bauer.net>
Cc: Robert Marko <robert.marko@sartura.hr>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2022-10-23 08:27:40 +02:00
Jack Chen
57577bb8cc ipq40xx: convert to DSA and enable mobipromo,cm520-79f
Convert to DSA and enable the MobiPromo CM520-79F device again.

Signed-off-by: Jack Chen <redchenjs@live.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2022-10-23 01:45:52 +02:00
Pavel Kamaev
a716ac5564 ath79: fix reference clock for RouterBoard 912UAG
This fixes reference clock frequency of RB912. 25 MHz frequency leads
to system clock running too fast, uptime incrementing too fast and
delays (like `sleep 10`) returning too early.

Board has quartz with NSK 3KHAA Z 40 000 marking.

Signed-off-by: Pavel Kamaev <pavel@kamaev.me>
2022-10-23 01:45:52 +02:00
David Bentham
67660d3667 ramips: fix WAN mac address allocation for Unielec 01 and 06 models
Manufacturer has predetermined mac address values for lan and wan ports.

This change keeps inline with other mt7621 devices mac address allocation
from factory mtd partition.

Example from hexdump output:

0xe000 0x6 (lan) -           0xe006 0x6 (wan)

0000e000  70 b3 d5 10 02 96 70 b3  d5 10 02 95 ff ff ff ff

Previous change had created an overlapping mac address situation as it
would increment by one based on the lan mac address location found in the
factory partition, which would sometimes increment to the same as the
mt7603 wifi chip.

Tested on Unielec u7621-01 model

Signed-off-by: David Bentham <db260179@gmail.com>
2022-10-23 01:45:52 +02:00
Robert Senderek
ac296f6210 ramips: rt3883: enable lzma-loader for Belkin F9K1109v1
Fixes boot loader LZMA decompression issues

Fixes: #10968
Signed-off-by: Robert Senderek <robert.senderek@10g.pl>
2022-10-23 01:45:52 +02:00
Alex Khodin
f6099d7974 ramips: mt7621: enable lzma-loader for Asus RT-N56U-B1
Fixes boot loader LZMA decompression issues.

Without this change the board end up in a boot loop.

Signed-off-by: Alex Khodin <mxktz1@gmail.com>
2022-10-23 01:45:52 +02:00
Chukun Pan
4f9b360f0b ramips: add A-040W-Q alternative name for MSG1500 X.00
The hardware of Nokia A-040W-Q and RAISECOM MSG1500 X.00 are
exactly the same, both of which are customized by operators.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2022-10-23 01:45:52 +02:00
Chukun Pan
7b863af180 kernel: move mac-address-ascii patches to generic
This enables other targets to use the mac-address-ascii
feature.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2022-10-23 01:45:52 +02:00
Aleksander Jan Bajkowski
802ca492d8 lantiq: add 6.1 tag to upstream patch
Add 6.1 tag to upstream patch now that 6.1 got tagged. This permits to
track patch in a better way and directly drop them on kernel bump.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2022-10-23 01:45:52 +02:00
Martin Blumenstingl
d4571e98ab lantiq: Add Linux 5.15 as testing kernel version
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2022-10-22 19:44:46 +02:00
Martin Blumenstingl
d374e0346e lantiq: 5.15: refresh patches
0001-MIPS-lantiq-add-pcie-driver.patch needs to drop
MODULE_SUPPORTED_DEVICE because that macro is gone on newer kernels.

Add checks for copy_{to,from}_user in
0008-MIPS-lantiq-backport-old-timer-code.patch which is now mandatory.

0705-v5.13-net-dsa-lantiq-allow-to-use-all-GPHYs-on-xRX300-and-.patch
get dropped because it's a backport from Linux 5.13.

All other patches are refreshed.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2022-10-22 19:44:45 +02:00
Martin Blumenstingl
c783073894 lantiq: copy Linux 5.10 files in preparation for Linux 5.15 support
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2022-10-22 19:44:45 +02:00
Chen Minqiang
3505933073 ipq40xx: convert to DSA and enable asus,rt-ac42u
This convert board asus,rt-ac42u to DSA and re-enable it

Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2022-10-22 20:09:58 +08:00
Hauke Mehrtens
1ea3510c5c kernel: Add missing kernel configuration options
The at91/sam9x targets misses these configuration options when using
kernel 5.15.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-10-22 00:51:25 +02:00
Claudiu Beznea
0a00189e41 at91: kernel v5.15: use KERNEL_TESTING_PATCHVER:=5.15
Use KERNEL_TESTING_PATCHVER:=15 for at91 targets.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
2022-10-22 00:51:25 +02:00
Claudiu Beznea
dd37b205f8 at91: kernel v5.10: refresh configs
Refresh kernel v5.10 configs.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
2022-10-22 00:51:25 +02:00
Claudiu Beznea
fe7e34d793 at91: kernel v5.15: refresh configs
Refresh kernel v5.15 configs.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
2022-10-22 00:51:25 +02:00
Claudiu Beznea
d0d7771262 at91: kernel v5.15: remove upstreamed patches
Remove patches that are now integrated in kernel v5.15.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
2022-10-22 00:51:25 +02:00
Claudiu Beznea
eb758a8fec at91: kernel v5.15: copy config and patches from 5.10
Copy kernel config and patches from 5.10. Along with it
individual targets' config-default from 5.10 has been moved to
config-5.10.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
2022-10-22 00:51:25 +02:00
Daniel Golle
c5c37886cf oxnas: shuttle-kd20: fix thermal zone
Fix typo ('_' vs '-') and add #cooling-cells to gpio-fan to get
thermal zone into functional state.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-21 20:57:53 +01:00
Daniel Golle
63ff5b783d oxnas: switch to Linux 5.15 and drop Linux 5.10
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-21 20:57:53 +01:00
Aleksander Jan Bajkowski
9226f1e419
kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic config
Endianness depends on CPU architecture. CONFIG_CPU_(BIG/LITTLE)_ENDIAN should
be enabled on target or subtarget based on SoC architecture.

Fixes warning:
$ make kernel_oldconfig CONFIG_TARGET=subtarget
...
.config:1008:warning: override: CPU_LITTLE_ENDIAN changes choice state
....

Summary:
- ARC - only the CONFIG_CPU_BIG_ENDIAN symbol is defined for this architeture.
  If it is disabled then the processor operates in LITTLE_ENDIAN mode (default),
- ARM32 - CONFIG_CPU_LITTLE_ENDIAN symbol available since kernel 5.19. This
  option should be enabled after OpenWRT moves to kernel 6.x. After refreshing
  the kernel, the symbol disappears,
- ARM64 - enabled CONFIG_CPU_LITTLE_ENDIAN,
- MIPS - enabled relevant symbols,
- POWERPC -  enabled CONFIG_CPU_BIG_ENDIAN,
- UML - Symbols are not defined for this architecture,
- X86 - always little endian. Symbols are not defined for this architecture.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2022-10-21 13:47:01 +02:00
Aleksander Jan Bajkowski
069bda0adb
lantiq: add rgmii delays on BT Home Hub 5A
This comit fixes warnings that occur on kernel 5.15:
...
[    2.269736] Intel XWAY PHY11G (PEF 7071/PEF 7072) v1.5 / v1.6 1e108000.switch-mii:00:
               PHY has delays (e.g. via pin strapping), but phy-mode = 'rgmii'
[    2.269736] Should be 'rgmii-id' to use internal delays txskew:1500 ps rxskew:1500 ps
...

Ref: be393dd685
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2022-10-21 13:45:37 +02:00
Linus Walleij
e629ced778 bcm53xx: only fixup seama on D-Link DIR-885L
Just one device builds seama images so let's just fix up
seama on that one device. I guess the tool errors out but
this feels cleaner.

Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
[rmilecki: drop "fixtrx" from D-Link case]
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-10-21 08:54:34 +02:00
Arınç ÜNAL
2b9bb5b187 bcm53xx: enable Broadcom 4366b1 firmware for Asus RT-AC88U
On some of the hardware revisions of Asus RT-AC88U, brcmfmac detects the
4366b1 wireless chip and tries to load the firmware file which doesn't
exist because it's not included in the image.

Therefore, include firmware for 4366b1 along with 4366c0. This way, all
hardware revisions of the router will be supported by having brcmfmac use
the firmware file for the wireless chip it detects.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
2022-10-21 08:50:51 +02:00
Daniel Golle
c15e7e2910
mediatek: filogic: consolidate adc '32k' clock
Add dependency to '32k' ADC clock so it is always enabled for thermal
and raw access to ADC values. This allows to remove the patch for the
ADC driver and reduce the patch adding thermal support for MT7986 to
only add the new efuse layout and temperature decoding for V3.

Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-20 20:37:50 +01:00
Petr Štetiar
ae76c978c9 pistachio: refresh kernel patches
Refresh dirty patches after commit 711f1a8bcb ("kernel: mtd: backport
SafeLoader parser").

Fixes: 711f1a8bcb ("kernel: mtd: backport SafeLoader parser")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-10-20 09:53:23 +02:00
Petr Štetiar
329b583aad ath79: refresh kernel patches
Refresh dirty patches after commit 711f1a8bcb ("kernel: mtd: backport
SafeLoader parser").

Fixes: 711f1a8bcb ("kernel: mtd: backport SafeLoader parser")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-10-20 09:53:23 +02:00
John Audia
b1cc4eac1b
mt7622: switch default CPU governor to ondemand
The most common CPU governor in the OpenWRT project is currently ondemand (see
below).  Switch mt7622 over to it as well.

Audit the code by running the following and then analyzing the results:
find -name 'config-5.*' -print0 | xargs -0 grep 'CONFIG_CPU_FREQ_DEFAULT_GOV.*=y'

ondemand: 16
performance: 5
schedutil: 5
userspace: 2

Build system: x86_64
Build-tested: ramips/mt7621

Signed-off-by: John Audia <graysky@archlinux.us>
2022-10-20 00:44:53 +02:00
Daniel Golle
f2ae4e2f8c
mediatek: clean up platform kernel modules
Remove kmod-sdhci-mtk as the mtk-sd driver is built-in anyway for the
relevant subtargets in order to support mounting rootfs from eMMC or
SD card.

Add kmod-iio-mt6577-auxadc to support reading the raw values from the
auxadc unit used as in-SoC thermal sensor. This driver was previously
built-in, but as thermal itself works well without it there is no use
for it in every day use of a device. Build the module to still allow
access to the raw values for those who need it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-19 23:20:48 +01:00
Andrey Butirsky
47d58afbdf ramips: kndrt31r19: set up wan interface by default
The only WAN port of the device is it's modem, so set it up as such

Signed-off-by: Andrey Butirsky <butirsky@gmail.com>
2022-10-19 23:00:40 +02:00
Mark Mentovai
9a8e008188 ipq40xx: Convert mikrotik,wap-ac to DSA
As done previously, this preserves the MAC addresses of they physical
Ethernet ports. The interfaces are renamed as eth0 is in use for the
native GMAC; the new interface naming matches the physical port labels.
 - sw-eth1 corresponds to the physical port labeled ETH1 and has the
   base MAC address. This port can be used to power the device.
 - sw-eth2 corresponds to the physical port labeled ETH2 and has a MAC
   address one greater than the base.

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

Signed-off-by: Mark Mentovai <mark@mentovai.com>
2022-10-19 22:58:12 +02:00
INAGAKI Hiroshi
48bb71ff28 ath79: improve MAC address configuration of ELECOM devices
Get MAC address of WAN from HW.WAN.MAC.Address in hwconfig partition
instead of calculated one from wlan's address.
And added label_mac.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2022-10-19 22:58:12 +02:00
INAGAKI Hiroshi
961d4230f4 ath79: use NVMEM for wlan caldata on ELECOM devices
Use NVMEM "calibration" implementation for ath9k/ath10k(-ct) on ELECOM
WRC-300GHBK2-I and WRC-1750GHBK2-I/C instead of mtd-cal-data property
or user-space script.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2022-10-19 22:58:12 +02:00
INAGAKI Hiroshi
2e1ffc3412 ath79: use ARTIFACTS for initramfs-factory of ELECOM devices
Use ARTIFACTS to generate factory image of the following ELECOM devices
instead of redundant recipe which generate on KERNEL_INITRAMFS.

- ELECOM WRC-300GHBK2-I
- ELECOM WRC-1750GHBK2-I/C

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2022-10-19 22:58:12 +02:00
INAGAKI Hiroshi
00ddd29b65 build: move Build/edimax-header to image-commands.mk
To use from the following devices in ath79 target, move edimax-header to
image-commands.mk.

- ELECOM WRC-300GHBK2-I
- ELECOM WRC-1750GHBK2-I/C

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2022-10-19 22:58:12 +02:00
Nick Hainke
fdd605581c x86: switch to 5.15 as default kernel
Set 5.15 as default kernel. Testing support was already added on
29.03.2021.

Testing support was added in
9b3bc5d119 ("x86: enable 5.15 as testing kernel").

[0] - edd6021465

Tested-by: Mark Mentovai <mark@mentovai.com>
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Tested-by: Thomas Huehn <thomas.huehn@hs-nordhausen.de>
Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-10-19 21:40:23 +02:00
Daniel Golle
d640cbac0e
mediatek: mt7622: don't rely on existing image for sysupgrade
Don't reply on mapped rootfs partition but rather just take what ever
has been set to the kernel cmdline root= parameter as a hint to decide
which media to install sysupgrade to on the BananaPi BPi-R64.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-19 20:05:17 +01:00
Daniel Golle
a97991fbeb
mediatek: mt7622: kernel config fixes
* remove orphaned Kconfig symbol now that CONFIG_IIO is no longer
   selected after commit ef8b935c95 ("mediatek: clean up mt7622 kernel config")

 * select UBI fast-map feature to decrease boot time and keep the
   number of spare blocks required in sync with U-Boot's expectations
   (we got fast-map enabled in U-Boot)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-19 20:05:12 +01:00
Daniel Golle
dca5bf6d53
mediatek: update pending and rename merged patch
Add patch headers and description for pending patch.
Add version tag to patch already merged upstream.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-19 20:05:01 +01:00
Rafał Miłecki
711f1a8bcb kernel: mtd: backport SafeLoader parser
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-10-19 07:07:14 +02:00
Rafał Miłecki
4eda414b09 kernel: mtd: backport extended dynamic partitions support
This gets rid of "nvmem-cells" limitation. Dynamic partitions can be
defined for any (sub)partitions layout.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-10-19 07:07:14 +02:00
Rafał Miłecki
76a470d5df kernel: mtd: fix unbalanced of_node_put() in dynamic partitions code
Fixes: 1a9ee36734 ("kernel: backport mtd dynamic partition patch")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-10-19 07:07:14 +02:00
Christian Marangi
d80c91b23e
generic: 5.15: add missing tag for some backports patches
Add for mtd-parsers-trx-allow-to-use-on-MediaTek-MIPS-SoCs.patch and
hwmon-lm70-Add-ti-tmp125-support.patch the 5.18 tag as it was merged
in kernel 5.18.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-18 22:45:08 +02:00
Christian Marangi
4611fdd759
ipq806x: 5.15: add 6.1 tag to upstream patch
Add 6.1 tag to upstream patch now that 6.1 got tagged. This permits to
track patch in a better way and directly drop them on kernel bump.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-18 22:21:04 +02:00
Daniel Golle
de94587e70
mediatek: filogic: don't rely on image preset in flash or sysupgrade
Instead of trying to figure out the actual root device, just use the
kernel 'root' cmdline parameter as a hint to decide which device to
flash to.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-18 20:08:47 +01:00
Daniel Golle
51ee5fb274
mediatek: filogic: use UBI fast map to speed up boot
Use UBI fast map feature to avoid scanning the whole flash on each
boot which takes several seconds.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-18 20:08:30 +01:00
Daniel Golle
b00640bd06
mediatek: don't break auxadc without 32k clk
Make the newly added 32k clock optional for the auxadc driver also used
on pre-filogic platforms.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-18 20:08:25 +01:00
Petr Štetiar
b63d6d4730 mt7621: hiwifi_hc5962: fix reboot loop by using LZMA loader
This fixes a well known "LZMA ERROR 1" error, reported previously on
numerous of similar devices.

References: https://github.com/openwrt/openwrt/issues/10645#issuecomment-1282607274
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-10-18 19:05:06 +02:00
Josef Schlehofer
ed0dd05bfd kernel: add missing config symbols for 5.15
When I enabled CONFIG_HOTPLUG_PCI for mvebu platform, it was asking for
more symbols.

Fixes:
Support for PCI Hotplug (HOTPLUG_PCI) [Y/?] y
  CompactPCI Hotplug driver (HOTPLUG_PCI_CPCI) [N/y/?] n
  SHPC PCI Hotplug driver (HOTPLUG_PCI_SHPC) [N/y/?] (NEW)

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2022-10-18 15:09:23 +02:00
John Audia
b0a94fc60d kernel: bump 5.15 to 5.15.74
All patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-10-18 15:09:23 +02:00
Petr Štetiar
7dd1cab1c1 mt7621: netgear_ex6150: fix reboot loop by using LZMA loader
This fixes a well known "LZMA ERROR 1" error, reported previously on
numerous of similar devices.

Fixes: #10645
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-10-18 09:01:39 +02:00
Christian Marangi
1b147bec1a
ipq806x: 5.15: refresh target patches
Refresh ipq806x target patches for kernel 5.15.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-17 00:40:16 +02:00
Christian Marangi
32ecf4251a
bcm53xx: 5.10: refresh target patches
Refresh bcm53xx target patches for kernel 5.10.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-17 00:34:28 +02:00
Christian Marangi
32c683ddce
generic: 5.10: refresh hack patches
Refresh hack patches for kernel 5.10.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-16 20:36:49 +02:00
Christian Marangi
6b4bdab918
generic: 5.10: refresh backport patches
Refresh backport patches for kernel 5.10.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-16 20:36:03 +02:00
Christian Marangi
6893dd4803
generic: 5.15: refresh hack patches
Refresh hack patches for kernel 5.15.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-16 13:19:33 +02:00
Christian Marangi
fb67733d87
generic: 5.15: refresh backport patches
Refresh backport patches for kernel 5.15.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-16 13:19:05 +02:00
David Bauer
f8942d1428 mpc85xx: fix unset kernel symbol
Signed-off-by: David Bauer <mail@david-bauer.net>
2022-10-14 23:13:02 +02:00
Matthias Schiffer
2fa53c9214 mpc85xx: p1010: make TP-Link WDR4900 v1 build again
Add the spi-loader as a pre-kernel stage, so we can lift the kernel size
limit.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2022-10-14 23:13:02 +02:00
Matthias Schiffer
a296055b82 mpc85xx: add SPI kernel loader for TP-Link TL-WDR4900 v1
Similar to the lzma-loader on our MIPS targets, the spi-loader acts as
a second-stage loader that will then load and start the actual kernel.
As the TL-WDR4900 uses SPI-NOR and the P1010 family does not have support
for memory mapping of this type of flash, this loader needs to contain a
basic driver for the FSL ESPI controller.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2022-10-14 23:13:02 +02:00
Christian Marangi
fcff86be06
generic: 5.15: backport qca8k fixup patches for Big-Endian systems
Backport qca8k fixup patches for inband mgmt on Big-Endian systems.
This is needed for ath79 and mpc85xx targets that are Big-Endian and use
qca8k based switch.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-14 15:10:52 +02:00
Bruno Umuarama
85ae64bb27
mediatek: mt7623: fix thermal zone
Raising the temperatures for passive and active trips. @VA1DER
proposed at issue 9396 to remove passive trip. This commit relates to
his suggestion.

Without this patch. the CPU will be throttled all the way down to 98MHz
if the temperature rises even a degree above the trip point, and it was
further discovered that if the internal temperature of the device is
above the first trip point temperature when it boots then it will start
in a throttled state and even
$ echo disabled > /sys/class/thermal/thermal_zone0/mode
will have no effect.

The patch increases the passive trip point and active cooling map. The
throttling temperature will then be at 77°C and 82°C, which is still a
low enough temperature for ARM devices to not be in the real danger
zone, and gives some operational headroom.

Signed-off-by: Bruno Umuarama <anonimou_eu@hotmail.com>
2022-10-14 14:44:37 +02:00
Felix Fietkau
ef8b935c95 mediatek: clean up mt7622 kernel config
Remove a few unused options to reduce kernel size

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-10-14 13:16:16 +02:00
Felix Fietkau
9995dd2543 kernel: remove target specific CONFIG_IKCONFIG lines
Use generic configuration for this feature

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-10-14 13:15:47 +02:00
Felix Fietkau
d3cd09d1c6 kernel: add missing lockdep config symbols for 5.15
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-10-14 13:15:29 +02:00
Felix Fietkau
34054e4c06 mediatek: fill wlan device entries in board.json on mt7622
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-10-14 13:13:49 +02:00
Nick Hainke
dbce336539
airoha: fix imagebuilder generation by introducing generic target
The generic imagebuilder does not have a generic in the name, although
this is the default naming scheme. Apply the same fix as for the octeon
target. Thanks to @dangowrt for reporting that the same issues applies
also for the airoha target.

Before the fix:
openwrt-imagebuilder-airoha.Linux-x86_64.tar.xz

After:
openwrt-imagebuilder-airoha-generic.Linux-x86_64.tar.xz

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-10-13 17:38:59 +02:00
Aleksey Nasibulin
3413409ef6
bcm53xx: linksys ea6500-v2: extend RAM to full 256MB
Linksys ea6500-v2 have 256MB of ram. Currently we only use 128MB.
Expand the definition to use all the available RAM.

Signed-off-by: Aleksey Nasibulin <alealexpro100@ya.ru>
[ wrap to 80 columns ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-13 16:34:50 +02:00
Olliver Schinagl
41a1a652fb
kernel: backport gnu11 upgrade
Upstream has switched to gnu11 not too long ago. One advantage of
backporting this to these older kernels is, that we can encourage and
write better upstreamable kernels. E.g. the kernel devs prefer loop
declarations. Shrinking the master/local gap will be useful in these
cases.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Acked-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-13 16:03:35 +02:00
Giammarco Marzano
cd93980abb
ipq40xx: Fix wrong GPIO for internal status LED on ZTE MF289F
Change GPIO from 10 to 35 to make it works as expected

Fixes: 0de6a3339f ("ipq40xx: Add ZTE MF289F")
Signed-off-by: Giammarco Marzano <stich86@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2022-10-12 00:59:39 +02:00
Christian Marangi
bb451eccaa
ipq806x: switch to 5.15 kernel by default
Switch to 5.15 kernel by default to promote more wider testing and use
better upstream patch.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-11 21:28:46 +02:00
Christian Marangi
8d9dfac2bd
ipq806x: 5.15: add clk krait fixes/improvement patch
Add various krait fixes patch that correctly bringup mux and cpu clocks.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-11 21:28:46 +02:00
Christian Marangi
ecf1abe5bf
ipq806x: 5.15: enable again usb node for each device
Usb node now are disabled by default in dtsi. Enable again them in each
device dts.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-11 21:28:46 +02:00
Christian Marangi
6f1b89baba
ipq806x: 5.15: add krait-cc modernization patch and fixup
Add multiple patch for krait-cc modernization and multiple fixup for the
driver. Also modify a patch to enable the qsb fixed clock and add pxo to
krait-cc node.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-11 21:28:45 +02:00
Christian Marangi
e5a3720a56
ipq806x: 5.15: add krait clock modernization patch
Backport krait clock modernization patch.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-11 21:28:45 +02:00
Christian Marangi
a7c7a3c009
ipq806x: 5.15: backport qcom clk fixes for krait and hfpll
Backport some qcom clock fixes for krait and hfpll driver.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-11 21:28:45 +02:00
Christian Marangi
78fef3cc6f
ipq806x: 5.15: renumber tsens patch with new order
Renumber tsens patch with new order for consistency.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-11 21:28:44 +02:00
Christian Marangi
8392a6b395
ipq806x: 5.15: enable new devfreq scaling driver in config
Enable new devfreq scaling driver in kernel config.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-11 21:28:44 +02:00
Christian Marangi
9254ed0f3b
ipq806x: 5.15: rework nand_pins for wg2600hp3 dts
nand_pins definition is now shipped in ipq8064 dtsi. Rework the
nand_pins definition for wg2600hp3 5.15 files.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-11 21:28:44 +02:00
Christian Marangi
6134ba4a34
ipq806x: 5.15: add boot-partitions binding to fix block warning
The patch has changed implementation and now the binding has changed.
Replace the old binding with boot-partitions and reimplement the
definition with the new definition.
The new definition is:
<offset1 size1 offset2 size2 offset3 ...>
and now supports sparsed patch.

Also add missing binding in some dts and add the backup boot partition
to the boot-partitions list.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-11 21:28:44 +02:00
Christian Marangi
900542698c
ipq806x: 5.15: remove useless spm patch
Remove useless spm patch as using the normal qcom,spm compatible is
enough to register it with no clks.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-11 21:28:43 +02:00
Christian Marangi
ae6a63bc97
ipq806x: 5.15: replace nandc patch with upstream version
Replace nandc fix patch with upstream version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-11 21:28:43 +02:00
Christian Marangi
a8d7aed033
ipq806x: 5.15: replace fab scaling patch with devfreq driver
Replace fab scaling patch with devfreq driver.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-11 21:28:43 +02:00
Christian Marangi
25aa65304c
ipq806x: 5.15: add new version of cache cpu scaling driver
Use a new implementation by using a devfreq driver to scale the shared
cache of the krait cpu cores.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-11 21:28:42 +02:00
Christian Marangi
3a911b8c2d
ipq806x: 5.15: backport devfreq new cpufreq based PASSIVE governor
Backport devfreq new cpufreq based PASSIVE governor needed for devfreq
based fab and cache scaling.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-11 21:28:42 +02:00
Christian Marangi
5ad826f48a
ipq806x: 5.15: replace stmmac pcs fix with upstream version
Replace stmmac pcs fix with upstream version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-11 21:28:42 +02:00
Christian Marangi
cd619eeff2
ipq806x: 5.15: replace gcc fixes with upstream version
Replace gcc patch fixes with upstream version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-11 21:28:41 +02:00
Christian Marangi
61a2bedf79
ipq806x: 5.15: replace lcc patch with upstream version
Replace lcc patch with proposed upstream version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-11 21:28:41 +02:00
Christian Marangi
88bf652525
ipq806x: 5.15: replace dtsi patches with upstream version
Reorganize dtsi patches with upstream version and drop dtsi in 5.15
files.
Also add an additional upstream patch for hwspinlock support.
Refresh all the dts with needed changes.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-11 21:28:41 +02:00
Christian Marangi
bd02eb7502
ipq806x: 5.15: remove PCI_DOMAINS patch not needed anymore
This doesn't cause any panic anymore and no regression are observed with
ath10k. Remove this additional patch.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-11 21:28:40 +02:00
Christian Marangi
f2dc002495
ipq806x: 5.15: remove qcom adm Documentation patch
Remove qcom adm Documentation patch that is not needed for the target.
Probably a leftover when the adm bus was added, now merged upstream.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-11 21:28:40 +02:00
Christian Marangi
faa79f97b6
ipq806x: split files dir to 5.10 and 5.15
In preparation for a cleanup of 5.15 patches copy the files dir to 5.10
and 5.15 kernel version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-11 21:28:37 +02:00
Martin Blumenstingl
2683cca592 lantiq: dts: vr9: Add missing properties to the CPU port on the switch
The CPU port should define the phy-mode and and a PHY phandle or
fixed-link to indicate how the CPU port is connected to the SoC's
Ethernet controller. On xRX200 this is all internal connection, so use
phy-mode = "internal" along with a fixed-link that matches the
definition inside &eth0.

Linux 6.0 shows a warning since upstream commit e09e9873152e3f ("net:
dsa: make phylink-related OF properties mandatory on DSA and CPU
ports"). when these properties are missing. Adding the properties
before OpenWrt is updated to Linux 6.0 is harmless.

Suggested-by: Martin Schiller <ms@dev.tdt.de>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2022-10-10 21:51:05 +02:00
Du Cai
8ac69159f2 ramips: use lzma-loader on JCG Q20
Fixes the LZMA uncompression issue on JCG Q20.

Signed-off-by: Du Cai <caidu@smail.nju.edu.cn>
2022-10-09 22:50:57 +02:00
INAGAKI Hiroshi
32e41ba18a ipq40xx: convert to DSA and enable Sony NCP-HG100/Cellular
This patch converts networking on Sony NCP-HG100/Cellular to DSA and
re-enables support for the device.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2022-10-09 22:45:06 +02:00
Dirk Buchwalder
579ea6b970 ipq40xx: ZTE MF289F: convert to DSA
Convert ZTE MF289F device to DSA, re-order network ports to match the
labels on the case and re-enable the device.

Signed-off-by: Dirk Buchwalder <buchwalder@posteo.de>
Reviewed-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Lech Perczak <lech.perczak@gmail.com>
2022-10-09 22:39:48 +02:00
John Audia
9110126620 kernel: bump 5.15 to 5.15.72
Removed upstreamed:
  generic/pending-5.15/722-net-mt7531-only-do-PLL-once-after-the-reset.patch[1]
  bcm53xx/patches-5.15/082-v6.0-clk-iproc-Do-not-rely-on-node-name-for-correct-PLL-s.patch[2]

All other patches automatically rebased

Build system: x86_64
Build-tested: bcm2711/RPi4B, mt7622/RT3200, mvebu/cortexa72
Run-tested: bcm2711/RPi4B, mt7622/RT3200, mvebu/cortexa72 (RB5009UG+S+IN)

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.72&id=5de02ab84aeca765da0e4d8e999af35325ac67c2
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.72&id=ab5c5787ab5ecdc4a7ea20b4ef542579e1beb49d

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-10-09 22:26:16 +02:00
John Audia
e2da6a0a59 kernel: bump 5.10 to 5.10.147
Removed upstreamed:
  bcm53xx/patches-5.10/083-v6.0-clk-iproc-Do-not-rely-on-node-name-for-correct-PLL-s.patch[1]

All other patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-10-09 22:18:24 +02:00
Daniel Golle
88eae0f036
mediatek: filogic: set correct PWM clock and clean thermal zone
* set correct clocks for PWM to work.
 * MT7986 PWM does have the 26MHz-clock-select, set that in patch
 * drop useless 'passive' trip point in thermal zone
 * extend pwm-fan to have 3 active operating points
 * set reasonable trip points in thermal zone
 * invert pwm-fan operating points and set shorter period to allow
   less noisy operation of the PWM fan of the BPi-R3.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-09 16:41:16 +01:00
INAGAKI Hiroshi
629f2de1a7 realtek: cleanup rtl83{8x,9x}_enable_learning/flood
In *_enable_learning() only address learning should be configured, so
remove enabling forwarding. Forwarding is configured by the respective
*_enable_flood() functions.

Clean up both functions for RTL838x and RTL839x, and fix the comment on
the number of entries.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[squash RTL838x, RTL839x changes]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-10-08 11:05:03 +02:00
INAGAKI Hiroshi
b11b56e8a8 realtek: swap *_phylink_mac_link_down() contents
Fix the (accidentally?) swapped contents of
rtl83xx_phylink_mac_link_down() and rtl93xx_phylink_mac_link_down().

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[amend commit message]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-10-08 11:05:02 +02:00
INAGAKI Hiroshi
ff307f52f5 realtek: fix place of fdb/mdb info messages
Those messages should be printed when entry was found (idx >= 0). Move
them to the right place to not print invalid entry indices.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[amden commit message]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-10-08 11:05:02 +02:00
INAGAKI Hiroshi
3834e72fa3 realtek: add missing of.h include in phy driver
of.h is required for of_property_read_u32().

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[amend commit message]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-10-08 11:05:02 +02:00
INAGAKI Hiroshi
04cca345df realtek: fix use of uninitialized sds_mode
The initial state of sds_mode in rtl9300_force_sds_mode() is null and it
will be configured in switch-case. So print message after it.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[amend commit message]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-10-08 11:05:02 +02:00
INAGAKI Hiroshi
27a580df4a realtek: use MIPS fw_init_cmdline()
Use the generic function of MIPS in Linux Kernel instead of open coding
our own initialisation.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[amend commit message]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-10-08 11:05:02 +02:00
INAGAKI Hiroshi
5b37e3245d realtek: update SMP-related calls in prom_init()
The availabibity of probing CPC depends on CONFIG_MIPS_CPC symbol and it
will be checked in arch/mips/include/asm/mips-cpc.h. RTL9310 selects
this symbol, so the family check is redudant.

Furthermore, mips_cm_probe() is already called from setup_arch() in
mips/kernel/setup.c before prom_init(), and as such is not required.

Also move mips_cpc_probe() to run just before registering SMP ops.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[squash SMP change commits, reword commit message]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
---
This patch only really has an impact on the rtl931x subtarget, which has
no devices. Noboby is currently set up to test these patches either, but
the end result is closer to MIPS_GENERIC, so I do not expect it to cause
issues.
2022-10-08 11:05:02 +02:00
INAGAKI Hiroshi
9b53a29a58 realtek: separate lock of RTL8231 from phy driver
RTL8231 and ethernet phys are not on the same bus, so separate the lock
to each own to cut off the unnecessary dependency.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2022-10-08 11:05:02 +02:00
Tom Herbers
7d6032f310 ath79: fix model name of Extreme Networks WS-AP3805i
Everywhere else the device is referred to as WS-AP3805i,
only the model name wrongly only said AP3805i.

Signed-off-by: Tom Herbers <mail@tomherbers.de>
2022-10-08 01:34:28 +02:00
Daniel Golle
f38276c9be mediatek: filogic: enable thermal, I2C and PWM of the BPi-R3
Setup thermal zone, select pins and enabled drivers for I2C (on 26-pin
GPIO bank) and PWM (1x fan and 1x GPIO bank).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-07 16:45:10 +01:00
Daniel Golle
5d921aa72f mediatek: filogic: add support for hw i2c, pwm and thermal
Add support for hardware I2C and PWM units found in the Filogic SoCs
as well as the CPU thermal support.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-07 16:45:10 +01:00
Daniel Golle
05501304ed kernel: refresh backport-5.15 patches
Refresh patches, removing unwanted git metadata from some backported
commits.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-07 16:45:10 +01:00
Robert Meijer
c3b9f00aaa
ath79: increase max tx ring buffer for ag71xx
This allows the user to specify a larger tx ring buffer size via ethtool.
Having symmetrical ring buffer sizes increases throughput on high bandwidth
(1 gbps tested) network connections.

The default value is not changed so the same behaviour is saved.

Signed-off-by: Robert Meijer <robert.s.meijer@gmail.com>
[ improve title, commit description and wrap to 80 columns ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-06 16:45:43 +02:00
Tomasz Maciej Nowak
ee38573093
ipq40xx: pakedge_wr-1: convert to DSA
Convert pakedge_wr-1 device to DSA and enable it.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>i
[ improve commit description ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-05 19:16:52 +02:00
Tomasz Maciej Nowak
70d9193b51
ipq40xx: luma_wrtq-329acn: convert to DSA
Convert luma_wrtq-329acn device to DSA and enable it.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
[ improve commit description ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-05 19:10:28 +02:00
Stijn Tintel
dc51342d34 qoriq: fix typo in FEATURES
There is no root-part FEATURE.

Reported-by: Karl Palsson <karlp@etactica.com>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-10-05 14:36:00 +03:00
Rafał Miłecki
a5265497a4 kernel: fix possible mtd NULL pointer dereference
Fixes: 1a9ee36734 ("kernel: backport mtd dynamic partition patch")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-10-04 12:06:03 +02:00
Matthias Schiffer
149fc3a269
ramips: fix switch setup for ASUS RT-AX53U
The device has only 1 WAN + 3 LAN ports. Remove "lan4" interface
corresponding to the non-existing port.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2022-10-03 13:23:41 +02:00
Petr Štetiar
606eb43b72 ipq40xx: glinet-b1300: fix LAN and WAN MAC address assigments
When testing the DSA changes with 5.15.60 kernel, I've noticed, that the
MAC addresses are not properly configured, there is single MAC being
used for LAN and WAN interfaces:

 eth0: 94:83:c4:XX:YY:4a (MAC on sticker)
 lan1@eth0: 94:83:c4:XX:YY:4a
 lan2@eth0: 94:83:c4:XX:YY:4a
 wan@eth0: 94:83:c4:XX:YY:4a
 wlan0: 94:83:c4:XX:YY:4a
 wlan1: 94:83:c4:XX:YY:4b

The same config, prior to the DSA conversion:

 lan/eth0: 94:83:c4:XX:YY:4a (MAC on sticker)
 wan/eth1: 94:83:c4:XX:YY:4b
 wlan0: 94:83:c4:XX:YY:4a
 wlan1: 94:83:c4:XX:YY:4b

Settings in ART partition:

 root@OpenWrt:/# hexdump -C /dev/mtd7 | grep '94 83'
 00000000  94 83 c4 XX YY 4a 94 83  c4 0e YY 4b ff ff ff ff  |.....J.....K....|
 00001000  20 2f 8d 8c 01 01 94 83  c4 XX YY 4a 00 00 20 00  | /.........J.. .|
 00005000  20 2f 5a 3a 01 01 94 83  c4 XX YY 4b 00 00 20 00  | /Z:.......K.. .|

So let's fix it by keeping same MAC address assigment as was done before
DSA conversion and while at it, define `label-mac-device` as well.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-10-03 08:06:43 +02:00
Tomas Lara
2b4f12e55b rockchip: switch to 5.15 kernel
Run tested: NanoPI R4S

Signed-off-by: Tomas Lara <tl849670@gmail.com>
2022-10-02 23:07:50 +02:00
Tomas Lara
fcaf7b32da kernel: add missing config symbols for 5.15
Add missing symbols, needed when rockchip kernel 5.15 is compile with ALL_KMODS=y

Signed-off-by: Tomas Lara <tl849670@gmail.com>
2022-10-02 23:07:50 +02:00
Tomas Lara
c4f0781eae rockchip: refresh kernel 5.15 config
Refreshed using make kernel oldconfig CONFIG TARGET=rockchip .

Signed-off-by: Tomas Lara <tl849670@gmail.com>
2022-10-02 23:07:50 +02:00
David Bauer
db19efee95 ipq40xx: disable boards not converted to DSA
Signed-off-by: David Bauer <mail@david-bauer.net>
2022-10-02 23:04:39 +02:00
Robert Marko
116feb4a1c ipq40xx: remove non-converted network configs
Remove networking configs for non DSA converted boards in ipq40xx.
Currently, they are just causing clutter.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-10-02 23:04:39 +02:00
Robert Marko
132545785b ipq40xx: ipqess: enable threaded NAPI
Enable threaded NAPI by default in IPQESS driver as it significantly
improves network perfromance, in my testing about 100+ Mbps in WAN-LAN
routing.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-10-02 23:04:39 +02:00
Lech Perczak
b9b4c51b2b ipq40xx: Meraki MR33: convert MAC addresses to nvmem
This fixes assigning random MAC to br-lan interface upon boot.
While at that, rename at24@50 node to eeprom@50, to align with upstream
device tree style.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-10-02 23:04:39 +02:00
Robert Marko
550253bdf9 ipq40xx: convert some boards to DSA
Convert IPQ40xx boards to DSA setup.

Signed-off-by: Leon M. George <leon@georgemail.eu>
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Signed-off-by: Nick Hainke <vincent@systemli.org>
Signed-off-by: ChunAm See <z1250747241@gmail.com>
Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
Signed-off-by: Andrew Sim <andrewsimz@gmail.com>
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-10-02 23:04:39 +02:00
Serhii Serhieiev
ad9ecd33cc ipq40xx: qca8k: introduce proper PSGMII calibration
Serhii and others have experienced PSGMII link degradation up to point
that it actually does not pass packets at all or packets arrive as zeros.
This usually happened after a couple of hot reboots.

Serhii has managed to track it down to PSGMII calibration not being done
properly and has fixed it, so all of the code is Serhii-s work.

Signed-off-by: Serhii Serhieiev <adron@mstnt.com>
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-10-02 23:04:39 +02:00
Robert Marko
f5c62c6e91 ipq40xx: qca807x: drop kernel version checks
Since kernel 5.4 has been droppped from IPQ40xx, there is no need to keep
the version checks for kernels older than 5.10.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-10-02 23:04:39 +02:00
Serhii Serhieiev
12eebe8871 ipq40xx: qca807x: add suspend and resume ops
Currently, suspend and resume ops are not present, this means that if user
disables a DSA interface that the PHY-s remain alive and the link is up.

Fix it by using generic PHY suspend and resume ops.

Signed-off-by: Serhii Serhieiev <adron@mstnt.com>
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-10-02 23:04:39 +02:00
Robert Marko
5293c08290 ipq40xx: sxtsq-5-ac: correct TCSR ESS type
SXTsq 5 ac uses RGMII on the port 5 and not PSGMII, so correct the TCSR
interface type property.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-10-02 23:04:38 +02:00
Robert Marko
a4470685ac ipq40xx: enable ethernet and DSA driver combo
Select the Ethernet driver, DSA tag driver and the DSA driver itself to
be built in the kernel config.
They automatically pull in switchdev and phylink.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-10-02 23:04:38 +02:00
Robert Marko
b1f21329d4 ipq40xx: add DSA switch driver
Qualcomm IPQ40xx SoC-s have a variant of QCA8337N switch built-in.

It shares most of the stuff with its external counterpart, however it is
modified for the SoC.
Namely, it doesn't have second CPU port (Port 6), so it has 6 ports
instead of 7.
It also has no built-in PHY-s but rather requires external PSGMII based
companion PHY-s (QCA8072 and QCA8075) for which it first needs to carry
out calibration before using them.
PSGMII has a SoC built-in PHY that is used to connect to the PHY-s which
unfortunately requires some magic values as the datasheet doesnt document
the bits that are being set or the register at all.

Since its built-in it is MMIO like other peripherals and doesn't have its
own MDIO bus but depends on the SoC provided one.

CPU connection is at Port 0 and it uses some kind of a internal connection
and no traditional RGMII/SGMII.
It also doesn't use in-band tagging like other qca8k switches so a shinfo
based tagger is used.

This is based on the current OpenWrt qca8k version that has been imported
from generic target.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-10-02 23:04:38 +02:00
Robert Marko
28b13bb157 ipq40xx: import qca8k from generic
This is just importing the qca8k driver from the generic target.
It will be used as the based for IPQ40xx version, this is just
to be able to see the diff.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-10-02 23:04:38 +02:00
Robert Marko
17a55f9c9d ipq40xx: add PSGMII PHY mode define
PSGMII is a Qualcomm specific mode similar to QSGMII but it has 5 SGMII
lines instead of 4 in QSGMII.

This just adds the support for the PHY layer to be able to identify the
mode for further use.
It is required for the DSA driver.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-10-02 23:04:38 +02:00
Robert Marko
a15ccc2fe0 ipq40xx: add IPQESS ethernet driver
IPQESS is the EDMA replacement driver for the IPQ40xx SoC built-in
ethernet controller.

Unlike EDMA it is Phylink based and doesnt touch PHY-s directly.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-10-02 23:04:38 +02:00
Robert Marko
45ad5beb80 ipq40xx: qca807x: always set PSGMII AZ WAR
There is no point in using a DT property to trigger setting the PSGMII
PHY AZ transmitting ability.
Especially since EEE can be disabled using ethtool anyway.

Fixup the mask for setting the workaround as only BIT(0) is actually being
changed and use the phy_clear_bits_mmd helper instead of reading, then
clearing the bit and writing back as it does everything for us.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-10-02 23:04:38 +02:00
Robert Marko
acc4add9a7 ipq40xx: add shinfo based DSA tag driver
IPQ40xx requires a special DSA tag driver despite using the QCA8337N
switch.
However they have changed the header format and the existing QCA tag
driver cannot be reused.

For details on how it actually works and else read the patch commit
description.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-10-02 23:04:38 +02:00
Robert Marko
ccd08ef912 ipq40xx: disable nodes instead of deleting them
There is no reason to delete the DT PHY nodes
as you can just disable them.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-10-02 23:04:38 +02:00
Robert Marko
378d1a6569 ipq40xx: qca807x: add SFP improvements
Currently, QCA807x doesnt do any kind of validation to see whether it
actually supports the inserted module.

So lets add checks to allow only 1000BaseX and 100BaseFX based modules.

While adding validation, move fiber configuration to insert/remove events
instead of always doing it at config time.
This allows getting rid of the DT property for fiber enable and now only
the upstream sfp phandle is required.

Since we are refactoring fiber related code, lets heavily simplify the
status polling as the current logic is overcomplicated due to previous
wish to support non standard SFP cages that dont have pins properly
connected, that is removed now and only proper SFP cages will work.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-10-02 23:04:38 +02:00
Robert Marko
27b441cbaf ipq40xx: drop ESSEDMA + AR40xx DTS nodes
In order to start working on IPQESS + DSA drop
the old ESSEDMA + AR40xx DTS nodes.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-10-02 23:04:38 +02:00
Robert Marko
6d24d10f3d ipq40xx: drop ESSEDMA + AR40xx
In order to start working on IPQESS + DSA drop the old ESSEDMA + AR40xx
driver combo.

Remove the kernel symbols, disable swconfig and drop swconfig package
as they are not needed anymore.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-10-02 23:04:38 +02:00
Aleksander Jan Bajkowski
fbd33d6164 lantiq: enable interrupts on second VPEs
This patch is needed to handle interrupts by the second VPE on the Lantiq
ARX100, xRX200, xRX300 and xRX330 SoCs. Switching some ICU interrupts to
the second VPE results in a hang. Currently, the vsmp_init_secondary()
function is responsible for enabling these interrupts. It only enables
Malta-specific interrupts (SW0, SW1, HW4 and HW5).

The MIPS core has 8 interrupts defined. On Lantiq SoCs, hardware
interrupts are wired to an ICU instance. Each VPE has an independent
instance of the ICU. The mapping of the ICU interrupts is shown below:
SW0(IP0) - IPI call,
SW1(IP1) - IPI resched,
HW0(IP2) - ICU 0-31,
HW1(IP3) - ICU 32-63,
HW2(IP4) - ICU 64-95,
HW3(IP5) - ICU 96-127,
HW4(IP6) - ICU 128-159,
HW5(IP7) - timer.

This patch enables all interrupt lines on the second VPE.

This problem affects multithreaded SoCs with a custom interrupt controller.
SOCs with 1004Kc core and newer use the MIPS GIC. At this point, I am aware
that the Realtek RTL839x and RTL930x SoCs may need a similar fix. In the
future, this may be replaced with some generic solution.

Tested on Lantiq xRX200.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2022-10-02 20:22:54 +02:00
Alexey Kosmakov
a664d39c5b ramips: add support for SNR SNR-CPE-ME2-Lite
SNR SNR-CPE-ME2-Lite is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based on MT7621A.

Specification:
    - SoC           : MediaTek MT7621A
    - RAM           : DDR3 128 MiB
    - Flash         : SPI-NOR 16 MiB
    - WLAN          : 2.4 GHz 2T2R (MediaTek MT7603E)
                      5 GHz 2T2R (MediaTek MT7613BE)
    - Ethernet      : 10/100/1000 Mbps x5
      - Switch      : MediaTek MT7530 (SoC)
    - UART          : through-hole on PCB
      - J4: 3.3V, GND, TX, RX
      - 57600n8
    - Power         : 12 VDC, 1.5 A

Flash instruction via WEB (firmware 1.10.4 and later)
    1. Boot SNR-CPE-ME2-Lite normally with "Router" mode
    2. Access to "http://192.168.1.1/" and open "Administration -> Management" page
    3. Select the OpenWrt factory image in "Firmware update" section and click "Update" button
    4. Wait ~120 seconds to complete flashing

Flash instruction via TFTP (all version):
    1. Boot SNR-CPE-ME2-Lite to recovery mode (hold the reset button while power on)
    2. Send firmware via TFTP client:
       TFTP Server address: 192.168.1.1
       TFTP Client address: 192.168.1.131
    3. Wait ~120 seconds to complete flashing

Signed-off-by: Alexey Kosmakov <a.kosmakov@nagtech.ru>
2022-10-02 20:21:55 +02:00
Mark King
bf5b1a53d4 ramips: enable LZMA loader to fix Linksys RE6500 boot
At some point after 21.02.3 and before 22.03.0, the size limits of the
Linksys RE6500 were reached and prevent booting from the 22.03.0 release
or builds of current SNAPSHOT. This patch allows builds of master to boot
again and has been tested on my device.

Fixes: #8577

Signed-off-by: Mark King <mark@vemek.co>
2022-10-02 20:21:55 +02:00
John Audia
eed0a31b90 kernel: bump 5.10 to 5.10.146
All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-10-02 20:21:55 +02:00
John Audia
8fe67fae1d kernel: bump 5.10 to 5.10.145
Manually rebased:
  hack-5.10/780-usb-net-MeigLink_modem_support.patch

Removed upstreamed:
  patches-5.10/110-gpio-mpc8xxx-Fix-support-for-IRQ_TYPE_LEVEL_LOW-flow.patch[1]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.145&id=24196210b198e8e39296e277bb93b362aa207775

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-10-02 20:21:55 +02:00
John Audia
e71a360f57 kernel: bump 5.15 to 5.15.71
Removed upstreamed:
  uml/patches-5.15/001-um-fix-default-console-kernel-parameter.patch[1]

All other patches automatically rebased

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

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Compile-tested: mvebu/cortexa72 (RB5009UG+S+IN)
Run-tested: mvebu/cortexa72 (RB5009UG+S+IN)
2022-10-02 20:21:55 +02:00
John Audia
e1b009c1fe kernel: bump 5.15 to 5.15.70
Manually rebased:
  hack-5.15/780-usb-net-MeigLink_modem_support.patch

Removed upstreamed:
  patches-5.15/110-gpio-mpc8xxx-Fix-support-for-IRQ_TYPE_LEVEL_LOW-flow.patch[1]

All other patches automatically rebased.

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

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.70&id=89cfddd416bac41ff35f37f928ed3d7fefef908e

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-10-02 20:21:55 +02:00
Santiago Piccinini
2ad949b11d ath79: fix LibreRouter-v1 watchdog and poe_pass
Watchdog and poe_passthrough gpios require the jtag disabled.

Signed-off-by: Santiago Piccinini <spiccinini@altermundi.net>
2022-10-02 11:39:13 +02:00
Sander Vanheule
918e774658 realtek: use correct CAUSEF_DC macro in prom.c
The workaround for an already-enabled R4K timer used a non-existent
macro CAUSE_DC. Fix compiling by using the actual macro CAUSEF_DC.

Fixes: b7aab19585 ("realtek: SMP handling of R4K timer interrupts")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-10-01 09:56:54 +02:00
Markus Stockhausen
b7aab19585 realtek: SMP handling of R4K timer interrupts
Until now there has been no good explanation why we mess with the R4K
timer on SMP. After extensive testing and looking at the SDK code it
becomes clear what it is all about.

When we disable the CEVT_R4K module (we will do with the new timer
driver) the R4K timer hardware still fires interrupts on the secondary
CPU. To get around this we have two options:

- Disable IRQ 7
- Stop the counter completely

This patch selects option two because this is the root of evil.. To be
on the safe side we will do it only in case the CEVT_R4K module is
disabled.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2022-10-01 09:22:32 +02:00
Markus Stockhausen
2b12da1313 realtek: fix SMP startup
The scope of the SMP startup structure is wrong. It is created on the
stack and not as a global variable. This can lead to startup failures.

Fixes: 3f41360eb7 ("realtek: use upstream recommendation for CPU start")
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de
2022-10-01 09:22:32 +02:00
Olliver Schinagl
f1f97db627
realtek: Convert incorrect v5.10 patches
OpenWRT's developer guide prefers having actual patches so they an be
sent upstream more easily.

However, in this case, Adding proper fields also allows for `git am` to
properly function. Some of these patches are quite old, and lack much
traceable history.

This commit tries to rectify that, by digging in the history to find
where and how it was first added.

It is by no means perfect and also shows some patches that should have
been long gone.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2022-10-01 02:47:57 +02:00
Olliver Schinagl
ba6096d04b
ath79: Convert incorrect 5.10 and 5.15 patches
OpenWRT's developer guide prefers having actual patches so they an be
sent upstream more easily.

However, in this case, Adding proper fields also allows for `git am` to
properly function. Some of these patches are quite old, and lack much
traceable history.

This commit tries to rectify that, by digging in the history to find
where and how it was first added.

It is by no means perfect and also shows some patches that should have
been long gone.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2022-10-01 02:47:56 +02:00
Olliver Schinagl
d5bf46bbe8
generic: Convert incorrect generic/5.10 patches
OpenWRT's developer guide prefers having actual patches so they an be
sent upstream more easily.

However, in this case, Adding proper fields also allows for `git am` to
properly function. Some of these patches are quite old, and lack much
traceable history.

This commit tries to rectify that, by digging in the history to find
where and how it was first added.

It is by no means perfect and also shows some patches that should have
been long gone.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2022-10-01 02:47:56 +02:00
Daniel Golle
ca0e7054d8 ramips: add led driver to UniFi FlexHD defaut package set
Add kmod-leds-ubnt-ledbar to the packages selected by default on the
UniFi FlexHD access point.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-30 13:29:58 +01:00
Daniel Golle
0419f7dead mediatek: add support t-phy settings from efuse on MT7986
Import patches from mtk-openwrt-feeds (MTK SDK) to support reading
t-phy settings affecting PCIe as well as USB2 and USB3 from efuse.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-30 13:29:58 +01:00
Daniel Golle
b18b5a7ca3 mediatek: filogic: add efuse layout to mt7986a.dtsi
efuse is used to store board-specific settings of some of the in-SoC
peripherals. Add it to device tree, so it gets probed on boot and can
be accessed by other drivers.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-30 13:29:58 +01:00
Daniel Golle
243a2184f2 mediatek: add patch allowing 1-byte wide access to efuse
Allow byte-wise access to mtk-efuse as some drivers require that.
Patch imported from mtk-openwrt-feeds (MTK SDK).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-30 13:29:58 +01:00
Felix Fietkau
c7c7905bce kernel: fold lzma debloat patch into the patch adding the code
Reduces the number of hack patches

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-09-30 13:13:51 +02:00
Felix Fietkau
36f2ab4bfd kernel: move kernel image cmdline hack to the octeon target
It is the only remaining user of this hack

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-09-30 13:13:51 +02:00
Felix Fietkau
2e375e9b31 kernel: remove hack patch, move kirkwood specific kmods to target modules.mk
Tweaking the KCONFIG line of kmod-ata-marvell-sata makes the hack patch
unnecessary

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-09-30 12:59:19 +02:00
Felix Fietkau
4363faef8a kernel: move ubnt ledbar driver to a separate package
Simplifies the tree by removing a non-upstream kernel patch and related kconfig
symbols

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-09-30 11:28:51 +02:00
Felix Fietkau
a0a4cfd83b kernel: remove udp tunnel kconfig selection hack
The corresponding kmod package is marked as HIDDEN and selected by all
other kernel modules that need it, so the kconfig side will be in sync
without manual selection

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-09-30 11:28:51 +02:00
Rafał Miłecki
77d9cce604 bcm53xx: backport clk driver fix for DT nodes names
It allows dropping downstream patch renaming DT nodes.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-09-29 05:51:25 +02:00
Chris Osgood
c5e167e0d6
build: fix warnings from grep
Fixes build warnings when using newer versions of grep.

Signed-off-by: Chris Osgood <chris_github@functionalfuture.com>
Tested-by: Georgi Valkov <gvalkov@gmail.com>
2022-09-28 17:17:48 +02:00
Kazuhiro Ito
e739ccb2f6 ramips: update MAC address configuration for Buffalo WSR-1166DHP
Convert MAC address and label_mac configuration of Buffalo
WSR-1166DHP to use the generic function of OpenWrt.

Apply commit 770cfe9 for WCR-1166DS to WSR-1166DHP too.

Tested on the device and MAC address is kept before and after this
change.

Signed-off-by: Kazuhiro Ito <kzhr@d1.dion.ne.jp>
2022-09-28 22:35:02 +09:00
Daniel Golle
9e08724634 kernel: mtk_ppe: use MTK_FOE_STATE_INVALID instead of *_UNBIND
Instead of dropping *fix-typo-in-__mtk_foe_entry.patch which effectively
means keeping the (also wrong) assignment of MTK_FOE_STATE_BIND, rather
use MTK_FOE_STATE_INVALID as that works well on both older (NETSYS_V1)
and newer (NETSYS_V2) MediaTek SoCs.

Suggested-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-28 03:34:47 +01:00
Christian Marangi
165b66d910
realtek: rtl931x: fix missing CONFIG_COMMON_CLK_REALTEK config flag
When the realtek clock driver was introduced, CONFIG_COMMON_CLK_REALTEK
was not correctly disabled for other subtarget. Add the missing config
flag to fix compilation error on buildbot.

Fixes: 4850bd887c ("realtek: add RTL83XX clock driver")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-09-28 01:15:47 +02:00
Daniel Golle
e8b00cfdcb kernel: rename upstreamed patches and import fixes
Move and rename patches which were merged upstream and import follow-up
fixes for MediaTek Ethernet offloading features on MT7622 and Filogic
platforms. Remove patch
793-net-ethernet-mtk_eth_soc-fix-typo-in-__mtk_foe_entry.patch
which breaks hardware flow offloading on MT7622, it will be reverted
upstream as well.

Fixes: c93c5365c0 ("kernel: pick patches for MediaTek Ethernet from linux-next")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-27 17:07:20 +01:00
Felix Fietkau
3a8825ad6a build: fix issues with targets installed via feeds
- fix including modules.mk when a target is being replaced
- fix calling make targets from target/linux

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-09-27 13:41:12 +02:00
Jan Hoffmann
d924a75be3 realtek: fix RTL839x egress tag for ports >= 32
Don't overwrite AS_DPM and L2LEARNING flags when dest_port is >= 32.

Fixes: 1773264a0c ("realtek: correct egress frame port verification")
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
2022-09-25 20:53:24 +02:00
Nick Hainke
a67f484e67 octeon: fix imagebuilder generation by introducing generic target
The generic imagebuilder does not have a generic in the name, although
this is the default naming scheme. Use bcm53xx as template for this fix.

Before the fix:
  openwrt-imagebuilder-octeon.Linux-x86_64.tar.xz

After:
  openwrt-imagebuilder-octeon-generic.Linux-x86_64.tar.xz

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-09-24 23:53:53 +02:00
Florian Eckert
99b6e3cb41 x86/config-5.10: geode: add missing CONFIG_WATCHDOG_CORE option
If this module is not set to y, then I get the following compilation
error during geode build.

Package kmod-w83627hf-wdt is missing dependencies for the following libraries:
watchdog.ko

Setting the linux CONFIG_WATCHDOG_CORE to y as in all other targets
fixes this issue.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-09-24 23:53:53 +02:00
Florian Eckert
fea1705819 x86/config-5.15: geode: add missing CONFIG_WATCHDOG_CORE option
If this module is not set to y, then I get the following compilation
error during geode build.

Package kmod-w83627hf-wdt is missing dependencies for the following
libraries:
watchdog.ko

Setting the linux CONFIG_WATCHDOG_CORE to y as in all other targets
fixes this issue.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-09-24 23:53:53 +02:00
Florian Eckert
355c02d963 linux/x86: add missing CONFIG_WATCHDOG_CORE to *-wdt
The packages also need a dependency to watchdog core. This commit adds the
needed WATCHDOG_CORE dependency.

https://github.com/torvalds/linux/blob/master/drivers/watchdog/Kconfig

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-09-24 23:53:53 +02:00
Giammarco Marzano
0de6a3339f ipq40xx: Add ZTE MF289F
It's a 4G Cat.20 router used by Vodafone Italy (called Vodafone FWA)
and Vodafone DE\T-Mobile PL (called GigaCube).

Modem is a MiniPCIe-to-USB based on Snapdragon X24,
it supports 4CA aggregation.

There are currently two hardware revisions, which
differ on the 5Ghz radio:

AT1 = QCA9984 5Ghz Radio on PCI-E bus
AT2 = IPQ4019 5Ghz Radio inside IPQ4019 like 2.4Ghz

Device specification
--------------------
SoC Type: Qualcomm IPQ4019
RAM: 256 MiB
Flash: 128 MiB SPI NAND (Winbond W25N01GV)
ROM: 2MiB SPI Flash (GD25Q16)
Wireless 2.4 GHz (IP4019): b/g/n, 2x2
Wireless 5 GHz:
	(QCA9984): a/n/ac, 4x4 HW REV AT1
	(IPA4019): a/n/ac, 2x2 HW REV AT2
Ethernet: 2xGbE (WAN/LAN1, LAN2)
USB ports: No
Button: 2 (Reset/WPS)
LEDs: 3 external leds: Network (white or red), Wifi, Power and 1 internal (blue)
Power: 12 VDC, 1 A
Connector type: Barrel
Bootloader: U-Boot

Installation
------------
1. Place OpenWrt initramfs image for the device on a TFTP
   in the server's root. This example uses Server IP: 192.168.0.2
2. Connect serial console (115200,8n1) to serial connector
   GND (which is right next to the thing with MF289F MIMO-V1.0), RX, TX
   (refer to this image: https://ibb.co/31Gngpr).
3. Connect TFTP server to RJ-45 port (WAN/LAN1).
4. Stop in u-Boot (using ESC button) and run u-Boot commands:

setenv serverip 192.168.0.2
setenv ipaddr 192.168.0.1
set fdt_high 0x85000000
tftp openwrt-ipq40xx-generic-zte_mf289f-initramfs-fit-zImage.itb
bootm $loadaddr

5. Please make backup of original partitions, if you think about revert to
   stock, specially mtd16 (Web UI) and mtd17 (rootFS).
Use /tmp as temporary storage and do:

WEB PARITION
--------------------------------------
cat /dev/mtd16 > /tmp/mtd16.bin
scp /tmp/mtd16.bin root@YOURSERVERIP:/
rm /tmp/mtd16.bin

ROOT PARITION
--------------------------------------
cat /dev/mtd17 > /tmp/mtd17.bin
scp /tmp/mtd17.bin root@YOURSERVERIP:/
rm /tmp/mtd17.bin

6. Login via ssh or serial and remove stock partitions
   (default IP 192.168.0.1):

 # this can return an error, if ubi was attached before
 # or rootfs part was erased before.
ubiattach -m 17

 # it could return error if rootfs part was erased before
ubirmvol /dev/ubi0 -N ubi_rootfs
 # some devices doesn't have it
ubirmvol /dev/ubi0 -N ubi_rootfs_data

7. download and install image via sysupgrade -n
 (either use wget/scp to copy the mf289f's squashfs-sysupgrade.bin
 to the device's /tmp directory)

 sysupgrade -n /tmp/openwrt-...-zte_mf289f-squashfs-sysupgrade.bin

Sometimes it could print ubi attach error, but please ignore it
if process goes forward.

Flash Layout

NAND:
mtd8: 000a0000 00020000 "fota-flag"
mtd9: 00080000 00020000 "0:ART"
mtd10: 00080000 00020000 "mac"
mtd11: 000c0000 00020000 "reserved2"
mtd12: 00400000 00020000 "cfg-param"
mtd13: 00400000 00020000 "log"
mtd14: 000a0000 00020000 "oops"
mtd15: 00500000 00020000 "reserved3"
mtd16: 00800000 00020000 "web"
mtd17: 01d00000 00020000 "rootfs"
mtd18: 01900000 00020000 "data"
mtd19: 03200000 00020000 "fota"
mtd20: 0041e000 0001f000 "kernel"
mtd21: 0101b000 0001f000 "ubi_rootfs"

SPI:
mtd0: 00040000 00010000 "0:SBL1"
mtd1: 00020000 00010000 "0:MIBIB"
mtd2: 00060000 00010000 "0:QSEE"
mtd3: 00010000 00010000 "0:CDT"
mtd4: 00010000 00010000 "0:DDRPARAMS"
mtd5: 00010000 00010000 "0:APPSBLENV"
mtd6: 000c0000 00010000 "0:APPSBL"
mtd7: 00050000 00010000 "0:reserved1"

Back to Stock (!!! need original dump taken from initramfs !!!)
-------------
1. Place mtd16.bin and mtd17.bin initramfs image
   for the device on a TFTP in the server's root.
   This example uses Server IP: 192.168.0.2
2. Connect serial console (115200,8n1) to serial console
   connector (refer to the pin-out from above).
3. Connect TFTP server to RJ-45 port (WAN/LAN1).
4. rename mtd16.bin to web.img and mtd17.bin to root_uImage_s
5. Stop in u-Boot (using ESC button) and run u-Boot commands:

This will erase RootFS+Web:
nand erase 0x1000000 0x800000
nand erase 0x1800000 0x1D00000

This will restore RootFS:
tftpboot 0x84000000 ${dir}root_uImage_s
nand erase 0x1800000 0x1D00000
nand write $fileaddr 0x1800000 $filesize

This will restore Web Interface:
tftpboot 0x84000000 ${dir}web.img
nand erase 0x1000000 0x800000
nand write $fileaddr 0x1000000 $filesize

After first boot on stock firwmare, do a factory reset.
Push reset button for 5 seconds so all parameters will
be reverted to the one printed on label on bottom of the router

Signed-off-by: Giammarco Marzano <stich86@gmail.com>
Reviewed-by: Lech Perczak <lech.perczak@gmail.com>
(Warning: commit message did not conform to UTF-8 - hopefully fixed?,
added description of the pin-out if image goes down, reformatted
commit message to be hopefully somewhat readable on git-web,
redid some of the gpio-buttons & leds DT nodes, etc.)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-09-24 23:53:53 +02:00
INAGAKI Hiroshi
c34f071972 ipq40xx: add support for Sony NCP-HG100/Cellular
Sony NCP-HG100/Cellular is a IoT Gateway with 2.4/5 GHz band 11ac
(WiFi-5) wireless function, based on IPQ4019.

Specification:

- SoC                   : Qualcomm IPQ4019
- RAM                   : DDR3 512 MiB (H5TC4G63EFR)
- Flash                 : eMMC 4 GiB (THGBMNG5D1LBAIT)
- WLAN                  : 2.4/5 GHz 2T2R (IPQ4019)
- Ethernet              : 10/100/1000 Mbps x2
  - Transceiver         : Qualcomm QCA8072
- WWAN                  : Telit LN940A9
- Z-Wave                : Silicon Labs ZM5101
- Bluetooth             : Qualcomm CSR8811
- Audio DAC             : Realtek ALC5629
- Audio Amp.            : Realtek ALC1304
- Voice Input Processor : Conexant CX20924
- Micro Controller Unit : Nuvoton MINI54FDE
  - RGB LED, Fan, Temp. sensors
- Touch Sensor          : Cypress CY8C4014LQI
- RGB LED driver        : TI LP55231 (2x)
- LEDs/Keys             : 11x, 6x
- UART                  : through-hole on PCB
  - J1: 3.3V, TX, RX, GND from tri-angle marking
  - 115200n8
- Power                 : 12 VDC, 2.5 A

Flash instruction using initramfs image:

1. Prepare TFTP server with the IP address 192.168.132.100 and place the
   initramfs image to TFTP directory with the name "C0A88401.img"

2. Boot NCP-HG100/Cellular and interrupt after the message
   "Hit any key to stop autoboot:  2"

3. Perform the following commands and set bootcmd to allow booting from
   eMMC

   setenv bootcmd "mmc read 0x84000000 0x2e22 0x4000 && bootm 0x84000000"
   saveenv

4. Perform the following command to load/boot the OpenWrt initramfs image

   tftpboot && bootm

5. On the initramfs image, perform sysupgrade with the sysupgrade image
   (if needed, backup eMMC partitions by dd command and download to
   other place before performing sysupgrade)

6. Wait for ~120 seconds to complete flashing

Known issues:

- There are no drivers for audio-related chips/functions in Linux Kernel
  and OpenWrt, they cannot be used.

- There is no driver for MINI54FDE Micro-Controller Unit, customized for
  this device by the firmware in the MCU. This chip controls the
  following functions, but they cannot be controlled in OpenWrt.

  - RGB LED
  - Fan
    this fan is controlled automatically by MCU by default, without
    driver
  - Thermal Sensors (2x)

- Currently, there is no driver or tool for CY8C4014LQI and cannot be
  controlled. It cannot be exited from "booting mode" and moved to "normal
  op mode" after booting. And also, the 4x buttons (mic mute, vol down,
  vol up, alexa trigger) connected to the IC cannot be controlled.

  - it can be exited from "booting mode" by installing and executing
    i2cset command:

    opkg update
    opkg install i2c-tools
    i2cset -y 1 0x14 0xf 1

- There is a connection issue on the control by uqmi for the WWAN module.
  But modemmanager can be used without any issues and the use of it is
  recommended.

- With the F2FS format, too many errors are reported on erasing eMMC
  partition "rootfs_data" while booting:

  [    1.360270] sdhci: Secure Digital Host Controller Interface driver
  [    1.363636] sdhci: Copyright(c) Pierre Ossman
  [    1.369730] sdhci-pltfm: SDHCI platform and OF driver helper
  [    1.374729] sdhci_msm 7824900.sdhci: Got CD GPIO
  ...
  [    1.413552] mmc0: SDHCI controller on 7824900.sdhci [7824900.sdhci] using ADMA 64-bit
  [    1.528325] mmc0: new HS200 MMC card at address 0001
  [    1.530627] mmcblk0: mmc0:0001 004GA0 3.69 GiB
  [    1.533530] mmcblk0boot0: mmc0:0001 004GA0 partition 1 2.00 MiB
  [    1.537831] mmcblk0boot1: mmc0:0001 004GA0 partition 2 2.00 MiB
  [    1.542918] mmcblk0rpmb: mmc0:0001 004GA0 partition 3 512 KiB, chardev (247:0)
  [    1.550323] Alternate GPT is invalid, using primary GPT.
  [    1.561669]  mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17
  ...
  [    8.841400] mount_root: loading kmods from internal overlay
  [    8.860241] kmodloader: loading kernel modules from //etc/modules-boot.d/*
  [    8.863746] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
  [    9.240465] block: attempting to load /etc/config/fstab
  [    9.246722] block: unable to load configuration (fstab: Entry not found)
  [    9.246863] block: no usable configuration
  [    9.254883] mount_root: overlay filesystem in /dev/mmcblk0p17 has not been formatted yet
  [    9.438915] urandom_read: 5 callbacks suppressed
  [    9.438924] random: mkfs.f2fs: uninitialized urandom read (16 bytes read)
  [   12.243332] mmc_erase: erase error -110, status 0x800
  [   12.246638] mmc0: cache flush error -110
  [   15.134585] mmc_erase: erase error -110, status 0x800
  [   15.135891] mmc_erase: group start error -110, status 0x0
  [   15.139850] mmc_erase: group start error -110, status 0x0
  ...(too many the same errors)...
  [   17.350811] mmc_erase: group start error -110, status 0x0
  [   17.356197] mmc_erase: group start error -110, status 0x0
  [   17.439498] sdhci_msm 7824900.sdhci: Card stuck in wrong state! card_busy_detect status: 0xe00
  [   17.446910] mmc0: tuning execution failed: -5
  [   17.447111] mmc0: cache flush error -110
  [   18.012440] F2FS-fs (mmcblk0p17): Found nat_bits in checkpoint
  [   18.062652] F2FS-fs (mmcblk0p17): Mounted with checkpoint version = 428fa16b
  [   18.198691] block: attempting to load /etc/config/fstab
  [   18.198972] block: unable to load configuration (fstab: Entry not found)
  [   18.203029] block: no usable configuration
  [   18.211371] mount_root: overlay filesystem has not been fully initialized yet
  [   18.214487] mount_root: switching to f2fs overlay

  So, this support uses ext4 format instead which has no errors.

Note:

- The primary uart is shared for debug console and Z-Wave chip. The
  function is switched by GPIO15 (Linux: 427).

  value:

    1: debug console
    0: Z-Wave

- NCP-HG100/Cellular has 2x os-image pairs in eMMC.

  - 0:HLOS, rootfs
  - 0:HLOS_1, rootfs_1

  In OpenWrt, the first image pair is used.

- "bootipq" command in U-Boot requires authentication with signed-image
  by default. To boot unsigned image of OpenWrt, use "mmc read" and
  "bootm" command instead.

- This support is for "Cellular" variant of NCP-HG100 and not tested on
  "WLAN" (non-cellular) variant.

- The board files of ipq-wifi may also be used in "WLAN" variant of
  NCP-HG100, but unconfirmed and add files as for "Cellular" variant.

- "NET" LED is used to indicate WWAN status in stock firmware.

- There is no MAC address information in the label on the case, use the
  address included in UUID in the label as "label-MAC" instead.

- The "CLOUD" LEDs are partially used for indication of system status in
  stock firmware, use they as status LEDs in OpenWrt instead of RGB LED
  connected to the MCU.

MAC addresses:

LAN    : 5C:FF:35:**:**:ED (ART, 0x6    (hex))
WAN    : 5C:FF:35:**:**:EF (ART, 0x0    (hex))
2.4 GHz: 5C:FF:35:**:**:ED (ART, 0x1006 (hex))
5 GHz  : 5C:FF:35:**:**:EE (ART, 0x5006 (hex))

partition layout in eMMC (by fdisk, GPT):

Disk /dev/mmcblk0: 7733248 sectors, 3776M
Logical sector size: 512
Disk identifier (GUID): ****
Partition table holds up to 20 entries
First usable sector is 34, last usable sector is 7634910

Number  Start (sector)    End (sector)  Size Name
     1              34            1057  512K 0:SBL1
     2            1058            2081  512K 0:BOOTCONFIG
     3            2082            3105  512K 0:QSEE
     4            3106            4129  512K 0:QSEE_1
     5            4130            4641  256K 0:CDT
     6            4642            5153  256K 0:CDT_1
     7            5154            6177  512K 0:BOOTCONFIG1
     8            6178            6689  256K 0:APPSBLENV
     9            6690            8737 1024K 0:APPSBL
    10            8738           10785 1024K 0:APPSBL_1
    11           10786           11297  256K 0:ART
    12           11298           11809  256K 0:HSEE
    13           11810           28193 8192K 0:HLOS
    14           28194           44577 8192K 0:HLOS_1
    15           44578          306721  128M rootfs
    16          306722          568865  128M rootfs_1
    17          568866         3958065 1654M rootfs_data

[initial work]
Signed-off-by: Iwao Yuki <dev.clef@gmail.com>
Co-developed-by: Iwao Yuki <dev.clef@gmail.com>
[adjustments, cleanups, commit message, sending patch]
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
(dropped clk_unused_ignore, dropped 901-* patches, renamed
key nodes, changed LEDs chan/labels to match func-en, made
:net -> (w)wan leds)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-09-24 23:53:53 +02:00
Tomasz Maciej Nowak
0410c95f0b ipq40xx: base-files: properly close case
Fix this occurrence during boot:
/bin/board_detect: line 10: Unsupported: not found

Fixes: 80baffd2aa (" ipq40xx: add support for Pakedge WR-1")
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2022-09-24 23:53:53 +02:00
Tomasz Maciej Nowak
04eb080290 ipq40xx: luma_wrtq-329acn: differentiate ethernet mac addresses
On OEM firmware both addresses for In and Out ports are different. Set
them as such also in OpenWrt.

Fixes: e24635710c (" ipq40xx: add support for Luma Home WRTQ-329ACN")
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2022-09-24 23:53:53 +02:00
Christian Lamparter
3aec35ab96 apm821xx: make 5.15 kernel default
5.15 has been available for some time for testing.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-09-24 23:53:53 +02:00
Christian Lamparter
48ef669759 apm821xx: refresh 5.15 config
use the toolchain's default CPU (464fp) as the CPU option.
This fixes a CPU selection prompt which shows up now.

CPU selection
> 1. Generic 32 bits powerpc (POWERPC_CPU) (NEW)
  2. Rely on the toolchain's implicit default CPU (TOOLCHAIN_DEFAULT_CPU) (NEW)

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-09-24 23:53:53 +02:00
Kasparas Elzbutas
e562746263 ipq40xx: fix RUTX10 Wi-Fi woes
This partially reverts:
commit cfc13c4459 ("ipq40xx: utilize nvmem-cells for macs & (pre-)calibration data")

U-Boot on these devices mangles the device tree,
so nvmem-cell type calibration doesn't work.

Fixes: cfc13c4459 ("ipq40xx: utilize nvmem-cells for macs & (pre-)calibration data")
Signed-off-by: Kasparas Elzbutas <elzkas@gmail.com>
(added reference to commit, rewrote commit message)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-09-24 23:53:53 +02:00
Christian Lamparter
e2f0821b5a uml: add Kernel 5.15 support via testing
Add the latest default Kernel for testing.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-09-24 23:53:53 +02:00
Christian Lamparter
8bea5edf89 uml: fix 5.10 build
the 5.10 uml build currently breaks with:

/usr/bin/ld: arch/um/os-Linux/signal.o: in function `sigusr1_handler':
arch/um/os-Linux/signal.c:141: undefined reference to `uml_pm_wake'

But there's an upstream fix for this. Backport the fix
for now but also let upstream know so it finds its way
through the -stable releases.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-09-24 23:53:53 +02:00
Hauke Mehrtens
f08f7e88c9 kernel: Move some IOMMU options to generic
This adds some missing IOMMU related options for x86/64 and moves some
of them to generic for all targets.

On x86 IOMMU_DEFAULT_DMA_LAZY is used by default, on all other platforms
IOMMU_DEFAULT_DMA_STRICT is the default. we just follow the default
kernel configuration here.

Fixes: 8fea4a102c ("x86/64: enable IOMMU support")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-09-24 13:49:47 +02:00
Nick Hainke
579703f38c ath79: switch to 5.15 as default kernel
The 5.15 kernel has new interesting features like MGLRU. Most of the
targets already have added support for testing kernel 5.15 since April
2022. Set 5.15 as default for all subtargets.

Testing support was added here:
- ae6bfb7d67 ("ath79: tiny: add 5.15 support for tiny subtarget")
- 9a0155bc4f ("ath79: add 5.15 support for generic subtarget")
- 5af9aafabb ("ath79: mikrotik: add 5.15 support for mikrotik subtarget")
- f3fa68e515 ("ath79: nand: add 5.15 support for nand subtarget")

Tested on:
- Nanostation M5 XM (tiny)
- TP-Link EAP-225 Outdoor (generic)
- TP-Link CPE210 (generic)

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-09-24 13:04:24 +02:00
Will Moss
a24e07700d
kernel: fix mac-address-increment on driver probe defer
Fixes situations where MAC address gets incremented multiple times
if device initialization fails at first and then is deferred.

Fixes: d284e6ef0f ("treewide: convert mtd-mac-address-increment* to generic implementation")
Signed-off-by: Will Moss <willormos@gmail.com>
2022-09-23 12:16:29 +02:00
Christian Marangi
dce035bb71
generic: 5.15: add missing PAGE_POOL_STATS config
Add new PAGE_POOL_STATS config backported for the mtk offload patches.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-09-23 02:06:00 +02:00
Daniel Golle
c93c5365c0
kernel: pick patches for MediaTek Ethernet from linux-next
Pick patches with several fixes and improvements, preparation for
upcoming WED (TX) [1] as well as basic XDP support [2] with MediaTek's
Filogic SoCs to the mtk_eth_soc driver.

Also pick follow-up patch fixing Ethernet on MT7621 [3].

Tested on Bananapi BPi-R3 (MT7986), Bananapi BPi-R64 (MT7622),
Bananapi BPi-R2 (MT7623), MikroTik RouterBoard M11G (MT7621).

[1]: https://patchwork.kernel.org/project/netdevbpf/list/?series=662108&state=*
[2]: https://patchwork.kernel.org/project/netdevbpf/list/?series=675368&state=*
     (the first part of the series adding wed nodes to mt7986a.dtsi was
      applied to the copy of mt7986a.dtsi in our tree)
[3]: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=5e69163d3b9931098922b3fc2f8e786af8c1f37e

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-22 23:55:02 +01:00
Felix Fietkau
6eeb5d4564 kernel: disable wireless extensions only when needed
They are only needed by a few very old drivers

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-09-22 15:26:58 +02:00
John Audia
37a0cae33e kernel: bump 5.15 to 5.15.69
All patches automatically rebased

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-09-22 12:46:55 +02:00
John Audia
eff4f8b2f0 kernel: bump 5.10 to 5.10.144
All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-09-22 12:46:55 +02:00
Hauke Mehrtens
8762759015 kernel: Reorder kernel configuration
This was done by running this:
./scripts/kconfig.pl '+' target/linux/generic/config-5.15 /dev/null > target/linux/generic/config-5.15-new
mv target/linux/generic/config-5.15-new target/linux/generic/config-5.15

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-09-22 11:48:39 +02:00
Hauke Mehrtens
fa578335c9 kernel: Deactivate CONFIG_DEFAULT_FQ_PIE by default
When building OpenWrt with CONFIG_ALL_KMODS the kernel build will ask
for CONFIG_DEFAULT_FQ_PIE option. This deactivates it by default.

Fixes: c3e4a0d99b ("kernel: netsupport: Add FQ-PIE as an optional sched kmod and extract PIE")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-09-22 11:46:48 +02:00
Nicola Corna
8fea4a102c x86/64: enable IOMMU support
Enable IOMMU support for Intel and AMD x86 platforms. With this, when the
vfio module is present, physical PCI devices can be passed to VMs, for
example with `qemu-system-x86_64 -device vfio-pci,host=05:00.0 ...`.

IOMMU support increases the kernel size by a small amount (~370KB, from
5239840 B to 5611200 B, a ~7% increase in size).

Signed-off-by: Nicola Corna <nicola@corna.info>
2022-09-21 13:06:10 +02:00
Rafał Miłecki
1722e23ffc bcm4908: fix -EPROBE_DEFER support in bcm4908_enet
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-09-21 07:54:21 +02:00
Rafał Miłecki
5652f378c6 kernel: update U-Boot NVMEM driver
1. Fix casting
2. Support DT-defined variables

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-09-20 23:08:19 +02:00
Rafał Miłecki
137149847d bcm4908: backport mtd parser for Broadcom's U-Boot partition
Broadcom's U-Boot contains environment data blocks. They need to be
found (offsets aren't predefined) to access env variables.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-09-20 22:36:46 +02:00
Stijn Tintel
117f41ee95 mediatek: fix Unifi 6LR network config
When the v1 and v2 variants of the U6LR were introduced, the board
network config was not adapted to the new device names. Due to this, the
wrong network config is applied during initial boot. The resulting
config has lan, wan and a switch, while this device only has a single
ethernet interface without a switch.

Fix this by using a wildcard that matches all the variants.

Fixes: 15a02471bb ("mediatek: new target mt7622-ubnt-unifi-6-lr-v1")
Fixes: 5c8d3893a7 ("mediatek: new target ubnt_unifi-6-lr-v1-ubootmod")
Fixes: 31d86a1a11 ("mediatek: add Ubiquiti UniFi 6 LR v2 targets")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Daniel Golle <daniel@makrotopia.org>
2022-09-20 22:07:59 +03:00
Felix Fietkau
0a72695844 kernel: backport MTK ethernet/WLAN offload fixes
Fixes issues with offloading to WED, especially with VLAN bridges involved

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-09-20 12:08:26 +02:00
Florian Eckert
027845b4ce target/x86: add grub2-bios-setup to DEFAULT_PACKAGES
With the commit 5876d6a62f the command under
`/usr/sbin/grub-bios-setup` has been moved to its own package named
`grub-bios-setup`.

The script `81_upgrade_bootloader` under `/lib/preinit` is used by all
x86 targets to update the bootloader. The script is using the command
`grub-bios-setup` for this.

I get the following output at the first boot after the upgrade.
`/etc/preinit: line 9: /usr/sbin/grub-bios-setup: not found`.

To fix this, the DEFAULT_PACKAGES dependency is extended by the entry
`grub2-bios-setup` so that the missing command is installed again.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-09-19 19:30:15 +02:00
Andrew Sim
e2ffb61821
ipq40xx: fix power LED colour ID in Netgear WAC510 dts
led_power_green color ID in dts is mistakenly set to amber so
correct it by setting it to green

Signed-off-by: Andrew Sim <andrewsimz@gmail.com>
2022-09-19 17:49:56 +02:00
Christian Marangi
691b3dd35e
generic: 5.15: backport stmmac patches to change MTU
Backport stmmac patches to change MTU while the interface is up.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-09-19 15:19:54 +02:00
Christian Marangi
7ace30aeb6
generic: 5.15: qca8k: backport code split patch
Backport upstream code split patch for qca8k needed for ipq40xx target
to correctly implement a DSA driver.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-09-19 15:19:53 +02:00
Christian Marangi
ddcebda08b
generic: 5.15: qca8k: add kernel version tag on backport patch
Add kernel tag that introduced the patch on backport patch.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-09-19 15:19:53 +02:00
Markus Stockhausen
3f41360eb7 realtek: use upstream recommendation for secondary CPU start
Currently we fix interrupts/timers for the secondary CPU by patching
vsmp_init_secondary(). Get a little bit more generic and use the
upstream recommended way instead. Additionally avoid a check around
register_cps_smp_ops() because it does that itself.

See https://lkml.org/lkml/2022/9/12/522

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2022-09-18 20:38:56 +02:00
Markus Stockhausen
bcb5d6b21b realtek: avoid wrong interrupt routing
The interrupt controller depends on two control registers. GIMR enables
or disables interrupts and IRRx routes these to MIPS CPU interrupts 2-7.
Wiki currently states "A value of '0' (in IRRx) disconnects this input from
the output line, independent of the line's setting in GIMR."

Contrary to normal intuition this statement DOES NOT mean, that interrupts
can be disabled by IRRx alone. The sad truth was discovered by enabling
SMP for an Zyxel XGS1010 on the 930x target. It shows that driver and
interrupts behave as follows:

- Timer 0 interrupt 7 has active routing to CPU0 and no routing to CPU1
- Timer 1 interrupt 8 has no routing to CPU0 and active routing to CPU1
- Unmasking (enabling) interrupts writes 1 bits to all GIMR registers
- Masking (disabling) interrupts writes 0 bits to both GIMR registers

During operation we can encounter a situation like

- GIMR bit for a interrupt/CPU combination is set to enabed (=1)
- IRRx routing bits for a interrupt/CPU combination are set to disabed (=0)

This setting already allows the hardware to fire interrupts to the target
CPU/VPE if the other CPU/VPE is currently busy. Especially for CPU bound
timer interrupts this is lethal. If timer interrupt 7 arrives at CPU1 and
vice versa for interrupt 8 the restart trigger gets lost. The timer dies
and a msleep() operation in the kernel will halt endlessly.

Fix this by tracking the IRRx active routing setting in a new bitfield with
0="routing active" and 1="no routing". Enable interrupts in GIMR only
for a interrupt & CPU if routing is active. Thus we have

- GIMR = 0 / IRRx = 0 -> everything disabled
- GIMR = 1 / IRRx > 0 -> active and normal routing
- GIMR = 0 / IRRx > 0 -> masked (disabled) with normal routing
- GIMR = 1 / IRRx = 0 -> no longer possible

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2022-09-18 20:38:56 +02:00
Sungbo Eo
f0ea3df439 ipq40xx: disable devices with 3MiB kernel size
The image builds for Linksys EA6350 v3, EA8300, and MR8300 currently
fail on buildbots due to the KERNEL_SIZE, as stated in commit
17b7756b5a ("ipq40xx: 5.15: add testing kernel version"). Disable
these boards for now.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2022-09-18 21:33:50 +09:00
Arınç ÜNAL
c77858aa79 ramips: mt7621-dts: change phy-mode of gmac1 to rgmii
Change phy-mode of gmac1 to rgmii on mt7621.dtsi. Same code path is
followed for delayed rgmii and rgmii phy-mode on mtk_eth_soc.c.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
2022-09-18 11:50:32 +02:00
Arınç ÜNAL
2a6ef7f53d ramips: fix GB-PC1 and GB-PC2 LEDs
Add the missing LEDs for GB-PC2. Some of these LEDs don't exist on the
device schematics. Tests on a GB-PC2 by me and Petr proved otherwise.

Remove ethblack-green and ethblue-green LEDs for GB-PC1. They are not wired
to GPIO 3 or 4 and the wiring is currently unknown.

Set ethyellow-orange to display link state and activity of the ethyellow
interface for GB-PC2.

Link: https://github.com/ngiger/GnuBee_Docs/blob/master/GB-PCx/Documents/GB-PC2_V1.1_schematic.pdf
Tested-by: Petr Louda <petr.louda@outlook.cz>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
2022-09-18 11:50:32 +02:00
Sander Vanheule
fe5a2f334f realtek: use Device prefix for common recipes
The Build prefix is used for image build commands, while the Device
prefix should be used for base recipes for devices. Apply the same
naming convention here.

While touching the file, also fix the mixed indentation.

Suggested-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-09-18 10:12:19 +02:00
Olliver Schinagl
d2fa68379f realtek: move Netgear recipe to subtarget Makefile
There seems to be no reason to have the Netgear switches as part of
the main Makefile. Move it to its subtarget-specific Makefile since
it is only applicable there.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
[update commit message]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-09-17 22:27:32 +02:00
Sander Vanheule
51ecfb086c realtek: move hpe_1920 recipe to common.mk
Currently supported HPE 1920 devices all have an RTL838x SoC, but there
are larger switches with RTL839x SoCs, although currently not supported.
Move the build recipe to common.mk so the larger devices can also make
use of the recipe, while moving it out of the main Makefile.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-09-17 22:20:32 +02:00
Sander Vanheule
9338c09ecb realtek: merge duplicated DGS-1210 recipes
The D-Link DGS-1210 device series currently has supported devices with
both RTL838x and RTL839x SoCs. An image build recipe has been defined in
both subtarget makefiles, but these are mostly identical, save for the
SOC variable.

Move the SOC variable from the DGS-1210 build recipes to the applicable
devices, and put the remaining duplicate code in a shared Makefile.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-09-17 22:12:35 +02:00
Markus Stockhausen
e04e821471 realtek: add support for DGS-1210-52
Hardware specification
----------------------

* RTL8393M SoC, 1 MIPS 34Kc core @ 700MHz
* 128MB DRAM
* 32MB NOR Flash
* 48 x 10/100/1000BASE-T ports
  - 6 x External PHY with 8 ports (RTL8218D)
* 4 x Gigabit RJ45/SFP Combo ports
  - External PHY with 4 SFP ports (RTL8214FC)
* Power LED
* Reset button on front panel
* UART (115200 8N1) via unpopulated standard 0.1" pin header marked J14

The gpio-restart node is not required but it does reset the switch.

TODO: The 4 combo ports attached to the RTL8214FC are not detect
properly. Linux kernel reports 49 and 50 as "External RTL8393 SERDES"
and 51 and 52 as "RTL8218B (external)". Those ports only work if
u-boot initialize it (for example, loading initramfs image using one
of those ports). A patch to PHY detection is needed for full support.

The firmware recovery using U-Boot is broken for all DGS-1210 tested
devices as pressing RESET does not trigger it (only if pressed from a
running stock image)

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

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

Installation using OEM upgrade
------------------------------

1. Make sure you are running OEM firmware in image2 slot (logged as admin):
   - > config firmware image_id 2 boot_up
   - > reboot
2. Install squashfs-factory_image1.bin to image1 using (logged as admin):
   - > download firmware_fromTFTP <tftpserver> factory_image1.bin
   - > config firmware image_id 1 boot_up
   - > reboot

Installation using serial interface
-----------------------------------

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

Once booted the initramfs, install the squashfs-sysupgrade.bin as a
normal OpenWrt system.

Dual-boot with stock firmware using writable u-boot-env
-------------------------------------------------------

From stock to OpenWrt / boot image 1 (CLI as admin):
   - > config firmware image_id 1 boot_up
   - > reboot

From OpenWrt to stock / boot image 2: (shell as root)
   - # fw_setenv bootcmd 'run addargs ; bootm 0xb4e80000'
   - # fw_setenv image '/dev/mtdblock7'
   - # reboot

Debrick using serial interface
------------------------------

1. Press Escape key during `Hit Esc key to stop autoboot` prompt
2. In a Windows PC, run 'D-Link Network Assistant v2.0.2.4'. It should
   detect the switch
3. Flash the firmware.

Back to stock firmware using dual-boot
--------------------------------------

If you have serial interface, you can change u-boot env vars
interrupting the boot process. If not but you are running OpenWrt, you
can dual-boot (as mentioned eariler) and skip to step 4:

1. Press Escape key during `Hit Esc key to stop autoboot` prompt
2. Press CTRL+C keys to get into real U-Boot prompt
3. Boot the image 2:
   - set image /dev/mtdblock7; run addargs; bootm 0xb4e80000
4. Once booted, log as admin and change the boot image to 2
   - > config firmware image_id 2 boot_up
   - > reboot
5. After the boot, flash image1 with the vendor image

Back to stock firmware using DNA
--------------------------------

1. From an OpenWrt:
   - # fw_setenv bootstop on
   - # reboot
2. In a Windows PC, run 'D-Link Network Assistant v2.0.2.4'. It should
   detect the switch
3. Flash the firmware.

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

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2022-09-17 21:28:21 +02:00
Markus Stockhausen
9ed1a1138e realtek: align DT macros in RTL839X with RTL838X
Add a missing definition to the RTL839X DT.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2022-09-17 21:28:21 +02:00
Markus Stockhausen
307e5cfc6e realtek: D-Link make common DT include generic
The D-Link DGS device tree was reorganized to better reflect the common
DT parts. The common include is named SOC specific (838X) and it seemed
like a good choice to add another common include in the future for the
RTL839X devices. From the current point of view this option is not really
needed.

1. The common part only includes data that matches RTL839X devices too.
2. The Panasonic DT structure avoids including the basic DTSI inside the
   common DTSI.

Taking simplicity of the Panasonic include logic and in perparation to
provide DGS-1210-52 support it makes sense to harmonize this.

- rename common include to reflect its content
- move the link to the root DTSI directly to the device specific DTS

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2022-09-17 21:28:21 +02:00
Sungbo Eo
b201462c89 ramips: 5.15: add disabled PINCTRL_AW9523
Otherwise kernel 5.15 will fail to build on subtargets except for mt7621
that has enabled the config.
The disabled PINCTRL_AW9523 config disappears after a refresh, it needs
to be added back manually.

Fixes: 675cf75578 ("ramips: add config-5.15 for mt7620 subtarget")
Fixes: 001176994a ("ramips: add config-5.15 for mt76x8 subtarget")
Fixes: b9d9f33c33 ("ramips: add config-5.15 for rt288x subtarget")
Fixes: 0164dc0c25 ("ramips: add config-5.15 for rt305x subtarget")
Fixes: ef59da8669 ("ramips: add config-5.15 for rt3883 subtarget")
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2022-09-18 03:09:19 +09:00
Sungbo Eo
bcd5d35dc0 ramips: 5.15: refresh subtarget kconfigs
Refresh config with `make kernel_oldconfig`.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2022-09-18 03:09:19 +09:00
Sungbo Eo
deb6f378bf ath79: specify factory.bin recipe for ASUS RP-AC51
Currently factory.bin image recipe of ASUS RP-AC51 is not specified
explicitly and is thus set to the leaked one from the device recipe
right above, i.e. ASUS PL-AC56. Fix it to avoid potential breakage.

Fixes: 416d4483e8 ("ath79: add support for ASUS RP-AC51")
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2022-09-18 03:09:19 +09:00
Andre Heider
33e2115fe4 ltq-vdsl-app: rename to ltq-vdsl-vr9-app
This matches the scheme used by other target packages and will avoid
confusion with any future version.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2022-09-17 17:39:23 +02:00
John Audia
b77217d916 kernel: bump 5.10 to 5.10.143
All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-09-17 14:16:37 +02:00
John Audia
fe209fa47d kernel: bump 5.15 to 5.15.68
All patches automatically rebased

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-09-17 14:16:37 +02:00
Koen Vandeputte
731646e13a kernel: mhi: backport upstream patch
This patch will print the name of the modem in the bootlog
during probing.

This allows to verify that the exact model was loaded and not some
generic type.

The only other way to do this is by enabling dynamic debugging
which is disabled by default in OpenWRT

Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
2022-09-16 09:17:24 +02:00
Daniel Golle
8010d3da03 mediatek: build USB XHCI support as module
Instead of always including the XHCI driver in the kernel on all
MediaTek boards, selectively include the kernel module only on boards
which actually make use of USB functionality.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-14 20:26:58 +01:00
Olliver Schinagl
c4d030f24c
realtek: rtl838x: Fix ethernet polling timeout on probe
Due to an oversight we accidentally inverted the timeout check. This
patch corrects this.

Fixes: 9cec4a0ea4 ("realtek: Use built-in functionality for timeout loop")
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
[ wrap poll_timeout line to 80 char ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-09-14 18:23:06 +02:00
Petr Štetiar
67144f38e7 armvirt: make 5.15 kernel default
In order to begin testing of upcoming kernel.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-09-14 16:45:06 +02:00
Petr Štetiar
4ed850fcb1 malta: make 5.15 kernel default
In order to begin testing of upcoming kernel.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-09-14 16:45:06 +02:00
Wojciech Dubowik
016c934482 mpc85xx: Add 5.15 kernel as testing and fix configs
Build system: x86_64
Build-tested: generic
Run-tested: generic/TL-WDR4900 v1 board from TP-Link

Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@westermo.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [un-dmarc]
2022-09-14 16:45:06 +02:00
Wojciech Dubowik
00643b4584 mpc85xx: Copy over kernel 5.10 patches and config to 5.15
Split patches for better change visibility.

Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@westermo.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [un-dmarc, commit description]
2022-09-14 16:45:06 +02:00
Tomasz Maciej Nowak
df59c07fe9 tegra: add kernel 5.15 support
- refresh config
- disable suspend as it's pointless in the sope of OpenWrt
- enable CPU frequency scaling

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2022-09-14 16:45:06 +02:00
Tomasz Maciej Nowak
f8cd56def6 tegra: copy patches and config for kernel 5.15
Simple copy to better illustrate the forthcoming changes.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2022-09-14 16:45:06 +02:00
Rafał Miłecki
2f50c53f17 bcm53xx: update NVMEM driver for NVRAM
Include support for NVMEM cells.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-09-14 14:21:57 +02:00
Olliver Schinagl
9cec4a0ea4
realtek: Use built-in functionality for timeout loop
In commit 81e3017609 ("realtek: clean up rtl838x MDIO busy wait loop")
a hand-crafted loop was created, that nearly exactly replicate the
iopoll's `read_poll_timeout` functionality.

Use that instead.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2022-09-14 12:03:57 +02:00
Rosen Penev
cfd916065f
mt7621: fix Linksys E7350 GPIO
When converting this device to use both GMACs, I mistakenly removed
state_default, which prevented GPIO LEDs and keys from being used.

Fixes: f4eef5f2a1 ("ramips: add support for Linksys E7350")

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-09-13 22:19:10 +02:00
Rosen Penev
fb59070466
mt7621: fix Belkin RT1800 GPIO
When converting this device to use both GMACs, I mistakenly removed
state_default, which prevented GPIO LEDs and keys from being used.

Add back and and extra LEDs that were missing.

Tested all LEDs by turning them on.

Fixes: 26a6a6a60b ("ramips: add support for Belkin RT1800")

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-09-13 22:19:10 +02:00
Alexandru Gagniuc
01e2184c49 realtek: add support for TP-Link SG2210P
Add support for the TP-Link SG2210P switch. This is an RTL8380 based
switch with eight RJ-45 ports with 802.3af PoE, and two SFP ports.

This device shares the same board with the SG2008P and SG2008. To
model this, declare all the capabilities in the sg2xxx dtsi, and
disable unpopulated on the lower end models.

Specifications:
---------------
 - SoC:       Realtek RTL8380M
 - Flash:     32 MiB SPI flash (Vendor varies)
 - RAM:	      256 MiB (Vendor varies)
 - Ethernet:  8x 10/100/1000 Mbps with PoE (all ports)
              2x SFP ports
 - Buttons:   1x "Reset" button on front panel
 - Power:     53.5V DC barrel jack
 - UART:      1x serial header, unpopulated
 - PoE:       2x TI TPS23861 I2C PoE controller

Works:
------
  - (8) RJ-45 ethernet ports
  - (2) SFP ports (with caveats)
  - Switch functions
  - System LED

Not yet enabled:
----------------
  - Power-over-Ethernet (driver works, but doesn't enable "auto" mode)
  - PoE LEDs

Enabling SFP ports:
-------------------

The SFP port control lines are hardwired, except for tx-disable. These
lines are controller by the RTL8231 in shift register mode. There is
no driver support for this yet.

However, to enable the lasers on SFP1 and SFP2 respectively:

    echo 0x0510ff00 > /sys/kernel/debug/rtl838x/led/led_p_en_ctrl
    echo      0x140 > /sys/kernel/debug/rtl838x/led/led_sw_p_ctrl.26
    echo      0x140 > /sys/kernel/debug/rtl838x/led/led_sw_p_ctrl.24

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

The footprints R27 (0201) and R28 (0402) are not populated. To enable
serial console, 50 ohm resistors should be soldered -- any value from
0 ohm to 50 ohm will work. R27 can be replaced by a solder bridge.

The u-boot firmware drops to a TP-Link specific "BOOTUTIL" shell at
38400 baud. There is no known way to exit out of this shell, and no
way to do anything useful.

Ideally, one would trick the bootloader into flashing the sysupgrade
image first. However, if the image exceeds 6MiB in size, it will not
work. The sysupgrade image can also be flashed. To install OpenWrt:

Prepare a tftp server with:
 1. server address: 192.168.0.146
 2. the image as: "uImage.img"

Power on device, and stop boot by pressing any key.
Once the shell is active:
 1. Ground out the CLK (pin 16) of the ROM (U7)
 2. Select option "3. Start"
 3. Bootloader notes that "The kernel has been damaged!"
 4. Release CLK as sson as bootloader thinks image is corrupted.
 5. Bootloader enters automatic recovery -- details printed on console
 6. Watch as the bootloader flashes and boots OpenWrt.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
[OpenWrt capitalisation in commit message]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-09-13 09:22:26 +02:00
Alexandru Gagniuc
ab2a4c1e01 realtek: rtl8380-tl-sg2xxx: use a single "firmware" partition
The "firmware" partition was assembled from two contiguous partitions.
This complexity is unnecessary. Instead of using mtd-concat over
"sys" and "usrimg1", simply declare the "firmware" partition to cover
the flash space instead.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2022-09-13 09:22:26 +02:00
Alexandru Gagniuc
d55c087390 realtek: tl-sg2xxx: read MAC address from nvmem-cells
The TP-Link RTL83xx based switches have their MAC address programmed
in the "para" partition. While in theory, the format of this partition
is dynamic, in practice, the MAC address appears to be located at a
consistent address. Thus, use nvmem-cells to read this MAC address.

The main MAC is required for deriving the MAC address of the switch
ports. Instead of reading it via mtd_get_mac_binary(), alias the
ethernet0 node as the label-mac-device, and use get_mac_label().

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2022-09-13 09:22:26 +02:00
Alexandru Gagniuc
5f026f1272 realtek: rtl838x: label switch port dts nodes
Although PHY nodes are labeled, the port nodes were not. Labeling of
ports is useful for 'status = "disabled"' ports, which is supported
since commit 9a7f17e11f ("realtek: ignore disabled switch ports")

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2022-09-13 09:22:26 +02:00
Alexandru Gagniuc
bc9dcfb1ce realtek: split TP-Link SG2000 series devicetree
The TP-Link TL-SG2008, TL-SG2008P, and TL-SG2210P use the same board.
The main difference is that some footprints are not populated in the
lower-end models. To model this with minimal duplication, move the
devicetree to a common dtsi, leaving out just the board name.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
[remove port relabelling from commit message, already merged with commit
 18a2b29aa1 ("realtek: tl-sg2008p: fix labeling of lan ports")]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-09-13 09:22:26 +02:00
Hauke Mehrtens
9403810c02 toolchain: Select USE_SSTRIP with external musl toolchain
When we use the internal toolchain USE_SSTRIP will be selected by
default for musl libc and USE_STRIP when glibc is used. Do the same when
an external toolchain is used. USE_GLIBC will also be set for external
toolchain builds based on the EXTERNAL_TOOLCHAIN_LIBC_USE_GLIBC setting.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-09-12 23:16:22 +02:00
Daniel Golle
31a6605de0 mac80211: rt2x00: experimental improvements for MT7620 wifi
Serge Vasilugin reports:

To improve mt7620 built-in wifi performance some changes:
1. Correct BW20/BW40 switching (see comments with mark (1))
2. Correct TX_SW_CFG1 MAC reg from v3 of vendor driver see
	https://gitlab.com/dm38/padavan-ng/-/blob/master/trunk/proprietary/rt_wifi/rtpci/3.0.X.X/mt76x2/chips/rt6352.c#L531
3. Set bbp66 for all chains.
4. US_CYC_CNT init based on Programming guide, default value was 33 (pci),
   set chipset bus clock with fallback to cpu clock/3.
5. Don't overwrite default values for mt7620.
6. Correct some typos.
7. Add support for external LNA:
    a) RF and BBP regs never be corrected for this mode
    b) eLNA is driven the same way as ePA with mt7620's pin PA
	but vendor driver explicitly pin PA to gpio mode (for forrect calibration?)
	so I'm not sure that request for pa_pin in dts-file will be enough

First 5 changes (really 2) improve performance for boards w/o eLNA/ePA.
Changes 7 add support for eLNA

Configuration w/o eLAN/ePA and with eLNA show results
tx/rx (from router point of view) for each stream:
 35-40/30-35 Mbps for HT20
 65-70/60-65 Mbps for HT40

Yes. Max results for 2T2R client is 140-145/135-140
with peaks 160/150, It correspond to mediatek driver results.
Boards with ePA untested.

Reported-by: Serge Vasilugin <vasilugin@yandex.ru>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-12 21:37:08 +01:00
Sergei Burakov
2905ce3d64 ramips: add support for ZyXEL Keenetic 4G Rev.B Device
Specification:
SoC: RT5350
CPU Frequency: 360 MHz
Flash Chip: Macronix MX25L6406E (8192 KiB)
RAM: Winbond W9825G6JH-6 (32768 KiB)
3x 10/100 Mbps Ethernet (2x LAN, 1x WAN)
1x external antenna
UART (J1) header on PCB (57800 8n1)
Wireless: SoC-intergated: 2.4GHz 802.11bgn
USB: Yes
8x LED, 2x button

Flash instruction:
Configure PC with static IP 192.168.99.8/24 and start TFTP server.
Rename "openwrt-ramips-rt305x-zyxel_keenetic-4g-b-squashfs-sysupgrade.bin"
to "rt305x_firmware.bin" and place it in TFTP server directory.
Connect PC with one of LAN ports, press the reset button, power up
the router and keep button pressed until power LED start blinking.
Router will download file from TFTP server, write it to flash and reboot.

Signed-off-by: Sergei Burakov <senior.anonymous@mail.ru>
2022-09-13 01:01:52 +09:00
Daniel Golle
a46e91e8a1 mediatek: unset CONFIG_CMDLINE_OVERRIDE for all targets but mt7629
The newly introduced config symbol CONFIG_CMDLINE_OVERRIDE is only set
for mt7629 for now which breaks automated build on all other mediatek
subtargets. Make sure the symbol is configured as 'is not set' for all
remaining subtargets.

Fixes: c27279dc26 ("mediatek: add support for ipTIME A6004MX Add basic support for ipTIME A6004MX.")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-12 14:10:26 +01:00
Yoonji Park
c27279dc26 mediatek: add support for ipTIME A6004MX Add basic support for ipTIME A6004MX.
Hardware:
SoC: MediaTek MT7629 Cortex-A7 (ARMv7 1.25GHz, Dual-Core)
RAM: DDR3 128MB
Flash: Macronix MX35LF1GE4AB (SPI-NAND 128MB)
WiFi: MediaTek MT7761N (2.4GHz) / MediaTek MT7762N (5GHz) - no driver
Ethernet: SoC (WAN) / MediaTek MT7531 (LAN x4)
UART: [GND, RX, TX, 3.3V] (115200)

Installation:
- Flash recovery image with TFTP recovery

Revert to stock firmware:
- Flash stock firmware with TFTP recovery

TFTP Recovery method:
1. Unplug the router
2. Hold the reset button and plug in
3. Release when the power LED stops flashing and go off
4. Set your computer IP address manually to 192.168.0.x / 255.255.255.0
5. Flash image with TFTP client to 192.168.0.1

Signed-off-by: Yoonji Park <koreapyj@dcmys.kr>
2022-09-12 01:43:49 +01:00
Yoonji Park
49763d907b kernel: add support for mtdsplit-fit offset
Support devices that has vendor custom header before FIT image.

Some devices has vendor custom header before FIT image. In this case mtd-
split can not find FIT image and it results in rootfs mount failure.
Please refer iptime,a6004mx device for further examples.

Signed-off-by: Yoonji Park <koreapyj@dcmys.kr>
2022-09-12 01:43:49 +01:00
Shiji Yang
60384d8a74 mediatek: disable unsupported background radar detection
MT7915 requires an additional antenna for background radar scanning.
Disable this feature in the following devices that do not have a
separate DFS antenna:
  linksys,e8450
  ruijie,rg-ew3200gx-pro
  xiaomi,redmi-router-ax6s

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2022-09-12 00:14:02 +01:00