Commit Graph

74 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
Adrian Schmutzler 2c60de0e3f treewide: move MAC address patch functions to common library
This unifies MAC address patch functions and moves them to a
common script. While those were implemented differently for
different targets, they all seem to do the same. The number of
different variants is significantly reduced by this patch.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 5b6a809092 treewide: move calibration data extraction function to library
This moves the almost identical calibration data extraction
functions present multiple times in several targets to a single
library file /lib/functions/caldata.sh.

Functions are renamed with more generic names to merge different
variants that only differ in their names.

Most of the targets used find_mtd_chardev, while some used
find_mtd_part inside the extraction code. To merge them, the more
abundant version with find_mtd_chardev is used in the common code.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[rebase on latest master; add mpc85xx]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Adrian Schmutzler c1388a2deb base-files: move xor() from caldata extraction to functions.sh
The xor() function is defined in each of the caldata extraction
scripts for several targets. Move it to functions.sh to reduce
duplicate code.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Roger Pueyo Centelles bba6646b5c ath79: add support for COMFAST CF-E313AC
This patch adds support for the COMFAST CF-E313AC, an  outdoor wireless
CPE with two Ethernet ports and a 802.11ac radio.

Specifications:

 - QCA9531 SoC
 - 650/400/216 MHz (CPU/DDR/AHB)
 - 1x 10/100 Mbps WAN Ethernet, 48V PoE-in
 - 1x 10/100 Mbps LAN Ethernet, pass-through 48V PoE-out
 - 1x manual pass-through PoE switch
 - 64 MB RAM (DDR2)
 - 16 MB FLASH
 - QCA9886 2T2R 5 GHz 802.11ac, 23 dBm
 - 12 dBi built-in antenna
 - POWER/LAN/WAN/WLAN green LEDs
 - 4x RSSI LEDs (2x red, 2x green)
 - UART (115200 8N1)

Flashing instructions:

 The original firmware is based on OpenWrt so a sysupgrade image can be
 installed via the stock web GUI. Settings from the original firmware
 will be saved and restored on the new one, so a factory reset will be
 needed. To do so, once the new firmware is flashed, enter into failsafe
 mode by pressing the reset button several times during the boot
 process, while the WAN LED flashes, until it starts flashing faster.
 Once in failsafe mode, perform a factory reset as usual.

 Alternatively, the U-boot bootloader contains a recovery HTTP server
 to upload the  firmware. Push the reset button while powering the
 device on and keep it pressed for >10 seconds. The device's LEDs will
 blink several times and the recovery page will be at
 http://192.168.1.1; use it to upload the sysupgrade image.

Note:

 Four MAC addresses are stored in the "art" partition (read-only):
  - 0x0000: 40:A5:EF:AA:AA:A0
  - 0x0006: 40:A5:EF:AA:AA:A2
  - 0x1002: 40:A5:EF:AA:AA:A1
  - 0x5006: 40:A5:EF:AA.AA:A3 (inside the 5 GHz calibration data)

 The stock firmware assigns MAC addresses to physical and virtual
 interfaces in a very particular way:
  - eth0 corresponds to the physical Ethernet port labeled as WAN
  - eth1 corresponds to the physical Ethernet port labeled as LAN

  - eth0 belongs to the bridge interface br-wan
  - eth1 belongs to the bridge interface br-lan

  - eth0 is assigned the MAC from 0x0 (*:A0)
  - eth1 is assigned the MAC from 0x1002 (*:A1)

  - br-wan is forced to use the MAC from 0x1002 (*:A1)
  - br-lan is forced to use the MAC from 0x0 (*:A0)

  - radio0 uses the calibration data from 0x5000 (which contains
    a valid MAC address, *:A3). However, it is overwritten by the
    one at 0x6 (*:A2)

 This commit preserves the LAN/WAN roles of the physical Ethernet
 ports (as labeled on the router) and the MAC addresses they expose
 by default (i.e., *:A0 on LAN, *:A1 on WAN), but swaps the position
 of the eth0/eth1 compared to the stock firmware:
  - eth0 corresponds to the physical Ethernet port labeled as LAN
  - eth1 corresponds to the physical Ethernet port labeled as WAN

  - eth0 belongs to the bridge interface br-lan
  - eth1 is the interface at @wan

  - eth0 is assigned the MAC from 0x0 (*:A0)
  - eth1 is assigned the MAC from 0x1002 (*:A1)

  - br-lan inherits the MAC from eth0 (*:A0)
  - @wan inherits the MAC from eth1 (*:A1)

  - radio0's MAC is overwritten to the one at 0x6

This way, eth0/eth1's positions differ from the stock firmware, but
the weird MAC ressignations in br-lan/br-wan are avoided while the
external behaviour of the router is maintained. Additionally, WAN
port is connected to the PHY gmac, allowing to monitor the link
status (e.g., to restart DHCP negotiation when plugging a cable).

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
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
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
Adrian Schmutzler b133e466b0
treewide: convert WiFi caldata size and offset to hexadecimal
This changes size and offset set for WiFi caldata extraction and
MAC address adjustment to hexadecimal notation.

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

Since dd cannot deal with hexadecimal notation, one has to convert
back to decimal by simple $(($hexnum)).

Acked-by: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
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
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
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
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
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
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 1174b94bc9 ath79: Fix whitespace errors in 11-ath10k-caldata
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 28baaaae82 ath79: Merge cases in 11-ath10k-caldata
Cosmetical patch that just merges two cases.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
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 4d807ad2d9 ath79: Read MAC addresses from flash in 11-ath10k-caldata
In commit c3a8518 eth0 and eth1 have been swapped for some devices,
but 11-ath10k-caldata has not been updated.
Instead of fixing this by swapping eth0/eth1, this patch will read
addresses from flash (as done for several devices already) so
adjustments due to eth order become obsolete.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
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
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
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
Markus Scheck de2f888024 ath79: add support for OCEDO Ursus
SOC:   Qualcomm Atheros QCA9558
RAM:   128MB
FLASH: 16MB (Macronix MX25L12845EMI-10G)
WLAN1: QCA9558 2.4GHz 802.11bgn 3SS
WLAN2: QCA9880 5GHz 802.11ac 3SS
LED:   Power, LAN1, LAN2, 2.4GHz, 5GHz
Serial:Next to SPI Flash,
       Pinout is 3V3 - GND - TX - RX (Square Pin is 3V3)
       The Serial setting is 115200-8-N-1

INSTALLATION:

1. Serve an OpenWrt ramdisk image named "ursus.bin".
   Set your IP-address to 192.168.100.8/24.
2. Connect to the serial. Power up the device and interrupt
   the boot process.
3. Set the correct bootcmd with
   > setenv bootcmd run bootcmd_1
   > saveenv
4. Run
   > tftpboot 0x81000000 ursus.bin
   > bootm 0x81000000
5. Wait for OpenWrt to boot up.
6. Transfer OpenWrt sysupdate image and flash via sysupgrade.

Signed-off-by: Markus Scheck <markus.scheck1@gmail.com>
Tested-by: David Bauer <mail@david-bauer.net>
[whitespace fix, renamed LED labels and SoC type fix]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
INAGAKI Hiroshi 643fcfc8d6 ath79: add support for NEC Aterm WG1200CR
NEC Aterm WG1200CR is a 2.4/5 GHz band 11ac router,
based on Qualcomm Atheros QCA9563.

Specification:

- SoC		: Qualcomm Atheros QCA9563
- RAM		: DDR2 128 MiB
- Flash		: SPI-NOR 8 MiB
- WLAN		: 2.4/5 GHz 2T2R
  - 2.4 GHz	: QCA9563 (SoC)
  - 5 GHz	: QCA9888
- Ethernet	: 2x 10/100/1000 Mbps
  - Switch	: QCA8334
- LEDs/Input	: 12x/4x (2x buttons, 1x slide-switch)
- UART		: through-hole on PCB
  - JP1: Vcc, GND, NC, TX, RX from power connector side
  - 115200 bps

Flash instruction using factory image:

1. Boot WG1200CR normaly
2. Access to "http://192.168.10.1/" and open firmware update page
("ファームウェア更新")
3. Select the OpenWrt factory image and click update ("更新") button
to perform firmware update
4. Wait ~150 seconds to complete flashing

Known issues:

- cannot be controlled LEDs other than Power (Green/Red)
  - only Power LEDs are connected to SoC GPIO; other LEDs
    connected to the gpiochip on ath10k chip (QCA9888)

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [commit
message formatting]
5 years ago
Tobias Schramm d78e229903 ath79: Add support for Ubiquiti NanoBeam AC
The NanoBeam is a small AR9342 based directional 5 GHz AC CPE with hardware
almost identical to the Ubiquiti NanoStation AC loco. Over the NanoStation
AC loco it has 5 additional LEDs. Four of those LEDs are used as rssi
indicators, the fifth LED is used as an ethernet link/activity indicator.

CPU:   Atheros AR9342 SoC
RAM:   64 MB DDR2
Flash: 16 MB NOR SPI
WLAN:  QCA988X
Ports: 1x GbE

Flashing procedure is identical to the NanoStation AC loco and can be performed
either via serial or the factory firmware upgrade.

Serial flashing:

1. Connect to serial header on device (8N1 115200)
2. Power on device and enter uboot console
3. Set up tftp server serving an openwrt initramfs build
4. Load initramfs build using the command tftpboot in the uboot cli
5. Boot the loaded image using the command bootm
6. Copy squashfs openwrt sysupgrade build to the booted device
7. Use mtd to write sysupgrade to partition "firmware"
8. Reboot and enjoy

Flashing through factory firmware:

1. Ensure firmware version v8.5.0.36727 is installed. Up/downgrade to this exact version.
2. Patch fwupdate.real binary using `hexdump -Cv /bin/ubntbox | sed 's/14 40 fe fe/00 00 00 00/g' | hexdump -R > /tmp/fwupdate.real`
3. Make the patched fwupdate.real binary executable using `chmod +x /tmp/fwupdate.real`
4. Copy the squashfs factory image to /tmp on the device
5. Flash OpenWRT using `/tmp/fwupdate.real -m <squashfs-factory image>`
6. Wait for the device to reboot

Thanks to @cybermaus for testing!

Tested-by: Maurits van Dueren den Hollander <cybermaus@gmail.com>
Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
5 years ago
Adrian Schmutzler e1ba59ea5c ath79: Speed up caldata/eeprom handling
Reading and writing to and from flash storage is slowed down
enormously by some functions which use a block size of 1.

This patch reworks the extraction scripts to be much faster and
efficient by reading and writing in possibly one big block.

This is based on the initial commit a69e101 for ipq40xx by
Christian Lamparter <chunkeey@gmail.com>.

Speed comparison @ UBNT AC-Mesh (just manually) results
in a time reduction by three orders of magnitude (99.9 %).

> time dd if=/dev/mtd6 of=/lib/firmware/test-slow bs=1 count=4096 skip=4096
4096+0 records in
4096+0 records out
real    0m 16.84s
user    0m 0.07s
sys     0m 13.54s

> time dd if=/dev/mtd6 of=/lib/firmware/test-fast bs=4096 count=1 skip=4096 iflag=skip_bytes
1+0 records in
1+0 records out
real    0m 0.02s
user    0m 0.00s
sys     0m 0.02s

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Rosen Penev <rosenp@gmail.com>
5 years ago
Tomasz Maciej Nowak ee34740ca3 ath79: add suport for EnGenius EPG5000
EnGenius EPG5000 (v1.0.0, marketed as IoT Gateway) is a dual band
wireless router.

Specification
SoC:		Qualcomm Atheros QCA9558
RAM:		256 MB DDR2
Flash:		16 MB SPI NOR
WIFI:		2.4 GHz 3T3R integrated
		5 GHz 3T3R QCA9880 Mini PCIe card
Ethernet:	5x 10/100/1000 Mbps QCA8337N
USB:		1x 2.0
LEDS:		4x GPIO controlled
Buttons:	2x GPIO controlled
UART:		4 pin header, starting count from white triangle on PCB
		1. VCC 3.3V, 2. GND, 3. TX, 4. RX
		baud: 115200, parity: none, flow control: none

Installation
1. Connect to one of LAN (yellow) ethernet ports,
2. Open router configuration interface,
3. Go to Tools > Firmware,
4. Select OpenWrt factory image with dlf extension and hit Apply,
5. Wait few minutes, after the Power LED will stop blinking, the router
   is ready for configuration.

Alternative installation
1. Prepare TFTP server with OpenWrt sysupgrade image,
2. Connect to one of LAN (yellow) ethernet ports,
3. Connect to UART port (leaving out VCC pin!),
4. Power on router,
5. When asked to enter a number 1 or 3 hit 2, this will select flashing
   image from TFTP server option,
6. You'll be prompted to enter TFTP server ip (default is 192.168.99.8),
   then router ip (default is 192.168.99.9) and for last, image name
   downloaded from TFTP server (default is uImageESR1200_1750),
7. After providing all information U-Boot will start flashing the image,
   You can observe progress on console, it'll take few minutes and when
   the Power LED will stop blinking, router is ready for configuration.

Additional information
If connected to UART, when prompted for number on boot, one can enter
number 4 to open bootloader (U-Boot) command line.
OEM firmware shell password is: aigo3d0a0tdagr
useful for creating backup of original firmware.
When doing upgrade from OpenWrt ar71xx image, it is recomended to not keep
the old configuration.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years ago
Piotr Dymacz db91418766 ath79: add support for TP-Link RE350K v1
TP-Link RE350K v1 (FCC ID: TE7RE350K) is a wall-plug AC1200 Wi-Fi range
extender with 'Kasa Smart' support. Device is based on Qualcomm/Atheros
QCA9558 + QCA9882 + AR8035 platform and is available only on US market.

Specification:

- 720/600/200 MHz (CPU/DDR/AHB)
- 128 MB of RAM (DDR2)
- 16 MB of flash (SPI NOR)
- 1x 1 Gbps Ethernet (AR8035)
- 2T2R 2.4 GHz (QCA9558), with ext. PA (SE2565T) and LNA (SKY65971-11)
- 2T2R 5 GHz (QCA9882), with ext. PA (SE5003L1-R) and LNA (SKY65981-11)
- 2x U.FL connector on PCB
- 2x dual-band PCB antennas
- 1x LED, 2x dual-color LED (all driven by GPIO)
- 3x button (app config, led, reset)
- 1x mechanical on/off slide switch
- 1x UART (4-pin, 2.54 mm pitch) header on PCB
- 1x JTAG (8-pin, 1.27 mm pitch) header on PCB

Flash instruction:
Use 'factory' image directly in vendor GUI (default IP: 192.168.0.254,
default credentials: admin/admin).

Warning:
This device does not include any kind of recovery mechanism in U-Boot.

Vendor firmware access:
You can access vendor firmware over serial (RX line requires jumper
resistor in R306 place, near XTAL) with: root/sohoadmin credentials.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
5 years ago
Piotr Dymacz 6fa94d5e8f ath79: add support for YunCore A770
YunCore A770 is a ceiling AC750 AP with 2 Fast Ethernet ports, PoE
(802.3at) support, based on QCA9531 + QCA9887.

Specification:

- 650/597/216 MHz (CPU/DDR/AHB)
- 128 MB of RAM (DDR2)
- 16 MB of flash (SPI NOR)
- 2x 10/100 Mbps Ethernet (PoE 802.3at support in WAN port)
- 2T2R 2.4 GHz (QCA9531), with ext. PA and LNA
- 1T1R 5 GHz (QCA9887), with ext. FEM (SKY85728-11)
- 2x regular LED, 1x RGB LED (all driven by GPIO)
- 1x button (reset)
- DC jack for main power input (12 V)
- UART header on PCB

Flash instruction:

1. First, gain root access to the device, following below steps:

- Login into web gui (default password/IP: admin/192.168.188.253).
- Go to 'Advanced' -> 'Management' -> 'System' and download backup of
  configuration (bakfile.bin).
- Open the file as tar.gz archive, edit/update 'shadow' file and change
  hash of root password to something known.
- Repack the archive, rename it back to 'bakfile.bin' and use to
  restore configuration of the device.
- After that, device will reboot and can be accessed over SSH.

2. Then, install OpenWrt:

- Login over SSH and issue command:
  fw_setenv bootcmd "bootm 0x9f050000 || bootm 0x9fe80000"
- Upload 'sysupgrade' image and install it (only if previous command
  succeeded) with command: 'sysupgrade -n -F openwrt-...'.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
5 years ago
Bart Lauret 4386054549 ath79: add support for TP-Link Archer C5 v1
TP-Link Archer C5 v1 is a dual band router
based on Qualcomm/Atheros QCA9558 + QCA9880.

Specification:

 - 720 MHz CPU
 - 128 MB of RAM (Various chips)
 - 16 MB of FLASH (Various chips)
 - SoC QCA9558 integrated 3T3R 2.4 GHz Wi-Fi
 - minipcie slot with 3T3R 5 GHz QCA9880-BR4A
 - 5x 10/100/1000 Mbps Ethernet (AR8327N Switch)
 - 10x LEDs, 2x software buttons

For further informwation on the device, visit the wiki:
<https://openwrt.org/toh/tp-link/archer-c5-c7-wdr7500>

Signed-off-by: Bart Lauret <bblauret@gmail.com>
5 years ago
Oldřich Jedlička 12310f05b7 ath79: add support for TP-LINK Archer C7 v4
TP-Link Archer C7 v4 is a dual-band AC1750 router, based on the
Qualcomm/Atheros QCA9561 SoC + QCA9880.

Specification:

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

Flash instruction:
1. Upload openwrt-ath79-generic-tplink_archer-c7-v4-squashfs-factory.bin
   via Web interface

Flash instruction using TFTP recovery:
1. Set PC to fixed ip address 192.168.0.66
2. Download openwrt-ath79-generic-tplink_archer-c7-v4-squashfs-factory.bin
   and rename it to ArcherC7v4_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: Oldřich Jedlička <oldium.pro@gmail.com>
5 years ago
Skirmantas Lauzikas 9c01273e5e ath79: add support for TP-Link Archer C2 V3 (AC900)
This commit adds support for the TP-link Archer C2 V3 (AC900).

Specifications:

 - CPU: QCA9563 750Mhz
 - Ram: 64MB (DDR2)
 - Flash: 8MB (SPI NOR)
 - Ethernet: 5x 10/100/1000
 - Wifi: QCA9563 bgn + QCA9887 an+ac
 - 9x Leds, 2x buttons

Flash instructions:

Upload openwrt-ath79-generic-tplink_archer-c2-v3-squashfs-factory.bin
via the router Web interface and flash as normal firmware update.

Signed-off-by: Skirmantas Lauzikas <skirmantas.lauzikas@blackraven.lt>
[reorder entries, fix trailing whitespace in dts, add firmware partition
 compatible string, remove led default off states, use default on state
 for system led, reuse tplink-safeloader-uimage image build recipe, squash
 with dynamic partitioning commit, reword commit message, add
 installation instructions]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Django Armstrong 1c2f7b5115 ath79: add support for Devolo WiFi Pro 1750e
Hardware
--------
CPU:   Qualcomm Atheros QCA9558
RAM:   128M DDR2
FLASH: 16MiB
ETH:   1x Atheros AR8035 (PoE in)
       1x Atheros AR8033
WiFi2: QCA9558 3T3R (SiGE SE2565T 2.4 GHz power amp x3)
WiFi5: QCA9880 3T3R (Skyworks 5003L1 5 GHz power amp x3)
BTN:   1x Reset
       1x WPS
       1x USB eject
LED:   1x LED blue
       1x LED red
BEEP:  1x GPIO attached piezo beeper
UART:  3.3V GND TX RX (115200-N-8) (3.3V is pin closest to rear ports)
       Dupont 4 pin header
       Rear RJ45 serial port non-functional
USB:   1x v2.0

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 previously set in the web interface.

2. Install OpenWRT with

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

Signed-off-by: Django Armstrong <iamdjango@hotmail.com>
5 years ago
David Bauer c8115167f9 ath79: add support for devolo WiFi pro 1200i
Hardware
--------
CPU:   Qualcomm Atheros QCA9558
RAM:   128M DDR2
FLASH: 16MiB
ETH:   1x Atheros AR8035 (PoE in)
WiFi2: QCA9558 2T2R
WiFi5: QCA9880 2T2R
BTN:   1x Reset
LED:   1x LED blue
       1x LED red
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 reset-button

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
David Bauer 8d68be8057 ath79: add support for devolo WiFi pro 1750i
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 blue
       1x LED red
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 reset-button

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
Christoph Krapp 59b99e1924 ath79: align GL-AR750S boardname to other GL.iNet devices
As the official device name is GL-AR750S, rename the board accordingly.

Signed-off-by: Christoph Krapp <achterin@googlemail.com>
5 years ago
Georgi Vlaev d03aae1a09 ath79: add support for TP-Link Archer C6 v2
This patch adds support for TP-Link Archer C6 v2 (EU)

Hardware specification:
- SOC: Qualcomm QCA9563 @ 775MHz
- Flash: GigaDevice GD25Q64CSIG (8MiB)
- RAM: Zentel A3R1GE40JBF (128 MiB DDR2)
- Ethernet: Qualcomm QCA8337N: 4x 1Gbps LAN + 1x 1Gbps WAN
- Wireless:
  - 2.4GHz (bgn) QCA9563 integrated (3x3)
  - 5GHz (ac) Qualcomm QCA9886 (2x2)
- Button: 1x power, 1x reset, 1x wps
- LED: 6x LEDs: power, wlan2g, wlan5g, lan, wan, wps
- UART: There's no UART header on the board

Flash instructions:

Upload
openwrt-ath79-generic-tplink_archer-c6-v2-squashfs-factory.bin
via the router Web interface.

Flash instruction using tftp recovery:

1. Connect the computer to one of the LAN ports of the router
2. Set the computer IP to 192.168.0.66
3. Start a tftp server with the OpenWrt factory image in the
   tftp root directory renamed to ArcherC6v2_tp_recovery.bin.
4. Connect power cable to router, press and hold the reset
   button and turn the router on
5. Keep the reset button pressed until the WPS LED lights up
6. Wait ~150 seconds to complete flashing

According to the GPL source the non-EU variant has different
GPIOs assigned to some of the LEDs and buttons. The flash
layout might be different as well. The wikidevi entry for
Archer A6/C6 assumes they are identical.

Signed-off-by: Georgi Vlaev <georgi.vlaev@gmail.com>
5 years ago
Guan-Hong Lin 9ebb44aef4 ath79: add support for EnGenius EWS511AP
EnGenius EWS511AP is a wireless managed wall AP with PoE support,
based on Qualcomm/Atheros QCA9531(Honeybee) + QCA9887.

Short specification:

- 128MB of RAM
- 16 MB of SPI FLASH
- 2T2R 2.4 GHz (QCA9531), 802.11b/g/n
- 1T1R 5 GHz (QCA9887), 802.11ac/n/a
- 2x 10/100 Mbps Ethernet (one port with PoE support)
- 1x Power LED, 2x LAN LEDs, 1x WLAN 2.4G LED, 1x WLAN 5G LED
- 1x RESET button
- built-in watchdog chipset

Flash instruction:

From EnGenius firmware to OpenWrt firmware:

Original firmware is based on QSDK.
Use sysupgrade firmware directly in vendor GUI.
Reset to factory default is necessary.

From OpenWrt firmware to EnGenius firmware:

1. Setup a TFTP server on your computer and configure static IP to 192.168.99.8
   Put the OpenWrt firmware in the root directory on your computer.
2. Power up EWS511AP. Press 4 and then press any key to enter u-boot.
3. Download OpenWrt firmware
   (ath)> tftpboot 0x80060000 ${dir}"openwrt-ath79-generic-engenius_ews511ap-squashfs-sysupgrade.bin"
4. Flash the firmware
   (ath)> erase 0x9f060000 +f50000
   (ath)> cp.b $fileaddr 0x9f060000 $filesize
5. Reboot
   (ath)> reset

Signed-off-by: Guan-Hong Lin <GH.Lin@senao.com>
5 years ago
INAGAKI Hiroshi caf306ce91 ath79: add support for ELECOM WRC-1750GHBK2-I/C
ELECOM WRC-1750GHBK2-I/WRC-1750GHBK2-C are 2.4/5 GHz band 11ac
routers, based on Qualcomm Atheros QCA9563.

This commit also includes small fix; use "0x0x03000101" as pll_1000
instead of "0x03000000".

Specification:

- SoC:      Qualcom Atheros QCA9563
- RAM:      128 MB (DDR2)
- Flash:    16 MB (SPI-NOR)
- WLAN:     2.4/5 GHz
  - 2.4 GHz: 2T2R (SoC internal)
  - 5 GHz:   3T3R (QCA9880)
- Ethernet: 10/100/1000 Mbps
- LED/key:  4x/3x (2x buttons, 1x slide-switch)
- UART:     through-hole on PCB
  - Vcc, RX, GND, TX from switch (QCA8337N) side
  - 115200n8

Flash instruction using factory image:

1. Boot WRC-1750GHBK2-I/C normaly
2. Access to "http://192.168.2.1/" and open firmware upgrade page
("ファームウェア更新 手動更新(アップデート)")
3. Select the OpenWrt factory image and click apply ("適用") button
to perform firmware update
4. On the (initramfs) factory image, perform sysupgrade with
squashfs-sysupgrade image
5. Wait ~150 seconds to complete flashing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 years ago
David Bauer 98f826fdc0 ath79: use caldata patching for Archer C58/C59
With this commit the TP-Link Archer C58 and Archer C59 use caldata
patching in order to set the correct 5GHz MAC-address.

Tested on TP-Link Archer C59 v1.

For more details see commit 330965b.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Christoph Krapp af28d8a539 ath79: add support for GL.iNet GL-AR750S
Right now this patch adds nor image generation only. NAND image
generation is not supportet at the moment.

Furtheremore support for the MicroSD port is not implemented as of now.

Specification:
- SOC: QCA9563 (775MHz)
- Flash: 16 MiB (W25Q128FVSG)
- RAM: 128 MiB DDR2
- Ethernet: 2x 1Gbps LAN + 1x 1Gbps WAN
- Wireless: 2.4GHz (bgn) and 5GHz (ac)
- USB: 1x USB 2.0 port
- Button: 1x switch button, 1x reset button
- LED: 3x LEDS (green)
  - Another LED can be accessed on GPIO 7 if soldered

Flash instruction:
- Set static ip to 192.168.1.2
- Unplug the power cord
- Hold reset button
- Plug power back in
- Right led will flash 5 times
- Release reset button
- Browse to 192.168.1.1
- Choose sysupgrade image in NOR-flash section
- Press "update nor firmware"
- After successful transfer unplug network cable before device restarts

Signed-off-by: Christoph Krapp <achterin@googlemail.com>
[resolve merge conflicts, rename buttons, use switch input type for mode
switch]
Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Weijie Gao abc7ed2c58 ath79: add support for D-Link DIR-859 A1
Hardware spec of DIR-859 A1:
SoC: QCA9563
DRAM: 64MB DDR2
Flash: 16MB SPI-NOR
Switch: QCA8337N
WiFi 5.8GHz: QCA9880

USB is supported on the PCB but not connected.

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: Weijie Gao <hackpascal@gmail.com>
[squash commits, use common seama recipes, sync factory image recipe
with ramips version]
Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
David Bauer 97dc323a4c ath79: fix Archer A7 v5 5GHz MAC adress
Currently all Archer A7 v5 have the same (incorrect) MAC address.
The address is currently derived from eth1 which is not present on the
QCA9563. Use eth0 to get the correct MAC address.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
David Bauer e67da34431 ath79: add support for devolo WiFi pro 1750c
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 blue
       1x LED red
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 reset-button

There is also a Micro-B USB-port present but this only seems to be a
dummy as the circuit next to it is not present (at least in my unit).

It is also not mentioned in the devolo manual.

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
David Bauer 1724d4e9ed ath79: add support for devolo WiFi pro 1200e
Hardware
--------
CPU:   Qualcomm Atheros QCA9558
RAM:   128M DDR2
FLASH: 16MiB
ETH:   1x Atheros AR8035 (PoE in)
       1x Atheros AR8033
WiFi2: QCA9558 2T2R
WiFi5: QCA9880 2T2R
BTN:   1x Reset
LED:   1x LED blue
       1x LED red
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 reset-button

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