Commit Graph

1741 Commits

Author SHA1 Message Date
INAGAKI Hiroshi
8e72fa8b6f ath79: add support for ELECOM WAB-S1167-PS
ELECOM WAB-S1167-PS is a 2.4/5 GHz band 11ac (Wi-Fi 5) access point,
based on QCA9557.

Specification:

- SoC              : Qualcomm Atheros QCA9557
- RAM              : DDR2 128 MiB (2x Winbond W9751G6KB251)
- Flash            : SPI-NOR 16 MiB (Macronix MX25L12835FMI-10G)
- WLAN             : 2.4/5 GHz 2T2R
  - 2.4 GHz        : Qualcomm Atheros QCA9557 (SoC)
  - 5 GHz          : Qualcomm Atheros QCA9882
- Ethernet         : 2x 10/100/1000 Mbps
  - phy ("PD")     : Atheros AR8035
  - phy ("PSE")    : Atheros AR8033
- LEDs/keys (GPIO) : 3x/3x
- UART             : 1x RJ-45 port
  - "SERVICE"      : TTL (3.3V)
    - port         : ttyS0
    - assignment   : 1:3.3V, 2:GND, 3:TX, 4:RX
    - settings     : 115200n8
    - note         : no compatibility with "Cisco console cable"
- Buzzer           : 1x GPIO-controlled
- USB              : 1x USB 2.0 Type-A
- Power            : DC jack or PoE
  - DC jack        : 12 VDC, 1 A (device only, rating)
  - PoE            : 802.3af/at, 48 VDC, 0.25 A (device only, rating)
  - note           : supports 802.3af supply on PSE (downstream) port
                     when powered by DC adapter or 802.3at PoE

Flash instruction using factory.bin image:

1. Boot WAB-S1167-PS without no upstream connection (or PoE connection
   without DHCP)
2. Access to the WebUI ("http://192.168.3.1") on the device and open
   firmware update page
   ("ツールボックス" -> "ファームウェア更新")
3. Select the OpenWrt factory.bin image and click update
   ("アップデート") button
4. Wait ~120 seconds to complete flashing

Revert to OEM firmware:

1. Download the latest OEM firmware
2. Remove 128 bytes(0x80) header from firmware image
3. Decode by xor with a pattern "8844a2d168b45a2d" (hex val)
4. Upload the decoded firmware to the device
5. Flash to "firmware" partition by mtd command
6. Reboot

Notes:

- To use the "SERVICE" port, the connection of 3.3V line is also
  required to enable console output.
  The uart line of "SERVICE" is branched out from the internal pin
  header with 74HC126D and 3.3V line is connected to OE pin on it.

- The same PCB is used with WAB-S600-PS.

- To supply 802.3af PoE on "PSE" port when powered by DC adapter, 12 VDC
  3.5 A adapter is recommended. (official: WAB-EX-ADP1)

MAC addresses:

Ethernet (PD, PSE): 00:90:FE:xx:xx:04 (Config, ethaddr (text))
2.4GHz            : 00:90:FE:xx:xx:04 (Config, ethaddr (text))
5GHz              : 00:90:FE:xx:xx:05

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2024-03-02 14:08:08 +01:00
INAGAKI Hiroshi
2791ee79fa ath79: add support for ELECOM WAB-S600-PS
ELECOM WAB-S600-PS is a 2.4/5 GHz band 11n (Wi-Fi 4) access point, based
on QCA9557.
This device also supports 11ac (Wi-Fi 5) with the another official
firmware.

Specification:

- SoC              : Qualcomm Atheros QCA9557
- RAM              : DDR2 128 MiB (2x Winbond W9751G6KB251)
- Flash            : SPI-NOR 16 MiB (Macronix MX25L12835FMI-10G)
- WLAN             : 2.4/5 GHz 2T2R
  - 2.4 GHz        : Qualcomm Atheros QCA9557 (SoC)
  - 5 GHz          : Qualcomm Atheros QCA9882
- Ethernet         : 2x 10/100/1000 Mbps
  - phy ("PD")     : Atheros AR8035
  - phy ("PSE")    : Atheros AR8033
- LEDs/keys (GPIO) : 3x/3x
- UART             : 1x RJ-45 port
  - "SERVICE"      : TTL (3.3V)
    - port         : ttyS0
    - assignment   : 1:3.3V, 2:GND, 3:TX, 4:RX
    - settings     : 115200n8
    - note         : no compatibility with "Cisco console cable"
- Buzzer           : 1x GPIO-controlled
- USB              : 1x USB 2.0 Type-A
- Power            : DC jack or PoE
  - DC jack        : 12 VDC, 1 A (device only, rating)
  - PoE            : 802.3af/at, 48 VDC, 0.25 A (device only, rating)
  - note           : supports 802.3af supply on PSE (downstream) port
                     when powered by DC adapter or 802.3at PoE

Flash instruction using factory.bin image:

1. Boot WAB-S600-PS without no upstream connection (or PoE connection
   without DHCP)
2. Access to the WebUI ("http://192.168.3.1") on the device and open
   firmware update page
   ("ツールボックス" -> "ファームウェア更新")
3. Select the OpenWrt factory.bin image and click update
   ("アップデート") button
4. Wait ~120 seconds to complete flashing

Revert to OEM firmware:

1. Download the latest OEM firmware
2. Remove 128 bytes(0x80) header from firmware image
3. Decode by xor with a pattern "8844a2d168b45a2d" (hex val)
4. Upload the decoded firmware to the device
5. Flash to "firmware" partition by mtd command
6. Reboot

Notes:

- To use the "SERVICE" port, the connection of 3.3V line is also
  required to enable console output.
  The uart line of "SERVICE" is branched out from the internal pin
  header with 74HC126D and 3.3V line is connected to OE pin on it.

- The same PCB is used with WAB-S1167-PS.

- To supply 802.3af PoE on "PSE" port when powered by DC adapter, 12 VDC
  3.5 A adapter is recommended. (official: WAB-EX-ADP1)

MAC addresses:

Ethernet (PD, PSE): BC:5C:4C:xx:xx:7C (Config, ethaddr (text))
2.4GHz            : BC:5C:4C:xx:xx:7C (Config, ethaddr (text))
5GHz              : BC:5C:4C:xx:xx:7D

[original work of common dtsi part for WAB-I1750-PS]
Signed-off-by: Yanase Yuki <dev@zpc.st>
[adding support for WAB-S600-PS]
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2024-03-02 14:08:08 +01:00
Samuele Longhi
09be63de70 ath79: nand: add SUPPORTED_DEVICES for Meraki MR18
This adds the board name from ar71xx to support upgrade without
-F for the Meraki MR18.

Signed-off-by: Samuele Longhi <agave@dracaena.it>
2024-02-29 21:28:47 +01:00
John Audia
33e72e0b3d kernel: bump 6.1 to 6.1.79
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.79

Manually rebased:
	ath79/patches-6.1/900-unaligned_access_hacks.patch

All other patches automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, ramips/tplink_archer-a6-v3, flogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: x86/64/AMD Cezanne, ramips/tplink_archer-a6-v3, flogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-02-24 19:25:02 +01:00
Martin Garbe
873b0ed42c ath79: update WA/XC devices UBNT_VERSION to 8.7.4
Ubiquiti WA devices with newer hw version (sold 2023)
require UBNT_VERSION to be at least 8.7.4, otherwise
the image is rejected.

For consistency, also increase version number for XC devices.

Signed-off-by: Martin Garbe <monomartin@opennet-initiative.de>
2024-02-19 16:51:39 +01:00
Foica David
b0b8fd436f ath79: generic: fix the alphabetical order in 02_network
This commit fixes the alphabetical order in 02_network.
The 2 deco devices in ath79_setup_interfaces() were in the wrong place.

Signed-off-by: Foica David <superh552@gmail.com>
2024-02-16 14:10:11 +01:00
John Audia
f89904ad78 kernel: bump 6.1 to 6.1.77
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.77

Removed upstreamed:
	generic/backport-6.1/707-v6.8-01-net-phy-at803x-fix-passing-the-wrong-reference-for-c.patch[1]
	generic/backport-6.1/796-v6.8-ipmr-fix-kernel-panic-when-forwarding-mcast-packets.patch[2]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.77&id=7dc0fefd37dd5fb03fdac6e3e01b1c2291148ccb
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.77&id=d2f1b7fe74afd66298dbb3c7b39e7b62e4df1724

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-02-08 18:35:42 +01:00
John Audia
4a0839b44e kernel: bump 6.1 to 6.1.76
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.76

All patches automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-02-08 18:35:42 +01:00
Christian Marangi
e3ddfcc70c
ath79: convert to new LED color/function format where possible
Initial conversion to new LED color/function format
and drop label format where possible. The same label
is composed at runtime.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-02-07 14:48:34 +01:00
Christian Marangi
e92632f760
ath79: drop redundant label with new LED color/function format
Drop redundant label with new LED color/function format declared.
This was needed previously when the new format wasn't supported by
leds.sh functions script. Now that is supported this property
can be removed in favor of the new format.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-02-07 14:48:34 +01:00
Weiping Yang
d0bcb496cf ath79: Modify GL.iNer GL-S200 lan wan interface
Specifications:
lan: eth0
wan: eth1

Problem Description:
The lan wan port is reversed with the current machine.

Use eth0 as LAN port and eth1 as WAN port.

Signed-off-by: Weiping Yang <weiping.yang@gl-inet.com>
2024-02-02 11:42:42 +01:00
Jan Fuchs
f61fc8ed79 ath79: add WAN definition for GL.iNET GL-E750 (Mudi)
Add the default WAN interface to use QMI, to have WAN configured
right from the start.

Signed-off-by: Jan Fuchs <jf@simonwunderlich.de>
2024-02-02 11:29:52 +01:00
Jan Fuchs
b1d37262c9 ath79: add WWAN serial driver and qmi for GL.iNET GL-E750 (Mudi)
The driver for the cellular modems serial interface and qmi was missing
from the default device packages. The driver is required to interact
with the modem using AT commands.

Signed-off-by: Jan Fuchs <jf@simonwunderlich.de>
2024-02-02 11:29:52 +01:00
John Audia
99c9d8abd6 kernel: bump 5.15 to 5.15.148
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.148

Removed upstreamed:
	generic/hack-5.15/321-powerpc_crtsavres_prereq.patch[1]

Manually rebased:
	target/linux/octeontx/patches-5.15/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch[2]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.148&id=0b11a145eb00d51f7ef18cfcae587b93f9adb1e9
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit?h=v5.15.148&id=b67064bd372300a75293efbbc70624996dccffd4

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-02-01 21:36:00 +01:00
John Audia
2c363a070e kernel: bump 6.1 to 6.1.75
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.75

Removed upstreamed:
	generic/hack-6.1/321-powerpc_crtsavres_prereq.patch[1]
	generic/pending-6.1/540-ksmbd-only-v2-leases-handle-the-directory.patch[2]

Rebased:
	bcm27xx/patches-6.1/950-0670-fbdev-Don-t-cancel-deferred-work-if-pagelist-empty.patch[3]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.75&id=16b88e68b85d5520c28498bb847358ff6300cb90
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/fs/smb?h=v6.1.75&id=c866866c795296d3637ab0d48a3d8a3ef5d6f4a3
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.75&id=81f444f22816a82ada2cc787a2845cffc8c584a6

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-02-01 21:34:05 +01:00
Shiji Yang
0db4f9785c
ath79: convert ath10k calibration data to NVMEM (ASCII MAC)
This patch converts ath10k calibration data to NVMEM format for
wave 1 devices with mtd ASCII MAC address. The "calibration"
NVMEM cell size is 0x844. All unportable MAC address settings
have been moved to '10_fix_wifi_mac' scripts.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-02-01 17:09:03 +01:00
Shiji Yang
2f1c62e5af
ath79: convert ath10k calibration data to NVMEM (binary MAC)
This patch converts ath10k calibration data to NVMEM format for
wave 1 devices with mtd binary MAC address. The "calibration"
NVMEM cell size is 0x844. The MAC addresses are assigned via dts.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-02-01 17:09:02 +01:00
Shiji Yang
d07cec6b2b
ath79: convert ath10k calibration data to NVMEM (built-in MAC)
This patch converts ath10k calibration data to NVMEM format for
wave 1 devices with built-in MAC address. The "calibration"
NVMEM cell size is 0x844.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-02-01 17:09:02 +01:00
Shiji Yang
7e71eef5ed
ath79: convert ath10k pre-calibration data to NVMEM (ASCII MAC)
This patch converts ath10k pre-calibration data to NVMEM format for
wave 2 devices with mtd ASCII MAC address. The "pre-calibration"
NVMEM cell size is 0x2f20. All unportable MAC address settings have
been moved to '10_fix_wifi_mac' scripts.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-02-01 17:09:02 +01:00
Shiji Yang
348e0ee157
ath79: convert ath10k pre-calibration data to NVMEM (binary MAC)
This patch converts ath10k pre-calibration data to NVMEM format for
wave 2 devices with mtd binary MAC address. The "pre-calibration"
NVMEM cell size is 0x2f20. The MAC addresses are assigned via dts.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-02-01 17:09:02 +01:00
Shiji Yang
650d37a809
ath79: convert ath10k pre-calibration data to NVMEM (built-in MAC)
This patch converts ath10k pre-calibration data to NVMEM format for
wave 2 devices with built-in MAC address. The "pre-calibration"
NVMEM cell size is 0x2f20.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-02-01 17:09:01 +01:00
Shiji Yang
3c7ce20d5c
ath79: add back board-2.bin to COMFAST devices
The ath10k driver will load both pre-calibration data and board-2.bin
if board-2.bin exists. So it's not necessary to remove it. And this
change won't increase jffs2 image size.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-02-01 17:09:01 +01:00
Lech Perczak
65f599223d ath79: add Ubiquiti Rocket M XW as alternate name to Bullet M XW
Ubiquiti Rocket M XW is a single-band, 2x2:2 external Wi-Fi AP, with optional
GPS receiver, with two external RP-SMA antenna connections, based on
AR9342 SoC. Two band variants exists, for 2.4GHz and 5GHz band, usable
with the same image.

Specs:
- CPU: Atheros AR9342 MIPS SoC at 535MHz
- RAM: 64MB DDR400
- ROM: 8MB SPI-NOR in SO16W package, MX25L6408E
- Wi-Fi Atheros AR9342 built-in 2x2:2 radio
- Ethernet: Atheros AR8035 PHY, limited to 100Mbps speeds due to
  magnetics
- Power: 24V passive PoE input.

Installation: please refer to Ubiquiti Bullet M2HP for documentation.

The device runs with exactly same image as the Bullet, and after fixes
in preceding commit, is fully functional again. Add the alternative name
to the build system.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-25 23:45:41 +01:00
Lech Perczak
e405b96fe7 ath79: ubnt-bullet-m-xw: fix Ethernet PHY traffic
Since commit 6f2e1b7485 ("ath79: disable delays on AT803X config init")
Ubiquiti XW boards equipped with AR8035 PHY suffered from lack of
outbound traffic on the Ethernet port. This was caused by the fact, the
U-boot has set this during boot and it wasn't reset by the PHY driver,
and the corresponding setting in device tree was wrong.

Set the 'phy-mode = "rgmii-txid"' at the &eth0, and drop this property
from PHY node, as it is not parsed there. This causes the device to
connect using Ethernet once again.

Fixes: db4b6535f8 ("ath79: Add support for Ubiquity Bullet M (XW)")
Fixes: 6f2e1b7485 ("ath79: disable delays on AT803X config init")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-25 23:45:41 +01:00
Lech Perczak
9f4708f76c ath79: ubnt-bullet-m-xw: set PHY max-speed to 100Mbps
Onboard AR8035 PHY supports 1000Base-T operation, but onboard
Ethernet magnetics do not. Reduce advertised link speeds to 100Mbps and
lower.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-25 23:45:37 +01:00
Nikolay Martynov
c527073b38 ath79: fix mac address on eap2x5-1port devices
Commit e816591e22 ("ath79: qca: convert to nvmem-layout") mistakenly
switched the source of the mac address from the 'info' to 'art'
partition.

This patch updates all devices that share same 'parent' device tree file
and was tested to fix the problem for eap225-outdoor-v3 - device that I
actually own.

Fixes: e816591e22 ("ath79: qca: convert to nvmem-layout")
Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
[amend commit message]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2024-01-23 10:41:20 +01:00
Samuele Longhi
7b5aeef6db ath79: generic: rework ar9342_ubnt_xw dtsi, and add support for Ubiquiti LiteBeam M5 (XW), Ubiquiti AirGrid M5 HP (XW), Ubiquiti PowerBeam M5 300 (XW)
Add support for Ubiquiti LiteBeam M5 (XW).
The device was previously supported in ar71xx.
See commit: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=d0988235dd277b9a832bbc4b2a100ac6e821f577

Add ALTX_MODEL for Ubiquiti AirGrid M5 HP (XW), Ubiquiti PowerBeam M5 300 (XW) in generic-ubnt.mk
This models are identical (firmware-wise) to the already supported Ubiquiti Nanostation Loco M (XW)

Add also Ubiquiti NanoBeam M5 to ALTX_MODEL of Ubiquiti Nanostation Loco M (XW) since it's another clone.

Tested on:
- Ubiquiti LiteBeam M5 (XW)
- Ubiquiti PowerBeam M5 (XW)

This also modify target/ath79/dts/ar9342_ubnt_xw.dtsi to use nvmem for calibration data
Checked that the caldata size in the eeprom partition are actually 0x440 on:
- Ubiquiti PowerBeam M5 (XW)
- Ubiquiti Nanostation M5 (XW)
- Ubiquiti LiteBeam M5 (XW)
- Ubiquiti AirGrid M5 HP (XW)

Signed-off-by: Samuele Longhi <agave@dracaena.it>
2024-01-20 19:57:57 +01:00
John Audia
ff413129f9 kernel: bump 6.1 to 6.1.72
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.72

Manually rebased:
	generic/hack-6.1/650-netfilter-add-xt_FLOWOFFLOAD-target.patch

All other patches automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-01-19 21:24:44 +01:00
David Bauer
2fe8ecd880 ath79: read back reset register
Read back the reset register in order to flush the cache. This fixes
spurious reboot hangs on TP-Link TL-WDR3600 and TL-WDR4300 with Zentel
DRAM chips.

This issue was fixed in the past, but switching to the reset-driver
specific implementation removed the cache barrier which was previously
implicitly added by reading back the register in question.

Link: https://github.com/freifunk-gluon/gluon/issues/2904
Link: https://github.com/openwrt/openwrt/issues/13043
Link: https://dev.archive.openwrt.org/ticket/17839
Link: f8a7bfe1cb2c ("MIPS: ath79: fix system restart")

Signed-off-by: David Bauer <mail@david-bauer.net>
2024-01-11 01:40:50 +01:00
David Bauer
bf94e0a383 ath79: add support for UniFi UK-Ultra
Hardware
--------
CPU:   Qualcomm Atheros QCA9563
RAM:   128M DDR2
FLASH: 16MB SPI-NOR
WiFi:  Qualcomm Atheros QCA9563 2x2:2 802.11n 2.4GHz
       Qualcomm Atheros QCA9880 2x2:2 802.11ac 5GHz

Antennas
--------
The device features internal antennas as well as external antenna
connectors. By default, the internal antennas are used.

Two GPIOs are exported by name, which can be used to control the
antenna-path mux. Writing a logical 0 enables the external antenna
connectors.

Installation
------------
1. Download the OpenWrt sysupgrade image to the device. You can use scp
   for this task. The default username and password are "ubnt" and the
   device is reachable at 192.168.1.20.

   $ scp -O openwrt-sysupgrade.bin ubnt@192.168.1.20:/tmp/firmware.bin

2. Connect to the device using SSH.

   $ ssh ubnt@192.168.1.20

3. Disable the write-protect

   $ echo "5edfacbf" > /proc/ubnthal/.uf

4. Verify kernel0 and kernel1 match mtd2 and mtd3

   $ cat /proc/mtd

5. Write the sysupgrade image to kernel0 and kernel1

   $ dd if=/tmp/firmware.bin of=/dev/mtdblock2
   $ dd if=/tmp/firmware.bin of=/dev/mtdblock3

6. Write the bootselect flag to boot from kernel0

   $ dd if=/dev/zero bs=1 count=1 of=/dev/mtd4

7. Reboot the device

   $ reboot

Signed-off-by: David Bauer <mail@david-bauer.net>
2024-01-07 23:06:17 +01:00
David Bauer
c9e58f85f6 ath79: move UniFi AC template into common
This allows us to embrace alphabetical sorting for the UK-Ultra.

Signed-off-by: David Bauer <mail@david-bauer.net>
2024-01-07 23:06:17 +01:00
Lech Perczak
c2ab56a754 ath79: support MikroTik RouterBOARD 911G-5HPacD
The MikroTik RouterBOARD 911G-5HPacD is a stripped-down version of
RB921GS-5HPacD, removing the SFP cage.
This ports the board from ar71xx, and is based on support for
RB921GS-5HPacD.

Disable mdio1 and eth1 nodes in routerboard-92x.dtsi, then re-enable
them in devices using that, so the newly-added device has the port
disabled properly.

See https://mikrotik.com/product/RB911G-5HPacD for more info.

Specifications:
 - SoC: Qualcomm Atheros QCA9558 (720 MHz)
 - RAM: 128 MB
 - Storage: 128 MB NAND
 - Wireless: external QCA9892 802.11a/ac 2x2:2
 - Ethernet: 1x 1000/100/10 Mbps, integrated, via AR8031 PHY, passive PoE in

Working:
 - NAND storage detection
 - Ethernet
 - Wireless
 - 1x user LED (blinks during boot, sysupgrade)
 - Reset button
 - Sysupgrade

Installation:
 - Boot initramfs image via TFTP and then flash sysupgrade image

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-07 01:19:56 +01:00
Lech Perczak
95b6d76c5a ath79: mikrotik: add rssileds support for Routerboard 911G and RB912UAG
LEDs 1 through 5 are used for RSSI monitoring on factory firmware.
Reflect that by creating appropriate rssileds configuration.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-07 01:19:56 +01:00
Lech Perczak
bcc44b1212 ath79: support for MikroTik RouterBOARD 911G-(2,5)HPnD
This is a stripped-down version of RB912UAG-(2,5)HPnD, without USB,
miniPCIe and SIM sockets.
This board has been supported in the ar71xx.

Add support based on RB912UAG board, by splitting out the common part to
.dtsi, and creating separate device tree for the stripped-down version.

Links:
* https://mikrotik.com/product/RB911G-2HPnD
* https://mikrotik.com/product/RB911G-5HPnD
* https://openwrt.org/toh/hwdata/mikrotik/mikrotik_rb911g-5hpnd

Hardware:
* SoC: Atheros AR9342,
* RAM: DDR 64MB,
* SPI NOR: 64KB,
* NAND: 128MB,
* Ethernet: x1 10/100/1000 port with passive POE in,
* Wi-Fi: 802.11 a/b/g/n (depending on band variant)
* LEDs: 5 general purpose LEDs (led1..led5), power LED, user LED,
  Ethernet phy LED,
* Button,
* Beeper.

Flashing:
* Use the RouterBOARD Reset button to enable TFTP netboot,
boot kernel and initramfs and then perform sysupgrade.
* From ar71xx OpenWrt firmware run:
  $ sysupgrade -F /tmp/<sysupgrade.bin>
For more info see: https://openwrt.org/toh/mikrotik/common.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-07 01:19:54 +01:00
Lech Perczak
d13d513b9f ath79: mikrotik: add RB912UAG-5HPnD as alternative name
Image for RB912UAG-2HPnD supports the 5GHz variant without
modifications. Add it as alternative name, so it can be found easier.
While at that, adjust board display name in device tree, to reflect
that.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2024-01-07 01:18:18 +01:00
Rosen Penev
ce4ee14a46
ag71xx: fix wrong register definition issue
Documentation fix from QCA SDK.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-05 16:44:29 +01:00
Rosen Penev
2e6ec200df
ath79: move kernel and ubi into subnodes
Avoids dtc warnings regarding two sections having the same numbers.

X: duplicate unit-address (also used in node Y)

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-05 16:17:58 +01:00
Rosen Penev
506b4d563e
ath79: gpio to gpios
Fixes deprecated_gpio_property dtc warning

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-05 16:17:58 +01:00
Rosen Penev
991c8cabed
ath79: fix pci_device_reg errors
Found by dtc. Wrong numbers and wrong ordering.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-05 16:17:58 +01:00
Rosen Penev
6dbc300baf
ath79: fix unit_address_format warning
Raised by dtc.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-05 16:17:57 +01:00
Rosen Penev
2607e3fe24
ath79: fix avoid_unnecessary_addr_size warnings
Raised to dtc.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-05 16:17:57 +01:00
Rosen Penev
b07b8aade7
ath79: rename pcie-controller to pcie
pcie-controller was renamed to pcie since at least kernel 4.14. Match it
here to get rid of dtc warnings.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-05 16:17:57 +01:00
Rosen Penev
89ff407d68
treewide: use ethtool_puts instead of memcpy
The former is a safer and more readable version.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-05 16:12:49 +01:00
Lech Perczak
f024f4b1b0 ath79: generic: disable SPI-NOR write protect unconditionally
Kernel 5.15 introduced a significant change to spi-nor subsystem [1],
which would the SPI-NOR core to no longer unprotect the Flash chips if
their protection bits are non-volatile, which is the case for MX25L6405D
and MX25L12805D, used in Ubiquiti XW and WA lines of devices [2].

However, their bootloader forcibly enables this protection before
continuing to boot, making the kernel not unprotect the flash upon boot,
causing JFFS2 to be unable write to the filesystem. Because sysupgrade
seems to unlock the flash explicitly, the upgrade will work, but the
system will be unable to save configrationm showing the following symptom
in the kernel log:

[   86.168016] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   86.192344] jffs2_build_filesystem(): unlocking the mtd device...
[   86.192443] done.
[   86.200669] jffs2_build_filesystem(): erasing all blocks after the end marker...
[   86.220646] jffs2: Newly-erased block contained word 0x19852003 at offset 0x001e0000
[   86.292388] jffs2: Newly-erased block contained word 0x19852003 at offset 0x001d0000
[   86.324867] jffs2: Newly-erased block contained word 0x19852003 at offset 0x001c0000
[   86.355316] jffs2: Newly-erased block contained word 0x19852003 at offset 0x001b0000
[   86.402855] jffs2: Newly-erased block contained word 0x19852003 at offset 0x001a0000

Disable the write protection unconditionally for ath79/generic subtarget,
so the XW and WA devices can function again. However, this is only a
stopgap solution - it probably should be investigated if there is a way
to selectively unlock the area used by rootfs_data - but given the lock
granularity, this seems unlikely.

With this patch in place, rootfs_data partition on my Nanostation Loco
M5 XW is writable again.

Fixes: #12882
Fixes: #13750
Fixes: 579703f38c ("ath79: switch to 5.15 as default kernel")
Link: http://www.infradead.org/pipermail/linux-mtd/2020-October/082805.html
Link: https://forum.openwrt.org/t/powerbeam-m5-xw-configuration-loss-after-reboot/141925
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2023-12-24 12:42:12 +01:00
John Audia
4a2ff73177 kernel: bump 6.1 to 6.1.69
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.69

Removed upstreamed:
	generic/backport-6.1/795-v6.3-01-r8152-add-USB-device-driver-for-config-selection.patch[1]
	generic/backport-6.1/795-v6.3-03-r8152-avoid-to-change-cfg-for-all-devices.patch[2]
	generic/backport-6.1/795-v6.3-04-r8152-remove-rtl_vendor_mode-function.patch[3]
	generic/backport-6.1/795-v6.4-07-r8152-fix-the-autosuspend-doesn-t-work.patch[4]
	generic/backport-6.1/795-v6.6-11-r8152-add-vendor-device-ID-pair-for-D-Link-DUB-E250.patch[5]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.69&id=893597cbabfbc00ee51fd5f73e2028994f49ded6
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.69&id=1d82735f4bae954d5ba004994b96baec791f874f
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.69&id=4c2ad8e39c62c5288ca31ebf5c30e34f3bd9d044
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.69&id=325556d46bfd13a2fa0d304d0625be86821fd683
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.69&id=cac1218b32d7b56832dd36f7baf82f123f305a2a

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-12-21 11:26:35 +01:00
John Audia
3866cf6e47 kernel: bump 5.15 to 5.15.144
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.144

Removed upstreamed:
	generic/backport-5.15/795-v6.3-01-r8152-add-USB-device-driver-for-config-selection.patch[1]
	generic/backport-5.15/795-v6.3-03-r8152-avoid-to-change-cfg-for-all-devices.patch[2]
	generic/backport-5.15/795-v6.3-04-r8152-remove-rtl_vendor_mode-function.patch[3]
	generic/backport-5.15/795-v6.4-07-r8152-fix-the-autosuspend-doesn-t-work.patch[4]
	generic/backport-5.15/795-v6.6-11-r8152-add-vendor-device-ID-pair-for-D-Link-DUB-E250.patch[5]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.144&id=ca75274b17b890e6f6d2951e364360e25f2846e9
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.144&id=07ba21627ebbb2c68c357e8d698166c45078d014
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.144&id=aa3cc80e8edaa6098b58eb4a613d765496c2dfca
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.144&id=4c117984824b4a852a0e0765e5bdea0f1c7d6309
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.144&id=404ce6ee69d384096663e3f6987d915090447835

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-12-20 15:43:16 -05:00
John Audia
bcb37c84d2 kernel: bump 5.15 to 5.15.143
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.143

Removed upstreamed:
	generic/backport-5.15/795-v6.6-12-r8152-Rename-RTL8152_UNPLUG-to-RTL8152_INACCESSIBLE.patch[1]

Manually rebased:
        mediatek/patches-5.15/100-dts-update-mt7622-rfb1.patch

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.143&id=00beca907a7be61da935bb687f9601420fc5f8a8

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-12-19 14:18:55 +01:00
John Audia
1e6c6a36f5 kernel: bump 6.1 to 6.1.68
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.68

Removed upstreamed:
	generic/backport-6.1/795-v6.6-12-r8152-Rename-RTL8152_UNPLUG-to-RTL8152_INACCESSIBLE.patch[1]

Manually rebased:
	mediatek/patches-6.1/100-dts-update-mt7622-rfb1.patch

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.68&id=3759e735562a31e44fee825498f05c06e64b25a8

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-12-19 14:12:25 +01:00
Eric J. Anderson
807acbce66 ath79: make boot-leds service executable
This service was unfunctional due to not having its executable bit
set.

Fixes #13500.

Signed-off-by: Eric J. Anderson <eric.j.ason256@gmail.com>
2023-12-12 19:35:03 +01:00
Lech Perczak
32098554d9
ath79: fortinet-fap-221-b: convert to nvmem-layout
Now that MAC address parser supports the hex format (without
delimiters), use the canonical MAC address stored in U-boot partition.
Get rid of the userspace adjustments which are no longer necessary.
While at that, move the mac-base to the common part, as it is again
exactly the same in both models.

And convert ART partition too - keep that one separate, as calibration
data length differs between the models.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2023-11-27 00:34:49 +01:00