1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-18 21:48:23 +02:00
Commit Graph

26712 Commits

Author SHA1 Message Date
Olliver Schinagl
943905b0b6 realtek: Fix typo in Kconfig prompt
As the symbol RTL930x shows, the bool enables the RTL930x platform, not
the RTL839x one.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
(slightly changed commit subject)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-08-05 14:10:42 +02:00
Leo Soares
35a0f2b00c ath79: add LTE led for GL.iNet GL-XE300
This commit adds the LTE led for GL.iNet GL-XE300
to the default leds config.

Signed-off-by: Leo Soares <leo@hyper.ag>
2022-08-05 14:10:42 +02:00
Paul Spooren
8019410f56 x86: add missing Lex 3I380NX network detection
The Lex 3I380NX industrial PC has 4 ethernet controllers on board
which need pmc_plt_clk0 - 3 to function, add it to the critclk_systems
DMI table, so that drivers/clk/x86/clk-pmc-atom.c will mark the clocks
as CLK_CRITICAL and they will not get turned off.

This commit is nearly redundant to 3d0818f5eba8 ("platform/x86:
pmc_atom: Add Lex 3I380D industrial PC to critclk_systems DMI table")
but for all Lex Baytrail devices.

The original vendor firmware is only available using the WaybackMachine:
http://www.lex.com.tw/products/3I380NX.html

Signed-off-by: Michael Schöne <michael.schoene@rhebo.com>
Signed-off-by: Paul Spooren <paul.spooren@rhebo.com>
(Hans broader version for more Lex Baytrail systems, v5.15)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-08-05 14:10:11 +02:00
Shiji Yang
1330816178 ramips: add support for H3C TX1800 Plus / TX1801 Plus / TX1806
H3C TX180x series WiFi6 routers are customized by different carrier.
While these three devices look different, they use the same motherboard
inside. Another minor difference comes from the model name definition
in the u-boot environment variable.

Specifications:
 SOC:      MT7621 + MT7915
 ROM:      128 MiB
 RAM:      256 MiB
 LED:      status *2
 Button:   reset *1 + wps/mesh *1
 Ethernet:        lan *3 + wan *1 (10/100/1000Mbps)
 TTL Baudrate:    115200
 TFTP server IP:  192.168.124.99

MAC Address:
 use        address(sample 1)   address(sample 2)    source
 label      88:xx:xx:98:xx:12   88:xx:xx:a2:xx:a5   u-boot-env@ethaddr
 lan        88:xx:xx:98:xx:13   88:xx:xx:a2:xx:a6   $label +1
 wan        88:xx:xx:98:xx:12   88:xx:xx:a2:xx:a5   $label
 WiFi4_2G   8a:xx:xx:58:xx:14   8a:xx:xx:52:xx:a7   (Compatibility mode)
 WiFi5_5G   8a:xx:xx:b8:xx:14   8a:xx:xx:b2:xx:a7   (Compatibility mode)
 WiFi6_2G   8a:xx:xx:18:xx:14   8a:xx:xx:12:xx:a7
 WiFi6_5G   8a:xx:xx:78:xx:14   8a:xx:xx:72:xx:a7

Compatibility mode is used to guarantee the connection of old devices
that only support WiFi4 or WiFi5.

TFTP + TTL Installation:
Although a TTL connection is required for installation, we do not need
to tear down it. We can find the TTL port from the cooling hole at the
bottom. It is located below LAN3 and the pins are defined as follows:
|LAN1|LAN2|LAN3|----|WAN|
--------------------
    |GND|TX|RX|VCC|

1. Set tftp server IP to 192.168.124.99 and put initramfs firmware in
   server's root directory, rename it to a simple name "initramfs.bin".
2. Plug in the power supply and wait for power on, connect the TTL cable
   and open a TTL session, enter "reboot", then enter "Y" to confirm.
   Finally push "0" to interruput boot while booting.
3. Execute command to install a initramfs system:
   # tftp 0x80010000 192.168.124.99:initramfs.bin
   # bootm 0x80010000
4. Backup nand flash by OpenWrt LuCI or dd instruction. We need those
   partitions if we want to back to stock firmwre due to official
   website does not provide download link.
   # dd if=/dev/mtd1 of=/tmp/u-boot-env.bin
   # dd if=/dev/mtd4 of=/tmp/firmware.bin
5. Edit u-boot env to ensure use default bootargs and first image slot:
   # fw_setenv bootargs
   # fw_setenv bootflag 0
6. Upgrade sysupgrade firmware.
7. About restore stock firmware: flash the "firmware" and "u-boot-env"
   partitions that we backed up in step 4.
   # mtd write /tmp/u-boot-env.bin u-boot-env
   # mtd write /tmp/firmware.bin firmware

Additional Info:
The H3C stock firmware has a 160-byte firmware header that appears to
use a non-standard CRC32 verification algorithm. For this part of the
data, the u-boot does not check it so we can just directly replace it
with a placeholder.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2022-07-31 19:23:24 +02:00
John Audia
364575e3a3 kernel: bump 5.15 to 5.15.58
All patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-07-31 18:55:22 +02:00
John Audia
9d2ffe8cb8 x86: update defconfig for 5.15.57
Add some new/missing symbols relating to speculative execution mitigations[1].

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/Kconfig?id=v5.15.57&id2=v5.15.56

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-07-31 18:55:22 +02:00
John Audia
317f59a0ee kernel: bump 5.15 to 5.15.57
All patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-07-31 18:55:22 +02:00
John Audia
4921ab0be4 kernel: bump 5.15 to 5.15.56
Manually rebased:
  bcm27xx/patches-5.15/950-0470-sound-usb-add-device-quirks-for-A4Tech-FHD-1080p-web.patch

Remove upstreamed:
  bcm27xx/patches-5.15/950-0060-tty-amba-pl011-Add-un-throttle-support.patch[1]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.56&id=2db3b95166f72e6481a79b82b1d6f94f4b18fcc1

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-07-31 18:55:22 +02:00
John Audia
ce014b1e39 kernel: bump 5.15 to 5.15.55
All patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-07-31 18:55:22 +02:00
John Audia
e4af991220 kernel: bump 5.15 to 5.15.54
All patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-07-31 18:55:22 +02:00
John Audia
7be62b1187 kernel: bump 5.10 to 5.10.134
All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-07-29 23:03:41 +02:00
John Audia
56760c0b13 x86: update defconfig for 5.10.133
Add some new/missing symbols relating to speculative execution mitigations[1].

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/Kconfig?id=v5.10.133&id2=v5.10.132

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-07-29 23:03:41 +02:00
John Audia
913f160ac6 kernel: bump 5.10 to 5.10.133
All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-07-29 23:03:41 +02:00
John Audia
7d3c0928de kernel: bump 5.10 to 5.10.132
All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-07-29 23:03:41 +02:00
Rafał Miłecki
57cad53f4e bcm4908: enable & setup packet steering
Without packet steering NAT masquarade speed on BCM4908 /jumps/ between
two speeds:
1. 826 Mb/s (±3 Mb/s)
2. 909 Mb/s (±8 Mb/s)
and it never reaches ~940 Mb/s.

Proper packet steering can improve it. Below are testing results for
running iperf TCP traffic from LAN to WAN. They were used to pick up
golden values.

┌──────────┬──────────┬───────────┐
│   eth0   │  br-lan  │   speed   │
│ rps_cpus │ rps_cpus │   [Mbps]  │
├──────────┼──────────┼───────────┤
│        0 │        0 │ 743 / 804 │
│        0 │        1 │ 738 / 821 │
│        0 │        2 │     ✓ 940 │
│        0 │        4 │     ✓ 938 │
│        0 │        8 │     ✓ 941 │
├──────────┼──────────┼───────────┤
│        1 │        0 │       829 │
│        1 │        1 │       829 │
│        1 │        2 │     ✓ 942 │
│        1 │        4 │     ✓ 941 │
│        1 │        8 │     ✓ 941 │
├──────────┼──────────┼───────────┤
│        2 │        0 │     ✓ 942 │
│        2 │        1 │       926 │
│        2 │        2 │     ✓ 942 │
│        2 │        4 │     ✓ 942 │
│        2 │        8 │     ✓ 941 │
├──────────┼──────────┼───────────┤
│        4 │        0 │     ✓ 941 │
│        4 │        1 │       925 │
│        4 │        2 │     ✓ 941 │
│        4 │        4 │     ✓ 941 │
│        4 │        8 │     ✓ 941 │
├──────────┼──────────┼───────────┤
│        8 │        0 │     ✓ 942 │
│        8 │        1 │       925 │
│        8 │        2 │     ✓ 941 │
│        8 │        4 │     ✓ 942 │
│        8 │        8 │     ✓ 942 │
└──────────┴──────────┴───────────┘

Ref: fcbd39689ebfe ("bcm53xx: enable & setup packet steering")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-28 17:46:33 +02:00
Daniel Golle
a49212d762 Revert "realtek: remove support for HPE 1920 series"
This reverts commit a63aeaecf1f3387df020854c9b22a365207399ce.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-07-28 16:45:19 +02:00
Sander Vanheule
a63aeaecf1 realtek: remove support for HPE 1920 series
Support for HPE 1920 images depends on two non-existent tools (mkh3cimg
and mkh3cvfs) from the in the firmware-utils package. Revert commit
f2f09bc00280 ("realtek: add support for HPE 1920 series") until support
for these tools is merged and made available in OpenWrt.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-07-28 15:17:04 +02:00
Jan Hoffmann
f2f09bc002 realtek: add support for HPE 1920 series
Hardware information:
---------------------

- HPE 1920-8G:
  - RTL8380 SoC
  - 8 Gigabit RJ45 ports (built-in RTL8218B)
  - 2 SFP ports (built-in SerDes)

- HPE 1920-16G / HPE 1920-24G (same board):
  - RTL8382 SoC
  - 16/24 Gigabit RJ45 ports (built-in RTL8218B, 1/2 external RTL8218D)
  - 4 SFP ports (external RTL8214FC)

- Common:
  - RJ45 RS232 port on front panel
  - 32 MiB NOR Flash
  - 128 MiB DDR3 DRAM
  - PT7A7514 watchdog

Booting initramfs image:
------------------------

- Prepare a FTP or TFTP server serving the OpenWrt initramfs image and
  connect the server to a switch port.

- Connect to the console port of the device and enter the extended
  boot menu by typing Ctrl+B when prompted.

- Choose the menu option "<3> Enter Ethernet SubMenu".

- Set network parameters via the option "<5> Modify Ethernet Parameter".
  Enter the FTP/TFTP filename as "Load File Name" ("Target File Name"
  can be left blank, it is not required for booting from RAM). Note that
  the configuration is saved on flash, so it only needs to be done once.

- Select "<1> Download Application Program To SDRAM And Run".

Initial installation:
---------------------

- Boot an initramfs image as described above, then use sysupgrade to
  install OpenWrt permanently. After initial installation, the
  bootloader needs to be configured to load the correct image file

- Enter the extended boot menu again and choose "<4> File Control",
  then select "<2> Set Application File type".

- Enter the number of the file "openwrt-kernel.bin" (should be 1), and
  use the option "<1> +Main" to select it as boot image.

- Choose "<0> Exit To Main Menu" and then "<1> Boot System".

NOTE: The bootloader on these devices can only boot from the VFS
filesystem which normally spans most of the flash. With OpenWrt, only
the first part of the firmware partition contains a valid filesystem,
the rest is used for rootfs. As the bootloader does not know about this,
you must not do any file operations in the bootloader, as this may
corrupt the OpenWrt installation (selecting the boot image is an
exception, as it only stores a flag in the bootloader data, but doesn't
write to the filesystem).

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
2022-07-28 14:08:56 +02:00
Jan Hoffmann
3b1261224a kernel: mtdsplit: add support for H3C VFS filesystem
The bootloader on some H3C devices (for example HPE 1920 switches) only
supports booting from flash by reading an image from an "VFS" filesystem
which spans most of the available flash. The filesystem size is hard-
coded in the bootloader. However, as long as no write operations are
performed in the bootloader menu, it is sufficient if the start of the
partition contains a valid filesystem with the kernel image.

This mtdsplit parser reads the size and location of the kernel image and
finds the location of the rootfs stored after it. It assumes that the
filesystem image matches the layout of one generated by mkh3cvfs, with
a filename of "openwrt-kernel.bin" for the kernel image.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
2022-07-28 14:08:56 +02:00
Jan Hoffmann
81e3017609 realtek: clean up rtl838x MDIO busy wait loop
Don't use udelay to allow other kernel tasks to execute if the kernel
has been built without preemption. Also determine the timeout based on
jiffies instead of loop iterations.

This is especially important on devices containing a watchdog with a
short timeout. Without this change, the watchdog is not serviced during
PHY patching which can take multiple seconds.

Tested-by: Birger Koblitz <mail@birger-koblitz.de>
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
2022-07-28 14:08:51 +02:00
Jan Hoffmann
b6a0d50b7f realtek: add SFP support for RTL8214FC PHY
Probe the SFP module during PHY initialization and implement
insertion/removal handlers to automatically configure the media type
of the respective port.

Suggested-by: Birger Koblitz <git@birger-koblitz.de>
Tested-by: Birger Koblitz <mail@birger-koblitz.de>
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
2022-07-28 14:08:43 +02:00
Jan Hoffmann
c6a7ea9f7f realtek: rtl83xx-phy: decouple RTL8214FC media change and power config
Move RTL8214FC power configuration to newly created suspend and resume
methods. A media change now only results in power configuration if the
PHY is not suspended, to avoid powering up a port when the interface is
currently not up.

While at it, remove the rtl8380 prefix from function names, as this is
actually not SoC-specific.

Tested-by: Birger Koblitz <mail@birger-koblitz.de>
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
2022-07-28 14:08:07 +02:00
Jan Hoffmann
bac50e39a7 realtek: rtl83xx-phy: fix RTL8214FC media change
Toggle power on the individual PHY instead of the package. Otherwise
a media change always toggles power on the first port, and not the one
that is being configured.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
2022-07-28 14:07:10 +02:00
Markus Stockhausen
b2681e584c realtek: make DGS-1210 u-boot-env partition writeable
We are close to provide enduser friendly OpenWrt images for DGS-1210
switches that do not need serial console. Nevertheless a small bit is
missing. We cannot switch back to the vendor partition or initiate a
download of a vendor firmware image. To issue this from inside OpenWrt
we need write access to U-Boot environment.

Case 1: Switch back to secondary (vendor) image
> fw_setenv bootcmd run addargs\; bootm 0xb4e80000
> fw_setenv image /dev/mtdblock7
> reboot

Case 2: Issue D-Link Network Assistant based download on next reboot.
This is a combination of some vendor specific protocol (DDP) and a
TFTP download afterwards.
> fw_setenv bootstop on
> reboot

Allow these commands by opening up u-boot-env for write access.
Tested on DGS-1210-20.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2022-07-26 09:15:38 +02:00
Rafał Miłecki
a8e1e30543 uboot-bcm4908: include SoC in output files
This fixes problem of overwriting BCM4908 U-Boot and DTB files by
BCM4912 ones. That bug didn't allow booting BCM4908 devices.

Fixes: f4c2dab544ec2 ("uboot-bcm4908: add BCM4912 build")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-25 18:13:12 +02:00
Rafał Miłecki
6ae2f7ff47 bcm4908: build bootfs image per-SoC
In theory we could have just 1 bootfs image for all devices as each
device has its own entry in the "configurations" node. It doesn't work
well with default configuration though.

If something goes wrong U-Boot SPL can be interrupted (by pressing A) to
enter its minimalistic menu. It allows ignoring boardid. In such case
bootfs default configuration is used.

For above reason each SoC family (BCM4908, BCM4912) should have its own
bootfs built. It allows each of them to have working default
configuration.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-25 18:13:12 +02:00
Daniel Kestrel
0f301b0b1d lantiq: fix network port GPIO settings for Fritzbox 3390
There are forum reports that 2 LAN ports are not working, the
GPIO settings are adjusted to fix the problem.

Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
2022-07-22 22:05:23 +02:00
Christian Lamparter
69ea671320 ipq806x: Archer VR2600: fix switch ports numbering
The order of LAN ports shown in Luci is reversed compared to what is
written on the case of the device.  Fix the order so that they match.

Fixes: #10275
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-07-22 22:03:27 +02:00
Martin Blumenstingl
8083d225f3 generic: 5.15: Disable more config symbols
These came up while trying to build the lantiq target with Linux 5.15.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2022-07-22 16:53:20 +02:00
Sander Vanheule
a3e4949998 realtek: clear spurious GPIO interrupts
The interrupt controller in the internal GPIO peripheral will sometimes
generate spurious interrupts. If these are not properly acknowledged, the
system will be held busy until reboot. These spurious interrupts are identified
by the fact that there is no system IRQ number associated, since the interrupt
line was never allocated. Although most prevalent on RTL839x, RTL838x SoCs have
also displayed this behaviour.

Reported-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> # DGS-1210-52
Reported-by: Birger Koblitz <mail@birger-koblitz.de> # Netgear GS724TP v2
Reported-by: Jan Hoffmann <jan@3e8.eu> # HPE 1920-16G
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-07-21 22:44:01 +02:00
David Bauer
a0b7fef0ff ramips: add support for ZyXEL NWA50AX / NWA55AXE
Hardware
--------
CPU:    Mediatek MT7621
RAM:    256M DDR3
FLASH:  128M NAND
ETH:    1x Gigabit Ethernet
WiFi:   Mediatek MT7915 (2.4/5GHz 802.11ax 2x2 DBDC)
BTN:    1x Reset (NWA50AX only)
LED:    1x Multi-Color (NWA50AX only)

UART Console
------------
NWA50AX:
Available below the rubber cover next to the ethernet port.
NWA55AXE:
Available on the board when disassembling the device.

Settings: 115200 8N1

Layout:

<12V> <LAN> GND-RX-TX-VCC

Logic-Level is 3V3. Don't connect VCC to your UART adapter!

Installation Web-UI
-------------------
Upload the Factory image using the devices Web-Interface.

As the device uses a dual-image partition layout, OpenWrt can only
installed on Slot A. This requires the current active image prior
flashing the device to be on Slot B.

If the currently installed image is started from Slot A, the device will
flash OpenWrt to Slot B. OpenWrt will panic upon first boot in this case
and the device will return to the ZyXEL firmware upon next boot.

If this happens, first install a ZyXEL firmware upgrade of any version
and install OpenWrt after that.

Installation TFTP
-----------------
This installation routine is especially useful in case
 * unknown device password (NWA55AXE lacks reset button)
 * bricked device

Attach to the UART console header of the device. Interrupt the boot
procedure by pressing Enter.

The bootloader has a reduced command-set available from CLI, but more
commands can be executed by abusing the atns command.

Boot a OpenWrt initramfs image available on a TFTP server at
192.168.1.66. Rename the image to owrt.bin

 $ atnf owrt.bin
 $ atna 192.168.1.88
 $ atns "192.168.1.66; tftpboot; bootm"

Upon booting, set the booted image to the correct slot:

 $ zyxel-bootconfig /dev/mtd10 get-status
 $ zyxel-bootconfig /dev/mtd10 set-image-status 0 valid
 $ zyxel-bootconfig /dev/mtd10 set-active-image 0

Copy the OpenWrt ramboot-factory image to the device using scp.
Write the factory image to NAND and reboot the device.

 $ mtd write ramboot-factory.bin firmware
 $ reboot

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-07-20 21:52:06 +02:00
Rafał Miłecki
3f2b2fe084 bcm4908: prepare for Asus GT-AX6000 support
It isn't tested & Linux DT will surely need more work.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-20 20:04:50 +02:00
Rafał Miłecki
d63ef7c90f bcm4908: backport bcmbca DT patches queued for 5.20
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-20 20:04:50 +02:00
Wenli Looi
0f068e7c4a
ramips: add support for Netgear WAX202
Netgear WAX202 is an 802.11ax (Wi-Fi 6) router.

Specifications:
* SoC: MT7621A
* RAM: 512 MiB NT5CC256M16ER-EK
* Flash: NAND 128 MiB F59L1G81MB-25T
* Wi-Fi:
  * MT7915D: 2.4/5 GHz (DBDC)
* Ethernet: 4x 1GbE
  * Switch: SoC built-in
* USB: None
* UART: 115200 baud (labeled on board)

Load addresses (same as ipTIME AX2004M):
* stock
  * 0x80010000: FIT image
  * 0x81001000: kernel image -> entry
* OpenWrt
  * 0x80010000: FIT image
  * 0x82000000: uncompressed kernel+relocate image
  * 0x80001000: relocated kernel image -> entry

Installation:
* Flash the factory image through the stock web interface, or TFTP to
  the bootloader. NMRP can be used to TFTP without opening the case.
* Note that the bootloader accepts both encrypted and unencrypted
  images, while the stock web interface only accepts encrypted ones.

Revert to stock firmware:
* Flash the stock firmware to the bootloader using TFTP/NMRP.

References in WAX202 GPL source:
https://www.downloads.netgear.com/files/GPL/WAX202_V1.0.5.1_Source.rar

* openwrt/target/linux/ramips/dts/mt7621-ax-nand-wax202.dts
  DTS file for this device.

Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
2022-07-19 14:49:04 +02:00
John Audia
d0d6b8e183
mt7622: remove 300 MHz from dts
Due to the bug described here[1], remove the 300 MHz clock to avoid a low
voltage condition that can cause a hang when rebooting the RT3200/E8450.

This solution is probably better than the script-based work-around[2].

1. https://forum.openwrt.org/t/belkin-rt3200-linksys-e8450-wifi-ax-discussion/94302/1490
2. https://github.com/openwrt/openwrt/pull/5025

Signed-off-by: John Audia <therealgraysky@proton.me>
Tested-by: Rui Salvaterra <rsalvaterra@gmail.com>
Tested-by: John Audia <therealgraysky@proton.me>
2022-07-19 14:26:30 +02:00
Rafał Miłecki
79af0593a3 kernel: switch back 5.15 to fw_devlink=permissive
Kernel switching to fw_devlink=on as default broke probing some devices.
Revert it until we get a proper fix.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-19 06:26:32 +02:00
John Audia
c50d462e34 kernel: bump 5.10 to 5.10.131
All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-07-18 23:14:30 +02:00
John Audia
c600d1cb00 kernel: bump 5.10 to 5.10.130
All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-07-18 23:14:30 +02:00
John Audia
06c9e8bfdf kernel: bump 5.10 to 5.10.129
All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-07-18 23:14:30 +02:00
Rafał Miłecki
864fdf2bf3 bcm4908: use upstream-accepted watchdog patches
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-18 18:39:20 +02:00
Rafał Miłecki
001856fa51 bcm4908: backport latest DT patches
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-18 18:39:20 +02:00
Rafał Miłecki
bb2a2b1dbe kernel: update leds-bcm63138 driver
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-18 18:39:20 +02:00
Felix Fietkau
af8771751c kernel: backport mtk wlan flow offloading fix
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-07-18 15:14:16 +02:00
Mark Mentovai
7f54bf6fe2
ipq40xx: add MikroTik wAP ac (RBwAPG-5HacD2HnD) support
The MikroTik wAP ac (RBwAPG-5HacD2HnD) is a dual-band dual-radio
802.11ac wireless access point with integrated antenna and two Ethernet
ports in a weatherproof enclosure. See
https://mikrotik.com/product/wap_ac for more information.

Important: this is the new ipq40xx-based wAP ac, not the older
ath79-based wAP ac (RBwAPG-5HacT2HnD), already supported in OpenWrt.

Specifications:
 - SoC: Qualcomm Atheros IPQ4018
 - CPU: 4x ARM Cortex A7
 - RAM: 128MB
 - Storage: 16MB NOR flash
 - Wireless
    - 2.4GHz: Built-in IPQ4018 (SoC) 802.11b/g/n 2x2:2, 2.5 dBi antennae
    - 5GHz: Built-in IPQ4018 (SoC) 802.11a/n/ac 2x2:2, 2.5 dBi antennae
 - Ethernet: Built-in IPQ4018 (SoC, QCA8075), 2x 1000/100/10Mb/s ports,
   one with 802.3af/at PoE in

Installation:
Boot the initramfs image via TFTP, then flash the sysupgrade image using
sysupgrade. Details at https://openwrt.org/toh/mikrotik/common.

Notes:
This preserves the MAC addresses of the physical Ethernet ports:
 - eth0 corresponds to the physical port labeled ETH1 and has the base
   MAC address. This port can be used to power the device.
 - eth1 corresponds to the physical port labeled ETH2 and has a MAC
   address one greater than the base.

MAC addresses are set from /lib/preinit/05_set_iface_mac_ipq40xx.sh
rather than /etc/board.d/02_network so that they are in effect for
preinit. This should likely be done for other MikroTik devices and
possibly other non-MikroTik devices as well.

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

Signed-off-by: Mark Mentovai <mark@mentovai.com>
2022-07-18 01:45:47 +02:00
Rafał Miłecki
d9ab1e56d8 kernel: backport LEDs driver for BCMBCA devices
This includes BCM63xx and BCM4908 families.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-17 18:44:41 +02:00
Christian Lamparter
b479db9062 sdk: add spidev-test to the bundle of userspace sources
moves and extends the current facilities, which have been
added some time ago for the the usbip utility, to support
more utilites that are shipped with the Linux kernel tree
to the SDK.

this allows to drop all the hand-waving and code for
failed previous attempts to mitigate the SDK build failures.

Fixes: bdaaf66e28bd ("utils/spidev_test: build package directly from Linux")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-07-17 14:19:21 +02:00
Sander Vanheule
1773264a0c realtek: correct egress frame port verification
Destination switch ports for outgoing frame can range from 0 to
CPU_PORT-1.

Refactor the code to only generate egress frame CPU headers when a valid
destination port number is available, and make the code a bit more
consistent between different switch generations. Change the dest_port
argument's type to 'unsigned int', since only positive values are valid.

This fixes the issue where egress frames on switch port 0 did not
receive a VLAN tag, because they are sent out without a CPU header.
Also fixes a potential issue with invalid (negative) egress port numbers
on RTL93xx switches.

Reported-by: Arınç ÜNAL <arinc.unal@xeront.com>
Suggested-by: Birger Koblitz <mail@birger-koblitz.de>
Tested-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-07-17 10:06:51 +02:00
Sander Vanheule
0b35a08a05 realtek: correct egress frame priority assignment
Priority values passed to the egress (TX) frame header initialiser are
invalid when smaller than 0, and should not be assigned to the frame.
Queue assignment is then left to the switch core logic.

Current code for RTL83xx forces the passed priority value to be
positive, by always masking it to the lower bits, resulting in the
priority always being set and enabled. RTL93xx code doesn't even check
the value and unconditionally assigns the (32 bit) value to the (5 bit)
QID field without masking.

Fix priority assignment by only setting the AS_QID/AS_PRI flag when a
valid value is passed, and properly mask the value to not overflow the
QID/PRI field.

For RTL839x, also assign the priority to the right part of the frame
header. Counting from the leftmost bit, AS_PRI and PRI are in bits 36
and 37-39. The means they should be assigned to the third 16 bit value,
containing bits 32-47.

Tested-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-07-17 10:06:46 +02:00
Sander Vanheule
d6165ea75b realtek: fix egress L2 learning on rtl839x
The flag to enable L2 address learning on egress frames is in CPU header
bit 40, with bit 0 being the leftmost bit of the header. This
corresponds to BIT(7) in the third 16-bit value of the header.

Correctly set L2LEARNING by fixing the off-by-one error.

Fixes: 9eab76c84e31 ("realtek: Improve TX CPU-Tag usage")
Tested-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-07-17 10:06:40 +02:00
Sander Vanheule
d9516cacb0 realtek: fix egress port mask on rtl839x
The flag to enable the outgoing port mask is in CPU header bit 43, with
bit 0 being the leftmost bit of the header. This corresponds to BIT(4)
in the third 16-bit value of the header.

Correctly set AS_DPM by fixing the off-by-one error.

Fixes: 9eab76c84e31 ("realtek: Improve TX CPU-Tag usage")
Tested-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-07-17 10:06:32 +02:00
Christian Lamparter
e37ba80633 bcm53xx: add support for Meraki MR26
Meraki MR26 is an EOL wireless access point featuring a
PoE ethernet port and two dual-band 3x3 MIMO 802.11n
radios and 1x1 dual-band WIFI dedicated to scanning.

Thank you Amir for the unit and PSU.

Hardware info:
SOC   : Broadcom BCM53015A1KFEBG (dual-core Cortex-A9 CPU at 800 MHz)
RAM   : SK hynix Inc. H5TQ1G63EFR, 1 Gbit DDR3 SDRAM = 128 MiB
NAND  : Spansion S34ML01G100TF100, 1 Gbit SLC NAND Flash = 128 MiB
ETH   : 1 GBit Ethernet Port - PoE
WIFI1 : Broadcom BCM43431KMLG, BCM43431 802.11 abgn
WIFI1 : Broadcom BCM43431KMLG, BCM43431 802.11 abgn
WIFI3 : Broadcom BCM43428 abgn (1x1:1 - id: 43428)
BUTTON: one reset button
LEDS  : RGB-LED
MISC  : Atmel AT24C64 8KiB EEPROM (i2c - seems empty)
      : Ti INA219 26V, 12-bit, i2c output current/voltage/power monitor
      : TPS23754, High Power/High Efficiency PoE Interface+DC/DC Controller

SERIAL:
	WARNING: The serial port needs a TTL/RS-232 3V3 level converter!
	The Serial setting is 115200-8-N-1. The board has a populated
	right angle 1x4 0.1" pinheader.
	The pinout is: VCC (next to J3, has little white arrow), RX, TX, GND.

This flashing procedure for the MR26 was tested with firmware:
    "22-143410M-gf25cbf5a-asa".
    U-Boot 2012.10-00063-g83f9fe4 (Jun 04 2014 - 21:22:39)

A guide how to open up the device is available on the wiki:
<https://openwrt.org/toh/meraki/mr26>

Notes:
 - The WIFI do work to a degree. Limited to 802.11bg in the 2.4GHz band.
 - the WIFI macs are made up.

0. Create a separate Ethernet LAN which can't have access to the internet.
   Ideally use 192.168.1.2 for your PC. The new OpenWrt firmware will setup
   the network via DHCP Discovery, so make sure your PC is running
   a DHCP-Server (i.e.: dnsmasq)
   '# dnsmasq -i eth# -F 192.168.1.5,192.168.1.50
   Download the openwrt-meraki-mr26 initramfs file from openwrt.org and
   rename it to something simple like mr26.bin. Then put it into the tftp's
   server directory.

1. Disassemble the MR26 device by removing all screws (4 screws are located
   under the 4 rubber feets!) and prying open the plastic covers without
   breaking the plastic retention clips. Once inside, remove the plastic
   back casing. Be careful, there some "hidden" retention clips on both
   sides of the LAN port, you need a light to see those. Next, you want to
   remove all the screws on the outer metal shielding to get to the PCB.
   It's not necessary to remove the antennas!

2. Connect the serial cable to the serial header and Ethernet patch cable
   to the device.

4. Before connecting the power, get ready flood the serial console program
   with the magic:   xyzzy  . This is necessary in order to get into the
   u-boot prompt. Once Ready: connect power cable.

5. If you don't get the "u-boot>" prompt within the first few seconds,
   you have to disconnect and reconnect the power cable and try again.

6. In the u-boot prompt enter:

   setenv ipaddr 192.168.1.4
   setenv serverip 192.168.1.2
   tftpboot ${meraki_loadaddr} mr26.bin; bootm

   this will boot a in-ram-only OpenWrt image.

7. Once it booted use sysupgrade to permanently install OpenWrt.
   To do this: Download the latest sysupgrade.bin file and move
   it to the device. Then use sysupgrade *sysupgrade.bin to install it.

    WARNING: DO NOT DELETE the "storage" ubi volume!

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-07-15 15:21:44 +02:00
Christian Lamparter
50c232d6f4 ipq-wifi: drop upstreamed board-2.bin
The BDFs for the:
	GL.iNet GL-B2200

were upstreamed to the ath10k-firmware repository
and landed in linux-firmware.git

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-07-15 15:21:44 +02:00
Christian Lamparter
3b3eaf31cb ipq40xx: R619AC: replace space with - separator in variant string
Kalle:
"I see that variant has a space in it, does that work it correctly? My
original idea was that spaces would not be allowed, but didn't realise
to add a check for that."

Is this an easy change? Because the original author (Tim Davis) noted:
"You may substitute the & and space with something else saner if they
prove to be problematic."

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-07-15 15:21:44 +02:00
Sieng-Piaw Liew
3acd2ea148
ath79: fix Tx cleanup when NAPI poll budget is zero
NAPI poll() function may be passed a budget value of zero, i.e. during
netpoll, which isn't NAPI context.
Therefore, napi_consume_skb() must be given budget value instead of
!flush to truly discern netpoll-like scenarios.

https://lore.kernel.org/netdev/20220707141056.2644-1-liew.s.piaw@gmail.com/t/#m470f5c20225e76fb08c44d6cfa2f1b739ffaaea4
Signed-off-by: Sieng-Piaw Liew <liew.s.piaw@gmail.com>
2022-07-14 12:51:16 +02:00
Nick Hainke
e34ed3a833
mediatek: mt7622: add linux-next tag to bpi-wps-button fix
920-dts-mt7622-bpi-r64-fix-wps-button.patch is now merged upstream in
linux-next [0]. Add "linux-next" as tag so people know it is upstreamed.

[0] - https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/arch/arm64/boot/dts?id=c98e6e683632386a3bd284acda4342e68aec4c41

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-07-14 08:35:55 +02:00
Christian Marangi
4b924fe6df
generic: fix warning orphan section from module exports in aarch64
kernel linux now have 2 different export.h include, one from
linux/export.h and one from asm-generic/export.h

While most of our target user linux/export.h, aarch64 based target use
asm-generic/export.h that is not patched with the changes of
221-module_exports.

Patch also this additional header to fix multiple

aarch64-openwrt-linux-musl-ld: warning: orphan section `__ksymtab_strings' from `arch/arm64/kernel/head.o' being placed in section `__ksymtab_strings'

warning during kernel compilation.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-07-14 07:15:35 +02:00
Florian Eckert
8857387913
linux/generic/hack-5.15: add missing patch headers
This patches does not have a valid patch headers and does not apply on
an external git tree with 'git am'. To fix this add the missing headers.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-07-14 06:45:24 +02:00
Florian Eckert
2ed7f6cbb0
linux/generic/pending-5.15: add missing patch headers
This patches does not have a valid patch headers and does not apply on
an external git tree with 'git am'. To fix this add the missing headers.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-07-14 06:45:24 +02:00
Florian Eckert
a9573a029a
target/linux/pending-5.15: rename patches
The consecutive number 483 is assigned twice.
This change fixes this.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-07-14 06:45:21 +02:00
Rodrigo B. de Sousa Martins
ae07b9cc61 ath79: tplink-archer-c6-v2-us: fix inverted LED colors
The amber and green wan led color was inverted in dts file, which ends
up leaving the wan led amber when the connection is established, so,
switch gpio led number (7 and 8) in qca9563_tplink_archer-c6-v2-us.dts.

Tip: the /etc/config/system file needs to be regenerated.

Signed-off-by: Rodrigo B. de Sousa Martins <rodrigo.sousa.577@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [commit subject]
2022-07-12 09:25:43 +02:00
Daniel Golle
7c02a4a00b
bcm27xx: update patch to fix build
Linux stable v5.15.51 brought commit 7a3a4683562e
("ARM: dts: bcm2711-rpi-400: Fix GPIO line names") which was already
part of a local patch which then failed to apply. Remove the already
applied and now failing hunk from the patch to fix the build.

Fixes: 552d76f2be ("kernel: bump 5.15 to 5.15.51")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-07-11 23:39:13 +01:00
Piotr Dymacz
b68e9f2e19 generic: 5.15: add missing symbols
These were found during work on new device support under the
imx/cortexa7 target.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-07-11 14:28:09 +02:00
Piotr Dymacz
28e476191b imx: keep common kernel symbols in target's config
Move common kernel symbols from subtargets to target config.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-07-11 14:28:09 +02:00
Lech Perczak
fa26cdacc2 imx: cortexa7: add support for TechNexion PICO-PI-IMX7D
TechNexion PICO-PI-IMX7D is a NXP i.MX 7Dual based development board in
the well-known "Raspberry Pi" form factor, comprising of PICO-IMX7 SoM
and the PICO-PI-IMX7D carrier board.

Usually bundled with a 5" 800x480 LVDS display with I2C touchscreen and
an Omnivision OV5645 camera on a MIPI CSI bus, on a daughterboard. The
board was previously used primarily with "Android Things" ecosystem, but
the project was killed by Google.

This would not be possible, if not for the great tutorial of setting up
Debian on this board, by Robert C. Nelson [1].

Hardware highlights:

  CPU: NXP i.MX 7Dual SoC, dual-core Cortex-A7 at 1000 MHz
  RAM: 512 MiB DDR3 SDRAM
  Storage: 4 GB eMMC
  Networking:
    - built-in Gigabit Ethernet with Atheros AR8035 PHY,
    - Broadcom BCM4339 1x1 802.11ac Wi-Fi (over SDIO) + Bluetooth 4.1
      (over SDIO + UART + IS2) combo, with Hirose u.FL connector on the
      board,
    - dual CAN interfaces on the 40-pin connector,
  Interfaces:
    - USB-C power input plus USB 2.0 OTG host/device port,
    - single USB-A host port,
    - serial console over built-in FT232BL USB-UART converter with
      micro-USB connector (configuration: 115200-8-N-1),
    - analog audio interface with TRRS connector in CTIA standard,
    - SPI, I2C and UART interfaces available on the 40-pin,
    - mikroBUS connector,
    - I2C connector for the optional touch panel,
    - parallel LCD output for the optional display,
    - MIPI CSI connector for the optional camera

Installation:

1. Connect the serial console to debug USB connector and the terminal of
   choice in another window, at 115200-8-N-1. Ensure you can switch to
   it quickly after next step.

2. Power-on the board from your PC. Ensure your PC can supply required
   current, the board can take more than 1 A in the peak load during
   booting and brownout will result in power-on reset loop. Preferably,
   use charging-capable USB port or connect through self-powered USB
   hub. If U-Boot is present already on the eMMC, interrupt the booting
   sequence by pressing any key and skip to point 7.

3. Ensure the boot mode jumpers J1 and J2 are in correct position for
   USB recovery:

       2   6  2   6
      --------------
      |o o-o||o-o o|
      |o o-o||o-o o|
   J1 -------------- J2
       1   5  1   5

   The jumpers are located just underneath the 40-pin expansion header
   and are of the smaller 2 mm pitch.

4. Download and build 'imx_usb_loader' from:
   https://github.com/boundarydevices/imx_usb_loader.

5. Power-on the board again from your PC through USB OTG connector.

6. Use 'imx_usb_loader' to load 'SPL' and 'u-boot-dtb.img' to the board:

   $ sudo imx_usb u-boot-pico-pi-imx7d/SPL
   $ sudo imx_usb u-boot-pico-pi-imx7d/u-boot-dtb.img

7. Switch to the terminal from step 2 and interrupt boot sequence by
   pressing any key within 2 seconds.

8. Configure mmc 0 to boot from the data partition and disable access to
   boot partitions:

   => mmc partconf 0 0 7 0

   This only needs to be set once. If you were running Debian previously,
   this is probably already set.

9. Enable USB mass storage passthrough for eMMC from U-boot

   => ums 0 mmc 0

10. Optionally, backup previous eMMC contents by reading out its image.

11. Copy over the factory image to the USB device, for example:

    $ sudo dd if=openwrt-imx-cortexa7-pico-pi-imx7d-squashfs.combined.bin \
      of=/dev/disk/by-id/usb-Linux_UMS_disk_0-0:0 \
      bs=8M status=progress oflag=direct

12. Detach USB MSC interface from your PC and U-Boot by pressing Ctrl+C.

13. Ensure that boot mode jumpers are at the default settings for eMMC
    boot:

       2   6  2   6
      --------------
      |o-o o||o o-o|
      |o-o o||o-o o|
   J1 -------------- J2
       1   5  1   5

   If they are not, power-off the board, restore them and power-on the
   board again. Otherwise, if jumpers are set, just reset the board from
   U-Boot CLI:

   => reset

14. The installation is now complete and board should boot successfully.

Upgrading: just use sysupgrade image, as usual in OpenWrt.

Known issues/current limitations:

- OV5645 camera - not described in upstream device tree as of kernel
  5.15. There are staging drivers present in upstream Linux tree for
  i.MX 7 CSI, MIPI-CSI and video mux, and the configuration is there in
  imx7s.dtsi - so this is expected to get supported eventually,
- on-chip ADCs are disabled in upstream device tree, so the kernel
  driver remains disabled as well.

[1] https://forum.digikey.com/t/debian-getting-started-with-the-pico-pi-imx7/12429

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
[pepe2k@gmail.com: commit description reworded]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-07-11 14:26:24 +02:00
Lech Perczak
703a1cafe0 imx: add DT aliases for imx7d-pico-pi
Add OpenWrt specific aliases for system LED and label MAC device,
also set default serial console.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-07-11 14:18:40 +02:00
Lech Perczak
4436d7bae8 imx: make sdcard/eMMC sysupgrade more resilient
Ensure, that kernel update is performed atomically on filesystem, to
reduce likelihood of failure if power-cut occurs during sysupgrade. If
kernel update fails for whatever reason, skip updating rootfs as well.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-07-11 14:18:40 +02:00
Lech Perczak
70a9c75ef3 imx: decouple sdcard sysupgrade from Apalis boards
Sysupgrade procedure for i.MX 6 Apalis boards is suitable for most other
i.MX boards booting from eMMC or SD card. Extract the common parts and
decouple the procedure from "apalis" board name in sysupgrade TAR
contents, so the procedure is reusable for i.MX 7 boards.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-07-11 14:18:40 +02:00
Lech Perczak
f987887e14 imx: create sdcard image recipe with raw U-Boot
Most i.MX boards booting off eMMC or SD cards use raw U-Boot located at
69 kB offset from beginning of the device - create a recipe for such
image.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-07-11 14:18:40 +02:00
Lech Perczak
d545825cb3 imx: extract common combined image operations between subtargets
The same combined image format can be used to boot both i.MX 6 and
i.MX 7 platforms - extract the common part.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-07-11 14:18:40 +02:00
Lech Perczak
0b7e8f44ad imx: cortexa7: enable framebuffer console + DRM
The PICO-PI-IMX7D board is equipped with external LCD display with
touchscreen. To allow displaying console on it, enable framebuffer,
fbcon and DRM support at early boot.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
[pepe2k@gmail.com: refreshed subtarget kernel config]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-07-11 14:14:01 +02:00
Lech Perczak
f430600d73 imx: bundle correct SDMA firmware for i.MX 7 boards
Import sdma-imx7d.bin from linux-firmware repository at commit:
55edf5202154: ("imx: sdma: update firmware to v3.5/v4.5")

Cortex-A7 boards (i.MX 7 based) use different SDMA firmware than i.MX 6
boards - bundle the correct files in per-subtarget kernel options.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-07-11 14:14:01 +02:00
Lech Perczak
345e981707 imx: cortexa7: adjust kernel config defaults for i.MX 7
Add initial symbols required for i.MX 7 boards, based on devices
available on TechNexion PICO-PI-IMX7D board.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
[pepe2k@gmail.com: refreshed subtarget kernel config]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-07-11 14:14:01 +02:00
Piotr Dymacz
baa753ab8b imx: refresh (sub)target kernel configs
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-07-11 14:14:01 +02:00
Rui Salvaterra
3e9ad2cdce kernel: bump 5.15 to 5.15.53
Patches automatically rebased.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-07-11 00:50:18 +02:00
John Audia
552d76f2be kernel: bump 5.15 to 5.15.51
Manual rebase by Marty Jones:
  bcm27xx/patches-5.15/950-0078-BCM2708-Add-core-Device-Tree-support.patch

All other patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
Signed-off-by: Marty Jones <mj8263788@gmail.com>
[Apply same changes to new dts entry in modified file]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-07-11 00:49:25 +02:00
Sander Vanheule
eae5e55a79 realtek: remove hardcoded sys-led configurations
setup.c unconditionally sets the sys-led mode (blinking rate) to a
permanent high output. This may cause issues when a board expects this
pin to toggle periodically, e.g. when hooked up to an external watchdog.

If the sys-led peripheral is used to control an LED, the mux should be
configured to use the pin as GPIO0, allowing for better control as a
GPIO LED.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-07-10 09:54:35 +02:00
Sander Vanheule
b03109c094 realtek: add mux pinctrl for rtl931x
Add a pinctrl-single node to manage the sys-led mux and JTAG mux.
This allows using the associated pins as GPIOs:
  - sys-led: GPIO0
  - JTAG: GPIO6, GPIO7, others unknown (TDO, TDI, TMS, TCK /TRST)

Suggested-by: Birger Koblitz <mail@birger-koblitz.de>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-07-10 09:54:35 +02:00
Sander Vanheule
3edb5e841c realtek: add system LED for ZyXEL XGS1250-12
The devicetree for the ZyXEL XGS1250-12 was missing the description of
the front panel LED labeled "PWR SYS". Let's add it so it can be
controlled by the user.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-07-10 09:54:35 +02:00
Sander Vanheule
cd7a225d28 realtek: add sys-led disable pinctrl for rtl930x
Like for RTL838x devices, add a pinctrl-single node to manage the
sys-led/gpio0 mux, and allow using the pin as GPIO.

Co-developed-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-07-10 09:54:35 +02:00
Sander Vanheule
f4065485d3 realtek: add missing gpio0 pinctrl properties
Not all devices using the gpio0/sys-led pin as a GPIO, configure the
pinmux. Add the necessary pinctrl properties to these devices to ensure
the pin is set up for use as GPIO.

Co-developed-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Tested-by: Bjørn Mork <bjorn@mork.no>
2022-07-10 09:54:35 +02:00
Markus Stockhausen
fae3ac3560 realtek: build sane factory images for DGS-1210 models
During upload of firmware images the WebUI and CLI patch process
extracts a version information from the uploaded file and stores it
onto the jffs2 partition. To be precise it is written into the
flash.txt or flash2.txt files depending on the selected target image.
This data is not used anywhere else. The current OpenWrt factory
image misses this label. Therefore version information shows only
garbage. Fix this.

Before:
DGS-1210-20> show firmware information
IMAGE ONE:
Version      : xfo/QE~WQD"A\Scxq...
Size         : 5505185 Bytes

After:
DGS-1210-20> show firmware information
IMAGE ONE:
Version      : OpenWrt
Size         : 5505200 Bytes

Tested-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2022-07-08 20:15:22 +02:00
Markus Stockhausen
2b49ec3a28 realtek: build factory images for all DGS-1210 models
Currently we build factory images only for DGS-1210-28 model. Relax
that constraint and take care about all models. Tested on DGS-1210-20
and should work on other models too because of common flash layout.

Tested-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2022-07-08 20:15:22 +02:00
Christian Marangi
1a9ee36734 kernel: backport mtd dynamic partition patch
Backport upstream solution that permits to declare nvmem cells with
dynamic partition defined by special parser.

This provide an OF node for NVMEM and connect it to the defined dynamic
partition.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-08 10:19:58 +02:00
Rafał Miłecki
41e1e838fb kernel: backport mtd patch adding of_platform_populate() calls
This is required for non-parser drivers handling MTD devices.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-07-08 10:19:53 +02:00
Ronny Kotzschmar
9b00e97956
rockchip: reliably distribute net interrupts
On the NanoPI R4S it takes an average of 3..5 seconds for the network devices
to appear in '/proc/interrupts'.
Wait up to 10 seconds to ensure that the distribution of the interrupts
really happens.

Signed-off-by: Ronny Kotzschmar <ro.ok@me.com>
2022-07-07 13:13:26 +02:00
Andrew Sim
3872b422ff mediatek: mt7622: add missing vbus regulator node to totolink-a8000ru dts
On boot, kernel log complains no vbus supply is found:

`xhci-mtk 1a0c0000.usb: supply vbus not found, using dummy regulator`

so add the dts node entries to solve the issue

Signed-off-by: Andrew Sim <andrewsimz@gmail.com>
2022-07-07 00:22:23 +01:00
Hauke Mehrtens
dcc0fe24ea kernel: Add missing mediatek configuration options
When building the mediatek/mt7629 target in OpenWrt 22.03 the kernel
does not have a configuration option for CONFIG_CRYPTO_DEV_MEDIATEK. Add
this option to the generic kernel configuration and also add two other
configuration options which are removed when we refresh the mt7629
kernel configuration.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-07-06 20:32:11 +02:00
Luiz Angelo Daros de Luca
8b798dbb39 realtek: rename u-boot-env2 to board-name
Some realtek boards have two u-boot-env partitions. However, in the
DGS-1210 series, the mtdblock2 partition is not a valid u-boot env
and simply contains the board/device name, followed by nulls.

00000000  44 47 53 2d 31 32 31 30  2d 32 38 2d 46 31 00 00 |DGS-1210-28-F1..|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
*
00040000

00000000  44 47 53 2d 31 32 31 30  2d 35 32 2d 46 31 00 00 |DGS-1210-52-F1..|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
*
00040000

The misleading u-boot-env2 name also confuses uboot-envtools.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2022-07-05 21:52:14 +02:00
Markus Stockhausen
e763c4c89f realtek: build DGS-1210 images with CAMEO tag
From now on we will insert CAMEO tags into sysupgrade images for
DGS-1210 devices. This will make the "OS:...FAILED" and "FS:...FAILED"
messages go away.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2022-07-05 09:56:37 +02:00
Daniel Golle
f58e562b07
mediatek: mt7622: fix white dome LED of UniFi 6 LR
The recent differentiation between v1 and v2 of the UniFi 6 LR added
support for the v2 version which has GPIO-controlled LEDs instead of
using an additional microcontroller to drive an RGB led.
The polarity of the white LED, however, was inverted and the default
states didn't make a lot of sense after all. Fix that.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-07-04 19:19:52 +01:00
Daniel Golle
1d3b57dbee
mvebu: cortexa72: fix ImageBuilder for IEI Puzzle devices
The line trying to generate the standard sdcard.img.gz fails due to
boot.scr not being generated.
Remove the line in order to use the default sdcard.img.gz which is
exactly the same but includes generating the boot.scr file.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-07-04 18:36:09 +01:00
Sieng Piaw Liew
265f402fbd
ath79: ag71xx: reuse skbuff_head with napi skb api
napi_build_skb() reuses NAPI skbuff_head cache in order to save some
cycles on freeing/allocating skbuff_heads on every new Rx or completed
Tx.
Use napi_consume_skb() to feed the cache with skbuff_heads of completed
Tx so it's never empty.

Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
[ fixed commit title ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-07-04 17:14:39 +02:00
Nita Vesa
1a8c74da70 ramips: Add Xiaomi Mi Router 4A 100M International
The international version of Mi Router 4A 100M is physically
identical to the non-international one, but appears to be
using a different partitioning scheme with the "overlay"
partition being 2MiB in size instead of 1MiB. This means
the following "firmware" partition starts at a different
address and the DTS needs to be adjusted for the firmware
to work.

Signed-off-by: Nita Vesa <werecatf@outlook.com>
2022-07-03 22:14:05 +02:00
Sergei Iudin
4b0c433c39 ramips: Add suport for COMFAST CF-WR617AC
Specifications:
Chipset:MT7628DA+MT7612E
Antenna : 2.4Ghz:2x5dbi Antenna + 5.8Ghz:2x5dbi Antenna
Wireless Rate:2.4Ghz 300Mbps , 5.8Ghz 867Mbps
Output Power :100mW(20dbm)
Physical port:110/100Mbps RJ45 WAN Port , 310/100Mbps RJ45 LAN Port
Flash: 8Mb
DRam: 64Mb
Flashing: default bootloader attempts to boot from tftp://192.168.1.10/firmware_auto.bin using 192.168.1.1

Known issues:
mac-address-increment for 5GHZ doesnt work, i failed to figure out why. Original firmware using +1 from original value in factory partition.

Signed-off-by: Sergei Iudin <tsipa740@gmail.com>
2022-07-03 22:14:05 +02:00
Mikhail Zhilkin
bd783fd60a ramips: add support for Beeline SmartBox GIGA
Beeline SmartBox GIGA is a wireless WiFi 5 router manufactured by
Sercomm company.

Device specification
--------------------
SoC Type: MediaTek MT7621AT
RAM: 256 MiB, Nanya NT5CC128M16JR-EK
Flash: 128 MiB, Macronix MX30LF1G18AC
Wireless 2.4 GHz (MT7603EN): b/g/n, 2x2
Wireless 5 GHz (MT7613BE): a/n/ac, 2x2
Ethernet: 3 ports - 2xGbE (WAN, LAN1), 1xFE (LAN2)
USB ports: 1xUSB3.0
Button: 1 button (Reset/WPS)
PCB ID: DBE00B-1.6MM
LEDs: 1 RGB LED
Power: 12 VDC, 1.5 A
Connector type: barrel
Bootloader: U-Boot

Installation
-----------------
1. Downgrade stock (Beeline) firmware to v.1.0.02;
2. Give factory OpenWrt image a shorter name, e.g. 1001.img;
3. Upload and update the firmware via the original web interface.

Remark: You might need make the 3rd step twice if your running firmware
is booted from the Slot 1 (Sercomm0 bootflag). The stock firmware
reverses the bootflag (Sercomm0 / Sercomm1) on each firmware update.

Revert to stock
---------------
1. Change the bootflag to Sercomm1 in OpenWrt CLI and then reboot:
      printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
2. Optional: Update with any stock (Beeline) firmware if you want to
   overwrite OpenWrt in Slot 0 completely.

MAC Addresses
-------------
+-----+-----------+---------+
| use | address   | example |
+-----+-----------+---------+
| LAN | label     | *:16    |
| WAN | label + 1 | *:17    |
| 2g  | label + 4 | *:1a    |
| 5g  | label + 5 | *:1b    |
+-----+-----------+---------+
The label MAC address was found in Factory 0x21000

Notes
-----
1. The following scripts are required for the build:
      sercomm-crypto.py - already exists in OpenWrt
      sercomm-partition-tag.py - already exists in OpenWrt
      sercomm-payload.py - already exists in OpenWrt
      sercomm-pid.py - new, the part of this pull request
      sercomm-kernel-header.py - new, the part of this pull request
2. This device (same as other Sercomm S2,S3-based devices) requires
   special LZMA and LOADADDR settings for successful boot:
      LZMA_TEXT_START=0x82800000
      KERNEL_LOADADDR=0x81001000
      LOADADDR=0x80001000
3. This device (same as several other Sercomm-based devices - Beeline,
   Netgear, Etisalat, Rostelecom) has partition map (mtd1) containing
   real partition offsets, which may differ from device to device
   depending on the number and location of bad blocks on NAND.
   "fixed-partitions" is used if the partition map is not found or
   corrupted. This behavour (it's the same as on stock firmware) is
   provided by MTD_SERCOMM_PARTS module.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2022-07-03 20:25:38 +02:00
Rui Salvaterra
90a6350423 kernel: bump 5.15 to 5.15.50
Patches automatically rebased.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-07-03 20:25:38 +02:00
Alexandru Gagniuc
36acb3db03 realtek: EnGenius EWS2910P: declare and hog the poe-enable GPIO
GPIO 1 on the RTL8231 is used to force the PoE MCU to disable power
outputs. It is not used by any driver, but if accidentally set low,
PoE outputs are disabled. This situation is hard to debug, and
requires knowledge of the Broadcom PoE protocol used by the MCU.

To prevent this situation, hog it as an output high. This is
consistent with the ZyXel GS1900 series handles it.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2022-07-02 11:50:47 +02:00
Nick Hainke
04545c4325
mediatek: 5.15: refresh patches
Refresh patches:
- 510-net-mediatek-add-flow-offload-for-mt7623.patch
- 920-dts-mt7622-bpi-r64-fix-wps-button.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-07-01 20:24:44 +02:00
Nick Hainke
3c3367f03e
generic: 5.15: refresh patches
Refresh patches:
- 402-mtd-blktrans-call-add-disks-after-mtd-device.patch
- 420-mtd-set-rootfs-to-be-root-dev.patch
- 495-mtd-core-add-get_mtd_device_by_node.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-07-01 20:24:43 +02:00
Nick Hainke
6686194255
mediatek: mt7622: fix banana pi r64 wps button
Fix the wps button to prevent wrongly detected recovery procedures.
In the official banana pi r64 git the wps button is set to
GPIO_ACTIVE_LOW and not GPIO_ACTIVE_HIGH.

Import patch to fix on boot unwanted recovery entering:

  Press the [f] key and hit [enter] to enter failsafe mode
  Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
  - failsafe button wps was pressed -
  - failsafe -

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-07-01 20:24:43 +02:00