aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/base-files/etc
Commit message (Collapse)AuthorAgeFilesLines
* ar71xx: ubnt-rocket-m-ti: fix RSSI LED definitionsLech Perczak2020-01-211-6/+7
| | | | | | | | | | | | | | | | | When mapping for RSSI LEDs was defined for interface wlan0 on Ubiquiti Rocket M Titanium, it missed connection to actual interface. Therefore create the mapping to interface, so RSSI LEDs work without additional configuration, after starting rssileds service. While at that, split RSSI into ~equal intervals for 6 LEDs, and remove coefficients needed for PWM LEDs, as this board does not support PWM LEDs. Finally, for complete support, enable 'rssileds' package in per-device rootfs, so the indicator works out of box. Signed-off-by: Lech Perczak <lech.perczak@gmail.com> (cherry picked from commit 83708f233daceacebd1c49da44711cc87b49162a)
* ar71xx: fix MAC address setup for TL-WDR4300 boardSungbo Eo2019-12-211-0/+4
| | | | | | | | | | | | | | | | | | The current ethernet MAC address setup of TL-WDR4300 board is different from the setup of stock firmware: OpenWrt: lan = label_mac -2, wan = label_mac -2 stock: lan = label_mac, wan = label_mac +1 This patch applies to all devices using TL-WDR4300 board: TL-WDR3600 v1 TL-WDR4300 v1 TL-WDR4300 v1 (IL) TL-WDR4310 v1 Mercury MW4530R v1 Signed-off-by: Sungbo Eo <mans0n@gorani.run> (cherry picked from commit 9b02d32e34df2bb8821ec6f08f525bee22d0d1ba)
* ar71xx: fix MAC addresses for Archer C5 v1, C7 v1/v2, WDR4900 v2Adrian Schmutzler2019-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | As discussed in 1d18a14a90c7 ("ath79: really fix TP-Link Archer C7 v2 MAC address"), stock firmware MAC address assignment is actually as follows: wlan0 (5GHz) : -1 wlan1 (2.4GHz) : 0 eth1 (LAN) : 0 eth0 (WAN) : 1 This has never been fixed for ar71xx, so let's do it now. Note that with WDR4900 v2 even both wlan0 and wlan1 where assigned to basemac-1 before ... Fixes: FS#408 Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit a021268032fb64afdce7bafa91c7c7bf44fa6ff2)
* ar71xx: improve support for TP-Link CPE510 v2Adrian Schmutzler2019-11-062-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes commit bae927c551fd ("ar71xx: add support for TP-LINK CPE510 V2.0") where the support for this device wasn't optimal. Device support for the CPE510v2 so far has been a hack to enable flashing with CPE510v1 images. Those even have different hardware (e.g. additional ethernet port). With this patch, we provide proper support for this device in ar71xx. Installation: - Flash factory image through stock firmware WEB UI or through TFTP - To get to TFTP recovery just hold reset button while powering on for around 4-5 seconds and release. - Rename factory image to recovery.bin - Stock TFTP server IP: 192.168.0.100 - Stock device TFTP address: 192.168.0.254 Fixes: bae927c551fd ("ar71xx: add support for TP-LINK CPE510 V2.0") Signed-off-by: Andrew Cameron <apcameron@softhome.net> [Rebased onto revert commit, changed comments in mach-cpe510.c, changed commit title and description, fixed eth0 MAC address, removed eth1 initialization] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> [squashed revert, added fixes tag] Signed-off-by: Petr Štetiar <ynezz@true.cz> (cherry picked from commit c79b796280fa5cd64bac663f9d5e5d9a737c30d6) [added CPE510V2 entry to tplink-safeloader.c] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ar71xx: fix WLAN LED names for Archer C7Tomislav Požega2019-07-281-2/+2
| | | | | | | Update WLAN LED colour identifier for both interfaces on Archer C7 Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com> (cherry picked from commit 65762cdd2223d759f5836214143888e32ce5766b)
* ar71xx: fix system LED names on Archer C5/C7Tomislav Požega2019-07-281-2/+2
| | | | | | | | Move system LED board definitions of Archer C5/C7 to reflect actual system LED colour used Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com> (cherry picked from commit a73934fc9ad05207e79a3e58abc3d14eee28b6f2)
* ar71xx: set mib-poll-interval on devices with ar8xxx switchPetr Štetiar2019-05-201-0/+50
| | | | | | | | | | | | | | Commit "generic: ar8216: add mib_poll_interval switch attribute" sets mib-poll-interval as disabled by default (was set to 2s), so it makes switch LEDs trigger disfunctional on devices which don't have mib-poll-interval set. So this patch sets mib-poll-interval to 500ms on devices which are using ar8xxx switch LEDs trigger, as the same value was set for built in switches in 443fc9ac35 ("ath79: use ar8216 for builtin switch"). Signed-off-by: Petr Štetiar <ynezz@true.cz> Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ar71xx: Fix network setup for TP-Link Archer C25 v1Adrian Schmutzler2019-05-151-10/+10
| | | | | | | | | Network for the Archer C25 v1 is set up without switch for no obvious reason. The LED setup is even done switch-based. This patch changes network setup so a switch is created. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ar71xx: mute script error in ar922x-led-fix scriptRosy Song2019-05-051-0/+3
| | | | | | | | | | | | This commit fixes following script error in syslog: cat: can't open '/sys/devices/platform/ehci-platform/usb1/1-1/1-1.2/1-1.2:1.4/ieee80211/phy*/name': No such file or directory sh: add: unknown operand sh: add: unknown operand Signed-off-by: Rosy Song <rosysong@rosinson.com> Signed-off-by: Petr Štetiar <ynezz@true.cz> [commit subject and message tweaks]
* ar71xx: add support for Mikrotik RouterBOARD 2011UiAS-2HnD r2Koen Vandeputte2019-04-232-3/+6
| | | | | | This board got a new hardware revision, without any change in functionality. Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ar71xx: Correct MAC address for WAN interface of Archer C7 v5Adrian Schmutzler2019-04-081-0/+4
| | | | | | | | | | | This device shares the network config with v4, thus the WAN MAC also needs to be fixed the same way. However, the partition where the MAC address resides has been changed. Based on: https://github.com/openwrt/openwrt/pull/1726 Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ar71xx: Add support for Ubiquity Bullet M (XW)Petr Štetiar2019-04-083-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CPU: AR9342 SoC RAM: 64 MB DDR2 Flash: 8 MB NOR SPI Ports: 100 MBit (24V PoE in) WLAN: 2.4/5 GHz UART: 1 UART on PCB marked as J1 with 115200 8N1 config LEDs: Power, Ethernet, 4x RSSI LEDs (orange, red, 2x green) Buttons: Reset UART connection details .---------------------------------. | | [ETH] J1 [ANT] | o VCC o RX o TX o GND | `---------------------------------' Flashing instructions using recovery method over TFTP 1. Unplug the ethernet cable from the router. 2. Using paper clip press and hold the router's reset button. Make sure you can feel it depressed by the paper clip. Do not release the button until step 4. 3. While keeping the reset button pressed in, plug the ethernet cable back into the AP. Keep the reset button depressed until you see the device's LEDs flashing in upgrade mode (alternating LED1/LED3 and LED2/LED4), this may take up to 25 seconds. 4. You may release the reset button, now the device should be in TFTP transfer mode. 5. Set a static IP on your Computer's NIC. A static IP of 192.168.1.25/24 should work. 6. Plug the PoE injector's LAN cable directly to your computer. 7. Start tftp client and issue following commands: tftp> binary tftp> connect 192.168.1.20 tftp> put openwrt-ar71xx-generic-ubnt-bullet-m-xw-squashfs-factory.bin Tested only on Bullet M2HP. Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ar71xx: Add support for TP-Link CPE210 v3Robert Marko2019-04-022-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Looks identical to the v2. This PR adds support for a popular low-cost 2.4GHz N based AP Specifications: - SoC: Qualcomm Atheros QCA9533 (650MHz) - RAM: 64MB - Storage: 8 MB SPI NOR - Wireless: 2.4GHz N based built into SoC 2x2 - Ethernet: 1x 100/10 Mbps, integrated into SoC, 24V POE IN Installation: Flash factory image through stock firmware WEB UI or through TFTP To get to TFTP recovery just hold reset button while powering on for around 4-5 seconds and release. Rename factory image to recovery.bin Stock TFTP server IP:192.168.0.100 Stock device TFTP adress:192.168.0.254 Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Signed-off-by: Robert Marko <robimarko@gmail.com> [Rebased, adjusted for separate tplink-safeloader entry, dynamic partitioning] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ar71xx: ens202ext: Fix whitespace issuesPetr Štetiar2019-04-011-4/+4
| | | | | | | | I've missed leading whitespace issues in the original patch, so fixing it in this commit. Thanks to pepe2k for letting me know. Fixes: d260813d ("ar71xx: ens202ext: Fix VLAN switch") Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ar71xx: ens202ext: Fix VLAN switchMichael Pratt2019-03-311-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The target ENS202EXT was just recently added right before the stable release of Openwrt 18. It flashes fine, but the physical switch is almost impossible to use until you have a VLAN set up. Tested on two devices. The actual problem is that eth0 represents nothing for whatever reason. In other words, both WAN and LAN are running from eth1. There may be an underlying problem in the build, but for now, I assume that this is correct and that a VLAN switch is an appropriate fix. Also, it's virtually impossible to get the switch running right through LuCI. It is one thing to get a switch to appear, but attempting to configure it breaks the whole thing. The VLAN has to be set up perfectly, otherwise, interfaces will not start up, and one is forced to reset settings, OR, the new LuCI feature kicks in and reverses any steps. It is extremely difficult to determine which virtual ports correspond to which physical ethernet ports without being able to set up the switch in LuCI. Temporary Workaround: followed directions here [openwrt/luci#867](https://github.com/openwrt/luci/issues/867) Reviewed-by: Marty Plummer <hanetzer@startmail.com> Signed-off-by: Michael Pratt <mpratt51@gmail.com> [commit author fix, subject fix, message text wrap] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ar71xx: add support for MikroTik RouterBOARD 922UAGS-5HPacDKoen Vandeputte2019-03-262-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the MikroTik RouterBOARD 922UAGS-5HPacD with a built-in 802.11ac High-Power radio (31dBm). See https://mikrotik.com/product/RB922UAGS-5HPacD for more info. Specifications: - SoC: Qualcomm Atheros QCA9557 (720 MHz) - RAM: 128 MB - Storage: 128 MB NAND - Wireless: external QCA9882 802.11a/ac 2x2:2 - Ethernet: 1x 1000/100/10 Mbps, integrated, via AR8031 PHY, passive PoE-in 24V - SFP: 1x host - USB: 1x 2.0 type A - PCIe: 1x Mini slot (also contains USB 2.0 for 3G/LTE modems) - SIM slot: 1x mini-SIM Working: - Board/system detection - NAND storage detection - PCIe - USB: Type A & mini PCIe - Wireless - Ethernet - LED's (excl. SFP and RSSI levels) - Reset button - Sysupgrade Not working: - SFP cage Installation: - Boot vmlinux-initramfs image via BOOTP/TFTP and then flash sysupgrade image using "sysupgrade -n" Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com> Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
* ar71xx: Add support for Mikrotik RB SXT 2nD r3Xavier Douville2019-03-222-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The Mikrotik RouterBOARD SXT 2nD r3 is an outdoor WiFi AP / CPE with a single 2.4 GHz radio and a 100 Mbps Ethernet port. The device similar to the SXT 2nD r2, but it has SPI NOR flash instead of NAND flash. Hardware -------- CPU: Atheros AR9344 (600 MHz) RAM: 64 MiB FLASH: 16 MiB SPI NOR W25Q128 ETH: 1x 100 Mbps Atheros AG71xx WiFi: 2T2R 802.11b/g/n (ath9k) Power: Passive PoE 8-30 V Installation instructions: 1. Boot openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf using a DHCP+TFTP server. 2. Erase the "firmware" partition using the mtd command. This should no longer be required once this patch is merged. 3. Use sysupgrade to install to flash. The file openwrt-ar71xx-mikrotik-rb-nor-flash-16M-squashfs-sysupgrade.bin should be used. Signed-off-by: Xavier Douville <github@douville.org>
* ar71xx: Speed up caldata/eeprom handlingAdrian Schmutzler2019-03-132-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reading and writing to and from flash storage is slowed down enormously by some functions which use a block size of 1. This patch reworks the extraction scripts to be much faster and efficient by reading and writing in possibly one big block. This is based on the initial commit a69e101 for ipq40xx by Christian Lamparter <chunkeey@gmail.com>. Speed comparison @ TP-Link TL-WDR4300 (just manually) results in a time reduction by three orders of magnitude (99.9 %). > time dd if=/dev/mtd3 of=/lib/firmware/test-slow bs=1 count=4096 skip=4096 4096+0 records in 4096+0 records out real 0m 15.85s user 0m 0.06s sys 0m 13.28s > time dd if=/dev/mtd3 of=/lib/firmware/test-fast bs=4096 count=1 skip=4096 iflag=skip_bytes 1+0 records in 1+0 records out real 0m 0.02s user 0m 0.00s sys 0m 0.02s Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ar71xx: Change led trigger from usbdev to usbportDavid Santamaría Rogado2019-02-281-46/+46
| | | | | | | | | | | | | This patch changes all the legacy usbdev leds triggers to the use usbport. The problem is that the usbdev triggers get applied as usbport in sysfs but LuCI gets confused and is not able to show the configuration with usbdev. More information can be found in the PR: <https://github.com/openwrt/openwrt/pull/1819> Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [extended commit message]
* ar71xx: GL.iNet AR300M family: correct LED definitionsAndreas Ziegler2019-02-261-0/+1
| | | | | | | | remove USB as this is no LED but power control rename WiFi LED with correct color red (like in stock firmware) set middle LED to be used for LAN link/activity Signed-off-by: Andreas Ziegler <dev@andreas-ziegler.de>
* ar71xx: Fix 5 GHz MAC address for Archer C60 v2Adrian Schmutzler2019-02-171-1/+6
| | | | | | | | Looks like C60 v2 needs the MAC address to be calculated manually, while the C60 v1 gets it correctly without manual interference. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ar71xx: fix TL-MR3220-v2 switch port orderPaul Wassi2019-02-141-1/+1
| | | | | | | Fix the switch port order for proper display on high level interfaces. Signed-off-by: Paul Wassi <p.wassi@gmx.at>
* ar71xx: fix TL-WR741ND-v4 switch port orderPaul Wassi2019-02-141-1/+5
| | | | | | | Fix the switch port order for proper display on high level interfaces. Signed-off-by: Paul Wassi <p.wassi@gmx.at>
* ar71xx: ubnt-(xm,xw): fix LED RSSI indicationLech Perczak2019-02-081-4/+5
| | | | | | | | | | | | | | | | | When mapping for RSSI LEDs was defined for interface wlan0 on Ubiquiti XM and XW family, it missed connection to actual interface. Therefore create the mapping to interface, so RSSI LEDs work without additional configuration, after starting rssileds service. Also add the required package for this. While at that, remove coefficients needed for PWM LEDs, as XM and XW boards do not support PWM LEDs. Tested-by: Petr Štetiar <ynezz@true.cz> Signed-off-by: Lech Perczak <lech.perczak@gmail.com> [Squashed commits + remove custom device_packages + slighty rewrite the commit msg] Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ar71xx: use correct wan mac address for the TP-Link Archer C7 v4David Santamaría Rogado2019-01-301-7/+11
| | | | | | | | | | | | The correct MAC address for this device is lan_mac +1, there is no need to set lan_mac so use base_mac variable instead lan_mac. Based on this PR for ath79: https://github.com/openwrt/openwrt/pull/1726 Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com> [fix alphabetical ordering, reword subject] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* ar71xx: fix TP-Link Archer C7 v5 switch LEDsRinki Kumari2018-11-171-3/+15
| | | | Signed-off-by: Rinki Kumari <rinki13@gmail.com>
* ar71xx: add support for Gainstrong MiniBox V3.2Pau Escrich2018-11-152-0/+2
| | | | | | | | | | | | Adds MiniBox V3.2 ar71xx target (QCA99531 + QCA9887) Info: http://oolite.cn/minibox-v3-2-qca9531-qca9887-module-pin-specification.html Reference patch: http://oolite.cn/wp-content/uploads/2017/09/minibox_v3_cc15.05_20160325.patch Installation: Upload firmware to uboot via HTTP at 192.168.1.1 (press button for 5 seconds) Signed-off-by: Pau Escrich <p4u@dabax.net> Signed-off-by: Daniel Golle <daniel@makrotopia.org> (daniel@makrotopia.org: rebased and fixed conflicts, fixed LED name, added ath10k eeprom)
* ar71xx: define switch for rb-952ui-5ac2ndThibaut VARÈNE2018-07-301-2/+2
| | | | | | | QCA9533 built-in switch can be configured Tested-by: Thibaut VARÈNE <hacks@slashdirt.org> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ar71xx: fix TL-WR1043N v5 port mappingJohn Crispin2018-07-301-1/+4
| | | | | | fixes 5660c8fb20 ("ar71xx: TL-WR1043N v5: fix mapping of LAN ports to labels on housing.") Signed-off-by: John Crispin <john@phrozen.org>
* ar71xx: TL-WR1043N v5: fix mapping of LAN ports to labels on housing.Tim Thorpe2018-07-301-1/+1
| | | | | | Reversed the numbering of the LAN ports in Luci so as to match the port numbers on the housing. Signed-off-by: Tim Thorpe <tim@tfthorpe.net>
* ar71xx: add support for TP-Link Archer C59 v2Keith Maika2018-07-305-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link Archer C59v2 is a dual-band AC1350 router based on Qualcomm/Atheros QCA9561+QCA9886 chips. Specification: - 775/650/258 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz - 2T2R 5 GHz - 5x 10/100 Mbps Ethernet - USB 2.0 port - UART header on PCB Flash instruction: - via web UI: 1. Download openwrt-ar71xx-generic-archer-c59-v2-squashfs-factory.bin 2. Login to router and open the Advanced tab 3. Navigate to System Tools -> Firmware Upgrade 4. Upload firmware using the Manual Upgrade form - via TFTP: 1. Set PC to fixed ip address 192.168.0.66 2. Download openwrt-ar71xx-generic-archer-c59-v2-squashfs-factory.bin and rename it to tp_recovery.bin 3. Start a tftp server with the file tp_recovery.bin 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. Wait ~30 second to complete recovery. Signed-off-by: Keith Maika <keithm@aoeex.com>
* ar71xx:add support for E750G v8张鹏2018-07-303-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qxwlan E750G v8 is based on Qualcomm QCA9344. Specification: - 560/450/225 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 8/16 MB of FLASH (SPI NOR) - 2T2R 2.4G GHz (AR9344) - 2x 10/100 Mbps Ethernet (PoE support) - 2x 10/100/1000 Mbps Ethernet - 7x LED (6 driven by GPIO) - 1x button (reset) - 1x DC jack for main power input (9-48 V) - UART (J23) and LEDs (J2) headers on PCB Flash instruction (using U-Boot CLI and tftp server): - Configure PC with static IP 192.168.1.10 and tftp server. - Rename "sysupgrade" filename to "firmware.bin" and place it in tftp server directory. - Connect PC with one of RJ45 ports, power up the board and press "enter" key to access U-Boot CLI. - Use the following command to update the device to OpenWrt: "run lfw". Flash instruction (using U-Boot web-based recovery): - Configure PC with static IP 192.168.1.xxx(2-254)/24. - Connect PC with one of RJ45 ports, press the reset button, power up the board and keep button pressed for around 6-7 seconds, until LEDs start flashing. - Open your browser and enter 192.168.1.1, select "sysupgrade" image and click the upgrade button. Signed-off-by: 张鹏 <sd20@qxwlan.com>
* ar71xx:add support for E750A v4张鹏2018-07-302-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qxwlan E750A v4 is based on Qualcomm QCA9344. Specification: - 560/450/225 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 8/16 MB of FLASH (SPI NOR) - 2T2R 5G GHz (AR9344) - 2x 10/100 Mbps Ethernet (one port with PoE support) - 1x miniPCIe slot (USB 2.0 bus only) - 7x LED (6 driven by GPIO) - 1x button (reset) - 1x DC jack for main power input (9-48 V) - UART (J23) and LEDs (J2) headers on PCB Flash instruction (using U-Boot CLI and tftp server): - Configure PC with static IP 192.168.1.10 and tftp server. - Rename "sysupgrade" filename to "firmware.bin" and place it in tftp server directory. - Connect PC with one of RJ45 ports, power up the board and press "enter" key to access U-Boot CLI. - Use the following command to update the device to OpenWrt: "run lfw". Flash instruction (using U-Boot web-based recovery): - Configure PC with static IP 192.168.1.xxx(2-254)/24. - Connect PC with one of RJ45 ports, press the reset button, power up the board and keep button pressed for around 6-7 seconds, until LEDs start flashing. - Open your browser and enter 192.168.1.1, select "sysupgrade" image and click the upgrade button. Signed-off-by: 张鹏 <sd20@qxwlan.com>
* ar71xx:add support for E558 v2张鹏2018-07-303-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qxwlan E558 v2 is based on Qualcomm QCA9558 + AR8327. Specification: - 720/600/200 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 8/16 MB of FLASH (SPI NOR) - 2T2R 2.4 GHz (QCA9558) - 3x 10/100/1000 Mbps Ethernet (one port with PoE support) - 4x miniPCIe slot (USB 2.0 bus only) - 1x microSIM slot - 5x LED (4 driven by GPIO) - 1x button (reset) - 1x 3-pos switch - 1x DC jack for main power input (9-48 V) - UART (JP5) and LEDs (J8) headers on PCB Flash instruction (using U-Boot CLI and tftp server): - Configure PC with static IP 192.168.1.10 and tftp server. - Rename "sysupgrade" filename to "firmware.bin" and place it in tftp server directory. - Connect PC with one of RJ45 ports, power up the board and press "enter" key to access U-Boot CLI. - Use the following command to update the device to OpenWrt: "run lfw". Flash instruction (using U-Boot web-based recovery): - Configure PC with static IP 192.168.1.xxx(2-254)/24. - Connect PC with one of RJ45 ports, press the reset button, power up the board and keep button pressed for around 6-7 seconds, until LEDs start flashing. - Open your browser and enter 192.168.1.1, select "sysupgrade" image and click the upgrade button. Signed-off-by: 张鹏 <sd20@qxwlan.com>
* ar71xx: cap324: Use standard eth as static lanDaniel F. Dickinson2018-07-301-1/+1
| | | | | | | | | | While the stock firmware and previous ar71xx versions of openwrt used the single ethernet port as a DHCP client, for unmodified openwrt usage it makes more sense to do the standard openwrt thing and make the ethernet port a static lan with known address so that users can find the device on the network more easily. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
* ar71xx: improve MikroTik wAP R supportThibaut VARÈNE2018-07-302-1/+5
| | | | | | | | | | | | | 81d446b045176e3e25bb0ef74e3d060b51a0a353 introduced incomplete support for this device. This patch attempts to correct the situation based on OEM source code. LED1-3 are GSM mode on OFW (2G/3G/4G) hence unassigned here. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> Tested-by: David Ehrmann <ehrmann@gmail.com>
* ar71xx: add missing diag LED support for RB wAP 2nDThibaut VARÈNE2018-07-301-1/+2
| | | | | | | 3b15eb06c366cf3805590a61f22e966a95bf8101 did not include diag.sh edit Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ar71xx: rbspi: fix RB wAP AC gpio conflict and LEDThibaut VARÈNE2018-07-301-1/+2
| | | | | | | | | | | | | | | e15c63a37574bd15ce3a6636c2f04741ab76f7b9 introduced code that was trying to register GPIO 1 as both an LED and a button. The OEM source makes it clear that LED1 is not wired to the SoC GPIOs. GPIO 1 is the reset button. Furthermore the (green) power led default state should also be defined, (matching OEM source), and it should be used by diag.sh since it's currently the only software-controllable LED. This patch fixes these issues and renames the corresponding #defines for clarity Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ar71xx: add support for MikroTik RB931-2nDThibaut VARÈNE2018-07-163-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the MikroTik RB931-2nD (hAP mini): https://mikrotik.com/product/RB931-2nD Specifications: * SoC: Qualcomm QCA9533 (650MHz) * RAM: 32MiB * Storage: 16MiB SPI NOR flash * Ethernet: 3x100M * Wireless: QCA9533 built-in, dual-chain 802.11b/g/n Installation: 1. Setup a DHCP/BOOTP Server with the following parameters: * DHCP-Option 66 (TFTP server name): pointing to a local TFTP server within the same subnet of the DHCP range * DHCP-Option 67 (Bootfile-Name): matching the initramfs filename of the to be booted image. The usable intramfs files are: - openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf - openwrt-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf - openwrt-ar71xx-mikrotik-rb-nor-flash-16M-initramfs-kernel.bin 2. Press the reset button on the board and keep that pressed. 3. Connect the board to your local network via its Internet port. 4. Release the button after the LEDs on the board are turned off. Now the board should load and start the initramfs image from the TFTP server. 5. Now connect the board via either of its LAN ports (2 or 3). 6. Upload the sysupgrade image to the board with scp: $ scp openwrt-ar71xx-mikrotik-rb-nor-flash-16M-squashfs-sysupgrade.bin root@192.168.1.1:/tmp/fw.bin 7. Log in to the running system listening on 192.168.1.1 via ssh as root (without password): $ ssh root@192.168.1.1 8. Flash the uploaded firmware file from the ssh session via the sysupgrade command: root@OpenWrt:~# sysupgrade /tmp/fw.bin Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ar71xx: Add support for TP-Link CPE210 v2Adrian Schmutzler2018-06-232-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR adds support for a popular low-cost 2.4GHz N based AP Specifications: - SoC: Qualcomm Atheros QCA9533 (650MHz) - RAM: 64MB - Storage: 8 MB SPI NOR - Wireless: 2.4GHz N based built into SoC 2x2 - Ethernet: 1x 100/10 Mbps, integrated into SoC, 24V POE IN Installation: Flash factory image through stock firmware WEB UI or through TFTP To get to TFTP recovery just hold reset button while powering on for around 4-5 seconds and release. Rename factory image to recovery.bin Stock TFTP server IP:192.168.0.100 Stock device TFTP adress:192.168.0.254 Notes: TP-Link does not use bootstrap registers so without this patch reference clock detects as 40MHz while it is actually 25MHz. This is due to messed up bootstrap resistor configuration on the PCB. Provided GPL code just forces 25MHz reference clock. That causes booting with completely wrong clocks, for example, CPU tries to boot at 1040MHz while the stock is 650MHz. So this PR depends on PR #672 to remove 40MHz reference clock. Thanks to Sven Eckelmann <sven@narfation.org> for properly patching that. Signed-off-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ar71xx: add support for TP-LINK Archer C7 v5Arvid E. Picciani2018-06-203-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link Archer C7 v5 is a dual-band AC1750 router, based on Qualcomm/Atheros QCA9563+QCA9880. Specification: - 750/400/250 MHz (CPU/DDR/AHB - 128 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz - 3T3R 5 GHz - 5x 10/100/1000 Mbps Ethernet - 10x LED, 2x button - UART header on PCB Flash instruction: 1. Upload lede-ar71xx-generic-archer-c7-v5-squashfs-factory.bin via Web interface Flash instruction using TFTP recovery: 1. Set PC to fixed ip address 192.168.0.66 2. Download lede-ar71xx-generic-archer-c7-v5-squashfs-factory.bin and rename it to ArcherC7v5_tp_recovery.bin 3. Start a tftp server with the file tp_recovery.bin 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. Wait ~30 second to complete recovery. Signed-off-by: Arvid E. Picciani <aep@exys.org>
* ar71x: add support for Mikrotik Routerboard wAP RDavid Ehrmann2018-06-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the Mikrotik wAP R (RBwAPR-2nD). The change is based on 3b15eb0 which added support for the wAP 2nD. This change lacks LED support. Specifications: - SoC: Qualcomm QCA9531 (650 MHz) - RAM: 64 MB - Storage: 16 MB NOR SPI flash - Wireless: built-in QCA9531, 802.11b/g/n 2x2:2 - Ethernet: 1x100Mbps - Power: 9-30V Passive PoE, 9-30V DC jack, 9-30V automotive jack - SIM card slot - Mini-PCIe slot Installation: 1. Login to the Mikrotik WebUI to backup your licence key 2. Change the following settings in System->Routerboard->Settings: - Boot device: try ethernet once then NAND - Boot protocol: DHCP - Force Backup Booter: checked 3. Setup a DHCP/BOOTP server with: - DHCP-Option 66 (TFTP server name) pointing to a local TFTP server within the same subnet of the DHCP range - DHCP-Option 67 (Bootfile-Name) matching the initramfs filename of the to be booted image, e.g. openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf 4. Power off the device 5. If this is the second attempt to boot OpenWRT or the boot device isn't "try ethernet once then NAND," press and hold the reset button while powered off. If this is the first attempt, this step isn't necessary. 6. Power on the device, holding the reset button for 15-20s if already pressed from the previous step. The board should load and start the initramfs image from the TFTP server. Login as root/without password to the started OpenWRT via SSH listing on IPv4 address 192.168.1.1. Use sysupgrade to install OpenWRT. Revert to RouterOS Use the "rbcfg" package on in OpenWRT: - rbcfg set boot_protocol bootp - rbcfg set boot_device ethnand - rbcfg apply Open Netinstall and reboot routerboard. Now Netinstall sees RouterBOARD and you can install RouterOS. If NetInstall gets stuck on Sending offer just wait for it to timeout and then close and open Netinstall again. Click on install again. In order for RouterOS to function properly, you need to restore license for the device. You can do that by including license in NetInstall. Signed-off-by: David Ehrmann <ehrmann@gmail.com>
* ar71xx: add support for Fritz!WLAN Repeater 450EDavid Bauer2018-06-184-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the AVM Fritz!WLAN Repeater 450E SOC: Qualcomm QCA9556 (Scorpion) 560MHz MIPS74Kc RAM: 64MB Zentel A3R12E40CBF DDR2 FLASH: 16MiB Winbond W25Q128 SPI NOR WLAN1: QCA9556 2.4 GHz 802.11b/g/n 3x3 INPUT: WPS button LED: Power, WiFi, LAN, RSSI indicator Serial: Header Next to Black metal shield Pinout is 3.3V - RX - TX - GND (Square Pad is 3.3V) The Serial setting is 115200-8-N-1. Tested and working: - Ethernet - 2.4GHz WiFi (correct MAC) - Installation via EVA bootloader - OpenWRT sysupgrade - Buttons - Most LEDs Not working: - 2 RSSI LEDs AVM used for RSSI{0,1} two of the Ethernet PHYs LEDs which they control over MDIO. Our driver doesn't expose these LEDs as GPIOs. While it is possible to implement this feature, it would require an additional kernel patch for a minor functionality. Installation via EVA: In the first seconds after Power is connected, the bootloader will listen for FTP connections on 192.168.178.1. Firmware can be uploaded like following: ftp> quote USER adam2 ftp> quote PASS adam2 ftp> binary ftp> debug ftp> passive ftp> quote MEDIA FLSH ftp> put openwrt-sysupgrade.bin mtd1 Note that this procedure might take up to two minutes. You need to powercycle the Device afterwards to boot OpenWRT. Signed-off-by: David Bauer <mail@david-bauer.net>
* ar71xx: use Power-LED as Diag-LED on FRITZBox 4020David Bauer2018-06-092-1/+1
| | | | | | | This commit makes use of the Power-LED as Diag-LED, allowing the LED to work as a status indicator. Signed-off-by: David Bauer <mail@david-bauer.net>
* ar71xx: fix USB switch to mPCIE for Mikrotik rb91x boardsKoen Vandeputte2018-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices like the Mikrotik RB912 only have 1 USB port which is shared between an USB A type port, and the mini PCIe socket. Toggling a gpio selects the output to which USB is connected. Since kernel 4.9, gpio base is rounded up to a value of 32. Commit 65da6f9ca164 ("ar71xx: fix secondary gpio controller base values") accounts correctly for that. In this commit, rb912 sees it's value changed from AR934X_GPIO_COUNT (23) to 32 This means that the USB toggle gpio number actually also changes from 52 to 61. But .. Some of these GPIO numbers are also used in other locations, like the boardfile. The author forgot to also change them over there. Switching the USB port to mPCIe now shows my modem is correctly discovered again: [ 2863.864471] usb 1-1: new high-speed USB device number 4 using ehci-platform [ 2864.055303] usb 1-1: config 1 has an invalid interface number: 8 but max is 3 [ 2864.062728] usb 1-1: config 1 has no interface number 1 [ 2864.074567] qcserial 1-1:1.0: Qualcomm USB modem converter detected [ 2864.081474] usb 1-1: Qualcomm USB modem converter now attached to ttyUSB0 [ 2864.111960] qcserial 1-1:1.2: Qualcomm USB modem converter detected [ 2864.118976] usb 1-1: Qualcomm USB modem converter now attached to ttyUSB1 [ 2864.139808] qcserial 1-1:1.3: Qualcomm USB modem converter detected [ 2864.146777] usb 1-1: Qualcomm USB modem converter now attached to ttyUSB2 [ 2864.165276] qmi_wwan 1-1:1.8: cdc-wdm0: USB WDM device [ 2864.171879] qmi_wwan 1-1:1.8 wwan0: register 'qmi_wwan' at usb-ehci-platform-1, WWAN/QMI device, 02:00:44:ed:3b:11 Fixes: 65da6f9ca164 ("ar71xx: fix secondary gpio controller base values") Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com> Cc: Robin Leblon <robin.leblon@ncentric.com> Cc: Felix Fietkau <nbd@nbd.name>
* ar71xx: add support for OCEDO KoalaDavid Bauer2018-06-074-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the OCEDO Koala SOC: Qualcomm QCA9558 (Scorpion) RAM: 128MB FLASH: 16MiB WLAN1: QCA9558 2.4 GHz 802.11bgn 3x3 WLAN2: QCA9880 5 GHz 802.11nac 3x3 INPUT: RESET button LED: Power, LAN, WiFi 2.4, WiFi 5, SYS Serial: Header Next to Black metal shield Pinout is 3.3V - GND - TX - RX (Arrow Pad is 3.3V) The Serial setting is 115200-8-N-1. Tested and working: - Ethernet - 2.4 GHz WiFi - 5 GHz WiFi - TFTP boot from ramdisk image - Installation via ramdisk image - OpenWRT sysupgrade - Buttons - LEDs Installation seems to be possible only through booting an OpenWRT ramdisk image. Hold down the reset button while powering on the device. It will load a ramdisk image named 'koala-uImage-initramfs-lzma.bin' from 192.168.100.8. Note: depending on the present software, the device might also try to pull a file called 'koala-uimage-factory'. Only the name differs, it is still used as a ramdisk image. Wait for the ramdisk image to boot. OpenWRT can be written to the flash via sysupgrade or mtd. Due to the flip-flop bootloader which we not (yet) support, you need to set the partition the bootloader is selecting. It is possible from the initramfs image with > fw_setenv bootcmd run bootcmd_1 Afterwards you can reboot the device. Signed-off-by: David Bauer <mail@david-bauer.net>
* ar71xx: add support for GL.iNet GL-AR750SLuo chongjun2018-05-273-0/+9
| | | | | | | | | | | | | | | | | | | This patch adds supports for GL-AR750S. Specification: - SOC: QCA9563 (775MHz) - Flash: 16 MiB (W25Q128FVSG) - RAM: 128 MiB DDR2 - Ethernet: 2x 1Gbps LAN + 1x 1Gbps WAN - Wireless: 2.4GHz (bgn) and 5GHz (ac) - USB: 1x USB 2.0 port - Button: 1x switch button, 1x reset button - LED: 3x LEDS (green) Flash instruction: Apply factory image via web-gui. Signed-off-by: Luo chongjun <luochongjun@gl-inet.com>
* ar71xx: fix bad "proto" references in default network configurationJo-Philipp Wich2018-05-251-2/+2
| | | | | | | | | This change was originally meant to go along with the ucidef_set_interface() fixup. Fixes: 7e664b7c2d ("base-files: fix ucidef_set_interface() protocol selection") Fixes: 85048a9c1f ("base-files: rework _ucidef_set_interface to be more generic") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: rework _ucidef_set_interface to be more genericRoman Yeryomin2018-05-241-3/+3
| | | | | | | | | | | | This is a rework of previously submitted patch reworking ucidef_set_interface_raw [1]. Here, keep the idea but instead make _ucidef_set_interface more generic and use it instead of ucidef_set_interface_raw. Also change the users like ucidef_set_interface_lan and others. [1] https://patchwork.ozlabs.org/patch/844961/ Signed-off-by: Roman Yeryomin <roman@advem.lv>
* ar71xx: Add support for PISEN TS-D084Chuanhong Guo2018-05-222-0/+2
| | | | | | | | | | | | | | | | | | PISEN TS-D084 is an wireless router with a battery and integrated power supply based on Atheros AR9331. Specification: - 400/400/200 MHz (CPU/DDR/AHB) - 64 MB of RAM (DDR2) - 8 MB of FLASH (SPI NOR) - 1x 10/100 Mbps Ethernet - 1T1R 2.4 GHz (AR9331) - 1x USB 2.0 Flash instruction: The manufacturer are using exactly the same firmware header as TP-LINK TL-WR703N (including device ID!). Simply upload the factory firmware into WebUI and flashing is done. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>