Commit Graph

25013 Commits

Author SHA1 Message Date
Hauke Mehrtens
7057e05485 omap: Remove EXT2 and EXT3 driver config
The EXT4 driver also takes care of EXT2 and EXT3 file systems.
Activating the EXT2 driver kernel config options unlocked some other
ext2 driver related options which OpenWrt did not take care of.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-08-09 01:17:06 +02:00
Hauke Mehrtens
e06544bdbe layerscape: Fix multiple bugs in of_get_mac_address() changes
The change which backported the of_get_mac_address() change broke some
patches in the layerscape target so the patches did not apply any more.

This commit makes them apply again and also fixes some other problems
related to this change.

Fixes commit 91a52f22a1 ("treewide: backport support for nvmem on non platform devices")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-08-09 01:16:48 +02:00
Hauke Mehrtens
4e57f83659 kernel: Apply change to of_get_mac_address() to ks8851 too
The code from ks8851.c was moved to ks8851_common.c, so it was not
backported. This broke the compile of the omap target which uses this
driver.

Fixes commit 91a52f22a1 ("treewide: backport support for nvmem on non platform devices")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-08-09 01:16:48 +02:00
Josef Schlehofer
4b2dc4dbbf mvebu: armada-37xx: add patch to forbid cpufreq for 1.2 GHz
This patch is backported from linux-arm-kernel [1] to improve situation, when
it was reported that 1.2 GHz variant is unstable with DFS.
It waits to be accepted upstream, however, it waits for Marvell people to respond.

[1] https://patchwork.kernel.org/project/linux-arm-kernel/patch/20210630225601.6372-1-kabel@kernel.org/

Fixes: 7b868fe04a ("Revert "mvebu: 5.4 fix DVFS caused random boot crashes"")
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2021-08-08 20:42:01 +02:00
Josef Schlehofer
0dcb03dc63 Revert "mvebu: 5.10 fix DVFS caused random boot crashes"
Based on the discussion on the mailing list [1], the patch which was
reverted, it reverts only one patch without the subsequent ones.

This leads to the SoC scaling issue not using a CPU parent clock, but
it uses DDR clock. This is done for all variants, and it's wrong because
commits (hacks) that were using the DDR clock are no longer in the mainline kernel.

If someone has stability issues on 1.2 GHz, it should not affect all
routers (1 GHz, 800 MHz) and it should be rather consulted with guys, who are trying to
improve the situation in the kernel and not making the situation worse.

There are two solutions in cases of instability:
a) disable cpufreq
b) underclock it up to 1 GHz

This reverts commit 080a0b74e3.

[1] https://lists.openwrt.org/pipermail/openwrt-devel/2021-June/035702.html

Fixes: d379476817 ("mvebu: armada-37xx: add patch to forbid cpufreq for 1.2 GHz")
CC: Pali Rohár <pali@kernel.org>
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2021-08-08 20:42:01 +02:00
Martin Schiller
6c659fb80c layerscape: armv8_64b: do not disable CONFIG_IP_ADVANCED_ROUTER
This option is needed e.g. to use strongswan for IPSec.

BTW: This was the only target where this option was disabled.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2021-08-08 19:50:46 +02:00
Linus Walleij
83441522a2 gemini: Add hdparm setting
This uses "hdparm" (if present) to get the harddisk into low
power mode on NAS set-ups.

Cc: Adrian Schmutzler <mail@adrianschmutzler.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2021-08-08 19:50:45 +02:00
Josef Schlehofer
d379476817 mvebu: armada-37xx: add patch to forbid cpufreq for 1.2 GHz
This patch is backported from linux-arm-kernel [1] to improve situation, when
it was reported that 1.2 GHz variant is unstable with DFS.
It waits to be accepted upstream, however, it waits for Marvell people to respond.

[1] https://patchwork.kernel.org/project/linux-arm-kernel/patch/20210630225601.6372-1-kabel@kernel.org/

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2021-08-08 19:50:45 +02:00
Josef Schlehofer
7b868fe04a Revert "mvebu: 5.4 fix DVFS caused random boot crashes"
Based on the discussion on the mailing list [1], the patch which was
reverted, it reverts only one patch without the subsequent ones.

This leads to the SoC scaling issue not using a CPU parent clock, but
it uses DDR clock. This is done for all variants, and it's wrong because
commits (hacks) that were using the DDR clock are no longer in the mainline kernel.

If someone has stability issues on 1.2 GHz, it should not affect all
routers (1 GHz, 800 MHz) and it should be rather consulted with guys, who are trying to
improve the situation in the kernel and not making the situation worse.

There are two solutions in cases of instability:
a) disable cpufreq
b) underclock it up to 1 GHz

This reverts commit 080a0b74e3.

[1] https://lists.openwrt.org/pipermail/openwrt-devel/2021-June/035702.html

CC: Pali Rohár <pali@kernel.org>
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2021-08-08 19:50:45 +02:00
Klaus Kudielka
82620cd610 mvebu: Turris Omnia: use SFP module, if present
Follow the recommendations stated in the Turris Omnia DTS for eth2:

"In case SFP module is present, U-Boot has to enable the sfp node above,
remove phy-handle property, and add managed = "in-band-status" property."

The boot script is written in a way, that it works for all U-Boot
versions deployed by the vendor so far (2015.10-rc2, 2019.07).

Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
2021-08-08 19:50:45 +02:00
Klaus Kudielka
f2c57a294f mvebu: backport Turris Omnia DTS changes to 5.4
Kernel 5.4 receives a reduced set, just to make the SFP cage work.
While we are at it, move the patches accepted upstream to the 0xx series.

Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
2021-08-08 19:50:45 +02:00
Klaus Kudielka
b3b855191b mvebu: backport Turris Omnia DTS changes to 5.10
Kernel 5.10 receives the complete set of improvements from 5.11/5.12.
While we are at it, move the patches accepted upstream to the 0xx series.

Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
2021-08-08 19:50:45 +02:00
Rui Salvaterra
86c0c12c74 ath79: fix the AR7{1,2}00 USB PHY patches
PHY_SIMPLE is a bogus kconfig symbol, what we really need to select is
GENERIC_PHY.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-08-08 19:50:45 +02:00
Rui Salvaterra
968dc33299 kernel/generic: add CONFIG_KCSAN to the 5.10 kconfig
Add the missing CONFIG_KCSAN (disabled). Found while making kernel_oldconfig on
an x86-64 subtarget.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-08-08 19:50:45 +02:00
Damien Mascord
8e10b0181c kernel: backport mdio_find_bus from 5.10.x
mdio-tools (https://github.com/wkz/mdio-tools) requires the use of
mdio_find_bus, which is not present in 5.4.x.

This patch backports the required change from 5.10.x to 5.4.x

The original patch submission for this can be found at
https://patchwork.ozlabs.org/project/netdev/patch/20200201074625.8698-2-jeremy.linton@arm.com/

Signed-off-by: Damien Mascord <tusker@tusker.org>
[Add original patch description]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-08-08 19:49:29 +02:00
John Audia
3c0a26b43a kernel: bump 5.4 to 5.4.138
All patches automatically rebased.

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

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2021-08-08 17:57:34 +02:00
Rui Salvaterra
39d12b0155 kernel: bump 5.10 to 5.10.55
No deleted or manually refreshed patches.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-08-08 17:57:34 +02:00
Stijn Tintel
b1bff5cb57 mvebu: switch to generic sdcard upgrade method
Now that we have a generic sdcard upgrade method, which was copied from
the mvebu platform method, we can switch mvebu to the generic method.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2021-08-07 01:43:39 +03:00
Stijn Tintel
8347d8b4fb base-files: add generic sdcard upgrade method
Add a generic sdcard upgrade method instead of duplicating code in yet
another target, and add a feature flag to only install this upgrade
method in targets that set this flag. Copied from mvebu.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2021-08-07 01:34:40 +03:00
Daniel Golle
a0b827b916
kirkwood: import patch to fix build and refresh patches
kirkwood build broke due to missing include needed for ETH_ALEN.
Add patch (sent upstream as well) to address that.
Refresh patches for 5.4 and 5.10.

Fixes: 91a52f22a1 ("treewide: backport support for nvmem on non platform devices")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-08-05 23:53:07 +01:00
Fabian Bläse
c36e9f891b ramips: add missing label-mac-device for Xiaomi Mi Router 4A (100M)
As both the Mi Router 4A (100M) and the Mi Router 4C use the same
label-mac-device, the alias can be moved to the shared dtsi.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2021-08-05 22:55:39 +02:00
Daniel Golle
e3096c384c
realtek: fix syntax error introduced by previous commit
A superflus ')' character has slipped into commit 91a52f22a1. Remove it
to fix build.

Fixes: 91a52f22a1 ("treewide: backport support for nvmem on non platform devices")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-08-05 15:22:26 +01:00
David Bauer
774b386a92 generic: fix to few arguments to of_get_mac_address
Fixes commit 91a52f22a1 ("treewide: backport support for nvmem on non platform devices")

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-08-05 13:05:06 +02:00
David Bauer
c3d99ae792 mediatek: mt7622: enable HW RNG
MT7622 provides are hardware RNG with upstream Linux driver. Enable
compilation of this driver to make use of the hardware RNG.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-08-05 01:48:55 +02:00
John Marrett
252466a0ce ath79: add support for GL.iNet GL-X300B
The GL-X300B is a industrial 4G LTE router based on the Qualcomm
QCA9531 SoC.

Specifications:
 - Qualcomm QCA9531 @ 650 MHz
 - 128 MB of RAM
 - 16 MB of SPI NOR FLASH
 - 2x 10/100 Mbps Ethernet
 - 2.4GHz 802.11b/g/n
 - 1x USB 2.0 (vbus driven by GPIO)
 - 4x LED, driven by GPIO
 - 1x button (reset)
 - 1x mini pci-e slot (vcc driven by GPIO)
 - RS-485 Serial Port (untested)

Flash instructions:

This firmware can be flashed using either sysupgrade from the GL.iNet
firmware or the recovery console as follows:

 - Press and hold the reset button
 - Connect power to the router, wait five seconds
 - Manually configure 192.168.1.2/24 on your computer, connect to
   192.168.1.1
 - Upload the firmware image using the web interface

RS-485 serial port is untested and may depend on the following commit in
the GL.iNet repo:

202e83a32a

MAC addresses as verified by OEM firmware:

vendor   OpenWrt   address
WAN      eth0      label
LAN      eth1      label + 1
2g       phy0      label + 2

The label MAC address was found in the art partition at 0x0

Based on vendor commit:

16c5708b20

Signed-off-by: John Marrett <johnf@zioncluster.ca>
2021-08-05 01:48:17 +02:00
Hannu Nyman
13d6d27422 generic: add missing Kconfig symbol ARM_SCMI_PROTOCOL
Add the missing ARM_SCMI_PROTOCOL symbol. Apparently it was exposed
for 5.10.53 with a kernel dependency change.
Missing symbol observed with mediatek/7622 E8450/RT3200 router.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-08-05 01:48:17 +02:00
David Bauer
1e37399235 generic: enable netlink ethtool interface
The virtual cable tester depends on the netlink interface for ethtool.
Thus, enable it in the generic kernel configuration.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-08-05 01:47:07 +02:00
Ansuel Smith
91a52f22a1 treewide: backport support for nvmem on non platform devices
In the current state, nvmem cells are only detected on platform device.
To quickly fix the problem, we register the affected problematic driver
with the of_platform but that is more an hack than a real solution.
Backport from net-next the required patch so that nvmem can work also
with non-platform devices and rework our current patch.
Drop the mediatek and dsa workaround and rework the ath10k patches.
Rework every driver that use the of_get_mac_address api.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-08-05 01:46:26 +02:00
Rafał Miłecki
b37f0dde78 kernel: fix kernel 5.5 and 5.9 PCI DT regressions
This fixes PCI on bcm53xx.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-08-04 08:42:30 +02:00
David Bauer
191c4ff5e1 generic: add missing ARM64 crypto Kconfig symbols
bcm27xx-bcm2710 builds are stalling when compiled with V=s.

Explitily disable these unset symbols to avoid stalling
builds.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-07-31 22:14:02 +02:00
John Audia
bd3cb93034 kernel: bump 5.4 to 5.4.136
All patches automatically rebased.

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

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2021-07-31 19:13:00 +02:00
John Audia
28ef764026 kernel: bump 5.4 to 5.4.135
All patches automatically rebased.

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

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2021-07-31 19:13:00 +02:00
David Bauer
f038a169a0 generic: add missing Kconfig symbol
Fixes build errors for sunxi as well as rockchip targets.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-07-31 11:49:02 +02:00
Rui Salvaterra
a20e6149b3 kernel: bump 5.10 to 5.10.54
Deleted (upstreamed) patches:
mediatek/patches-5.10/000-spi-fix-fifo.patch

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-07-29 19:50:16 +01:00
Rui Salvaterra
f2961c9c2b kernel: bump 5.10 to 5.10.53
No deleted or manually refreshed patches.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-07-29 19:50:15 +01:00
David Bauer
a57d7c29a4 generic: fix build warning
Fixes a unused variable warning:

drivers/of/of_net.c: In function 'of_get_mac_address_mtd':
drivers/of/of_net.c:92:19: warning: unused variable 'prop' [-Wunused-variable]

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-07-29 20:49:57 +02:00
Nick Hainke
e8e2b88f5f mediatek: mt7623: import patch to fix msi warning
The 1st generation MediaTek PCIe host bridge cannot handle Message
Signaled Interrupts (MSIs). The core PCI code is not aware that MSI is
not available. This results in warnings of the form:

WARNING: CPU: 2 PID: 112 at include/linux/msi.h:219
  pci_msi_setup_msi_irqs.constprop.8+0x64/0x6c
Modules linked in: ahci(+) libahci libata sd_mod scsi_mod
  gpio_button_hotplug
CPU: 2 PID: 112 Comm: kmodloader Not tainted 5.10.52 #0
Hardware name: Mediatek Cortex-A7 (Device Tree)

Import patches that introduce the 'no_msi' attribute to signal missing
MSI support to the core PCI.

Refresh patches:
- 000-spi-fix-fifo.patch
- 330-mtk-bmt-support.patch
- 510-net-mediatek-add-flow-offload-for-mt7623.patch
- 601-PCI-mediatek-Use-regmap-to-get-shared-pcie-cfg-base.patch
- 610-pcie-mediatek-fix-clearing-interrupt-status.patch
- 700-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch
- 710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
2021-07-29 15:08:17 +01:00
Rafał Miłecki
e88ab3b629 bcm53xx: refresh kernel 5.10 config
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-07-29 14:56:14 +02:00
Rafał Miłecki
d8e8a2a8db bcm53xx: add testing support for kernel 5.10
It still requires fixing PCIe support:
[    6.644699] pcie_iproc_bcma bcma0:7: host bridge /axi@18000000/pcie@12000 ranges:
[    6.652217] pcie_iproc_bcma bcma0:7:   No bus range found for /axi@18000000/pcie@12000, using [bus 00-ff]
[    6.661833] OF: /axi@18000000/pcie@12000: Missing device_type
[    6.667622] pcie_iproc_bcma: probe of bcma0:7 failed with error -12
[    6.673985] pcie_iproc_bcma bcma0:8: host bridge /axi@18000000/pcie@13000 ranges:
[    6.681514] pcie_iproc_bcma bcma0:8:   No bus range found for /axi@18000000/pcie@13000, using [bus 00-ff]
[    6.691137] pcie_iproc_bcma: probe of bcma0:8 failed with error -12
[    6.697522] pcie_iproc_bcma bcma0:9: host bridge /axi@18000000/pcie@14000 ranges:
[    6.705048] pcie_iproc_bcma bcma0:9:   No bus range found for /axi@18000000/pcie@14000, using [bus 00-ff]
[    6.714669] pcie_iproc_bcma: probe of bcma0:9 failed with error -12

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-07-29 14:56:14 +02:00
Rafał Miłecki
5be1c022fe kernel: fix bgmac compilation in kernel 5.10
It's required since upstream kernel commit 4bdc0d676a64 ("remove
ioremap_nocache and devm_ioremap_nocache").

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-07-29 13:53:47 +02:00
David Bauer
9928236d16 generic: fix compile-error for non-mtd platforms
Fixes commit cd39aba402 ("generic: write back netdev MAC-address to device-tree")

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-07-29 08:51:08 +02:00
David Bauer
cd39aba402 generic: write back netdev MAC-address to device-tree
The label-mac logic relies on the mac-address property of a netdev
devices of-node. However, the mac address can also be stored as a
different property or read from e.g. an mtd device.

Create this node when reading a mac-address from OF if it does not
already exist and copy the mac-address used for the device to this
property. This way, the MAC address can be accessed using procfs.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-07-29 00:30:05 +02:00
David Bauer
f0a885ed86 ath79: fix JT-OR750i switch LED assignment
The LEDs for LAN1 and LAN3 were swapped. Link on port 1 would illuminate
the LED on port 3 and vice versa.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-07-28 14:25:53 +02:00
David Bauer
4feb9a4211 ath79: enable missing pinmux for JT-OR750i
Without explicit configuration of these pins the ethernet as well as
status LED of the device do not work correctly.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-07-28 14:25:46 +02:00
David Bauer
bd521f2a83 Revert "generic: add mac-address property for NVMEM mac addresses"
This reverts commit b309248730.

This commit could create a property without allocated memory, breaking
subsequent reads over a nodes property. Also, the mac-address-increment
was not applied when reading from nvmem.

Revert this commit for now, which breaks the label-mac-address logic.
Possibly, traversing the device-tree from the netdev side is easier
anyways.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-07-28 13:48:24 +02:00
Vincent Wiemann
55b4b36552 ath79: add support for Joy-IT JT-OR750i
Specifications:
 * QCA9531, 16 MiB flash (Winbond W25Q128JVSQ), 128 MiB RAM
 * 802.11n 2T2R (external antennas)
 * QCA9887, 802.11ac 1T1R (connected with diplexer to one of the antennas)
 * 3x 10/100 LAN, 1x 10/100 WAN
 * UART header with pinout printed on PCB

Installation:
 * The device comes with a bootloader installed only
 * The bootloader offers DHCP and is reachable at http://10.123.123.1
 * Accept the agreement and flash sysupgrade.bin
 * Use Firefox if flashing does not work

TFTP recovery with static IP:
 * Rename sysupgrade.bin to jt-or750i_firmware.bin
 * Offer it via TFTP server at 192.168.0.66
 * Keep the reset button pressed for 4 seconds after connecting power

TFTP recovery with dynamic IP:
 * Rename sysupgrade.bin to jt-or750i_firmware.bin
 * Offer it via TFTP server with a DHCP server running at the same address
 * Keep the reset button pressed for 6 seconds after connecting power

Co-authored-by: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Vincent Wiemann <vincent.wiemann@ironai.com>
2021-07-28 13:48:15 +02:00
Hauke Mehrtens
8c2509dc5f mediatek: Fix Fidelix-FM35X1GA patch
This patch did not apply cleanly any more after support for the XTX
flash was added to the generic patches.

Fixes: 92012dd867 ("kernel: Add support for XTX XT26G02A SPI NAND")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-07-25 16:11:29 +02:00
Tomasz Maciej Nowak
cbdd2b62e4 mvebu: limit mvneta tx queue workaround to 32 bit SoC
This patch has been carried since introduction throughout every kernel
major bump and no one has tested if the later kernels improved the
situation. The Armada 3720 SoC can only process GbE interrupts on Core 0
and this is already limited in all stable kernels, so ditch this
workaround for 64 bit SoCs.

Ref: https://git.kernel.org/torvalds/c/cf9bf871280d

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2021-07-25 13:52:38 +02:00
Martin Schiller
bbfb142f2a layerscape: armv8_64b: enable Microsemi phy driver for FRWY-LS1046A
Enable the Microsemi phy driver to support the VSC8514 QSGMII phy on the
FRWY-LS1046A board.

Otherwise, the "Generic PHY" driver is used.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2021-07-25 13:52:38 +02:00
Martin Schiller
3f97a04e6c layerscape: fix config restore for FRWY-LS1046A
commit 2c2d77bd3b ("layerscape: add FRWY-LS1046A board support")
missed to add an entry to the 79_move_config preinit script.

Therefore, the config transfer on sysupgrade wass broken for this device.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2021-07-25 13:52:38 +02:00