Commit Graph

33 Commits

Author SHA1 Message Date
Adrian Schmutzler 0b1cdb7eea treewide: remove empty default cases
There is no apparent reason to have an empty default case.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-17 12:46:19 +02:00
Robert Marko 59f0a0fd83 ipq806x: add Edgecore ECW5410 support
This patch adds support for the Edgecore ECW5410 indoor AP.

Specification:
- SoC: Qualcomm Atheros IPQ8068 ARMv7 2x Cortex A-15
- RAM: 256MB(225 usable) DDR3
- NOR Flash: 16MB SPI NOR
- NAND Flash: 128MB S34MS01G2 Parallel NAND
- Ethernet: 2 x 1G via 2x AR8033 PHY-s connected directly to GMAC2 and GMAC3 via SGMII (802.3af POE IN on eth0)
- USB: 1 x USB 3.0 SuperSpeed
- WLAN: 2x QCA9994 AC Wawe 2 (1x 2GHz bgn, 1x 5GHz acn)
- CC2540 BLE
- UART console on RJ45 next to ethernet ports exposed.
Its Cisco pin compatible, 115200 8n1 baud.

Installation instructions:
Through stock firmware or initramfs.

1.Connect to console
2. Login with root account, if password is unknown then interrupt the boot with f and reset it in failsafe.
3. Transfer factory image
4. Flash the image with ubiformat /dev/mtd1 -y -f <your factory image path>

This will replace the rootfs2 with OpenWrt, if you are currently running from rootfs2 then simply change /dev/mtd1 to /dev/mtd0

Note

Initramfs:
1.  Connect to console
2.  Transfer the image from TFTP server with tftpboot,
or by using DHCP advertised image with dhcp command.
3. bootm
4. Run ubiformat /dev/mtd1

You need to interrupt the bootloader after rebooting and run:
run altbootcmd

This will switch your active rootfs partition to one you wrote to and boot from it.

So if rootfs1 is active, then it will change it to rootfs2.

This will format the rootfs2 partition, if your active partition is 2 then simply change /dev/mtd1 with /dev/mtd0
If you dont format the partition you will be writing too, then sysupgrade will find existing UBI rootfs and kernel volumes and update those.
This will result in wrong ordering and OpenWrt will panic on boot.

5. Transfer sysupgrade image
6. Flash with sysupgrade -n.

Note that sysupgrade will write the image to rootfs partition that is not currently in use.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2020-09-17 08:42:17 +02:00
David Bauer 70d5989c9c ipq806x: use switch trigger for WAN LED on NETGEAR boards
With this commit, the WAN LED is triggered by the switch port state
instead of the eth0 netdev.
Otherwise, the LED is always illuminated, regardless of the WAN port
link state.

Signed-off-by: David Bauer <mail@david-bauer.net>
2019-11-04 18:50:53 +01:00
INAGAKI Hiroshi 9c7fd17f4a ipq806x: fix LED configuration for NEC Aterm WG2600HP
NEC WG2600HP uses port1 on QCA8337 as a WAN port, so "0x2" should
be used as a portmask instead of "0x1e" for "WAN" LED configuration.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2019-02-28 11:54:09 +01:00
INAGAKI Hiroshi 51fe956c4f ipq806x: add support for Buffalo WXR-2533DHP
Buffalo WXR-2533DHP is a 2.4/5 GHz band 11ac router, based on Qualcomm
IPQ8064.

The U-Boot on WXR-2533DHP employs a complicated dual firmware
protection scheme against corruptions of the kernel and rootfs
images. See the notes in buffalo.sh for details.

specifications:

- Qualcomm IPQ8064 (384 - 1,400 MHz, 2C2T)
- 512 MB of RAM (DDR3)
- 256 MB of Flash (NAND)
- 4T4R 2.4/5 GHz Wlan (QCA9980)
- 5x 10/100/1000 Mbps Ethernet
- 10x LEDs, 8x keys (6x buttons, 2x slide-switches)
- 2x USB 3.0 Type-A
- 12VDC/4A AC Adapter
- UART through-hole on PCB
  - J3: Vcc, GND, TX, RX from USB port side
  - 115200n8

Boot instructions for the initramfs image:

1. Prepare the TFTP server with the initramfs image renamed to
   "wxr2300dhp-initramfs.uImage" and IP address "192.168.11.10".
2. Press the "AOSS" button while powering on the WXR-2533DHP.
3. Wait until the "Wireless" LED flashes before releasing the AOSS button.
   The WXR-2533DHP will grab the image from TFTP server and will boot it.

Flashing instructions:

To persistently write the firmware, flash an openwrt sysupgrade image
from inside the initramfs, for example transfer
via `scp <sysupgrade> root@192.168.1.1:/tmp` and flash on the device
with `sysupgrade -n /tmp/<sysupgrade>`. Then wait ~120 seconds to
let it finish the flashing process.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [reworded message]
2019-01-01 16:39:59 +01:00
Stefan Lippers-Hollmann 7c7ca66109 ipq806x: switch the NBG6817 wlan LEDs from amber to white
The original device support patch configured the amber wlan LEDs (which
are meant as error indicator by the OEM) controlled by the SOC's GPIO
as wlan traffic indicators, as the correct white wlan LEDs are
connected to GPIOs controlled by the QCA9984/ ath10k wlan cards were
not accessible. The recent addition of GPIO/ LED support to ath10k now
makes it possible to use the correct white LEDs instead - and
"mac80211: ath10k: use tpt LED trigger by default" also enables them by
default. While both LEDs are independent of each other (two separate
LEDs sharing one light tunnel), triggering both on wlan traffic is not
the intended behaviour (bright yellow light).

Tested on the ZyXEL NBG6817.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
2018-06-28 18:39:57 +02:00
INAGAKI Hiroshi 4645a6d318 ipq806x: add support for NEC Aterm WG2600HP
NEC Aterm WG2600HP is a 2.4/5 GHz band 11ac router, based on Qualcomm
IPQ8064.

Specification:

- IPQ8064 (384 - 1,400 MHz)
- 512 MB of RAM
- 32 MB of Flash (SPI)
- 4T4R 2.4/5 GHz
- 5x 10/100/1000 Mbps Ethernet
- 12x LEDs, 4x keys
- 1x USB 3.0 Type-A
- UART header on PCB
  - RX, TX, NC, GND, Vcc from power connector side
  - baudrate: 115200 bps

Flash instruction using initramfs image:
1. Connect serial cable to UART header
2. Connect power cable and turn on the router
3. When the "Press the [f] key and hit [enter] to enter failsafe mode"
message is displayed on the console, press the "f" key and Enter key
sequentially to enter the failsafe mode
4. create fw_env.config file with following contents on failsafe mode:
  /dev/mtd9 0x0 0x10000 0x10000
5. Execute following commands to add and change the environment
variables of U-Boot
  fw_setenv ipaddr "192.168.0.1"
  fw_setenv serverip "192.168.0.2"
  fw_setenv autostart "yes"
  fw_setenv bootcmd "tftpboot 0x44000000 wg2600hp-initramfs.bin;
  bootipq"
6. Set the IP address of the computer to 192.168.0.2, connect to the LAN
port of WG2600HP, and start the TFTP server on the computer
7. Rename OpenWrt initramfs image for WG2600HP to
"wg2600hp-initramfs.bin" and place it in the TFTP directory
8. Remove power cable from WG2600HP, reconnect it and restart WG2600HP
9. WG2600HP downloads initramfs image from TFTP server on the computer,
loads it and boot with initramfs image
10. On the initramfs image, execute "mtd erase firmware" to erase stock
firmware and execute sysupgrade with the sysupgrade image
11. Wait ~180 seconds to complete flashing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-06-19 20:46:01 +02:00
Christian Mehlis 0c7e78930b ipq806x: add support for Compex WPQ864
Hardware highlights:
- SoC: Qualcomm Atheros IPQ8064/5 ARM Dual Core CPU
- RAM: (512MB or 1GB) DDR3 System Memory
- Storage: 32MB NOR (Cypress S25FL256S1)
           256MB NAND (Micron MT29F2G08ABBEAH4)
- Ethernet: 5 x 1G via QCA8337N
- USB: 1 x USB 2.0/3.0 + 1 x USB 2.0 on mini PCIe3 socket
- PCIe: 3x mini PCIe (third mini PCIE3 is PCIe/USB shared)
- SIM Card Slot: 2 x Slot
- Buttons: Reset Button
- LEDs: 18x, 8x GPIO controllable
- Buzzer

The correct amount of RAM will be passed by the bootloader.

In contrast to the documentation provided by Compex, the third PCIe
doesn't use GPIO16 for PERST. Instead, GPIO3 is shared and used as PERST
for PCIe0 and PCIe2.

So far, no one was able to get USB 3.0 working with the 1GB RAM version,
while it works fine for my 512MB version. Since USB 3.0 doesn't work with
the Compex firmware for the 1G variant either, it could be a hardware
issue with these boards.

OpenWrt will be installed to the NAND flash. Make sure to have a full
working image on the NOR flash. It will be the backup in case anything
goes wrong.

It has been observed that an image loaded via tftpboot might have
bitflips. Hence the extra step to create a crc32 checksum to allow to
compare the checksum with the one from the source file prior to flashing.

In all cases it is necessary to set the following u-boot parameter to an
empty (whitespace) value, to ensure that the chosen bootargs of the dts
isn't overwritten or set to bogus - not working - values:

  (IPQ) # set bootargs " "
  (IPQ) # set fsbootargs " "
  (IPQ) # saveenv

The sysupgrade image can be installed directly on flash using u-boot (put
jumper in JP13 (leave JP9 open) to boot from nand):

  (IPQ) # set serverip 192.168.1.20
  (IPQ) # set ipaddr 192.168.1.1

  (IPQ) # tftpboot 0x42000000 openwrt-ipq806x-compex_wpq864-squashfs-nand-factory.bin
  (IPQ) # crc32 0x42000000 $filesize

  (IPQ) # nand erase 0x1340000 0x4000000
  (IPQ) # nand write 0x42000000 0x1340000 $filesize

The initramfs image can be started using:

  (IPQ) # set fdt_high 0x48000000
  (IPQ) # tftpboot 0x44000000 openwrt-ipq806x-compex_wpq864-initramfs-fit-uImage.itb
  (IPQ) # bootm 0x44000000

Signed-off-by: Christian Mehlis <christian@m3hlis.de>
Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-03-15 08:17:10 +01:00
John Crispin b7f115f22a ipq806x: drop ipq40xx support
Signed-off-by: John Crispin <john@phrozen.org>
2018-03-14 19:04:50 +01:00
Dongming Han 04d3308b62 ipq806x: add support for GL.iNet GL-B1300
This patch adds support for GL.iNet GL-B1300

Specification:
- SOC:        IPQ4028 / QCA Dakota
- RAM:        256 MiB
- FLASH:      32 MiB
- ETH:        Qualcomm Atheros QCA8075 Gigabit Switch (2 x LAN, 1 x WAN)
- USB:        1 x 3.0 (via Synopsys DesignWare DWC3 controller in the SoC)
- WLAN1:      Qualcomm Atheros QCA4028 2.4GHz 802.11bgn 2:2x2
- WLAN2:      Qualcomm Atheros QCA4028 5GHz 802.11a/n/ac 2:2x2
- INPUT:      one reset and one WPS button
- LEDS:       3 leds: Power, WIFI(only for 2.4G currently), and one reserved
- UART:       1 x UART on PCB (3.3V, TX, RX, GND) - 115200 8N1

Installation:
Method 1:
- use serial port to stop uboot
- uboot command: run lf
Method 2:
- push down reset button and power on
- wait until three leds constantly on then release
- upgrade by uboot web at http://192.168.1.1
Note:
- the sysupgrade image need to be renamed to lede-gl-b1300.bin in both method.
- the sysupgrade image can be automatically downloaded if tftp server at
  192.168.1.2 have that file.
- the wifi led will be flashing when writing image.

Signed-off-by: Dongming Han <handongming@gl-inet.com>
2018-02-14 09:40:32 +01:00
Luis Araneda 7293499f71 ipq806x: Sort occurrences of boardame alphabetically
This restores the alphabetical sort that was present
before the renaming of boardname.

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
2018-01-13 07:33:03 +01:00
Luis Araneda 33f09cf151 ipq806x: convert to dt-based board-detection
Use the generic board detection method:
- Board name: First compatible string from the device tree
- Board model: Model property from the device tree

Change occurrences of board name in userspace by the compatible
string, and removed target specific board detection script

Replace the definition of SUPPORTED_DEVICES in Device/Default
to extract the dt compatible string from each device definition.
Additionally, for devices supported by lede-17.01, append
the value of BOARD_NAME to SUPPORTED_DEVICES in the device
definition.

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
2018-01-13 07:33:03 +01:00
Luis Araneda 09e13bd341 ipq806x: add a helper variable with the vendor name stripped
This will allow to maintain the current syntax for LEDs config
when switching to a device tree compatible string boardname.

None of the current boards use a comma in the boardname, so they
will be unaffected.

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
2018-01-13 07:33:02 +01: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
Christian Lamparter 1cb406d019 ipq806x: add ipq4019 fritz4040 support
This patch adds support for AVM FRITZ!Box 4040.

hardware highlights:

SOC:	IPQ4018 / QCA Dakota
CPU:	Quad-Core ARMv7 Processor rev 5 (v7l) Cortex-A7
DRAM:	256 MiB Nanya NT5CC128M16IP
FLASH:	32 MiB MXIC MX25L25635FMI
ETH:	Qualcomm Atheros QCA8075 Gigabit Switch (4 x LAN, 1 x WAN)
USB:	1 x 3.0 (via Synopsys DesignWare DWC3 controller in the SoC)
	1 x 2.0 (via Synopsys DesignWare DWC3 controller in the SoC)
WLAN1:	Qualcomm Atheros QCA4018 2.4GHz 802.11bgn 2:2x2
WLAN2:	Qualcomm Atheros QCA4018 5GHz 802.11a/n/ac 2:2x2
INPUT:	one WLAN and one WPS button
LEDS:	Power, WAN/Internet, WIFI, INFO (red and amber) and LAN.
Serial:
	WARNING: The serial port needs a TTL/RS-232 v3.3 level converter!
        The Serial setting is 115200-8-N-1. The SoC's serial port is right
	next to the MXIC FLASH chip. The board has a unpopulated 1x4 0.1"
	header for it. Use a multimeter to figure out the pinout!

This board currently needs an additional u-boot image in order to boot
properly. Booting with EVA isn't possible ATM.

Install Procedure:
 0. It's highly recommended to connect to the serial port.
    The serial settings are listed above.
 1. install a u-boot image for AVM Fritz!Box 4040
    (see <https://github.com/chunkeey/FritzBox-4040-UBOOT/releases> and
    <https://github.com/chunkeey/FritzBox-4040-UBOOT/blob/master/upload-to-f4040.sh>)
 2. upload the initramfs.itb image via tftp (u-boot listens to
    192.168.1.1 - use binary transfer mode!)
 3. connect to the FB4040 and use sysupgrade sysupgrade.bin
    to install the image.

Works:
	- Switch and Ethernet (99%)
        - Buttons (WLAN, WPS)
        - FLASH (1 x 32MiB NOR Chip)
        - WLAN2G and WLAN5G
        - CPUFREQ scaling
        - PRNG
        - serial
        - Crypto Accelerator
        - sysupgrade (Read the flash instructions to avoid bricking)
        - full LEDE Install (Read the flash instructions to avoid bricking)
	- LEDs (Power, WAN, Info (red and amber), LAN)
          The LEDs are connected to the QCA8075 LED ports.
	  The AR40xx driver contains a gpio-controller to
	  handle these special "GPIOs".
        - USB Both 3.0 and 2.0 ports
        - many packages from other ARMv7 boards
          (This does include the RaspberryPi Model 2!)
        - ...

Not planned:
	- WAN<->LAN short-cut
	- Qualcomm Secure Execution Environment
        - ...

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John Crispin <john@phrozen.org>
2017-03-22 09:45:18 +01:00
Mathias Kresin 3228c2a682 ipq806x: more dts cleanup
Remove the wifi5g LED from the the d7800, r7500 and r7800. Albeit this
GPIO is mentioned in the GPL tarball, it doesn't do anything. The
2.4/5 GHz LEDs are connected to the wifi chips and not be controlled
from the the userspace.

Use the LEDs names/colours as they are used in the board manuals. Merge
redundant LED configurations. Use the phy[0|1]tpt trigger for the
wireless LEDs. Remove the workarounds for the not controllable wireless
LEDs.

Fix spi compatible strings and remove superfluous spi-max-frequency
parameters.

If there are two power leds, use one for indicating normal operation and
one for failsafe/upgrade. Keep the on/off state of the main power led
during boot.

Use the usb pinmux settings from the nbg6817 gpl sources.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-27 15:33:54 +01:00
Henryk Heisig e3caadc69d ipq806x: clean up dts files
Set the pinmux to the values found in the GPL tarballs of the boards.
Remove pinmux which are is not used (like nand pinmux for spi
flash boards).

This allows to use the wan orange led of the C2600 which had a wrong
pinmux before. Might fix buttons or leds of other boards as well.

Fix the LED color and the ledswitch key code of the C2600. Rename the
ledgnr to ledswitch.

Add support for indication the boot state using LEDs to the D7800,
NBG6817, R7500 and R7500v2.

Change GPIO active to readable values in D7800, EA8500, R7500,
R7500v2 and R7800.

Change gpioexport to gpio pinmux.

Add proper "drive strenght" to i2c4_pins and use it for RPM on
C2600, D7800, EA8500, R7500, R7500v2.

Remove pcie pinmux from D7800.

Move pinctrl to correct place in NBG6817 and R7800.

Signed-off-by: Henryk Heisig <hyniu@o2.pl>
2016-11-27 15:24:59 +01:00
Sebastian Quilitz ae79c41286 ipq806x: add support for TP-Link Archer VR2600v
This router is similar to the C2600. Ethernet on WAN + LAN, switch,
sysupgrade, LEDs, buttons and WiFi on 2G + 5G do work. The xDSL modem
and the POTS/DECT interface are not supported yet.

It is not possible to flash LEDE via the TP-Link webinterface. The
image need to be signed. The first 0x200 bytes of the image is the
TP-Link header including the signature. The signature is not validated
by the bootloader. The LEDE image is zeroed in this area.

To install LEDE it is necessary to solder a four pin header to JP2.
Connect a serial interface to this header and interrupt the autostart
of kernel. Transfer the sysupgrade image via TFTP and write it to the
serial flash at 0x320000.

Signed-off-by: Sebastian Quilitz <zeraphim@x-pantion.de>
2016-11-24 22:37:40 +01:00
Henryk Heisig c380772c19 ipq806x: c2600: change wan and lan led trigger to swconfig port
Signed-off-by: Henryk Heisig <hyniu@o2.pl>
2016-11-21 10:04:55 +01:00
Pavel Kubelun 5aace5a5fb ipq806x: fixes for R7800 and C2600
Updating spi pins configuration in R7800 and C2600 DTs
Adding more usb power pin export and gsbi6 in R7800 DT
Updating and fixing leds

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
2016-11-16 10:59:30 +01:00
Pavel Kubelun bf7166e545 ipq806x: fix leds, sata port for Netgear R7800 and minor fixes - renamed leds in correct color accordance - blink power led with white during boot and with amber when flashing firmware - fixed usb leds - enabled unused wps and rfkill leds as wlan leds. Now rfkill led is for 2.4GHz and wps - 5GHz WIFI - removed unneeded bootargs - removed unneeded pci pins from R7800 DT (driver already handles it in proper way) and add tx offsetting - nand ecc step size - fixed sata ports
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
2016-11-03 08:28:16 +01:00
Cezary Jackiewicz dafbc94f95 ipq806x: TP-Link Archer C2600: convert old usbdev trigger to new usbport
Signed-off-by: Cezary Jackiewicz <cezary@eko.one.pl>
2016-11-03 08:21:32 +01:00
André Valentin a0ed7af6c6 ipq806x/nbg6817: add support for ZyXEL NBG6817
CPU: 2x1.8GHz ARM, RAM: 512MiB
Storage: 4MiB serial Flash, 3.9GiB MMC
NIC: 2x1GBit/s, Switch with 5 external and 2 internal ports
WiFi: Dualband, ath10k 2.4GHz, 5GHz MU-MIMO

For installation copy xx-mmcblk0p4-kernel.bin and xx-mmcblk0p5-rootfs-full.bin
to device. Then run:
cat xx-mmcblk0p4-kernel.bin > /dev/mmc0blk0p4
cat xx-mmcblk0p5-rootfs-full.bin > /dev/mmc0blk0p5
reboot -f

For debugging serial console is easily visible on board, no soldering needed.

Signed-off-by: André Valentin <avalentin@marcant.net>
2016-10-26 12:37:46 +02:00
Henryk Heisig bcfb535730 ipq806x: C2600: change leds colour name
Signed-off-by: Henryk Heisig hyniu@o2.pl
2016-10-15 11:36:50 +02:00
Cezary Jackiewicz 9417293366 ipq806x: Archer C2600: Renaming LED accordance with the standard
Signed-off-by: Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
2016-08-24 00:21:34 +02:00
Alexis Green c34f953fef ipq806x: Build image for Netgear Nighthawk X4 R7500v2
Signed-off-by: Alexis Green <alexis@cessp.it>
[Jo-Philipp Wich: add missing DEVICE_TITLE, fix model name in commit title]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-08-22 17:24:48 +02:00
Pavel Kubelun 823242185b ipq806x: add initial support for Netgear R7800
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
2016-06-22 19:32:06 +02:00
Adrian Panella 3d067c0132 ipq806x: base-files: add support for Linksys EA8500
Signed-off-by: Adrian Panella <ianchi74@outlook.com>
2016-06-13 22:51:42 +02:00
Ash Benz 98b50f0bef ipq806x/base-files: Add Archer C2600 LEDs and board
Signed-off-by: Ash Benz <ash.benz@bk.ru>
2016-05-27 15:50:17 +02:00
John Crispin 78a6a9aec3 ipq806x: Add support for Netgear D7800
Signed-off-by: Tathagata Das <tathagata@alumnux.com>

SVN-Revision: 48360
2016-01-19 10:16:36 +00:00
Jo-Philipp Wich 67e1c87012 all: drop old uci-defaults.sh
Replace former uci-defaults.sh implementation with the uci-defaults-new.sh one
and update all users accordingly.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47867
2015-12-11 15:26:06 +00:00
Jo-Philipp Wich 80a3e65a9d kirkwood, ipq806x: fix board.d script permissions
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47735
2015-12-03 22:42:13 +00:00
Jo-Philipp Wich 4615944c71 ipq806x: switch from uci-defaults to board.d
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47730
2015-12-03 21:13:12 +00:00