1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-19 05:58:53 +02:00
Commit Graph

1405 Commits

Author SHA1 Message Date
Sander Vanheule
7154a1dc7b ath79: TP-Link EAP225 v3: use pre-calibration nvmem-cell
ath10k Wave-2 hardware requires an nvmem-cell called "pre-calibration"
to load the device specific caldata, not "calibration". Rename the nvmem
cell node and label to match the updated cell name.

Fixes: eca0d7301198 ("ath79: TP-Link EAP225 v3: convert ath10k to nvmem-cells")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-18 19:30:44 +02:00
Sander Vanheule
9a329668af ath79: TP-Link EAP225-Wall v2: use pre-calibration nvmem-cell
ath10k Wave-2 hardware requires an nvmem-cell called "pre-calibration"
to load the device specific caldata, not "calibration". Rename the nvmem
cell node and label to match the updated cell name.

Fixes: 48625a04453b ("ath79: TP-Link EAP225-Wall v1: convert radios to nvmem-cells")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-18 19:30:44 +02:00
Nick Hainke
0cb851cad1 ath79: TP-Link EAP225-Outdoor v1: use pre-calibration nvmem-cell
Fixes errors in the form of:
  ath10k_pci 0000:00:00.0: failed to fetch board data for bus=pci,
  vendor=168c,device=0056,subsystem-vendor=0000,subsystem-device
  =0000 from ath10k/QCA9888/hw2.0/board-2.bin
  ath10k_pci 0000:00:00.0: failed to fetch board-2.bin or board.bin
  from ath10k/QCA9888/hw2.0
  ath10k_pci 0000:00:00.0: failed to fetch board file: -12
  ath10k_pci 0000:00:00.0: could not probe fw (-12)

As described already in 2d3321619b2b ("ath79: TP-Link EAP245 v3: use
pre-calibration nvmem-cell"):
  Ath10k Wave-2 hardware requires an nvmem-cell called "pre-calibration"
  to load the device specific caldata, not "calibration".

Further rename the nvmem cell node and label to match the updated cell name.

Fixes: 23b904074500 ("ath79: TP-Link EAP225-Outdoor v1: convert ath10k to nvmem-cells")
Suggested-by: Sander Vanheule <sander@svanheule.net>
Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-06-18 19:30:44 +02:00
Sander Vanheule
849ffbd5ab ath79: D-Link DAP-2xxx (QCA953x): convert ath9k caldata to nvmem
Convert the calibration data reference for the ath9k radio to an
nvmem-cell, replacing the downstream mtd-cal-data property.

Since the 'art' label is no longer used, it can be dropped.

Cc: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-18 11:57:21 +02:00
Sander Vanheule
b4e7b49a92 ath79: D-Link DAP-2xxx (QCA953x): move art partition to DTSI
The art partition containing the radio calibration data is in the same
location for all supported devices. Move the definition to the base file
so the reference from the wmac node can reference the same file.

Cc: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-18 11:57:21 +02:00
Sander Vanheule
7868f7ad0f ath79: D-Link DAP-3662 A1: convert ath10k caldata to nvmem
Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the calibration data using nvmem-cells.

MAC address assignment is moved to '10_fix_wifi_mac', so the device can
then be removed from the caldata extraction script '11-ath10k-caldata'.

Cc: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-18 11:57:21 +02:00
Sander Vanheule
e5df381208 ath79: D-Link DAP-2695 A1: convert ath10k caldata to nvmem
Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the calibration data using nvmem-cells.

MAC address assignment is moved to '10_fix_wifi_mac', so the device can
then be removed from the caldata extraction script '11-ath10k-caldata'.

Cc: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-18 11:57:21 +02:00
Sander Vanheule
abf28b79c8 ath79: D-Link DAP-2660 A1: convert ath10k caldata to nvmem
Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the calibration data using nvmem-cells.

MAC address assignment is moved to '10_fix_wifi_mac', so the device can
then be removed from the caldata extraction script '11-ath10k-caldata'.

Cc: Sebastian Schaper <openwrt@sebastianschaper.net>
Tested-by: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-18 11:57:21 +02:00
Sander Vanheule
8ccbc95d50 ath79: D-Link DAP-2680 A1: convert ath10k caldata to nvmem
Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the pre-calibration data using nvmem-cells.

MAC address assignment is moved to '10_fix_wifi_mac', so the device can
then be removed from the caldata extraction script '11-ath10k-caldata'.

Cc: Sebastian Schaper <openwrt@sebastianschaper.net>
Tested-by: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-18 11:57:19 +02:00
Sander Vanheule
e2bf11639b ath79: D-Link DAP-2xxx (QCA955x): convert ath9k caldata to nvmem
Convert the calibration data reference for the ath9k radio to an
nvmem-cell, replacing the downstream mtd-cal-data property.

Cc: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-18 11:54:40 +02:00
Sander Vanheule
3a1eb93b27 ath79: D-Link DAP-2xxx (QCA955x): move art partition to DTSI
The art partition containing the radio calibration data is in the same
location for all supported devices. Move the definition to the base file
so the reference from the wmac node can refer to the same file.

Cc: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-18 11:54:39 +02:00
Sander Vanheule
2d3321619b ath79: TP-Link EAP245 v3: use pre-calibration nvmem-cell
ath10k Wave-2 hardware requires an nvmem-cell called "pre-calibration"
to load the device specific caldata, not "calibration".

Update the nvmem-cell name to make the 5GHz radio work again.

Fixes: d4b3b2394233 ("ath79: TP-Link EAP245 v3: convert radios to nvmem-cells")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-18 09:36:21 +02:00
Sander Vanheule
9320516613 ath79: move ethernet phy node for TP-Link EAP devices
Move the ethernet phy definition from the eap2x5-1port include to the
device-specific DTS files. This is to prepare for new devices that have
a different ethernet phy, at another MDIO address.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-16 21:39:32 +02:00
Sander Vanheule
48625a0445 ath79: TP-Link EAP225-Wall v1: convert radios to nvmem-cells
Replace the mtd-cal-data phandle by an nvmem-cell reference to the art
partition for the 2.4GHz ath9k radio.

Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the calibration data using nvmem-cells.

Use mac-address-increment to ensure the MAC address is set correctly,
and remove the device from the caldata extraction and patching script.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-16 21:39:32 +02:00
Sander Vanheule
d4b3b23942 ath79: TP-Link EAP245 v3: convert radios to nvmem-cells
Replace the mtd-cal-data phandle by an nvmem-cell reference from the art
partition for the 2.4GHz ath9k radio.

Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the calibration data using an nvmem-cell.

Use mac-address-increment to ensure the MAC address is set correctly,
and remove the device from the caldata extraction and patching script.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-16 21:39:32 +02:00
Sander Vanheule
eca0d73011 ath79: TP-Link EAP225 v3: convert ath10k to nvmem-cells
Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the calibration data using nvmem-cells.

Use mac-address-increment to ensure the MAC address is set correctly,
and remove the device from the caldata extraction and patching script.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-16 21:39:32 +02:00
Sander Vanheule
23b9040745 ath79: TP-Link EAP225-Outdoor v1: convert ath10k to nvmem-cells
Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the calibration data using nvmem-cells.

Use mac-address-increment to ensure the MAC address is set correctly,
and remove the device from the caldata extraction and patching script.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-16 21:39:32 +02:00
Sander Vanheule
7cf3a37957 ath79: TP-Link EAP225 v1: convert ath10k to nvmem-cells
Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the calibration data using nvmem-cells.

Use mac-address-increment to ensure the MAC address is set correctly,
and remove the device from the caldata extraction and patching script.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-16 21:39:32 +02:00
Sander Vanheule
d61882783d ath79: TP-Link EAP245 v1: convert ath10k to nvmem-cells
Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the calibration data using nvmem-cells.

Use mac-address-increment to ensure the MAC address is set correctly,
and remove the device from the caldata extraction and patching script.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-16 21:39:32 +02:00
Sander Vanheule
e71b5d2db7 ath79: convert 1-port TP-Link EAP ath9k to nvmem-cells
Replace the mtd-cal-data phandle with an nvmem-cell reference for the
2.4GHz ath9k radio. This affects the following devices:
  - TP-Link EAP225 v1
  - TP-Link EAP225 v3
  - TP-Link EAP225-Outdoor v1
  - TP-Link EAP245 v1

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-16 21:39:32 +02:00
Sander Vanheule
dae3927527 ath79: drop phy-mask property
The phy-mask property is no longer supported by the ag71xx-mdio driver,
so let's drop it.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-06-15 20:07:26 +02:00
Sander Vanheule
c8c96b22c6 ath79: ag71xx-mdio: remove phy-mask property
The phy-mask property is read by the ag71xx-mdio driver to set the
mii_bus's phy_mask field. On OF platforms, the devicetree is expected to
provide all present ethernet phy-s however, so the phy_mask field is
later set to all-ones. Having a devicetree override is of no use then,
so let's drop it.

Cc: David Bauer <mail@david-bauer.net>
Cc: John Crispin <john@phrozen.org>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Acked-by: David Bauer <mail@david-bauer.net>
2022-06-15 20:07:26 +02:00
Nick Hainke
f4415f7635 ath79: move ubnt-xm to tiny
ath79 has was bumped to 5.10. With this, as with every kernel change,
the kernel has become larger. However, although the kernel gets bigger,
there are still enough flash resources. But the RAM reaches its capacity
limits. The tiny image comes with fewer kernel flags enabled and
fewer daemons.

Improves: 15aa53d7ee65 ("ath79: switch to Kernel 5.10")

Tested-by: Robert Foss <me@robertfoss.se>
Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-06-11 21:22:58 +02:00
Stijn Segers
0dc056eb66 ath79: D-Link DAP-2680: select QCA9984 firmware
The DAP-2680 has a QCA9984 radio [1], but the commit adding support
mistakenly adds the QCA99x0 firmware package. See forum topic [2].

[1] https://wikidevi.wi-cat.ru/D-Link_DAP-2680_rev_A1
[2] https://forum.openwrt.org/t/missing-5ghz-radio-on-dlink-dap-2680/

Fixes: 5b58710fad21 ("ath79: add support for D-Link DAP-2680 A1")
Signed-off-by: Stijn Segers <foss@volatilesystems.org>
Tested-by: Alessandro Fellin <af.registrazioni@gmail.com>
2022-06-11 10:20:06 +02:00
Rui Salvaterra
ed1536e0b6 kernel: bump 5.15 to 5.15.41
Deleted (upstreamed):
generic/backport-5.15/890-v5.19-net-sfp-Add-tx-fault-workaround-for-Huawei-MA5671A-SFP-ON.patch [1]

Other patches automatically rebased.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.41&id=99858114a3b2c8f5f8707d9bbd46c50f547c87c0

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-06-06 19:20:28 +02:00
John Audia
cd634afe6c kernel: bump 5.10 to 5.10.119
Delete the crypto-lib-blake2s kmod package, as BLAKE2s is now built-in.
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
Ptilopsis Leucotis
493080815d ath79: allow use GPIO17 as regular gpio on GL-AR300M devices
Small update to my previous path 'fix I2C on GL-AR300M devices'.
This update allow using GPIO17 as regular GPIO in case it not used
as I2C SDA line.

Signed-off-by: Ptilopsis Leucotis <PtilopsisLeucotis@yandex.com>
2022-06-05 21:19:32 +02:00
Lech Perczak
5ca45e0a21 ath79: ZTE MF286[,A,R]: use GPIO19 as ath9k LED
With the pinctrl configuration set properly by the previous commit, the
LED stays lit regardless of status of 2.4GHz radio, even if 5GHz radio
is disabled. Map GPIO19 as LED for ath9k, this way the LED will show
activity for both bands, as it is bound by logical AND with output of
ath10k-phy0 LED. This works well because during management traffic,
phy*tpt triggers typically cause LEDs to blink in unison.

Link: <https://github.com/openwrt/openwrt/pull/9941>
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-06-05 21:19:32 +02:00
Lech Perczak
82b5984636 ath79: ZTE MF286[,A,R]: fix WLAN LED mapping
The default configuration of pinctrl for GPIO19 set by U-boot was not a
GPIO, but an alternate function, which prevented the GPIO hog from
working. Set GPIO19 into GPIO mode to allow the hog to work, then the
ath10k LED output can control the state of actual LED properly.

Link: <https://github.com/openwrt/openwrt/pull/9941>
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-06-05 21:19:32 +02:00
Sebastian Schaper
4bed263af7 ath79: fix label MAC address for D-Link DIR-825B1
The label MAC address for DIR-825 Rev. B1 is the WAN address located
at 0xffb4 in `caldata`, which equals LAN MAC at 0xffa0 incremented by 1.

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
2022-05-29 00:00:52 +02:00
Jan-Niklas Burfeind
21a3ce97d5 ath79: NanoBeam M5 fix target_devices
Update the name of for the Ubiquiti NanoBeam M5 to match the
auto-generated one at runtime. Otherwise sysupgrade complains about
mismatching device names.

This also required renaming the DTS.

Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
2022-05-21 19:24:40 +02:00
Jan-Niklas Burfeind
4cd3ff8a79 ath79: add support for Ubiquiti NanoBeam M5
Ubiquiti NanoBeam M5 devices are CPE equipment for customer locations
with one Ethernet port and a 5 GHz 300Mbps wireless interface.

Specificatons:

- Atheros AR9342
- 535 MHz CPU
- 64 MB RAM
- 8 MB Flash
- 1x 10/100 Mbps Ethernet with passive PoE input (24 V)
- 6 LEDs of which four are rssi
- 1 reset button
- UART (4-pin) header on PCB

Notes:

The device was supported by OpenWrt in ar71xx.

Flash instructions (web/ssh/tftp):

Loading the image via ssh vias a stock firmware prior "AirOS 5.6".
Downgrading stock is possible.

* Flashing is possible via AirOS software update page:
The "factory" ROM image is recognized as non-native and then installed correctly.
AirOS warns to better be familiar with the recovery procedure.

* Flashing can be done via ssh, which is becoming difficult due to legacy
keyexchange methods.

This is an exempary ssh-config:
KexAlgorithms +diffie-hellman-group1-sha1
HostKeyAlgorithms ssh-rsa
PubkeyAcceptedKeyTypes ssh-rsa
User ubnt

The password is ubnt.

Connecting via IPv6 link local worked best for me.

1. scp the factory image to /tmp
2. fwupdate.real -m /tmp/firmware_image_file.bin -d

* Alternatively tftp is possible:

1. Configure PC with static IP 192.168.1.2/24.
2. Enter the rescue mode. Power off the device, push the reset button on
   the device (or the PoE) and keep it pressed.
   Power on the device, while still pushing the reset button.
3. When all the leds blink at the same time, release the reset button.
4. Upload the firmware image file via TFTP:

tftp 192.168.1.20
tftp> bin
tftp> trace
Packet tracing on.
tftp> put firmware_image.bin

Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
2022-05-21 13:54:15 +02:00
Maciej Krüger
5ce64e0646 ath79: add support for MikroTik hAP (RB951Ui-2nD)
The MikroTik hAP (product code RB951Ui-2nD) is
an indoor 2.4Ghz AP with a 2 dBi integrated antenna built around the
Atheros QCA9531 SoC.

Specifications:
 - SoC: Atheros QCA9531
 - RAM: 64 MB
 - Storage: 16 MB NOR - Winbond 25Q128FVSG
 - Wireless: Atheros QCA9530 (SoC) 802.11b/g/n 2x2
 - Ethernet: Atheros AR934X switch, 5x 10/100 ports,
   10-28 V passive PoE in port 1, 500 mA PoE out on port 5
 - 8 user-controllable LEDs:
   · 1x power (green)
   · 1x user (green)
   · 4x LAN status (green)
   · 1x WAN status (green)
   · 1x PoE power status (red)

See https://mikrotik.com/product/RB951Ui-2nD for more details.

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

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

Signed-off-by: Maciej Krüger <mkg20001@gmail.com>
2022-05-21 13:54:08 +02:00
Thibaut VARÈNE
2bd33e8626 ath79: add support for MikroTik RouterBOARD hAP ac lite
The MikroTik RB952Ui-5ac2nD (sold as hAP ac lite) is an indoor 2.4Ghz
and 5GHz AP/router with a 2 dBi integrated antenna.

See https://mikrotik.com/product/RB952Ui-5ac2nD for more details.

Specifications:
 - SoC: QCA9533
 - RAM: 64MB
 - Storage: 16MB NOR
 - Wireless: QCA9533 802.11b/g/n 2x2 / QCA9887 802.11a/n/ac 2x2
 - Ethernet: AR934X switch, 5x 10/100 ports,
    10-28 V passive PoE in port 1, 500 mA PoE out on port 5
 - 6 user-controllable LEDs:
   - 1x user (green)
   - 5x port status (green)

Flashing:
 TFTP boot initramfs image and then perform sysupgrade. The "Internet"
 port (port number 1) must be used to upload the TFTP image, then
 connect to any other port to access the OpenWRT system.
 Follow common MikroTik procedure as in
 https://openwrt.org/toh/mikrotik/common.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2022-05-21 13:54:02 +02:00
John Audia
8592df67f4 kernel: bump 5.10 to 5.10.114
All patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-05-16 20:26:38 +02:00
Lech Perczak
1fabeeb799 ath79: ZTE MF286[A,R]: add "Power button blocker" GPIO switch
ZTE MF286A and MF286R feature a "power switch override" GPIO in stock
firmware as means to prevent power interruption during firmware update,
especially when used with internal battery.
To ensure that this GPIO is
properly driven as in stock firmware, configure it with userspace GPIO
switch.

It was observed that on some units, the modem would not be
restarted together with the board itself on reboot, this should help
with that as well.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-05-15 16:32:40 +02:00
Ptilopsis Leucotis
57efdd6a2d ath79: fix I2C on GL-AR300M devices
On GL-AR300M Series GPIO17 described as I2C SDA in Device Tree.
Because of GPIO_OUT_FUNCTION4 register was not initialized on start,
GPIO17 was uncontrollable, it always in high state. According to QCA9531
documentation, default setting of GPIO17 is SYS_RST_L. In order to make
GPIO17 controllable, it should write value 0x00 on bits [15:8] of
GPIO_OUT_FUNCTION4 register, located at 0x1804003C address.

Signed-off-by: Ptilopsis Leucotis <PtilopsisLeucotis@yandex.com>
2022-05-15 16:06:20 +02:00
Rui Salvaterra
d9a063c396 kernel: bump 5.15 to 5.15.38
Deleted (upstreamed):
mediatek/patches-5.15/120-10-v5.18-mtd-nand-fix-ecc-parameters-for-mt7622.patch [1]

Other patches automatically rebased.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.38&id=3ec920d755ae69c201b358e8d8e96c32f51145d8

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-05-09 20:49:50 +01: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
Nick Hainke
88527294cd ath79: add Netgear WNDAP360
SoC: Atheros AR7161
RAM: DDR 128 MiB (hynix h5dU5162ETR-E3C)
Flash: SPI-NOR 8 MiB (mx25l6406em2i-12g)
WLAN: 2.4/5 GHz
2.4 GHz: Atheros AR9220
5 GHz: Atheros AR9223
Ethernet: 4x 10/100/1000 Mbps (Atheros AR8021)
LEDs/Keys: 2/2 (Internet + System LED, Mesh button + Reset pin)
UART: RJ45 9600,8N1
Power: 12 VDC, 1.0 A

Installation instruction:
0. Make sure you have latest original firmware (3.7.11.4)
1. Connect to the Serial Port with a Serial Cable RJ45 to DB9/RS232
   (9600,8N1)
   screen  /dev/ttyUSB0 9600,cs8,-parenb,-cstopb,-hupcl,-crtscts,clocal
2. Configure your IP-Address to 192.168.1.42
3. When device boots hit spacebar
3. Configure the device for tftpboot
   setenv ipaddr 192.168.1.1
   setenv serverip 192.168.1.42
   saveenv
4. Reset the device
   reset
5. Hit again the spacebar
6. Now load the image via tftp:
   tftpboot 0x81000000 INITRAMFS.bin
7. Boot the image:
   bootm 0x81000000
8. Copy the squashfs-image to the device.
9. Do a sysupgrade.

https://openwrt.org/toh/netgear/wndap360

The device should be converted from kmod-owl-loader to nvmem-cells in the
future. Nvmem cells were not working. Maybe ATH9K_PCI_NO_EEPROM is missing.
That is why this commit is still using kmod-owl-loader. In the future
the device tree may look like this:

&ath9k0 {
       nvmem-cells = <&macaddr_art_120c>, <&cal_art_1000>;
       nvmem-cell-names = "mac-address", "calibration";
};

&ath9k1 {
       nvmem-cells = <&macaddr_art_520c>, <&cal_art_5000>;
       nvmem-cell-names = "mac-address", "calibration";
};

&art {
	...
	cal_art_1000: cal@1000 {
		reg = <0x1000 0xeb8>;
	};

	cal_art_5000: cal@5000 {
		reg = <0x5000 0xeb8>;
	};
};

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-04-30 23:56:47 +02:00
PtilopsisLeucotis
6e9c814022 ath79: add USB power control for GL-AR300M series
Add USB power control in DTS for GL.iNet models:
- AR300M;
- AR300M-Ext;
- AR300M16;
- AR300M16-Ext.

Signed-off-by: PtilopsisLeucotis <PtilopsisLeucotis@yandex.com>
2022-04-30 23:56:47 +02:00
Foica David
063e9047cc ath79: add support for TP-Link Deco M4R v1 and v2
This commit adds support for the TP-Link Deco M4R (it can also be M4,
TP-Link uses both names) v1 and v2. It is similar hardware-wise to the
Archer C6 v2. Software-wise it is very different. V2 has a bit different
layout from V1 but the chips are the same and the OEM firmware is the same
for both versions.

Specifications:
SoC: QCA9563-AL3A
RAM: Zentel A3R1GE40JBF
Wireless 2.4GHz: QCA9563-AL3A (main SoC)
Wireless 5GHz: QCA9886
Ethernet Switch: QCA8337N-AL3C
Flash: 16 MB SPI NOR

Flashing:

The device's bootloader only accepts images that are signed using
TP-Link's RSA key, therefore this way of flashing is not possible. The
device has a web GUI that should be accessible after setting up the device
using the app (it requires the app to set it up first because the web GUI
asks for the TP-Link account password) but for unknown reasons, the web
GUI also refuses custom images.

There is a debug firmware image that has been shared on the device's
OpenWrt forum thread that has telnet unlocked, which the bootloader will
accept because it is signed. It can be used to transfer an OpenWrt image
file over to the device and then be used with mtd to flash the device.

Pre-requisites:

- Debug firmware.
- A way of transferring the file to the router, you can use an FTP server
  as an example.
- Set a static IP of 192.168.0.2/255.255.255.0 on your computer.
- OpenWrt image.

Installation:

- Unplug your router and turn it upside down. Using a long and thin object
  like a SIM unlock tool, press and hold the reset button on the router and
  replug it. Keep holding it until the LED flashes yellow.
- Open 192.168.0.1. You should see the bootloader recovery's webpage.
  Choose the debug firmware that you downloaded and flash it. Wait until the
  router reboots (at this stage you can remove the static IP).

- Open a terminal window and connect to the router via telnet (the primary
  router should have a 192.168.0.1 IP address, secondary routers are
  different).
- Transfer the file over to the router, you can use curl to download it
  from the internet (use the insecure flag and make sure your source accepts
  insecure downloads) or from an FTP server.
- The router's default mtd partition scheme has kernel and rootfs
  separated. We can use dd to split the OpenWrt image file and flash it with
  mtd:

   dd if=openwrt.bin of=kernel.bin skip=0 count=8192 bs=256
   dd if=openwrt.bin of=rootfs.bin skip=8192 bs=256

- Once the images are ready, you have to flash the device using mtd
  (make sure to flash the correct partitions or you may be left with a
  hard bricked router):

   mtd write kernel.bin kernel
   mtd write rootfs.bin rootfs

- Flashing is done, reboot the device now.

Signed-off-by: Foica David <superh552@gmail.com>
2022-04-30 23:56:47 +02:00
John Audia
e08942e76a kernel: bump 5.10 to 5.10.113
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-04-30 21:27:45 +02:00
Sander Vanheule
8fa4361f55 ath79: add support for TP-Link EAP265 HD
The EAP265 HD is a rebadged EAP245v3, so images are compatible with both
devices.

Link: https://fccid.io/TE7EAP265HD/Letter/6-Request-for-FCC-Change-ID-4823578.pdf
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-04-27 20:29:37 +02:00
Martin Weinelt
089eb02abc ath79: ubnt: drop swconfig on ac-{lite,lr,mesh}
These don't have switches that could be configured using swconfig.

Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
2022-04-23 22:22:12 +02:00
Rui Salvaterra
daa35a4d60 kernel: bump 5.15 to 5.15.35
Patches automatically rebased.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-04-23 20:46:25 +02:00
John Audia
cab20be008 kernel: bump 5.10 to 5.10.112
Manually rebased:
  ath79/patches-5.10/901-phy-mdio-bitbang-prevent-rescheduling-during-command.patch

All other 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-04-23 20:46:25 +02:00
Lech Perczak
8a1003c598 ath79: ZTE MF286R: add comgt-ncm to DEVICE_PACKAGES
When adding support to the router's built-in modem, this required
package was omitted, because it was already enabled in the image
configuration in use for testing, and this went unnoticed.
In result, the modem still isn't fully supported in official images.
As it is the primary WAN interface, add the missing package.

Fixes: e02fb42c53ba ("comgt: support ZTE MF286R modem")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-04-23 20:46:25 +02:00
David Musil
e20de22442 ath79: add support for MikroTik RouterBOARD wAP-2nD (wAP)
The MikroTik RouterBOARD wAP-2nd (sold as wAP) is a small
2.4 GHz 802.11b/g/n PoE-capable AP.

Specifications:
 - SoC: Qualcomm Atheros QCA9533
 - Flash: 16 MB (SPI)
 - RAM: 64 MB
 - Ethernet: 1x 10/100 Mbps (PoE in)
 - WiFi: AR9531 2T2R 2.4 GHz (SoC)
 - 3x green LEDs (1x lan, 1x wlan, 1x user)

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

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

Note: following 781d4bfb397cdd12ee0151eb66c577f470e3377d
 The network setup avoids using the integrated switch and connects the
 single Ethernet port directly. This way, link speed (10/100 Mbps) is
 properly reported by eth0.

Signed-off-by: David Musil <0x444d@protonmail.com>
2022-04-18 07:24:09 +02:00
Andrew Powers-Holmes
6f1efb2898 ath79: add support for Sophos AP100/AP55 family
The Sophos AP100, AP100C, AP55, and AP55C are dual-band 802.11ac access
points based on the Qualcomm QCA9558 SoC. They share PCB designs with
several devices that already have partial or full support, most notably the
Devolo DVL1750i/e.

The AP100 and AP100C are hardware-identical to the AP55 and AP55C, however
the 55 models' ART does not contain calibration data for their third chain
despite it being present on the PCB.

Specifications common to all models:
 - Qualcomm QCA9558 SoC @ 720 MHz (MIPS 74Kc Big-endian processor)
 - 128 MB RAM
 - 16 MB SPI flash
 - 1x 10/100/1000 Mbps Ethernet port, 802.3af PoE-in
 - Green and Red status LEDs sharing a single external light-pipe
 - Reset button on PCB[1]
 - Piezo beeper on PCB[2]
 - Serial UART header on PCB
 - Alternate power supply via 5.5x2.1mm DC jack @ 12 VDC

Unique to AP100 and AP100C:
 - 3T3R 2.4GHz 802.11b/g/n via SoC WMAC
 - 3T3R 5.8GHz 802.11a/n/ac via QCA9880 (PCI Express)

AP55 and AP55C:
 - 2T2R 2.4GHz 802.11b/g/n via SoC WMAC
 - 2T2R 5.8GHz 802.11a/n/ac via QCA9880 (PCI Express)

AP100 and AP55:
 - External RJ45 serial console port[3]
 - USB 2.0 Type A port, power controlled via GPIO 11

Flashing instructions:

This firmware can be flashed either via a compatible Sophos SG or XG
firewall appliance, which does not require disassembling the device, or via
the U-Boot console available on the internal UART header.

To flash via XG appliance:
 - Register on Sophos' website for a no-cost Home Use XG firewall license
 - Download and install the XG software on a compatible PC or virtual
   machine, complete initial appliance setup, and enable SSH console access
 - Connect the target AP device to the XG appliance's LAN interface
 - Approve the AP from the XG Web UI and wait until it shows as Active
   (this can take 3-5 minutes)
 - Connect to the XG appliance over SSH and access the Advanced Console
   (Menu option 5, then menu option 3)
 - Run `sudo awetool` and select the menu option to connect to an AP via
   SSH. When prompted to enable SSH on the target AP, select Yes.
 - Wait 2-3 minutes, then select the AP from the awetool menu again. This
   will connect you to a root shell on the target AP.
 - Copy the firmware to /tmp/openwrt.bin on the target AP via SCP/TFTP/etc
 - Run `mtd -r write /tmp/openwrt.bin astaro_image`
 - When complete, the access point will reboot to OpenWRT.

To flash via U-Boot serial console:
 - Configure a TFTP server on your PC, and set IP address 192.168.99.8 with
   netmask 255.255.255.0
 - Copy the firmware .bin to the TFTP server and rename to 'uImage_AP100C'
 - Open the target AP's enclosure and locate the 4-pin 3.3V UART header [4]
 - Connect the AP ethernet to your PC's ethernet port
 - Connect a terminal to the UART at 115200 8/N/1 as usual
 - Power on the AP and press a key to cancel autoboot when prompted
 - Run the following commands at the U-Boot console:
    - `tftpboot`
    - `cp.b $fileaddr 0x9f070000 $filesize`
    - `boot`
 - The access point will boot to OpenWRT.

MAC addresses as verified by OEM firmware:

use   address     source
LAN   label       config 0x201a (label)
2g    label + 1   art 0x1002    (also found at config 0x2004)
5g    label + 9   art 0x5006

Increments confirmed across three AP55C, two AP55, and one AP100C.

These changes have been tested to function on both current master and
21.02.0 without any obvious issues.

[1] Button is present but does not alter state of any GPIO on SoC
[2] Buzzer and driver circuitry is present on PCB but is not connected to
    any GPIO. Shorting an unpopulated resistor next to the driver circuitry
    should connect the buzzer to GPIO 4, but this is unconfirmed.
[3] This external RJ45 serial port is disabled in the OEM firmware, but
    works in OpenWRT without additional configuration, at least on my
    three test units.
[4] On AP100/AP55 models the UART header is accessible after removing
    the device's top cover. On AP100C/AP55C models, the PCB must be removed
    for access; three screws secure it to the case.
    Pin 1 is marked on the silkscreen. Pins from 1-4 are 3.3V, GND, TX, RX

Signed-off-by: Andrew Powers-Holmes <andrew@omnom.net>
2022-04-16 16:59:29 +02:00