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

98 lines
3.2 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"
;;
ath79: add support for Devolo Magic 2 WIFI This patch support Devolo Magic 2 WIFI, board devolo_dlan2-2400-ac. This device is a plc wifi AC2400 router/extender with 2 Ethernet ports, has a G.hn PLC and uses LCMP protocol from Home Grid Forum. Hardware: SoC: AR9344 CPU: 560 MHz Flash: 16 MiB (W25Q128JVSIQ) RAM: 128 MiB DDR2 Ethernet: 2xLAN 10/100/1000 PLC: 88LX5152 (MaxLinear G.hn) PLC Flash: W25Q32JVSSIQ PLC Uplink: 1Gbps MIMO PLC Link: RGMII 1Gbps (WAN) WiFi: Atheros AR9340 2.4GHz 802.11bgn Atheros AR9882-BR4A 5GHz 802.11ac Switch: QCA8337, Port0:CPU, Port2:PLC, Port3:LAN1, Port4:LAN2 Button: 3x Buttons (Reset, wifi and plc) LED: 3x Leds (wifi, plc white, plc red) GPIO Switch: 11-PLC Pairing (Active Low) 13-PLC Enable 21-WLAN power MACs Details verified with the stock firmware: Radio1: 2.4 GHz &wmac *:4c Art location: 0x1002 Radio0: 5.0 GHz &pcie *:4d Art location: 0x5006 Ethernet &ethernet *:4e = 2.4 GHz + 2 PLC uplink --- *:4f = 2.4 GHz + 3 Label MAC address is from PLC uplink OEM SSID: echo devolo-$(grep SerialNumber /dev/mtd1 | grep -o ...$) OEM WiFi password: grep DlanSecurityID /dev/mtd1|tr -d -|cut -d'=' -f 2 Recommendations: Configure and link your PLC with OEM firmware BEFORE you flash the device. PLC configuration/link should remain in different memory and should work straight forward after flashing. Restrictions: PLC link detection to trigger plc red led is not available. PLC G.hn chip is not compatible with open-plc-tools, it uses LCMP protocol with AES-128 and requires different software. Notes: Pairing should be possible with gpio switch. Default configuration will trigger wifi led with 2.4Ghz wifi traffic and plc white led with wan traffic. Flash instruction (TFTP): 1. Set PC to fixed ip address 192.168.0.100 2. Download the sysupgrade image and rename it to uploadfile 3. Start a tftp server with the image file in its root directory 4. Turn off the router 5. Press and hold Reset button 6. Turn on router with the reset button pressed and wait ~15 seconds 7. Release the reset button and after a short time the firmware should be transferred from the tftp server 8. Allow 1-2 minutes for the first boot. Signed-off-by: Manuel Giganto <mgigantoregistros@gmail.com>
5 years ago
devolo,magic-2-wifi)
ucidef_add_gpio_switch "plc_pairing" "PLC pairing" "11" "1"
ucidef_add_gpio_switch "plc_enable" "PLC enable" "13" "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"
;;
teltonika,rut955)
ucidef_add_gpio_switch "sim_sel" "SIM select" "503" "1"
ucidef_add_gpio_switch "DOUT1" "DOUT1 (OC)" "504" "0"
ucidef_add_gpio_switch "DOUT2" "DOUT2 (Relay)" "505" "0"
ucidef_add_gpio_switch "modem_vbus" "Modem enable" "506" "1"
ucidef_add_gpio_switch "modem_rst" "Modem reset" "507" "0"
ucidef_add_gpio_switch "DOUT3" "DOUT3" "508" "0"
;;
ath79: add support for Teltonika RUT955 H7V3C0 This board was previously supported in ar71xx as 'RUT9XX'. The difference between that and the other RUT955 board already supported in ath79 is that instead of the SPI shift registers driving the LEDs and digital outputs that model got an I2C GPIO expander instead. To support LEDs during early boot and interrupt-driven digital inputs, I2C support as well as support for PCA953x has to be built-in and cannot be kernel modules, hence select those symbols for ath79/generic. Specification: - 550/400/200 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - 4x 10/100 Mbps Ethernet, with passive PoE support on LAN1 - 2T2R 2,4 GHz (AR9344) - built-in 4G/3G module (example: Quectel EC-25EU) - internal microSD slot (spi-mmc, buggy and disabled for now) - RS232 on D-Sub9 port (Cypress ACM via USB, /dev/ttyACM0) - RS422/RS485 (AR934x high speed UART, /dev/ttyATH1) - analog 0-24V input (MCP3221) - various digital inputs and outputs incl. a relay - 11x LED (4 are driven by AR9344, 7 by PCA9539) - 2x miniSIM slot (can be swapped via GPIO) - 2x RP-SMA/F (Wi-Fi), 3x SMA/F (2x WWAN, GPS) - 1x button (reset) - DC jack for main power input (9-30 V) - debugging UART available on PCB edge connector Serial console (/dev/ttyS0) pinout: - RX: pin1 (square) on top side of the main PCB (AR9344 is on top) - TX: pin1 (square) on bottom side Flash instruction: Vendor firmware is based on OpenWrt CC release. Use the "factory" image directly in GUI (make sure to uncheck "keep settings") or in U-Boot web based recovery. To avoid any problems, make sure to first update vendor firmware to latest version - "factory" image was successfully tested on device running "RUT9XX_R_00.06.051" firmware and U-Boot "3.0.1". Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years ago
teltonika,rut955-h7v3c0)
ucidef_add_gpio_switch "sim_sel" "SIM select" "503" "1"
ucidef_add_gpio_switch "DOUT1" "DOUT1 (OC)" "504" "0"
ucidef_add_gpio_switch "DOUT2" "DOUT2 (Relay)" "505" "0"
ucidef_add_gpio_switch "modem_vbus" "Modem enable" "508" "1"
ucidef_add_gpio_switch "modem_rst" "Modem reset" "509" "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-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