From 0c7e78930b8e3865000ba677d7b71f4f063499f1 Mon Sep 17 00:00:00 2001 From: Christian Mehlis Date: Sun, 30 Oct 2016 09:51:54 +0100 Subject: 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 Signed-off-by: Mathias Kresin --- target/linux/ipq806x/base-files/etc/board.d/01_leds | 4 ++++ target/linux/ipq806x/base-files/etc/board.d/02_network | 15 ++++++++------- target/linux/ipq806x/base-files/lib/upgrade/platform.sh | 7 ++++--- 3 files changed, 16 insertions(+), 10 deletions(-) (limited to 'target/linux/ipq806x/base-files') diff --git a/target/linux/ipq806x/base-files/etc/board.d/01_leds b/target/linux/ipq806x/base-files/etc/board.d/01_leds index 98aac707d5..a8d9573faa 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/01_leds +++ b/target/linux/ipq806x/base-files/etc/board.d/01_leds @@ -11,6 +11,10 @@ board=$(board_name) boardname="${board##*,}" case "$board" in +compex,wpq864) + ucidef_set_led_usbport "usb" "USB" "wpq864:green:usb" "usb1-port1" "usb2-port1" + ucidef_set_led_usbport "pcie-usb" "PCIe USB" "wpq864:green:usb-pcie" "usb3-port1" + ;; netgear,d7800 |\ netgear,r7500 |\ netgear,r7500v2 |\ diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network b/target/linux/ipq806x/base-files/etc/board.d/02_network index e279cdd8f6..9d8af44855 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/02_network +++ b/target/linux/ipq806x/base-files/etc/board.d/02_network @@ -12,13 +12,7 @@ board_config_update board=$(board_name) case "$board" in -linksys,ea8500) - hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr) - ucidef_add_switch "switch0" \ - "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" - ucidef_set_interface_macaddr "lan" "$hw_mac_addr" - ucidef_set_interface_macaddr "wan" "$hw_mac_addr" - ;; +compex,wpq864 |\ netgear,d7800 |\ netgear,r7500 |\ netgear,r7500v2 |\ @@ -28,6 +22,13 @@ tplink,vr2600v) ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0" ;; +linksys,ea8500) + hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr) + ucidef_add_switch "switch0" \ + "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" + ucidef_set_interface_macaddr "lan" "$hw_mac_addr" + ucidef_set_interface_macaddr "wan" "$hw_mac_addr" + ;; qcom,ipq8064-db149) ucidef_set_interface_lan "eth1 eth2 eth3" ucidef_add_switch "switch0" \ diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh index c0deeda889..4f230eac8a 100644 --- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh @@ -10,9 +10,7 @@ platform_check_image() { platform_do_upgrade() { case "$(board_name)" in - linksys,ea8500) - platform_do_upgrade_linksys "$ARGV" - ;; + compex,wpq864|\ netgear,d7800 |\ netgear,r7500 |\ netgear,r7500v2 |\ @@ -21,6 +19,9 @@ platform_do_upgrade() { zyxel,nbg6817) nand_do_upgrade "$ARGV" ;; + linksys,ea8500) + platform_do_upgrade_linksys "$ARGV" + ;; tplink,c2600) PART_NAME="os-image:rootfs" MTD_CONFIG_ARGS="-s 0x200000" -- cgit v1.2.3