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.
openwrt/target/linux/ath79/generic/base-files/etc/board.d/03_gpio_switches

77 lines
2.4 KiB
Plaintext

#!/bin/sh
#
# Copyright (C) 2018 OpenWrt.org
#
. /lib/functions/uci-defaults.sh
board_config_update
board=$(board_name)
case "$board" in
ath79: add support for Bluesocket BSAP1880 board This board was used in dual-band 802.11n enterprise access points, models BSAP-1800v2 and BSAP-1840, introduced in 2010 by Bluesocket, which was acquired by Adtran in 2011, who has now EOL'ed them. They differed only in that the BSAP-1840's antennae were detachable, while the BSAP-1800v2's were inside the case. They have an external RJ-45 console port, which works with standard Cisco 72-3383-01 console cables. Specification: - System-On-Chip: AR7161 - CPU/Speed: 600 MHz - Flash-Chip: Macronix MX25L12845E - Flash size: 16 MiB - RAM: 64 MiB - Wireless No1: Lite-On WN2601A card: AR9160/AR9103 2.4GHz 802.11bgn - Wireless No2: Lite-On WN2502A card: AR9160/AR9106 5GHz 802.11an - PHY: Vitesse VSC8601, Rev. B Installation: 1. Connect to the serial console using a terminal that supports YMODEM at 115200 bps, 8 data bits, no parity, 1 stop bit 2. Interrupt the bootloader using its password, which is: r00t 3. Issue the "fis init" command, confirming if prompted 4. Look at the length of the openwrt-ath79-generic-*-squashfs-kernel.bin file, and substitute it below, instead of where I have "LeNgTh" 5. Issue the following command, and upload this file using YMODEM protocol load -r -v -b 0x80060000 -m ymodem 6. Issue the following commands, substituting as mentioned above: fis create -b 0x80060000 -l LeNgTh vmlinux_2 load -r -v -b 0x80100000 -m ymodem 7. Using YMODEM, upload openwrt-ath79-generic-*-squashfs-rootfs.bin 8. Issue the "fis free" command, and for the first range in its response, use a hexadecimal calculator to subtract the start from the end in order to substitute it below, with the leading "0x" to specify it in hexadecimal, instead of where I have "LeNgTh" 9. Issue the following commands, substituting as mentioned above: fis create -b 0x80100000 -l LeNgTh -e 0 -r 0 rootfs reset 10.Wait for the status LED to go solid green Tested-by: Brian Gonyer <bgonyer@gmail.com> Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us> [fixed obsolete $ARGV in platform_do_upgrade] Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
adtran,bsap1800-v2|\
adtran,bsap1840)
ucidef_add_gpio_switch "wifi1_ext_a" "5GHz External Antenna A" "489" "1"
ucidef_add_gpio_switch "wifi1_int_a" "5GHz Internal Antenna A" "493"
ucidef_add_gpio_switch "wifi1_ext_b" "5GHz External Antenna B" "494" "1"
ucidef_add_gpio_switch "wifi1_int_b" "5GHz Internal Antenna B" "495"
ucidef_add_gpio_switch "wifi1_ext_c" "5GHz External Antenna C" "496" "1"
ucidef_add_gpio_switch "wifi1_int_c" "5GHz Internal Antenna C" "497"
ucidef_add_gpio_switch "wifi0_ext_a" "2.4GHz External Antenna A" "505" "1"
ucidef_add_gpio_switch "wifi0_int_a" "2.4GHz Internal Antenna A" "506"
ucidef_add_gpio_switch "wifi0_ext_b" "2.4GHz External Antenna B" "507" "1"
ucidef_add_gpio_switch "wifi0_int_b" "2.4GHz Internal Antenna B" "508"
ucidef_add_gpio_switch "wifi0_ext_c" "2.4GHz External Antenna C" "509" "1"
ucidef_add_gpio_switch "wifi0_int_c" "2.4GHz Internal Antenna C" "510"
;;
comfast,cf-e5)
ucidef_add_gpio_switch "lte_power" "LTE Power" "14" "1"
ucidef_add_gpio_switch "lte_wakeup" "LTE Wakeup" "11" "1"
ucidef_add_gpio_switch "lte_poweroff" "LTE Poweroff" "1" "1"
ucidef_add_gpio_switch "lte_reset" "LTE Reset" "12" "1"
;;
dlink,dir-825-c1|\
dlink,dir-835-a1)
ucidef_add_gpio_switch "wan_led_auto" "WAN LED Auto" "20" "0"
;;
librerouter,librerouter-v1)
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "1" "0"
;;
tplink,archer-c25-v1)
ucidef_add_gpio_switch "led_control" "LED control" "21" "0"
ucidef_add_gpio_switch "led_reset" "LED reset" "19" "1"
;;
tplink,cpe210-v1|\
tplink,cpe220-v2|\
tplink,cpe220-v3|\
tplink,cpe510-v1|\
tplink,wbs210-v2|\
tplink,wbs510-v1|\
tplink,wbs510-v2)
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "20"
;;
ubnt,nanostation-ac)
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "3"
;;
ubnt,nanostation-m)
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "8"
;;
ubnt,nanostation-m-xw)
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "2"
;;
ath79: add support for Ubiquiti airCube ISP The Ubiquiti Network airCube ISP is a cube shaped 2.4 GHz with internal 2x2 MIMO antennas. It can be supplied via a USB connector or via PoE. There are for 10/100 Mbps ports (1 * WAN + 3 * LAN). There is an optional PoE passthrough from the first LAN port to the WAN port. SoC: Qualcomm / Atheros QCA9533-BL3A RAM: 64 MB DDR2 Flash: 16 MB SPI NOR Ethernet: 4x 10/100 Mbps (1 WAN + 3 LAN) LEDS: 1x via a SPI controller (not yet supported) Buttons: 1x Reset Serial: 1x (only RX and TX); 115200 baud, 8N1 Missing points: - LED not yet supported - Factory upgrade via web IF or TFTP recovery not yet supported (Needs RSA signed images, for details see PR#1958) The serial port is on a four pin connextor labeled J1 and located between Ethernet and USB connector. The pinout is: 1. 3V3 (out) 2. Rx (in) 3. Tx (out) 4. GND Upgrading via serial port / U-Boot: - Connect the serial port via a level converter - Power the system and stop U-Boot with pressing any key when `Hit any key to stop autoboot` is displayed. Note: Pressing space multiple times untill U-Boot reaches that location works well. - Connect a PC with the IP 192.168.1.100 (or some other in that net) running a TFTP-Server to one of the LAN ports. Copy the sysupgrade image to the server. - Set the U-Boot server IP with setenv serverip 192.168.1.100 - Load the flash image to RAM with tftpboot 0x81000000 sysupgrade.bin - Erase the flash with erase 0x9f050000 0x9ffaffff - Write the new flash content with cp 0x81000000 0x9f050000 ${filesize} - Reset the device with reset Signed-off-by: Christian Mauderer <oss@c-mauderer.de> [removed full stop in subject and added lockdown note to commit message] Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
ubnt,acb-isp)
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "11"
;;
ath79: Add support for ZBT-WD323 ZBT-WD323 is a dual-LTE router based on AR9344. The detailed specifications are: * AR9344 560MHz/450MHz/225MHz (CPU/DDR/AHN). * 128 MB RAM * 16MB of flash(SPI-NOR, 22MHz) * 1x 2.4GHz wifi (Atheros AR9340) * 3x 10/100Mbos Ethernet (AR8229) * 1x USB2.0 port * 2x miniPCIe-slots (USB2.0 only) * 2x SIM slots (standard size) * 4x LEDs (1 gpio controlled) * 1x reset button * 1x 10 pin terminal block (RS232, RS485, 4x GPIO) * 2x CP210x UART bridge controllers (used for RS232 and RS485) * 1x 2 pin 5mm industrial interface (input voltage 12V~36V) * 1x DC jack * 1x RTC (PCF8563) Tested: - Ethernet switch - Wifi - USB port - MiniPCIe-slots (+ SIM slots) - Sysupgrade - Reset button - RS232 Intallation and recovery: The board ships with OpenWRT, but sysupgrade does not work as a different firmware format than what is expected is generated. The easiest way to install (and recover) the router, is to use the web-interface provided by the bootloader (Breed). While the interface is in Chinese, it is easy to use. First, in order to access the interface, you need to hold down the reset button for around five seconds. Then, go to 192.168.1.1 in your browser. Click on the second item in the list on the left to access the recovery page. The second item on the next page is where you select the firmware. Select the menu item containing "Atheros SDK" and "16MB" in the dropdown close to the buttom, and click on the button at the bottom to start installation/recovery. Notes: * RS232 is available on /dev/ttyUSB0 and RS485 on /dev/ttyUSB1 Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com> [removed unused poll-interval from gpio-keys, i2c-gpio 4.19 compat] Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
zbtlink,zbt-wd323)
ucidef_add_gpio_switch "io0" "IO#0" "0"
ucidef_add_gpio_switch "io1" "IO#1" "1"
ucidef_add_gpio_switch "io2" "IO#2" "2"
ucidef_add_gpio_switch "io14" "IO#14" "14"
;;
esac
board_config_flush
exit 0