Commit Graph

175 Commits (07c1ddf522dbe6085af664cf03a41f636a70b99c)

Author SHA1 Message Date
Andreas Ziegler 07c1ddf522 ath79: add support for UniFi AC-LR
The Unifi AC-LR has identical hardware to the Unifi AC-Lite.
The antenna setup is different according to the vendor,
which explains the thicker enclosure.

Therefore, it is helpful to know the exact device variant,
instead of having "Ubiquiti UniFi-AC-LITE/LR".

Signed-off-by: Andreas Ziegler <dev@andreas-ziegler.de>
[fix legacy name in commit message; add old boardname to
SUPPORTED_DEVICES]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Jeff Kletsky 474b69475d ath79: Correct glinet, gl-ar300m-lite in 02_network
Previously, the board name for the GL-AR300M-Lite was incorrect
in 02_network, resulting in an unintended, fall-through condition
when initializing the network configuration.

While builds prior to commit 8dde11d521 (merged June 5, 2019)
    ath79: dts: drop "simple-mfd" for gmacs in SoC dtsi
functioned properly, the error was noted in resolving first-boot
connectivity issues related to the single-phy nature of the device
and the "swap" of eth0 and eth1 related to that commit.

Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
5 years ago
Adrian Schmutzler fddea2030e ath79: remove redundant ucidef_set_interfaces_* calls in 02_network
If already included in ucidef_add_switch, you do not have to
additionally set the interface mode in ucidef_set_interfaces_*
functions.

This patch removes/adjusts such redundant cases.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Dmitry Tunin 00ed75f47f ath79: add support of Netgear WNDR3800CH
Add support for the ar71xx supported Netgear WNDR3800CH to ath79.
The device is identical to WNDR3800 except NETGEAR_BOARD_ID.

Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 50fdc0374b ath79: provide label MAC address
This patch adds the label MAC address for several devices in
ath79.

Some devices require setting the MAC address in 02_network:

For the following devices, the netif device can be linked in
device tree, but the MAC address cannot be read:
- alfa-network,ap121f
- avm,fritz300e
- ubnt-xm devices

For the following devices, label MAC address is tied to lan or
wan, so no node to link to exists in device tree:
- adtran,bsap1800-v2
- adtran,bsap1840
- dlink,dir-842-c1/-c2/-c3
- engenius,ecb1750
- iodata,etg3-r
- iodata,wn-ac1167dgr
- iodata,wn-ac1600dgr
- iodata,wn-ac1600dgr2
- iodata,wn-ag300dgr
- nec,wg800hp
- nec,wg1200cr
- trendnet,tew-823dru

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Keith Maika 4cb5f29625 ath79: add support for TP-Link Archer C59v2
Add ath79 support for Archer C59v2, previously supported by ar71xx.

TP-Link Archer C59v2 is a dual-band AC1350 router based on
Qualcomm/Atheros QCA9561+QCA9886 chips.

Specification:

- 775/650/258 MHz (CPU/DDR/AHB)
- 128 MB of RAM (DDR2)
- 16 MB of FLASH (SPI NOR)
- 3T3R 2.4 GHz
- 2T2R 5 GHz
- 5x 10/100 Mbps Ethernet
- USB 2.0 port
- UART header on PCB

Flash instruction:
  - via web UI:
    1. Download openwrt-ath79-generic-tplink_archer-c59-v2-squashfs-factory.bin
    2. Login to router and open the Advanced tab
    3. Navigate to System Tools -> Firmware Upgrade
    4. Upload firmware using the Manual Upgrade form
  - via TFTP:
    1. Set PC to fixed ip address 192.168.0.66
    2. Download openwrt-ath79-generic-tplink_archer-c59-v2-squashfs-factory.bin
       and rename it to tp_recovery.bin
    3. Start a tftp server with the file tp_recovery.bin in its root directory
    4. Turn off the router
    5. Press and hold Reset button
    6. Turn on router with the reset button pressed and wait ~15 seconds
    7. Release the reset button and after a short time
       the firmware should be transferred from the tftp server
    8. Wait ~30 second to complete recovery.

Signed-off-by: Keith Maika <keithm@aoeex.com>
5 years ago
Adrian Schmutzler fbbb4eb8b4 ath79: add support for TP-Link WDR3500 v1
Hardware:
SoC:      AR9344
CPU:      560 MHz
Flash:    8 MiB
RAM:      128 MiB
WiFi:     Atheros AR9340 2.4GHz 802.11bgn
          Atheros AR9300 5GHz 802.11an
Ethernet: AR934X built-in switch, WAN on separate physical interface
USB:      1x 2.0

Flash instruction (WebUI):
Download *-factory.bin image and upload it via the firmwary upgrade
function of the stock firmware WebUI.

Flash instruction (TFTP):
1. Set PC to fixed ip address 192.168.0.66
2. Download *-factory.bin image and rename it to
   wdr3500v1_tp_recovery.bin
3. Start a tftp server with the image file in its root directory
4. Turn off the router
5. Press and hold Reset button
6. Turn on router with the reset button pressed and wait ~15 seconds
7. Release the reset button and after a short time
the firmware should be transferred from the tftp server
8. Wait ~30 second to complete recovery.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[removed stray newline]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Luochongjun 921675a2d1 ath79: add support for gl-ar750
This patch supports gl-ar750, which was previously supported by ar71xx.

Specification:
- SOC: QCA9531 (650MHz)
- Flash: 16 MiB (W25Q128FVSG)
- RAM: 128 MiB DDR2
- Ethernet: 10/100: 2xLAN + 10/100: 1xWAN
- Wireless: 2.4GHz (bgn) and 5GHz (ac)
- USB: 1x USB 2.0 port
- Switch: 1x switch
- Button: 1x reset button
- LED: 3x LEDS (white)

Flash instruction:
Support for sysupgrade directive upgrades, as well as luci upgrades.

Signed-off-by: Luochongjun <luochongjun@gl-inet.com>
5 years ago
Lim Guo Wei e7ab1b5173 ath79: migrate TP-Link TL-MR3420v2 to ath79
Specifications:
- SoC: ar9341
- RAM: 32M
- Flash: 4M
- Ethernet: 5x FE ports
- WiFi: ar9341-wmac

Flash instruction:
Upload generated factory firmware on vendor's web interface.

This changes the key assignment compared to ar71xx support of this
device, since of the two keys on the device one is used as combined
Reset/WPS and the second one as WiFi on/off button.
Despite, the reset button required GPIO_ACTIVE_HIGH to work correctly.

Signed-off-by: Lim Guo Wei <limguowei@gmail.com>
[redo commit message]
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years ago
xixiao zheng 2ada2a5e5b ath79: add support for PISEN TS-D084
PISEN TS-D084 is an wireless router with a battery and integrated power
supply based on Atheros AR9331.

Specification:

- 400/400/200 MHz (CPU/DDR/AHB)
- 64 MB of RAM (DDR2)
- 8 MB of FLASH (SPI NOR)
- 1x 10/100 Mbps Ethernet
- 1T1R 2.4 GHz (AR9331)
- 1x USB 2.0

Flash instruction:
 Upload generated factory image through web interface.

Signed-off-by: xixiao zheng <xixiaozheng64@gmail.com>
[wrap commit message, add flash instruction]
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years ago
Chuanhong Guo 68588e1518 ath79: adtran,bsap1840/bsap1800-v2: move bootcount out of 02_network
These device supports were introduced before /etc/init.d/bootcount and they
had a bootcount reset done in /etc/board.d/02_network.
Move it into /etc/init.d/bootcount instead.

Suggested-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years ago
Adrian Schmutzler 75bfc393ba treewide: convert MAC address location offsets to hexadecimal
This changes the offsets for the MAC address location in
mtd_get_mac_binary* and mtd_get_mac_text to hexadecimal notation.

This will be much clearer for the reader when numbers are big, and
will also match the style used for mtd-mac-address in DTS files.

(e.g. 0x1006 and 0x5006 are much more useful than 4102 and 20486)

Acked-by: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 2758dd332c ath79: fix whitespace errors from adding D-Link DIR-842 C3
We completely overlooked whitespace errors when reviewing
796ad2f7ef ("ath79: add support for D-Link DIR-842 C3").

Fix them and and also fix Makefile indent for C1/C2.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Joan Moreau 9ed272fe95 ath79: add support for Comfast WR650AC v1/v2
This is a dual band 11a/11n router with 1x wan and 4x gig lan ports.

There are two versions of this router which can be identified through
the factory web interface, v1 has 128mb ram and a uboot size of 128k,
v2 has 256mb ram and a uboot size of 256k, the remaining hardware and
PCB markings are the same.

Short specification:

    SoC: Qualcomm Atheros QCA9558 - 720 MHz
    Switch: Atheros AR8327
    Second radio : Qualcomm Atheros QCA9880 802.11ac
    4 LAN/1 WAN 1000Mps Ethernet
    256 MB of RAM (DDR2)
    16 MB of FLASH
    3x2.4 GHz, 3x5GHz antennas

Steps to install :

Option A : Use vendor UI

Option B (if A is not working) :
(a) Download 'backup' from vendor UI and rename it backup.tar.gz
(b) Open the archive, and update the root password in /etc/shadow by
    '$1$9wX3HGfB$X5Sb3kqzzBLdKRUR2kfFd0'
(c) 'Restore' from the archive using the vendor UI. Root password is now
    'aaa'
(d) Scp the firwmware to the device:
    $ scp <openwrt-sysupgrade>.bin root@192.168.1.1:/
(d) ssh to the device and flash the firmware:
    $ cd /
    $ mtd -e firmware -r write <openwrt-sysupgrade>.bin firmware

Signed-off-by: Gareth Parker <gareth41@orcon.net.nz>
Signed-off-by: Ding Tengfei <dtf@comfast.cn>
Signed-off-by: Joan Moreau <jom@grosjo.net>
[reformatted commit message]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Joan Moreau abbbecaa73 ath79: add support for Comfast E314N-v2
Taken code from https://patchwork.ozlabs.org/patch/884850/ that was never
pushed by the author, and adapted to ath79.

The Comfast E314N-V2 is a 2.4 GHz 2x2 radio with a built-in directional
antenna and a second Ethernet port - very similar to the Ubiquiti
NanoStation M2. The Ethernet port features a pass-through PoE capability,
enabled or disabled with a slide switch.

Specifications :
- System-On-Chip: Qualcomm/Atheros QCA9531
- CPU/Speed: 650 MHz
- Flash size: 8 MiB
- RAM: 64 MiB
- 2 Ethernet 1Gbp
- 1 reset button
- 1 switch to choose PoE from LAN or Wan. 48Vdc
- Wifi 2.4 Ghz (b/g/n)
- UART inside the box (3.3V, pins marked on the PCB)

Firmware can be flashed on these units by the following method:
1.) Apply power to the unit
2.) Immediately AFTER applying power, hold down the reset button
3.) The WAN, LAN, and wireless lights will flash - wait three seconds
    (three flashes) and then release the button.
4.) After a second, the lights will flutter quickly and the unit will be
    visible at 192.168.1.1. A web page will be available to enable quick
    and simple uploading and flashing of firmware.

During the boot process, these units also look for a tftp server at
192.168.1.10. If one is present, the firmware can be uploaded as a file
called firmware-auto.bin

Signed-off-by: Joan Moreau <jom@grosjo.net>
[wrapped commit message - fix commit title capitalization]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Chuanhong Guo 4d5dae2741 ath79: add support for PISEN WMB001N
Specifications:
- SoC: AR9341
- RAM: 64M
- Flash: 16M
- Ethernet: 1 * FE port
- WiFi: ar934x-wmac
- Sound: WM8918 DAC
         1 * 3.5mm headphone jack
         2 * RCA connectors for speakers
         1 * SPDIF out
- USB: 1 * USB2.0 port

Flash instruction:
 Upload generated factory image via vendor's web interface.

Notes:
A. Audio stuff:
 1. Since AR934x, all pins for peripheral blocks can be mapped to
    any available GPIOs. We currently don't have a PCM/I2S driver
    for AR934x so pinmux for i2s and SPDIF are bound to i2c gpio
    node. This should be moved into I2S node when a PCM/I2S driver
    is available.
 2. The i2c-gpio node is for WM8918. DT binding for it can't be added
    currently due to a missing clock from I2S PLL.

B. Factory image:
 Image contains a image header and a tar.gz archive.
 1. Header: A 288 byte header that has nothing to do with appended
    tarball. Format:
     0x0-0x7 and 0x18-0x1F: magic values
     0x20: Model number string
     0xFC: Action string. It's either "update" or "backup"
     0x11C: A 1 byte checksum. It's XOR result of 0x8-0x11B
    Firmware doesn't care about the rest of the header as long as
    checksum result is correct.
    The same header is used for backup and update routines so the
    magic values and model number can be obtained by generating a
    backup bin and grab values from it.
 2. Tarball: It contains two files named uImage and rootfs, which
    will be flashed into corresponding mtd partition.
 Writing a special utility that can only output a fixed binary
 blob is overkill so factory image header is placed under
 image/bin instead.

C. LED
 The wifi led has "Wi-Fi" marked on the case but vendor's firmware
 used it as system status indicator. I did the same in this device
 support patch.

D. Firmware
 Factory u-boot is built without 'savenv' support so it's impossible
 to change kernel offset. A 2MB kernel partition won't be enough in
 the future. OKLI loader is used here to migrate this problem:
  1. add OKLI image magic support into uImage parser.
  2. build an OKLI loader, compress it with lzma and add a normal
     uImage header.
  3. flash the loader to where the original kernel supposed to be.
  4. create a uImage firmware using OKLI loader.
  5. flash the created firmware to where rootfs supposed to be.
 By doing so, u-boot will start OKLI loader, which will then load
 the actual kernel at 0x20000.

 The kernel partition is 2MB, which is too much for our loader.
 To save this space, "mtd-concat" is used here:
  1. create a 64K (1 erase block) partition for OKLI loader and
     create another partition with the left space.
  2. concatenate rootfs and this partition into a virtual flash.
  3. use the virtual flash for firmware partition.

 Currently OKLI loader is flashed with factory image only.
 sysupgrade won't replace it. Since it only has one function
 and it works for several years, its unlikely to have some bugs
 that requires a replacement.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years ago
Perry Melange 796ad2f7ef ath79: add support for D-Link DIR-842 C3
Hardware spec of DIR-842 C3:
SoC: QCA9563
DRAM: 128MB DDR2
Flash: 16MB SPI-NOR
Switch: QCA8337N
WiFi 5.8GHz: QCA9888
WiFi 2.4Ghz: QCA9563
USB: circuit onboard, but components are not soldered

Flash instructions:

1. Upgrade the factory.bin through the factory web interface or
   the u-boot failsafe interface.
   The firmware will boot up correctly for the first time.
   Do not power off the device after OpenWrt has booted.
   Otherwise the u-boot will enter failsafe mode as the checksum
   of the firmware has been changed.
2. Upgrade the sysupgrade.bin in OpenWrt.
   After upgrading completes the u-boot won't complain about the
   firmware checksum and it's OK to use now.
3. If you powered off the device before upgrading the sysupgrade.bin,
   just upgrade the factory.bin through the u-boot failsafe interface
   and then goto step 2.

Signed-off-by: Perry Melange <isprotejesvalkata@gmail.com>
5 years ago
Adrian Schmutzler 854ab1b045 ath79: add support for TP-Link CPE220 v2
This seems to be identical to CPE210 v1 despite having removable
antennas.

Specifications:

    * SoC: Qualcomm Atheros AR9344 (560 MHz)
    * RAM: 64MB
    * Storage: 8 MB
    * Wireless: 2.4GHz N based built into SoC 2x2
    * Ethernet: 2x 100/10 Mbps, integrated into SoC, 24V POE IN

Installation:

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 4-5 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: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 0104eed1e5 ath79: add support for TP-Link CPE510 v1
TP-Link CPE510-v1 is an outdoor wireless CPE for 5 GHz with
two Ethernet ports based on Atheros AR9334

Specifications:
 - 560/450/225 MHz (CPU/DDR/AHB)
 - 2x 10/100 Mbps Ethernet, 1x PoE-in, 1x PoE-out
 - 64 MB of DDR2 RAM
 - 8 MB of SPI-NOR Flash
 - 2T2R 5 GHz
 - 13 dBi built-in antenna
 - Power, LAN0, LAN1 green LEDs
 - 4x green RSSI LEDs

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 4-5 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

Based on the work of Paul Wassi <p.wassi@gmx.at>

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 08857e69be ath79: add support for TP-Link CPE210 v1
Specifications:

    * SoC: Qualcomm Atheros AR9344 (560 MHz)
    * RAM: 64MB
    * Storage: 8 MB
    * Wireless: 2.4GHz N based built into SoC 2x2
    * Ethernet: 2x 100/10 Mbps, integrated into SoC, 24V POE IN

Installation:

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 4-5 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: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler c02b9818a5 ath79: add support for TP9343-based TP-Link TL-WR94x devices
This adds support for several TP-Link devices based on TP9343
("a QCA9561 without PCIe and USB"):
- TL-WR940N v3
- TL-WR940N v4
- TL-WR941ND v6

The devices are only different concerning LEDs and MAC address
assignment.

All TL-WR940 are with non-detachable antennas (N), all
TL-WR941 devices are with detachable antennas (ND).

Specification:
- 750 MHz CPU
- 32 MB of RAM
- 4 MB of FLASH
- 2.4 GHz WiFi
- 4x 10/100 Mbps Ethernet

Flash instruction (WebUI):
Download *-factory.bin image and upload it via the firmwary upgrade
function of the stock firmware WebUI.

Flash instruction (TFTP):
1. Set PC to fixed ip address 192.168.0.66
2. Download *-factory.bin image and rename it to * (see below)
3. Start a tftp server with the image file in its root directory
4. Turn off the router
5. Press and hold Reset button
6. Turn on router with the reset button pressed and wait ~15 seconds
7. Release the reset button and after a short time
the firmware should be transferred from the tftp server
8. Wait ~30 second to complete recovery.

* TFTP image names:
940 v3: wr941ndv6_tp_recovery.bin
940 v4: wr940nv4_tp_recovery.bin
941 v6: wr941ndv6_tp_recovery.bin

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Jackson Lim 030fc6ab6c ath79: add support for D-Link DIR-842 C1
Hardware spec of DIR-842 C1:
SoC: QCA9563
DRAM: 128MB DDR2
Flash: 16MB SPI-NOR
Switch: QCA8337N
WiFi 5.8GHz: QCA9888
WiFi 2.4Ghz: QCA9563
USB: circuit onboard, but components are not soldered

Flash instructions:

1. Upgrade the factory.bin through the factory web interface or
   the u-boot failsafe interface.
   The firmware will boot up correctly for the first time.
   Do not power off the device after OpenWrt has booted.
   Otherwise the u-boot will enter failsafe mode as the checksum
   of the firmware has been changed.
2. Upgrade the sysupgrade.bin in OpenWrt.
   After upgrading completes the u-boot won't complain about the
   firmware checksum and it's OK to use now.
3. If you powered off the device before upgrading the sysupgrade.bin,
   just upgrade the factory.bin through the u-boot failsafe interface
   and then goto step 2.

Signed-off-by: Jackson Lim <jackcolentern@gmail.com>
[fix whitespace issues]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Adrian Schmutzler 8b76c6695b ath79: add support for TP-Link TL-WR841N/ND v12
This router has the same hardware as TP-LINK TL-WR841N/ND v11 (same
FCC ID, same TFTP image name...).

Flash instruction (WebUI):
Download *-factory.bin image and upload it via the firmwary upgrade
function of the stock firmware WebUI.

Flash instruction (TFTP):
1. Set PC to fixed ip address 192.168.0.66
2. Download *-factory.bin image and rename it to wr841nv11_tp_recovery.bin
   (it's really v11, not v12)
3. Start a tftp server with the image file in its root directory
4. Turn off the router
5. Press and hold Reset button
6. Turn on router with the reset button pressed and wait ~15 seconds
7. Release the reset button and after a short time
the firmware should be transferred from the tftp server
8. Wait ~30 second to complete recovery.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 4254193c1d ath79: add support for TP-Link TL-WR841N/ND v10
The TL-WR841N/ND v10 is mostly identical to the v9. Apart from some minor
changes, it contains a newer revision of the QCA9533 SoC and the CPU clock
is significantly higher.

Flash instruction (WebUI):
Download *-factory.bin image and upload it via the firmwary upgrade
function of the stock firmware WebUI.

Flash instruction (TFTP):
1. Set PC to fixed ip address 192.168.0.66
2. Download *-factory.bin image and rename it to wr841nv10_tp_recovery.bin
3. Start a tftp server with the image file in its root directory
4. Turn off the router
5. Press and hold Reset button
6. Turn on router with the reset button pressed and wait ~15 seconds
7. Release the reset button and after a short time
the firmware should be transferred from the tftp server
8. Wait ~30 second to complete recovery.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Roger Pueyo Centelles 334bbc5198 ath79: add support for ALFA Network AP121F
This commit ports support for the ALFA Network AP121F, a pocket-size
router with 1 Ethernet and 2.4 GHz WiFi based on the AR9331 SoC, to the
ath79 target (it was already supported in ar71xx; see commit 0c6165d2
for more details).

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
[pepe2k@gmail.com: fixed GPIO polarity, included USB support, changed
DTS nodes order, moved WLAN LED trigger define to DTS, made U-Boot env
partition writable]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
5 years ago
Jackson Lim 209b368254 ath79: add support for D-Link DIR-842 C2
Hardware spec of DIR-842 C2:
SoC: QCA9563
DRAM: 128MB DDR2
Flash: 16MB SPI-NOR
Switch: QCA8337N
WiFi 5.8GHz: QCA9888
WiFi 2.4Ghz: QCA9563
USB: 2.0

Flash instructions:

1. Upgrade the factory.bin through the factory web interface or
   the u-boot failsafe interface.
   The firmware will boot up correctly for the first time.
   Do not power off the device after OpenWrt has booted.
   Otherwise the u-boot will enter failsafe mode as the checksum
   of the firmware has been changed.
2. Upgrade the sysupgrade.bin in OpenWrt.
   After upgrading completes the u-boot won't complain about the
   firmware checksum and it's OK to use now.
3. If you powered off the device before upgrading the sysupgrade.bin,
   just upgrade the factory.bin through the u-boot failsafe interface
   and then goto step 2.

Signed-off-by: Jackson Lim <jackcolentern@gmail.com>
[Reword reset-hog comment, fix formatting]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Adrian Schmutzler 974d6958a7 ath79: Add support for TP-Link Archer C60 v2
TP-Link Archer C60 v2 is a dual-band AC1350 router,
based on Qualcomm/Atheros QCA9561 + QCA9886.

Specification:

- 775/650/258 MHz (CPU/DDR/AHB)
- 64 MB of RAM (DDR2)
- 8 MB of FLASH (SPI NOR)
- 3T3R 2.4 GHz
- 2T2R 5 GHz
- 5x 10/100 Mbps Ethernet
- 7x LED, 2x button
- UART header on PCB

Flash instruction (WebUI):
Download *-factory.bin image and upload it via the firmwary upgrade
function of the stock firmware WebUI.

Flash instruction (TFTP):
1. Set PC to fixed IP address 192.168.0.66
2. Download *-factory.bin image and rename it to tp_recovery.bin
3. Start a tftp server with the file tp_recovery.bin in its root
   directory
4. Turn off the router
5. Press and hold reset button
6. Turn on router with the reset button pressed and wait ~15 seconds
7. Release the reset button and after a short time the firmware should
   be transferred from the tftp server
8. Wait ~30 second to complete recovery

Flash instruction (under U-Boot, using UART):
tftp 0x81000000 ...-sysupgrade.bin
erase 0x9f030000 +$filesize
cp.b $fileaddr 0x9f030000 $filesize
reset

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 6d313da6dc ath79: Add support for TP-Link Archer C60 v1
TP-Link Archer C60v1 is a dual-band AC1350 router,
based on Qualcomm/Atheros QCA9561+QCA9886.

Specification:

- 775/650/258 MHz (CPU/DDR/AHB)
- 64 MB of RAM (DDR2)
- 8 MB of FLASH (SPI NOR)
- 3T3R 2.4 GHz
- 2T2R 5 GHz
- 5x 10/100 Mbps Ethernet
- 7x LED, 2x button
- UART header on PCB

Flash instruction (WebUI):
Download *-factory.bin image and upload it via the firmwary upgrade
function of the stock firmware WebUI.

Flash instruction (TFTP):
1. Set PC to fixed ip address 192.168.0.66
2. Download *-factory.bin image and rename it to tp_recovery.bin
3. Start a tftp server with the file tp_recovery.bin in its root directory
4. Turn off the router
5. Press and hold Reset button
6. Turn on router with the reset button pressed and wait ~15 seconds
7. Release the reset button and after a short time
the firmware should be transferred from the tftp server
8. Wait ~30 second to complete recovery.

Flash instruction under U-Boot, using UART:
1. tftp 0x81000000 ...-sysupgrade.bin
2. erase 0x9f020000 +$filesize
3. cp.b $fileaddr 0x9f020000 $filesize
4. reset

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Andrew Cameron cad4132e00 ath79: add support for TP-Link CPE510-v2/v3
TP-Link CPE510-v2/v3 is an outdoor wireless CPE for 5 GHz with
one Ethernet port based on Atheros AR9344

Specifications:
 - Based on the same underlying hardware as the TP-Link CPE510
 - Power, LAN, and 4 green LEDs
 - 1 10/100Mbps Shielded Ethernet Port (Passive PoE in)
 - Built-in 13dBi 2x2 dual-polarized directional MIMO antenna
 - Adjustable transmission power from 0 to 23dBm/200mw

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 4-5 seconds and release.
 Rename factory image to recovery.bin
 Stock TFTP server IP:192.168.0.100
 Stock device TFTP adress:192.168.0.254

Signed-off-by: Andrew Cameron <apcameron@softhome.net>
[whitespace fixes]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Pramod Pancha 8e384ba830 ath79: add support for Trendnet TEW-823DRU
Trendnet TEW-823DRU is a dual-band AC1750 router.
The router is based on Qualcomm/Atheros QCA9558 + QCA9880.

Specification:

720 MHz CPU
256 MB of RAM
16 MB of FLASH
3T3R 2.4 GHz
3T3R 5 GHz
5x 10/100/1000 Mbps Ethernet

Firmware can be flashed from the web interface. Tested on 3 routers
with no issues.

Signed-off-by: Pramod Pancha <pancha@vill.com>
[whitespace fixes]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Christoph Krapp 6fde0b735c ath79: add support for TP-Link RE355 v1 and RE450 v1
Specification:

SoC: Qualcomm Atheros QCA9558
RAM: 64/128MiB
Flash: 8MiB SPI-NOR
Wifi:
  - 2.4GHz: 3T3R (QCA9558)
  - 5GHz: 3T3R (QCA9880)
LAN: 1x 10/100/1000 Mbps
UART:
  - TP1: Tx
  - TP2: Rx
  - TP3: Gnd
  - TP4: 3v3

Flash instructions:
Flash factory image through stock firmware WEB UI.

Signed-off-by: Christoph Krapp <achterin@googlemail.com>
5 years ago
Daniel Gimpelevich bc18c2bfe7 ath79: add support for Bluesocket BSAP1880 board
This board was used in dual-band 802.11n enterprise access points, models
BSAP-1800v2 and BSAP-1840, introduced in 2010 by Bluesocket, which was
acquired by Adtran in 2011, who has now EOL'ed them. They differed only in
that the BSAP-1840's antennae were detachable, while the BSAP-1800v2's were
inside the case. They have an external RJ-45 console port, which works with
standard Cisco 72-3383-01 console cables.

Specification:
- System-On-Chip: AR7161
- CPU/Speed: 600 MHz
- Flash-Chip: Macronix MX25L12845E
- Flash size: 16 MiB
- RAM: 64 MiB
- Wireless No1: Lite-On WN2601A card: AR9160/AR9103 2.4GHz 802.11bgn
- Wireless No2: Lite-On WN2502A card: AR9160/AR9106 5GHz 802.11an
- PHY: Vitesse VSC8601, Rev. B

Installation:
1. Connect to the serial console using a terminal that supports YMODEM at
   115200 bps, 8 data bits, no parity, 1 stop bit
2. Interrupt the bootloader using its password, which is: r00t
3. Issue the "fis init" command, confirming if prompted
4. Look at the length of the openwrt-ath79-generic-*-squashfs-kernel.bin
   file, and substitute it below, instead of where I have "LeNgTh"
5. Issue the following command, and upload this file using YMODEM protocol
   load -r -v -b 0x80060000 -m ymodem
6. Issue the following commands, substituting as mentioned above:
   fis create -b 0x80060000 -l LeNgTh vmlinux_2
   load -r -v -b 0x80100000 -m ymodem
7. Using YMODEM, upload openwrt-ath79-generic-*-squashfs-rootfs.bin
8. Issue the "fis free" command, and for the first range in its response,
   use a hexadecimal calculator to subtract the start from the end in order
   to substitute it below, with the leading "0x" to specify it in
   hexadecimal, instead of where I have "LeNgTh"
9. Issue the following commands, substituting as mentioned above:
   fis create -b 0x80100000 -l LeNgTh -e 0 -r 0 rootfs
   reset
10.Wait for the status LED to go solid green

Tested-by: Brian Gonyer <bgonyer@gmail.com>
Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
[fixed obsolete $ARGV in platform_do_upgrade]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Chuanhong Guo a9360452f0 ath79: add support for Qihoo C301
Specifications:
- SoC: AR9344
- RAM: 128MB
- Flash: 2 * 16MB (MX25L12845)
- Ethernet: 2 * FE LAN & 1 * FE WAN
- WiFi: 2.4G: AR9344 5G: QCA9882

Flash instruction:
1. Hold reset and power up the router
2. Set your IP to 192.168.1.x
3. Open 192.168.1.1 and upload the generated *factory* firmware

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years ago
David Bauer cb3cd52694 ath79: add support for devolo WiFi pro 1750x
Hardware
--------
CPU:   Qualcomm Atheros QCA9558
RAM:   128M DDR2
FLASH: 16MiB
ETH:   1x Atheros AR8035 (PoE in)
WiFi2: QCA9558 3T3R
WiFi5: QCA9880 3T3R
BTN:   1x Reset
LED:   1x LED Power (non-controllable)
       1x LED Status (internal)
       1x LED LAN (controlled by PHY)
       1x LED WLAN
BEEP:  1x GPIO attached piezo beeper
UART:  3.3V GND TX RX (115200-N-8) (3.3V is square pad)
       Header is located next to external-LED header.

Installation
------------
Make sure you set a password for the root user as prompted on first
setup!

1. Upload OpenWRT sysupgrade image via SSH to the device.
Use /tmp as the destination folder on the device.
User is root, password the one set in the web interface.

2. Install OpenWRT with

> sysupgrade -n -F /tmp/<openwrt-image-name>

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Adrian Schmutzler ab02584685 ath79: Use -v1 suffix for TP-Link WDR3600/4300
In ath79, identifiers tplink_tl-wdr3600 and tplink_tl-wdr4300 have
been used while most other TP-Link devices include the revision.

Although there actually is only one major revision of these
devices, they bear the revision on their bottom (v1.x). TP-Link
also refers to the devices as V1 on its web page.

This patch thus adds -v1 to both so it is more consistent
with other devices and with what you would expect from reading
the on-device sticker and the support pages.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Andrew Cameron e15049c88b ath79: add support for TP-Link CPE610-v1
TP-Link CPE610-v1 is an outdoor wireless CPE for 5 GHz with
one Ethernet port based on Atheros AR9344

Specifications:
 - Based on the same underlying hardware as the TP-Link CPE510
 - Power, LAN, WLAN5G green LEDs
 - 23dBi high-gain directional 2×2 MIMO antenna and a dedicated metal reflector

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 4-5 seconds and release.
 Rename factory image to recovery.bin
 Stock TFTP server IP:192.168.0.100
 Stock device TFTP adress:192.168.0.254

Signed-off-by: Andrew Cameron <apcameron@softhome.net>
5 years ago
Adrian Schmutzler fde0abf267 ath79: Add support for TP-Link Archer C25 v1
The TP-Link Archer C25 is a low-cost dual-band router.

Specification:

- CPU: Atheros QCA9561 775 MHz
- RAM: 64 MB
- Flash: 8 MB
- Wifi: 3x3 2.4 GHz (integrated), 1x1 5 GHz QCA9887
- NET: 5x 10/100 Mbps Ethernet

Some LEDs are controlled by an additional 74HC595 chip, but not
all of them as e.g. for the C59.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler fcb920ffe7 ath79: Consistently label art partition with lower case
This patch harmonizes the label and alias for art partitions
across ath79. Since lower case seems to be more frequent, use that
consistently.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 3d153323ab ath79: Consistently label info partition
The info/product-info partition, which frequently contains MAC
adresses, is typically assigned the 'info' alias in DTS, but
then labelled with 'info', 'product-info' or 'config'.

This leads to different aliases if used for setting MAC adresses
in DTS compared to when using e.g. mtd_get_mac_binary. Occationally,
also multiple switch-case entries are used just because of different
labelling.

This patch relabels those partitions in ath79 to consistently use
'info'.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Kristian Evensen 046263095e ath79: Add support for ZBT-WD323
ZBT-WD323 is a dual-LTE router based on AR9344. The detailed
specifications are:

* AR9344 560MHz/450MHz/225MHz (CPU/DDR/AHN).
* 128 MB RAM
* 16MB of flash(SPI-NOR, 22MHz)
* 1x 2.4GHz wifi (Atheros AR9340)
* 3x 10/100Mbos Ethernet (AR8229)
* 1x USB2.0 port
* 2x miniPCIe-slots (USB2.0 only)
* 2x SIM slots (standard size)
* 4x LEDs (1 gpio controlled)
* 1x reset button
* 1x 10 pin terminal block (RS232, RS485, 4x GPIO)
* 2x CP210x UART bridge controllers (used for RS232 and RS485)
* 1x 2 pin 5mm industrial interface (input voltage 12V~36V)
* 1x DC jack
* 1x RTC (PCF8563)

Tested:
- Ethernet switch
- Wifi
- USB port
- MiniPCIe-slots (+ SIM slots)
- Sysupgrade
- Reset button
- RS232

Intallation and recovery:

The board ships with OpenWRT, but sysupgrade does not work as a
different firmware format than what is expected is generated.  The
easiest way to install (and recover) the router, is to use the
web-interface provided by the bootloader (Breed).

While the interface is in Chinese, it is easy to use. First, in order to
access the interface, you need to hold down the reset button for around
five seconds. Then, go to 192.168.1.1 in your browser. Click on the
second item in the list on the left to access the recovery page. The
second item on the next page is where you select the firmware.  Select
the menu item containing "Atheros SDK" and "16MB" in the dropdown close
to the buttom, and click on the button at the bottom to start
installation/recovery.

Notes:
* RS232 is available on /dev/ttyUSB0 and RS485 on /dev/ttyUSB1

Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
[removed unused poll-interval from gpio-keys, i2c-gpio 4.19 compat]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Chuanhong Guo c3a8518918 ath79: fix default config for devices with eth0/eth1 swapped
also fix the following problems in this commit:
glinet,gl-ar150: This router uses an uncommon order of setting up gmacs
                 in ar71xx. gmac0 is preferred to be wan port because of
                 the additional link status info available. So this
                 router will have eth0/eth1 swapped comparing to ar71xx.
tplink,tl-wr710n-v1: same as gl-ar150
embeddedwireless,dorin: eth0 is used as switch port, which was incorrect.
                        It's correct now, so keep this one untouched.
tplink,tl-wr842n-v1: we don't swap PHYs on ar7241 so the original port order
                     is incorrect.
reorder archer-a7-v5 entry.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years ago
Ryan Mounce 6d6985ff0e ath79: add support for WD My Net N750
SoC: AR9344
RAM: 128MB
Flash: 16MiB Winbond 25Q128BVFG SPI NOR
5GHz WiFi: AR9380 PCIe 3x3:3 802.11n
2.4GHz WiFi: AR9344 (SoC) AHB 2x2:2 802.11n

5x Gigabit ethernet via AR8327N switch (green + amber LEDs)
2x USB 2.0 via GL850G hub
4x front LEDs from SoC GPIO
1x front WPS button from SoC GPIO
1x bottom reset button from SoC GPIO

Known issues:
AR8327N LEDs only have default functionality, not presented in sysfs.
This is a regression from ar71xx.

UART header JP1, 115200 no parity 1 stop
TX
GND
VCC
(N/P)
RX

See https://openwrt.org/toh/wd/n750 for flashing detail.
Procedures unchanged from ar71xx.

Tested sysupgrade + factory flash from WD Emergency Recovery

Signed-off-by: Ryan Mounce <ryan@mounce.com.au>
5 years ago
Davide Fioravanti f5d2c91415 ath79: add support for TP-Link Archer D50 V1
TP-Link Archer D50 v1 is a dual-band AC1200 router + modem.
The router section is based on Qualcomm/Atheros QCA9531 + QCA9882.
The "DSL" section is based on BCM6318 but it's currently not supported.

Internally eth0 is connected to the Broadcom CPU.

Router section - Specification:

CPU: QCA9531 650/600/200 MHz (CPU/DDR/AHB)
RAM: 64 MB (DDR2)
Flash: 8 MB (SPI NOR)
Wifi 2.4GHz: QCA9531 2T2R
Wifi 5GHz: QCA9982 2T2R
4x 10/100 Mbps Ethernet
8x LED, 3x button
UART header on PCB

Known issues:
DSL not working (eth0) (WIP)

UART connection
---------------
J2 HEADER (Qualcomm CPU)
. TX
. RX
. GND
O VCC

J16 HEADER (Broadcom CPU)
O VCC
. GND
. RX
. TX

The following instructions require a connection to the J2 UART header.

Flash instruction under U-Boot, using UART
------------------------------------------
 1. Press any key to stop autobooting and obtain U-Boot CLI access.
 2. Setup ip addresses for U-Boot and your tftp server.
 3. Issue below commands:
	tftpboot 0x81000000 openwrt-ath79-generic-tplink_archer-d50-v1-squashfs-sysupgrade.bin
	erase 0x9f020000 +$filesize
	cp.b 0x81000000 0x9f020000 $filesize
	reset

Initramfs instruction under U-Boot for testing, using UART
----------------------------------------------------------
 1. Press any key to stop autobooting and obtain U-Boot CLI access.
 2. Setup ip addresses for U-Boot and your tftp server.
 3. Issue below commands:
	tftpboot 0x81000000 openwrt-ath79-generic-tplink_archer-d50-v1-initramfs-kernel.bin
	bootm 0x81000000

Restore the original firmware
-----------------------------
 0. Backup every partition using the OpenWrt web interface
 1. Download the OEM firmware from the TP-Link website
 2. Extract the bin file in a folder (eg. Archer_D50v1_0.8.0_1.3_up_boot(170223)_full_2017-02-24_09.37.45.bin)
 3. Remove the U-Boot and the Broadcom image part from the file.
    Issue the following command:
	dd if="Archer_D50v1_0.8.0_1.3_up_boot(170223)_full_2017-02-24_09.37.45.bin" of="Archer_D50v1_0.8.0_1.3_up_boot(170223)_full_2017-02-24_09.37.45.bin.mod" skip=257 bs=512 count=15616
 4. Double check the .mod file size. It must be 7995392 bytes.
 5. Flash it using the OpenWrt web interface. Force the update if needed.
    WARNING: Remember to NOT keep settings.

 5b. (Alternative to 5.) Flash it using the U-Boot and UART connection.
     Issue below commands in the U-Boot:
        tftpboot 0x81000000 Archer_D50v1_0.8.0_1.3_up_boot(170223)_full_2017-02-24_09.37.45.bin.mod
        erase 0x9f020000 +$filesize
        cp.b 0x81000000 0x9f020000 $filesize
        reset

Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [removed
default-state = "off", it's already the default, added pcie node,
fixed typo]
5 years ago
Chris Blake aee5c98619 ath79: add support for Aruba AP-105
SoC: Atheros AR7161-8C1A @ 680 MHz
RAM: 128MB - 2x Etron Technology EM6AB160TSA-5G
NOR: 16MB - 1x MXIC MX25L12845EMI-10G (SPI-NOR)
WI1: Atheros AR9223-AC1A 802.11bgn
WI2: Atheros AR9220-AC1A 802.11an
ETH: Atheros AR8021-BL1E + PoE
LED: Dual-Color Power/Status, Ethernet, WLAN2G and WLAN5G
BTN: 1 x Reset
I2C: AT97SC4303s TPM (needs driver!)
CON: RS232-level 8P8C/RJ45 Console Port - 9600 Baud

Factory installation:

 - Needs a u-boot replacement. See Wiki for
   information on how to do a in-circut flash with
   a SPI-Flasher like a CH314A or flashrom. Wiki page
   can be found at https://openwrt.org/toh/aruba/aruba_ap-105

 - Be careful when dis- and reassembling the device to
   not squish any of the antenna cables in the process!

 - Be sure to make a full 16 MiB backup of your device
   before flashing the new u-boot! This is needed if you
   ever have interest in reverting back to stock firmware.

Not working:

 - TPM (needs a driver)

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
5 years ago
Adrian Schmutzler d4b89b7170 ath79: Add support for TP-Link TL-WR1043N v5
Specifications:

 - QCA9563 at 775 MHz
 - 64 MB RAM Zentel A3R12E40CBF-8E
 - 16 MB flash Winbond W25Q128FVSG
 - 3 (non-detachable) Antennas / 450 Mbit
 - 1x/4x WAN/LAN Gbps Ethernet (QCA8337)
 - reset and Wi-Fi buttons

TP-Link TL-WR1043N v5 appears to be identical to the TL-WR1043ND v4,
except that the USB port has been removed and there is no longer a
removable antenna option. It also has different partitioning scheme.

The software is more in line with the Archer series in that it uses a
nested bootloader scheme.

(This has been adapted from the OpenWrt Wiki page)
<https://openwrt.org/toh/tp-link/tl-wr1043nd>

Installation on HW rev.5:

Factory firmware can be installed via the WEB interface.

Alternatively, it is also possible to use a TFTP server
for recovery purposes:
 - Rename OpenWRT or original firmware to WR1043v5_tp_recovery.bin
 - Set static IP of your PC to *192.168.0.66*
 - Router will obtain IP 192.168.0.86 for a few seconds while
   loading, when reset button pressed at power On.

And finally, there's always u-boot access through the UART.
For information visit the wiki.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[reworked commit message]
5 years ago
sven friedmann 30dcbc741d ath79: add support for EnGenius ECB1750
Specification:

- Qualcomm Atheros SoC QCA9558
- 720/600/200 MHz (CPU/DDR/AHB)
- 128 MB of RAM (DDR2)
- 16 MB of FLASH (SPI NOR)
- 1x 10/100/1000 Mbps Ethernet
- 3T3R 2.4 GHz (QCA9558 WMAC)
- 3T3R 5.8 Ghz (QCA9880-BR4A, Senao PCE4553AH)

https://fccid.io/A8J-ECB1750

Tested and working:

- lan, wireless, leds, sysupgrade (tftp)

Flash instructions:

1.) tftp recovery

- use a 1GbE switch or direct attached 1GbE link
- setup client ip address 192.168.1.10 and start tftpd
- save "openwrt-ath79-generic-engenius_ecb1750-initramfs-kernel.bin" as "ap.bin" in tfpd root directory
- plugin powercord and hold reset button 10secs.. "ap.bin" will be downloaded and executed
- afterwards login via ssh and do a sysuprade

2.) oem webinterface factory install (not tested)

Use normal webinterface upgrade page und select "openwrt-ath79-generic-engenius_ecb1750-squashfs-factory.bin".

3.) oem webinterface command injection

OEM Firmware already running OpenWrt (Attitude Adjustment 12.09).
Use OEM webinterface and command injection. See wiki for details.

https://openwrt.org/toh/engenius/engenius_ecb1750_1

Signed-off-by: sven friedmann <sf.openwrt@okay.ms>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[use interrupt-driven "gpio-keys" binding]
5 years ago
Sven Roederer e0d98e120a ath79: add TP-Link WR842N v3
This adds support for the TP-Link WR842N v3 which is already supported on ar71xx
target (0b45bec22c).

Specification:
* SoC: QCA9533 ver 2 rev 0
* 16 MB Flash (gd25q128)
* 64 MB RAM
* 1 WAN 10/100 MBit/s (blue connector)
* 4 LAN 10/100 MBit/s (AR8229; 4 ports; yellow connectors)
* Atheros AR9531 (2,4GHz, two fixed antennas)
* USB
* Reset / WPS button
* WiFi button (rf kill)
* 8 green leds; 1 red/green led
* serial console (115200 8N1, according to the OpenWrt-wiki some soldering is needed)

Installation:
* flash via vendor WebUI (the filename must not exceed certain length)
* sysupgrade from installed OpenWrt (also ar71xx)

Thanks to Holger Drefs for providing the hardware

Tested-by: @kofec (github)
Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
5 years ago
Daniel Gimpelevich f61e754522 ath79: add support for Netgear EX6400 and EX7300
This is sold as a dual-band 802.11ac range extender. It has a sliding
switch for Extender mode or Access Point mode, a WPS button, a recessed
Reset button, a hard-power button, and a multitude of LED's, some
multiplexed via an NXP 74AHC164D chip. The internal serial header pinout is
Vcc, Tx, Rx, GND, with GND closest to the corner of the board. You may
connect at 115200 bps, 8 data bits, no parity, 1 stop bit.

Specification:
- System-On-Chip: QCA9558
- CPU/Speed: 720 MHz
- Flash-Chip: Winbond 25Q128FVSG
- Flash size: 16 MiB
- RAM: 128 MiB
- Wireless No1: QCA9558 on-chip 2.4GHz 802.11bgn, 3x3
- Wireless No2: QCA99x0 chip 5GHz 802.11an+ac, 4x4
- PHY: Atheros AR8035-A

Installation:
If you can get to the stock firmware's firmware upgrade option, just feed
it the factory.img and boot as usual. As an alternative, TFTP the
factory.img to the bootloader.

Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
[whitespace fix in DTS and reorder of make variables]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Adrian Schmutzler 0a13f589c3 ath79: Correct MAC address for WAN interface of Archer A7/C7 v5
These devices share the network config with C7v4, thus the WAN MAC
also needs to be fixed the same way. However, the partition
where the MAC address resides has been changed.

Based on: https://github.com/openwrt/openwrt/pull/1726

Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Christian Mauderer 8a4dc6f48c ath79: add support for Ubiquiti airCube ISP
The Ubiquiti Network airCube ISP is a cube shaped 2.4 GHz with internal
2x2 MIMO antennas. It can be supplied via a USB connector or via PoE.
There are for 10/100 Mbps ports (1 * WAN + 3 * LAN). There is an
optional PoE passthrough from the first LAN port to the WAN port.

SoC:       Qualcomm / Atheros QCA9533-BL3A
RAM:       64 MB DDR2
Flash:     16 MB SPI NOR
Ethernet:  4x 10/100 Mbps (1 WAN + 3 LAN)
LEDS:      1x via a SPI controller (not yet supported)
Buttons:   1x Reset
Serial:    1x (only RX and TX); 115200 baud, 8N1

Missing points:
- LED not yet supported
- Factory upgrade via web IF or TFTP recovery not yet supported
  (Needs RSA signed images, for details see PR#1958)

The serial port is on a four pin connextor labeled J1 and located
between Ethernet and USB connector. The pinout is:
1. 3V3 (out)
2. Rx (in)
3. Tx (out)
4. GND

Upgrading via serial port / U-Boot:
- Connect the serial port via a level converter
- Power the system and stop U-Boot with pressing any key when `Hit any
  key to stop autoboot` is displayed. Note: Pressing space multiple
  times untill U-Boot reaches that location works well.
- Connect a PC with the IP 192.168.1.100 (or some other in that net)
  running a TFTP-Server to one of the LAN ports. Copy the sysupgrade
  image to the server.
- Set the U-Boot server IP with
    setenv serverip 192.168.1.100
- Load the flash image to RAM with
    tftpboot 0x81000000 sysupgrade.bin
- Erase the flash with
    erase 0x9f050000 0x9ffaffff
- Write the new flash content with
    cp 0x81000000 0x9f050000 ${filesize}
- Reset the device with
    reset

Signed-off-by: Christian Mauderer <oss@c-mauderer.de>
[removed full stop in subject and added lockdown note to commit message]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago