You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.8 KiB
Plaintext

#!/bin/sh
#
# Copyright (C) 2015 OpenWrt.org
#
. /lib/functions/uci-defaults.sh
board_config_update
board=$(board_name)
boardname="${board##*,}"
case "$board" in
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>
8 years ago
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 |\
netgear,r7800)
ucidef_set_led_usbport "usb1" "USB 1" "${boardname}:white:usb1" "usb1-port1" "usb2-port1"
ucidef_set_led_usbport "usb2" "USB 2" "${boardname}:white:usb2" "usb3-port1" "usb4-port1"
ucidef_set_led_netdev "wan" "WAN" "${boardname}:white:wan" "eth0"
ucidef_set_led_ide "esata" "eSATA" "${boardname}:white:esata"
;;
tplink,c2600)
ucidef_set_led_usbport "usb1" "USB 1" "${boardname}:white:usb_2" "usb1-port1" "usb2-port1"
ucidef_set_led_usbport "usb2" "USB 2" "${boardname}:white:usb_4" "usb3-port1" "usb4-port1"
ucidef_set_led_switch "wan" "wan" "${boardname}:white:wan" "switch0" "0x20"
ucidef_set_led_switch "lan" "lan" "${boardname}:white:lan" "switch0" "0x1e"
;;
tplink,vr2600v)
ucidef_set_led_usbport "usb" "USB" "${boardname}:white:usb" "usb1-port1" "usb2-port1" "usb3-port1" "usb4-port1"
ucidef_set_led_switch "lan" "lan" "${boardname}:white:lan" "switch0" "0x1e"
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:white:wlan2g" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:white:wlan5g" "phy1tpt"
ucidef_set_led_switch "wan" "wan" "${boardname}:white:wan" "switch0" "0x20"
;;
zyxel,nbg6817)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:amber:wifi2g" "phy1tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:amber:wifi5g" "phy0tpt"
ucidef_set_led_netdev "wan" "WAN" "${boardname}:white:internet" "eth1"
;;
*)
;;
esac
board_config_flush
exit 0