ipq806x: add support for Compex WPQ864
authorChristian Mehlis <christian@m3hlis.de>
Sun, 30 Oct 2016 08:51:54 +0000 (09:51 +0100)
committerMathias Kresin <dev@kresin.me>
Thu, 15 Mar 2018 07:17:10 +0000 (08:17 +0100)
commit0c7e78930b8e3865000ba677d7b71f4f063499f1
tree75cdb19c2ced92a6b02757444c43fbdcae99fe36
parent2d67ef86382f32847bdfe120912cbaff11a956d5
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>
target/linux/ipq806x/base-files/etc/board.d/01_leds
target/linux/ipq806x/base-files/etc/board.d/02_network
target/linux/ipq806x/base-files/lib/upgrade/platform.sh
target/linux/ipq806x/files-4.9/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts [new file with mode: 0644]
target/linux/ipq806x/image/Makefile
target/linux/ipq806x/patches-4.9/0069-arm-boot-add-dts-files.patch