Commit Graph

1273 Commits

Author SHA1 Message Date
John Audia bbdc13b15b kernel: bump 5.4 to 5.4.161
Removed upstreamed:
    ath79/patches-5.4/921-serial-core-add-support-for-boot-console-with-arbitr.patch[1]

Manually rebased:
    layerscape/patches-5.4/804-crypto-0016-MLKU-114-1-crypto-caam-reduce-page-0-regs-access-to-.patch
    octeontx/patches-5.4/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch

All other patches automatically rebased.

1. Private email exchange with patch author, Hauke Mehrtens

Signed-off-by: John Audia <graysky@archlinux.us>
2021-11-28 16:32:45 +01:00
Christian Lamparter 297bceeecf ath79: convert TP-Link Archer C7v1/2 Wifis to nvmem-cells
For v2, both ath9k (2.4GHz Wifi) and ath10k (5 GHz) driver now
pull the (pre-)calibration data from the nvmem subsystem. v1
is slightly different as only the ath9k Wifi is supported.

This allows us to move the userspace caldata extraction
and mac-address patching for the 5GHZ ath10k supported
wifi into the device-tree definition of the device.

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

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-11-28 01:13:08 +01:00
Hauke Mehrtens cee0a95005 Revert "ath79: add support for Mikrotik LHG 5"
This reverts commit 48774decea.

This commit does not contain a valid name in the Signed-off-by line.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-11-23 00:45:39 +01:00
Sebastian Schaper 25df327086 ath79: merge D-Link DAP-2695 with dtsi
Further devices from the series have been added in the meantime,
introducing `qca955x_dlink_dap-2xxx.dtsi`.

Thus, merge support for DAP-2695 with the existing dtsi.

This implies factory images can now be flashed via the regular
OEM Web UI, as well as the bootloader recovery.

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
2021-11-20 21:08:25 +01:00
Sebastian Schaper be88f416db ath79: move cal-data extraction to dts for DAP-2695
This device can be merged with the existing dtsi, which declares
the location of ath9k cal-data via devicetree, correcting the 2.4G
mac address in `10_fix_wifi_mac` rather than `10-ath9k-eeprom`.

To make these changes more visible, apply before merging with dtsi.

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
2021-11-20 21:08:25 +01:00
Sebastian Schaper 3d89685088 ath79: increase SPI frequency for D-Link DAP-2695
This device can be merged with the existing dtsi,
which will increase spi-max-frequency to 50 MHz.

To make this change more visible, increase to 50 MHz before merging.

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
2021-11-20 21:08:25 +01:00
Jakob (Jack/XDjackieXD) 48774decea ath79: add support for Mikrotik LHG 5
The MikroTik LHG 5 series (product codes RBLHG-5nD, RBLHG-5HPnD and
RBLHG-5HPnD-XL) devices are an outdoor 5GHz CPE with a 24.5dBi or 27dBi
integrated antenna built around the Atheros AR9344 SoC.
It is very similar to the SXT Lite5 series which this patch is based
upon.

Specifications:
 - SoC: Atheros AR9344
 - RAM: 64 MB
 - Storage: 16 MB SPI NOR
 - Wireless: Atheros AR9340 (SoC) 802.11a/n 2x2:2
 - Ethernet: Atheros AR8229 switch (SoC), 1x 10/100 port,
    8-32 Vdc PoE in
 - 8 user-controllable LEDs:
  - 1x power (blue)
  - 1x user (white)
  - 1x ethernet (green)
  - 5x rssi (green)

 See https://mikrotik.com/product/RBLHG-5nD for more details.

Notes:
 The device was already supported in the ar71xx target.

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

Signed-off-by: Jakob (Jack/XDjackieXD) <jakob@chaosfield.at>
2021-11-20 21:08:25 +01:00
Roger Pueyo Centelles c29f71ece7 ath79: mikrotik: enable USB module on RouterBoard wAPR-2nD
The MikroTik RouterBOARD wAPR-2nD (wAP R) router features a miniPCI-e
slot with USB lines connected, which are used by some USB cards with
miniPCI-e form factor, like the R11e-LR8. Enabling USB support is
required for such cards to work.

Tested on a MikroTik wAP LR8 kit (RB wAPR-2nD + R11e-LR8).

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
2021-11-20 21:08:21 +01:00
Rui Salvaterra 3ae5da5adc kernel: bump 5.10 to 5.10.80
Deleted (upstreamed):
ath79/patches-5.10/921-serial-core-add-support-for-boot-console-with-arbitr.patch [1]
bcm53xx/patches-5.10/033-v5.15-0012-ARM-dts-BCM5301X-Fix-memory-nodes-names.patch [2]
lantiq/patches-5.10/0016-mtd-rawnand-xway-Keep-the-driver-compatible-with-on-.patch [3]
lantiq/patches-5.10/0110-MIPS-lantiq-dma-add-small-delay-after-reset.patch [4]
lantiq/patches-5.10/0111-MIPS-lantiq-dma-reset-correct-number-of-channel.patch [5]
lantiq/patches-5.10/0112-MIPS-lantiq-dma-fix-burst-length-for-DEU.patch [6]

Manually rebased:
ipq806x/patches-5.10/0065-arm-override-compiler-flags.patch

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=47462c5e600fbaffd755cd13dedd80d04e41ff83
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=2fde76df1885a6bec04317e457121326070450eb
[3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=9b366f5221d8aa64b22f35be137a5749326444ce
[4] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=5af57ce8a6155fe3e4270d28d171abf8903bebc0
[5] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=b92a5df2c7adc79a57481445f67de0c1c716581f
[6] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=6b72caabc47011d03f44064452b2c65e8ed18326

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-11-19 09:40:29 +00:00
Christian Lamparter 217571b6ab ath79: WNDR3700/3800/MAC: utilize nvmem for caldata fetching
converts the still popular WNDR3700 Series to fetch the
caldata through nvmem. As the "MAC with NVMEM" has shown,
there could pitfalls along the way.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-11-06 22:18:45 +01:00
Piotr Dymacz 5dfa89be99 ath79: add support for Netgear R6100
Netgear R6100 is a dual-band Wi-Fi 5 (AC1200) router based on Qualcomm
Atheros (AR9344 + QCA9882) platform. Support for this device was first
introduced in 15f6f67d18 (ar71xx). FCC ID: PY312400225.

Specifications:

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

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

Installation:

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

Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-11-03 12:45:40 +01:00
Mathias Kresin 1470009bf8 kernel: 5.10: packet mangling code only for ar8216 driver
Only the ar8216 switch driver uses the packet mangling code.

Update the kernel configs accordingly.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2021-11-02 22:36:41 +01:00
Nicolò Veronese 3f96743459 ath79: fix UBNT Aircube AC gpios
GPIOs on the Aircube AC are wrong:
 - Reset GPIO moved from 17 to 12
 - PoE Pass Through GPIO for Aircube AC is 3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The label MAC address was found in art 0x0.

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

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

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

Signed-off-by: Jihoon Han <rapid_renard@renard.ga>
Reviewed-by: Sungbo Eo <mans0n@gorani.run>
Tested-by: Sungbo Eo <mans0n@gorani.run>
2021-10-31 21:58:28 +01:00
André Valentin 766d1d675b ath79: fix parallel image generation for Zyxel NBG6716
This changes the image generation to use a unique directory. With
parallel building it may occur that two concurrent jobs try
to create an image which leds to errors. It also removes a needless
subdirecory.

Signed-off-by: André Valentin <avalentin@marcant.net>
2021-10-31 21:24:47 +01:00
Roger Pueyo Centelles 6801b827e4 ath79: mikrotik: enable SFP on RB921GS-5HPacD (mANTBox 15s)
This patch enables the SFP cage on the MikroTik RouterBOARD 921GS-5HPacD
(mANTBox 15s).

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

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

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
2021-10-31 21:24:47 +01:00
Rui Salvaterra 02026d0a6f kernel: bump 5.10 to 5.10.76
Deleted (upstreamed):
bcm27xx/patches-5.10/950-0145-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch [1]

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

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

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

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

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

Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> # HH5A
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-10-30 16:32:59 +02:00
Sven Eckelmann ac4a21141a ath79: ag71xx: Disable napi related interrupts during probe
ag71xx_probe is registering ag71xx_interrupt as handler for the gmac0/gmac1
interrupts. The handler is trying to use napi_schedule to handle the
processing of packets. But the netif_napi_add for this device is
called a lot later in ag71xx_probe.

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

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

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

  Code: (Bad address in epc)

  ---[ end trace a60d797432b656b2 ]---

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

Fixes: f529a37420 ("surprise :p")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-10-23 18:50:31 +02:00
Christian Lamparter e9335c2920 ath79: lzma-loader: fix & re-enable per-board CONFIG_BOARD_DEV
Back in the AR71XX days, the lzma-loader code could be customized
based on the $BOARD variable. These would be passed as a
compile-time -DCONFIG_BOARD_$DEVICE_MODEL flag to the compiler.
Hence, the lzma-loader would be able to include device-specific
fixups.

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

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

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

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

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

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

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

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

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
2021-10-22 08:15:40 -10:00
David Bauer f85c970c9c ath79: use correct USB package for DIR-505
AR9331 requires kmod-usb2-chipidea to use the USB ports. Include the
correct package so they can be used with the base image.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-10-21 15:52:49 +02:00
Rui Salvaterra 72e53eb133 kernel: bump 5.10 to 5.10.74
Patches automatically refreshed.

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

Signed-off-by: John Audia <graysky@archlinux.us>
2021-10-21 00:17:36 +02:00
John Audia 20bc450771 kernel: bump 5.10 to 5.10.71
All patches automatically rebased.

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

Signed-off-by: John Audia <graysky@archlinux.us>
2021-10-10 00:09:22 +01:00
Adrian Schmutzler 2d977eb3d5 ath79: add recipe for common setup with loader-okli-compile
These instructions are repeated for a few devices now, let's move
them to shared definition so we do not repeat ourselves too often.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-10-02 21:26:12 +02:00
Andrew Cameron ac03e24635 ath79: add support for TP-Link CPE710-v1
TP-Link CPE710-v1 is an outdoor wireless CPE for 5 GHz with
one Ethernet port based on the AP152 reference board

Specifications:
- SoC: QCA9563-AL3A MIPS 74kc @ 775MHz, AHB @ 258MHz
- RAM: 128MiB DDR2 @ 650MHz
- Flash: 16MiB SPI NOR Based on the GD25Q128
- Wi-Fi 5Ghz: ath10k chip (802.11ac for up to 867Mbps on 5GHz wireless
  data rate) Based on the QCA9896
- Ethernet: one 1GbE port
- 23dBi high-gain directional 2×2 MIMO antenna and a dedicated metal
  reflector
- Power, LAN, WLAN5G Blue LEDs
- 3x Blue LEDs

Flashing instructions:
Flash factory image through stock firmware WEB UI or through TFTP
To get to TFTP recovery just hold reset button while powering on for
around 30-40 seconds and release.
Rename factory image to recovery.bin
Stock TFTP server IP:192.168.0.100
Stock device TFTP address:192.168.0.254

Signed-off-by: Andrew Cameron <apcameron@softhome.net>
[convert to nvmem, fix MAC assignment in 11-ath10k-caldata]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-09-25 19:28:54 +02:00
John Audia 51c7e1d25f kernel: bump 5.4 to 5.4.144
Manually rebased:
  backport-5.4/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch

All other patches automatically rebased.

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

Signed-off-by: John Audia <graysky@archlinux.us>
2021-09-13 17:08:17 +02:00
Rui Salvaterra 27199a4e66 kernel: bump 5.10 to 5.10.62
Patches automatically refreshed.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-09-09 23:40:32 +02:00
Robert Balas baacdd53df ath79: add support for TP-Link TL-WA1201 v2
This device is a wireless access point working on the 2.4 GHz and 5 GHz
band, based on Qualcomm/Atheros QCA9563 + QCA9886.

Specification
- 775 MHz CPU
- 128 MB of RAM (DDR2)
- 16 MB of FLASH (SPI NOR)
- QCA9563: 2.4 GHz 3x3
- QCA9886: 5 GHz
- AR8033: 1x 1 Gbs Ethernet
- 4x LED, WPS factory reset and power button
- bare UART on PCB (accessible through testpoints)

Methods for Flashing:
- Apply factory image in OEM firmware web-gui. Wait a minute after the
  progress bar completes and restart the device.
- Sysupgrade on top of existing OpenWRT image
- Solder wires onto UART testpoints and attach a terminal.
  Boot the device and press enter to enter u-boot's menu. Then issue the
  following commands
  1. setenv serverip your-server-ip
     setenv ipaddr your-device-ip
  2. tftp 0x80060000 openwrt-squashfs.bin (Rembember output of size in
    hex, henceforth "sizeinhex")
  3. erase 0x9f030000 +"sizeinhex"
  4. cp.b 0x80060000 0x9f030000 0x"sizeinhex"
  5. reboot

Recover:
- U-boot serial console

Signed-off-by: Robert Balas <balasr@iis.ee.ethz.ch>
[convert to nvmem]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-09-05 23:52:35 +02:00
Adrian Schmutzler d37125b3f3 ath79: remove redundant BLOCKSIZE of 64k from devices
BLOCKSIZE = 64k is set in Device/Default, i.e. global default on
the target.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-30 00:37:35 +02:00
Sebastian Schaper 1c8214d6f2 ath79: fix spelling of DEVICE_MODEL for D-Link DAP-2695
Change `DAP-2965` to `DAP-2695` for device selection in menuconfig.

Fixes: cd09f26660 ("ath79: add support for D-Link DAP-2695-A1")

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
[add Fixes]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-28 13:24:23 +02:00
Christian Lamparter a1bd8109f0 ath79: remove obsolete pci-ath9k-fixup.[c,h] files
This was old code from the AR71XXs target days that
doesn't get compiled and used anymore.

Bringing up AR92xx and earlier chips from their
OWL-Emulator state is currently done by the upstream
ath9k-pci-owl-loader module. (see the kmod-owl-loader
package).

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-08-26 21:00:26 +02:00
Jan-Niklas Burfeind d98738b5c1 ath79: add support for onion omega
The Onion Omega is a hardware development platform with built-in WiFi.

https://onioniot.github.io/wiki/

Specifications:
 - QCA9331 @ 400 MHz (MIPS 24Kc Big-Endian Processor)
 - 64MB of DDR2 RAM running at 400 MHz
 - 16MB of on-board flash storage
 - Support for USB 2.0
 - Support for Ethernet at 100 Mbps
 - 802.11b/g/n WiFi at 150 Mbps
 - 18 digital GPIOs
 - A single Serial UART
 - Support for SPI
 - Support for I2S

Flash instructions:
The device is running OpenWrt upon release using the ar71xx target.
Both a sysupgrade
and uploading the factory image using u-boots web-UI do work fine.

Depending on the ssh client, it might be necessary to enable outdated
KeyExchange methods e.g. in the clients ssh-config:

Host 192.168.1.1
        KexAlgorithms +diffie-hellman-group1-sha1

The stock credentials are: root onioneer

For u-boots web-UI manually configure `192.168.1.2/24` on your computer,
connect to `192.168.1.1`.

MAC addresses as verified by OEM firmware:
2G       phy0      label
LAN      eth0      label - 1

LAN is only available in combination with an optional expansion dock.

Based on vendor acked commit:
commit 5cd49bb067 ("ar71xx: add support for Onion Omega")

Partly reverts:
commit fc553c7e4c ("ath79: drop unused/incomplete dts")

Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
2021-08-26 15:07:18 +02:00
Romain Mahoux e2d08084c3 ath79: add support for Compex WPJ558 (16M)
Specifications:
- SoC: QCA9558
- DRAM: 128MB DDR2
- Flash: 16MB SPI-NOR
- Wireless: on-board abgn 2×2 2.4GHz radio
- Ethernet: 2x 10/100/1000 Mbps (1x 802.11af PoE)
- miniPCIe slot

Flash instruction:
- From u-boot

tftpboot 0x80500000 openwrt-ath79-generic-compex_wpj558-16m-squashfs-sysupgrade.bin
erase 0x9f030000 +$filesize
cp.b $fileaddr 0x9f030000 $filesize
boot

- From cpximg loader

The cpximg loader can be started either by holding the reset button
during power up. Once it's running, a TFTP-server under 192.168.1.1 will accept
the image appropriate for the board revision that is etched on the board.

For example, if the board is labelled '6A07':

tftp -v -m binary 192.168.1.1 -c put openwrt-ath79-generic-compex_wpj558-16m-squashfs-cpximg-6a07.bin

Signed-off-by: Romain Mahoux <romain@mahoux.fr>
[convert to nvmem, remove redundant lan_mac in 02_network]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-25 01:42:17 +02:00
Zoltan HERPAI 98eb95dd00 ath79: add support for Atheros DB120 reference board
Atheros DB120 reference board.

Specifications:

SoC:    QCA9344
DRAM:   128Mb DDR2
Flash:  8Mb SPI-NOR, 128Mb NAND flash
Switch: 5x 10/100Mbps via AR8229 switch (integrated into SoC),
        5x 10/100/1000Mbps via QCA8237 via RGMII
WLAN:   AR9300 (SoC, 2.4G+5G) + AR9340 (PCIe, 5G-only)
USB:    1x 2.0
UART:   standard QCA UART header
JTAG:   yes
Button: 1x reset
LEDs:   a lot
Slots:  2x mPCIe + 1x mini-PCI, but using them requires
        additional undocumented changes.
Misc:   The board allows to boot off NAND, and there is
        I2S audio support as well - also requiring
        additional undocumented changes.

Installation:

1. Original bootloader

   Connect the board to ethernet
   Set up a server with an IP address of 192.168.1.10
   Make the openwrt-ath79-generic-atheros_db120-squashfs-factory.bin
   available via TFTP

   tftpboot 0x80060000 openwrt-ath79-generic-atheros_db120-squashfs-factory.bin
   erase 0x9f050000 +$filesize
   cp.b $fileaddr 0x9f050000 $filesize

2. pepe2k's u-boot_mod

   Connect the board to ethernet
   Set up a server with an IP address of 192.168.1.10
   Make the openwrt-ath79-generic-atheros_db120-squashfs-factory.bin
   available via TFTP, as "firmware.bin"

   run fw_upg

   Reboot the board.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
[explicit factory recipe in generic.mk, sorting in 10-ath9k-eeprom,
 convert to nvmem, use fwconcat* names in DTS, remove unneeded DT
 labels, remove redundant uart node]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-22 23:02:08 +02:00
Russell Senior 61b49cd3f8 ath79: add support for Ubiquiti PowerBeam M2 (XW)
This patch adds support for the Ubiquiti PowerBeam M2 (XW), e.g. PBE-M2-400,
a 802.11n wireless with a feed+dish form factor. This device was previously
supported by the ar71xx loco-m-xw firmware.

Specifications:
 - Atheros AR9342 SoC
 - 64 MB RAM
 - 8 MB SPI flash
 - 1x 10/100 Mbps Ethernet port, 24 Vdc PoE-in
 - Power and LAN green LEDs
 - 4x RSSI LEDs (red, orange, green, green)
 - UART (115200 8N1)

Flashing via stock GUI:
 - Downgrade to AirOS v5.5.x (latest available is 5.5.10-u2) first (see
   https://openwrt.org/toh/ubiquiti/powerbeam installation instructions)
 - Upload the factory image via AirOS web GUI.

Flashing via TFTP:
 - Use a pointy tool (e.g., unbent paperclip) to keep the
   reset button pressed.
 - Power on the device (keep reset button pressed).
 - Keep pressing until LEDs flash alternatively LED1+LED3 =>
   LED2+LED4 => LED1+LED3, etc.
 - Release reset button.
 - The device starts a TFTP server at 192.168.1.20.
 - Set a static IP on the computer (e.g., 192.168.1.21/24).
 - Upload via tftp the factory image:
    $ tftp 192.168.1.20
    tftp> bin
    tftp> trace
    tftp> put openwrt-ath79-generic-ubnt_powerbeam-m2-xw-squashfs-factory.bin

WARNING: so far, no non-destructive method has been discovered for
opening the enclosure to reach the serial console. Internal photos
are available here: https://fcc.io/SWX-NBM2HP

Signed-off-by: Russell Senior <russell@personaltelco.net>
2021-08-22 22:41:52 +02:00
Russell Senior 96db7d2a73 ath79: rename Ubiquiti PowerBeam M (XW) to PowerBeam M5 (XW)
The commit [1] added support for Ubiquiti PowerBeam M (XW), tested
on the PBE-M5-400. But, it turns out the PBE-M2-400 has a different
ethernet configuration, so make the support specific to the m5 version
in anticipation of adding specific support for the m2 in a separate
commit.

[1] 12eb5b2384 ("ath79: add support for Ubiquiti PowerBeam M (XW)")

Signed-off-by: Russell Senior <russell@personaltelco.net>
[fix model name in DTS, format commit reference in commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-22 22:41:41 +02:00
Adrian Schmutzler 41aa765946 ath79: remove redundant nvmem definitions
Due to use of a script when migrating from mtd-mac-address, a few
of the definitions are redundant in DTSI and DTS files. Remove
those and consolidate the definitions in parent DTSI files in a
few cases.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-20 18:13:55 +02:00
Adrian Schmutzler e826b64294 ath79: convert remaining mtd-mac-address cases to nvmem
Since the nvmem-based approach for retrieving MAC addresses
appears to depend on the addresses being set up after the
partitions, it is no longer possible to keep the MAC address
setup in shared DTSI files while the partitions itself are
set up in DTS files for the individual devices.

In ath79 the firmware partition is typically located somewhere
"in the middle" of the partition table. Thus, it's not trivial
to share the partitions containing MAC address information in
a common DTSI (like we did in some cases on ramips).

In this commit, MAC address setup is thus moved to the relevant
partitions, and in most cases needs to be duplicated. While
the duplication is not really nice, it eventually provides a
cleaner and more tidy setup, making the DTS(I) file
fragmentation a bit more logical. This should also help
with adding new devices, as information is distributed across
less locations.

For consistency, this commit also moves the mtd-cal-data property
"down" together with the MAC address setup, so it's not based
on a partition before the latter is defined either. (This is
only done for those files touched due to nvmem conversion.)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-18 23:46:02 +02:00
Rui Salvaterra 86c0c12c74 ath79: fix the AR7{1,2}00 USB PHY patches
PHY_SIMPLE is a bogus kconfig symbol, what we really need to select is
GENERIC_PHY.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-08-08 19:50:45 +02:00
John Marrett 252466a0ce ath79: add support for GL.iNet GL-X300B
The GL-X300B is a industrial 4G LTE router based on the Qualcomm
QCA9531 SoC.

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

Flash instructions:

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

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

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

202e83a32a

MAC addresses as verified by OEM firmware:

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

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

Based on vendor commit:

16c5708b20

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

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-08-05 01:46:26 +02:00
John Audia 28ef764026 kernel: bump 5.4 to 5.4.135
All patches automatically rebased.

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

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2021-07-31 19:13:00 +02:00
Rui Salvaterra f2961c9c2b kernel: bump 5.10 to 5.10.53
No deleted or manually refreshed patches.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-07-29 19:50:15 +01:00
David Bauer f0a885ed86 ath79: fix JT-OR750i switch LED assignment
The LEDs for LAN1 and LAN3 were swapped. Link on port 1 would illuminate
the LED on port 3 and vice versa.

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

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

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

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

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

Co-authored-by: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Vincent Wiemann <vincent.wiemann@ironai.com>
2021-07-28 13:48:15 +02:00
Paul Blazejowski f7374bce00 ath79: kernel: Add missing quote to drivers/mfd/Kconfig
A missing quote in target/linux/ath79/patches-5.x/920-mikrotik-rb4xx.patch
produces:

...
scripts/kconfig/conf  --syncconfig Kconfig
drivers/mfd/Kconfig:2016:warning: multi-line strings not supported
...

This patch adds missing closing quote, fixing the above warning.

Signed-off-by: Paul Blazejowski <paulb@blazebox.homeip.net>
2021-07-23 02:38:22 +01:00