aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/dts
Commit message (Collapse)AuthorAgeFilesLines
* ath79: add support for the TP-Link WBS210 v1Adrian Schmutzler2020-06-161-0/+13
| | | | | | | | | | | | | | | | | | | | Specifications: - SoC: Atheros AR9344 - RAM: 64MB - Storage: 8 MB SPI NOR - Wireless: 2.4GHz N based built into SoC - Ethernet: 1x 10/100 Mbps with 24V POE IN, 1x 10/100 Mbps 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 Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for MikroTik RouterBOARD 493G (rb4xx series)Christopher Hill2020-06-152-0/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the MikroTik RouterBOARD RB493G, ported from the ar71xx target. See https://routerboard.com/RB493G for details Specification: - SoC Qualcomm Atheros AR7161 - RAM: 256 MiB - Storage: 128MiB NAND - Ethernet: 9x 1000/100/10 Mbps - USB 1x 2.0 / 1.0 type A - PCIe: 3x Mini slot - MicroSD slot Working: - Board/system detection - Ethernet - SPI - NAND - LEDs - USB - Sysupgrade Enabled (but untested due to lack of hardware): - PCIe - ath79_pci_irq struct has the slot/pin/IRQ mappings if needed Installation methods: - tftp boot initramfs image, scp then flash via "sysupgrade -n" - nand boot existing OpenWrt, scp then flash via "sysupgrade -n" Notes: - initramfs image will not work if uncompressed image size over ~8.5Mb - The "rb4xx" drivers have been enabled Signed-off-by: Christopher Hill <ch6574@gmail.com>
* ath79: add support for D-Link DAP-2695-A1Stijn Tintel2020-06-111-0/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware: * SoC: Qualcomm Atheros QCA9558 * RAM: 256MB * Flash: 16MB SPI NOR * Ethernet: 2x 10/100/1000 (1x 802.3at PoE-PD) * WiFi 2.4GHz: Qualcomm Atheros QCA9558 * WiFi 5GHz: Qualcomm Ahteros QCA9880-2R4E * LEDS: 1x 5GHz, 1x 2.4GHz, 1x LAN1(POE), 1x LAN2, 1x POWER * Buttons: 1x RESET * UART: 1x RJ45 RS-232 Console port Installation via stock firmware: * Install the factory image via the stock firmware web interface Installation via bootloader Emergency Web Server: * Connect your PC to the LAN1(PoE) port * Configure your PC with IP address 192.168.0.90 * Open a serial console to the Console port (115200,8n1) * Press "q" within 2s when "press 'q' to stop autoboot" appears * Open http://192.168.0.50 in a browser * Upload either the factory or the sysupgrade image * Once you see "write image into flash...OK,dest addr=0x9f070000" you can power-cycle the device. Ignore "checksum bad" messages. Setting the MAC addresses for the ethernet interfaces via /etc/board.d/02_network adds the following snippets to /etc/config/network: config device 'lan_eth0_1_dev' option name 'eth0.1' option macaddr 'xx:xx:xx:xx:xx:xx' config device 'wan_eth1_2_dev' option name 'eth1.2' option macaddr 'xx:xx:xx:xx:xx:xx' This would result in the proper MAC addresses being set for the VLAN subinterfaces, but the parent interfaces would still have a random MAC address. Using untagged VLANs could solve this, but would still leave those extra snippets in /etc/config/network, and then the device VLAN setup would differ from the one used in ar71xx. Therefore, the MAC addresses of the ethernet interfaces are being set via preinit instead. The bdcfg partition contains 4 MAC address labels: - lanmac - wanmac - wlanmac - wlanmac_a The first 3 all contain the same MAC address, which is also the one on the label. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for the Netgear WNDRMAC v1Renaud Lepage2020-06-111-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Netgear WNDRMAC v1 is a hardware variant of the Netgear WNDR3700 v2 Specifications ============== * SoC: Atheros AR7161 * RAM: 64mb * Flash on board: 16mb * WiFi: Atheros AR9220 (a/n), Atheros AR9223 (b/g/n) * Ethernet: RealTek RTL8366SR (1xWAN, 4xLAN, Gigabit) * Power: 12 VDC, 2.5 A * Full specs on [openwrt.org](https://openwrt.org/toh/hwdata/netgear/netgear_wndrmac_v1) Flash Instructions ================== It is possible to use the OEM Upgrade page to install the `factory` variant of the firmware. After the initial upgrade, you will need to telnet into the router (default IP 192.168.1.1) to install anything. You may install LuCI this way. At this point, you will have a web interface to configure OpenWRT on the WNDRMAC v1. Please use the `sysupgrade` variant for subsequent flashes. Recovery Instructions ===================== A TFTP-based recovery flash is possible if the need arises. Please refer to the WNDR3700 page on openwrt.org for details. https://openwrt.org/toh/netgear/wndr3700#troubleshooting_and_recovery Signed-off-by: Renaud Lepage <root@cybikbase.com> [update DTSI include name] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for the Netgear WNDRMAC v2Renaud Lepage2020-06-111-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Netgear WNDRMAC v2 is a hardware variant of the Netgear WNDR3800 Specifications ============== * SoC: Atheros AR7161 * RAM: 128mb * Flash on board: 16mb * WiFi: Atheros AR9220 (a/n), Atheros AR9223 (b/g/n) * Ethernet: RealTek RTL8366SR (1xWAN, 4xLAN, Gigabit) * Serial console: Yes, 115200 / 8N1 (JTAG) * USB: 1x2.0 * Power: 12 VDC, 2.5 A * Full specs on [openwrt.org](https://openwrt.org/toh/hwdata/netgear/netgear_wndrmac_v2) Flash Instructions ================== It is possible to use the OEM Upgrade page to install the `factory` variant of the firmware. After the initial upgrade, you will need to telnet into the router (default IP 192.168.1.1) to install anything. You may install LuCI this way. At this point, you will have a web interface to configure OpenWRT on the WNDRMAC v2. Please use the `sysupgrade` variant for subsequent flashes. Recovery Instructions ===================== A TFTP-based recovery flash is possible if the need arises. Please refer to the WNDR3800 page on openwrt.org for details. https://openwrt.org/toh/netgear/wndr3800#recovery_flash_in_failsafe_mode Signed-off-by: Renaud Lepage <root@cybikbase.com> [do not add device to uboot-envtools, update DTSI name] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: rename DTSI for Netgear WNDR devices based on ar7161Adrian Schmutzler2020-06-115-4/+4
| | | | | | | This renames the DTSI for Netgear WNDR devices based on ar7161 to indicate that the file is not limited to WNDR3700 models. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: wndr3700 series: fix wifi range & throughputChristian Lamparter2020-06-092-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds ar71xx's GPIO setup for the 2.4GHz and 5GHz antennae demultiplexer: | 158 /* 2.4 GHz uses the first fixed antenna group (1, 0, 1, 0) */ | 159 ap9x_pci_setup_wmac_gpio(0, (0xf << 6), (0xa << 6)); | 160 | 161 /* 5 GHz uses the second fixed antenna group (0, 1, 1, 0) */ | 162 ap9x_pci_setup_wmac_gpio(1, (0xf << 6), (0x6 << 6)); This should restore the range and throughput of the 2.4GHz radio on all the derived wndr3700 variants and versions with the AR7161 SoC. A special case is the 5GHz radio. The original wndr3700(v1) will benefit from this change. However the wndr3700v2 and later revisions were unaffected by the missing bits, as there is no demultiplexer present in the later designs. This patch uses gpio-hogs within the device-tree for all wndr3700/wndr3800/wndrmac variants. Notes: Based on the PCB pictures, the WNDR3700(v1) really had eight independent antennae. Four antennae for each radio and all of those were printed on the circut board. The WNDR3700v2 and later have just six antennae. Four of those are printed on the circuit board and serve the 2.4GHz radio. Whereas the remaining two are special 5GHz Rayspan Patch Antennae which are directly connected to the 5GHz radio. Hannu Nyman dug pretty deep and unearthed a treasure of information regarding the history of how these values came to be in the OpenWrt archives: <https://dev.archive.openwrt.org/ticket/6533.html>. Mark Mentovai came across the fixed antenna group when he was looking into the driver: fixed_antenna_group 1, (0, 1, 0, 1) fixed_antenna_group 2, (0, 1, 1, 0) fixed_antenna_group 3, (1, 0, 0, 1) fixed_antenna_group 4, (1, 0, 1, 0) Fixes: FS#3088 Reported-by: Luca Bensi Reported-by: Maciej Mazur Reported-by: Hannu Nyman <hannu.nyman@iki.fi> Debugged-by: Hannu Nyman <hannu.nyman@iki.fi> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ath79: add label MAC address for TP-Link RE450 v2/v3Adrian Schmutzler2020-05-311-0/+1
| | | | Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for TP-Link RE450 v3Andreas Wiese2020-05-313-174/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link RE450 v3 is a dual band router/range-extender based on Qualcomm/Atheros QCA9563 + QCA9880. This device is nearly identical to RE450 v2 besides a modified flash layout (hence I think force-flashing a RE450v2 image will lead to at least loss of MAC address). Specification: - 775 MHz CPU - 64 MB of RAM (DDR2) - 8 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz - 3T3R 5 GHz - 1x 10/100/1000 Mbps Ethernet (AR8033 PHY) - 7x LED, 4x button- - possible UART header on PCB¹ Flash instruction: Apply factory image in OEM firmware web-gui. ¹ Didn't check to connect as I didn't even manage to connect on RE450v2 (AFAIU it requires disconnecting some resistors, which I was too much of a coward to do). But given the similarities to v2 I think it's the same or very similar procedure (and most likely also the only way to debrick). Signed-off-by: Andreas Wiese <aw-openwrt@meterriblecrew.net> [remove dts-v1 and compatible in DTSI] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for TP-Link TL-WR802N V1 and V2Lech Perczak2020-05-313-0/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specification: - SoC: Qualcomm Atheros QCA9533 (560 MHz, MIPS 24Kc) - RAM: 32 MiB - Storage: 4 MiB of Flash on board - Wireless: Built into QCA9533 (Honey Bee), PHY modes b/g/n - Ethernet: 1x100M (port0) Installation through OEM Web Interface: - Connect to TL-WR802N by Ethernet or Wi-Fi - Go to web interface: [V1] http://192.168.0.1 [V2] http://192.168.0.254 Default user is "admin" & password is "admin". On V2, there is no DHCP server running by default, so remember to set IP manually. - Go to "System Tools -> Firmware Upgrade" - Browse for firmware: [V1] "*.factory.bin" [V2] "*.factory-us.bin" or "*.factory-eu.bin" for eu model Web interface may complain if filename is too long. In such case, rename .bin to something shorter. - Click upgrade Installation through tftp: Note: T_OUT, T_IN and GND on the board must be connected to USB TTL Serial Configuration 115200 8n1 - Boot the TL-WR802N - When "Autobooting in 1 seconds" appears type "tpl" followed by enter - Connect to the board Ethernet port (IPADDR: 192.168.1.1, ServerIP: 192.168.1.10) - tftpboot 0x80000000 <Firmware Image Name> - Record the result of "printenv bootcmd" - Enter "erase <Result of 'printenv bootcmd'> +0x3c0000" (e.g erase 0x9f020000 +0x3c0000) - Enter "cp.b 0x80000000 <Result of 'printenv bootcmd'> 0x3c0000" (e.g cp.b 0x80000000 0x9f020000 0x3c0000) - Enter "bootm <Result of 'printenv bootcmd'>" (e.g bootm 0x9f020000) Notes: When porting from ar71xx target to ath79, I found out that on V2, reset button is on GPIO12 and active low, instead of GPIO11 and active high. By cross-flashing V1 firmware to V2, I confirmed the same is true for V1. Also according to manual of V1, this one also has green LED instead of blue - both of those issues were fixed accordingly. The MAC address assignment has been checked with OEM firmware. Installation manual based on ar71xx support by Thomas Roberts Signed-off-by: Lech Perczak <lech.perczak@gmail.com> [slightly adjust commit message, add MAC address comment] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: fix LEDs for GL.inet GL-AR150Adrian Schmutzler2020-05-311-8/+10
| | | | | | | | | | | | | | | | | Since the wireless LED was used for boot and set up with a DT trigger, the WiFi indication hasn't worked on ath79 at all. In addition, a look into the manual revealed that the OEM configuration is as follows: LED 1 (green): power LED 2 (green): configurable LED 3 (red): wireless So, let's just keep the WiFi trigger and convert the rest to its "intended" use. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for COMFAST CF-E130N v2Pavel Balan2020-05-281-0/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the COMFAST CF-E130N v2, an outdoor wireless CPE with a single Ethernet port and a 802.11bgn radio. Specifications: - QCA9531 SoC - 1x 10/100 Mbps Ethernet with PoE-in support - 64 MB of RAM (DDR2) - 16 MB of FLASH - 5 dBi built-in antenna - POWER/LAN/WLAN green LEDs - 4x RSSI LEDs (2x red, 2x green) - UART (115200 8N1) and GPIO (J9) headers on PCB Flashing instructions: The original firmware is based on OpenWrt so a sysupgrade image can be installed via the stock web GUI. The U-boot bootloader also contains a backup TFTP client to upload the firmware from. Upon boot, it checks its ethernet network for the IP 192.168.1.10. Host a TFTP server and provide the image to be flashed as file firmware_auto.bin. MAC address setup: The art partition contains four consecutive MAC addresses: 0x0 aa:bb:cc:xx:xx:c4 0x6 aa:bb:cc:xx:xx:c6 0x1002 aa:bb:cc:xx:xx:c5 0x5006 aa:bb:cc:xx:xx:c7 However, the manufacturer in its infinite wisdom decided that one address is enough and both eth0 and WiFi get the MAC address from 0x0 (yes, that's overwriting the existing and valid address in 0x1002). This is obviously also the address on the device's label. Signed-off-by: Pavel Balan <admin@kryma.net> [fix configs partition, fix IMAGE_SIZE, add MAC address comment, rename ATH_SOC to SOC] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: replace tab after DT label by spaceAdrian Schmutzler2020-05-288-8/+8
| | | | | | The common separator in this case is a single space. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: increase spi clock for D-Link DIR-842Sebastian Schaper2020-05-261-1/+2
| | | | | | | | | AHB is 258 MHz for this device (CPU_PLL / 3), but there is no difference between 64 MHz and 50 MHz for spi-max-frequency, thus increase to 50 MHz. Tested on revisions C1 and C3. Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
* ath79: define switch reset-gpios for D-Link DIR-842Sebastian Schaper2020-05-261-8/+2
| | | | | | | | | | GPIO 11 needs to be pulled high for the external gigabit switch to work, this is currently solved via gpio-hog. Replace with phy0 reset-gpios. Tested on revisions C1 and C3. Reset button is still working for reboot, to enter failsafe, and to enter bootloader http recovery. Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
* ath79: fix LEDs for D-Link DIR-842Sebastian Schaper2020-05-263-27/+12
| | | | | | | | | | | | | | | The device has a total of 8 LEDs, 5 of which are controlled by the switch (LAN 1-4, WAN). Only power, wifi and wps are controlled by the SoC. * led_power is on GPIO 5 (not 15), boot flashing sequence is now visible * remove led 'internet', since it is only connected to the switch * remove ucidef_set_led_switch for WAN from 01_leds, as it has no effect Tested on revisions C1 and C3. Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net> [adjust commit title] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79/nand: add support for Netgear WNDR4300SWStijn Segers2020-05-241-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the WNDR4300SW, marketed by California ISP SureWest (hence the 'SW' suffix). Hardware wise, it's identical to the WNDR4300 v1. Specifications: * SoC: Atheros AR9344 * RAM: 128 MB * Flash: 128 MB NAND flash * WiFi: Atheros AR9580 (5 GHz) and AR9344 (2,4 GHz) * Ethernet: 5x 1000Base-T * LED: Power, WAN, LAN, WiFi, USB, WPS * UART: on board, to the right of the RF shield at the top of the board Installation: * Flashing through the OEM web interface: + Connect your computer to the router with an ethernet cable and browse to http://192.168.1.1/ + Log in with the default credentials are admin:password + Browse to Advanced > Administration > Firmware Upgrade in the Netgear interface + Upload the Openwrt firmware: openwrt-ath79-nand-netgear_wndr4300sw-squashfs-factory.img + Proceed with the firmware installation and give the device a few minutes to finish and reboot. * Flashing through TFTP: + Configure your wired client with a static IP in the 192.168.1.x range, e.g. 192.168.1.10 and netmask 255.255.255.0. + Power off the router. + Press and hold the RESET button (the factory reset button on the bottom of the device, with the red circle around it) and turn the router on while keeping the button pressed. + The power LED will start flashing orange. You can release the button once it switches to flashing green. + Transfer the image over TFTP: $ tftp 192.168.1.1 -m binary -c put openwrt-ath79-nand-netgear_wndr4300sw-squashfs-factory.img Signed-off-by: Stijn Segers <foss@volatilesystems.org>
* ath79: add support for Enterasys WS-AP3705iDavid Bauer2020-05-221-0/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- SoC: Atheros AR9344 RAM: 128M DDR2 FLASH: 2x Macronix MX25L12845EM 2x 16MiB SPI-NOR WLAN2: Atheros AR9344 2x2 2T2R WLAN5: Atheros AR9580 2x2 2T2R SERIAL: Cisco-RJ45 on the back (115200 8n1) Installation ------------ The U-Boot CLI is password protected (using the same credentials as the OS). Default is admin/new2day. 1. Download the OpenWrt initramfs-image. Place it into a TFTP server root directory and rename it to 1401A8C0.img. Configure the TFTP server to listen at 192.168.1.66/24. 2. Connect the TFTP server to the access point. 3. Connect to the serial console of the access point. Attach power and interrupt the boot procedure when prompted (bootdelay is 1 second). 4. Configure the U-Boot environment for booting OpenWrt from Ram and flash: $ setenv boot_openwrt 'setenv bootargs; bootm 0xbf230000' $ setenv ramboot_openwrt 'setenv serverip 192.168.1.66; tftpboot 0x85000000; bootm' $ setenv bootcmd 'run boot_openwrt' $ saveenv 5. Load OpenWrt into memory: $ run ramboot_openwrt Wait for the image to boot. 6. Transfer the OpenWrt sysupgrade image to the device. Write the image to flash using sysupgrade: $ sysupgrade -n /path/to/openwrt-sysuograde.bin Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: add support for TP-Link TL-WA901ND v4 and v5Adrian Schmutzler2020-05-185-71/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ports support for the TL-WA901ND v4 and v5 from ar71xx to ath79. They are similar to the TP9343-based TL-WR940N v3/v4 and TL-WR941ND v6. Specifications: SoC: TP9343 Flash/RAM: 4/32 MiB CPU: 750 MHz WiFi: 2.4 GHz b/g/n Ethernet: 1 port (100M) Flashing instructions: Upload the factory image via the vendor firmware upgrade option. Flash instruction (TFTP): 1. Set PC to fixed ip address 192.168.0.66 2. Download *-factory.bin image and rename it to * (see below) 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. Wait ~30 second to complete recovery. * The image name for TFTP recovery is wa901ndv4_tp_recovery.bin for both variants. In ar71xx, a MAC address with offset 1 was used for ethernet port. That's probably wrong, but this commit sticks to it until we know the correct value. Like in ar71xx, this builds the default factory.bin with EU country code. Thanks to Leonardo Weiss for testing on the v5. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for Ubiquiti PowerBeam 5AC 500Roger Pueyo Centelles2020-05-172-0/+106
| | | | | | | | | | | | | | | | | | | | | | | | The Ubiquiti PowerBeam 5AC 500 (PBE-5AC-500) is an outdoor 802.11ac 5 GHz bridge with a radio feed and a dish antenna. Specifications: - SoC: Qualcomm Atheros QCA9558 - RAM: 128 MB DDR2 - Flash: 16 MB SPI NOR (mx25l12805d) - Ethernet: 1x 10/100/1000 Mbps Atheros 8031, 24 Vdc PoE-in - WiFi 5 GHz: QCA988x HW2.0 Ubiquiti target 0x4100016c chip_id 0x043222ff - Buttons: 1x (reset) - LEDs: 1x power, 1x Ethernet, 4x RSSI, all blue - UART: not tested Not supported: - RSSI LEDs (probably through 74HC595 chip) Installation from stock airOS firmware: - Follow instructions for XC-type Ubiquiti devices on OpenWrt wiki at https://openwrt.org/toh/ubiquiti/common Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
* ath79: increase spi frequency on tp-link tl-wr1043nd v2Aleksander Jan Bajkowski2020-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Increase SPI frequency to 33.333 MHz. It's maximum frequency supported by SPI Flash memory chip without Fast read opcode. Before: $ time dd if=/dev/mtd1 of=/dev/null bs=8M 0+1 records in 0+1 records out real 0m 3.21s user 0m 0.00s sys 0m 3.21s After: $ time dd if=/dev/mtd1 of=/dev/null bs=8M 0+1 records in 0+1 records out real 0m 2.52s user 0m 0.00s sys 0m 2.52s Tested on TP-Link TL-WR1043ND V2. Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
* ath79: dts: add missing 'serial0' alias for TP-Link TL-MR3040v2Lech Perczak2020-05-081-0/+1
| | | | | | | | Out of all devices currently supported based on AR9331 chipset, this one had the 'serial0' alias missing. Add it to fix setting of /dev/console and login shell on the onboard UART. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* ath79/mikrotik: don't use mtd-mac-address in DTSThibaut VARÈNE2020-05-082-5/+0
| | | | | | | | | | | | | | | | | | As evidenced here[1] the device MAC address can be stored at a random offset in the hard_config partition. Rely on sysfs to update the MAC address correctly. To match sticker and vendor OS behavior, WAN MAC is set to the device base MAC and LAN MAC is incremented from that. Note: this will trigger a harmless kernel message during boot: ag71xx 19000000.eth: invalid MAC address, using random address There is no clean workaround to prevent this message from being emitted. [1] https://github.com/openwrt/openwrt/pull/2850#issuecomment-610809021 Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ath79/mikrotik: use routerbootpart partitionsThibaut VARÈNE2020-05-082-23/+12
| | | | | | | Enable routerbootpart partitions on MikroTik devices. Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ath79: fix dts of Teltonika RUT9xx devicesDaniel Golle2020-04-292-2/+2
| | | | | | The previous commits were missing a semicolon. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ath79: add support for Teltonika RUT955 H7V3C0Daniel Golle2020-04-291-0/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ath79: split Teltonika RUT955 to support other RUT9xx modelsDaniel Golle2020-04-292-171/+198
| | | | | | | | | Split device-tree of Teltonika RUT955 into a generic RUT9xx part and a part specific to that version of RUT955 already supported. Also harmonize GPIO and LED names with what is used by the vendor firmware and assign RS485 DTR signal. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ath79: indicate boot/failsafe/upgrade for NanoBeam/Nanostation ACAdrian Schmutzler2020-04-272-2/+14
| | | | | | | | Like for Ubiquiti PowerBeam 5AC Gen2, the highest RSSI LED can be exploited to indicate boot/failsafe/upgrade for the NanoBeam AC and Nanostation AC as well. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for Ubiquiti PowerBeam 5AC Gen2Roger Pueyo Centelles2020-04-271-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | The Ubiquiti PowerBeam 5AC Gen 2 (PBE-5AC-Gen2) is an outdoor 802.11ac 5 GHz bridge with a radio feed and a dish antenna. The device is hardware-compatible with the LiteBeam AC Gen2, plus the 4 extra LEDs. Specifications: - SoC: Qualcomm Atheros AR9342 rev 2 - RAM: 64 MB DDR2 - Flash: 16 MB SPI NOR (mx25l12805d) - Ethernet: 1x 10/100/1000 Mbps Atheros 8035, 24 Vdc PoE-in - WiFi 5 GHz: QCA988x HW2.0 Ubiquiti target 0x4100016c chip_id 0x043222ff - WiFi 2.4 GHz: Atheros AR9340 (SoC-based) - Buttons: 1x (reset) - LEDs: 1x power, 1x Ethernet, 4x RSSI via GPIO. All blue. - UART: not tested Installation from stock airOS firmware: - Follow instructions for WA-type Ubiquiti devices on OpenWrt wiki Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> [changed device name in commit title] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: enable SGMII workaround for affected boardsDavid Bauer2020-04-273-0/+8
| | | | | | | These boards suffer from a sudden inability to establish a link on the SGMII. Enable the workaround to fix the link when it dies. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: fix QCA953x DDR and GPIO compatible bindingsDavid Bauer2020-04-241-2/+2
| | | | | | | The memory as well as GPIO controller had the wrong SoC name used for their compatible binding. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: correct QCA9550 machine compatible bindingDavid Bauer2020-04-2414-14/+14
| | | | | | | Some boards using a QCA9556 or QCA9558 had their machine compatible binding incorrectly set to qca,qca9557. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: rename qca9557.dtsi to qca955x.dtsiDavid Bauer2020-04-2426-29/+29
| | | | | | | | | | | There are at least 3 different chips in the Scorpion series of SoCs. Rename the common DTSI to better reflect it's purpose for the whole series. Also rename the compatible bindings from qca,ar9557 and qca,qca9557 to qca,qca9550. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: add support for AVM FRITZ!WLAN Repeater 450EDavid Bauer2020-04-193-86/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. 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. Tested-by: Andreas Ziegler <dev@andreas-ziegler.de> Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: add support for AVM FRITZ!WLAN Repeater 1750EDavid Bauer2020-04-171-0/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the AVM Fritz!WLAN Repeater 1750E SOC: Qualcomm QCA9556 (Scorpion) 720MHz MIPS74Kc RAM: 64MB Zentel A3R12E40CBF DDR2 FLASH: 16MiB Winbond W25Q128 SPI NOR WLAN1: QCA9556 2.4 GHz 802.11b/g/n 3x3 WLAN2: QCA9880 5 GHz 802.11 n/ac 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.4 GHz WiFi (correct MAC) - 5 GHz WiFi (correct MAC) - Installation via EVA bootloader - OpenWRT sysupgrade - Buttons - LEDs 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>
* ath79: add QCA9550 reset sequenceDavid Bauer2020-04-175-2/+20
| | | | | | | | | | | | | | | | | The QCA9550 family of SoCs have a slightly different reset sequence compared to older chips. Normally the bootloader performs this sequence, however some bootloader implementation expect the operating system to clear the reset. Also get the PCIe resets from OF to support the second RC of the QCA9558. This is required for the AVM FRITZ!WLAN Repeater 1750E to work, as EVA leaves the PCIe bus in reset. Tested: AVM FRITZ!WLAN Repeater 1750E - OCEDO Koala Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: reduce spi-max-frequency for Mikrotik wAP G-5HacT2HnDRoger Pueyo Centelles2020-04-161-1/+1
| | | | | | | | The previous spi-max-frequency value did not work with all the CPU speed settings (configurable with rbcfg or from the stock firmware); the new one does for the three of them. Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
* ath79: improve status LED definitions for GL-AR750Hannu Nyman2020-04-161-1/+5
| | | | | | | | Improve the status LED functionality in GL-AR750 by adding the definitions for different statuses (boot, failsafe, running, flashing). Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* ath79: further fixes for ZyXEL NBG6716Adrian Schmutzler2020-04-141-7/+10
| | | | | | | | | | | | | | | | | | This applies further fixes to the DTS of ZyXEL NBG6716 based on what is found in ar71xx (mach-nbg6716.c): - use WiFi label names as in ar71xx - fix WPS gpio number - fix GPIO_ACTIVE_HIGH and mode for WiFi switch - add codes for USB eject buttons - fix node name for "internet" LED This device has separate LEDs for WAN and "Internet". As the WAN-LED (and the four LAN-LEDs) are driven independent of the setup in DT/01_leds, the "internet" LED is left unassigned (in contrast to ar71xx, where it was set up effectively as a second WAN LED) Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: enable m25p,fast-read for tplink,tl-wr1043-v1Luiz Angelo Daros de Luca2020-04-141-0/+1
| | | | | | Enables spi-mem interface for 3x faster flash read. Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
* ath79: enable m25p,fast-read for tplink,tl-wr2543-v1Luiz Angelo Daros de Luca2020-04-141-0/+1
| | | | | | | | | | Enables spi-mem interface usage. It speeds up flash read in about 3x while it also workaround a possible hardware bug when normal spi read is used. Fixes: FS#2742 Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
* ath79: fix USB port LED assignment for ZyXEL NBG6716Adrian Schmutzler2020-04-131-2/+2
| | | | | | | | | | | The USB LED assignment to internal ports was swapped. Fix it. We also explicitly checked that the LED label numbers match those on the device. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: fix wmac initialization for Zyxel NBG6716Guillaume Lefebvre2020-04-131-0/+2
| | | | | | | | | | | | | | | | | | 2.4 GHz Wifi on ath79 is set up in 10-ath9k-eeprom, but in ar71xx it was done with ath79_register_wmac. Thus, the following errors are observed on the device: ath: phy1: Unable to initialize hardware; initialization status: -5 ath9k 18100000.wmac: failed to initialize device ath9k: probe of 18100000.wmac failed with error -5 This patch changes the ath79 support to properly use wmac as well. This will also require fixing the MAC address in a different way. Signed-off-by: Guillaume Lefebvre <guillaume@zelig.ch> [several adjustments to 10-fix-wifi-mac, use correct MAC address, rewrite commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for Comfast CF-WR752AC v1Roman Hampel2020-04-091-0/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: - Qualcomm QCA9531 + QCA9886 - dual band, antenna 2*3dBi - Output power 50mW (17dBm) - 1x 10/100 Mbps LAN RJ45 - 128 MB RAM / 16 MB FLASH (w25q128) - 3 LEDs (red/green/blue) incorporated in "color wheel reset switch" - UART 115200 8N1 Flashing instructions: The U-boot bootloader contains a recovery HTTP server to upload the firmware. Push the reset button while powering the device on and keep it pressed for ~10 seconds. The device's LEDs will blink several times and the recovery page will be at http://192.168.1.1; use it to upload the sysupgrade image. Alternatively, the original firmware is based on OpenWrt so a sysupgrade image can be installed via the stock web GUI. Settings from the original firmware will be saved and restored on the new one, so a factory reset will be needed. To do so, once the new firmware is flashed, enter into failsafe mode by pressing the reset button several times during the boot process, until it starts flashing. Once in failsafe mode, perform a factory reset as usual. LED-Info: The LEDs on the Comfast stock fw have a very proprietary behaviour, corresponding to the user selected working mode (AP, ROUTER or REPEATER). In the first two cases, only blue is used for status and LAN signaling. When using the latter, blue is always off (except for sysupgrade), either red signals bad rssi on master-link, or green good. Since the default working mode of OpenWrt resembles that of a router/AP, the default behavior is implemented accordingly. MAC addresses (art partition): location address (example) use in vendor firmware 0x0 xx:xx:xx:xx:xc:f8 -> eth0 0x6 xx:xx:xx:xx:xc:fa -> wlan5g (+2) 0x1002 xx:xx:xx:xx:xc:f9 -> not used 0x5006 xx:xx:xx:xx:xc:fb -> not used --- xx:xx:xx:xx:xd:02 -> wlan2g (+10) The same strange situation has already been observed and documented for COMFAST CF-E560AC. Signed-off-by: Roman Hampel <rhamp@arcor.de> Co-developed-by: Joao Albuquerque <joaohccalbu@gmail.com> Signed-off-by: Joao Albuquerque <joaohccalbu@gmail.com> [adjust and extend commit message, rebase, minor DTS adjustments, add correct MAC address for wmac, change RSSI LED names and behavior] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for Comfast CF-EW72Chris Morgan2020-04-071-0/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: Qualcomm/Atheros QCA9531 + QCA9886 2x 10/100 Mbps Ethernet, with 48v PoE 2T2R 2.4 GHz, 802.11b/g/n 2T2R 5 GHz, 802.11a/n/ac 128MB RAM 16MB SPI Flash 4x LED (Always On Power, LAN, WAN, WLAN) Flashing Instructions: Original firmware is based on OpenWRT, so flashing the sysupgrade image on the factory firmware is sufficient. Tested: Reset button, WAN LED, LAN LED, Power LED (always on, not much to test), WLAN LED (one LED only for 2 interfaces, by default it gets assigned to the first interface), MAC addresses (match factory firmware). My LAN factory MAC address ends in F2. use stock_mac art_loc lan :f2 0x0 wan :f3 0x1002 5g :f4 0x6 2g :f5 0x5006 Since MAC address flash locations do not really match their use in vendor firmware (e.g. address from 5 GHz calibration data is assigned to 2.4 GHz WiFi), just calculate the MAC addresses with an offset based on 0x0 address. Signed-off-by: Chris Morgan <macromorgan@hotmail.com> [add MAC address comment] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for TP-Link TL-MR3420 v3Lim Guo Wei2020-04-061-0/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the TP-Link TL-MR3420 v3, a later revision of the v2 with an external gpiochip similar to TP-Link Archer C7 v4. Specifications: SOC: Qualcomm Atheros QCA9531 CPU: 650MHz Flash: 4 MiB RAM: 32 MiB WLAN: Qualcomm Atheros QCA9531 bgn 2T2R 2.4 GHz Ethernet: 5 ports (100M) Flashing instructions: - Flash factory image from OEM WebUI: openwrt-ath79-tiny-tplink_tl-mr3420-v3-squashfs-factory.bin - Sysupgrade from ath79 image: openwrt-ath79-tiny-tplink_tl-mr3420-v3-squashfs-sysupgrade.bin Signed-off-by: Lim Guo Wei <limguowei@gmail.com> [remove SUPPORTED devices, some typo adjustments, fix WAN MAC address, fix sorting in 01_leds] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: rename Mikrotik RB 922UAGS-5HPacD mtd partitionThibaut VARÈNE2020-03-271-3/+3
| | | | | | | | | | | | | | | | In RouterBOARD parlance there never was an "art" partition. This partition has always been named 'hard_config' on ar71xx. This partition contains more than just ART (Atheros Radio Test) data. It includes the hardware description (product code, serial, board identifier, name, hardware options, MAC address), as well as other bits affecting the operation of RouterBoot. To avoid confusion with regular ART data, this partition is renamed in line with historical ar71xx and ramips nomenclature as 'hard_config'. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> [minor commit title/message adjustments] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: fix Mikrotik wAP G-5HacT2HnD mtd partitionsThibaut VARÈNE2020-03-271-26/+35
| | | | | | | | | | | | | | | | | | | | | | In RouterBOARD parlance there never was an "art" partition. This partition has always been named 'hard_config' on ar71xx. This partition contains more than just ART (Atheros Radio Test) data. It includes the hardware description (product code, serial, board identifier, name, hardware options, MAC address), as well as other bits affecting the operation of RouterBoot. To avoid confusion with regular ART data, this partition is renamed in line with historical ar71xx and ramips nomenclature as 'hard_config'. This commit fixes the previous support files and implements the nested RouterBoot partition scheme as already used by ramips-based SPI-NOR RouterBOARD DTSes, as previously reviewed and implemented in bbe2cf657ca7 ("ramips: fix RBM11G partitioning"). Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> [minor commit title/message adjustments] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for TP-Link TL-WA860RE v1Adrian Schmutzler2020-03-261-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | This ports support for the TL-WA860RE v1 range extender from ar71xx to ath79. Specifications: Board: AP123 / AR9341 rev. 3 Flash/RAM: 4/32 MiB CPU: 535 MHz WiFi: 2.4 GHz b/g/n Ethernet: 1 port (100M) Two external antennas Flashing instructions: Upload the factory image via the vendor firmware upgrade option. Recovery: Note that this device does not provide TFTP via ethernet like many other TP-Link devices do. You will have to open the case if you require recovery beyond failsafe. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: Sebastian Knapp <sebastian4842@outlook.com>
* ath79: add support for TP-Link TL-WDR4310 v1Adrian Schmutzler2020-03-261-0/+9
| | | | | | | | | This device seems to be identical to the TL-WDR4300, just with different release date/region and TPLINK_HWID. Support is added based on the ar71xx implementation. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>