Commit Graph

198 Commits (9601d94138de66e4fc9f55a08dfb348cdfcc3181)

Author SHA1 Message Date
Antonio Silverio 9601d94138 ath79: add support for TP-Link TL-WR841N/ND v8
CPU: Atheros AR9341 535MHz
RAM: 32MB
FLASH: 4MiB
PORTS: 4 Port 100/10 Switch, 1 Port 100/10 Wan
WiFi: Atheros AR9341 2x2:2 bgn
LED: Power (static on), LAN (controlled by Switch), WAN, SYS, WiFi, RFKill
BTN: WPS, WiFi, Reset

Installation:
Upload the factory image via the vendor-GUI.

Signed-off-by: Antonio Silverio <menion@gmail.com>
[resolve merge conflicts, squash commits, fix commit title, remove
default default off led properties, mark sysupgrade image compatible
with the ar71xx version of the board, drop blank lines from dts]
Signed-off-by: Mathias Kresin <dev@kresin.me>
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
David Bauer 06b1a6e885 ath79: fix OCEDO Koala ethernet configuration
The OCEDO Koala has incorrect PLL settings which result in ~3% packet
loss on ethernet connections.

Also omit the gmac-configuration as it's incorrect too.

Signed-off-by: David Bauer <mail@david-bauer.net>
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
Petr Štetiar 6ab138fa84 ath79: ubnt-bullet-m-xw: Remove eth1 disabled node
It's redundant as eth1 is disabled by default in ath79.dtsi.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Petr Štetiar 74f46d90be ath79: ubnt-bullet-m-xw: Move eth0 mtd-mac-address to the common include
It's same for Bullet and Nanostation so far, so let's hope it's going to
be the same for other boards sharing the same platform.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Petr Štetiar 6935d73851 ath79: ubnt-bullet-m-xw: Remove pll-data property from eth0 node
It's not necessary as it's already defined in ar934x.dtsi to:

  pll-data = <0x16000000 0x00000101 0x00001616>;

And in ar71xx it's currently set to the same values:

 #define AR934X_PLL_VAL_1000	0x16000000
 #define AR934X_PLL_VAL_100	0x00000101
 #define AR934X_PLL_VAL_10	0x00001616

And dumping the value from the airOS v6.1.7 has the same value:

  AR934X_PLL_ETH_XMII_CONTROL_REG 0x1805002C 0x101

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Petr Štetiar 965ce07dbb ath79: ubnt-xw: Add LED aliases for diag and status LED support
Currently there is no LED signalization for various system states
implemented in diag.sh, so this patch adds support for it.

Tested-by: Joe Ayers <ae6xe@arrl.net>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
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
TOCK Chiu 8471944325 ath79: add support for TP-Link Archer C7 v5
This commit adds support for TP-Link Archer C7 v5, leveraging most effort
from commit ea9baee and 1e4ee63. Archer C7 v5 is identical to Archer A7 v5
but with a different flash layout.

Specification:
-   QCA9563 SoC (750 MHz)
-   128 MiB of RAM (DDR2)
-   16 MiB of flash (SPI)
-   5x 1 Gbps Ethernet (1x WAN + 4x LAN)
-   2.4GHz (bgn) SoC internal + 5GHz (ac) QCA9880
-   10x LED, 2x button
-   UART header on PCB

Flash instructions:
1.  Upload openwrt-ath79-generic-tplink_archer-c7-v5-squashfs-factory.bin
    via web interface.

Flash instructions using TFTP recovery:
1.  Plug PC to one of the LAN ports
2.  Set PC to fixed IP address 192.168.0.66
3.  Rename the factory image to ArcherC7v5_tp_recovery.bin and place it in
    TFTP root directory
4.  Turn on the router with the reset button pressed for about 15 secs
5.  Release the button and wait about 150 secs to complete flashing

Signed-off-by: TOCK Chiu <tock.chiu@gmail.com>
5 years ago
Christian Lamparter 87c5fd348d ath79: fix pinmux reg size for QCA955x
The range of pinmux reg property "<0x1804002c 0x40>" for QCA955x
SoC does not includes GPIO_FUNCTION register.

Reported-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
INAGAKI Hiroshi c566439c9b ath79: add support for NEC Aterm WG800HP
NEC Aterm WG800HP is a 2.4/5 GHz band 11ac router, based on Qualcomm
Atheros QCA9563.

Specification:

- Qualcomm Atheros QCA9563
- 64 MB of RAM (DDR2)
- 8 MB of Flash (SPI-NOR)
- 2.4/5 GHz wifi
  - 2.4 GHz: 2T2R (SoC internal)
  - 5 GHz: 1T1R (QCA9887)
- 4x 10/100/1000 Mbps Ethernet
- 8x LEDs, 3x keys (2x buttons, 1x slide-switch)
- UART through-hole on PCB (J2)
  - Vcc, GND, NC, TX, RX from SoC side
  - 115200n8

Flash instruction using factory image:

1. Connect the computer to the LAN port on WG800HP
2. Connect power cable to WG800HP and turn on it
3. Access to "http://192.168.10.1/" and open firmware update page
("ファームウェア更新")
4. Select the OpenWrt factory image and click update ("更新") button
5. Wait ~150 seconds to complete flashing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 years ago
INAGAKI Hiroshi 10a54e1442 ath79: fix pinmux reg value for QCA956x
The range of pinmux reg property "<0x1804002c 0x40>" for QCA956x SoC
does not includes GPIO_FUNCTION register.

If the device uses "&jtag_disable_pins", this causes the following
errors:

[    1.982937] pinctrl-single 1804002c.pinmux: mux offset out of range: 0x40 (0x40)
[    1.990622] pinctrl-single 1804002c.pinmux: could not add functions for pinmux_jtag_disable_pins 64x

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 years ago
Christian Lamparter b9501cecde ath79: dts: Remove newly added default-state=off property
I'm afraid that this will be "one of many" patches to come.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Petr Štetiar 0d23fd2ab2 treewide: dts: Remove default-state=off property from all gpio LED nodes
>From the Documentation/devicetree/bindings/leds/common.txt:

- default-state : The initial state of the LED. Valid values are "on", "off",
  and "keep". If the LED is already on or off and the default-state property is
  set the to same value, then no glitch should be produced where the LED
  momentarily turns off (or on). The "keep" setting will keep the LED at
  whatever its current state is, without producing a glitch.  The default is
  off if this property is not present.

So setting the default-state of the LEDs to `off` is redundant as `off`
is default LED state anyway. We should remove it as almost every new
PR/patch submission contains this property by default which seems to be
just copy&paste from some DTS file already present in the tree.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Karl-Felix Glatzer 1e4ee63cc8 ath79: add support for TP-Link Archer A7
This patch adds support for TP-Link Archer A7

Specification:
- SOC: QCA9563
- Flash: 16 MiB (SPI)
- RAM: 128 MiB (DDR2)
- Ethernet: 4x 1Gbps LAN + 1x 1Gbps WAN
- Wireless:
  - 2.4GHz (bgn) SoC internal
  - 5GHz (ac) QCA988x
- USB: 1x USB 2.0 port
- Button: 1x power, 1x reset, 1x wps
- LED: 10x LEDs
- UART: holes in PCB
  - Vcc, GND, RX, TX from ethernet port side
  - 115200n8

Flash instructions:

Upload openwrt-ath79-generic-tplink_archer-a7-v5-squashfs-factory.bin
via the Webinterface.

Flash instruction using tftp recovery:

1. Connect the computer to one of the LAN ports of the Archer A7
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 ArcherC7v5_tp_recovery.bin
2. Connect power cable to Archer A7, press and hold the reset button
   and turn the router on
3. Keep the reset button pressed for ~5 seconds
4. Wait ~150 seconds to complete flashing

Changes since first revision:

  - Flash instructions using stock image webinterface
  - Changed "Version 5" in model string to "v5"
  - Split DTS file in qca9563_tplink_archer-x7-v5.dtsi
    and qca9563_tplink_archer-a7-v5.dts
  - Firmware image is now build with dynamic partitioning
  - Default to ath10k-ct

Changes since second revision:
  - Changed uboot@0 to uboot@20000 in DTS file
  - Fixed ordering issue in board led script
  - Specify firmware partition format in DTS file
  - Rebased Makefile device definition on common
    Device/tplink-safeloader-uimage definition
  - Merged switch section in network script
    (same configuration as tplink,tl-wdr3600
    and tplink,tl-wdr4300)

Signed-off-by: Karl-Felix Glatzer <karl.glatzer@gmx.de>
5 years ago
Petr Štetiar d9753f0ec5 ath79, brcm63xx: Fix debounce-interval properties in gpio-keys-polled nodes
This patch fixes wrong usage of debounce-interval subnode property of
gpio-keys-polled nodes, which was used inproperly in parent node, but it
belongs to the subnodes, excerpt from the docs:

 Optional subnode-properties:
     - debounce-interval: Debouncing interval time in milliseconds.
       If not specified defaults to 5.

And the docs are up to date as the source code matches that description
as well:

 if (fwnode_property_read_u32(child, "debounce-interval",
                              &button->debounce_interval))
         button->debounce_interval = 5;

While at it, I've also re-formatted gpio-keys-polled nodes, usually just
adding new lines after every key subnode.

Cc: Tomasz Maciej Nowak <tomek_n@o2.pl>
Cc: Matt Merhar <mattmerhar@protonmail.com>
Cc: Jonas Gorski <jonas.gorski@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Sebastian Kemper 6c3c4436ee ath79: add d-link dir-825-c1 and dir-835-a1
This commit ports both dir-825-c1 and dir-835-a1 from ar71xx to ath79.
They're pretty much identical, except dir-835-a1 has less LEDs.

The routers come with 128 MByte of RAM and 16 MBytes of flash and sport
2.4GHz and 5.0GHz wireless. Both routers have entries already in
OpenWrt's TOH. Please check there for more information on these
antiquities.

https://openwrt.org/toh/hwdata/d-link/d-link_dir-825_c1
https://openwrt.org/toh/hwdata/d-link/d-link_dir-835_a1

Installation:

1. Connect to the web interface of the vendor firmware (usually
   listening on 192.168.0.1).
2. Go to "Tools", then "Firmware".
3. In the "Firmware Upgrade" box click "Browse".
4. Select the OpenWrt factory image for your router.
5. Click "Upload", confirm the popups if you agree to flash the file you
   selected.
6. Wait for firmware upgrade to complete. It takes about 5 minutes.

Run-tested on dir-825-c1. dir-835-a1 should work as well, but I don't
have this router so I can't confirm.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [trivial changes]
5 years ago
Marcin Jurkowski 3c3eaa57d9 ath79: add support for TP-Link TL-WR842N/ND v1 router
This ports support for TP-Link TL-WR842N/ND v1 from ar71xx.

CPU: Atheros AR7241 400 MHz
RAM: 32 MiB
FLASH: 8 MiB
PORTS: 4 Port 100/10 Switch, 1 Port 100/10 Wan
WiFi: Atheros AR9287
LED: SYS, WiFi, LAN, WAN, 3G, QSS
BTN: WiFi, Reset/WPS

AR71xx target used "tl-mr3420" as board id so force flag is needed
if upgrading from old target.

Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [trivial cleanup]
5 years ago
Mathias Kresin 0fdfdaef2d ath79: fix dtc compiler warnings
The qca9557/qca956x reset-controller aren't a simple bus. A simple bus
would require node unit addresses.

Add the node unit addresses for the qca9557 usb phys. Add the regs for
the USB_PWRCTL and USB_CONFIG registers even not yet used.

Fix the wrong ar7100 pcie controller node unit address as well.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Daniel F. Dickinson 32bc733796 ath79: dts: Use PowerCloud CAP324 bicolor status LED
PowerCloud Systems CAP324 has a bicolor power LED and OpenWrt DTS files /
base files support using both colours to better inform user of state
and to better match stock firmware, so use green power to indicate
normal operation.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
6 years ago
INAGAKI Hiroshi 3358cae523 ath79: add support for I-O DATA WN-AG300DGR
I-O DATA WN-AG300DGR is a 2T2R 2.4/5 GHz 11n router, based on Atheros
AR1022.

WN-AG300DGR does not have an LED to indicates power or system status,
I set "router" LED as OpenWrt status LED.

There is no eeprom data for 5 GHz wlan in "art" partition.

Specification:

- Atheros AR1022
- 64 MB of RAM (DDR2)
- 8 MB of Flash (SPI-NOR)
- 2T2R 2.4/5GHz wifi
  - 2.4 GHz: SoC internal
  - 5 GHz: Atheros AR93x2
- 5x 10/100/1000 Mbps Ethernet
- 6x LEDs, 6x keys (4x buttons, 1x slide switch)
- 1x USB 2.0 Type-A
- UART through-hole on PCB
  - Vcc, GND, TX, RX from ethernet port side
  - 115200n8

Flash instruction using factory image:

1. Connect the computer to the LAN port on WN-AG300DGR
2. Connect power cable to WN-AG300DGR and turn it
3. Access to "http://192.168.0.1/" and open firmware update page
("ファームウェア")
4. Select the OpenWrt factory image and click update ("更新") button
5. Wait ~150 seconds to complete flashing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
Chuanhong Guo 9dd7147f6b ath79: add support for Winchannel WB2000
WB2000 is a dual-band 11N AP using AR9344.
The factory firmware used the original DB120 partition table
with a small kernel partition at the end of firmware and the
kernel will easily get oversized in the future. Since it has
to be flashed using UART I also swapped kernel/rootfs and
changed the default load address.

Specification:

- SoC: Atheros AR9344
- RAM: 128 MB
- Flash: 16 MB
- Ethernet: 10/100/1000 Mbps (Atheros AR8035)
- 2x USB 2.0
- WIFI: AR9344(2G) + AR9382(5G)
- RTC: DS1338

Known issue:
5G ath9k led doesn't work due to commit ccab68f.

Flash instruction:
Set up a TFTP server on your computer and configure static IP.
Connect UART (J11 TX/GND/RX) and press any key to enter U-boot
shell.
1. Change the default boot command:
   setenv bootcmd 'bootm 0x9f050000 || bootm 0x9fd50000'
   saveenv
2. Set your router ipaddr and server ipaddr. e.g.:
   setenv ipaddr 192.168.1.1
   setenv serverip 192.168.1.50
3. Load and flash the firmware:
   tftp 0x80060000 fw.bin
   erase 0x9f050000 +$filesize
   cp.b $fileaddr 0x9f050000 $filesize
4. Reset your router:
   reset

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
[Drop the i2c node unit address. Move the ath9k-leds node out of the spi
node, it doesn't belong there. Add the #gpio-cells property to the pci
wifi node. All fix dtc compiler warnings]
Signed-off-by: Mathias Kresin <dev@kresin.me>

merge
6 years ago
INAGAKI Hiroshi e0c55760e6 ath79: fix ethernet configurations for I-O DATA ETG3-R
This commit fixes several issues in eth0 on ETG3-R, and solve slowdown
in NA(P)T speed.

- add gmac-config with correct configurations
- fix pll-data value

And I added ref clock-frequency.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
Mathias Kresin 9d8fcab77a ath79: fix GL.iNet GL-AR300M sysupgrade
The userspace boardname derived from the dts compatible was out of sync
with the expected board added to the image metadata. This way a
sysupgrade is refused.

Sync the userspace boardname and the baordname used in the image metdata
to allow a seamless sasupgrade.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 8d6f128d39 ath79: add SoC or family compatible
Add missing SoC specific compatibles and/or inherit the family
compatibles like "ubnt,xm".

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
David Bauer adfc8d8eca ath79: add AVM EVA firmware partition compatible
This commit adds firmware partition compatible for the
AVM FRITZ!Box 4020 and AVM FRITZ!WLAN Repeater 300E.

This allows to select the correct mtdsplit parser
instead of trying all available ones one by one.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years ago
Petr Štetiar bc41fb7efe ath79: Define firmware partition format to all boards where applicable
Parsing "firmware" partition (to create kernel + rootfs) was implemented
using OpenWrt downstream code enabled by CONFIG_MTD_SPLIT_FIRMWARE. With
recent upstream mtd changes we can do it in a more clean way for DTS
targets. It just requires adding a proper "compatible" string to the
"firmware" partition node.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Chuanhong Guo c36ec336a3 ath79: rename qca9533.dtsi to qca953x.dtsi
qca9533 is a costdown version of qca9531 which doesn't have USB and PCIE.
Rename the misleading dtsi names and fix the SoC type of gl-ar300m.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
[apply the changes for the gl-x750 as well]
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Russell Senior 73127a878d ath79: add support for Ubiquiti AirRouter
Indoor low-power router with 2.4 GHz radio

CPU:    Atheros AR7241 rev 1
RAM:    32 MB
Flash:  8 MB NOR SPI
Switch: Atheros AR7240
Ports:  1x WAN, 4x LAN 10/100 Ethernet
WLAN:   Atheros AR9285 (2.4 GHz)
USB:    1x USB2 host port

Note: Ethernet WAN/LAN port naming is reversed from ar71xx.
WAN is eth0; LAN is eth1.1.

UART settings: 115200, 8N1

                LEDs
        +--------------------------
        |
        |
        |
        |
        |
        |
        |
        |
    VCC | x x
     RX | * x
        | x x
        | x x
     TX | * x
    GND | * x
        |
        |
        |
        |
        +--------------------------
                ETHERNET PORTS

Installation from Ubiquiti firmware, is as for other ubnt-xm AirOs devices.

Signed-off-by: Russell Senior <russell@personaltelco.net>
6 years ago
Russell Senior 20ec6af15e ath79: split ubnt outdoor device leds into separate dtsi
Move common LED configuration into a separate includible dtsi.

Signed-off-by: Russell Senior <russell@personaltelco.net>
6 years ago
Petr Štetiar 1576666d67 ath79: ubnt-xw: Change DTS license to GPL-2.0-or-later OR MIT
Having MIT as alternative is sometimes preferred by upstream maintainers
and allows sharing that simple code with other projects. We don't really
want multiple DTS versions for the same device.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Petr Štetiar 9f563267d2 ath79: ubnt-bullet-m-xw: Change DTS license to GPL-2.0-or-later OR MIT
Having MIT as alternative is sometimes preferred by upstream maintainers
and allows sharing that simple code with other projects. We don't really
want multiple DTS versions for the same device.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Rosy Song 31469aebd4 ath79: add support for ROSINSON WR818 board
This commit adds support for the ROSINSON WR818 WiFi-Router

SoC:    Qualcomm Atheros QCA9563,
FLASH:  Winbond W25Q128FV 16MBytes,
WiFi:   QCA9563 b/g/n 3x3 450Mbit/s,
USB:    1x USB 2.0 Type A, 1x USB2.0 Type C,
IN:     WPS/Reset button GPIO1,
OUT:    Power LED red, Internet LED red, WLAN LED red,
        LAN1 LED red, LAN2 LED red, System LED red,
UART:   RX-GPIO18, TX-GPIO22,

Tested and working:
    - Ethernet (LAN + WAN)
    - WiFi
    - OpenWRT sysupgrade
    - Button
    - LEDs

Installation of OpenWRT from vendor firmware:
    - Connect to the Web-interface at http://192.168.1.1
    - Go to "Administration" -> "Firmware Upgrade"
    - Upload the OpenWrt sysupgrade image

Signed-off-by: Rosy Song <rosysong@rosinson.com>
6 years ago
Mathias Kresin 7574781337 ath79: merge glinet gl-x750 dtsi and dts
The board doesn't come in different flash type flavours, hence there is
no need to keep a dtsi + dts for this purpose.

While at it, fix some whitespace issues.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 68d77241cd ath79: rename glinet x750
The boardname is gl-x750 and is already used for the led names.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
David Bauer a734450d6f ath79: add Archer C58/C59 partition compatible
This commit adds firmware partition compatible for the
TP-Link Archer C58 v1 and Archer C59 v1.

Since a22311e this allows to select the correct mtdsplit
parser instead of trying all available ones one by one.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years ago
David Bauer df2e6b64d1 ath79: add firmware partition compatible for OCEDO
This commit adds firmware partition compatible for the
OCEDO Raccoon and OCEDO Koala.

Since a22311e this allows to select the correct mtdsplit
parser instead of trying all available ones one by one.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years ago
INAGAKI Hiroshi 37c848810c ath79: specify "firmware" partition format for I-O DATA devices
Specify firmware partition format (denx,uimage) by compatible string
for I-O DATA devices.

affected devices (&run tested)

- WN-AC1167DGR
- WN-AC1600DGR2

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
INAGAKI Hiroshi fa1a120a1a ath79: specify "firmware" partition format for ELECOM WRC-300GHBK2-I
Specify firmware partition format (denx,uimage) by compatible string
for ELECOM WRC-300GHBK2-I.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
INAGAKI Hiroshi 879f2ef7c0 ath79: modify mtd partitions for Buffalo BHR-4GRV2
This commit modifies mtd partitions define for Buffalo BHR-4GRV2 and
move it to generic subtarget.

In Buffalo BHR-4GRV2, "kernel" partition is located behined "rootfs"
partition in the stock firmware. This causes the size of the kernel
to be limited by the fixed value.

0x50000                       0xe80000        0xff0000
  +-------------------------------+--------------+
  |            rootfs             |    kernel    |
  |           (14528k)            |    (1472k)   |
  +-------------------------------+--------------+

After ar71xx was updated to Kernel 4.14, the kernel size of BHR-4GRV2
exceeded the limit, and it breaks builds on official buildbot.
Since this issue was also confirmed in ath79, I modified the mtd
partitions to get rid of that limitation.

0x50000                                       0xff0000
  +----------------------------------------------+
  |                   firmware                   |
  |                   (16000k)                   |
  +----------------------------------------------+

However, this commit breaks compatibility with ar71xx firmware, so I
dropped "SUPPORTED_DEVICES += bhr-4grv2".

This commit requires new flash instruction instead of the old one.

Flash instruction using initramfs image:

1. Connect the computer to the LAN port of BHR-4GRV2
2. Set the IP address of the computer to 192.168.12.10
3. Rename the OpenWrt initramfs image to
"bhr4grv2-uImage-initramfs-gzip.bin" and place it into the TFTP
directory
4. Start the tftp server on the computer
5. While holding down the "ECO" button, connect power cable to
BHR-4GRV2 and turn on it
6. Flashing (orange) diag LED and release the finger from the button,
BHR-4GRV2 downloads the intiramfs image from TFTP server and boot
with it
7. On the initramfs image, create "/etc/fw_env.config" file with
following contents
  /dev/mtd1 0x0 0x10000 0x10000
8. Execute following commands to add environment variables for
u-boot
  fw_setenv ipaddr 192.168.12.1
  fw_setenv serverip 192.168.12.10
  fw_setenv ethaddr 00:aa:bb:cc:dd:ee
  fw_setenv bootcmd "bootm 0x9f050000 || bootm 0x9fe80000"
9. Perform sysupgrade with squashfs-sysupgrade image
10. Wait ~150 seconds to complete flashing

And this commit includes small fix; BHR-4GRV2 has QCA9557 as a SoC,
not QCA9558.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
INAGAKI Hiroshi 83f08aebb1 ath79: specify "firmware" partition format for Buffalo devices
Specify firmware partition format (denx,uimage) by compatible string
for Buffalo devices.

affected devices (&run tested):
- BHR-4GRV
- WHR-G301N
- WZR-HP-AG300H
- WZR-HP-G302H A1A0
- WZR-HP-G450H (WZR-450HP)

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
David Bauer 946ffe470d ath79: add support for Archer C58/C59 v1
This commit adds support for the Archer C58 v1 and C59 v1, previously
supported in the ar71xx target.

CPU:   Qualcomm QCA9561
RAM:   64M (C58) / 128M (C59)
FLASH: 8M (C58) / 16M (C59)
WiFi:  QCA9561 bgn 3x3:3
       QCA9888 nac 2x2:2
LED:   Power, WiFi 2.4, WiFi 5, WAN green, WAN amber, LAN, WPS
       Only C59: USB
BTN:   WPS, WiFi, Reset

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

Via Web-UI:
Update factory image via Web-UI.

Via TFTP:
Rename factory image to "tp_recovery.bin" and place it in the root-dir
of your tftp server. Configure to listen on 192.168.0.66. Power up the
router while holding down the reset-button. The router will flash itself
and reboot.

Note: For TFTP, you might need a switch between router and computer, as
link establishment might take to long.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years ago
Luo chongjun 9989fd5154 ath79: add support for GL-iNet GL-X750
this patch adds supports for GL-X750.

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

Flash instruction:
The original firmware is openwrt, so both LuCI or sysupgrade can be used.

Signed-off-by: Luo chongjun <luochongjun@gl-inet.com>
6 years ago
Petr Štetiar db4b6535f8 ath79: Add support for Ubiquity Bullet M (XW)
CPU: AR9342 SoC
RAM:     64 MB DDR2
Flash:    8 MB NOR SPI
Ports:  100 MBit (24V PoE in)
WLAN: 2.4/5 GHz
UART:     1 UART on PCB marked as J1 with 115200 8N1 config
LEDs:       Power, Ethernet, 4x RSSI LEDs (orange, red, 2x green)
Buttons:    Reset

UART connection details

  .---------------------------------.
  |                                 |
[ETH]          J1                 [ANT]
  |    o VCC o RX o TX o GND        |
  `---------------------------------'

Flashing instructions

 A) Serial console, U-Boot and TFTP

   1. Connect to serial header J1 on the PCB
   2. Power on device and enter U-Boot console
   3. Set up TFTP server serving an OpenWrt initramfs build
   4. Load initramfs build using the command tftpboot in the U-Boot 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

 B) Experimental factory image flashing over SSH from airOS v6.1.7

   1. You need to flash your UBNT M2HP with airOS v6.1.7 firmware
      no other airOS version is currently supported
   2. git clone https://github.com/true-systems/ubnt-bullet-m2hp-openwrt-flashing
   3. cd ubnt-bullet-m2hp-openwrt-flashing
   4. make flash-factory FW_OWRT=/path/to/your/openwrt-ath79-generic-ubnt_bullet-m-xw-squashfs-factory.bin

Tested only on Bullet M2HP.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Rafał Miłecki 18c5e7ba91 ath79: specify "firmware" partition format for Ubiquiti UniFi
This affects:
1. Ubiquiti UniFi-AC-LITE/LR
2. Ubiquiti UniFi-AC-PRO
3. Ubiquiti UniFi-AC-MESH
4. Ubiquiti UniFi-AC-MESH PRO

Succesfully tested on UniFi AP AC Pro.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Hannu Nyman 3e19113d5d ath79: specify "firmware" partition format for WNDR3700 and v2
Specify the new "firmware" partition format for Netgear WNDR3700
and WNDR3700v2 similarly as ffd082aa did for WNDR3800, the third
device in the family.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
6 years ago
Rafał Miłecki c8a005fefd ath79: specify "firmware" partition format for TP-LINK Archer C7 v2
With this change it doesn't require trying parsers one by one.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki ffd082aa38 ath79: specify "firmware" partition format for Netgear WNDR3800
It doesn't require trying parsers one by one.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago