Commit graph

3457 commits

Author SHA1 Message Date
Piotr Dymacz
b3cb0e7588 firmware-utils: mktplinkfw: rework combined image option
We use combined option in "mktplinkfw" tool for generating initramfs
kernel images and header for kernel inside "safeloader" image type (in
fact, only for TL-WR1043ND v4 at this moment).

There is also "mktplinkfw-kernel" tool, a stripped-down version, used
only for generating "simple" header, for safeloader image types.

This changes how "mktplinkfw" handles combined images (which then will
allow us to drop the stripped-down version of the tool):

- drop "ignore size" command line option (it was used only for combined
  images anyway)
- don't require "flash layout id" for combined images (we don't need and
  shouldn't limit size of the initramfs kernel and for kernels inside
  safeloader images, the "tplink-safeloader" tool does the size check)
- require kernel address and entry point in command line parameters for
  combined images (consequence of previous point)
- don't include md5 sum and firmware length values in header (they are
  needed only for update from vendor GUI and are ingored in case of
  initramfs and "tplink-safeloader" images)
- drop "fake" flash layout for TL-WR1043ND v4 as it's no longer needed

Also, adjust "mktplinkfw-combined" command in ar71xx/image/tp-link.mk to
match introduced changes in "mktplinkfw" tool.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-07-22 23:29:50 +02:00
Piotr Dymacz
0c6165d21a ar71xx: add support for ALFA Network AP121F
ALFA Network AP121F is a pocket-size router dedicated for VPN/TOR users.
Device is based on Atheros AR9331 WiSoC and is running a custom version
(updated from OpenWrt CC to LEDE 17.01 release) of NetAidKit firmware.

Specification:

- 400/400/200 MHz (CPU/DDR/AHB)
- 64 MB of RAM (DDR1)
- 16 MB of FLASH (SPI NOR)
- 1x 10/100 Mbps Ethernet
- 1T1R 2.4 GHz
- 1x microSD (optional, on separate PCB)
- 3x LED, 1x button, 1x switch
- UART header on PCB

Flash instruction (under U-Boot web recovery mode):

1. Configure PC with static IP 192.168.1.2/24.
2. Connect PC with RJ45 port, press the reset button, power up device,
   wait for first blink of all LEDs (indicates network setup), then keep
   button for 3 following blinks and release it.
3. Open 192.168.1.1 address in your browser and upload sysupgrade image.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-07-22 23:13:55 +02:00
Milan Krstić
4c1ce83548 ag71xx: add support for port mirroring
This exposes hardware port mirroring in ag71xx driver (e.g. TL-WR841ND) via
swconfig API.

Signed-off-by: Milan Krstić <milan.krstic@gmail.com>
2017-07-21 08:10:38 +02:00
Sergey Ryazanov
bf5d86543a ar71xx: use the RB912UAG-{2, 5}HPnD Power LED for diag
The Power LED of RB912UAG-{2,5}HPnD boards can be controlled by sofware,
so use it for diag purposes and make the User LED free for other tasks.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
2017-07-20 19:10:29 +02:00
Sergey Ryazanov
6cad8ee0bd ar71xx: keep the RouterBOARD Power LED in On state
It is quite unexpected behaviour when the Power LED switches off as soon
as the kernel starts booting. So set the default state to 'Keep' for
the Power LEDs of all RouterBOARDs (e.g. RB91x, SXT Lite series, etc.).

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
[switch the default state to keep instead of on]
Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-07-20 19:10:29 +02:00
Mathias Kresin
e4e984f2a0 treewide: use only board_name function to get name
Do not parse /tmp/sysinfo/board_name, /proc/cpuinfo or the device tree
compatible string directly. Always use the board_name function to get
the board name.

The admswconfig package still reads /proc/cpuinfo directly. The code
looks somehow broken and the whole adm5120 which uses this package
looks unmaintained. Leave it as it is for now.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-07-15 23:13:34 +02:00
Mathias Kresin
e0b9ec8e96 treewide: drop target board_name functions
They are not used any longer.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-07-15 23:13:34 +02:00
Mathias Kresin
f12a32630f treewide: use the generic board_name function
Use the generic function instead ot the target specific ones.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-07-15 23:13:34 +02:00
Mathias Kresin
ac3e05c5d7 treewide: populate boardname and model earlier
For targets using the generic board detection and board specific
settings in diag.sh, the board name is still unset at the time the
set_state() provided by diag.sh is called by 10_indicate_preinit.

Change the execution order to ensure the boardname is populated before
required the first time. Do the target specific board detection as
early as possible, directly followed by the generic one to allow a
seamless switch to the generic function for populating /tmp/sysinfo/.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-07-15 23:13:34 +02:00
Alexander Couzens
8c96eb2fdb
ar71xx/image: change unifi UBNT_CHIP to ar7240
Verified by OEM firmware images which contains the same
chip.

Tested-by: Andreas Bräu <ab@andi95.de>
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2017-07-13 23:56:24 +02:00
Matthias Schiffer
16222a1010
ar71xx: set US region code for TP-Link TL-WR710N v1 image
Non-US versions of the TP-Link TL-WR710N v1 don't have a region code so
far, so we can just set US unconditionally.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2017-07-12 21:30:08 +02:00
Matthias Schiffer
438dcbfe74
base-files: automatically handle paths and symlinks for RAMFS_COPY_BIN
Depending on busybox applet selection, paths of basic utiilties may differ,
and may not work as symlinks to busybox. Simply using whatever binary is
found in PATH and detecting symlinks automatically is more robust and
easier to maintain.

The list of binaries is also slightly cleaned up and duplicates are
removed.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2017-07-11 17:26:32 +02:00
Piotr Dymacz
9d07d2dc56 ar71xx: image: simplify Meraki MR16 device definition
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-07-09 23:46:53 +02:00
Enrique Giraldo
afcf5f69be ar71xx: fix upgrade platform check for Compex WPJ558
The magic number was wrong and always marked the images as invalid.

Signed-off-by: Enrique Giraldo <enrique.giraldo@galgus.net>
2017-07-09 23:46:30 +02:00
Piotr Dymacz
befc763ed1 ar71xx: support LED in TP-Link TL-WR902AC RJ45 socket
TP-Link TL-WR902AC has another one, tiny LED inside RJ45 socket which is
attached to GPIO15. Add support for it, use it as a "lan" LED and rename
old one to "internet". Also, fix uci option name for "lan" LED in system
configuration ("wan" -> "lan").

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-07-09 23:44:20 +02:00
Piotr Dymacz
42c8bbb69b ar71xx: verify TP-Link TL-WR902AC sysupgrade image
Until we enable requirement for metadata in sysupgrade images under
ar71xx target, this prevents users from using wrong image.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-07-09 23:43:46 +02:00
Henryk Heisig
096a604df0 ar71xx: add metadata to some TP-Link images
This commit adds metadata to TP-Link sysupgrade images
created by tplink-safeloader with uImage kernel header.

Signed-off-by: Henryk Heisig <hyniu@o2.pl>
2017-07-09 22:45:59 +02:00
Piotr Dymacz
cf23547e57 ar71xx: fix TPLINK_BOARD_ID for Archer C58 and TL-WA855RE
Rename TPLINK_BOARD_NAME to TPLINK_BOARD_ID for two ommited devices.

Fixes: 7d6c63d ("build: rename TPLINK_BOARD_NAME to TPLINK_BOARD_ID")
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-07-04 15:09:52 +02:00
Qian Zheng
a08ec9a54d ar71xx: fix Netgear WNDR3700 v4 switch port mapping
Signed-off-by: Qian Zheng <sotux82@gmail.com>
2017-07-04 11:42:33 +02:00
Piotr Dymacz
6165e4aab0 ar71xx: add support for TP-Link TL-WR902AC v1
TP-Link TL-WR902AC v1 is a pocket-size, dual-band (AC750), successor of
TL-MR3020 (both devices use very similar enclosure, in same size). New
device is based on Qualcomm QCA9531 v2 + QCA9887. FCC ID: TE7WR902AC.

Specification:

- 650/391/216 MHz (CPU/DDR/AHB)
- 1x 10/100 Mbps Ethernet
- 1x USB 2.0 (GPIO-controlled power)
- 64 MB of RAM (DDR2)
- 8 MB of FLASH
- 2T2R 2.4 GHz (QCA9531)
- 1T1R 5 GHz (QCA9887)
- 5x LED (GPIO-controlled), 2x button, 1x 3-pos switch
- UART pads on PCB (TP1 -> TX, TP2 -> RX, TP3 -> GND, TP4 -> 3V3, jumper
  resitors are missing on TX/RX lines)
- 1x micro USB (for power only)

Flash instructions:

Use "factory" image under vendor GUI.

Recovery instructions:

This device contains tftp recovery mode inside U-Boot. You can use it to
flash LEDE (use "factory" image) or vendor firmware.

1. Configure PC with static IP 192.168.0.66/24 and tftp server.
2. Rename "lede-ar71xx-generic-tl-wr902ac-v1-squashfs-factory.bin"
   to "wr902acv1_un_tp_recovery.bin" and place it in tftp server dir.
3. Connect PC with LAN port, press the reset button, power up the router
   and keep button pressed until WPS LED lights up.
4. Router will download file from server, write it to flash and reboot.

Root access over serial line in vendor firmware: root/sohoadmin.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-07-04 08:58:54 +02:00
Piotr Dymacz
0a2e4204db ar71xx: generic: enable CONFIG_MTD_SPLIT_TPLINK_FW
We can use "tplink-fw" mtd splitter for TP-Link devices which use kernel
with TP-Link header embedded inside "safeloader" image type and thus get
rid of statically defined "kernel" and "rootfs" partitions in cmdline.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-07-04 08:58:54 +02:00
Piotr Dymacz
43ae7dcdd4 ar71xx: refresh and cleanup mikrotik subtarget kernel config
Refresh mikrotik subtarget kernel config and enable kernel support for
boards which belong to this subtarget only.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-07-04 08:58:54 +02:00
Piotr Dymacz
f67ad17d19 ar71xx: refresh and cleanup nand subtarget kernel config
Refresh nand subtarget kernel config and enable kernel support for
boards which belong to this subtarget only.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-07-04 08:58:54 +02:00
Piotr Dymacz
cc9b9c5885 ar71xx: refresh and cleanup target kernel config
Refresh target kernel config and disable kernel support for all boards
which belong to nand and mikrotik subtargets only.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-07-04 08:58:54 +02:00
Jo-Philipp Wich
28cb6ed949 ar71xx: fix typo in network defaults
Commit 9fec39a (ar71xx: add support for TP-Link TL-WA855RE v1) introduced a
typo in 02_network, fix it by removing the stray paren.

Reported-by: Henryk Heisig <hyniu@o2.pl>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-06-29 18:04:29 +02:00
Piotr Dymacz
a73471dea7 ar71xx: image: specify TPLINK_HWID for TP-Link RE450
TPLINK_HWID hasn't been specified for TP-Link RE450 since the begin.
As we don't want to break sysupgrade (all existing LEDE release images
for this board have TPLINK_HWID set to 0x0), set it explicitly to 0x0.

Fixes FS#852

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-29 10:46:08 +02:00
Piotr Dymacz
7d6c63d875 build: rename TPLINK_BOARD_NAME to TPLINK_BOARD_ID
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-29 10:37:36 +02:00
Piotr Dymacz
ad8c315812 ar71xx: fix switch port mapping for TP-Link TL-WR74xN/D series
Fixes FS#843

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-29 10:37:36 +02:00
Henryk Heisig
b05c7193fd ar71xx: add support for TP-Link Archer C58 v1
TP-Link Archer C58 v1 is a dual-band AC1350 router, based on Qualcomm
QCA9561 + QCA9886. It looks like Archer C59 v1 without USB port.

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
- 6x LED, 3x button
- UART header on PCB, RX, TX at TP4+5 (backside)

QCA9886 wlan needs pre_cal_data file and enable ieee80211 phy hotplug to
patch macaddress.

Flash instruction:

Use "factory" image directly in vendor GUI.

Recovery method:

1. Set PC to fixed ip address 192.168.0.66/24.
2. Download "lede-ar71xx-generic-archer-c58-v1-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.

Flash instruction under U-Boot, using UART:

tftp 0x81000000 lede-ar71xx-...-sysupgrade.bin
erase 0x9f020000 +$filesize
cp.b $fileaddr 0x9f020000 $filesize
reset

This commit is based on GitHub PR#1112

Signed-off-by: Henryk Heisig <hyniu@o2.pl>
2017-06-29 10:37:36 +02:00
Federico Cappon
9fec39a033 ar71xx: add support for TP-Link TL-WA855RE v1
TP-Link TL-WA855RE v1 is a wall-plug N300 Wi-Fi range extender,
based on Qualcomm/Atheros QCA9533 v2.

Short specification:

- 550/397/198 MHz (CPU/DDR/AHB)
- 1x 10/100 Mbps Ethernet
- 32 MB of RAM (DDR1)
- 4 MB of FLASH
- 2T2R 2.4 GHz
- 2x external antennas
- 2x LED (green and orange in the same package), 2x button
- UART: TP5(TX) and TP4(RX) test points on PCB

Flash instruction: use "factory" image directly in vendor GUI.

Warning: this device does not include any kind of recovery mechanism
in the bootloader and disassembling process is not trivial.

You can access vendor firmware over serial line using:
- login: root
- password: sohoadmin

Image was tested only in EU version of the device, but should work
also with the same device version sold in other countries.

Signed-off-by: Federico Cappon <dududede371@gmail.com>
2017-06-29 10:37:36 +02:00
Piotr Dymacz
656ed7544f ar71xx: fix EnGenius ENS202EXT mtd definition
Use statically defined sizes for kernel and rootfs mtd partitions.
Vendor upgrade script writes both firmware parts independently which
ends up in a gap between kernel and rootfs images. This results in
incorrectly calculated rootfs_data start offset.

Also, fix IMAGE_SIZE, DEVICE_PACKAGES and drop redundant KERNEL
definition.

Fixes FS#835

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-29 10:37:36 +02:00
Camille Bilodeau
bb46b635df ar71xx: move Arduino Yun to generic building code
Migrate Arduino Yun from legacy to generic building code.

Note: the mtd partitioning is changed to adopt the LEDE default
partitioning. It allows to have a kernel bigger than 1280k. It is
necessary as kernel > 4.4 with default LEDE configuration grows
bigger.

To use the new partitioning, you need to update your U-Boot env in
advance:

setenv mtdparts "spi0.0:256k(u-boot)ro,64k(u-boot-env),15936k(firmware),64k(nvram),64k(art)ro"
setenv bootcmd "run addboard; run addtty; run addparts; run addrootfs; bootm 0x9f050000 || bootm 0x9fea0000"
saveenv

Signed-off-by: Camille Bilodeau <camille.bilodeau@protonmail.com>
2017-06-29 10:37:36 +02:00
Camille Bilodeau
2fa58a8d7c ar71xx: remove Arduino Yun 8 MiB prototype
The Arduino Yun has 16 MiB flash. Early prototype boards with 8 MiB were
not available for sell:

https://blog.arduino.cc/2013/08/21/updating-about-arduino-yun-and-arduino-robot/

Signed-off-by: Camille Bilodeau <camille.bilodeau@protonmail.com>
2017-06-29 10:37:36 +02:00
Leon M. George
3e12ca2355 ar71xx: wpj344: set MAC on wan
Signed-off-by: Leon M. George <leon@georgemail.eu>
2017-06-29 10:37:36 +02:00
Leon M. George
98c5a71dfd ar71xx: wpj344: remove unused eth1 device
Signed-off-by: Leon M. George <leon@georgemail.eu>
2017-06-29 10:37:36 +02:00
Leon M. George
c777fd8a7e ar71xx: wpj344: read MAC addresses from u-boot mtd
This way, the assigned addresses match those on the barcode labels.
Otherwise, the addresses appear to vary on boot.

Signed-off-by: Leon M. George <leon@georgemail.eu>
2017-06-29 10:37:36 +02:00
Stijn Tintel
880f73c327 kernel: cleanup CONFIG_SCHED_HRTICK
Remove CONFIG_SCHED_HRTICK from target configs, as it was added to the
generic config in b47fd76563.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-06-29 04:46:59 +02:00
Stijn Tintel
f80963d4d1 kernel: update kernel 4.4 to 4.4.74
Refresh patches.
Compile-tested on ar71xx.
Runtime-tested on ar71xx.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-06-27 07:42:50 +02:00
Alexander Couzens
d98cafc7b6
ar71xx/images/senao: fix reproducible issue using tar
Use deterministic sorting
Use numeric owner/group
Set uid/gid to 0

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2017-06-25 12:14:26 +02:00
Alexander Couzens
d6331d5583 ar71xx/image: make tar calls reproducible
Use --mtime when SOURCE_DATE_EPOCH is set.
Use gzip -n9z instead of tar z to remove
timestamp in gzip header.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2017-06-25 12:11:41 +02:00
Mathias Kresin
e7cd6f5d66 ar71xx: add AVM FRITZ!WLAN Repeater 300E support
Specifications:
* SoC: AR7242 (Virian 400MHz)
* RAM: 64 MB DDR (W9751G6JB-25)
* Flash: 16MB SPI flash (S25FL129PIF)
* WiFi: AR9382 (2.4/5GHz) + 2x SE2595L
* LAN: 1x1000M (PEF7071V)

To install LEDE via EVA bootloader, a FTP connection need to be
established to 192.168.178.1 within the first seconds after power on:

  ftp> quote USER adam2
  ftp> quote PASS adam2
  ftp> binary
  ftp> debug
  ftp> passive
  ftp> quote MEDIA FLSH
  ftp> put lede-ar71xx-generic-fritz300e-squashfs-sysupgrade.bin mtd1

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-06-24 22:36:38 +02:00
Mathias Kresin
0605b15be4 ar71xx: add AR724x PCIe init fixes
Add upstream send AR724x PCIe patches to get the PCIe controller out of
reset during driver init.

The AVM Fritz 300E bootloader doesn't take care of releasing the
different PCIe controller related resets which causes an endless hang
as soon as either the PCIE Reset register (0x180f0018) or the PCI
Application Control register (0x180f0000) is read from.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-06-24 22:36:38 +02:00
Piotr Dymacz
3ff31586eb ar71xx: image: simplify TP-Link devices definitions
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:32:18 +02:00
Piotr Dymacz
8b556fb056 ar71xx: image: fix TP-Link TL-WR710N v2/v2.1 BOARDNAME
All TP-Link TL-WR710N versions share the same machine code.

This has been working since the beginning as we don't use double-quotes
to protect spaces inside command line values. Thus, kernel interprets
'board=TL-WR710N v2' as 'board=TL-WR710N' and separate parameter 'v2'.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:32:18 +02:00
Piotr Dymacz
7efe0cd83d ar71xx: image: tp-link.mk: keep devices in alphabetical order
Keep TP-Link devices definitions in alphabetical order whenever it's
possible. Also group together similar devices or devices from the same
series.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:32:18 +02:00
Piotr Dymacz
a41f38e61d ar71xx: base-files: cleanups in 10-ar922x-led-fix
Fix code style, indentation and leading/trailing whitespaces in:
/etc/hotplug.d/net/10-ar922x-led-fix

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:32:18 +02:00
Piotr Dymacz
b73cb365d5 ar71xx: base-files: cleanups in 11-ath10k-caldata
Fix code style and boards alphabetical order in:
/etc/hotplug.d/firmware/11-ath10k-caldata

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:32:18 +02:00
Ludwig Thomeczek
b4711dbad3 ar71xx: 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.

Signed-off-by: Ludwig Thomeczek <ledesrc@wxorx.net>
[minor code style fixes, boards alphabetical order fixes,
reworked commit message]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:32:18 +02:00
Serg Studzinskii
b7cc661615 ar71xx: add support for TP-Link TL-WR942N v1
TP-Link TL-WR942N v1 is a 2.4 GHz single-band N450 router, based on
Qualcomm/Atheros QCA9561.

Specification:

- 775/650/258 MHz (CPU/DDR/AHB)
- 128 MB of RAM (DDR2)
- 16 MB of FLASH (SPI NOR)
- 3T3R 2.4 GHz
- 5x 10/100 Mbps Ethernet
- 2x USB 2.0
- 11x LED (most are controlled by 74HC595)
- 2x button
- UART header on PCB*

* Serial console is disabled in OEM non-beta firmwares and corresponding
  GPIO pins 14 and 15 are assigned to control USB1 and USB2 LEDs by
  production (non-beta) U-Boot and firmware.

Currently not working:

1. USB1 and USB2 LEDs if UART RX and TX pins are assigned to their GPIOs
   by some U-Boot versions.

Flash instruction under vendor GUI:

1. Download "lede-ar71xx-generic-tl-wr942n-v1-squashfs-factory.bin".
2. Go to WEB interface and perform usual firmware upgrade.

FLash instruction under U-Boot recovery mode (doesn't work in beta
firmware):

1. Setup PC with static IP "192.168.0.66/24" and tftp server.
2. Change "*-factory" image filename to "WR942v1_recovery.bin" and make
   it available to download from your tftp server.
3. Press "reset" button and power up the router, wait till "WPS" LED
   turns on.

Flash instruction under U-Boot, using UART (can be done only with
preinstalled UART-enabled U-Boot version!):

1. Use "tpl" to stop autobooting and obtain U-Boot CLI access.
2. Setup ip addresses for U-Boot and your tftp server.
3. Issue below commands:
   tftp 0x81000000 lede-ar71xx-generic-tl-wr942n-v1-sysupgrade.bin
   erase 0x9f020000 +$filesize
   cp.b 0x81000000 0x9f020000 $filesize
   reset

Signed-off-by: Serg Studzinskii <serguzhg@gmail.com>
[minor code style fixes, extended commit message]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:32:17 +02:00
Piotr Dymacz
641af0c39d ar71xx: move WRTnode2Q to generic build target
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:32:17 +02:00
Piotr Dymacz
636ae9e9a0 ar71xx: image: simplify Ubiquiti devices definitions
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:32:17 +02:00
Piotr Dymacz
01aa23acf7 ar71xx: image: mikrotik: shorten DEVICE_TITLE
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:32:17 +02:00
Piotr Dymacz
7bc5571d14 ar71xx: image: use simply expanded variables
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:32:17 +02:00
Piotr Dymacz
80136e57a4 ar71xx: image: update GL.iNet boards DEVICE_TITLE
Use "GL.iNet" as vendor name (based on information from the vendor, this
is registered name of the company) and align model names with official
website.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:31:25 +02:00
Piotr Dymacz
93198b8335 ar71xx: image: fix 8devices boards DEVICE_TITLE
Be consistent with DEVICE_TITLE syntax and use vendor + board names.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:30:05 +02:00
Piotr Dymacz
bd92a6cf57 ar71xx: image: drop unused mtdlayouts from legacy.mk
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:22:46 +02:00
Piotr Dymacz
708cc2bd3c ar71xx: image: cosmetic: drop redundant empty lines
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:22:46 +02:00
Piotr Dymacz
e83cac1a8f ar71xx: image: add ROOTFS_SIZE to DEVICE_VARS
Also use ROOTFS_SIZE variable in place of static values.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:22:46 +02:00
Piotr Dymacz
c00fb14329 ar71xx: image: keep custom Build/* functions in separate files
Most of the custom Build/* functions in ar71xx target are rarely used by
image building code for devices from more than one subtarget. As they
don't need to be always included, move them to corresponding *.mk files.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:22:46 +02:00
Piotr Dymacz
3a3cd0ac43 ar71xx: image: keep DEVICE_VARS and Build/* at the beginning
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:21:45 +02:00
Piotr Dymacz
af27dd1a51 ar71xx: image: simplify Compex devices definitions
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 19:06:49 +02:00
Piotr Dymacz
43c0ef1010 ar71xx: image: drop redundant kmod-usb-ohci from DEVICE_PACKAGES
kmod-usb-ohci is needed only on devices with AR71xx and AR7240 SoCs.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 19:06:49 +02:00
Piotr Dymacz
05e276c071 ar71xx: image: drop redundant uboot-envtools from DEVICE_PACKAGES
uboot-envtools is already included in DEFAULT_PACKAGES for ar71xx.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 19:06:49 +02:00
Kevin Darbyshire-Bryant
8960f2b80c
ar71xx: fixup ar71xx/ar933x_wmac_reset: remove indefinite wait for wmac reset
Fix malformed patch introduced by 296312fca1

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2017-06-11 17:12:45 +02:00
Alexander Couzens
ab11618001 ar71xx/ar93xx_wmac_otp_read_word: fix wrongly used sizeof(*u)
Found-by: Coverity Scan #1330474
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2017-06-11 14:22:44 +02:00
Alexander Couzens
296312fca1 ar71xx/ar933x_wmac_reset: remove indefinite wait for wmac reset
Found-by: Coverity Scan #1329327
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2017-06-11 14:22:44 +02:00
Alexander Couzens
1025941662 ar71xx/ag71xx_ethtool: don't return uninitialized return value on success
ag71xx_ethtool_set_ringparam() will return an uninitialized value on
success.

Found-by: Coverity Scan #1330877
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2017-06-11 14:22:44 +02:00
Alexander Couzens
64cd4b48e8 ar71xx/ag71xx_mdio_probe: fix a memory leak when probe fails
Found-by: Coverity Scan #1330233
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2017-06-11 14:22:44 +02:00
Alexander Couzens
d18cb142d5 ar71xx/ag71xx_ar7240_get_port_link: fix off-by-one check on argument port
Found-by: Coverity Scan #1329901
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2017-06-11 14:22:44 +02:00
Jo-Philipp Wich
f4a4f324cb kernel: update kernel 4.4 to 4.4.71
Fixes the following security vulnerabilities:

CVE-2017-8890
The inet_csk_clone_lock function in net/ipv4/inet_connection_sock.c in the
Linux kernel through 4.10.15 allows attackers to cause a denial of service
(double free) or possibly have unspecified other impact by leveraging use
of the accept system call.

CVE-2017-9074
The IPv6 fragmentation implementation in the Linux kernel through 4.11.1
does not consider that the nexthdr field may be associated with an invalid
option, which allows local users to cause a denial of service (out-of-bounds
read and BUG) or possibly have unspecified other impact via crafted socket
and send system calls.

CVE-2017-9075
The sctp_v6_create_accept_sk function in net/sctp/ipv6.c in the Linux kernel
through 4.11.1 mishandles inheritance, which allows local users to cause a
denial of service or possibly have unspecified other impact via crafted
system calls, a related issue to CVE-2017-8890.

CVE-2017-9076
The dccp_v6_request_recv_sock function in net/dccp/ipv6.c in the Linux
kernel through 4.11.1 mishandles inheritance, which allows local users to
cause a denial of service or possibly have unspecified other impact via
crafted system calls, a related issue to CVE-2017-8890.

CVE-2017-9077
The tcp_v6_syn_recv_sock function in net/ipv6/tcp_ipv6.c in the Linux kernel
through 4.11.1 mishandles inheritance, which allows local users to cause a
denial of service or possibly have unspecified other impact via crafted
system calls, a related issue to CVE-2017-8890.

CVE-2017-9242
The __ip6_append_data function in net/ipv6/ip6_output.c in the Linux kernel
through 4.11.3 is too late in checking whether an overwrite of an skb data
structure may occur, which allows local users to cause a denial of service
(system crash) via crafted system calls.

Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8890
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9074
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9075
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9076
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9077
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9242
Ref: https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.71

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-06-07 21:40:42 +02:00
Sergey Sergeev
9e1bc27e6d ar71xx: Fix UBIFS work on Mikrotik RB95x devices
If nand chip has no NAND_NO_SUBPAGE_WRITE flag on its options
ubifs can't use it mtd devices and the kernel crashes with error:
__nand_correct_data: uncorrectable ECC error

Signed-off-by: Sergey Sergeev <adron@yapic.net>
2017-05-31 11:36:21 +02:00
Jo-Philipp Wich
66f25c98e0 ar71xx: disable ENS202EXT in mikrotik and nand subtargets
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-05-31 02:40:47 +02:00
Piotr Dymacz
6173f6d8f1 ar71xx: move Wallys DR344 to generic build target
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-05-30 14:34:09 +02:00
Piotr Dymacz
18d5cee2a8 ar71xx: fix Wallys DR344 GPIO-connected LEDs and button
This fixes wrong GPIO numbers for LEDs and button in Wallys DR344 board
and sets color of all LEDs to green as the mass production boards have
only green one.

Actually, DR344 has 6 GPIO-connected LEDs and one button:

- GPIO11: status
- GPIO12: sig1
- GPIO13: sig2
- GPIO14: sig3
- GPIO15: sig4
- GPIO16: reset button
- GPIO17: lan

WAN LED is connected directly with AR8035 PHY.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-05-30 14:34:04 +02:00
Piotr Dymacz
6713640b52 ar71xx: set GE interface as wan by default in Wallys DR344
This aligns default network interfaces configuration with vendor
firmware: GE (eth0) -> wan, FE (eth1) -> lan.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-05-30 14:15:25 +02:00
Piotr Dymacz
c7bc8a9a13 ar71xx: fix GE interface support in Wallys DR344
GMAC0 interface of AR9344 SOC in Wallys DR344 board is connected with
AR8035, not with AR8327. Without this fix, GE interface doesn't work at
all or shows high packet loss ratio.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-05-30 14:15:25 +02:00
Marty Plummer
558d86923e ar71xx: add support for EnGenius ENS202EXT
EnGenius ENS202EXT is an outdoor wireless access point with
2-port 10/100 switch, detachable antennas and proprietery PoE.

The device is based on Qualcomm/Atheros AR9341 v1.

Specifications:
- 535/400/200 MHz (CPU/DDR/AHB)
- 64 MB of RAM
- 16 MB of FLASH
- UART (J1) header on PCB (unpopulated)
- 2x 10/100 Mbps Ethernet
- 2.4 GHz, up to 26dBm
- 2x external, detachable antennas
- 7x LED, 1x button

Flash instructions:

You have three options:

- Use the vendor firmware upgrade page on the web interface and give
it the factory.img. This is the easiest way to go about it.

- If you have serial access during u-boot, interrupt the normal boot
(any key before timeout) and run 'run failsafe_boot'; this will bring
you to a minimal openwrt luci image on ip 192.168.1.1 useful if you've
bricked the normal firmware.

- Use the vendor's management cli, which can be accessed via telnet
with the same credentials as the web login (default admin:admin), then
issue the following commands:

*** Hi admin, welcome to use cli(V-1.6.7) ***
---========= Commands Help =========---
      stat -- Status
       sys -- System
    wless2 -- 2.4G-Wireless
      mgmt -- Management
      tree -- Tree
      help -- Help
    reboot -- Reboot
ens202ext>mgmt
  Management
---========= Commands Help =========---
     admin -- Administration
     mvlan -- Management VLAN settings
      snmp -- SNMP settings
    backup -- Backup/Restore settings
    autorb -- Auto reboot settings
   fwgrade -- Firmware upgrade
      time -- Time settings
   wifisch -- Wifi schedule
       log -- Log
      diag -- Diagnostics
      disc -- Device Discovery
    logout -- Logout
      help -- Help
      exit -- Exit
ens202ext/mgmt>fwgrade
  Management --> Firmware upgrade
---========= Commands Help =========---
      fwup -- Firmware upgrade
      help -- Help
      exit -- Exit
ens202ext/mgmt/fwgrade>fwup http://web.server/lede-ar71xx-generic-ens202ext-squashfs-factory.bin

Signed-off-by: Marty Plummer <ntzrmtthihu777@gmail.com>
2017-05-30 14:15:25 +02:00
Andrey Polischuk
0f21873f7f ar71xx: fix LED defines for TP-Link TL-WR740N v6
Signed-off-by: Andrey Polischuk <androld.b@gmail.com>
[changed commit subject, dropped redundant kernel config symbol]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-05-30 14:15:25 +02:00
Filip Moc
43e4e1f4a5 Move enablemodem from ramips to new package adb-enablemodem and make it used also by TL-MR6400
Signed-off-by: Filip Moc <lede@moc6.cz>
2017-05-27 07:54:40 +02:00
Filip Moc
a639cbfd00 ar71xx: Add support for TP-Link MR6400
You can flash via tftp recovery (serve factory image as /mr6400_tp_recovery.bin
on 192.168.0.66/24, connect to any ethernet port and power on device while
holding the reset button). Flashing via OEM web interface does not work.

Hardware Specification (v1.0 EU):
 - SoC: QCA9531
 - Flash: Winbond W25Q64FV (8MiB)
 - RAM: EtronTech EM6AB160TSE-5G (64MiB)
 - Wireless: SoC platform only (2.4GHz b/g/n, 2x internal antenna)
 - Ethernet: 2NIC (3x100M + 1x100M)
 - WWAN: TP-LINK LTE MODULE (2x external detachable antenna)
 - Power: DC 12V 1A

Signed-off-by: Filip Moc <lede@moc6.cz>
2017-05-27 07:54:21 +02:00
René Mayrhofer
e457d22261 Make GBit switch work on RB2011
This change is required to make the GBit switch work on my Mikrotik Routerboard RB2011UiAS-RM, and I assume that the other RB2011 variants are exactly the same in terms of the switch. I have tested the board without and with the patch and confirm that the GBit ports are not supported at all (i.e. no communication works) with the current version in trunk and that everything works with the patch applied. The test box has been running for a few days with the patch applied, and does not show any performance problems in a test setting. I have not used it with LEDE in production so far, but with a previous turnk version of OpenWRT for many years - with the same patch applied. I therefore have good indication that it is stable.

For the record, the switch chip on my test box is identified as
	switch0: Atheros AR8327 rev. 4 switch registered on ag71xx-mdio.0

The value 0x6f000000 has been taken from the table at https://wiki.openwrt.org/toh/mikrotik/rb2011uias with the previous discussion thread still online at https://lists.openwrt.org/pipermail/openwrt-devel/2014-December/029949.html.
One definite improvement from the older OpenWRT trunk version I have been running in production and current LEDE trunk is that the SFP interface can be kept in the default configuration without excessive kernel messages about it constantly going up and down. I have not yet tested an actual SFP module, though.

Performance seems to be reasonable. Routing between two GBit ports on that switch separated by different VLANs with the default firewall ruleset (and one additional rule two allow traffic between the VLANs), but without NAT, iperf3 results are:
	[ ID] Interval           Transfer     Bandwidth       Retr
	[  4]   0.00-10.00  sec   508 MBytes   426 Mbits/sec  102             sender
	[  4]   0.00-10.00  sec   506 MBytes   425 Mbits/sec                  receiver
With a connection going through NAT (also 2 ports on the same GBit switch, same ruleset, but NAT active), routing performance drops to around 250 MBit/s.
(Note that RouterOS achieves beyond 900 MBit/s on the same hardware with the default rule set and the FastTrack rule active even for NAT, see https://wiki.mikrotik.com/index.php?title=Manual:IP/Fasttrack and http://www.mikrotik.com/download/share/FastTrack.pdf).

Summarizing, I strongly recommend to apply this patch in trunk, so that the GBit switch chip rev. 4 can be supported upstream in the next LEDE release (hopefully soon).

Signed-off-by: René Mayrhofer <rene@mayrhofer.eu.org>
2017-05-25 09:22:42 +02:00
Matthias Fritzsche
a4e63e2679 ar71xx: change image version for ubiquiti devices
changes the image version from hardcoded OpenWrt to
$VERSION_DIST. AirOS shows a notification with the image version
during a firmware upgrade.

fixes #582

Signed-off-by: Matthias Fritzsche <txt.file@txtfile.eu>
2017-05-25 09:22:37 +02:00
Kevin Darbyshire-Bryant
088e28772c kernel: update kernel 4.4 to version 4.4.69
Refresh patches. A number of patches have landed upstream & hence are no
longer required locally:

062-[1-6]-MIPS-* series
042-0004-mtd-bcm47xxpart-fix-parsing-first-block

Reintroduced lantiq/patches-4.4/0050-MIPS-Lantiq-Fix-cascaded-IRQ-setup
as it was incorrectly included upstream thus dropped from LEDE.
As it has now been reverted upstream it needs to be included again for
LEDE.

Run tested ar71xx Archer C7 v2 and lantiq.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
[update from 4.4.68 to 4.4.69]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-05-21 21:48:16 +02:00
John Crispin
bad2f9c4dc Revert "ar71xx: Add support for Teltonika RUT900"
This reverts commit 224e5f5efa.

pepe2k pointed out that this was not ready to merge

Signed-off-by: John Crispin <john@phrozen.org>
2017-05-18 15:31:47 +02:00
Steffen Weinreich
224e5f5efa ar71xx: Add support for Teltonika RUT900
Teltonika RUT900 is a Router with LTE dual SIM, WiFi, 4x Ethernet
ports, I/O, RS232, RS485, GPS.

The device ist based on a Atheros AR9344 rev 3,

Specifications:
- 560/450/225 MHz (CPU/DDR/AHB)
- 128 MB of RAM
- 16 MB of FLASH
- Serial Console header on a Card Board edge connector
- 4x 10/100 Mbps Ethernet (3x LAN, 1x WAN)
- 2.4 GHz Wifi
- 2x external, detachable Wifi antennas
- LTE Modem Huawei ME909u-521 (Also other Modem seen)
- 2x LTE antennas
- 1x GPS antenna
- 7x LED, 1x button
- 1x USB Connector
- 1x Serial RS232
- 1x Serial RS485
- 1x MicroSD Card

The GPL sources of the device are available at www.teltonika.lt/gpl/
and are based on OpenWRT Barrier Breaker (14.07)

Running from tftp:

The Router starts into the uboot Webupdater if the Button ist pressed
more than 3 seconds, if no Network cable is attached it starts the
uboot serial console, from there the router loads the firmware image
via tftpboot from 192.168.1.2:firmware.bin (the router has the
192.168.1.1). With bootm the loaded image will be booted.

Signed-off-by: Steffen Weinreich <steve@weinreich.org>
2017-05-18 14:47:53 +02:00
Chris Blake
10d11859df ar71xx: add support for Aerohive AP-121
This adds support for Aerohive AP-121 access point.

Specification:
- SoC: Atheros AR9344-BC2A at 560MHz
- WiFi 1: 2.4GHz Atheros AR9340? - SoC
- WiFi 2: 5.0GHz Atheros AR9382-AL1A
- Memory: 128MB from 2x Nanya NT5TU32M16DG-AC
- SPI: 1MB Macronix MX25L8006E
- NAND: 128MB Hynix H27U1G8F2BTR-BC
- Ethernet: Atheros AR8035-A
- USB: 1x 2.0
- TPM: Atmel SC3204

Flashing:
1. Hook into UART (9600 baud) and enter U-Boot. You may need to enter
a password of administrator or AhNf?d@ta06 if prompted.
2. Once in U-Boot, download and flash LEDE factory image over tftp:

dhcp;
setenv serverip tftp-server-ip;
tftpboot 0x81000000 lede-ar71xx-nand-hiveap-121-squashfs-factory.bin;
nand erase 0x800000 0x800000;
nand write 0x81000000 0x800000 0x800000;
reset;

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
[minor text changes in commit subject and description, fixed
alphabetical order in etc/diag.sh, use only model name in lib/ar71xx.sh,
fixed code style issues in mach-hiveap-121.c, ubinized factory image]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-05-15 22:58:59 +02:00
Mantas Pucka
68b5d34f69 ar71xx: add support for 8devices Rambutan development board
Rambutan is a Wifi module based on QCA9550/9557
http://www.8devices.com/products/rambutan

This commit adds basic support for Rambutan development kit

Specification:
- 720/600/200 MHz (CPU/DDR/AHB)
- 128 MB of DDR2 RAM
- 128 MB of NAND Flash
- 1x 100Mbps Ethernet
- 1x 1000Mbps Ethernet (PHY on dev-kit)
- 1x Wifi radio 2x2 MIMO, dualband 2.4 and 5 GHz
- 2x U.FL connectors on module, chip antennas on dev-kit
- 1x miniPCIe slot
- 1x USB2.0 host socket + 1x USB2.0 pins on 2.54mm header

Flash instructions:
Stock firmware is OpenWrt, so use:
 sysupgrade -n /tmp/lede-ar71xx-nand-rambutan-squashfs-sysupgrade.tar
or upgarde from GUI (don't save config)
Use factory image to flash from U-Boot:
 tftpboot 80060000 lede-ar71xx-nand-rambutan-squashfs-factory.ubi
 nand erase.part ubi
 nand write 80060000 ubi ${filesize}

Signed-off-by: Mantas Pucka <mantas@8devices.com>
[split support in uboot-envtools package into a separate commit,
fixed alphabetical order in lib/preinit/05_set_iface_mac_ar71xx]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-05-15 22:43:33 +02:00
Ludwig Thomeczek
43a7a1a05e ar71xx: add support for UniFi-AC-Mesh
This adds the build option for the new UniFi AC Mesh.
It is a direct hardware copy from the AC Lite.

- SoC: QCA9563-AL3A (775Mhz)
- RAM: 128MiB
- Flash: 16MiB - dual firmware partitions!
- LAN: 1 1000M - POE
- Wireless:
        2.4G: QCA9563
          5G: UniFi Chip, QCA988X compatible

Thanks to Frank Dietz for testing.

Signed-off-by: Ludwig Thomeczek <ledesrc@wxorx.net>
[wrapped too long lines in mach-ubnt-unifiac.c]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-05-15 22:43:33 +02:00
Piotr Dymacz
1c56a7929a ar71xx: move Zbtlink ZBT-WE1526 to generic build target
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-05-15 22:43:33 +02:00
Oldřich Jedlička
f4a97c7f5d ar71xx: fix switch port mapping for ap123 based TP-Link devices
This fixes switch port mapping for: TL-WR841N/ND v8, TL-MR3420 v2 and
TL-WR941N/ND v5. All of them share the same Atheros ap123 reference
design.

The order of switch ports (shown in "swconfig dev eth1 show") is CPU,
LAN 4, LAN 1, LAN 2, LAN 3.

Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
[included 2 more devices]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-05-15 22:43:33 +02:00
Felix Fietkau
c536c50171 ar71xx: enable nand-utils in the mikrotik subtarget to ensure it makes it to initramfs
Without it, sysupgrade from initramfs to nand fails

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-05-12 13:29:55 +02:00
Felix Fietkau
837285b832 ar71xx: fold 641-MIPS-ath79-fix-AR934x-OTP-offsets.patch into the patch that it fixes
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-04-26 10:29:45 +02:00
Chris Blake
064eca14be ar71xx: Add OTP support for AR934x
The patch 523-MIPS-ath79-OTP-support only supports the OTP offsets for
AR933x chips, which has changed on newer platforms such as the AR934x.
The follwoing change is to add support for reading the OTP on the
AR934x. Tested on an Aerohive AP-121.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
2017-04-26 10:29:45 +02:00
Matthias Schiffer
96414cb407
ar71xx: fix minor syntax error in /lib/upgrade/platform.sh
Fix a '==' that should be a '=' in a test condition. Busybox fortunately
doesn't care.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2017-04-22 18:58:44 +02:00
Mathias Kresin
e20965811d ar71xx: fix ath9k default LED changes fallout
Since 192f0a3db8 ("ath9k: unset the default LED pin if used by
platform leds") the default ath9k wireless LED is not set as soon as
any pin of the ath ath9k gpio controller is used.

All touched boards have leds defined which are using the gpio pins
exposed by the ath9k driver but rely on a default set wireless led
trigger.

Add the wireless leds were missing and setup the wireless phy trigger
in userspace.

Signed-off-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-04-13 08:18:57 +02:00
Mathias Kresin
1f5ea4eae4 ar71xx: add correct named default wireless led by using platform leds
Instead of renaming the default wireless led attached to the wireless
chip, add a new led using the platform leds with the phy0tpt trigger
set in userspace.

When switching ar71xx to device tree, the same can be done by using the
build in GPIO controller and without adding new bindings.

Drop the now unused platform code.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-04-08 14:30:00 +02:00
Piotr Dymacz
190db43615 ar71xx: tp-link.mk: always include device version in image and DEVICE_TITLE
There are currently several supported TP-Link devices without specified
version number in image name and/or DEVICE_TITLE (e.g. WBS210, WBS510,
TL-WR810N, TL-WA7510N, TL-WPA8630), but vendor website shows that there
are already more than one version of them on the market.

For devices like Archer C5, which second version is based on a total
different platform, missing version number in DEVICE_TITLE (used in
menuconfig) might be misleading for users.

To make it less confusing for users and easier to maintain in future,
include version number in image name and DEVICE_TITLE for all TP-Link
devices, even if there is only one version of device at the moment.

Also, keep DEVICE_TITLE in same format for all TP-Link devices.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Acked-by: John Crispin <john@phrozen.org>
2017-04-03 12:29:07 +02:00
Ron Angeles
156d9255f2 ar71xx: add userspace support for Mikrotik RB2011iL
Kernel/hardware support for this board has been implemented since
Chaos Calmer. This set of patches is to get the board identified in
userland. This will allow support for things like sysupgrade,
configuring initial LED state, configuring initial switch state, etc.

Signed-off-by: Ron Angeles <ronangeles@gmail.com>
2017-04-03 12:29:07 +02:00
Vittorio Gambaletta
539e2a78f0 ar71xx: add TP-LINK TL-WR841N/ND v12 image
This router has the same hardware as TP-LINK TL-WR841N/ND v11 (same FCC
ID, same TFTP image name...).

If the stock firmware web interface doesn't accept LEDE factory image,
it can be flashed via the U-Boot TFTP recovery mode, by long-pressing
the reset button after power on.

The TFTP image name is wr841nv11_tp_recovery.bin (yes, v11, not v12).

Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
2017-04-03 12:29:07 +02:00
Christian Mehlis
dc4eae7a8c ar71xx: Compex WPJ563 support
Specification:
- SoC: Qualcomm Atheros QCA9563 (775 MHz, MIPS 74Kc)
- RAM: 128 MiB
- Storage: 16MB NOR flash
- Wireless: Built into QCA9563 (Dragonfly), PHY modes b/g/n, 3x3 MIMO
- Ethernet: 2x1G

Tested and working:
- ethernet / switch / lan / wan
- 2.4GHz SoC wifi
- PCIe
- leds
- buzzer

Ramload:
- tftpboot 0x84000000 lede-ar71xx-generic-wpj563-16M-initramfs-uImage.bin
- bootm 0x84000000

Install:
- tftpboot 0x80500000 lede-ar71xx-generic-wpj563-16M-squashfs-sysupgrade.bin
- erase 0x9f030000 +$filesize
- erase 0x9f680000 +1
- cp.b $fileaddr 0x9f030000 $filesize

Erasing 0x9f680000 is required because uboot defines
"bootcmd=bootm 0x9f680000 || bootm 0x9f030000", so it first tries to boot
the higher address. I think the 16 mb flash are intended to be used as
8+8mb for a fallback image. In my hardware only the lower address has a
bootable image. But to make sure future hardware will boot lede too, I
erase one block, so uboot will skip this address.

Signed-off-by: Christian Mehlis <christian@m3hlis.de>
2017-03-30 09:57:22 +02:00
John Crispin
95c333a3b5 ar71xx: drop default CONSOLE values
Compex boards dont need to set these as they are default.

Signed-off-by: John Crispin <john@phrozen.org>
2017-03-29 09:22:46 +02:00
Christian Mehlis
be11ce8f26 ar71xx: move Compex WPJ342 to generic build target
Signed-off-by: Christian Mehlis <christian@m3hlis.de>
2017-03-29 09:04:08 +02:00
Christian Mehlis
0af487033e ar71xx: move Compex WPJ344 to generic build target
Signed-off-by: Christian Mehlis <christian@m3hlis.de>
2017-03-29 09:04:08 +02:00
Christian Mehlis
f5ece7326a ar71xx: move Compex WPJ531 to generic build target
Signed-off-by: Christian Mehlis <christian@m3hlis.de>
2017-03-29 09:04:08 +02:00
Christian Mehlis
f940fe8964 ar71xx: move Compex WPJ558 to generic build target
Signed-off-by: Christian Mehlis <christian@m3hlis.de>
2017-03-29 09:04:08 +02:00
Leon M. George
6c937df749 ar71xx: wpj531: fix GPIOs for LED
/sys/devices/platform/leds-gpio/leds/ was not initialised with working LEDs.

Signed-off-by: Leon M. George <leon@georgemail.eu>
2017-03-27 08:36:32 +02:00
Hauke Mehrtens
88b125e9a4 kernel: update kernel 4.4 to 4.4.56
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-03-26 12:23:12 +02:00
Mathias Kresin
86a0cbb333 treewide: select ath10k firmware explicit
Do not rely on the default firmware selected by ath10k.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-03-24 08:09:39 +01:00
Piotr Dymacz
597c9f0be5 ar71xx: image: fix indentation
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-03-23 22:02:47 +01:00
Piotr Dymacz
4436979c83 ar71xx: add support for P&W R602N and CPE505N
P&W (full name: Shenzhen Progress&Win Technologies) R602N (could be also
labeled as R602F, R602, etc.) is a simple N300 router with 5-port
10/100 Mbps switch, non-detachable antennas and USB.

CPE505 is an outdoor CPE with PoE support and detachable antennas.

Both devices are based on Qualcomm/Atheros QCA9531 v2.

Common specification:

- 650/597/216 MHz (CPU/DDR/AHB)
- 64 MB of RAM (DDR2)
- 16 MB of FLASH
- UART (J2) header on PCB

R602N specification:

- 5x 10/100 Mbps Ethernet
- 1x USB 2.0
- 2T2R 2.4 GHz with external LNA and PA (SE2576L), up to 28 dBm
- 2x external, non-detachable antennas
- 7x LED, 1x button

CPE505N specification:

- 2x 10/100 Mbps Ethernet (both ports support passive PoE 12-24 V)
- 2T2R 2.4 GHz with external LNA and PA (SKY65174-21), up to 30 dBm
- 2x external, detachable antennas (RP-SMA connectors)
- 1x RGB LED, 2x LEDs (in RJ45 sockets), 1x button

Flash instructions:

It seems that there are many different versions of the firmware which
these devices are shipped with. The generic/standard one is based on
some modified OpenWrt and LEDE firmware can be flashed directly from
vendor's webgui or with sysupgrade (root password is "admin123").

Before flashing, make sure (use "fw_printenv") that the kernel load
address in your device is set to "0x9f050000" (bootcmd variable is
"bootm 0x9f050000"). If your device uses different load address, you
should first change it, under vendor's firmware, with command:

fw_setenv bootcmd "bootm 0x9f050000 || bootm OLD_ADDRESS"

Where OLD_ADDRESS is previous kernel load address (in CPE505 version
I got access to, it was "0x9fe80000"). This will allow you to use
both the vendor's and LEDE firmware.

If version of your device contains empty U-Boot environment (you will
get information about this after issuing "fw_printenv"), you should
use U-Boot, serial line access and TFTP to perform firmware upgrade:

1. tftp 0x80060000 lede-ar71xx-generic-...-squashfs-sysupgrade.bin
2. erase 0x9f050000 +$filesize
3. cp.b $fileaddr 0x9f050000 $filesize
4. setenv bootcmd "bootm 0x9f050000 || bootm OLD_ADDRESS"
5. saveenv && reset

These devices contain also web recovery mode inside U-Boot. It can be
started with pressing the reset button for around 3 seconds just after
the device powerup. Web recovery panel is available on "192.168.10.9"
and to be able to use it, IP on your PC must be set to "192.168.10.10".

Make sure to change kernel load address before using recovery mode or
the U-Boot will not be able to load LEDE firmware.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-03-23 17:59:47 +01:00
Vaclav Svoboda
0d9adb4832 ar71xx: add support for TP-LINK TL-WR840N v2 and v3
This patch adds support for the TP-LINK TL-WR840N v2 and v3.

- SoC: Qualcomm QCA9533-BL3A (650 MHz)
- RAM: 32 MiB (Zentel A3S56D40GTP)
- Flash: 4 MiB
   (v2: Macronix MX 25L323F)
   (v3: Winbond 25Q32FVSIG)
- LAN: 4x 100M
- WAN: 1x 100M

Signed-off-by: Vaclav Svoboda <svoboda@neng.cz>
2017-03-23 09:41:15 +01:00
Ryan Mounce
978998628f ar71xx: add support for MikroTik hAP ac
This patch adds initial support for the MikroTik RouterBOARD hAP ac
(RB962UiGS-5HacT2HnT).

All functions are supported except:
-SFP cage (eth1) is not working
-WLAN LEDs are not working

Signed-off-by: Ryan Mounce <ryan@mounce.com.au>
2017-03-23 09:35:14 +01:00
Ryan Mounce
540edf7045 ar71xx: add support for MikroTik hAP ac lite
This patch adds support for the MikroTik RouterBOARD hAP ac lite
(RB952Ui-5ac2nD).

The hAP ac lite is nearly identical to the hAP, with an added QCA9887
5GHz radio. The 2.4GHz radio ID is also changed in the hAP ac lite.

Signed-off-by: Ryan Mounce <ryan@mounce.com.au>
2017-03-23 09:35:14 +01:00
Thibaut VARENE
e1f3cf7ede ar71xx: mikrotik: prepend "RouterBOARD" to machine name for NOR devices
When the device name doesn't already contain "RouterBOARD", this patch adds
this string to the machine name.

Most NOR devices already have "RouterBOARD" in their hardware-stored device name,
but not all of them.

This patch also makes the code more robust against buffer overflows.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
2017-03-15 23:00:52 +01:00
Thibaut VARENE
e3dc036cbf ar71xx: add support for RB LHG 5nD
This patch adds support for the MikroTik RouterBOARD LHG 5
https://routerboard.com/RBLHG-5nD

Specifications:
- SoC: Atheros AR9344 (600MHz)
- RAM: 64MB
- Storage: 16MB NOR SPI flash
- Wireless: builtin AR9344 5GHz, 2x2:2
- Ethernet: 1x100M

Initial flash via initramfs, like all other RB devices.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
2017-03-15 23:00:52 +01:00
Daniel Gonzalez Cabanelas
080c6fa476 ar71xx: WNDR4300: Fix network vlan IDs
The Netgear WNDR4300 has the VLAN IDs flipped in LuCi, fix it.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
2017-03-13 00:13:18 +01:00
Daniel Gonzalez Cabanelas
ad9ad376bb ar71xx: WNDR4300: Fix switch HW controlled LEDs
The Netgear WNDR4300, equipped with an Atheros AR8327 Gigabit Switch,
has two LEDs on each port for monitoring LAN activity, but it currently
only uses one. Fix the configuration to use both.

The patch provides this new configuration:
- green LED: 1 Gbps link, 4Hz blink frequency
- amber LED: 10/100 Mbps link. 4Hz for 100Mbps, 2Hz for 10Mbps

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
2017-03-13 00:12:07 +01:00
Piotr Dymacz
09862bb006 ar71xx: fix Wallys DR344 ethernet MAC addresses offsets
Without this fix, ethernet interfaces on Wallys DR344 use random MAC
addresses.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-03-12 23:52:19 +01:00
Piotr Dymacz
7e38ce2e7d ar71xx: base-files: few minor cleanups in lib/ar71xx.sh
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-03-12 23:47:59 +01:00
Piotr Dymacz
c2b5206c80 ar71xx: base-files: fix boards order in lib/ar71xx.sh
Keep everything within case statements in alphabetical order.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-03-12 23:47:59 +01:00
Piotr Dymacz
d9bc3e6882 ar71xx: base-files: shorten case statement patterns in lib/ar71xx.sh
At now there is no general rule about what part of (or whole) machine
name string should be used for board name assignment/detection and every
target handles this in a different way.

For most of the boards in ar71xx we already use only part of the string,
generally without the vendor name.

This shortens wildcards patterns in case statement for board name
assignment, wherever possible (e.g. where it won't be misleading).

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-03-12 23:47:59 +01:00
Piotr Dymacz
4f09837cdf ar71xx: base-files: always use double quotes in lib/ar71xx.sh
Be consistent and always use double quotes for case statement patterns,
as in other targets. With this approach it should be less confusing for
users adding support for new devices.

Also, be consistent with MikroTik boards wildcard pattern.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-03-12 23:43:17 +01:00
Piotr Dymacz
589b37e8b5 ar71xx: base-files: fix indentation in lib/ar71xx.sh
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-03-12 17:39:12 +01:00
Piotr Dymacz
e213647399 ar71xx: fix machine name for several devices
Be consistent with form and format of the vendor name.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-03-12 17:39:12 +01:00
Shuanglin Liu
53ef20f65a ar71xx: add support for Rockeetech AP531B0
Specification:
- SoC: Qualcomm Atheros QCA9531 (650/400/216 MHz (CPU/DDR/AHB))
- RAM: 64 MiB DDR2
- Storage: 16 MiB of flash (optional 16 MiB second flash)
- Wireless: built into QCA9531 (Honey Bee), PHY modes b/g/n
- Ethernet: 1x100M (port0) 1x100M (port 4)
- PCI-E: x1
- SIMcard slot: x1
- USB 2.0 port: x1 (optional)
- Ext GPIO pin: x8
- UART for serial console: x1
- External watchdog: x1 (optional)
- Power supply: 9-48V (DC jack/passive PoE)

Installation through tftp:
- Copy <Firmware Image Name> into tftp directory
- Connect board via ttl port and Ethernet port
- Boot the AP531B0
- When "Autobooting in 1 seconds" appears press Enter
- Set serverip and ipaddr appropriate
  (e.g. setenv serverip 192.168.88.10;setenv ipaddr 192.168.88.1)
- Enter "tftp 0x8050000 <Firmware Image Name>"
- Enter "erase 0x9f050000 +$filesize"
- Enter "cp.b 0x80500000 0x9f050000 $filesize"
- Enter "reset"

Signed-off-by: Shuanglin Liu <roboidler@gmail.com>
2017-03-12 17:38:31 +01:00
Hauke Mehrtens
31c6452107 kernel: update kernel 4.4 to 4.4.53
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-03-12 15:46:02 +01:00
Stijn Segers
0ad82375cd ar71xx: add ath10k driver and firmware for Netgear R6100 to firmware image
A Netgear R6100 owner reported the LEDE images lack the ath10k driver and firmware [1]. This patch adds both to the R6100 image.

[1] https://forum.lede-project.org/t/netgear-r6100-5ghz-wifi-not-working-after-initial-install/2222

Signed-off-by: Stijn Segers <francesco.borromini@inventati.org>
2017-03-11 08:30:56 +01:00
Felix Fietkau
0504cd22aa ar71xx: fix build without CONFIG_NOP_USB_XCEIV (FS#593)
Open-code usb_phy_generic_register instead of calling it, since it is
really trivial. Avoid pulling CONFIG_NOP_USB_XCEIV into the kernel
config and add a proper dependency instead

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-03-07 11:37:50 +01:00
Wojciech Jowsa
f223c4a923 ar71xx: set status led for the gl-* boards
Signed-off-by: Wojciech Jowsa <w.jowsa@radytek.com>
2017-03-06 07:50:11 +01:00
Thibaut VARENE
ed49d08762 ar71xx: mikrotik: erase firmware partition on SPI NOR devices in pre_upgrade()
On Mikrotik SPI NOR devices, the firmware partition must be erased when flashing
from stock firmware, otherwise leftover bits (in particular a kernel signature)
can trigger a boot loop.

When booted from initramfs (the only way to flash LEDE on these devices),
this patch unconditionally erases the firmware partition in the pre_upgrade()
stage for all supported SPI NOR devices.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
2017-02-26 13:30:39 +01:00
Arvid E. Picciani
0d09c7281f ar71xx: Enable RB2011 TTY
Enables TTY on the Mikrotik RouterBoard RB2011*R*

Signed-off-by: Arvid E. Picciani <aep@exys.org>
2017-02-26 08:46:09 +01:00
Felix Fietkau
eb4f70a3cd ar71xx: use common firmware partition for WNDAP360
Patch from https://github.com/openwrt/openwrt/pull/398

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-23 16:27:47 +01:00
Kevin Darbyshire-Bryant
91a65f6c88 kernel: update kernel 4.4 to 4.4.50
Bump kernel from 4.4.49 to 4.4.50

Compile tested: All targets

Run tested: ar71xx Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2017-02-23 10:40:21 +01:00
Thibaut VARENE
f6a52bf337 ar71xx: Enable mtdsplit support for RB SPI NOR devices
This patch enables mtdsplit for the MikroTik subtarget.
It converts mach-rbspi.c to use a single "firmware" partition.
Finally, it converts the SPI NOR profile to metadata images:
the original combined-image format is gone, the images are now
"standard" sysupgrade images with metadata appended.

Note: kernel2minor apparently pads the kernel container to erase-block
boundary, but this is undocumented behaviour, so we do not rely on it
and call pad-to anyway.

Note: in platform.sh, the boards are tested last in platform_check_image()
as this should eventually become the "*)" default case when more devices
switch to metadata images.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
2017-02-22 22:52:20 +01:00
Thibaut VARENE
53c862705d ar71xx: remove bogus "rb*)" catch-all from platform.sh
This patch replaces a dangerous catch-all with the exhaustive list of devices.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
2017-02-22 22:52:19 +01:00
Weijie Gao
3ee793f601 ar71xx: fix vlan settings for some boards
For AR71XX devices, GMAC1 always connects port 0 of the built-in switch,
as the CPU port.

This patch sets correct vlan for some devices with wrong settings:
a) mark port 0 as CPU port, tagged
b) reverse port order, marking these ports untagged

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
2017-02-20 09:27:43 +01:00
Thibaut VARENE
6e4549138d ar71xx: Add more boards to the routerboard serial detection patch
This patch enables serial console on the 435 series and the 953gs.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
2017-02-20 09:20:48 +01:00
Thomas Roberts
f9278337cf ar71xx: add support for TL-WR802N Version 2
This patch adds support for the TP-Link TL-WR802N Version 2.

Specification:
- SoC: Qualcomm Atheros QCA9533 (560 MHz, MIPS 24Kc)
- RAM: 32 MiB
- Storage: 4 MiB of FLash on board
- Wireless: Built into QCA9533 (Honey Bee), PHY modes b/g/n
- Ethernet: 1x100M (port0)

Installation through OEM Web Interface:
- Connect to TL-WR802N by Ethernet or Wi-Fi
- Go to http://192.168.0.1 (default user is "admin" & password is "admin)
- Go to "System Tools -> Firmware Upgrade"
- Browse for firmware "*.factory-us.bin" or  "*.factory-eu.bin" for eu model
- Click upgrade

Installation through tftp:
Note: T_OUT, T_IN and GND on the board must be connected to USB TTL
      Serial Configuration 115200 8n1

- Boot the TL-WR802N
- When "Autobooting in 1 seconds" appears type "tpl" followed by enter
- Connect to the board Ethernet port
    (IPADDR: 192.168.1.1, ServerIP: 192.168.1.10)
- tftpboot 0x80000000 <Firmware Image Name>
- Record the result of "printenv bootcmd"
- Enter "erase <Result of 'printenv bootcmd'> +0x3c0000"
    (e.g erase 0x9f020000 +0x3c0000)
- Enter "cp.b 0x80000000 <Result of 'printenv bootcmd'> 0x3c0000"
    (e.g cp.b 0x80000000 0x9f020000 0x3c0000)
- Enter "bootm <Result of 'printenv bootcmd'>"
    (e.g bootm 0x9f020000)

Signed-off-by: Thomas Roberts <tom.p.roberts@gmail.com>
2017-02-20 09:10:17 +01:00
Felix Fietkau
72327d1757 ar71xx: fix ethernet PLL configuration for QCA956x
QCA956x is configured like AR934x, not like the older chips.
Should fix ethernet hangs when using the WAN port without SGMII

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-17 12:16:13 +01:00
Henryk Heisig
d6baeb5c48 ar71xx: fix lan ports on archer C59 and C60
Signed-off-by: Henryk Heisig <hyniu@o2.pl>
2017-02-17 10:30:48 +01:00
Karol Dudek
58fc50f1b0 ar71xx: add support for 8devices Lima board
Lima is a module for the (IoE) internet of everything applications,
based on Qualcomm/Atheros QCA4531.

Specification:

- 650/600/216 MHz (CPU/DDR/AHB)
- 64 MB of RAM (DDR2)
- 32 MB of FLASH
- 2T2R 2.4 GHz
- 2x 10/100 Mbps Ethernet
- USB 2.0 Host
- PCIe
- UART for serial console
- 14x GPIO

Flash instruction:
1. Download lede-ar71xx-generic-lima-squashfs-sysupgrade.bin
and rename it to 8dev_recovery.bin
2. Binary file copy to USB stick and plug into slot USB
3. Press S2 (reset) button
4. Press and hold the S1 button by 5 seconds
5. Wait ~40 seconds to complete recovery

Tested on:

- Lima development kit

Signed-off-by: Karol Dudek <karoiz@sli.pl>
2017-02-17 10:19:09 +01:00
Thibaut VARENE
748e701b74 ar71xx: add preliminary kernel support for several RB SPI NOR devices
The cAP 2nD, mAP 2nD and wAP 2nD apparently all share the same QCA953x/SPI-NOR
platform.

This patch adds preliminary kernel support based on init data used in
Mikrotik's linux-3.3.5 kernel patch. Since this is totally experimental and
untested, the necessary glue in base-files has not been added, the code is
provided as a starting point in case somebody with that hardware wants to help
getting it supported.

The cAP lite (cAPL 2nD) should also be supported once it is determined whether
or not it uses the same board identifier as the mAP lite.

Code has been successfully built and has no side effect (no impact on already
supported devices).

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
2017-02-15 11:28:59 +01:00
Thibaut VARENE
b800453282 ar71xx: add new SPI NOR RB devices to the list of serial-enable patch
Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
2017-02-15 11:28:59 +01:00
Thibaut VARENE
b2044a7f60 ar71xx: add support for RB750r2
This patch adds support for the MikroTik RouterBOARD hEX lite
https://routerboard.com/RB750r2

Specifications:
- SoC: Qualcomm QCA9531 (850MHz)
- RAM: 64MB
- Storage: 16MB NOR SPI flash
- Ethernet: 5x100M (1 PoE in)

This ethernet router is based on the same platform as the hEX PoE lite (it
shares the same board identifier), but has no USB and no PoE out.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
2017-02-15 11:28:58 +01:00
Thibaut VARENE
19f42663d2 ar71xx: add support for RB750UPr2
This patch adds support for the MikroTik RouterBOARD hEX PoE lite
https://routerboard.com/RB750UPr2

Specifications:
- SoC: Qualcomm QCA9531 (650MHz)
- RAM: 64MB
- Storage: 16MB NOR SPI flash
- Ethernet: 5x100M (1 PoE in, 1 PoE out)
- USB: Type A

This ethernet router is based on the same platform as the wireless router hAP.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
2017-02-15 11:28:58 +01:00
Thibaut VARENE
8cbb2ac633 ar71xx: add support for RB951Ui-2nD
This patch adds support for the MikroTik RouterBOARD hAP
https://routerboard.com/RB951Ui-2nD

Specifications:
- SoC: Qualcomm QCA9531 (650MHz)
- RAM: 64MB
- Storage: 16MB NOR SPI flash
- Wireless: builtin QCA9531, 2x2:2
- Ethernet: 5x100M (1 PoE in, 1 PoE out)
- USB: Type A

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
2017-02-15 11:28:58 +01:00
Thibaut VARENE
b18bae37a4 ar71xx: provide support for RB-941-2nD via mach-rbspi.c
This patch implements support for the hAP lite in mach-rbspi.c

hAP lite was supported via mach-rb941.c, so this file is removed
as well as the corresponding build bits.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
2017-02-15 11:28:57 +01:00
Thibaut VARENE
c59fa94eee ar71xx: add support for RB mAP L-2nD
This patch adds support for the MikroTik RouterBOARD mAP lite
https://routerboard.com/RBmAPL-2nD

Specifications:
- SoC: Qualcomm QCA9533 (650MHz)
- RAM: 64MB
- Storage: 16MB NOR SPI flash
- Wireless: builtin QCA9533, 2x2:2
- Ethernet: 1x100M

This is another 16M SPI NOR mikrotik device. The machine file is named
mach-rbspi.c because I plan to add support for several of the other spi-based
RouterBOARD devices in subsequent patches: they share most of the hardware
and thus the same codebase.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
2017-02-15 11:28:57 +01:00
Felix Fietkau
f533b94436 ar71xx: fix DEFAULT_PACKAGES for mikrotik devices
Include packages from the default profile for NAND devices

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-14 13:15:44 +01:00
Alexandru Gagniuc
6cce9557a0 ar71xx: Add support for D-Link EBR-2310 Rev. C
Add support for the EBR-2310, which is almost identical to the DIR-615
rev E4, without the wifi.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2017-02-14 12:27:14 +01:00