Commit Graph

27238 Commits

Author SHA1 Message Date
Mikhail Zhilkin
e6b99a4e43 ramips: create common dtsi for Sercomm Dxx routers
This commit adds common dtsi for the following Sercomm devices with 256
MB NAND:
Beeline Smartbox TURBO (Sercomm DF3)
Rostelecom RT-SF-1 (Sercomm DKG)

Also fixed typo ("Container" mtd name should be with a capital).

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2022-11-13 21:51:22 +01:00
Martin Dziura
a0b25e17ae ramips: glinet_gl-mt300n-v2: allow to use I2C and UART1 pins as GPIO
This is explicitly intended by the official documentation at
https://docs.gl-inet.com/en/3/specification/gl-mt300n-v2/#pcb-pinout

Signed-off-by: Martin Dziura <m.dziura@tum.de>
2022-11-13 21:51:22 +01:00
David Bauer
fdcd383919 kconfig: abort configuration on unset symbol
This fixes the initial patch to cover all cases where unset symbols are
handled in the code.

Fixes commit eaa9c94c75 ("generic: Kconfig: exit on unset symbol")

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-11-13 16:49:30 +01:00
Lech Perczak
1a49b499f1 ipq40xx: dts: remove leftover nodes after DSA conversion
Remove ess-psgmii@98000, edma@c080000 and ess-switch@c000000 nodes.
These nodes are not used after the DSA conversion, but were left over
in a few devices added recently.

ZTE MF289F is omitted on purpose, as for it, these nodes will be removed
together with DSA conversion.

Build tested only, as I only have MF286D from those devices.

Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-11-13 15:31:54 +01:00
Sven Eckelmann
fc69532eb9 ipq40xx: Convert plasmacloud,pa2200 to DSA
* ethernet1:

  - physical port label "Ethernet 1"
  - its mac address is printed on the device label

* ethernet2:

  - physical port label "Ethernet 2"
  - can be used to power the device

Both ports are not marked by there role (because the vendor firmware
automatically detects roles) but the "Ethernet 2" port was used in the past
for "WAN" functionality in OpenWrt.

Tested-by: Michaël BILCOT <michael.bilcot@gmail.com>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-11-13 15:26:34 +01:00
Sven Eckelmann
ce6c9e0328 ipq40xx: utilize nvmem-cells for plasmacloud,pa2200
The calibration data and mac addresses on this device are stored in the
0:ART partition. It is therefore possible to move the code to handle them
directly to the devicetree instead of the various scripts.

But the actual relevant information about the partition layout is provided
by the bootloader via bootargs (mtdparts) and not via the devicetree
itself. Instead of using a fixed-partition template, the mtd dynamic
partitions support from the upstream kernel is used.

Reported-by: Robert Marko <robert.marko@sartura.hr>
Tested-by: Michaël BILCOT <michael.bilcot@gmail.com>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-11-13 15:26:34 +01:00
Sven Eckelmann
539a5fd624 ipq40xx: Convert plasmacloud,pa1200 to DSA
* ethernet1:

  - physical port label "Ethernet 1"
  - its mac address is printed on the device label

* ethernet2:

  - physical port label "Ethernet 2"
  - can be used to power the device

Both ports are not marked by there role (because the vendor firmware
automatically detects roles) but the "Ethernet 2" port was used in the past
for "WAN" functionality in OpenWrt.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-11-13 15:26:34 +01:00
Sven Eckelmann
b8bda645fc ipq40xx: utilize nvmem-cells for plasmacloud,pa1200
The calibration data and mac addresses on this device are stored in the
0:ART partition. It is therefore possible to move the code to handle them
directly to the devicetree instead of the various scripts.

But the actual relevant information about the partition layout is provided
by the bootloader via bootargs (mtdparts) and not via the devicetree
itself. Instead of using a fixed-partition template, the mtd dynamic
partitions support from the upstream kernel is used.

Reported-by: Robert Marko <robert.marko@sartura.hr>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-11-13 15:26:34 +01:00
Arne Zachlod
364550f9d9 ramips: fix MAC address assignment for rt1800, e7350
previous commit ffa4b5283b introduced a bug which broke the MAC address
assignment for belkin,rt1800 and linksys,e7350.

Fixes: ffa4b5283b ("ramips: add support for Mikrotik LtAP-2HnD")
Signed-off-by: Arne Zachlod <arne@nerdkeller.org>
2022-11-13 15:17:49 +01:00
Hauke Mehrtens
b97e5ac785 bcm4908: Refresh kernel patches
Refresh the kernel patches for this target. No manual changes.

Fixes: 45ac906c64 ("bcm4908: update DTS files with the latest changes")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-11-12 22:53:04 +01:00
Sven Eckelmann
087a8e39be ipq40xx: utilize nvmem-cells for openmesh,a62
The calibration data and mac addresses on this device are stored in the
0:ART partition. It is therefore possible to move the code to handle them
directly to the devicetree instead of the various scripts.

But the actual relevant information about the partition layout is provided
by the bootloader via bootargs (mtdparts) and not via the devicetree
itself. Instead of using a fixed-partition template, the mtd dynamic
partitions support from the upstream kernel is used.

Reported-by: Robert Marko <robert.marko@sartura.hr>
Reviewed-by: Robert Marko <robimarko@gmail.com>
Tested-by: Michaël BILCOT <michael.bilcot@gmail.com>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-11-12 18:15:55 +01:00
Sven Eckelmann
2b2f14c959 ipq40xx: utilize nvmem-cells for openmesh,a42
The calibration data and mac addresses on this device are stored in the
0:ART partition. It is therefore possible to move the code to handle them
directly to the devicetree instead of the various scripts.

But the actual relevant information about the partition layout is provided
by the bootloader via bootargs (mtdparts) and not via the devicetree
itself. Instead of using a fixed-partition template, the mtd dynamic
partitions support from the upstream kernel is used.

Reported-by: Robert Marko <robert.marko@sartura.hr>
Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-11-12 18:15:55 +01:00
Sven Eckelmann
c6bef1b83a ipq40xx: Convert openmesh,a62 to DSA
* ethernet1:

  - physical port label "Ethernet 1"
  - can be used to power the device
  - its mac address is printed on the device label

* ethernet2:

  - physical port label "Ethernet 2"

Both ports are not marked by there role (because the vendor firmware
automatically detects roles) but the "Ethernet 1" port was used in the past
for "WAN" functionality in OpenWrt.

Reviewed-by: Robert Marko <robimarko@gmail.com>
Tested-by: Michaël BILCOT <michael.bilcot@gmail.com>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-11-12 18:15:55 +01:00
Sven Eckelmann
66a3c32b47 ipq40xx: Convert openmesh,a42 to DSA
* ethernet1:

  - physical port label "Ethernet 1"
  - can be used to power the device
  - its mac address is printed on the device label

* ethernet2:

  - physical port label "Ethernet 2"

Both ports are not marked by there role (because the vendor firmware
automatically detects roles) but the "Ethernet 1" port was used in the past
for "WAN" functionality in OpenWrt.

Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2022-11-12 18:15:55 +01:00
Guillaume Lefebvre
65d9a715fc ipq40xx: D-Link DAP-2610: convert to DSA
Reenable D-Link DAP-2610, convert it to DSA and label port to 'lan', as shown on the case

Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Guillaume Lefebvre <guillaume@zelig.ch>
2022-11-12 18:15:55 +01:00
Óscar García Amor
62efb34071 ramips: add support for Cudy WR1300 v2
Specifications:
 - SoC: MediaTek MT7621AT
 - RAM: 128 MB (DDR3)
 - Flash: 16 MB (SPI NOR)
 - WiFi: MediaTek MT7603E, MediaTek MT7613BE
 - Switch: 1 WAN, 4 LAN (Gigabit)
 - Ports: 1 USB 3.0
 - Buttons: Reset, WPS
 - LEDs: System, Wan, Lan 1-4, WiFi 2.4G, WiFi 5G, WPS
 - Power: DC 12V 1A tip positive

Download and flash the manufacturer's built OpenWRT image available at
http://www.cudytech.com/openwrt_software_download
Install the new OpenWRT image via luci (System -> Backup/Flash firmware)
Be sure to NOT keep settings. The force upgrade may need to be checked
due to differences in router naming conventions.

Recovery:
 - Loads only signed manufacture firmware due to bootloader RSA verification
 - serve tftp-recovery image as /recovery.bin on 192.168.1.88/24
 - connect to any lan ethernet port
 - power on the device while holding the reset button
 - wait at least 8 seconds before releasing reset button for image to
   download
 - See http://www.cudytech.com/newsinfo/547425.html

Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2022-11-12 18:15:55 +01:00
Szabolcs Hubai
18801f2648 ramips: mt7621: use seama-lzma-loader for D-Link DIR-860L B1
Fix the LZMA ERROR 1 with a single line of recipe instead of duplicating
"uimage-lzma-loader".

While reviewing my original submission of commit ce19571004 David
suggested to use $(Device/uimage-lzma-loader), but due to the specific
needs of the vendor bootloader that simple oneliner didn't work.

The new $(Device/seama-lzma-loader) is for those SEAMA capable
bootloaders.

Signed-off-by: Szabolcs Hubai <szab.hu@gmail.com>
2022-11-12 18:15:55 +01:00
Szabolcs Hubai
c293b492df ramips: rt3883: use seama-lzma-loader for D-Link DIR-645
In the support topic [0] of the GitHub issue #10634 it was found out
(based on boot logs) that the uimage-lzma-loader (commit 09faa73c53)
never worked, as an earlier workaround (commit 6fba88de19) negated
the recipe:

    3: System Boot system code via Flash.
    ## Booting image at bc050000 ...
    raspi_read: from:50000 len:40
    .raspi_read: from:50000 len:c
    .raspi_read: from:50000 len:1fa000
    ................................We have SEAMA, Image Size = 2072512
    Verifying Checksum ...
    Uncompressing SEAMA linux.lzma ... OK
    ## Transferring control to Linux (at address 80000000) ...
    ## Giving linux memsize in MB, 64

    Starting kernel ...

    [    0.000000] Linux version 5.4.188 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16554-1d4dea6d4f)) #0 Sat Apr 16 12:59:34 2022
    [    0.000000] SoC Type: Ralink RT3883 ver:1 eco:5
    [    0.000000] printk: bootconsolde [early0] enabled
    [    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
    [    0.000000] MIPS: machine is D-Link DIR-645
    [    0.000000] Initrd not found or empty - disabling initrd

Using the new seama-lzma-loader it's able to boot OpenWrt 22.03
and OpenWrt SNAPSHOT too:

    3: System Boot system code via Flash.
    ## Booting image at bc050000 ...
    raspi_read: from:50000 len:40
    .raspi_read: from:50000 len:c
    .raspi_read: from:50000 len:48b004
    .........................................................................We have SEAMA, Image Size = 4763588
    Verifying Checksum ...
    Uncompressing SEAMA linux.lzma ... OK
    ## Transferring control to Linux (at address 80000000) ...
    ## Giving linux memsize in MB, 64

    Starting kernel ...

    OpenWrt kernel loader for MIPS based SoC
    Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
    Decompressing kernel... done!
    Starting kernel at 80000000...

    [    0.000000] Linux version 5.10.144 (xabolcs@ut2004) (mipsel-openwrt-linux-musl-gcc (OpenWrt GCC 11.3.0 r20774+2-b71affaf8b) 11.3.0, GNU ld (GNU Binutils) 2.37) #0 Tue Sep 27 23:02:30 2022
    [    0.000000] SoC Type: Ralink RT3883 ver:1 eco:5
    [    0.000000] printk: bootconsole [early0] enabled
    [    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
    [    0.000000] MIPS: machine is D-Link DIR-645
    [    0.000000] Initrd not found or empty - disabling initrd
    [    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
    [    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
    [    0.000000] Zone ranges:
    [    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
    [    0.000000] Movable zone start for each node
    [    0.000000] Early memory node ranges
    [    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
    [    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
    [    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2

The OKLI Loader is unable to read the flash on this SoC:

    Looking for OpenWrt image... not found! ('0xddbaddba' at 0xbc051000)

0: https://forum.openwrt.org/t/136435

Fixes: GitHub issue #10634 ("V22.03.0 release currently does not work on D-Link DIR-645")
Fixes: 09faa73c53 ("ramips: rt3883: use lzma-loader for DIR-645")
Tested-by: Glenn Fowler <gfowler1@outlook.com>
Signed-off-by: Szabolcs Hubai <szab.hu@gmail.com>
2022-11-12 18:15:55 +01:00
Szabolcs Hubai
e7ad68d682 ramips: define lzma-loader recipe for SEAMA devices
Define "Device/seama-lzma-loader" recipe for SEAMA devices to help
contributors avoid doing recipe mistakes.

In a forum topic [0] I was under the impression that the good old
uimage-lzma-loader didn't fix the LZMA ERROR 1 for a device.

It was found out, that the uimage-lzma-loader never worked because the
KERNEL variable was overriden earlier (also an LZMA ERROR 1 related
commit, 6fba88de19), and the "use lzma-loader" fix (commit
09faa73c53) didn't catch that to include the "loader-kernel" part.

I contributed an LZMA ERROR 1 fix (commit ce19571004) for the SEAMA
device D-Link DIR-860L B1, where I had to duplicate the whole
uimage-lzma-loader recipe because of the special needs of the vendor
bootloader.

This new recipe reuse most of uimage-lzma-loader's KERNEL definiton to
avoid duplication.

It uses "relocate-kernel" as it needed for D-Link DIR-860L B1 to
boot from flash, and it's compatible with D-Link DIR-645 too.

It repacks lzma-loader with lzma for kernel (without uImage), because
these weird hacked vendor bootloaders accepts only LZMA compressed
kernels from flash:

    We have SEAMA, Image Size = 4759794
    Verifying Checksum ...
    Uncompressing SEAMA linux.lzma ... OK

It uses uImage header for initramfs kernel to be little bit verbose.

0: https://forum.openwrt.org/t/136435/10

Signed-off-by: Szabolcs Hubai <szab.hu@gmail.com>
2022-11-12 18:15:55 +01:00
Arne Zachlod
ffa4b5283b ramips: add support for Mikrotik LtAP-2HnD
Mikrotik LtAP-2HnD is a outdoor/automotive WLAN 4 router with integrated GPS
receiver and two mPCIe slots.

Specifications:
* SoC: MT7621A
* RAM: 128 MiB Nanya NT5CC64M16GP-DI
* Flash: 16 MiB winbond W25Q128JV
* WLAN:
  * Atheros AR9382 with power amplifier SKY 85330 (2x2 internal antennas,
    with RF switches for external connectors)
* Ethernet: 1 Gbps, single port
* USB Host: USB 2.0 Speeds
* Serial: 115200 baud
* LEDs: Power, System, GPS, 5* RSSI
*  mPCIe:
   * miniPCIe slot 1: PCIe and USB 2.0 Host (via switch shared with USB Host)
   * miniPCIe slot 2: USB 2.0 and 3.0
* SIM Cards:
  * Slot 1 Connected to mPCIe slot 1
  * Slot 2 and 3 connected to mPCIe slot 2 via switch
* GPS: MTK 3333 on serial port 2 (/dev/ttyS1), 115200 baud and PPS on gpio 14

gpios are exposed to /sys/class/gpio:

* usb-select: swithes USB 2.0 interface between external port and internal
mPCIe slot 1 default is the external USB interface
* gps-reset: resets the GPS interface chip
* sim-select: switches between sim slot 2 and 3 connected to mPCIe slot 2
* gps-ant-select: switches GPS antenna between internal antenna and SMA
connected antenna
* lte-reset: resets mPCIe slot 2

Flashing:
 TFTP boot initramfs image and then perform sysupgrade. Follow common
 MikroTik procedure as in https://openwrt.org/toh/mikrotik/common.

Signed-off-by: Arne Zachlod <arne@nerdkeller.org>
2022-11-12 18:15:55 +01:00
Will Moss
5a1af6ed62 ath79: fix MAC address assignment for TP-Link ar7241 devices
On TP-Link ar7241 devices LAN and WAN interfaces are swapped. Keeping
that in mind fix MAC address assignment as used in vendor firmware:
LAN MAC - main MAC stored in u-boot and printed on label
WAN MAC - LAN MAC + 1

Signed-off-by: Will Moss <willormos@gmail.com>
2022-11-12 17:10:12 +01:00
Shiji Yang
4778f6e959 ath79: move usb led trigger node to SoC dtsi
These frequently used usb led triggers are universal. They should be
moved to SoC dtsi.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2022-11-12 17:10:12 +01:00
John Audia
e7bd3767a9 kernel: bump 5.10 to 5.10.154
All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-11-12 17:05:13 +01:00
John Audia
0252c0b1bc kernel: bump 5.15 to 5.15.78
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-11-12 17:05:13 +01:00
Quintin Hill
4c3f664c2f kernel: backport some Bluetooth RTL8761 USB IDs
These USB IDs appear in the 5.15 stable kernel series but not the 5.10
stable series.

Signed-off-by: Quintin Hill <stuff@quintin.me.uk>
2022-11-12 17:05:13 +01:00
Quintin Hill
5e6e45b7ff kernel: backport RTL8761B FW name change to v5.10
Make the firmware filenames referenced by the module consistent for
v5.10 and v5.15 kernels.  Backport two upstream patches a cleanup commit
and the commit making the change, the former is required for the latter
to apply cleanly.

Signed-off-by: Quintin Hill <stuff@quintin.me.uk>
2022-11-12 17:05:13 +01:00
Rafał Miłecki
797177ad85 kernel: update U-Boot nvmem driver to v6.2 release version
Backport queued patches that
1. Fix CRC32 calculation for redundant images
2. Fix CRC32 on big-endian
3. Fix parting images with Broadcom header

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-11-12 11:42:05 +01:00
Rafał Miłecki
ce296b1aeb bcm4908: refresh kernel 5.15 config
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-11-11 17:21:55 +01:00
Rafał Miłecki
66b6414a20 bcm4908: prepare support for kernel 5.15
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-11-11 17:21:55 +01:00
Rafał Miłecki
45ac906c64 bcm4908: update DTS files with the latest changes
The most affecting change is move of files from bcm4908/ to the bcmbca/.
That required updating few paths.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-11-11 15:37:57 +01:00
Daniel Golle
e586de8dbf
ath79: add support for Teltonika RUT300
Add support for the Teltonika RUT300 rugged industrial Ethernet router

Hardware
--------
SoC:    Qualcomm Atheros QCA9531
RAM:    64M DDR2 (EtronTech EM68B16CWQK-25IH)
FLASH:  16M SPI-NOR (Winbond W25Q128)
ETH:    4x 100M LAN (QCA9533 internal AR8229 switch, eth0)
        1x 100M WAN (QCA9533 internal PHY, eth1)
UART:   115200 8n1, same debug port as other Teltonika devices
USB:    1 single USB 2.0 host port
BUTTON: Reset
LED:    1x green power LED (always on)
        5x yellow Ethernet port LED (controlled by Linux)
        WAN port LED is used as boot status and upgrade indicator as
        the power LED cannot be controlled in software.

Use the *-factory.bin file to intially flash the device using the
vendor firmware's Web-UI.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-11-10 21:35:34 +00:00
Felix Fietkau
04b8ad60fd kernel: more fixes for mtk_eth_soc performance optimization
- fix features sync between netdevs
- fix crash in dsa_switch_rcv

Fixes: ceb1451c10 ("kernel: add mediatek soc ethernet performance improvements")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-10 22:27:18 +01:00
Felix Fietkau
7bd314a577 kernel: fix vlan parsing issue in mediatek ethernet driver
Check the vlan rx offload flag
Sync features across netdevs

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-10 13:20:57 +01:00
Rafał Miłecki
e4770db163 kernel: support "linux,rootfs" DT property for splitting rootfs
OpenWrt's support for splitting rootfs (to create an extra "rootfs_data"
partition) is limited to partitions called "rootfs". Upstream kernel
allows any name partition to be rootfs if it has "linux,rootfs" property
set. Add split support to such partitions in OpenWrt code.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-11-10 12:47:22 +01:00
Rafał Miłecki
8cdafa149e bcm53xx: update DTS files with the latest changes
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-11-10 09:51:25 +01:00
Weiping Yang
9945d05171 ipq40xx: add support for GL.iNet GL-A1300
Specifications:
SOC:		Qualcomm IPQ4018 (DAKOTA) ARM Quad-Core
RAM:		256 MiB
FLASH1:		4 MiB NOR
FLASH2:		128 MiB NAND
ETH:		Qualcomm QCA8075
WLAN1:		Qualcomm Atheros QCA4018 2.4GHz 802.11b/g/n 2x2
WLAN2:		Qualcomm Atheros QCA4018 5G 802.11n/ac W2 2x2
USB:		1 x USB 3.0 port
Button:		1 x Reset button
Switch:		1 x Mode switch
LED:		1 x Blue LED + 1 x White LED

Install via uboot tftp or uboot web failsafe.

By uboot tftp:
(IPQ40xx) # tftpboot 0x84000000 openwrt-ipq40xx-generic-glinet_gl-a1300-squashfs-nand-factory.ubi
(IPQ40xx) # nand erase 0 0x8000000
(IPQ40xx) # nand write 0x84000000 0 $filesize

By uboot web failsafe:
Push the reset button for 10 seconds util the power led flash faster,
then use broswer to access http://192.168.1.1

Afterwards upgrade can use sysupgrade image.

Signed-off-by: Weiping Yang <weiping.yang@gl-inet.com>
2022-11-09 23:34:37 +01:00
Edward Chow
79107116d1 ath79: calibrate TL-WDR4900 v2 with nvmem-cells
Driver for both soc (2.4GHz Wifi) and pci (5 GHz) now pull the calibration
data from the nvmem subsystem.

This allows us to move the userspace caldata extraction for the pci-e ath9k
supported wifi into the device-tree definition of the device.

wmac's nodes are also changed over to use nvmem-cells over OpenWrt's
custom mtd-cal-data property.

Signed-off-by: Edward Chow <equu@openmail.cc>
2022-11-09 22:55:33 +01:00
Shiji Yang
8d4c22a956 ath79: add missing clock name strings in SoC dtsi
For all SoC in the ath79 target, the PLL controller provides 3 main
clocks "cpu", "ddr" and "ahb" through the input clock "ref".

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2022-11-09 22:55:33 +01:00
Shiji Yang
520c90854c ath79: move reference clock node to SoC dtsi
AR7161, AR724x, AR9132 and QCA95xx only support fixed frequency external
crystal oscillator, so move reference clock node to SoC dtsi files.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2022-11-09 22:55:33 +01:00
Felix Fietkau
a06e023b4e mac80211: remove old legacy legacy drivers
Get rid of drivers that are either limited to 802.11b/g or don't even support
cfg80211/mac80211. Most of these are either limited to boards that we don't even
support anymore because of firmware size, or were only used for custom hacks by
a really small number of users in the past.
Let's get rid of those to reduce the maintenance effort and the number of useless
packages

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-09 20:44:28 +01:00
Felix Fietkau
f753316f4a mediatek: filogic: enable maxlinear PHY support, refresh config
Needed for the 7986 RFB1 board

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-09 20:43:55 +01:00
Felix Fietkau
5faff99c7b mediatek: filogic: fix mt7986a ethernet devicetree entries
Add all ports, rename DSA ports to start at lan1

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-09 20:43:51 +01:00
Felix Fietkau
4f1e54801e mediatek: drop the use of device tree overlays on mt7986a-rfb board
The boot loader does not support it. Instead make NAND the default image for
this board

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-09 20:43:45 +01:00
Felix Fietkau
ceb1451c10 kernel: add mediatek soc ethernet performance improvements
- implement multiqueue via qdma hardware shaper to deal with ports with different speeds
- implement hardware DSA untagging
- add NETIF_F_ALL_TSO to reduce unnecessary segmentation

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-09 18:18:27 +01:00
Edward Matijevic
2964e5024c
ipq806x: kernel ramoops storage for C2600/AD7200
Define the kernel crash log storage ramoops/pstore feature
for C2600/AD7200 and add kmod-ramoops to default.

Tested with C2600 only.

Signed-off-by: Edward Matijevic <motolav@gmail.com>
2022-11-09 17:07:15 +01:00
David Bauer
10ba380ec3 ramips: define loadaddr for U6 Lite DTB
The Ubiquiti UniFi 6 Lite does not correctly align the FDT by always
setting fdt_high to 0xffffffff when invoking the bootubnt command.

Work around this issue by loading the DTB to a valid,aligned address, so
the bootloader does not have to relocate the FDT automatically.

Note: The device does read the kernel before invoking bootm on the FIT
image to 0x86000000.

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-11-08 12:16:43 +01:00
Rafał Miłecki
d33e49857e kernel: backport support for "linux,rootfs" in DT
This DT property allows marking flash partition that Linux should use as
a root device. It's useful for devices that don't use U-Boot and cmdline
parser for partitioning. It may be used with "fixed-partitions" or some
dynamic partitioning based on flash content.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-11-08 09:12:16 +01:00
Rafał Miłecki
6a64eb2664 kernel: split out mtd hack for CONFIG_FIT_PARTITION + rootfs
This is some hack on top of our old hack. Use separated patch for it so
it's easier to understand and actually possible to describe. We should
ideally get rid of this (and we actually did with kernels 5.15+).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-11-08 09:12:05 +01:00
Michael Lyle
961e01fc67 ramips: gl-mt1300: downclock SPI to 50MHz
The SPI max frequency was set to 80MHz, considerably higher than the
vendor clocks it in their firmware (10MHz).  Multiple users reported
jffs2 corruption/instability in GitHub issue #10461.

My unit has a W25Q256; datasheet specifies maximum SPI frequency for
read command of 50MHz.

Thanks to @DragonBlueP for suggesting to eliminate m25p,fast-read;
and @MPannen1979 for identifying the problem.

Fixes: #10461
Signed-off-by: Michael Lyle <mlyle@lyle.org>
2022-11-07 12:54:31 +01:00
Sungbo Eo
02aa7a2bb9 ramips: fix TP-Link RE200 v3/v4 LEDs
Set power LED to gpio 43 instead of 44 for v3 and v4.
Set red wifi LED to gpio 40 (was assigned to `red:wifi5g`).

Tested by the author of the initial v3 and v4 commit.

Reported-by: Richard Fröhning <misanthropos@gmx.de>
Tested-by: Richard Fröhning <misanthropos@gmx.de>
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
2022-11-07 12:33:42 +01:00