Commit Graph

25527 Commits

Author SHA1 Message Date
John Audia 83f1d72dea kernel: bump 5.10 to 5.10.78
All patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B
Run-tested: bcm2711/RPi4B

Signed-off-by: John Audia <graysky@archlinux.us>
2021-11-07 19:59:10 +01:00
John Audia a50565157e kernel: bump 5.4 to 5.4.158
All patches automatically rebased.

Signed-off-by: John Audia <graysky@archlinux.us>
2021-11-07 19:58:08 +01:00
Paul Spooren 184d072fc0 pistachio: drop Kernel 5.4 support
With the switch to Kernel 5.10 the 5.4 files are no longer needed.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-11-07 18:32:21 +01:00
Paul Spooren 646c011ec7 pistachio: switch to Kernel 5.10
This was successfully boot tested on a Creator Ci40.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-11-07 18:31:34 +01:00
Evgeniy Didin da9a8fcbc3 archs38: update kernel version to 5.10
Update config, Makefile and image/Makefile.
Directly switch to kernel 5.10.

This patch was tested in nSIM simulator, no errors appeared.

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Paul Spooren <mail@aparcar.org>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: John Crispin <john@phrozen.org>
2021-11-07 17:12:10 +01:00
Stijn Tintel c5fa7ec2a6 kernel: add missing UBSAN config symbols
Enabling KERNEL_UBSAN exposes several missing symbols. Add new kernel
build options for UBSAN_BOUNDS and UBSAN_TRAP, disable CONFIG_TEST_UBSAN
in the generic kernel configs and enable CONFIG_UBSAN_MISC in generic
5.10 config. The latter symbol was removed in later kernels, as it was
causing some issues, so just disable it in 5.10 instead of adding a
build option for it.

Fixes build failures with KERNEL_UBSAN enabled.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-11-07 17:38:01 +02:00
Stijn Tintel ec68c75c62 kernel: add missing KASAN config symbols
Enabling KERNEL_KASAN exposes several missing symbols. As KASAN_SW_TAGS
is only implemented for arm64 CPUs and requires clang, it doesn't make
sense to make this a build option so just default to KASAN_GENERIC and
disable KASAN_SW_TAGS.

While at it, disable TEST_KASAN_MODULE in the generic 5.10 config.

Fixes build failures with KERNEL_KASAN enabled.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-11-07 17:26:47 +02:00
Matthew Hagan f2f42a54e8 kernel: 5.10: compress 7xx patch numbering
The qca8k patch series brings the numbering to 799. This patch renames
7xx patches to create space for more backports to be added.

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
[rename 729->719]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-11-07 00:05:26 +01:00
Pawel Dembicki 07543d00e5 ipq40xx: use zImage for Cell-C RTL30VW
After switch to 5.10 kernel, kernel size was too high.
This patch switches Cell-C RTL30VW from uImage to zImage build.

Lzma uImage wrap is required for factory booting and it must left
untouched.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2021-11-06 23:36:32 +01:00
Wout Bertrums 9a7e3d170c ramips: add broken-flash-reset for HLK-7621A EvB
This is needed because the HLK-7621 EvB has 32MB of flash,
so it will have to use 4B addressing and the
broken-flash-reset hack has to be used to be able to reboot.

Signed-off-by: Wout Bertrums <wout@wbnet.eu>
[copied github message into commit message]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-11-06 23:36:32 +01:00
Robert Marko 605d280914 ipq40xx: 5.10: refresh config
It looks like CONFIG_BLK_CMDLINE_PARSER was forgotten during the Orbi
device merge.
So lets refresh the config with it.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2021-11-06 23:36:32 +01:00
Alberto Bursi ab1969d9a8 x86: sort alphabetically default packages
sorting alphabetically default packages
and placing them on their own line.

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
[fixed whitespaces before tab, double whitespaces]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-11-06 23:36:32 +01:00
Alberto Bursi 1f188d8c72 x86: enable kmod-tg3 on 64-bit by default
Gigabit ethernet adapters using BCM5719/5720 chipset
are common on servers and as easy/cheap to get as
Intel based ones.
Usually found in 2-port and 4-port cards.

Also some devices recently added to x86_64 target
like the Meraki MX100 use this chipset for 8 of
their 12 integrated ports.

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
2021-11-06 23:36:32 +01:00
Sergio Paracuellos 8bc6654244 ramips: mt7621-dts: properly organize pcie node
Device tree pcie node for this SoC is using different
styles in its different properties. Hence properly
unify them to be able to write a a proper yaml schema
documentation.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210505121736.6459-11-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-06 23:36:32 +01:00
Sergio Paracuellos 2bc659ee07 ramips: mt7621-dts: add missing device_type in pcie root ports
According to the YAML schema 'pci-bus.yaml' the 'device_type'
property is mandatory for all pcie root ports. Hence add it.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210506170742.28196-3-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-06 23:36:32 +01:00
Sergio Paracuellos 82f9d5ad0b ramips: mt7621-dts: remove 'bug-range' property
Property 'bus-range' when values are the default are
not necessary to be defined. Hence, remove all of them.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210506170742.28196-2-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-06 23:36:32 +01:00
Sergio Paracuellos e04130fc17 ramips: mt7621-dts: use standard 'syscon' string
Both 'memc' and 'sysc' nodes are not using 'syscon'
as a node string which is the standard one to be used.
Update both of them.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210505132154.8263-3-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-06 23:36:32 +01:00
Sergio Paracuellos f1d154ec6c ramips: mt7621-dts: remove ethsys node
DT 'ethsys' node is being configured as a syscon
to get access to reset and other registers in the
'mediateķ,mt7621-eth' driver. Since the 'sysc' is also
a syscon, provides the clock and also is virtually
mapped from the same physical address 0x1e000000 we
can just use 'sysc' as the phandle for the syscon in
the ethernet node. Compatible string 'mediatek,mt7621-ethsys'
of the node is not being used anywhere inside the kernel
so, this node can be safely removed.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210505132154.8263-2-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-06 23:36:32 +01:00
DENG Qingfang 93da227798 ramips: mt7621-dts: remove obsolete switch node
This was for OpenWrt's swconfig driver, which never made it upstream,
and was also superseded by MT7530 DSA driver.

Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: DENG Qingfang <dqfext@gmail.com>
Link: https://lore.kernel.org/r/20210108025155.31556-1-dqfext@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-06 23:36:32 +01:00
Sergio Paracuellos 6e30692e99 ramips: mt7621-dts: properly define 'cpc' and 'mc' nodes
'cpc' and 'mc' nodes correspond with the MIPS 'Cluster Power Controller'
and 'MIPS Common Device Memory Map' which are present in some MIPS related
boards. There is already bindings documentation for these two located in:
- Documentation/devicetree/bindings/power/mti,mips-cpc.yaml
- Documentation/devicetree/bindings/bus/mti,mips-cdmm.yaml

Hence, properly update compatible strings and align nodes with already
mainlined bindings documentation. Also, move their definition to a proper
place since both of them are not related with the palmbus at all.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20211002060706.30511-1-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-06 23:36:32 +01:00
Sergio Paracuellos 9b52b4e53f ramips: mt7621-dts: change some node hex addresses to lower case
Hexadecimal addresses in device tree must be defined using lower case.
There are some of them that are still in upper case. Change them all.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20211017070656.12654-2-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-06 23:36:32 +01:00
Sergio Paracuellos e17f238f1d ramips: mt7621-dts: make use of 'IRQ_TYPE_LEVEL_HIGH' instead of magic numbers
Nodes 'gdma' and 'hsdma' are using magic number '4' in interrupts property.
Use 'IRQ_TYPE_LEVEL_HIGH' instead to align with the rest of the nodes in
the file.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20211019102915.15409-2-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-06 23:36:32 +01:00
Christian Lamparter 217571b6ab ath79: WNDR3700/3800/MAC: utilize nvmem for caldata fetching
converts the still popular WNDR3700 Series to fetch the
caldata through nvmem. As the "MAC with NVMEM" has shown,
there could pitfalls along the way.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-11-06 22:18:45 +01:00
John Audia 30b0bd69fd kernel: bump 5.4 to 5.4.156
Removed upstreamed:
  backport-5.4/790-v5.7-net-switchdev-do-not-propagate-bridge-updates-across.patch

All other patches automatically rebased.

Signed-off-by: John Audia <graysky@archlinux.us>
2021-11-06 14:48:20 +01:00
Rui Salvaterra 4b26ba4155 kernel: bump 5.10 to 5.10.77
Deleted (upstreamed):
bcm53xx/patches-5.10/081-v5.15-Revert-pinctrl-bcm-ns-support-updated-DT-binding-as-.patch [1]

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.10.y&id=01c2881bb0e0a71b87ca425e1b763ac13855aa7e

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-11-06 14:24:07 +01:00
Paul Spooren 15e55a2190 imagebuilder: fix local packages/ folder
This commit fixes commit "2999f810ff: build,IB: include kmods only in
local builds" which cause the local packages/ folder only to be added
for local builds but no longer for ImageBuilder created by the Buildbot.

The commits intention was to use remote kmods repositories rather than
storing them locally. Accidentally the entire handling of the local
`packages/` was removed.

Re-add the folder and include a README describing what it can be used
for.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-11-05 19:18:48 -10:00
Felix Fietkau 2a832b3df5 llvm-bpf: support creating a tarball in bin
This can be used for adding the toolchain to an existing tree without having
to build it from scratch.
Enable building the toolchain + tarball by default on buildbot

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-11-04 16:59:22 +01:00
Sungbo Eo f432353850 bcm4908: fix calculation of new cferam index
The arithmetic expansion fails when idx becomes a two digit number.
Fix this by relying on expr command.

root@OpenWrt:/# echo $(((028 + 0) % 1000))
/bin/ash: arithmetic syntax error
root@OpenWrt:/# echo $(($(expr 028 + 0) % 1000))
28

Fixes: a6a0b252ba ("bcm4908: add sysupgrade support")
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2021-11-04 15:52:03 +01:00
Rafał Miłecki 1ee6d3d24e bcm53xx: add first 5.17 DTS changes
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-11-04 07:00:21 +01:00
Robert Marko ae7c2bb61b ipq40xx: disable some devices due to kernel size
Disable some of the ipq40xx devices due to their kernel size limitations.

These devices fail to build with kernel 5.10 and full buildbot config.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
[keep gl-b1300/gl-s1300 enabled, extend commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-11-03 23:50:56 +01:00
Adrian Schmutzler 16af6535fa ipq40xx: switch to kernel 5.10
There have been enough tests and new developments require the new
kernel, so let's update it.

There is a bunch of devices that do not build anymore due to
kernel size limitations. These are disabled in a subsequent commit.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-11-03 23:50:56 +01:00
Piotr Dymacz e245ae13ee imx: remove obsolete Kernel 5.4
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-11-03 12:45:40 +01:00
Piotr Dymacz 3c8720f39e imx: update subtargets default kernel configs for 5.10
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-11-03 12:45:40 +01:00
Piotr Dymacz adc37b8040 imx: make kernel 5.10 default version
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-11-03 12:45:40 +01:00
Piotr Dymacz b35cd4d71d imx: introduce 'cortexa7' subtarget
This adds some essential files required by new 'cortexa7' subtarget,
dedicated for Cortex-A7 based NXP i.MX series. For now, the kernel
config-default focuses only on the i.MX 6UL family, as the following
changeset will introduce support for i.MX 6ULL based device. Support
for more platforms (e.g. i.MX 7) might be enabled later, while adding
more devices.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-11-03 12:45:40 +01:00
Piotr Dymacz d2fb495a9d imx: split into arch-specific subtargets
Modern NXP i.MX series includes several different families, based on
single- or multi-core Arm Cortex-A CPUs. To be able to support more
families within a single target, we split the 'imx' in arch-specific
subtargets, starting with 'cortexa9' for the Cortex-A9 based i.MX 6,
already supported by the original 'imx6' target.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-11-03 12:45:40 +01:00
Piotr Dymacz d1c66eacab imx6: rename target to 'imx'
This is first step in migrating to a generic i.MX target which in the
next steps will also get divided into arch-specific subtargets.

In the result, this will make it possible to support, within a single
target, also other modern NXP i.MX families, like the i.MX 7, i.MX 8
or recently introduced i.MX 9.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-11-03 12:45:40 +01:00
Piotr Dymacz 7abde5037d imx6: refresh and update target kernel configs
This is a minor extension of the commit 26ae69fd03 ("imx6: refresh
kernel config with 5.10 symbols"), with correct and full disable of
the Arm Cortex-A7 based i.MX 6UL and 6UL{L,Z} families support and
re-enable of the Cortex-A9 based i.MX 6L{S,X}.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-11-03 12:45:40 +01:00
Piotr Dymacz 5ec4b180c2 imx6: image: fix Gateworks Ventana boot script filename
U-Boot for the Gateworks Ventana includes filename of the boot script in
the default/embedded environment (see 'include/configs/gw_ventana.h' in
the U-Boot sources).

This restores the old boot script filename ('6x_bootscript-ventana'),
making Ventana boards boot again.

Fixes: 8dba71dd33 ("imx6: image: drop BOOT_SCRIPT and fix DEVICE_NAME")
Reported-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-11-03 12:45:40 +01:00
Piotr Dymacz 5dfa89be99 ath79: add support for Netgear R6100
Netgear R6100 is a dual-band Wi-Fi 5 (AC1200) router based on Qualcomm
Atheros (AR9344 + QCA9882) platform. Support for this device was first
introduced in 15f6f67d18 (ar71xx). FCC ID: PY312400225.

Specifications:

- Atheros AR9344 (560 MHz)
- 128 MB of RAM (DDR2)
- 128 MB of flash (parallel NAND)
- 2T2R 2.4 GHz Wi-Fi (AR9344)
- 2T2R 5 GHz Wi-Fi (QCA9882)
- 5x 10/100 Mbps Ethernet (AR9344)
- 4x internal antenna
- 1x USB 2.0 (GPIO-controlled power)
- 6x LED, 3x button (reset, Wi-Fi, WPS)
- UART (4-pin, 2.54 mm pitch) header on PCB
- 1x mechanical power switch
- DC jack for main power input (12 V)

WARNING: sysupgrade from older stable releases is not possible, fresh
installation (via vendor's GUI or TFTP based recovery) is required.
Reason for that is increased kernel partition size.

Installation:

Use the 'factory' image under vendor's GUI or via TFTP U-Boot recovery.
You can use the 'nmrpflash' tool at a boot time, before kernel is loaded
or start it manually by pressing the 'reset' button for ~20 seconds from
powering up the device (U-Boot will start TFTP server on 192.168.1.1,
use TFTP client to send the image).

Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-11-03 12:45:40 +01:00
Rafał Miłecki 20d3e236b2 bcm4908: add testing support for kernel 5.10
CONFIG_COMPAT_32BIT_TIME is a new symbol and has to be set to avoid:
Provide system calls for 32-bit time_t (COMPAT_32BIT_TIME) [N/y/?] (NEW)

CONFIG_RELOCATABLE needs to be enabled to make kernel start booting.
That raises a question: do we really need CONFIG_EXPERT=y ?

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-11-03 12:16:06 +01:00
Rafał Miłecki e3a1e78cd8 bcm4908: prepare kernel 5.10 support
It compiles but *doesn't* boot so it isn't enabled yet.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-11-03 12:08:40 +01:00
Hauke Mehrtens b7bb176d1c pistachio: Take bootargs from device tree
The boot arguments are copied into the device tree by the boot loader
and taken from the device tree by the kernel.
The code which takes the boot arguments from the different sources was
reworked with kernel 5.5.

We have to activate CONFIG_MIPS_CMDLINE_DTB_EXTEND to take the boot
arguments from the device tree.

This makes the system boot on the board again.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-11-02 23:37:19 +01:00
Hauke Mehrtens ff504e6fd1 pistachio: Make kernel 5.10 patches apply
Make the patches apply on kernel 5.10 and refresh the patches and the
kernel configuration on top of kernel 5.10.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-11-02 23:37:19 +01:00
Hauke Mehrtens 9b96fcf9f6 pistachio: Copy kernel 5.4 patches to 5.10
This just copies the patches and the configuration from kernel 5.4 to
kernel 5.10.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-11-02 23:37:19 +01:00
Hauke Mehrtens 6e5ab1b154 pistachio: Fix FIT image configuration name
The pistachio U-Boot expects a default configuration with the name
config@1 in the FIT image. The default was changed in OpenWrt some
months ago.
This makes the board boot again.

Fixes: 9f714398e0 ("build: use config-1 instead of config@1 as default")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-11-02 23:37:19 +01:00
Hauke Mehrtens df68042d5b kernel: Set some options in generic configuration
Add CONFIG_USB_ETH and CONFIG_PWM_JZ4740 to generic kernel
configuration.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-11-02 23:37:19 +01:00
Mathias Kresin f7f12495bc kernel: 5.10: simplify logic in packet mangling patch
I had quite a hard time to understand what the change to net/core/dev.c
is supposed to do.

Simplify the change by returning NETDEV_TX_OK in case a eth_mangle_tx
callback was set but returned NULL instead of setting the return value
in the else branch.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2021-11-02 22:36:41 +01:00
Mathias Kresin 1470009bf8 kernel: 5.10: packet mangling code only for ar8216 driver
Only the ar8216 switch driver uses the packet mangling code.

Update the kernel configs accordingly.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2021-11-02 22:36:41 +01:00
Mathias Kresin 9201ff5476 kernel: 5.10: fix ar8216 vlans
ar8216 switches have a hardware bug, which renders normal 802.1q support
unusable. Packet mangling is required to fix up the vlan for incoming
packets.

The patch was ommited at the time kernel 5.10 support was added but is
still required for ar8216 switches.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2021-11-02 22:36:41 +01:00
Paul Spooren 7b7bbec453 uml: add Kernel 5.10 support via testing
Add the latest default Kernel for testing. This step is required to keep
UML in tree for the next release.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-11-02 10:04:50 -10:00
Paul Spooren 106c8add9c uml: build target again via the Buildbots
The UML target been outdated for a long time. Instead of just carrying
unmaintained code we should build it again and allow people and CIs to
use it for testing.

This commit removes the `source-only` feature which disables building.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-11-02 10:04:50 -10:00
Paul Spooren 02c23d004c uml: drop 32Bit host build support
This step drops support host build systems other than x86/64 to allow
two Kernel configuration in parallel. With this commit the setup follow
the config style of all other targets.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-11-02 10:04:50 -10:00
Paul Spooren 841738aa55 uml: update README to usable examples
The current `uml` README is terribly outdated and non of the examples
work by default. Fix that and while at it convert it to Markdown.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-11-02 10:04:50 -10:00
Daniel Golle b82a23e959
kernel: remove custom partition name patch
Don't patch the kernel to expose the partition name in sysfs as it is
already exposed via 'uevent'.
All previous users have been converted to use 'uevent', so we can
safely drop the custom patch.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-11-01 18:20:18 +00:00
Daniel Golle b070359035
mediatek: mt7623: make use of find_mmc_part
Use find_mmc_part instead of previously introduced
get_partition_by_name which requires a custom kernel patch.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-11-01 18:00:57 +00:00
Daniel Golle 5a0348fdc3
mediatek: mt7622: make use of find_mmc_part
Use find_mmc_part instead of previously introduced
get_partition_by_name which requires a custom kernel patch.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-11-01 18:00:52 +00:00
Davide Fioravanti 2cb24b3f3c ipq40xx: add support for Netgear SRR60/SRS60 and RBR50/RBS50
The Netgear SRS60 and SRR60 (sold together as SRK60) are two almost
identical AC3000 routers. The SRR60 has one port labeled as wan while
the SRS60 not. The RBR50 and RBS50 (sold together as RBK50) have a
different external shape but they have an USB 2.0 port on the back.

This patch has been tested only on SRS60 and RBR50, but should work
on SRR60 and RBS50.

Hardware
--------
SoC:   Qualcomm IPQ4019 (717 MHz, 4 cores 4 threads)
RAM:   512MB DDR3
FLASH: 4GB EMMC
ETH:
  - 3x 10/100/1000 Mbps Ethernet
  - 1x 10/100/1000 Mbps Ethernet (WAN)
WIFI:
  - 2.4GHz: 1x IPQ4019 (2x2:2)
  - 5GHz:   1x IPQ4019 (2x2:2)
  - 5GHz:   1x QCA9984 (4x4:4)
  - 6 internal antennas
BTN:
  - 1x Reset button
  - 1x Sync button
  - 1x ON/OFF button
LEDS:
  - 8 leds controlled by TLC59208F (they can be switched on/off
    independendently but the color can by changed by GPIOs)
  - 1x Red led (Power)
  - 1x Green led (Power)
UART:
  - 115200-8-N-1

Everything works correctly.

Installation
------------
These routers have a dual partition system. However this firmware works
only on boot partition 1 and the OEM web interface will always flash on
the partition currently not booted.

The following steps will use the SRS60 firmware, but you have to chose
the right firmware for your router.

There are 2 ways to install Openwrt the first time:

1) Using NMRPflash
 1. Download nmrpflash (https://github.com/jclehner/nmrpflash)
 2. Put the openwrt-ipq40xx-generic-netgear_srs60-squashfs-factory.img
	file in the same folder of the nmrpflash executable
 3. Connect your pc to the router using the port near the power button.
 4. Run "nmrpflash -i XXX -f openwrt-ipq40xx-generic-netgear_srs60-squashfs-factory.img".
	Replace XXX with your network interface (can be identified by
	running "nmrpflash -L")
 5. Power on the router and wait for the flash to complete. After about
	a minute the router should boot directly to Openwrt. If nothing
	happens try to reboot the router. If you have problems flashing
	try to set "10.164.183.253" as your computer IP address

2) Without NMRPflash
The OEM web interface will always flash on the partition currently not
booted, so to flash OpenWrt for the first time you have to switch to
boot partition 2 and then flash the factory image directly from the OEM
web interface.

To switch on partition 2 you have to enable telnet first:
 1. Go to http://192.168.1.250/debug.htm and check "Enable Telnet".
 2. Connect through telent ("telnet 192.168.1.250") and login using
	admin/password.

	To read the current boot_part:
		artmtd -r boot_part

	To write the new boot_part:
		artmtd -w boot_part 02

	Then reboot the router and then check again the current booted
	partition

Now that you are on boot partition 2 you can flash the factory Openwrt
image directly from the OEM web interface.

Restore OEM Firmware
--------------------
 1. Download the stock firmware from official netgear support.
 2. Follow the nmrpflash procedure like above, using the official
	Netgear firmware (for example SRS60-V2.2.1.210.img)

        nmrpflash -i XXX -f SRS60-V2.2.1.210.img

Notes
-----
1) You can check and edit the boot partition in the Uboot shell using
	the UART connection.
	"boot_partition_show" shows the current boot partition
	"boot_partition_set 1" sets the current boot partition to 1

2) Router mac addresses:

   LAN XX:XX:XX:XX:XX:69
   WAN XX:XX:XX:XX:XX:6a
   WIFI 2G XX:XX:XX:XX:XX:69
   WIFI 5G XX:XX:XX:XX:XX:6b
   WIFI 5G (2nd) XX:XX:XX:XX:XX:6c

   LABEL XX:XX:XX:XX:XX:69

Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
[added 5.10 changes for 901-arm-boot-add-dts-files.patch, moved
sysupgrade mmc.sh to here and renamed it, various dtsi changes]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-11-01 00:56:51 +01:00
Davide Fioravanti 24efb49ff0 ipq40xx: enable CONFIG_CMDLINE_PARTITION and CONFIG_LEDS_TLC591XX
CONFIG_CMDLINE_PARTITION:
Some devices with mmc like the Netgear Orbi Pro SRS60 or Netgear Orbi
RBR50 needs to hardcode the partitions layout in the cmdline boot
correctly

CONFIG_LEDS_TLC591XX:
This is needed for the led driver found in the Netgear Orbi Pro SRS60

Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Shang Jia <jiash416@gmail.com>
[added 5.10 config]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-11-01 00:56:51 +01:00
Sander Vanheule c735d2e218 realtek: backport GPIO IRQ index fix
Backport the patch queued upstream for 5.16. The patch differs slightly
from the upstream patch due to an upstream change that added a
convenience function.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2021-11-01 00:56:51 +01:00
Pavel Kubelun 78be2741aa ipq40xx: fix sleep clock
It seems like sleep_clk was copied from ipq806x.
Fix ipq40xx sleep_clk to the value QSDK defines.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [5.4+5.10]
2021-11-01 00:56:51 +01:00
Christian Lamparter abb4083fa0 apm821xx: MBL: MR24: fetch IP address over dhcp by default
This patch changes the default network configuration
to fetch the IP addresses over dhcp instead of being
statically assigned.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-11-01 00:56:51 +01:00
Nicolò Veronese 3f96743459 ath79: fix UBNT Aircube AC gpios
GPIOs on the Aircube AC are wrong:
 - Reset GPIO moved from 17 to 12
 - PoE Pass Through GPIO for Aircube AC is 3

Fixes: 491ae3357e ("ath79: add support for Ubiquiti airCube AC")

Signed-off-by: Nicolò Veronese <nicveronese@gmail.com>
2021-11-01 00:43:18 +01:00
Shiji Yang 184dc6e32a ath79: add support for Letv LBA-047-CH
Specifications:
SOC: QCA9531 650 MHz
ROM: 16 MiB Flash (Winbond W25Q128FV)
RAM: 128 MiB DDR2 (Winbond W971GG6SB)
LAN: 10/100M *2
WAN: 10/100M *1
LED: BGR color *1

Mac address:
label	C8:0E:77:xx:xx:68	art@0x0
lan	C8:0E:77:xx:xx:62	art@0x6
wan	C8:0E:77:xx:xx:68	art@0x0    (same as the label)
wlan	C8:0E:77:xx:xx:B2	art@0x1002 (load automatically)

TFTP installation:
* Set local IP to 192.168.67.100 and open tftpd64, link lan
  port to computer.
  Rename "xxxx-factory.bin" to
  "openwrt-ar71xx-generic-ap147-16M-rootfs-squashfs.bin".
* Make sure firmware file is in the tftpd's directory, push
  reset button and plug in, hold it for 5 seconds, and then
  it will download firmware from tftp server automatically.

More information:
* This device boot from flash@0xe80000 so we need a okli
  loader to deal with small kernel partition issue. In order
  to make full use of the storage space, connect a part of the
  previous kernel partition to the firmware.

  Stock                          Modify
  0x000000-0x040000(u-boot)      0x000000-0x040000(u-boot)
  0x040000-0x050000(u-boot-env)  0x000000-0x050000(u-boot-env)
  0x050000-0xe80000(rootfs)      0x050000-0xe80000(firmware part1)
  0xe80000-0xff0000(kernel)      0xe80000-0xe90000(okli-loader)
                                 0xe90000-0xff0000(firmware part2)
  0xff0000-0x1000000(art)        0xff0000-0x1000000(art)

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2021-11-01 00:15:09 +01:00
Jihoon Han 84451173f0 ath79: add support for Dongwon T&I DW02-412H
Dongwon T&I DW02-412H is a 2.4/5GHz band 11ac (WiFi-5) router, based on
Qualcomm Atheros QCA9557.

Specifications
--------------

- SoC: Qualcomm Atheros QCA9557-AT4A
- RAM: DDR2 128MB
- Flash: SPI NOR 2MB (Winbond W25Q16DVSSIG / ESMT F25L16PA(2S)) +
         NAND 64/128MB
- WiFi:
  - 2.4GHz: QCA9557 WMAC
  - 5GHz: QCA9882-BR4A
- Ethernet: 5x 10/100/1000Mbps
  - Switch: QCA8337N-AL3C
- USB: 1x USB 2.0
- UART:
  - JP2: 3.3V, TX, RX, GND (3.3V is the square pad) / 115200 8N1

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

1.  Connect a serial interface to UART header and
    interrupt the autostart of kernel.
2.  Transfer the factory image via TFTP and write it to the NAND flash.
3.  Update U-Boot environment variable.
    > tftpboot 0x81000000 <your image>-factory.img
    > nand erase 0x1000000
    > nand write 0x81000000 0x1000000 ${filesize}
    > setenv bootpart 2
    > saveenv

Revert to stock firmware
--------------

1.  Revert to stock U-Boot environment variable.
    > setenv bootpart 1
    > saveenv

MAC addresses as verified by OEM firmware
--------------

   WAN: *:XX (label)
   LAN: *:XX + 1
  2.4G: *:XX + 3
    5G: *:XX + 4

The label MAC address was found in art 0x0.

Credits
--------------

Credit goes to the @manatails who first developed how to port OpenWRT
to this device and had a significant impact on this patch.

And thanks to @adschm and @mans0n for guiding me to revise the code
in many ways.

Signed-off-by: Jihoon Han <rapid_renard@renard.ga>
Reviewed-by: Sungbo Eo <mans0n@gorani.run>
Tested-by: Sungbo Eo <mans0n@gorani.run>
2021-10-31 21:58:28 +01:00
Jihoon Han a61a41d4aa kernel: add support for ESMT F25L16PA(2S) SPI-NOR
This fixes support for Dongwon T&I DW02-412H which uses F25L16PA(2S) flash.

Signed-off-by: Jihoon Han <rapid_renard@renard.ga>
Reviewed-by: Sungbo Eo <mans0n@gorani.run>
[refresh patches]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-10-31 21:56:56 +01:00
Robert Marko 76fff69180 ipq806x: ecw5410: use bootloader provided MAC-s
Currently, we are overriding the bootloader provided MAC-s as the ethernet
aliases are reversed so MAC-s were fixed up in userspace.
There is no need to do that as we can just fix the aliases instead and get
rid of MAC setting via userspace helper.

Fixes: 59f0a0f ("ipq806x: add Edgecore ECW5410 support")

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2021-10-31 21:24:47 +01:00
Robert Marko 2e3c79ef83 ipq806x: ecw5410: fix PCI1 radio caldata
ECW5410 has 2 QCA9984 cards, one per PCI controller.
They are located at PCI adresses 0001:01:00.0 and 0002:01:00.0.

Currently, pre-cal is not provided for 0001:01:00.0 at all,but for
0000:01:00.0 which is incorrect and causes the ath10k driver to not
be able to fetch the BMI ID and use that to fetch the proper BDF but
rather fail with:
[   12.029708] ath10k 5.10 driver, optimized for CT firmware, probing pci device: 0x46.
[   12.031816] ath10k_pci 0001:01:00.0: enabling device (0140 -> 0142)
[   12.037660] ath10k_pci 0001:01:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[   13.173898] ath10k_pci 0001:01:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe
[   13.174015] ath10k_pci 0001:01:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[   13.189304] ath10k_pci 0001:01:00.0: firmware ver 10.4b-ct-9984-fW-13-5ae337bb1 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc35
[   15.492322] ath10k_pci 0001:01:00.0: failed to fetch board data for bus=pci,vendor=168c,device=0046,subsystem-vendor=168c,subsystem-device=cafe,variant=Edgecore-ECW541 from ath10k/QCA9984/hw1.0/board-2.bin
[   15.543883] ath10k_pci 0001:01:00.0: failed to fetch board-2.bin or board.bin from ath10k/QCA9984/hw1.0
[   15.543920] ath10k_pci 0001:01:00.0: failed to fetch board file: -12
[   15.552281] ath10k_pci 0001:01:00.0: could not probe fw (-12)

So, provide the pre-cal for the actual PCI card and not the non-existent
one.

Fixes: 59f0a0f ("ipq806x: add Edgecore ECW5410 support")

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2021-10-31 21:24:47 +01:00
Robert Marko fa3646c003 ipq806x: ecw5410: drop GPIO based MDIO1 node
It looks like this is a leftover before there was a proper MDIO driver.
Since both PHY-s are connected to the HW MDIO bus there is no reason for
this to exist anymore, especially since it uses the same pins as the HW
controller and has the pinmux for the set to "MDIO" so this worked by
pure luck as GPIO MDIO would probe first and override the HW driver.

Move the GMAC3 to simply use the same MDIO bus phandle.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2021-10-31 21:24:47 +01:00
André Valentin 766d1d675b ath79: fix parallel image generation for Zyxel NBG6716
This changes the image generation to use a unique directory. With
parallel building it may occur that two concurrent jobs try
to create an image which leds to errors. It also removes a needless
subdirecory.

Signed-off-by: André Valentin <avalentin@marcant.net>
2021-10-31 21:24:47 +01:00
Sergio Paracuellos eb00fb8f71 ramips: add support for HiLink HLK-7621A evaluation board
Specifications:
- SoC: MediaTek MT7621AT
- RAM: 256 MB (DDR3)
- Flash: 32 MB SPI NOR 44MHz
- Switch: 1 WAN, 4 LAN (Gigabit)
- LEDs: 1 WAN, 4 LAN (controlled by PHY)
- USB Ports: 1 x USB2, 1 x USB3
- WLAN: 1 x 2.4, 5 GHz 866Mbps (MT7612E)
- Button: 1 button (reset)
- UART Serial: UART1 as console : 57600 baud
- Power: 12VDC, 1A

Installation:
Update openWRT firmware using internal GNUBEE uboot:
https://github.com/gnubee-git/GnuBee-MT7621-uboot

By HTTP: Initial uboot address is http://10.10.10.123, your address
needs to be 10.10.10.x, and mask 255.255.255.0.
By TFTP: Uboot is in client mode, the address of the firmware must
be tftp://10.10.10.3/uboot.bin

Recovery:
Manufacturer provides MTK OpenWrt 14.07 source code, compile then
flash it by uboot.
HLK-7621A is a stamp hole package module for embedded development,
users have to design IO boards to use it.

MAC addresses:
- u-boot-env contains a placeholder address:
  > mtd_get_mac_ascii u-boot-env ethaddr
  03:17:73🆎cd:ef
- phy0 gets a valid-looking address:
  > cat /sys/class/ieee80211/phy0/macaddress
  f8:62:aa:**:**:a8
- Calibration data for &pcie2 contains a valid address, however the
  zeros in the right half look like it's not real:
  8c:88:2b:00:00:1b
- Since it's an evaluation board and there is no solid information
  about the MAC address assignment, the ethernet MAC address is left random.

Signed-off-by: Chen Yijun <cyjason@bupt.edu.cn>
[add keys and pcie nodes to properly support evaluation board]
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
[remove ethernet address, wrap lines properly]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-10-31 21:24:47 +01:00
Eduardo Santos 3c97fb4346 ramips: add support for Xiaomi MiWifi 3C
This commit adds support for Xiaomi MiWiFi 3C device.

Xiaomi MiWifi 3C has almost the same system architecture
as the Xiaomi Mi WiFi Nano, which is already officially
supported by OpenWrt.

The differences are:

 - Numbers of antennas (4 instead of 2). The antenna management
   is done via the µC. There is no configuration needed in the
   software code.
 - LAN port assignments are different. LAN1 and WAN are
   interchanged.

OpenWrt Wiki: https://openwrt.org/toh/xiaomi/mir3c

OpenWrt developers forum page:
https://forum.openwrt.org/t/support-for-xiaomi-mi-3c

Specifications:

 - CPU: MediaTek MT7628AN (575MHz)
 - Flash: 16MB
 - RAM: 64MB DDR2
 - 2.4 GHz: IEEE 802.11b/g/n with Integrated LNA and PA
 - Antennas: 4x external single band antennas
 - WAN: 1x 10/100M
 - LAN: 2x 10/100M
 - LED: 1x amber/blue/red. Programmable
 - Button: Reset

MAC addresses as verified by OEM firmware:

use address source
LAN *:92 factory 0x28
WAN *:92 factory 0x28
2g *:93 factory 0x4

OEM firmware uses VLAN's to create the network interface for WAN and LAN.

Bootloader info:
The stock bootloader uses a "Dual ROM Partition System".
OS1 is a deep copy of OS2.
The bootloader start OS2 by default.
To force start OS1 it is needed to set "flag_try_sys2_failed=1".

How to install:
1- Use OpenWRTInvasion to gain telnet, ssh and ftp access.
   https://github.com/acecilia/OpenWRTInvasion
   (IP: 192.168.31.1 - Username: root - Password: root)
2- Connect to router using telnet or ssh.
3- Backup all partitions. Use command  "dd if=/dev/mtd0 of=/tmp/mtd0".
   Copy /tmp/mtd0 to computer using ftp.
4- Copy openwrt-ramips-mt76x8-xiaomi_miwifi-3c-squashfs-sysupgrade.bin
   to /tmp in router using ftp.
5- Enable UART access and change start image for OS1.
```
nvram set uart_en=1
nvram set flag_last_success=1
nvram set boot_wait=on
nvram set flag_try_sys2_failed=1
nvram commit
```
6- Installing Openwrt on OS1 and free OS2.
```
mtd erase OS1
mtd erase OS2
mtd -r write /tmp/openwrt-ramips-mt76x8-xiaomi_miwifi-3c-squashfs-sysupgrade.bin OS1
```

Limitations: For the first install the image size needs to be less
than 7733248 bits.

Thanks for all community and especially for this device:
minax007, earth08, S.Farid

Signed-off-by: Eduardo Santos <edu.2000.kill@gmail.com>
[wrap lines, remove whitespace errors, add mediatek,mtd-eeprom to
 &wmac, convert to nvmem]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-10-31 21:24:47 +01:00
Roger Pueyo Centelles 6801b827e4 ath79: mikrotik: enable SFP on RB921GS-5HPacD (mANTBox 15s)
This patch enables the SFP cage on the MikroTik RouterBOARD 921GS-5HPacD
(mANTBox 15s).

The RB922UAGS-5HPacD had it already working, so the support code is
moved to the common DTSI file both devices share.

Tested on a RouterBOARD 921GS-5HPacD with a MikroTik S-53LC20D module.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
2021-10-31 21:24:47 +01:00
Jani Partanen e06aaba4e3 ramips: fix LAVA LR-25G001 broken wifi led triggers
LED labels for this device are different in 01_leds file and in device
DTS. Switch to DT triggers, which works on Telewell TW-4 (LTE) clone
device.

This has not been tested on the LR-25G001 itself, just on the clone
mentioned above.

Fixes: 20b09a2125 ("ramips: add support for Lava LR-25G001")

Signed-off-by: Jani Partanen <rtfm@iki.fi>
[rephrase commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-10-30 22:11:23 +02:00
Adrian Schmutzler fbddb38442 ipq806x: consolidate 11-ath10k-caldata
After the ath10k_patch_mac lines have been removed, a lot of blocks
can be consolidated.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-10-30 22:11:23 +02:00
Adrian Schmutzler 6a27e8036e ipq806x: remove transition workarounds for qcom-smem partitions
The out-of-tree qcom-smem patches traditionally displayed mtd partition names
in upper case, starting with the new mainline qcom-smem support in kernel v5.10,
it switched to normalizing the partition names to lower case.

While both 5.4 and 5.10 were supported in the target, we carried a workaround
to support both of them. Since the target has dropped 5.4 recently, those
can be removed now.

Ref:

2db9dded0a ("ipq806x: nbg6817: case-insensitive qcom-smem partitions")
435dc2e77e ("ipq806x: ecw5410: case-insensitive qcom-smem partitions")
f70e11cd97 ("ipq806x: g10: case-insensitive qcom-smem partitions")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-10-30 22:11:23 +02:00
Ansuel Smith f44e933458 ipq806x: provide WiFI mac-addresses from dts
Use nvmem framework for supported mac-address stored
in nvmem cells and drop mac patch function for hotplug
script for supported devices.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[rebase, move to correct node for d7800, include xr500]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-10-30 22:11:13 +02:00
Michal Kozuch c12ef2f760 ramips: add support for TP-Link RE305 v3
Specs (same as in v1):
- MT7628AN (575 MHz)
- 64MB RAM
- 8MB of flash (SPI NOR)
- 1x 10/100Mbps Ethernet (MT7628AN built-in switch with vlan)
- 1x 2.4GHz wifi (MT7628AN)
- 1x 5Ghz wifi (MT7612E)
- 4x LEDs (5 GPIO-controlled)
- 1x reset button
- 1x WPS button

The only and important difference between v1 & v3 is in flash memory
layout, so pls don't interchange these 2 builds!

Installation through web-ui (on OEM factory firmware):
1. Visit http://tplinkrepeater.net or the configured IP address of
   your RE305 v3 (default 192.168.0.254).
2. Log in with the password you've set during initial setup of the
   RE305 (there is no default password).
3. Go to Settings -> System Tools -> Firmware upgrade
4. Click Browse and select the OpenWRT image with factory.bin suffix
   (not sysupgrade.bin)
5. A window with a progress bar will appear. Wait until it completes.
6. The RE305 will reboot into OpenWRT and serve DHCP requests on the
   ethernet port.
7. Connect an RJ45 cable from the RE305 to your computer and access
   LuCI at http://192.168.1.1/ to configure (or use ssh).

Disassembly:
Just unscrew 4 screws in the corners & take off the back cover.
Serial is exposed to the right side of the main board (in the middle)
and marked with TX/RX/3V3/GND, but the holes are filled with solder.

Installation through serial:
1. connect trough serial (1n8, baudrate=57600)
2. setup the TFTP server and connect it via ethernet
   (ipaddr=192.168.0.254 of device, serverip=192.168.0.184 - your pc)
3. boot from a initramfs image first (choose 1 in the bootloader
   options)
4. test it a bit with that, then proceed to run sysupgrade build

MAC addresses as verified by OEM firmware:

  use  OpenWrt  address  reference
  LAN  eth0     *:d2     label
  2g   wlan0    *:d1     label - 1
  5g   wlan1    *:d0     label - 2

  The label MAC address can be found in config 0x2008.

Signed-off-by: Michal Kozuch <servitkar@gmail.com>
[redistribute WLAN node properties between DTS/DTSI, remove
 compatible on DTSI, fix indent/wrapping, split out firmware-utils
 change]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-10-30 22:05:25 +02:00
INAGAKI Hiroshi 1b814974e1 build: move elecom-wrc-gs-factory to image-commands.mk
ELECOM WRC-X3200GST3 uses the same header/footer as WRC-GS/GST devices
in ramips/mt7621 subtarget, so move "Build/elecom-wrc-gs-factory" to
image-commands.mk to use from mediatek/mt7622 subtarget.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-10-30 22:05:25 +02:00
Chukun Pan 1b18195f59 sunxi: Nanopi R1S H5: enable LAN LED configuration
This enables the LEDs on the LAN interfaces.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2021-10-30 21:17:20 +02:00
Chukun Pan fde68cb809 sunxi: add support for FriendlyARM NanoPi R1S H5
Specification:
  CPU: Allwinner H5, Quad-core Cortex-A53
  DDR3 RAM: 512MB
  Network: 10/100/1000M Ethernet x 2
  USB Host: Type-A x 1
  MicroSD Slot x 1
  MicroUSB: for power input
  Debug Serial Port: 3Pin pin-header
  LED: WAN, LAN, SYS
  KEY: Reset
  Power Supply: DC 5V/2A

Installation:
  Write the image to SD Card with dd.

Note:
  1. OpenWrt currently does not support LED_FUNCTION, change back to the
     previous practice (Consistent with NanoPi R1).
  2. Since the upstream commit https://github.com/torvalds/linux/bbc4d71
     ("net: phy: realtek: fix rtl8211e rx/tx delay config"), we need to
     change the phy-mode from rgmii to rgmii-id.
     So set phy-mode for 5.4 and 5.10 respectively.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2021-10-30 21:17:20 +02:00
Chukun Pan cc2a8c2545 rockchip: move r8152 related patches to generic
These patches can be used on other platforms, so
move it to generic.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2021-10-30 21:17:20 +02:00
Rui Salvaterra 02026d0a6f kernel: bump 5.10 to 5.10.76
Deleted (upstreamed):
bcm27xx/patches-5.10/950-0145-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch [1]

Manually rebased:
bcm27xx/patches-5.10/950-0355-xhci-quirks-add-link-TRB-quirk-for-VL805.patch
bcm53xx/patches-5.10/180-usb-xhci-add-support-for-performing-fake-doorbell.patch

Note: although automatically rebaseable, the last patch has been edited to avoid
conflicting bit definitions.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.10.y&id=b6f32897af190d4716412e156ee0abcc16e4f1e5

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-10-30 21:17:20 +02:00
Christian Lamparter fd717f54be ipq40xx: detangle ath10k-board-qca4019 from ath10k-firmware-qca4019*
Back in the day, the board-2.bin came with ath10k-firmware-qca4019.
This changed with
commit c3b2efaf24 ("linux-firmware: ath10k: add board firmware packages")
which placed the board-2.bin into a separate package: ath10k-board-qca4019.
This was great, because it addressed one of the caveat of the original
ipq-wifi package:
commit fa03d441e9 ("firmware: add custom IPQ wifi board definitions")

|  2. updating ath10k-firmware-qca4019 will also replace
|      the board-2.bin. For this cases the user needs to
|      manually reinstall the wifi-board package once the
|      ath10k-firmware-qca4019 is updated.

This could be extended further so that ipq-wifi packages
no longer use "install-override" and the various QCA4019
variants list the ath10k-board-qca4019 as a CONFLICT
package.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-10-30 16:32:59 +02:00
Christian Lamparter 4c8dd973ef ath9k: OF: qca,disable-(2|5)ghz => ieee80211-freq-limit
OpenWrt maintains two special out-of-tree DT properties:
"qca,disable-5ghz" and "qca,disable-2ghz". These are implemented
in a mac80211 ath9k patch "550-ath9k-disable-bands-via-dt.patch".

With the things being what they are, now might be a good
point to switch the devices to the generic and upstream
"ieee80211-freq-limit" property. This property is much
broader and works differently. Instead of disabling the
drivers logic which would add the affected band and
channels. It now disables all channels which are not
within the specified frequency range.

Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> # HH5A
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-10-30 16:32:59 +02:00
Bjørn Mork d990f805c0 realtek: re-enable IPv6 routing
Commit 03e1d93e07 ("realtek: add driver support for routing
offload") added routing offload for IPv4, but broke IPv6 routing
completely.  The routing table is empty and cannot be updated:

 root@gs1900-10hp:~# ip -6 route
 root@gs1900-10hp:~# ip -6 route add unreachable default
 RTNETLINK answers: Invalid argument

As a side effect, this breaks opkg on IPv4 only systems too,
since uclient-fetch fails when there are no IPv6 routes:

 root@gs1900-10hp:~# uclient-fetch http://192.168.99.1
 Downloading 'http://192.168.99.1'
 Failed to send request: Operation not permitted

Fix by returning NOTIFY_DONE when offloading is unsupported, falling
back to default behaviour.

Fixes: 03e1d93e07 ("realtek: add driver support for routing offload")
Signed-off-by: Bjørn Mork <bjorn@mork.no>
2021-10-30 15:00:22 +02:00
Bjørn Mork daefc646e6 realtek: fix ZyXEL initramfs image generation
The current rule produces empty trailers, causing the OEM firmware
update application to reject our images.

The double expansion of a makefile variable does not work inside
shell code.  The second round is interpreted as a shell expansion,
attempting to run the command ZYXEL_VERS instead of expanding the
$(ZYXEL_VERS) makefile variable.

Fix by removing one level of variable indirection.

Fixes: c6c8d597e1 ("realtek: Add generic zyxel_gs1900 image definition")
Tested-by: Sander Vanheule <sander@svanheule.net>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
2021-10-30 15:00:22 +02:00
Christian Lamparter 6102f883ce bcm53xx: MR32: replace i2c-gpio with SoC's i2c
During review of the MR32, Florian Fainelli pointed out that the
SoC has a real I2C-controller. Furthermore, the connected pins
(SDA and SCL) would line up perfectly for use. This patch swaps
out the the bitbanged i2c-gpio with the real deal.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-10-30 15:00:22 +02:00
Daniel Golle f5d071a508
sunxi: deselect CONFIG_VIDEO_SUN6I_CSI by default
Deselect CONFIG_VIDEO_SUN6I_CSI Kconfig symbol for now. If anyone wants
to use CSI (camera interface) they should package the kernel module.
After this change, sunxi targets build again.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-10-29 18:44:15 +01:00
Daniel Golle 1175e786f8
sunxi: add CONFIG_ARM_CRYPTO Kconfig symbol
And another missing symbol...

Reported-by: Chen Minqiang <ptpt52@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-10-29 18:44:09 +01:00
Daniel Golle 3c33ed02c2
sunxi: add yet another missing Kconfig symbol
Set CONFIG_CRYPTO_CRCT10DIF_ARM_CE=y for sunxi targets.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-10-29 18:25:27 +01:00
Rafał Miłecki a2f5a83af8 bcm53xx: backport patch fixing pinctrl driver
This switches pinctrl driver to use the old & good DT binding. There is
no more need to adjust upstream DTS file.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-10-29 15:30:47 +02:00
Daniel Golle 524c687e05
sunxi: add missing CONFIG_VIDEO_SUN4I_CSI Kconfig symbol
Simply disable this for now, if anyone wants to use CSI feel free to
package it as a kernel module package.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-10-29 14:21:27 +01:00
Daniel Golle 4ae4035e60
mediatek: make sure MMC is not busy before commencing sysupgrade
In case of the block device still being in use, re-reading the
partition table fails. In that case, abort sysupgrade to avoid
corrupting the just-written image because of wrong offsets caused
by failure to re-read the partition table.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-10-28 16:27:27 +01:00
Peter Geis 70c12d26ca ipq806x: add support for Netgear Nighthawk Pro Gaming XR500
This adds support for the Netgear Nighthawk Pro Gaming XR500.
It is the successor to the Netgear Nighthawk R7800 and shares almost
identical hardware to that device.
The stock firmware is a heavily modified version of OpenWRT.

Specifications:
  SoC: Qualcomm Atheros IPQ8065
  RAM: 512 MB
  Storage: 256 MiB NAND Flash
  Wireless: 2x Qualcomm Atheros QCA9984
  Ethernet: 2x 1000/100/10 dedicated interfaces
  Switch: 5x 1000/100/10 external ports
  USB: 2x 3.0 ports

More information:
Manufacturer page: https://www.netgear.com/gaming/xr500/
Almost identical to Netgear R7800
Differences (r7800 > xr500):
  Flash: 128MiB > 256MiB
  Removed esata
  swapped leds:
    usb1 (gpio 7 > 8)
    usb2 (gpio 8 > 26)
    guest/esata (gpio 26 > 7)

MAC addresses:

On the OEM firmware, the mac addresses are:

  WAN: *:50  art 0x6
  LAN: *:4f  art 0x0 (label)
  2G:  *:4f  art 0x0
  5G:  *:51  art 0xc

Installation:
Install via Web Interface (preferred):
Utilize openwrt-ipq806x-netgear_xr500-squashfs-factory.img

Install via TFTP recovery:
1.Turn off the power, push and hold the reset button (in a hole on
  backside) with a pin
2.Turn on the power and wait till power led starts flashing white
  (after it first flashes orange for a while)
3.Release the reset button and tftp the factory img in binary mode.
  The power led will stop flashing if you succeeded in transferring
  the image, and the router reboots rather quickly with the new
  firmware.
4.Try to ping the router (ping 192.168.1.1). If does not respond,
  then tftp will not work either.

Uploading the firmware image with a TFTP client
$ tftp 192.168.1.1
bin
put openwrt-ipq806x-netgear_xr500-squashfs-factory.img

Note:

The end of the last partition is at 0xee00000. This was chosen
by the initial author, but nobody was able to tell why this
particular arbitrary size was chosen. Since it's not leaving
too much empty space and it's the only issue left, let's just
keep it for now.

Based on work by Adam Hnat <adamhnat@gmail.com>
ref: https://github.com/openwrt/openwrt/pull/3215

Signed-off-by: Peter Geis <pgwipeout@gmail.com>
[squash commits, move common LEDs to DTSI, remove SPDX on old
 files, minor whitespace cleanup, commit message facelift,
 add MAC address overview, add Notes, fix MAC addresses,
 use generic name for partition nodes in DTS]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-10-26 22:30:18 +02:00
Bruno Randolf 2c3e8bed3f
ramips: minew g1-c: Allow dynamic RAM sizes
Allow RAM size to be passed thru U-Boot. There are 128MB and 64MB
versions of Minew G1-C. This is also in line with the behaviour of
most other RAMIPS boards.

Signed-off-by: Bruno Randolf <br1@einfach.org>
2021-10-26 13:59:30 +02:00
Paul Spooren abd67de9f0 sunxi: switch to Kernel 5.10
Compile tested and run tested on Pine64+.

Acked-by: Daniel Golle <daniel@makrotopia.org>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-10-25 10:28:07 -10:00
Hauke Mehrtens a1939e7e37 kernel: Add extra configuration options
These options show up when compiling the at91 target.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-10-24 20:22:04 +02:00
Claudiu Beznea 8746ba3657 at91: add support for sam9x60-ek board
Add support for SAM9X60-EK board.

Hardware:
- SoC: SAM9X60
- RAM: Winbond W972GG6KB-25 (2Gbit DDR2)
- NAND Flash: Micron MT29F4G08ABAEA
- QSPI Flash: Microchip SST26VF064B
- EEPROM: Microchip 24AA02E48
- SDMMC: One standard 4-bit SD card interface
- USB: two stacked Type-A connectors with power switches, one micro-B
       USB device
- CAN: 2 interfaces (Microchip MCP2542)
- Ethernet: one 10/100Mbps
- WiFi/BT: one optional WiFi/Bluetooth interface
- Audio: one ClassD port
- Display: one 24-bit LCD interface
- Camera: one 12-bit image sensor interface
- IO: one IO expander (Microchip MCP23008)
- Debug ports: one J-Link-OB + CDC, one JTAG interface
- Leds: one RGB LED
- Buttons: 4 push button switches
- Expansion: one PIO connector, one mikrobus connector
- Power management: two power regulators, two power consumption measurement
                    devices

Flashing:
- follow the procedure at [1]

[1] https://www.linux4sam.org/bin/view/Linux4SAM/Sam9x60EKMainPage#Create_a_SD_card_with_the_demo

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
2021-10-24 18:52:29 +02:00
Claudiu Beznea 65c4e89dcf at91: enable kernel config for sam9x60
Enable kernel config for SAM9X60.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
2021-10-24 18:52:25 +02:00
Claudiu Beznea 60f52f9b0d at91: add support for sama5d27-wlsom1-ek board
Add support for SAMA5D27 WLSOM1-EK board.

Hardware:
- SIP: SAMA5D27C-LD2G-CU including SAMA5D27 MPU and 2Gbit LPDDR2-SDRAM
- MMC: one standard SD card interface
- Flash: 64 Mb serial quad I/O flash memory (SST26VF064BEUIT-104I/MF)
	 with embedded EUI-48 and EUI-64 MAC addresses
- USB: one USB device, one USB host one HSIC interface
- Ethernet: 1x10/100Mbps port
- WiFi/BT: IEEE 802.11 b/g/n Wi-Fi plus Bluetooth (Wi-Fi/BT) module
	   (ATWILC3000-MR110UA)
- Crypto: one ATECC608B-TNGTLS secure element
- Video: one LCD RGB 18-bit interface, one ISC 12-bit camera interface
- Debug port: one JTAG interface, one UART interface, one WILC UART
              interface
- Leds: one RGB LED
- Buttons: start, reset, wakeup, user buttons
- Expansion: one tamper connector, one mikrobus interface, 2 XPRO PTC
             connector
- Power managament: PMIC (MCP16502)

Flashing:
- follow procedure at [1]

[1] https://www.linux4sam.org/bin/view/Linux4SAM/Sama5d27WLSom1EKMainPage#Create_a_SD_card_with_the_demo

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
2021-10-24 18:52:21 +02:00
Claudiu Beznea 8b7e577f76 at91: add support for sama5d2 icp board
Add support for SAMA5D2 ICP board.

Hardware:
- SoC: SAMA5D27
- RAM: 512 MB DDR3L
- MMC: One stanard SD card interface
- USB: One USB host switch 4 ports with power switch,
       One USB device type Micro-AB
- CAN: 2 interfaces
- Ethernet: One Gigabit Ethernet PHY through HSIC,
	    One ETH switchport,
	    One EtherCAT interface
- WiFi/BT: Footprint for IEEE 802.11 b/g/n Wi-Fi plus
	   Bluetooth module (Wi-Fi/BT), suitable for
	   Microchip WILC3000-MR110CA or WILC3000-MR110UA
- Debug port: One J-Link-OB/J-Link-CDC, one JTAG interface
- Leds: one RGB LED
- Buttons: reset, wakeup, 2 user buttons
- Expansion: one PIOBU/PIO connector, 3 mikrobus sockets
- Power mangament: PMIC (MCP16502), one power consumption device
                   (PAC1934)

Not working in Linux:
- EtherCAT interface: there is no Linux support integrated
- PAC1934: driver available at [1] but not integrated in Linux

Flashing:
- follow the procedure at [2]

[1] https://ww1.microchip.com/downloads/en/DeviceDoc/pac193x_linux_driver.zip
[2] https://www.linux4sam.org/bin/view/Linux4SAM/Sama5d2IcpMainPage#Create_a_SD_card_with_the_demo

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
2021-10-24 18:52:17 +02:00
Claudiu Beznea 999c925f9d at91: enable specific sam9x kernel config flags
Enable specific sam9x kernel config flags.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
2021-10-24 18:52:12 +02:00
Claudiu Beznea 7bd0fba3df at91: kernel: bump to 5.10
Bump at91 targets to kernel v5.10. With this patches and files for
wb45n and wb50n were removed as they are now included in upstream
kernel. Along with:
- this the kernel config for sama5d2 and sam9x targets has been
  refreshed (with make kernel_menuconfig + save);
- CONFIG_ARCH_AT91 and specific sam9x SoCs (AT91RM9200, AT91SAM9,
  SAM9X60) has been enabled such that sam9x SoCs to be able to boot.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
2021-10-24 18:52:06 +02:00
Chukun Pan d9a580eb2e sunxi: 5.10: enable sun8i-thermal
Enable the sun8i-thermal driver to allow reading the
temperature of the SoC.

As suggested by mans0n, disable this driver in the
a8 subtarget because it does not support yet.

Tested on NanoPi R1S H5.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2021-10-24 18:44:41 +02:00
Matthew Hagan b428f187f0 kernel: 5.10: qca8k: backport qca8k_setup tidy-up
Tidy qca8k_setup for loops relating to port handling. No functional
changes.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
2021-10-24 16:56:17 +02:00
Matthew Hagan ae77a466e4 kernel: 5.10: backport qca8k cpu_port_index fix in parse_port_config
Add cpu_port_index fix to apply settings to correct CPU port.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
2021-10-24 16:56:17 +02:00
Matthew Hagan f97cafdd1d kernel: 5.10: backport qca8k feature additions
Backport Ansuel Smith's various qca8k feature additions:
- mac-power-sel support
- SGMII PLL explicit enable
- tx/rx clock phase to falling edge
- power-on-sel and LED open drain mode
- cpu port 6
- qca8328 support
- sgmii internal delay
- move port config to dedicated struct
- convert to yaml schema

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
2021-10-24 16:56:17 +02:00
Matthew Hagan d888ef5668 kernel: 5.10: backport QCA83x PHY resume fix, DAC amplitude preferred master, debug reg names
Backport workaround for QCA8327 PHY resume, which does not properly support
genphy_suspend/resume. Also add DAC amplitude fix for the QCA8327 PHY,
set port to preferred master and add proper names to debug regs.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
2021-10-24 16:56:17 +02:00
Matthew Hagan dee819272a kernel: 5.10: backport at803x QCA83xx phy support improvements
This commit add accepted upstream patches that improve & tidy qca83xx support.
1 - Split qca8327 to A & B variants, identifiable by phy_id
2 - Add suspend/resume support to qca8xx phys
3 - Tidy spacing and phy naming.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
2021-10-24 16:56:17 +02:00
Matthew Hagan 3cee66cd37 kernel: 5.10: backport at803x internal QCA8327 PHY support
Add support for qca8327 internal phy needed for correct init of the
switch port. It does use the same qca8337 function and reg just with a
different id.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
2021-10-24 16:56:17 +02:00
Matthew Hagan 8cd974dc40 kernel: 5.10: backport qca8k legacy mdio mapping panic fix
Add backport of Ansuel Smith's "net: dsa: qca8k: fix kernel panic with
legacy mdio mapping" patch.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
2021-10-24 16:56:17 +02:00
Matthew Hagan c757c71fd1 kernel: 5.10: backport additional qca8k fixes
Backport fixes including:
net: dsa: qca8k: fix missing unlock on error in qca8k_vlan_(add|del)
net: dsa: qca8k: check return value of read functions correctly
net: dsa: qca8k: add missing check return value in qca8k_phylink_mac_config()
net: dsa: qca8k: fix an endian bug in qca8k_get_ethtool_stats()
net: dsa: qca8k: check the correct variable in qca8k_set_mac_eee()

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
2021-10-24 16:56:17 +02:00
Matthew Hagan e3c47ff90d kernel: 5.10: backport qca8k stability improvements
This is a backport of Ansuel Smith's "Multiple improvement to qca8k stability"
series. The QCA8337 switch is available on multiple platforms including
ipq806x, ath79 and bcm53xx.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
2021-10-24 16:56:17 +02:00
Christian Lamparter 36104dc51f kernel: 5.10: silence bogus "Missing #address-cells in interrupt provider" warnings
Rosen reported strange dtc warnings that had their origin in
an upstream patch to 5.8-rc1. Upon further digging this
revealed an ongoing thread [0] discussing the topic:

> [...]I don't think we need a bunch of warning fix patches to add
> these everywhere. Also, the need for #address-cells pretty much makes
> no sense on any modern system. It is a relic from days when the bus
> (address) topology and interrupt topology were related.

and later on:
> So really, we only need to be checking for #address-cells in nodes
> with interrupt-map.

This patch backports just the patch which removed the warning message
(this is from the upstream dtc project [1] - but not the kernel).
the patch does not add the checking of the #address-cells in nodes
with interrupt-map.

[0] <https://lore.kernel.org/linux-devicetree/91e3405245c89f134676449cf3822285798d2ed2.1612189652.git.michal.simek@xilinx.com/>
[1] <https://git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/?id=d8d1a9a77863a8c7031ae82a1d461aa78eb72a7b>
Link: <https://github.com/openwrt/openwrt/pull/4685>
Reported-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-10-24 11:20:22 +02:00
Sven Eckelmann ac4a21141a ath79: ag71xx: Disable napi related interrupts during probe
ag71xx_probe is registering ag71xx_interrupt as handler for the gmac0/gmac1
interrupts. The handler is trying to use napi_schedule to handle the
processing of packets. But the netif_napi_add for this device is
called a lot later in ag71xx_probe.

It can therefore happen that a still running gmac0/gmac1 is triggering the
interrupt handler with a bit from AG71XX_INT_POLL set in
AG71XX_REG_INT_STATUS. The handler will then call napi_schedule and the
napi code will crash the system because the ag->napi is not yet
initialized:

  libphy: Fixed MDIO Bus: probed
  CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 00000000, ra == 81373408
  Oops[#1]:
  CPU: 0 PID: 1 Comm: swapper Not tainted 5.4.152 #0
  $ 0   : 00000000 00000001 00000000 8280bf28
  $ 4   : 82a98cb0 00000000 81620000 00200140
  $ 8   : 00000000 00000000 74657272 7570743a
  $12   : 0000005b 8280bdb9 ffffffff ffffffff
  $16   : 00000001 82a98cb0 00000000 8280bf27
  $20   : 8280bf28 81620000 ffff8b00 8280bf30
  $24   : 00000000 8125af9c
  $28   : 82828000 8280bed8 81610000 81373408
  Hi    : 00005fff
  Lo    : 2e48f657
  epc   : 00000000 0x0
  ra    : 81373408 __napi_poll+0x3c/0x11c
  Status: 1100dc03 KERNEL EXL IE
  Cause : 00800008 (ExcCode 02)
  BadVA : 00000000
  PrId  : 00019750 (MIPS 74Kc)
  Modules linked in:
  Process swapper (pid: 1, threadinfo=(ptrval), task=(ptrval), tls=00000000)
  Stack : ffff8afb ffff8afa 81620000 00200140 00000000 82a98cb0 00000008 0000012c
          81625620 81373684 ffffffff ffffffff ffffffef 00000008 816153d8 81620000
          815b0d60 815bbd54 00000000 81753700 8280bf28 8280bf28 8280bf30 8280bf30
          81753748 00000008 00000003 00000004 0000000c 00000100 3fffffff 8175373c
          816059f0 814ddb48 00000001 8160ab30 81615488 810618bc 00000006 00000000
          ...
  Call Trace:

  [<81373684>] net_rx_action+0xfc/0x26c
  [<814ddb48>] __do_softirq+0x118/0x2ec
  [<810618bc>] handle_percpu_irq+0x50/0x80
  [<8125ab8c>] plat_irq_dispatch+0x94/0xc8
  [<81004e98>] handle_int+0x138/0x144

  Code: (Bad address in epc)

  ---[ end trace a60d797432b656b2 ]---

The gmcc0/gmac1 must be brought in a state in which it doesn't signal a
AG71XX_INT_POLL related status bits as interrupt before registering the
interrupt handler. ag71xx_hw_start will take care of re-initializing the
AG71XX_REG_INT_ENABLE.

Fixes: f529a37420 ("surprise :p")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-10-23 18:50:31 +02:00
Rosen Penev 360c181dd7 kernel: backport GPIO LED patch for MT7530
This allows to specify and control switch LEDs on devices using mt7530
(typically mediatek and ramips targets).

Normally these LED GPIOs are 0, 3, 6, 9, and 12. wan/lan assignment is
per device. GPIO 9 is normally inverted. so GPIO_ACTIVE_HIGH instead of
GPIO_ACTIVE_LOW.

Tested on Linksys E7350.

Refreshed all patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-10-23 18:50:31 +02:00
Tan Zien 85a42fa9cb ipq40xx: MR33: Fix LP5562 LED driver probe
Add the reg and color property to each channel node. This update is
to accommodate the multicolor framework.

Refer to:
<https://lore.kernel.org/all/20200622185919.2131-9-dmurphy@ti.com>
<https://lore.kernel.org/all/20210818070209.1540451-1-michal.vokac@ysoft.com>

Signed-off-by: Tan Zien <nabsdh9@gmail.com>
[replaced links to lore, wrote something of a commit message]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-10-23 18:50:25 +02:00
Hauke Mehrtens 9501ce909f layerscape: Fix build in dtb
This fixes a kernel build problem.
The removed parts of the patch are already applied upstream.

Fixes: 9ad3ef27b9 ("kernel: bump 5.4 to 5.4.153")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-10-22 22:12:24 +02:00
Christian Lamparter 9fcb5c367e apm821xx: WNDAP6X0: add missed uci-default for compat
This should have been included in the previous patch that
resized the kernel partition to fit bigger kernels.

Fixes: 7a6a349445 ("apm821xx: WNDAP620 + WNDAP660: reorganize partitions for 5.10")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-10-22 21:25:18 +02:00
Christian Lamparter 8b0c053671 apm821xx: implement new LED label naming scheme
This patch updates all current APM82181 devices over to that
"new LED naming scheme". This includes many updates to the
device-tree:
	- dropped the deprecated, but beloved "label" property.
	- rename all DT leds node names to led-#.
	- add function and color properties.
	- utilized panic-indicator property.
	- dropped led- aliases (see below).

migration scripts for all devices are included.

For more information. See:
<https://www.kernel.org/doc/html/latest/leds/leds-class.html>

For the future: It looks like the color+function properties
won over the dt-alias / label. This will need to be wired up
into openwrt eventually. For APM821xx the situation is that
all devices have a dedicated power and fault indicator.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-10-22 21:25:18 +02:00
Christian Lamparter e9335c2920 ath79: lzma-loader: fix & re-enable per-board CONFIG_BOARD_DEV
Back in the AR71XX days, the lzma-loader code could be customized
based on the $BOARD variable. These would be passed as a
compile-time -DCONFIG_BOARD_$DEVICE_MODEL flag to the compiler.
Hence, the lzma-loader would be able to include device-specific
fixups.

Note: There's still a fixup for the TpLink TL-WR1043ND V1 found
in the lzma-loader's board.c code. But since the days of AR71XX
I couldn't find a forum post or bug reported. So, I left it
as is to not break anything by enabling it.

=> If you have a TL-WR1043ND V1 and you have problem with
the ethernet: let me know. Because otherwise, the fixup
might simply no longer needed with ath79 and it can be removed.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-10-22 21:25:18 +02:00
Christian Lamparter 8a042450d8 apm821xx: MX60(W): re-enable + allow bigger future kernels
The MX60's kernel is limited to 0x3EFC00 by the values in
mkmerakifw.c. Since the initramfs method of loading the
kernel seems to be working, this patch does away with the
use of the mkmerakifw tool for the MX60(W).

But this will go along with a change in u-boot as well.
So before you upgrade, please attach the serial cable and
perform:

| setenv owrt510_boot run meraki_ubi owrt_bootargs\; run owrt_load1 owrt_bootkernel\; run owrt_load2 owrt_bootkernel
| setenv bootcmd run owrt510_boot
| saveenv

Note: You won't be able to use older OpenWrt releases without
switching the bootcmd back to owrt_boot!

Note2: We are no longer compatible with older OpenWrt MX60 installs.
the legacy BOARD_NAME and SUPPORTED_DEVICES can be dropped. This is
because upgrades from older images are not possible without uboot env
changes anymore. Also the bogus BLOCKSIZE value
(which was set to 63k back then, in order to get the kernel properly
aligned after the fdt + meraki header) can be set to the NANDs real
value. The FDT size (which was needed for alignment) can now be
slimmed down as well.

Co-developed-by: Martin Kennedy <hurricos@gmail.com>
Signed-off-by: Martin Kennedy <hurricos@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-10-22 21:25:18 +02:00
Christian Lamparter bbb3852401 apm821xx: MBL: HDD regulators overhaul for MBL DUO
Takimata reported on the OpenWrt forum in thread [0], that his
MyBook Live Duo wasn't booting OpenWrt 21.02 after upgrading
from the previous OpenWrt 19.07.

The last logged entries on his console

|[    0.531599] sata1-regulator GPIO handle specifies active low - ignored
|[    0.538391] sata0-regulator GPIO handle specifies active low - ignored
|[    0.759791] ata2: SATA link down (SStatus 0 SControl 300)
|[    0.765251] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
|[    5.909555] ata1.00: qc timeout (cmd 0xec)
|[    5.913656] ata1.00: failed to IDENTIFY (I/O error, err_mask=0x4)
|[    6.231757] ata1: SATA link down (SStatus 0 SControl 300)

This extract clearly showed that the HDD on which OpenWrt is installed,
simply disappeared after the SATA power regulators had been initialized.

The reason why this worked with OpenWrt 19.07 was because the kernel
config symbol CONFIG_REGULATOR=y was not set in the target's config-4.14.

(This shows that the MBL Single does differ from the DUO in that
it does not have programmable power regulators for the HDDs.)

[0] <https://forum.openwrt.org/t/21-02-0-and-snapshot-fail-to-boot-on-my-book-live-duo/106585>

Reported-by: Takimata (forum)
Tested-by: Takimata (forum)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-10-22 21:25:18 +02:00
Roger Pueyo Centelles 68d91f08ed ath79: mikrotik: use 64 KiB SPI NOR erase sectors
This patch removes CONFIG_MTD_SPI_NOR_USE_4K_SECTORS from the default
symbols for the ath79/mikrotik target.

MikroTik devices hold some of their user-configurable settings in the
soft_config partition, which is typically sized 4 KiB, of the SPI NOR
flash memory. Previously, in the ar71xx target, it was possible to use
64 KiB erase sectors but also smaller 4 KiB ones when needed. This is
no longer the case in ath79 with newer kernels so, to be able to write
to these 4 KiB small partitions without erasing 60 KiB around, the
CONFIG_MTD_SPI_NOR_USE_4K_SECTORS symbol was added to the defaults.
However, this ended up making sysupgrade images which were built with
64 KiB size blocks not to keep settings (e.g., the files under
/etc/config/) over the flashing process.

Using 4 KiB erase sector size on the sysupgrade images (by setting
BLOCKSIZE = 4k) allows keeping settings over a flashing process, but
renders the process terribly slow, possibly causing a user to
mistakenly force a manual device reboot while the process is still on-
going. Instead, ditching the 4 KiB erase sectors for the default
64 KiB erase size provides normal SPI write speed and sysupgrade times,
at the expense of not being able to modify the soft_config partition
(which is rarely a required thing).

An OpenWrt patch for MTD_SPI_NOR_USE_4K_SECTORS_LIMIT may once have
allowed to use different per-partition erase sector sizes. Due to
changes on recent kernels it now only works on a per-device basis.
Also, partial eraseblock write can be performed in ath79 with kernels
5.4 and lower, by copying the blocks from the 64 KiB, erasing the whole
sector and restoring those blocks not meant to be modified. A kernel
bump had that patch broken for a long time, but got fixed in bf2870c.

Note: the settings in the soft_config partition can be reset to their
defaults by holding the reset button for 5 seconds (and less than 10
seconds) at device boot.

Fixes: FS#3492 (sysupgrade […] loses settings...)
Fixes: a66eee6336 (ath79: add mikrotik subtarget)

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
2021-10-22 08:15:40 -10:00
Rafał Miłecki b8e682ac74 bcm53xx: bridge all LAN ports on Linksys EA9500
External switch ports need to be bridged too.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-10-22 13:46:22 +02:00
Paul Spooren f46a70a688 toolchain: switch packaged toolchain to tar.xz
Currently the tar.bz2 while ImageBuilder and SDK switched to tar.xz.
Unify it for faster compression since it will make use of
multi-threading.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-10-21 08:25:38 -10:00
Rafał Miłecki e9672b1a8f bcm53xx: switch to the upstream DSA-based b53 driver
1. Drop swconfig
2. Simplify network setup
3. Verify network config
4. Disable Buffalo WZR-900DHP for now - it misses ports definition

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-By: Christian Lamparter <chunkeey@gmail.com>
2021-10-21 17:38:17 +02:00
Rafał Miłecki d88f3b8a42 bcm47xx: add kernel 5.10 support
It's for *development* only as it doesn't work with lzma-loader due to
bigger size.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-10-21 17:38:17 +02:00
David Bauer f85c970c9c ath79: use correct USB package for DIR-505
AR9331 requires kmod-usb2-chipidea to use the USB ports. Include the
correct package so they can be used with the base image.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-10-21 15:52:49 +02:00
Robert Marko b519997ab9 kernel: 5.10: backport Marvell 88E1510/2 PHY SFP support
Backport upstream SFP support for the Marvell 88E1510/2 PHY-s.

Globalscale MOCHAbin uses this PHY for the hybrid
WAN port that has 1G SFP and 1G RJ45 with PoE PD
connected to it.

This allows the SFP port to be used on it as well as
parsing the SFP module details with ethtool.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2021-10-21 00:17:36 +02:00
Robert Marko b0f6162d68 kernel: 5.10: backport 100 BaseX SFP support
Backport upstream support for 100Base-FX, 100Base-LX, 100Base-PX and
100Base-BX10 SFP modules.

This is a prerequisite for the Globalscale MOCHAbin hybrid 1G
SFP/Copper support backporting.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2021-10-21 00:17:36 +02:00
Rui Salvaterra d4f0e45f90 kernel: bump 5.10 to 5.10.75
Deleted (upstreamed):
bcm27xx/patches-5.10/950-0735-xhci-guard-accesses-to-ep_state-in-xhci_endpoint_res.patch [1]

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.10.y&id=dc3e0a20dbb9dbaa22f4a33dea34230f8c663c40

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-10-21 00:17:36 +02:00
Rui Salvaterra 72e53eb133 kernel: bump 5.10 to 5.10.74
Patches automatically refreshed.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-10-21 00:17:36 +02:00
Rui Salvaterra 3bd701d47c kernel: bump 5.10 to 5.10.73
Patches automatically refreshed.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-10-21 00:17:36 +02:00
John Audia 0ea33e5363 kernel: bump 5.4 to 5.4.155
All patches automatically rebased.

Signed-off-by: John Audia <graysky@archlinux.us>
2021-10-21 00:17:36 +02:00
John Audia 3d0499bcdb kernel: bump 5.4 to 5.4.154
All patches automatically rebased.

Signed-off-by: John Audia <graysky@archlinux.us>
2021-10-21 00:17:36 +02:00
John Audia 9ad3ef27b9 kernel: bump 5.4 to 5.4.153
Removed upstreamed:
  backport-5.4/070-v5.5-MIPS-BPF-Restore-MIPS32-cBPF-JIT.patch

All other patches automatically rebased.

Signed-off-by: John Audia <graysky@archlinux.us>
2021-10-21 00:17:36 +02:00
Adrian Schmutzler 352427ecec realtek: switch to kernel 5.10
The usual testers did their tests. Now we need testers who use the
master builds.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-10-20 23:27:52 +02:00
Adrian Schmutzler 7b8eca902e tegra: switch to kernel 5.10
This target has testing support for kernel 5.10 for four months now.
Time to switch the default.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2021-10-18 21:32:36 +02:00
Rafał Miłecki 287257d676 bcm53xx: enable Linksys EA6300 & EA9200 builds
Both should be supported since:
1. Adding NVMEM driver for NVRAM
2. Using NVRAM info for determining active firmware partition

Linksys EA9500 uses very similar design and works fine.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-10-18 16:09:36 +02:00
Felix Fietkau a1ac8728f8 ramips: remove kmod-mt7663-firmware-sta from device packages
This firmware should only be used for mobile devices (e.g. laptops), where
AP mode functionality is typically not used. This firmware supports a lot
of power saving offload functionality at the expense of AP mode support.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-10-17 16:07:03 +02:00
Rosen Penev 5b3d62247c ramips: fix dtc warnings for telco-electronics_x1
In all other dts files, the entire block is not edited like this.
They're edited separately.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-10-17 15:21:37 +02:00
Luis Araneda 88537e76ec zynq: switch to kernel 5.10
Use kernel 5.10 by default

compile-tested: all devices from target (wth ALL_KMODS)
run-tested: Digilent Zybo Z7-20

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
2021-10-17 14:13:22 +02:00
Luis Araneda 16ba7ca8be zynq: kernel: update config for 5.10
Update config with make kernel_oldconfig

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
2021-10-17 14:13:22 +02:00
Luis Araneda 861ff4d080 zynq: kernel: copy config from 5.4 to 5.10
Signed-off-by: Luis Araneda <luaraneda@gmail.com>
2021-10-17 14:13:22 +02:00
Luis Araneda 97a427412a zynq: kernel: remove wireless extensions symbols
This fixes compilation of several wireless drivers that
require support for the old wireless extension to work.
One example is kmod-hermes.

The symbols are set to "y" on generic configuration.
But they were wrongly disabled on the target-specific
configuration.

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
2021-10-17 14:13:22 +02:00
Luis Araneda b898e869e2 zynq: kernel: refresh config
using "make kernel_oldconfig"

Several configs are now part of generic

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
2021-10-17 14:13:22 +02:00
Daniel Golle 3a93704a63
mediatek: add EEPROM data for BPi-R64 2.4GHz wmac
EEPROM data extracted from vendor image found at
http://forum.banana-pi.org/t/bpi-r64-mt7622-mac80211-wifi-driver/10246/77
http://forum.banana-pi.org/uploads/short-url/jworbyBYpvrw9VQ2sx92B9z6DWS.bin

MAC address in the EEPROM has been zero'd which results in random
address on boot.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-10-15 00:12:30 +01:00
Felix Fietkau f2e1e156c0 kernel: backport a rewrite of the mips eBPF JIT implementation
This adds support for eBPF JIT for 32 bit targets and significantly improves
correctness.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-10-14 20:29:51 +02:00