Commit Graph

551 Commits

Author SHA1 Message Date
Kasparas Elzbutas
e562746263 ipq40xx: fix RUTX10 Wi-Fi woes
This partially reverts:
commit cfc13c4459 ("ipq40xx: utilize nvmem-cells for macs & (pre-)calibration data")

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

Fixes: cfc13c4459 ("ipq40xx: utilize nvmem-cells for macs & (pre-)calibration data")
Signed-off-by: Kasparas Elzbutas <elzkas@gmail.com>
(added reference to commit, rewrote commit message)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-09-24 23:53:53 +02:00
Andrew Sim
e2ffb61821
ipq40xx: fix power LED colour ID in Netgear WAC510 dts
led_power_green color ID in dts is mistakenly set to amber so
correct it by setting it to green

Signed-off-by: Andrew Sim <andrewsimz@gmail.com>
2022-09-19 17:49:56 +02:00
Sungbo Eo
f0ea3df439 ipq40xx: disable devices with 3MiB kernel size
The image builds for Linksys EA6350 v3, EA8300, and MR8300 currently
fail on buildbots due to the KERNEL_SIZE, as stated in commit
17b7756b5a ("ipq40xx: 5.15: add testing kernel version"). Disable
these boards for now.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2022-09-18 21:33:50 +09:00
David Bauer
470ca65bda ipq40xx: add GL-AP1300 label-mac-device
Signed-off-by: David Bauer <mail@david-bauer.net>
2022-09-11 16:24:11 +02:00
David Bauer
4d014a7bd6 ipq40xx: add WAN LED mapping for GL-AP1300
Signed-off-by: David Bauer <mail@david-bauer.net>
2022-09-11 15:53:49 +02:00
Gregory Detal
0be1b78856 ipq40xx: cellc_rtl30vw: fix imagebuilder generation
The image build process was modifying the generated IMAGE_KERNEL to
append rootfs information (crc). This caused:
 - sysupgrade & factory images to contain 2 times the root.squashfs
   information due to both modifying the same IMAGE_KERNEL.
 - the generated imagebuilder to contain an erroneous IMAGE_KERNEL that
   contained references to an unexisting root.squashfs (the one from
   previous cause). The RTL30VW wasn't therefore able to boot the
   generated images as they contained checksums from non existing rootfs.

This commit makes sure to use a temporary IMAGE_KERNEL to append the
rootfs information for both factory and sysupgrade images.

Fixes: #10511
Signed-off-by: Gregory Detal <gregory.detal@tessares.net>
2022-09-11 01:36:25 +02:00
John Audia
e8a62a1e60 kernel: bump 5.10 to 5.10.141
All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-09-11 01:30:11 +02:00
David Bauer
c7c3509226 ipq40xx: add LTE packages for GL-AP1300
Add LTE packages required for operating the LTE modem optionally shipped
with the GL-AP1300.

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-09-09 18:15:23 +02:00
Nick Hainke
5f458e64a9 ipq40xx: switch to 5.15 as default kernel
The testing kernel received now multiple months of testing. Set 5.15 as
default to give it a test with a broader audience.

Tested on:
- MikroTik SXTsq 5 AC
- FritzBox 4040/7530
- ZyXEL NBG6617

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-09-09 11:15:07 +02:00
Tomasz Maciej Nowak
47306d47ef ipq-wifi: add Pakedge WR-1 support
Calibration variants:
Pakedge-WR-1		ETSI, FCC and IC-2.4GHz
Pakedge-WR-1-ACMA	ACMA
Pakedge-WR-1-IC		IC-5GHz
Pakedge-WR-1-SRRC	SRRC

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2022-09-07 21:21:38 +02:00
Tomasz Maciej Nowak
80baffd2aa ipq40xx: add support for Pakedge WR-1
Pakedge WR-1 is a dual-band wireless router.

Specification
SoC: Qualcomm Atheros IPQ4018
RAM: 256 MB DDR3
Flash: 32 MB SPI NOR
WIFI: 2.4 GHz 2T2R integrated
      5 GHz 2T2R integrated
Ethernet: 5x 10/100/1000 Mbps QCA8075
USB: 1x 2.0
LEDS: 8x (3 GPIO controlled, 5 connected to switch)
Buttons: 1x GPIO controlled
UART: pin header J5
      1. 3.3V, 2. GND, 3. TX, 4. RX
      baud: 115200, parity: none, flow control: none

Installation
1. Rename initramfs image to:
   openwrt-ipq806x-qcom-ipq40xx-ap.dk01.1-c1-fit-uImage-initramfs.itb
   and copy it to USB flash drive with FAT32 file system.
2. Connect USB flash drive to the router and apply power while pressing
   reset button. Hold the button, on the lates bootloader version, when
   Power and WiFi-5 LEDs will start blinking release it. For the older
   bootloader holding it for 15 seconds should suffice.
3. Now the router boots the initramfs image, at some point (close to one
   minute) the Power LED will start blinking, when stops, router is fully
   booted.
4. Connect to one of LAN ports and use SSH to open the shell at
   192.168.1.1.
5. ATTENTION! now backup the mtd8 and mtd9 partitions, it's necessary if,
   at some point, You want to go back to original firmware. The firmware
   provided by manufacturer on its site is encrypted and U-Boot accepts
   only decrypted factory images, so there's no way to restore original
   firmware.
6. If the backup is prepared, transfer the sysupgrade image to the router
   and use 'sysupgrade' command to flash it.
7. After successful flashing router will reboot. At some point the Power
   LED will start blinking, wait till it stops, then router is ready for
   configuration.

Additional information
U-Boot command line is password protected. Password is unknown.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2022-09-07 21:21:38 +02:00
David Bauer
e16a0e7e88 ipq40xx: add support for Extreme Networks WS-AP3915i
Hardware
--------
Qualcomm IPQ4029 WiSoC
2T2R 802.11 abgn
2T2R 802.11 nac
Macronix MX25L25635E SPI-NOR (32M)
512M DDR3 RAM
1x Gigabit LAN
1x Cisco RJ-45 Console port
Settings: 115200 8N1

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

1. Attach to the Console port. Power up the device and press the s key
   to interrupt autoboot.

2. The default username / password to the bootloader is admin / new2day

3. Update the bootcommand to allow loading OpenWrt.

   $ setenv ramboot_openwrt "setenv serverip 192.168.1.66;
     setenv ipaddr 192.168.1.1; tftpboot 0x86000000 openwrt-3915.bin;
     bootm"
   $ setenv boot_openwrt "sf probe;
     sf read 0x88000000 0x280000 0xc00000; bootm 0x88000000"
   $ setenv bootcmd "run boot_openwrt"
   $ saveenv

4. Download the OpenWrt initramfs image. Serve it using a TFTP server as
   "openwrt-3915.bin" at 192.1681.66.

5. Download & boot the OpenWrt initramfs image on the access point.

   $ run ramboot_openwrt

6. Wait for OpenWrt to start.

7. Download and transfer the sysupgrade image to the device using e.g.
   SCP.

8. Install OpenWrt to the device using "sysupgrade"

   $ sysupgrade -n /path/to/openwrt.bin

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-09-06 02:55:05 +02:00
Tomasz Maciej Nowak
4d8b42d8a7 ipq40xx: point to externally compiled dtbs in recipes
Adjusting dts will cause a rebuild of whole kernel as the buildroot
considers this a part of kernel source. It's a royal PITA when trying to
prepare support for new device, since this takes a lot of time on slower
systems. As it stands, buildroot itself, with own rule, also compiles
dtbs and the results are $(KDIR)/image-$(DEVICE_DTS).dtb. With setting
DEVICE_DTS_DIR to directory holding the device dts (similarly to some
other targets), buildroot doesn't consider changed dts as part of kernel
source and rebuilds only dtb. This really speeds up development. And
since the kernel built dts are no longer used, drop the paches adding
dtses to its build.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2022-09-06 02:50:04 +02:00
John Audia
f87175b303 kernel: bump 5.15 to 5.15.64
All patches automatically rebased

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-09-02 21:21:31 +02:00
Petr Štetiar
ca5c695a45 kernel: bump 5.15 to 5.15.62
Deleted following upstreamed patches:

 bcm27xx: 950-0006-drm-vc4-hdmi-Fix-HPD-GPIO-detection.patch
 bcm27xx: 950-0420-drm-vc4-Adopt-the-dma-configuration-from-the-HVS-or-.patch
 bcm27xx: 950-0425-drm-vc4-A-present-but-empty-dmas-disables-audio.patch
 bcm27xx: 950-0432-vc4-drm-Avoid-full-hdmi-audio-fifo-writes.patch
 bcm27xx: 950-0433-vc4-drm-vc4_plane-Remove-subpixel-positioning-check.patch
 bcm27xx: 950-0435-drm-vc4-Correct-pixel-order-for-DSI0.patch
 bcm27xx: 950-0436-drm-vc4-Register-dsi0-as-the-correct-vc4-encoder-typ.patch
 bcm27xx: 950-0437-drm-vc4-Fix-dsi0-interrupt-support.patch
 bcm27xx: 950-0438-drm-vc4-Add-correct-stop-condition-to-vc4_dsi_encode.patch
 bcm27xx: 950-0443-drm-vc4-Fix-timings-for-interlaced-modes.patch
 bcm27xx: 950-0445-drm-vc4-Fix-margin-calculations-for-the-right-bottom.patch
 bcm27xx: 950-0475-drm-vc4-Reset-HDMI-MISC_CONTROL-register.patch
 bcm27xx: 950-0476-drm-vc4-Release-workaround-buffer-and-DMA-in-error-p.patch
 bcm27xx: 950-0477-drm-vc4-Correct-DSI-divider-calculations.patch
 bcm27xx: 950-0664-drm-vc4-dsi-Correct-max-divider-to-255-not-7.patch

 bcm53xx: 072-next-ARM_dts_BCM53015-add-mr26.patch

 mediatek: 920-linux-next-dts-mt7622-bpi-r64-fix-wps-button.patch

Manually rebased following patches:

 bcm27xx: 950-0004-drm-vc4-hdmi-Remove-the-DDC-probing-for-status-detec.patch
 bcm27xx: 950-0700-net-phy-lan87xx-Decrease-phy-polling-rate.patch
 bcm27xx: 950-0711-drm-vc4-Rename-bridge-to-out_bridge.patch
 bcm27xx: 950-0713-drm-vc4-Remove-splitting-the-bridge-chain-from-the-d.patch
 bcm27xx: 950-0715-drm-vc4-Convert-vc4_dsi-to-using-a-bridge-instead-of.patch
 bcm27xx: 950-0787-vc4-drm-vc4_plane-Keep-fractional-source-coords-insi.patch
 bcm27xx: 950-0914-mmc-block-Don-t-do-single-sector-reads-during-recove.patch

Runtime tested on turris-omnia and glinet-b1300.

Tested-by: John Audia <therealgraysky@proton.me> [bcm2711/RPi4B, mt7622/RT3200]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-08-23 10:37:04 +02:00
Petr Štetiar
d1163fd13f kernel: bump 5.10 to 5.10.137
Removed following upstreamed patch:

 * bcm53xx: 081-next-ARM_dts_BCM53015-add-mr26.patch

All other patches automagically rebased.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-08-23 10:37:04 +02:00
Hauke Mehrtens
ff06edd1f0 kernel: Activate CONFIG_GPIOLIB in generic configuration
All targets expect the malta target already activate the CONFIG_GPIOLIB
option. Move it to generic kernel configuration and also activate it for
malta.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-10 21:36:17 +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
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
Thibaut VARÈNE
bb929a0f9c ipq40xx: mikrotik: make RouterBoot partition writeable
Linux MTD requires the parent partition be writable for a child
partition to be allowed write permission.
In order for soft_config to be writeable (and modifiable via sysfs),
the parent RouterBoot partition must be writeable

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2022-06-29 12:34:49 +02:00
Tomasz Maciej Nowak
539e60539a generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM]
This is now built-in, enable so it won't propagate on target configs.

Link: https://lkml.org/lkml/2022/1/3/168
Fixes: 79e7a2552e ("kernel: bump 5.15 to 5.15.44")
Fixes: 0ca93670693b ("kernel: bump 5.10 to 5.10.119")
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
(Link to Kernel's commit taht made it built-in,
CRYPTO_LIB_BLAKE2S[_ARM|_X86] as it's selectable, 5.10 backport)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-24 17:10:24 +02:00
Matthew Hagan
811538ab22 ipq40xx: add support for Meraki MR74
The Meraki MR74 is part of the "Insect" series. This device is
essentially an outdoor variant of the MR33 with identical hardware, but
requiring a config@3 DTS option to be set to allow booting with the
stock u-boot.

The install procedure is replicated from the MR33, with the exception
being that the MR74 sysupgrade image must be used.

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
2022-06-19 12:31:02 +02:00
Christian Lamparter
ac2166b135 kernel: move Toshiba-TC58NVG0S3H patch to ipq40xx redux
Linux' upstream MTD-Maintainer Miquèl Raynal noted:
|Reverting seems the safest option here, not knowing how many devices
|have these damaged/counterfeit chips. If it is just a couple and only on
|Fritzboxes, as suggested in the Github issue this patch could be
|carried through OpenWrt and that would seem more future proof IMHO.

This patch follows up with the first patch. It actually
moves the patches out of target/linux/generic/pending into
the ipq40xx's patch heap and adds a little note what happend.

For more information, discussions or reports about bad TC58NVG0S3Hs,
please visit the OpenWrt's Github Issue #9962:
<https://github.com/openwrt/openwrt/issues/9962>

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-19 12:31:02 +02:00
Rui Salvaterra
fbf6992f2b kernel: bump 5.15 to 5.15.45
Patches automatically rebased.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-06-06 19:20:28 +02:00
John Audia
f800f8d6fc kernel: bump 5.10 to 5.10.120
All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800, x86/64

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-06-06 19:20:02 +02:00
Peter Adkins
b4184c666c ipq40xx: add support for Linksys WHW01 v1
This patch adds support for Linksys WHW01 v1 ("Velop") [FCC ID Q87-03331].

Specification
-------------

SOC:             Qualcomm IPQ4018
WiFi 1:          Qualcomm QCA4019 IEEE 802.11b/g/n
WiFi 2:          Qualcomm QCA4019 IEEE 802.11a/n/ac
Bluetooth:       Qualcomm CSR8811 (A12U)
Ethernet:        Qualcomm QCA8072 (2-port)
SPI Flash 1:     Mactronix MX25L1605D (2MB)
SPI Flash 2:     Winbond W25M02GV (256MB)
DRAM:            Nanya NT5CC128M16IP-DI (256MB)
LED Controller:  NXP PCA963x (I2C)
Buttons:         Single reset button (GPIO).

Notes
-----

There does not appear to be a way to trigger TFTP recovery without entering
U-Boot. The device must be opened to access the serial console in order to
first flash OpenWrt onto a device from factory.

The device has automatic recovery backed by a second set of partitions on
the larger of the two SPI flash ICs. Both the primary and secondary must
be flashed to prevent accidental rollback to "factory" after 3 failed boot
attempts.

Serial console
--------------

A serial console is available on the following pins of the populated J2
connector on the device mainboard (115200 8n1).

(<-- Top of PCB / Device)

  J2
  [o o o o o o]
       |   | |
       |   |  `-- GND
       |    `---- TX
       `--------- RX

Installation instructions
-------------------------

1. Setup TFTP server with server IP set to 192.168.1.236.
2. Copy compiled `...squashfs-factory.bin` to `nodes-jr.img` in tftp root.
3. Connect to console using pinout detailed in the serial console section.
4. Power on device and press enter when prompted to drop into U-Boot.
5. Flash first partition device via `run flashimg`.
6. Once complete, reset device and allow to power up completely.
7. Once comfortable with device upgrade reboot and drop back into U-Boot.
8. Flash the second partition (recovery) via `run flashimg2`.

Revert to "factory"
-------------------

1. Download latest firmware update from vendor support site.
2. Copy extracted `.img` file to `nodes-jr.img` in tftp root.
3. Connect to console using pinout detailed in the serial console section.
4. Power on device and press enter when prompted to drop into U-Boot.
5. Flash first partition device via `run flashimg`.
6. Once complete, reset device and allow to power up completely.
7. Once comfortable with device upgrade reboot and drop back into U-Boot.
8. Flash the second partition (recovery) via `run flashimg2`.

Link: https://github.com/openwrt/openwrt/pull/3682
Signed-off-by: Peter Adkins <peter@sunkenlab.com>
(calibration from nvmem, updated to 5.10+5.15)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-05 21:19:32 +02:00
David Bauer
b21b98627d ipq40xx: add Aruba AP-365 specific BDF
Aruba deploys a BDF in the root filesystem, however this matches the one
used for the DK04 reference board.

The board-specific BDFs are built into the kernel. The AP-365 shows
sinificant degraded performance with increased range when used with the
reference BDF.

Replace the BDF with the one extracted from Arubas kernel.

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-06-02 16:50:12 +02:00
John Thomson
602b5f6c60 ipq40xx: cut ath10k board file for mikrotik subtarget
Avoid shipping ath10k board file in Mikrotik initram images

Most will only ever need to use these initram images once—to initially
load OpenWrt, but fix these images for more consistent Wi-Fi performance
between the initram and installed squashfs images.

OpenWrt BUILDBOT config ignores -cut packages in the initram images build.
This results in BUILDBOT initram images including the linux-firmware
qca4019 board-2.bin, and (initram image booted) Mikrotik devices loading
a generic BDF, rather than the intended BDF data loaded
from NOR as an api 1 board_file.

buildbot snapshot booted as initram image:
cat /etc/openwrt_version
r19679-810eac8c7f
dmesg | grep ath10k | grep -E board\|BDF
[    9.794556] ath10k_ahb a000000.wifi: Loading BDF type 0
[    9.807192] ath10k_ahb a000000.wifi: board_file api 2 bmi_id 0:16
crc32 11892f9b
[   12.457105] ath10k_ahb a800000.wifi: Loading BDF type 0
[   12.464945] ath10k_ahb a800000.wifi: board_file api 2 bmi_id 0:17
crc32 11892f9b

CC: Robert Marko <robimarko@gmail.com>
Fixes: 5eee67a72f ("ipq40xx: mikrotik: dont include ath10k-board-qca4019 by default")

Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2022-05-27 14:15:09 +02:00
Robert Marko
5eee67a72f ipq40xx: mikrotik: dont include ath10k-board-qca4019 by default
Since MikroTik subtarget now uses dynamic BDF loading its crucial that it
doesnt include the board-2.bin at all which is provided by the
ath10k-board-qca4019 package.

So to resolve this dont include the ath10k-board-qca4019 package on the
MikroTik subtarget.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-05-19 11:07:02 +02:00
Robert Marko
ab141a6e2c ipq-wifi: remove packaged BDF-s for MikroTik devices
Since we now provide the BDF-s for MikroTik IPQ40xx devices on the fly,
there is noneed to include package and ship them like we do now.

This also resolves the performance issues that happen as MikroTik
changes the boards and ships them under the same revision but they
actually ship with and require a different BDF.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-05-19 11:07:02 +02:00
Robert Marko
4d4462cc2a ipq40xx: mikrotik: provide BDF-s on demand
Since we now can pass the API 1 BDF-s aka board.bin to the ath10k
driver per radio lets use that to provide the BDF-s for MikroTik devices.

This also resolves the performance issues that happen as MikroTik changes
the boards and ships them under the same revision but they actually ship
with and require a different BDF.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-05-19 11:07:02 +02:00
John Audia
6cdf974a3d kernel: bump 5.15 to 5.15.39
Removed upstreamed:
  backport-5.15/850-v5.17-0001-PCI-pci-bridge-emul-Add-description-for-class_revisi.patch
  backport-5.15/850-v5.17-0002-PCI-pci-bridge-emul-Add-definitions-for-missing-capa.patch
  backport-5.15/850-v5.17-0003-PCI-aardvark-Add-support-for-DEVCAP2-DEVCTL2-LNKCAP2.patch
  backport-5.15/850-v5.17-0004-PCI-aardvark-Clear-all-MSIs-at-setup.patch
  backport-5.15/850-v5.17-0005-PCI-aardvark-Comment-actions-in-driver-remove-method.patch
  backport-5.15/850-v5.17-0006-PCI-aardvark-Disable-bus-mastering-when-unbinding-dr.patch
  backport-5.15/850-v5.17-0007-PCI-aardvark-Mask-all-interrupts-when-unbinding-driv.patch
  backport-5.15/850-v5.17-0008-PCI-aardvark-Fix-memory-leak-in-driver-unbind.patch
  backport-5.15/850-v5.17-0009-PCI-aardvark-Assert-PERST-when-unbinding-driver.patch
  backport-5.15/850-v5.17-0010-PCI-aardvark-Disable-link-training-when-unbinding-dr.patch
  backport-5.15/850-v5.17-0011-PCI-aardvark-Disable-common-PHY-when-unbinding-drive.patch
  pending-5.15/850-0001-PCI-aardvark-Replace-custom-PCIE_CORE_INT_-macros-wi.patch
  pending-5.15/850-0004-PCI-aardvark-Rewrite-IRQ-code-to-chained-IRQ-handler.patch
  pending-5.15/850-0005-PCI-aardvark-Check-return-value-of-generic_handle_do.patch
  pending-5.15/850-0006-PCI-aardvark-Make-MSI-irq_chip-structures-static-dri.patch
  pending-5.15/850-0007-PCI-aardvark-Make-msi_domain_info-structure-a-static.patch
  pending-5.15/850-0008-PCI-aardvark-Use-dev_fwnode-instead-of-of_node_to_fw.patch
  pending-5.15/850-0009-PCI-aardvark-Refactor-unmasking-summary-MSI-interrup.patch
  pending-5.15/850-0010-PCI-aardvark-Add-support-for-masking-MSI-interrupts.patch
  pending-5.15/850-0011-PCI-aardvark-Fix-setting-MSI-address.patc
  pending-5.15/850-0012-PCI-aardvark-Enable-MSI-X-support.patch
  pending-5.15/850-0013-PCI-aardvark-Add-support-for-ERR-interrupt-on-emulat.patch
  pending-5.15/850-0015-PCI-aardvark-Optimize-writing-PCI_EXP_RTCTL_PMEIE-an.patch
  pending-5.15/850-0016-PCI-aardvark-Add-support-for-PME-interrupts.patch
  pending-5.15/850-0017-PCI-aardvark-Fix-support-for-PME-requester-on-emulat.patch
  pending-5.15/850-0018-PCI-aardvark-Use-separate-INTA-interrupt-for-emulate.patch
  pending-5.15/850-0019-PCI-aardvark-Remove-irq_mask_ack-callback-for-INTx-i.patch
  pending-5.15/850-0020-PCI-aardvark-Don-t-mask-irq-when-mapping.patch
  pending-5.15/850-0021-PCI-aardvark-Drop-__maybe_unused-from-advk_pcie_disa.patch
  pending-5.15/850-0022-PCI-aardvark-Update-comment-about-link-going-down-af.patch

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-05-16 20:26:38 +02:00
John Audia
b754b0c721 kernel: bump 5.10 to 5.10.115
Removed upstreamed:
  backport-5.10/850-v5.17-0004-PCI-aardvark-Clear-all-MSIs-at-setup.patch
  pending-5.10/850-0002-PCI-aardvark-Fix-reading-MSI-interrupt-number.patch

All other patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-05-16 20:26:38 +02:00
Andreas Böhler
f167f4a9a4 IPQ4019: AVM FRITZ!Box 7530: Remove NAND ECC restrictions from DTS
Some revisions of the FRITZ!7530 use a Toshiba NAND with 8 bit ECC in
contrast to the Macronix NAND with 4 bit ECC. This removes the hardcoded
ECC strength and step size as set in qcom-ipq4019.dtsi, thus relying on the
kernel NAND detection routines to correclty set up the ECC parameters.

Signed-off-by: Andreas Böhler <dev@aboehler.at>
2022-05-15 16:35:00 +02:00
Pawel Dembicki
af425e4221 ipq40xx: revert Cell-C RTL30VW to legacy caldata extraction
This partially reverts
commit cfc13c4459 ("ipq40xx: utilize nvmem-cells for macs & (pre-)calibration data").

After switching to nvmem RTL30VW, wifi was broken:

[   19.118319] ath10k_ahb a000000.wifi: qca4019 hw1.0 target 0x01000000 chip_id 0x003b00ff sub 0000:0000
[   19.118377] ath10k_ahb a000000.wifi: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[   19.130285] ath10k_ahb a000000.wifi: firmware ver 10.4b-ct-4019-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 crc32 6b2b5c5b
[   19.159092] ath10k_ahb a000000.wifi: failed to fetch board data for bus=ahb,vendor=0000,device=0000,subsystem-vendor=0000,subsystem-device=0000,variant=cellc,rtl30vw from ath10k/QCA4019/hw1.0/board-2.bin
[   19.238764] ath10k_ahb a000000.wifi: failed to fetch board-2.bin or board.bin from ath10k/QCA4019/hw1.0
[   19.238847] ath10k_ahb a000000.wifi: failed to fetch board file: -12
[   19.247362] ath10k_ahb a000000.wifi: could not probe fw (-12)
[   20.190797] ath10k_ahb a800000.wifi: qca4019 hw1.0 target 0x01000000 chip_id 0x003b00ff sub 0000:0000
[   20.190853] ath10k_ahb a800000.wifi: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[   20.202893] ath10k_ahb a800000.wifi: firmware ver 10.4b-ct-4019-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 crc32 6b2b5c5b
[   20.231357] ath10k_ahb a800000.wifi: failed to fetch board data for bus=ahb,vendor=0000,device=0000,subsystem-vendor=0000,subsystem-device=0000,variant=cellc,rtl30vw from ath10k/QCA4019/hw1.0/board-2.bin
[   20.317318] ath10k_ahb a800000.wifi: failed to fetch board-2.bin or board.bin from ath10k/QCA4019/hw1.0
[   20.317399] ath10k_ahb a800000.wifi: failed to fetch board file: -12
[   20.326098] ath10k_ahb a800000.wifi: could not probe fw (-12)

Bootloader mangles in NAND partitions and removes precal@X nodes in
working system:

root@OpenWrt:~# echo $(cat /sys/firmware/devicetree/base/soc/spi@78b5000/flash@0/partitions/partition@170000/label)
0:ART
root@OpenWrt:~# ls /sys/firmware/devicetree/base/soc/spi@78b5000/flash@0/partitions/partition@170000/
label  name   reg

Revert to legacy method fixed the problem.

Fixes: cfc13c4459 ("ipq40xx: utilize nvmem-cells for macs & (pre-)calibration data")
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2022-05-15 16:32:25 +02:00
Christian Lamparter
91fa4826b9 ipq-wifi: drop upstreamed board-2.bin
The BDFs for the:
	Aruba AP-303
	ASUS RT-AC42U
	AVM FRITZ!Repeater 1200
	Buffalo WTR-M2133HP
	Cell C RTL30VW
	D-Link DAP-2610
	EnGenius EAP2200
	EnGenius EMD1
	EnGenius EMR3500
	EnGenius EMR5000
	EZVIZ CS-W3-WD1200G EUP
	Google Wifi
	Linksys MR8300 V1.0
	Luma WRTQ-329ACN
	MobiPromo CM520-79F
	NEC Platforms WG2600HP3
	Plasma Cloud PA1200 (updated version)
	Plasma Cloud PA2200
	ZTE MF286D

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

Furthermore the BDFs for the:
	8devices Habanero
	OpenMesh A62
	OpenMesh A42
	AVM FRITZ!Box 4040

have been updated.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-05-14 11:08:45 +02:00
Christian Lamparter
834c9b3f05 ipq40xx: Lyra: update RGB LED-Controller node for 5.10+
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>

Note:

There is only a single extremely bright RGB-LED.
The RGB-color channels (i.e.: blue-0, blue-1 and blue-2)
are running in parallel to increase the current delivery
beyond what a single PWM-output on the LED controller
could do.

BugLink: https://github.com/openwrt/openwrt/issues/9851
Reported-By: Thomas Bøge <thomas@boegenielsen.dk>
Tested-By: Thomas Bøge <thomas@boegenielsen.dk>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-05-14 11:08:45 +02:00
Rui Salvaterra
c3569a70c6 kernel: bump 5.15 to 5.15.36
Patches automatically rebased.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-05-09 20:49:50 +01:00
Sungbo Eo
cb1dc49c18 ipq40xx: consolidate ar40xx driver files
Commit f4fb63d2ab ("ipq40xx: 5.10: move AR40xx to MDIO drivers") moved
the ar40xx driver files to kernel version specific directories to place
them in different subdirectory in kernel tree. But now kernel 5.4 is
gone and there is no reason to keep them separate. Move them back to
common files/ directory.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2022-05-05 09:19:00 +09:00
Nick Hainke
1526ccebd4 ipq40xx: 5.15: fix ar40xx driver
Also apply commit ab7e53e5cc ("ipq40xx: 5.10: fix ar40xx driver") to
5.15 driver.

The commit fixes the data corruption on TX packets. Packets are
transmitted, but their contents are replaced with zeros. This error is
caused by the lack of guard (50 ms) intervals between calibration phases.
This error is treated by adding mdelay(50) to the calibration function
code. In the original qca-ssda code, these mdelays were existing, but in
the ar41xx.c they are gone.

Fixes: 87318eb179 ("ipq40xx: 5:15: copy config and patch from 5.10")

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-05-05 09:19:00 +09:00
Sungbo Eo
daee22c7c0 ipq40xx: 5.15: refresh subtarget config
Update config with `make kernel_oldconfig CONFIG_TARGET=subtarget`.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2022-05-01 13:40:13 +09:00
Robert Marko
376834a743 ipq40xx: 5.15: refresh config
Refresh 5.15 kernel config for IPQ40xx due to large number of generic
config changes.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-05-01 13:40:13 +09:00
Robert Marko
2114b22ef3 ipq40xx: 5.15: drop upstreamed sleep clock patch
Patch that corrects sleep clock frequency has already been backported
to 5.15 stable so remove the duplicate patch.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-05-01 13:40:13 +09:00
Ansuel Smith
17b7756b5a ipq40xx: 5.15: add testing kernel version
Add 5.15 kernel as a testing kernel version in the Makefile.

Linksys EA6350v3/EA8300/MR8300 will not build with buildbot settings and
should be disabled when the target is switched, unless the image size is
reduced again.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Reviewed-by: Robert Marko <robert.marko@sartura.hr>
[add comment for increased kernel size]
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2022-05-01 13:40:13 +09:00
Ansuel Smith
7517955eac ipq40xx: 5.15: refresh kernel patches
Refresh kernel patches.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Reviewed-by: Robert Marko <robert.marko@sartura.hr>
2022-05-01 13:40:13 +09:00
Ansuel Smith
7c692f685b ipq40xx: refresh ess driver and phy with new api
Kernel 5.15 have some new api for ethtool and phy.
Add ifdef to fix compilation error.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Reviewed-by: Robert Marko <robert.marko@sartura.hr>
2022-05-01 13:40:13 +09:00
Ansuel Smith
7a72fcc1c5 ipq40xx: fix wrong nand definition for wpj419
Fix wrong nand definition for wpj419 that differ from the upstream
node name.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-05-01 13:40:13 +09:00
Ansuel Smith
07ddbb9961 ipq40xx: 5:15: refresh config
Refresh config for kernel 5.15 using make kernel_menuconfig

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-05-01 13:40:13 +09:00
Ansuel Smith
29e177e4ee ipq40xx: 5:15: refresh patches
- Drop upstream patch
- Refresh dts patch

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-05-01 13:40:13 +09:00
Ansuel Smith
87318eb179 ipq40xx: 5:15: copy config and patch from 5.10
Copy config and patch from 5.10 to 5.15

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-05-01 13:40:13 +09:00
Nick Hainke
ab7e53e5cc ipq40xx: 5.10: fix ar40xx driver
This commit is completely based on the work of adron-s:
https://github.com/openwrt/openwrt/pull/4721#issuecomment-1101108651

The commit fixes the data corruption on TX packets. Packets are
transmitted, but their contents are replaced with zeros. This error is
caused by the lack of guard (50 ms) intervals between calibration phases.
This error is treated by adding mdelay(50) to the calibration function
code. In the original qca-ssda code [0], these mdelays were existing, but
in the ar41xx.c they are gone.

Tested on:
- Fritz!Box 4040
- Fritz!Box 7530
- Mikrotik SXTsq 5AC
- ZyXEL NBG6617

- [0] https://git.codelinaro.org/clo/qsdk/oss/lklm/qca-ssdk/-/blob/NHSS.QSDK.11.4/src/init/ssdk_init.c#L2072

Suggested-by: Serhii Serhieiev <adron@mstnt.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-04-29 00:27:25 +02:00
John Audia
b92ec82235 kernel: bump 5.10 to 5.10.110
Removed upstreamed:
  generic/backport-5.10/350-v5.18-MIPS-pgalloc-fix-memory-leak-caused-by-pgd_free.patch
  generic/pending-5.10/850-0014-PCI-aardvark-Fix-reading-PCI_EXP_RTSTA_PME-bit-on-em.patch
  ipq40xx/patches-5.10/105-ipq40xx-fix-sleep-clock.patch

All patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, mt7622/RT3200
Run-tested: bcm2711/RPi4B, mt7622/RT3200
Compile-/run-tested: ath79/generic (Archer C7 v2).

Signed-off-by: John Audia <graysky@archlinux.us>
2022-04-09 19:31:46 +02:00
Ray Wang
3204906569 ipq40xx: add RT-AC2200 alternative name to RT-AC42U/RT-ACRH17
RT-AC2200 is the same device with a different name. The OEM firmwares have the same MD5.

Signed-off-by: Ray Wang <raywang777@foxmail.com>
2022-04-09 19:31:46 +02:00
Petr Štetiar
39d28b84f1 Revert "ipq40xx: stop chromium sub-target builds on the buildbots"
This reverts commit 35d2bbc29b as we
believe we found that it is indeed an openssl issue, where openssl is
trying to use getrandom(2), but fails because this particular builder
has an ancient kernel without that syscall. We didn't get to the bottom
of why openssl doesn't fall back to something like /dev/random.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-04-01 07:41:01 +02:00
John Audia
c41da167d2 kernel: bump 5.10 to 5.10.109
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 <graysky@archlinux.us>
2022-03-30 18:33:38 +02:00
Christian Lamparter
35d2bbc29b ipq40xx: stop chromium sub-target builds on the buildbots
the buildbots are having troubles with the image.
They seem to get "Killed" at the last step of the KERNEL rule:

|/cros-vbutil -k zImage.itb.vboot -c "root=PARTUUID=%U/PARTNROFF=1" -o zImage.itb.vboot.new
|make[4]: *** [Makefile:18: zImage.itb.vboot] Killed

Since the Google Wifi (Gale) is currently the only target in
this sub-target. So this means that subtarget has to be disabled
from the time being to not be picked up by the builders.

For people wanting to checkout out OpenWrt on the Google Wifi:
please compile it locally.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-03-27 15:39:27 +02:00
Christian Lamparter
026fda10a5 ipq40xx: WAC510: device-tree overhauling
removes usb-port remains as neither the WAC510 nor the WAC505
come with a USB port. Update the LED properties to phase out
labels and introduce generic node-names as well as adding
the color, function and function-enumerator properties.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-03-26 02:02:44 +01:00
张 鹏
bdc786e82c ipq40xx: update E2600AC c1/c2 board
Modified the radio frequency hardware part of e2600ac c1/c2,
need to cooperate with the modified board.bin file, the device
can work normally.

Signed-off-by: 张 鹏 <sd20@qxwlan.com>
2022-03-25 18:14:13 +01:00
Andre Heider
cb6f4be137 ipq40xx: add support for FRITZ!Box 7520
This model, also know as "1&1 HomeServer", shares the same features as 7530.

The vendor firmware has artificial software limitations: only 2 of the 4
LAN-Ports are GBit, and the USB-Host is only v2.0.

With OpenWrt, USB is already working at v3.0.

Signed-off-by: Andre Heider <a.heider@gmail.com>
(updated commit message to reflect current state)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-03-25 18:14:13 +01:00
Brian Norris
f1c041e34f ipq40xx: Add subtarget for Google WiFi (Gale)
Google WiFi (codename: Gale) is an IPQ4019-based AP, with 2 Ethernet
ports, 2x2 2.4+5GHz WiFi, 512 MB RAM, 4 GB eMMC, and a USB type C port.
In its stock configuration, it runs a Chromium OS-based system, but you
wouldn't know it, since you can only manage it via a "cloud" +
mobile-app system.

The "v2" label is coded into the bootloader, which prefers the
"google,gale-v2" compatible string. I believe "v1" must have been
pre-release hardware.

Note: this is *not* the Google Nest WiFi, released in 2019.

I include "factory.bin" support, where we generate a GPT-based disk
image with 2 partitions -- a kernel partition (using the custom "Chrome
OS kernel" GUID type) and a root filesystem partition. See below for
flashing instructions.

Sysupgrade is supported via recent emmc_do_upgrade() helper.

This is a subtarget because it enables different features
(FEATURES=boot-part rootfs-part) whose configurations don't make sense
in the "generic" target, and because it builds in a few USB drivers,
which are necessary for installation (installation is performed by
booting from USB storage, and so these drivers cannot be built as
modules, since we need to load modules from USB storage).

Flashing instructions
=====================

Documented here:
https://openwrt.org/inbox/toh/google/google_wifi

Note this requires booting from USB storage.

Features
========

I've tested:

 * Ethernet, both WAN and LAN ports
 * eMMC
 * USB-C (hub, power-delivery, peripherals)
 * LED0 (R/G/B)
 * WiFi (limited testing)
 * SPI flash
 * Serial console: once in developer mode, console can be accessed via
   the USB-C port with SuzyQable, or other similar "Closed Case
   Debugging" tools:
     https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/master/docs/ccd.md#suzyq-suzyqable
 * Sysupgrade

Not tested:

 * TPM

Known not working:

 * Reboot: this requires some additional TrustZone / SCM
   configuration to disable Qualcomm's SDI. I have a proposal upstream,
   and based on IRC chats, this might be acceptable with additional DT
   logic:
     [RFC PATCH] firmware: qcom_scm: disable SDI at boot
     https://lore.kernel.org/linux-arm-msm/20200721080054.2803881-1-computersforpeace@gmail.com/
 * SMP: enabling secondary CPUs doesn't currently work using the stock
   bootloader, as the qcom_scm driver assumes newer features than this
   TrustZone firmware has. I posted notes here:
     [RFC] qcom_scm: IPQ4019 firmware does not support atomic API?
     https://lore.kernel.org/linux-arm-msm/20200913201608.GA3162100@bDebian/
 * There's a single external button, and a few useful internal GPIO
   switches. I haven't hooked them up.

The first two are fixed with subsequent commits.

Additional notes
================

Much of the DTS is pulled from the Chrome OS kernel 3.18 branch, which
the manufacturer image uses.

Note: the manufacturer bootloader knows how to patch in calibration data
via the wifi{0,1} aliases in the DTB, so while these properties aren't
present in the DTS, they are available at runtime:

  # ls -l
/sys/firmware/devicetree/base/soc/wifi@a*/qcom,ath10k-pre-calibration-data
  -r--r--r--    1 root     root         12064 Jul 15 19:11 /sys/firmware/devicetree/base/soc/wifi@a000000/qcom,ath10k-pre-calibration-data
  -r--r--r--    1 root     root         12064 Jul 15 19:11 /sys/firmware/devicetree/base/soc/wifi@a800000/qcom,ath10k-pre-calibration-data

Ethernet MAC addresses are similarly patched in via the ethernet{0,1} aliases.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
(updated 901 - x1pro moved in the process)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-03-25 18:14:13 +01:00
Brian Norris
26af098e0e ipq40xx: qcom_scm: Fix cold boot address command
See my upstream questions:
https://lore.kernel.org/linux-arm-msm/20200913201608.GA3162100@bDebian/

This effectively reverts upstream Linux commit 13e77747800e ("firmware:
qcom: scm: Use atomic SCM for cold boot"), because Google WiFi boot
firmwares don't support the atomic variant.

This fixes SMP support for Google WiFi.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2022-03-25 18:14:13 +01:00
Brian Norris
a93ec36630 ipq40xx: qcom_scm: Disable SDI at boot
See my upstream RFC of this:
https://lore.kernel.org/linux-arm-msm/20200721080054.2803881-1-computersforpeace@gmail.com/

This fixes warm boot (reboot) for Google WiFi devices using their
factory bootloader/firmware.

I may resend this upstream eventually.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2022-03-25 18:14:13 +01:00
Brian Norris
17b05045bd ipq40xx: Support Chromium OS image-type creation
See firmware-utils.git commits [1], which implemented the cros-vbutil
verified-boot payload-packing tool, and extended ptgen for the CrOS
kernel partition type. With these, it's now possible to package kernel +
rootfs to make disk images that can boot a Chrome OS-based system (e.g.,
Chromebooks, or even a few AP models).

Regarding PARTUUID= changes: Chromium bootloaders work well with a
partition number offset (i.e., relative to the kernel partition), so
we'll be using a slightly different root UUID line.

NB: I've made this support specific to ip40xx for now, because I only
plan to support an IPQ4019-based AP that uses a Chromium-based
bootloader, but this image format can be used for essentially any
Chromebook, as well as the Google OnHub, a prior Chromium-based AP using
an IPQ8064 chipset.

[1]
ptgen: add Chromium OS kernel partition support
https://git.openwrt.org/?p=project/firmware-utils.git;a=commit;h=6c95945b5de973026dc6f52eb088d0943efa96bb

cros-vbutil: add Chrome OS vboot kernel-signing utility
https://git.openwrt.org/?p=project/firmware-utils.git;a=commit;h=8e7274e02fdc6f2cb61b415d6e5b2e1c7e977aa1

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2022-03-25 18:14:13 +01:00
Christian Lamparter
4ce52de450 ipq40xx: disable non-building tel(co Electronics) x1pro
Tel(co Electronics) X1 Pro is preventing ipq40xx generic
from building due to the KERNEL_SIZE.

Whenever bigger kernels are possible, if lzma is supported
is unknown.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-03-25 18:14:13 +01:00
Nicholas Smith
7ea2f3d6e2 ipq40xx: add support for Telco X1 Pro
Telco X1 Pro is a Cat12 LTE-A Pro modem router.
Vendor firmware is based on a recent version of OpenWrt.
Flashing is possible via CLI using sysupgrade -F -n
The serial headers allow bootloader and console access
Serial setting: 115200  8N1

Brief Specifications:
IPQ4019 SoC
32MB flash
512MB RAM
4x gigabit LAN
1x gigabit WAN
Dual-band Wave-2 wifi
2x SMA LTE antenna connectors
2x RP-SMA wifi antennas
1x USB 2.0 port
1x Reset button
Serial headers installed
1x Nano SIM tray
1x Quectel EM-12G LTE-A Pro modem
1x M.2 slot attached to USB 3.0
1x internal micro SD card slot

Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
2022-03-19 20:05:00 +01:00
Rui Salvaterra
72d2c54ccb kernel: 5.10: allocate last level PTEs in high memory
Enable support for allocating user space page table entries in high memory [1],
for the targets which support this feature. This saves precious low memory
(permanently mapped, the only type of memory directly accessible by the kernel).

[1] https://www.kernel.org/doc/html/latest/vm/highmem.html

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-03-01 22:57:34 +00:00
John Audia
a2d4b5711a kernel: bump 5.10 to 5.10.101
Removed upstreamed:
  pending-5.10/841-USB-serial-option-add-ZTE-MF286D-modem.patch[1]
  bcm27xx/950-0592-drm-vc4-Allow-DBLCLK-modes-even-if-horz-timing-is-od.patch[2]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.101&id=7113440a36c741efd7c76e3d70b3634100120cdb
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.101&id=21c890ca8eaecea06cabb92be2a53a6f26f56383

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

Signed-off-by: John Audia <graysky@archlinux.us>
2022-03-01 21:38:36 +01:00
Robert Marko
c1e06a0cbb ipq40xx: mikrotik: fix LED script
Fix the missing ;; after the cAP ac case in /e/b/01_leds.

Fixes: 93d9119 ("ipq40xx: add MikroTik cAP ac support")
Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (minor touch-up)
2022-02-20 14:24:43 +01:00
Christian Lamparter
80d34d9d59 ipq40xx: document pcie wifi chip on the GL.Inet GL-B2200
Enrico provided a bootlog that shows the chip is a WAVE-2 QCA9888v2:

> pci 0000:01:00.0: [168c:0056] type 00 class 0x028000
> [...]
> ath10k 5.15 driver, optimized for CT firmware, probing pci device: 0x56.
> ath10k_pci 0000:01:00.0: qca9888 hw2.0 target 0x01000000 [...] chip_id 0x00000000 sub 0000:0000
> ath10k_pci 0000:01:00.0: firmware ver 10.4b-ct-9888-fW-13-5ae337bb1 api 5  features mfp,[...]
> ath10k_pci 0000:01:00.0: board_file api 2 bmi_id N/A crc32 6535d835
> ath10k_pci 0000:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal file max-sta 32 raw 0 hwcrypto 1

this patch switches the device over to pre-calibration.
(this is more or less cosmetic)

Reported-by: Enrico Mioso <mrkiko.rs@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-02-19 18:29:42 +01:00
Enrico Mioso
7270c9f8f6 ipq40xx: limit available radio channels for GL.iNet GL-B2200
The PCIe and built-in 5GHZ radios are meant to operate on different
frequency bands. The hardware enforces this via RF filters.
Add this information to allow software enforcing it as well.
Credits to Piotr Dymacz for the invaluable help.

Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
2022-02-19 18:29:42 +01:00
John Audia
c391dcdf86 kernel: bump 5.10 to 5.10.100
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 <graysky@archlinux.us>
2022-02-11 23:17:40 +01:00
Julien Cassette
2c1f8a665e ipq40xx: add Linksys MR8300 WAN port
This makes the WAN interface and port appear in
LuCi -> Network -> Switch on Linksys MR8300.
This allows to configure a VLAN on WAN.

Fixes: FS#4227

Signed-off-by: Julien Cassette <julien.cassette@gmail.com>
2022-02-05 00:44:35 +01:00
Pawel Dembicki
a91ab8bc05 ipq40xx: add support for ZTE MF286D
ZTE MF286D is a LTE router with four gigabit ethernet ports
and integrated QMI mPCIE modem.

Hardware specification:

  - CPU: IPQ4019
  - RAM: 256MB
  - Flash: NAND 128MB + NOR 2MB
  - WLAN1:  Qualcomm Atheros QCA4019 2.4GHz 802.11bgn 2x2:2
  - WLAN2:  Qualcomm Atheros QCA4019 5GHz 802.11anac 2x2:2
  - LTE: mPCIe cat 12 card (Modem chipset MDM9250)
  - LAN: 4 Gigabit Ports
  - USB: 1x USB2.0 (regular port). 1x USB3.0 (mpcie - used by the modem)
  - Serial console: X8 connector 115200 8n1

Known issues:

  - Many LEDs are driven by the modem. Only internal LEDs and wifi LEDs
    are driven by cpu.
  - Wifi LED is triggered by phy0tpt only
  - No VoIP support
  - LAN1/WAN port is configured as WAN
  - ZTE gives only one MAC per device. Use +1/+2/+3 increment for WAN
    and WLAN0/1

Opening the case:

1. Take of battery lid (no battery support for this model, battery cage
   is dummy).
2. Unscrew screw placed behind battery lid.
3. Take off back cover. It attached with multiple plastic clamps.
4. Unscrew four more screws hidden behind back case.
5. Remove front panel from blue chassis. There are more plastic
   clamps.
6. Unscrew two boards, which secures the PCB in the chassis.
7. Extract board from blue chassis.

Console connection (X8 connector):

1. Parameters: 115200 8N1
2. Pin description: (from closest pin to X8 descriptor to farthest)
    - VCC (3.3V)
    - TX
    - RX
    - GND

Install Instructions:

Serial + initramfs:
1. Place OpenWrt initramfs image for the device on a TFTP in
   the server's root. This example uses Server IP: 192.168.1.3
2. Connect serial console (115200,8n1) to X8 connector.
3. Connect TFTP server to RJ-45 port.
4. Stop in u-Boot and run u-Boot commands:
	setenv serverip 192.168.1.3
	setenv ipaddr 192.168.1.72
	set fdt_high 0x85000000
	tftp openwrt-ipq40xx-generic-zte_mf286d-initramfs-fit-zImage.itb
	bootm $loadaddr
5. Please make backup of original partitions, if you think about revert
   to stock.
6. Login via ssh or serial and remove stock partitions:
	ubiattach -m 9
	ubirmvol /dev/ubi0 -N ubi_rootfs
	ubirmvol /dev/ubi0 -N ubi_rootfs_data
7. Install image via "sysupgrade -n".

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
(cosmetic changes to the commit message)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-02-05 00:44:35 +01:00
Rui Salvaterra
1343acc8cd kernel: bump 5.10 to 5.10.94
Deleted (upstreamed):
bcm27xx/patches-5.10/950-0669-drm-vc4-hdmi-Make-sure-the-device-is-powered-with-CE.patch [1]
bcm27xx/patches-5.10/950-0672-drm-vc4-hdmi-Move-initial-register-read-after-pm_run.patch [1]
gemini/patches-5.10/0003-ARM-dts-gemini-NAS4220-B-fis-index-block-with-128-Ki.patch [2]

Manually rebased:
bcm27xx/patches-5.10/950-0675-drm-vc4-hdmi-Drop-devm-interrupt-handler-for-CEC-int.patch

Manually reverted:
generic/pending-5.10/860-Revert-ASoC-mediatek-Check-for-error-clk-pointer.patch [3]

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.94&id=55b10b88ac8654fc2f31518aa349a2e643b37f18
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.94&id=958a8819d41420d7a74ed922a09cacc0ba3a4218
[3] https://lore.kernel.org/all/trinity-2a727d96-0335-4d03-8f30-e22a0e10112d-1643363480085@3c-app-gmx-bap33/

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-02-01 23:34:07 +00:00
Alar Aun
70eedac9b3 ipq40xx: add MikroTik cAP ac support
This adds support for the MikroTik RouterBOARD RBcAPGi-5acD2nD
(cAP ac), a  indoor dual band, dual-radio 802.11ac wireless AP, two
10/100/1000 Mbps Ethernet ports.

See https://mikrotik.com/product/cap_ac for more info.

Specifications:
 - SoC: Qualcomm Atheros IPQ4018
 - RAM: 128 MB
 - Storage: 16 MB NOR
 - Wireless:
   · Built-in IPQ4018 (SoC) 802.11b/g/n 2x2:2, 2.5 dBi antennae
   · Built-in IPQ4018 (SoC) 802.11a/n/ac 2x2:2, 2.5 dBi antennae
 - Ethernet: Built-in IPQ4018 (SoC, QCA8075) , 2x 1000/100/10 port,
   PoE in and passive PoE out

Unsupported:
 - PoE out

Installation:
Boot the initramfs image via TFTP and then flash the sysupgrade
image using "sysupgrade -n"

Signed-off-by: Alar Aun <alar.aun@gmail.com>
2022-02-01 23:18:58 +01:00
Sungbo Eo
81a561b4a6 kernel: move bootargs-append patch to generic
This moves bootargs-append support patch from ipq40xx and ipq806x to
generic. This way we can append additional boot arguments from DTS instead
of only being able to overwrite them.

This is a preparation for kirkwood support of ipTIME NAS1.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2022-01-29 23:50:28 +09:00
Robert Marko
b8ef54f5da ipq40xx: drop 5.4 kernel
Since 5.10 is now default, no point in keeping
5.4 around.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2022-01-24 12:07:42 +01:00
Sungbo Eo
266b5c83c3 ipq40xx: rename RT-AC42U WLAN/LAN LEDs
Assign LED numbers properly by adding function-enumerator property in DTS.

While at it, remove default trigger of LAN LEDs as it will be handled in
01_leds anyway.

Fixes: 51b9aef553 ("ipq40xx: add support for ASUS RT-ACRH17/RT-AC42U")
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2022-01-17 20:38:43 +09:00
Sungbo Eo
e257405c1b ipq40xx: image: remove unused DTB_SIZE variable
It is not included in DEVICE_VARS anyways.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2022-01-17 20:38:43 +09:00
Christian Lamparter
0a852d8a5e ipq40xx: AP-365: fix non-existent node or label "macaddr_mfginfo_1d"
Chen Minqiang reported on github:
|  DTC     arch/arm/boot/dts/qcom-ipq4029-ap-365.dtb
|qcom-ipq4019.dtsi:520.23-560.5: ERROR (phandle_references): /soc/wifi@a000000:
|Reference to non-existent node or label "macaddr_mfginfo_1d"
|
|  also defined at qcom-ipq4029-aruba-glenmorangie.dtsi:243.8-248.3
|qcom-ipq4019.dtsi:562.23-602.5: ERROR (phandle_references): /soc/wifi@a800000:
|Reference to non-existent node or label "macaddr_mfginfo_1d"
|
|  also defined at qcom-ipq4029-aruba-glenmorangie.dtsi:250.8-256.3
|ERROR: Input tree has errors, aborting (use -f to force output)
|scripts/Makefile.lib:326: recipe for target 'qcom-ipq4029-ap-365.dtb' failed

Fixes: cfc13c4459 ("ipq40xx: utilize nvmem-cells for macs & (pre-)calibration data")
Reported-by: Chen Minqiang <ptpt52@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-01-16 13:14:58 +01:00
Christian Lamparter
cfc13c4459 ipq40xx: utilize nvmem-cells for macs & (pre-)calibration data
moves extraction entries out of 11-ath10k-caldata and into
the individual board's device-tree.

Some notes:
 - mmc could work as well (not tested)
 - devices that pass the partitions via mtdparts
   bootargs are kept as is
 - gl-b2200 has a weird pcie wifi device
   (vendor claims 9886 wave 2. But firmware-extraction
   was for a wave 1 device?!)

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-01-15 17:26:55 +01:00
Christian Lamparter
10bc55c496 ipq40xx: add RT-ACRH13 alternative name to RT-AC58U
RT-ACRH13 is another name this device was sold as (US?).

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-01-15 17:26:55 +01:00
Joshua Roys
51b9aef553 ipq40xx: add support for ASUS RT-ACRH17/RT-AC42U
SOC:	IPQ4019
CPU:	Quad-core ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
DRAM:	256 MB
NAND:	128 MiB Macronix MX30LF1G18AC
ETH:	Qualcomm Atheros QCA8075 Gigabit Switch (4x LAN, 1x WAN)
USB:	1x 3.0 (via Synopsys DesignWare DWC3 controller in the SoC)
WLAN1:	Qualcomm Atheros QCA4019 2.4GHz 802.11bgn 2x2:2
WLAN2:	Qualcomm Atheros QCA9984 5GHz 802.11nac 4x4:4
INPUT:	1x WPS, 1x Reset
LEDS:	Status, WIFI1, WIFI2, WAN (red & blue), 4x LAN

This board is very similar to the RT-ACRH13/RT-AC58U. It must be flashed
with an intermediary initramfs image, the jffs2 ubi volume deleted, and
then finally a sysupgrade with the final image performed.

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
(added ALT0)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-01-15 17:21:01 +01:00
Oskari Lemmela
8441a622ec mikrotik: enable variable size erase
Add support for variable size erase blocks.
Enable it to all targets which has mikrotik targets.

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
2022-01-13 09:33:29 +01:00
John Audia
7bf62e2451 kernel: bump 5.4 to 5.4.169
All patches automatically rebased.

Build system: x86_64
Build-tested: ramips/mt7621*

*Had to revert 7f1edbd in order to build due to FS#4149

Signed-off-by: John Audia <graysky@archlinux.us>
2022-01-03 01:00:03 +01:00
Sergey Ryazanov
fa3690f8f1 kernel: 5.10: consolidate mac80211 crypto options
Each of
- CRYPTO_AEAD2
- CRYPTO_AEAD
- CRYPTO_GF128MUL
- CRYPTO_GHASH
- CRYPTO_HASH2
- CRYPTO_HASH
- CRYPTO_MANAGER2
- CRYPTO_MANAGER
- CRYPTO_NULL2

either directly required for mac80211 crypto support, or directly
selected by such options. Support for the mac80211 crypto was enabled in
the generic config since c7182123b9 ("kernel: make cryptoapi support
needed by mac80211 built-in"). So move the above options from the target
configs to the generic config to make it clear why do we need them.

CC: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
2021-12-17 16:16:34 +01:00
Sergey Ryazanov
b61ab8f57e kernel: filter out both Clang and LLD versions
Both CLANG_VERSION and LLD_VERISON are autogenerated runtime
configuration options, so add them to the kernel configuration filter
and remove from generic and per-target configs to keep configs clean.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
2021-12-17 16:16:34 +01:00
Felix Fietkau
01bebc070c kernel: backport the upstream implementation of threaded NAPI to 5.4
The workqueue based implementation has a few corner cases and typically lower
performance than the upstream one

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-12-15 20:36:22 +01:00
John Audia
6c945fa379 kernel: bump 5.10 to 5.10.83
Removed upstreamed:
    bcm53xx/patches-5.10/033-v5.16-0024-ARM-dts-BCM5301X-Fix-I2C-controller-interrupt.patch[1]
    bcm53xx/patches-5.10/033-v5.16-0025-ARM-dts-BCM5301X-Add-interrupt-properties-to-GPIO-no.patch[2]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.83&id=b2cd6fdcbe0a5cb44e4610a08cc58261d494a885
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.83&id=9db1d4a3c2700e1cc84c3d61199411d75c2a3ec6

Build system: x86_64*
Build-tested: bcm2711/RPi4B, ipq806x/R7800†
Run-tested: bcm2711/RPi4B, ipq806x/R7800†

* Had to revert 7c99085bd6 in order to build
  (latest bump of ca-certificates)

† Had to revert 7f1edbd412 in order to build
  (binutils 2.37, https://bugs.openwrt.org/index.php?do=details&task_id=4149)

Signed-off-by: John Audia <graysky@archlinux.us>
2021-12-12 21:11:30 +01:00
Enrico Mioso
a725bdc700 ipq40xx: fix reset button GPIO for GL.iNet GL-B2200
GL.iNet's U-Boot checks for GPIO 40, not 43.
Changing this allows the RESET button to work as expected.

Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
CC: Daniel Golle <daniel@makrotopia.org>
CC: Li Zhang <li.zhang@gl-inet.com>
2021-12-12 19:14:16 +00:00
Christian Lamparter
d641a60478 ipq40xx: nvmem cells for EZVIZ CS-W3-WD1200G EUP
introduce nvmem pre-cal + mac-address cells for both Wifis
and ethernet on the EZVIZ CS-W3-WD1200G EUP. This is one of
the few devices in which the correct mac adress is already
at the right place for Wifi, so no separate nvmem cell is
needed.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-12-04 00:36:47 +01:00
Christian Lamparter
45eb57f12f ipq40xx: unbreak EZVIZ CS-W3-WD1200G EUP on 5.10
with current images, the device is no longer booting.
It gets stuck in the bootloader with "Config not available"
and drops to the uboot shell.

|flash_type: 0
|Hit any key to stop autoboot:  0
|SF: Detected MX25L12805D with page size 4 KiB, total 16 MiB
|Config not availabale
|(IPQ40xx) #

This is because the default bootcmd "bootipq" will only read
the first four MiB of the kernel image. With 5.10 the gzip'd
kernel is slightly larger. So the part of the FIT image which
had the configuration is cut off. Hence it can't find it.

To update the bootcmd, you have to attach the serial console
again and enter the following commands into the boot prompt:

 # setenv bootcmd "sf probe; sf read 84000000 180000 600000; bootm"
 # saveenv
 # run bootcmd

This will allow booting kernels with up to six MiB. This also
allows us to drop the DEVICE_DTS_CONFIG hack we had to use.

Note:
uboot doesn't support LZMA. It fails with:
"Unimplemented compression type 3"

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-12-04 00:36:47 +01:00
Bjørn Mork
8ac8c09f5e ipq40xx: sysupgrade: drop disabled UBI to UBI logic
The commented out code is not required, as the comment
indicates.

The purpose of this code seems to be to avoid issues caused
by partially overwriting an existing UBI partition, where some
of the erase counters would be reset but not the unmodified
ones.  This problem has been solved in a more generic way by
the UBI EOF marker. This ensures that any old PEBs after the
marker are properly initialized.  It is therefore unnecessary
to erase the whole partition before flashing a new OpenWrt
factory image.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
2021-12-03 12:23:02 +01:00
TruongSinh Tran-Nguyen
febc2b831f
ipq40xx: add support for GL.iNet GL-B2200
This patch adds supports for the GL-B2200 router.

Specifications:
  - SOC: Qualcomm IPQ4019 ARM Quad-Core
  - RAM: 512 MiB
  - Flash: 16 MiB NOR - SPI0
  - EMMC: 8GB EMMC
  - ETH: Qualcomm QCA8075
  - WLAN1: Qualcomm Atheros QCA4019 2.4GHz 802.11b/g/n 2x2
  - WLAN2: Qualcomm Atheros QCA4019 5GHz 802.11n/ac W2 2x2
  - WLAN3: Qualcomm Atheros QCA9886 5GHz 802.11n/ac W2 2x2
  - INPUT: Reset, WPS
  - LED: Power, Internet
  - UART1: On board pin header near to LED (3.3V, TX, RX, GND), 3.3V without pin - 115200 8N1
  - UART2: On board with BLE module
  - SPI1: On board socket for Zigbee module

Update firmware instructions:
Please update the firmware via U-Boot web UI (by default at 192.168.1.1, following instructions found at
https://docs.gl-inet.com/en/3/troubleshooting/debrick/).
Normal sysupgrade, either via CLI or LuCI, is not possible from stock firmware.
Please do use the *gl-b2200-squashfs-emmc.img file, gunzipping the produced *gl-b2200-squashfs-emmc.img.gz one first.

What's working:
- WiFi 2G, 5G
- WPA2/WPA3

Not tested:
- Bluetooth LE/Zigbee

Credits goes to the original authors of this patch.

V1->V2:
- updates *arm-boot-add-dts-files.patch correctly (sorry, my mistake)
- add uboot-envtools support
V2->V3:
- Li Zhang updated official patch to fix wrong MAC address on wlan0 (PCI) interface
V3->V4:
- wire up sysupgrade

Signed-off-by: Li Zhang <li.zhang@gl-inet.com>
[fix tab and trailing space, document what's working and what's not]
Signed-off-by: TruongSinh Tran-Nguyen <i@truongsinh.pro>
[rebase on top of master, address remaining comments]
Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
[remove redundant check in platform.sh]
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-12-02 20:43:07 +00:00
Alexander Couzens
8d62304785
ipq40xx: add MikroTik LHGG-60ad outdoor 802.11ad (60GHz) dish
LHGG-60ad is IPQ4019 + wil6210 based.

Specification:

- Qualcomm IPQ4019 (717 MHz)
- 256 MB of RAM (DDR3L)
- 16 MB (SPI NOR) of flash
- 1x Gbit ethernet, 802.3af/at POE IN connected through AR8035.
- WLAN: wil6210 802.11ad PCI card
- No USB or SD card ports
- UART disabled
- 8x LEDs

Biggest news is the wil6210 PCI card.
Integration for its configuration and detection has already been taken
care of when adding support for TP-Link Talon AD7200.
However, signal quality is much lower than with stock firmware, so
probably additional board-specific data has to be provided to the
driver and is still missing at the moment.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[Fix Ethernet Interface]
Signed-off-by: Nick Hainke <vincent@systemli.org>
2021-12-02 19:46:14 +00:00
Felix Matouschek
1cc3b95efc ipq40xx: Add support for Teltonika RUTX10
This patch adds support for the Teltonika RUTX10.
This device is an industrial DIN-rail router with 4 ethernet ports,
2.4G/5G dualband WiFi, Bluetooth, a USB 2.0 port and two GPIOs.

The RUTX series devices are very similiar so common parts of the DTS
are kept in a DTSI file. They are based on the QCA AP-DK01.1-C1 dev
board.

See https://teltonika-networks.com/product/rutx10 for more info.

Hardware:
  SoC:                 Qualcomm IPQ4018
  RAM:                 256MB DDR3
  SPI Flash 1:         XTX XT25F128B (16MB, NOR)
  SPI Flash 2:         XTX XT26G02AWS (256MB, NAND)
  Ethernet:            Built-in IPQ4018 (SoC, QCA8075), 4x 10/100/1000 ports
  WiFi 1:              Qualcomm QCA4019 IEEE 802.11b/g/n
  Wifi 2:              Qualcomm QCA4019 IEEE 802.11a/n/ac
  USB Hub:             Genesys Logic GL852GT
  Bluetooth:           Qualcomm CSR8510 (A10U)
  LED/GPIO controller: STM32F030 with custom firmware
  Buttons:             Reset button
  Leds:                Power (green, cannot be controlled)
                       WiFi 2.4G activity (green)
                       WiFi 5G activity (green)

MACs Details verified with the stock firmware:
   eth0:             Partition 0:CONFIG Offset: 0x0
   eth1:             = eth0 + 1
   radio0 (2.4 GHz): = eth0 + 2
   radio1 (5.0 GHz): = eth0 + 3
Label MAC address is from eth0.

The LED/GPIO controller needs a separate kernel driver to function.
The driver was extracted from the Teltonika GPL sources and can be
found at following feed: https://github.com/0xFelix/teltonika-rutx-openwrt

USB detection of the bluetooth interface is sometimes a bit flaky. When
not detected power cycle the device. When the bluetooth interface was
detected properly it can be used with bluez / bluetoothctl.

Flash instructions via stock web interface (sysupgrade based):
  1. Set PC to fixed ip address 192.168.1.100
  2. Push reset button and power on the device
  3. Open u-boot HTTP recovery at http://192.168.1.1
  4. Upload latest stock firmware and wait until the device is rebooted
  5. Open stock web interface at http://192.168.1.1
  6. Set some password so the web interface is happy
  7. Go to firmware upgrade settings
  8. Choose
     openwrt-ipq40xx-generic-teltonika_rutx10-squashfs-nand-factory.ubi
  9. Set 'Keep settings' to off
  10. Click update, when warned that it is not a signed image proceed

Return to stock firmware:
  1. Set PC to fixed ip address 192.168.1.100
  2. Push reset button and power on the device
  3. Open u-boot HTTP recovery at http://192.168.1.1
  4. Upload latest stock firmware and wait until the device is rebooted

Note: The DTS expects OpenWrt to be running from the second rootfs
partition. u-boot on these devices hot-patches the DTS so running from the
first rootfs partition should also be possible. If you want to be save follow
the instructions above. u-boot HTTP recovery restores the device so that when
flashing OpenWrt from stock firmware it is flashed to the second rootfs
partition and the DTS matches.

Signed-off-by: Felix Matouschek <felix@matouschek.org>
2021-11-28 18:39:01 +01:00
Robert Marko
3ad229db0b ipq40xx: add support for MikroTik hAP ac3
This adds support for the MikroTik RouterBOARD RBD53iG-5HacD2HnD
(hAP ac³), a  indoor dual band, dual-radio 802.11ac
wireless AP with external omnidirectional antennae, USB port, five
10/100/1000 Mbps Ethernet ports and PoE passthrough.

See https://mikrotik.com/product/hap_ac3 for more info.

Specifications:
 - SoC: Qualcomm Atheros IPQ4019
 - RAM: 256 MB
 - Storage: 16 MB NOR + 128 MB NAND
 - Wireless:
   · Built-in IPQ4019 (SoC) 802.11b/g/n 2x2:2, 3 dBi antennae
   · Built-in IPQ4019 (SoC) 802.11a/n/ac 2x2:2, 5.5 dBi antennae
 - Ethernet: Built-in IPQ4019 (SoC, QCA8075) , 5x 1000/100/10 port,
             passive PoE in, PoE passtrough on port 5
- 1x USB Type A port

Installation:
1. Boot the initramfs image via TFTP
2. Run "cat /proc/mtd" and look for "ubi" partition mtd device number, ex. "mtd1"
3. Use ubiformat to remove MikroTik specific UBI volumes
* Detach the UBI partition by running: "ubidetach -d 0"
* Format the partition by running: "ubiformat /dev/mtdN -y"
Replace mtdN with the correct mtd index from step 2.
3. Flash the sysupgrade image using "sysupgrade -n"

Signed-off-by: Robert Marko <robimarko@gmail.com>
Tested-by: Mark Birss <markbirss@gmail.com>
Tested-by: Michael Büchler <michael.buechler@posteo.net>
Tested-by: Alex Tomkins <tomkins@darkzone.net>
2021-11-28 17:19:52 +01:00
Christian Lamparter
c3b9d0d1e2 ipq40xx: utilize nvmem on Netgear EX61X0 v2 Series
the Netgear EX6100v2 and EX6150v2 can utilize the nvmem
for the pre-calibration and mac-address for both WIFI
devices.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-11-28 01:13:08 +01:00
Christian Lamparter
a5b80dd487 ipq40xx: purge clk_ignore_unused bootarg
these flags have been creeping in from the QSDK.
All needed clocks should be accounted for, and
if a device is broken due to this. It should be
looked into.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-11-27 23:56:29 +01:00