aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
Commit message (Collapse)AuthorAgeFilesLines
* ramips: add support for Netgear JWNR2010 v5Shibajee Roy2020-08-065-0/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specification: - CPU: MediaTek MT7620N (580 MHz) - Flash size: 4 MB NOR SPI - RAM size: 32 MB DDR1 - Bootloader: U-Boot - Wireless: MT7620N 2x2 MIMO 802.11b/g/n (2.4 GHz) - Switch: MT7620 built-in 10/100 switch with vlan support - Ports: 4x LAN, 1x WAN - Others: 7x LED, Reset button, UART header on PCB (57600 8N1) Flash instructions: 1. Use ethernet cable to connect router with PC/Laptop, any router LAN port will work. 2. To flash openwrt we are using nmrpflash[1]. 3. Flash commands: First we need to identify the correct Ethernet id. nmrpflash -L nmrpflash -i net* -f openwrt-ramips-mt7620-netgear_jwnr2010-v5-squashfs-factory.img This will show something like "Advertising NMRP server on net*..." (net*, *=1,2,3... etc.) 4. Now remove the power cable from router back side and immediately connect it again. You will see flash notification in CMD window, once it says reboot the device just plug off the router and plug in again. Revert to stock: 1. Download the stock firmware from official netgear support[2]. 2. Follow the same nmrpflash procedure like above, this time just use the stock firmware. nmrpflash -i net* -f N300-V1.1.0.54_1.0.1.img MAC addresses on stock firmware: LAN = *:28 (label) WAN = *:29 WLAN = *:28 On flash, the only valid MAC address is found in factory 0x4. Special Note: This openwrt firmware will also support other netgear N300 routers like below as they share same stock firmware[3]. JNR1010v2 / WNR614 / WNR618 / JWNR2000v5 / WNR2020 / WNR1000v4 / WNR2020v2 / WNR2050 [1] https://github.com/jclehner/nmrpflash [2] https://www.netgear.com/support/product/JWNR2010v5.aspx [3] http://kb.netgear.com/000059663 Signed-off-by: Shibajee Roy <ador250@protonmail.com> [create DTSI, use netgear_sercomm_nor, disable by default, add MAC addresses to commit message, add label MAC address] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: drop remaining m25p,chunked-io from DTSAdrian Schmutzler2020-08-063-3/+0
| | | | | | | | | | | | | | This option was a spi nor hack which is dropped in commit bcf4a5f474d1 ("ramips: remove chunked-io patch and set spi->max_transfer_size instead") Most of it has already been removed in be2b61e4f1ec ("ramips: drop m25p,chunked-io from dts") It seems all current usages were added after that. Remove them. Cc: Chuanhong Guo <gch981213@gmail.com> Reported-by: Sungbo Eo <mans0n@gorani.run> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add common definition netgear_sercomm_norAdrian Schmutzler2020-08-063-27/+24
| | | | | | | | Like NAND-based devices, SPI-NOR based Netgear devices also share a common setup for their images. This creates a common defition for them in image/Makefile, so it can be reused across subtargets. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: tidy up MAC address setup for Linkit Smart and Omega2Adrian Schmutzler2020-08-063-8/+2
| | | | | | | | | | | | | | | | | | | | Linkit Smart 7688 and Onion Omega 2(+) are one-port devices, and have their port set to LAN by default. Setting up a WAN MAC address for them doesn't make any sense, as no wan interface will be created in uci config. Despite, these devices also set lan_mac in 02_network, although mtd-mac-address sets a different address for the ethernet interface in DTS. Clean this up by moving the lan_mac value into DTS and dropping the entries in 02_network completely. That way, the effective address on the LAN interface should stay the same, but we get rid of the extra (re)assignments. As I don't have access to the devices, this does not tell anything about whether 0x2e is actually a good choice, it just preserves the existing assignment. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: WizFi630S use macs from factory partionTobias Welz2020-08-062-3/+6
| | | | | | | | | | | | | | | | | | | | WIZnet WizFi630s has three mac addresses in the factory partition: 0x04 (also on the label), 0x28 for wan mac and 0x2e as lan mac. All three macadresses are sequential series of addresses. This is making use of them. While at it, also add the label MAC address to 02_network. MAC addresses as verified by OEM firmware: use interface source WLAN ra0 factory 0x04 (label) WAN eth0.2 factory 0x28 (label + 1) LAN eth0.1 factory 0x2e (label + 2) Signed-off-by: Tobias Welz <tw@wiznet.eu> [fix sorting in 02_network, commit message adjustments] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: correct WizFi630S pin mappingsTobias Welz2020-08-061-26/+8
| | | | | | | | | | WizFi630S had some pins changed in the release version of the board. The run led, wps button and a slide switch where affected. This patch is correcting this. i2c is removed as it is sharing a pin with the run (system) led. uart2 is enabled as it is also enabled in the OEM firmware. Signed-off-by: Tobias Welz <tw@wiznet.eu>
* kernel: unify CONFIG_GPIO_SYSFS in kernel configsFelix Fietkau2020-08-0610-10/+0
| | | | | | Enable it for all platforms Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: switch rt305x subtarget to kernel 5.4Alexey Dobrovolsky2020-08-056-6/+5
| | | | | | | | | | | | | | RT3x5x seems to work fine with kernel 5.4. Set the default kernel version to 5.4 to bring this to a broader audience. Since 4 of 6 targets are on kernel 5.4 now, invert the kernel version setup logic in Makefile/target.mk files. Tested on ZyXEL Keenetic. Signed-off-by: Alexey Dobrovolsky <dobrovolskiy.alexey@gmail.com> [invert version setup logic] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: enable flashing WizFi630S via OEM firmwareTobias Welz2020-08-051-0/+1
| | | | | | | | | | | WIZnet WizFi630s board name is written slightly different it its OEM OpenWrt firmware. This causes an incompatibility warning during flashing with sysupgrade. This patch is adding the vendor board name to the supported devices list to avoid this warning. For initial flashing you can use sysupgrade via command line or luci beside of TFTP. Do not keep the OEM configuration during sysupgrade. Signed-off-by: Tobias Welz <tw@wiznet.eu>
* ramips: remove doublet entry in WizFi630S dts fileTobias Welz2020-08-051-4/+0
| | | | | | | &wmac entry in WIZnet WizFi630S dts file was existing two times. This is removing one of them. Signed-off-by: Tobias Welz <tw@wiznet.eu>
* ramips: disable unused phy ports of WizFi630STobias Welz2020-08-051-0/+1
| | | | | | | WIZnet WizFi630S is using only 3 of the phy ports. The unused phy ports draw unnecessarily power. This is disabling the unused phy ports. Signed-off-by: Tobias Welz <tw@wiznet.eu>
* ramips: add support for TP-Link RE200 v3Richard Fröhning2020-08-034-0/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link RE200 v3 is a wireless range extender with Ethernet and 2.4G and 5G WiFi with internal antennas. It's based on MediaTek MT7628AN+MT7610EN like the v2. Specifications -------------- - MediaTek MT7628AN (580 Mhz) - 64 MB of RAM - 8 MB of FLASH - 2T2R 2.4 GHz and 1T1R 5 GHz - 1x 10/100 Mbps Ethernet - 8x LED (GPIO-controlled), 2x button Unverified: - UART header on PCB (57600 8n1) There are 2.4G and 5G LEDs in red and green which are controlled separately. MAC addresses ------------- MAC address assignment has been done according to the RE200 v2. The label MAC address matches the OpenWrt ethernet address. Installation ------------ Web Interface ------------- It is possible to upgrade to OpenWrt via the web interface. Simply flash the -factory.bin from OEM. In contrast to a stock firmware, this will not overwrite U-Boot. Recovery -------- Unfortunately, this devices does not offer a recovery mode or a tftp installation method. If the web interface upgrade fails, you have to open your device and attach serial console. The device has not been opened for adding support. However, it is expected that the behavior is similar to the RE200 v2. Instructions for serial console and recovery may be checked out in commit 6d6f36ae787c ("ramips: add support for TP-Link RE200 v2") or on the device's Wiki page. Signed-off-by: Richard Fröhning <misanthropos@gmx.de> [adjust commit title/message, sort support list] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix/tidy up 4M tplink-v2-image flash layoutsAdrian Schmutzler2020-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | For the TP-Link 4M devices with tplink-v2-image recipe (mktplinkfw2.c), there are two different flash layouts based on the size of the (u)boot partition: device uboot OEM firmware OpenWrt (incl. config) tl-wr840n-v5 0x20000 0x3c0000 0x3d0000 tl-wr841n-v14 0x10000 0x3d0000 0x3e0000 In both cases, the 0x10000 config partition is used for the firmware partition as well due to the limited space available and since it's recreated by the OEM firmware anyway. However, the TFTP flashing process will only copy data up to the size of the initial (OEM) firmware size. Therefore, while we can use the bigger partition to have additional erase blocks on the device, we have to limit the image sizes to the TFTP limits. So far, only one layout definition has been set up in mktplinkfw2.c for 4M mediatek devices. This adds a second one and assigns them to the devices so the image sizes are correctly restrained. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* target: replace remaining occurrences of ifconfig with ipAdrian Schmutzler2020-08-031-1/+1
| | | | | | | | | | | ifconfig is effectively deprecated for quite some time now. Let's replace the remaining occurrences for our target setup by the corresponding ip commands now. Note that this does not touch ar71xx, as it will be dropped anyway, and changing it would only make backports harder. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for JS76x8 series DEV boardsRobinson Wu2020-07-316-4/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the Jotale JS76x8 series development boards. These devices have the following specifications: - SOC: MT7628AN/NN, MT7688AN, MT7628DAN - RAM of MT7628AN/NN and MT7688AN: 64/128/256 MB (DDR2) - RAM of MT7628DAN: 64 MB (DDR2) - FLASH:8/16/32 MB (SPI NOR) - Ethernet:3x 10/100 Mbps ethernet ports (MT76x8 built-in switch) - WIFI:1x 2T2R 2.4 GHz Wi-Fi - LEDs:1x system status green LED, 1x wifi green LED, 3x ethernet green LED - Buttons:1x reset button - 1x microSD slot - 4x USB 2.0 port - 1x mini-usb debug UART - 1x DC jack for main power (DC 5V) - 1x TTL/RS232 UART - 1x TTL/RS485 UART - 13x GPIO header - 1x audio codec(wm8960) Installation via OpenWrt: The original firmware is OpenWrt, so both LuCI and sysupgrade can be used. Installation via U-boot web: 1. Power on board with reset button pressed, release it after wifi led start blinking. 2. Setup static IP 192.168.1.123/4 on your PC. 3. Go to 192.168.1.8 in browser and upload "sysupgrade" image. Installation via U-boot tftp: 1. Connect to serial console at the mini usb, which has been connected to UART0 on board (115200 8N1) 2. Setup static IP 192.168.1.123/4 on your PC. 3. Place openwrt-firmware.bin on your PC tftp server (192.168.1.123). 3. Connect one of LAN ports on board to your PC. 4. Start terminal software (e.g. screen /dev/ttyUSB0 115200) on PC. 5. Apply power to board. 6. Interrupt U-boot with keypress of "2". 7. At u-boot prompts: Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N) Y Input device IP (192.168.1.8) ==:192.168.1.8 Input server IP (192.168.1.123) ==:192.168.1.123 Input Linux Kernel filename (root_uImage) ==:openwrt-firmware.bin 8. board will download file from tftp server, write it to flash and reboot. Signed-off-by: Robinson Wu <wurobinson@qq.com> [add license to DTS files, fix state_default and reduce to the mimimum, move phy0tpt trigger to DTS, drop ucidef_set_led_timer, fix network ports] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: limit 5GHz channels for RAVPower RP-WD009David Bauer2020-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When selecting a channel below 100 on the 5GHz radio, the channel will be detected as busy all the time. Survey data from wlan1 frequency: 5240 MHz [in use] channel active time: 165729 ms channel busy time: 158704 ms channel transmit time: 0 ms Channels 100 and above work fine: Survey data from wlan1 frequency: 5500 MHz channel active time: 133000 ms channel busy time: 21090 ms channel transmit time: 0 ms Limit the available channels, so users do not have the impression their device is broken. Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: add support for D-Link DIR-1960 A1Josh Bendavid2020-07-275-0/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for D-Link DIR-1960 A1. Given the similarity with the DIR-1760/2660 A1, this patch also introduces a common DTSI which can be shared with these devices, with support to be added in future commits. Specifications: * Board: AP-MTKH7-0002 * SoC: MediaTek MT7621AT * RAM: 256 MB (DDR3) * Flash: 128 MB (NAND) * WiFi: MediaTek MT7615N (x2) * Switch: 1 WAN, 4 LAN (Gigabit) * Ports: 1 USB 3.0 * Buttons: Reset, WPS * LEDs: Power (white/orange), Internet (white/orange), WiFi 2.4G (white), WiFi 5G (white), USB 3.0 (white) Notes: * WiFi 2.4G and WiFi 5G LEDs are wired directly to the wireless chips Installation: * D-Link Recovery GUI: power down the router, press and hold the reset button, then re-plug it. Keep the reset button pressed until the power LED starts flashing orange, manually assign a static IP address under the 192.168.0.xxx subnet (e.g. 192.168.0.2) and go to http://192.168.0.1 * Some modern browsers may have problems flashing via the Recovery GUI, if that occurs consider uploading the firmware through cURL: curl -v -i -F "firmware=@file.bin" 192.168.0.1 MAC addresses: lan factory 0xe000 *:EB (label) wan factory 0xe006 *:EE 2.4 factory 0xe000 +1 *:EC 5.0 factory 0xe000 +2 *:ED Seems like vendor didn't replace the dummy entrys in the calibration data. Signed-off-by: Josh Bendavid <joshbendavid@gmail.com> [fix whitespace issues, create patch to merge DIR-1960 first, move special WiFi MAC settings to DTS, extend commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: remove non-existant poe_passthrough for RouterBOARD 750Gr3John Thomson2020-07-251-3/+0
| | | | | | | | | | | | | | | | This 750gr3 GPIO17 switch was added based on vendor source, but only the 760iGS (which shares the rbsysfs board identifier) device has the physical wiring. The 750Gr3 actually does not support PoE out. Apart from that, note that the gpio base (480) would have required this GPIO to be referenced as 497 if it was kept. Fixes: 6ba58b7b020c ("ramips: cleanup the RB750Gr3 support") Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au> [commit title/message facelift] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for Winstars WS-WN583A6Davide Fioravanti2020-07-253-1/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Winstars WS-WN583A6 is a wireless repeater with 2 gigabit ethernet ports. Even if mine is branded as "Gemeita AC2100", the sticker on the back says WS-WN583A6. So I will refer to it as Winstars WS-WN583A6. Probably the real product name is the Wavlink WL-WN583A6 because of the many references to Wavlink in the OEM firmware and bootlog. Hardware -------- SoC: Mediatek MT7621AT (880 MHz, 2 cores 4 threads) RAM: 128MB FLASH: 8MB NOR (GigaDevice GD25Q64B) ETH: 2x 10/100/1000 Mbps Ethernet (MT7530) WIFI: - 2.4GHz: 1x MT7603E (2x2:2) - 5GHz: 1x MT7615E (4x4:4) - 6 internal antennas BTN: - 1x Reset button - 1x WPS button - 1x ON/OFF switch (working but unmodifiable) - 1x Auto/Schedule switch (working but unmodifiable. Read Note #3) LEDS: - 1x White led - 1x Red led - 1x Amber led - 1x Blue led - 2x Blue leds (lan and wan port status: working but unmodifiable) UART: - 57600-8-N-1 Everything works correctly. Currently there is no firmware update available. Because of this, in order to restore the OEM firmware, you must firstly dump the OEM firmware from your router before you flash the OpenWrt image. Backup the OEM Firmware ----------------------- The following steps are to be intended for users having little to none experience in linux. Obviously there are many ways to backup the OEM firmware, but probably this is the easiest way for this router. Procedure tested on M83A6.V5030.191210 firmware version. 1) Go to http://192.168.10.1/webcmd.shtml 2) Type the following line in the "Command" input box: mkdir /etc_ro/lighttpd/www/dev; for i in /dev/mtd*ro; do dd if=${i} of=/etc_ro/lighttpd/www${i}; done 3) Click "Apply" 4) After few seconds, in the textarea should appear this output: 16384+0 records in 16384+0 records out 8388608 bytes (8.0MB) copied, 4.038820 seconds, 2.0MB/s 384+0 records in 384+0 records out 196608 bytes (192.0KB) copied, 0.095180 seconds, 2.0MB/s 128+0 records in 128+0 records out 65536 bytes (64.0KB) copied, 0.032020 seconds, 2.0MB/s 128+0 records in 128+0 records out 65536 bytes (64.0KB) copied, 0.031760 seconds, 2.0MB/s 15744+0 records in 15744+0 records out 8060928 bytes (7.7MB) copied, 3.885280 seconds, 2.0MB/s dd: can't open '/dev/mtd5ro': No such device dd: can't open '/dev/mtd6ro': No such device dd: can't open '/dev/mtd7ro': No such device Excluding the "X.XXXXXX seconds" part, you should get the same exact output. If your output doesn't match mine, stop reading and ask for help in the forum. 5) Open the following links to download the partitions of the OEM FW: http://192.168.10.1/dev/mtd0ro http://192.168.10.1/dev/mtd1ro http://192.168.10.1/dev/mtd2ro http://192.168.10.1/dev/mtd3ro http://192.168.10.1/dev/mtd4ro If one (or more) of these files weight 0 byte, stop reading and ask for help in the forum. 6) Store these downloaded files in a safe place. 7) Reboot your router to remove any temporary file from your router. Installation ------------ Flash the initramfs image in the OEM firmware interface. When openwrt boots, flash the sysupgrade image otherwise you won't be able to keep configuration between reboots. Restore OEM Firmware -------------------- Flash the "mtd4ro" file you previously backed-up directly from LUCI. Warning: Remember to not keep settings! Warning2: Remember to force the flash. Notes ----- 1) The "System Command" page allows to run every command as root. For example you can use "dd" and "nc" to backup the OEM firmware. PC (SERVER): nc -l 5555 > ./mtdXro ROUTER (CLIENT): dd if=/dev/mtdXro | nc PC_IP_ADDRESS 5555 2) The OEM web interface accepts only images containing the string "WN583A6" in the filename. Currently the OEM interface accepts only the initramfs image probably because it checks if the ih_size in the image header is equal to the whole image size (instead of the kernel size) Read more here: https://forum.openwrt.org/t/support-for-strong-1200/22768/19 3) The white led (namely "Smart Night Light") can be controller by the user only if the side switch is set to "Schedule" otherwise it will be activated by the light condition (there is a photodiode on the top side of the router) 4) Router mac addresses: LAN XX:XX:XX:XX:XX:8F WAN XX:XX:XX:XX:XX:90 WIFI 2G XX:XX:XX:XX:XX:91 WIFI 5G XX:XX:XX:XX:XX:92 LABEL XX:XX:XX:XX:XX:91 Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com> [remove chosen node, fix whitespace] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* Revert "ramips: fix flash layout for TP-Link TL-WR841N v14"Adrian Schmutzler2020-07-222-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1623defbdbb852a4018329d07673b4b8f66225a8. As already stated in the reverted patch, the OEM firmware will properly recreate the config partition if it is overwritten by OpenWrt. The main reason for adding the partition was the image size restriction imposed by the 0x3d0000 limitation of the TFTP flashing process. Addressing this by shrinking the firmware partition is not a good solution to that problem, though: 1. For a working image, the size of the content has to be smaller than the available space, so empty erase blocks will remain. 2. Conceptually, the restriction is on the image, so it makes sense to implement it in the same way, and not via the partitioning. Users could e.g. do initial flash with TFTP restriction with an older image, and then sysupgrade into a newer one, so TFTP restriction does not apply. 3. The (content) size of the recovery image is enforced to 0x3d0000 by the tplink-v2-image command in combination with TPLINK_FLASHLAYOUT (flash layout in mktplinkfw2.c) anyway. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: switch MT7620 subtarget to 5.4David Bauer2020-07-221-0/+2
| | | | | | | | | MT7620 seems to work fine with kernel 5.4. Set the default kernel version to 5.4 to bring this to a broader audience. Tested on Archer C2 v1 / Archer C20i Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: increase SPI frequency for MT7620 ArcherDavid Bauer2020-07-223-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Increase the SPI frequency for the MT7620 based TP-Link Archer series to 30MHz. TP-Link uses different SPI flash chips for the same board revision, so be conservative to not break boards with a different chip. 30MHz should be well supported by all chips. Tested on Archer C2 v1 (GD25Q64B) and Archer C20i (W25Q64FV). Archer C20i (before) ==================== root@OpenWrt:~# time dd if=/dev/mtd1 of=/tmp/test.bin bs=64k 122+0 records in 122+0 records out real 0m 15.30s user 0m 0.00s sys 0m 15.29s Archer C20i (after) =================== root@OpenWrt:~# time dd if=/dev/mtd1 of=/tmp/test.bin bs=64k 122+0 records in 122+0 records out real 0m 5.99s user 0m 0.00s sys 0m 5.98s Signed-off-by: David Bauer <mail@david-bauer.net> Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: improve LED support for D-Link DIR-615 D seriesAdrian Schmutzler2020-07-212-5/+8
| | | | | | | | | | | | | This patch adds a trigger for the WAN LED and enhances support for the WiFi LED by enabling activity indication. This is based on bug report feedback (see reference below). While at it, update the LED node names in DTS file. Fixes: FS#732 Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix network setup for Ubiquiti ER-X/ER-X-SFPNelson Cai2020-07-201-2/+2
| | | | | | | | | | | | The function name ucidef_set_interface_lan_wan does not exist, use the proper name by adding an "s" and thereby fix network setup on these devices. Fixes: 22468cc40c8b (ramips: erx and erx-sfp: fix missing WAN interface) Signed-off-by: Nelson Cai <niphor@gmail.com> [commit message/title facelift] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix flash layout for TP-Link TL-WR841N v14Alexander Müller2020-07-192-2/+8
| | | | | | | | | | | | | | | | The config partition was missing from the flash layout of the device. Although the stock firmware resets a corrupted config partition to the default values, the TFTP flash with an image bigger than 0x3d0000 will truncate the image as the bootloader only copies 0x3d0000 bytes to flash during TFTP flashing. Fixed by adding the config partition and shrinking the firmware partition. Fixes: 3fd97c522bb7 ("ramips: add support for TP-Link TL-WR841n v14") Signed-off-by: Alexander Müller <donothingloop@gmail.com>
* ramips: remove incorrect mtd-eeprom for TP-Link TL-WR841N v14Adrian Schmutzler2020-07-191-1/+1
| | | | | | | | | | | | | | | | | The factory partition on this device is only 64k in size, so having mediatek,mtd-eeprom = <&factory 0x10000> would place the EEPROM data after the end of the flash. As can be verified against the TP-Link GPL sources, which contain the EEPROM data as binary blob, the actual address for the EEPROM data is 0x0. Since 0x0 is default for MT7628, the incorrect line is just removed. This error is the reason for the abysmal Wifi performance that people are complaining about for the WR841Nv14. Fixes: 3fd97c522bb7 ("ramips: add support for TP-Link TL-WR841n v14") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: don't create switch config for VIXMINIDavid Bauer2020-07-181-5/+2
| | | | | | | | | Don't create UCI switch config for the GL.iNet microuter-N300 and VIXMINI. These devices only have a single LAN port. Creating the switch config makes usage of VLANs more complicated, as they would have to be configured on the MAC as well as the "switch". Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: move redundant console setup to mt7621 SoC DTSIAdrian Schmutzler2020-07-1747-181/+4
| | | | | | | | | | | | | | | | | For mt7621, console is set up via DTS bootargs individually in device DTS/DTSI files. However, 44 of 74 statements use the following setting: chosen { bootargs = "console=ttyS0,57600"; }; Therefore, don't repeat ourselves and move that definition to the SoC DTSI file to serve as a default value. This patch is cosmetic. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: bump 5.4 to 5.4.52John Audia2020-07-171-3/+3
| | | | | | | | | update_kernel.sh refreshed all patches, no human interaction was needed Build system: x86_64 Run-tested: Netgear R7800 (ipq806x) Signed-off-by: John Audia <graysky@archlinux.us>
* ramips: add arl_table support for MT7530Salvatore Mesoraca2020-07-171-0/+119
| | | | | | | Use switch.h API to expose MT7530's ARL table to user space. Signed-off-by: Salvatore Mesoraca <salvatore@samknows.com>
* ramips: add support for D-Link DIR-867/DIR-882 A1Mateus B. Cassiano2020-07-166-152/+275
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for D-Link DIR-867 A1 and D-Link DIR-882 A1. Given the similarity of these devices, this patch also introduces a common DTS shared between DIR-867 A1, DIR-878 A1 and DIR-882 A1. Specifications: * Board: AP-MTKH7-0002 * SoC: MediaTek MT7621AT * RAM: 128 MB (DDR3) * Flash: 16 MB (SPI NOR) * WiFi: MediaTek MT7615N (x2) * Switch: 1 WAN, 4 LAN (Gigabit) * Ports: 1 USB 2.0, 1 USB 3.0 * Buttons: Reset, WiFi Toggle, WPS * LEDs: Power (green/orange), Internet (green/orange), WiFi 2.4G (green), WiFi 5G (green), USB 2.0 (green), USB 3.0 (green) Notes: * WiFi 2.4G and WiFi 5G LEDs are wired directly to the wireless chips * DIR-867 wireless chips are limited to 3x3 streams at hardware level * USB ports and related LEDs available only on DIR-882 Serial port: * Parameters: 57600, 8N1 * Location: J1 header (close to the Reset, WiFi and WPS buttons) * Pinout: 1 - VCC 2 - RXD 3 - TXD 4 - GND Installation: * D-Link Recovery GUI: power down the router, press and hold the reset button, then re-plug it. Keep the reset button pressed until the power LED starts flashing orange, manually assign a static IP address under the 192.168.0.xxx subnet (e.g. 192.168.0.2) and go to http://192.168.0.1 * Some modern browsers may have problems flashing via the Recovery GUI, if that occurs consider uploading the firmware through cURL: curl -v -i -F "firmware=@file.bin" 192.168.0.1 Signed-off-by: Mateus B. Cassiano <mbc07@live.com> [move DEVICE_VARIANT to individual definitions] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for Linksys EA7300 v1Santiago Rodriguez-Papa2020-07-169-159/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: * SoC: MediaTek MT7621A (880 MHz 2c/4t) * RAM: Nanya NT5CC128M16IP-DIT (256M DDR3-1600) * Flash: Macronix MX30LF1G18AC-TI (128M NAND) * Eth: MediaTek MT7621A (10/100/1000 Mbps x5) * Radio: MT7615N (2.4 GHz & 5 GHz) 4 antennae: 1 internal and 3 non-deatachable * USB: 3.0 (x1) * LEDs: White (x1 logo) Green (x6 eth + wps) Orange (x5, hardware-bound) * Buttons: Reset (x1) WPS (x1) Everything works! Been running it for a couple weeks now and haven't had any problems. Please let me know if you run into any. Installation: Flash factory image through GUI. This might fail due to the A/B nature of this device. When flashing, OEM firmware writes over the non-booted partition. If booted from 'A', flashing over 'B' won't work. To get around this, you should flash the OEM image over itself. This will then boot the router from 'B' and allow you to flash OpenWRT without problems. Reverting to factory firmware: Hard-reset the router three times to force it to boot from 'B.' This is where the stock firmware resides. To remove any traces of OpenWRT from your router simply flash the OEM image at this point. Signed-off-by: Santiago Rodriguez-Papa <contact@rodsan.dev> [use v1 only, minor DTS adjustments, use LINKSYS_HWNAME and add it to DEVICE_VARS, wrap DEVICE_PACKAGES, adjust commit message/title] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: provide common definition for ELECOM WRC GS devicesAdrian Schmutzler2020-07-167-35/+24
| | | | | | | | | | | | | | Add a common definition for ELECOM WRC "GS" devices to mt7621.mk to not repeat the same assignments five times. To keep the naming consistent, slightly rename the DTSI and the factory image recipe as well. Note that elecom_wrc-1167ghbk2-s uses a slightly different build recipe for the factory image, so we keep it separate. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: INAGAKI Hiroshi <musashino.open@gmail.com> [WRC-1750GSV]
* ramips: add support for ELECOM WRC-1750GS/GSVINAGAKI Hiroshi2020-07-163-0/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ELECOM WRC-1750GS is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based on MT7621A. WRC-1750GSV has the same hardware with WRC-1750GS. Specification: - SoC : MediaTek MT7621A - RAM : DDR3 128 MiB - Flash : SPI-NOR 16 MiB - WLAN : 2.4/5 GHz 3T3R (2x MediaTek MT7615) - Ethernet : 10/100/1000 Mbps x5 - Switch : MediaTek MT7530 (SoC) - LED/keys : 4x/6x (2x buttons, 1x slide-switch) - UART : through-hole on PCB - J4: 3.3V, GND, TX, RX from ethernet port side - 57600n8 - Power : 12VDC, 1.5A Flash instruction using factory image: 1. Boot WRC-1750GS (or WRC-1750GSV) normally 2. Access to "http://192.168.2.1/" and open firmware update page ("ファームウェア更新") 3. Select the OpenWrt factory image and click apply ("適用") button for WRC-1750GS : wrc-1750gs-squashfs-factory.bin for WRC-1750GSV: wrc-1750gsv-squashfs-factory.bin 4. Wait ~120 seconds to complete flashing Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ramips: add support for D-Link DIR-878 A1Mathieu Martin-Borret2020-07-133-1/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: SoC: MT7621AT RAM: 128MB Flash: 16MB NOR SPI flash WiFi: MT7615N (2.4GHz) and MT7615N (5Ghz) LAN: 5x1000M Firmware layout is Uboot with extra 96 bytes in header Base PCB is AP-MTKH7-0002 LEDs Power Green,Power Orange,Internet Green,Internet Orange LEDs "2.4G" Green & "5G" Green connected directly to wifi module Buttons Reset,WPS,WIFI Flashing instructions: Upload image via emergency recovery mode Push and hold reset button (on the back of the device) until power led starts flashing (about 10 secs or so) while powering the device on. Give it ~30 seconds, to boot the recovery mode GUI Connect your client computer to LAN1 of the device Set your client IP address manually to 192.168.0.2 / 255.255.255.0. Call the recovery page for the device at http://192.168.0.1 Use the provided emergency web GUI to upload and flash a new firmware to the device. Some browsers/OS combinations are known not to work, so if you don't see the percentage complete displayed and moving within a few seconds, restart the procedure from scratch and try anoher one, or try the command line way. Alternative method using command line on Linux: curl -v -i -F "firmware=@openwrt-xxxx-squashfs-factory.bin" 192.168.0.1 Signed-off-by: Mathieu Martin-Borret <mathieu.mb@protonmail.com> [use of generic uimage-padhdr in image generation code] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ramips: consolidate Netgear devices for mt7628Adrian Schmutzler2020-07-137-283/+151
| | | | | | | | | | | | | | | This creates a common DTSI and shared image definition for the relatively similar Netgear devices for mt7628 platform. As a side effect, this raises SPI flash frequency for the R6120, as it's expected to work there as well if it works for R6080 and R6020. Based on the data from the other devices, it also seems probable the 5g MAC address for R6120 could be extracted from the caldata, and the mtd-mac-address there could be dropped. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: consolidate recipes with uimage_padhdrAdrian Schmutzler2020-07-113-13/+8
| | | | | | | | | | | There are already two very similar recipes using uimage_padhdr in ramips target, and a third one is about to be added. Make the recipe more generic, so redefinitions are not necessary anymore. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: Bjørn Mork <bjorn@mork.no> [Zyxel WAP6805]
* ramips: mt7621: refactor set affinity scriptDENG Qingfang2020-07-111-19/+7
| | | | | | | | The current one only looks for mt76x2e and mt7603e, and does not work for 2 or more same Wi-Fi chips. Refactor the script to cover those cases. Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
* ramips: kernel: fix awake-rt305x-dwc2 patchAlexey Dobrovolsky2020-07-111-7/+7
| | | | | | | | | | | | | At this point in v5.4 kernel we cannot use dwc2_readl() and dwc2_writel() since they rely on the value hsotg->needs_byte_swap which cannot be obtained before the controller wakes up. We should use readl() and writel() to wake up the controller before calling dwc2_check_core_endianness(). Fixes: 6be0da90a165 ("ramips: refresh patches") Signed-off-by: Alexey Dobrovolsky <dobrovolskiy.alexey@gmail.com> [fixed Fixes: tag] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ramips: add support for Netgear R6020Tim Thorpe2020-07-104-0/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the Netgear R6020, aka Netgear AC750. The R6020 appears to be the same hardware as the Netgear R6080, aka Netgear AC1000, but it has a slightly different flash layout, and no USB ports. Specification: SoC: MediaTek MT7628 (580 MHz) Flash: 8 MiB RAM: 64 MiB Wireless: 2.4Ghz (builtin) and 5Ghz (MT7612E) LAN speed: 10/100 LAN ports: 4 WAN speed: 10/100 WAN ports: 1 UART (57600 8N1) on PCB MAC addresses based on vendor firmware: LAN *:88 0x4 WAN *:89 WLAN2 *:88 0x4 WLAN5 *:8a 0x8004 The factory partition might have been corrupted beforehand. However, the comparison of vendor firmware and OpenWrt still allowed to retrieve a meaningful assignment that also matches the other similar devices. Installation: Flashing OpenWRT from stock firmware requires nmrpflash. Use an ethernet cable to connect to LAN port 1 of the R6020, and power the R6020 off. From the connected workstation, run `nmrpflash -i eth0 -f openwrt-ramips-mt76x8-netgear_r6020-squashfs-factory.img`, replacing eth0 with the appropriate interface (can be identified by running `nmrpflash -L`). Then power on the R6020. After flashing has finished, power cycle the R6020, and it will boot into OpenWRT. Once OpenWRT has been installed, subsequent flashes can use the web interface and sysupgrade files. Signed-off-by: Tim Thorpe <timfthorpe@gmail.com> [slightly extend commit message, fix whitespaces in DTS, align From: with Signed-off-by] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: mt7621: use lzma-loader for ra21s & rg21sFurkan Alaca2020-07-081-0/+2
| | | | | | | | | | The rg21s fails to boot if the kernel is larger than about 2,376 KiB. The ra21s is virtually identical hardware. Enabling lzma-loader resolves the issue on both the rg21s and ra21s (see FS#3057 on the issue tracker). Fixes: FS#3057 Signed-off-by: Furkan Alaca <furkan.alaca@queensu.ca>
* ramips: add support for ZyXEL Keenetic Lite Rev.BSergei Burakov2020-07-083-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | Device specification: SoC: RT5350 CPU Frequency: 360 MHz Flash Chip: Macronix MX25L6406E (8192 KiB) RAM: Winbond W9825G6JH-6 (32768 KiB) 5x 10/100 Mbps Ethernet (4x LAN, 1x WAN) 1x external antenna UART (J1) header on PCB (57800 8n1) Wireless: SoC-intergated: 2.4GHz 802.11bgn USB: None 8x LED, 2x button Flash instruction: Configure PC with static IP 192.168.99.8/24 and start TFTP server. Rename "openwrt-ramips-rt305x-zyxel_keenetic-lite-b-squashfs-sysupgrade.bin" to "rt305x_firmware.bin" and place it in TFTP server directory. Connect PC with one of LAN ports, press the reset button, power up the router and keep button pressed until power LED start blinking. Router will download file from TFTP server, write it to flash and reboot. Signed-off-by: Sergei Burakov <senior.anonymous@ya.ru>
* ramips: move adslr_g7 in image/mt7621.mk to keep sortingAdrian Schmutzler2020-07-081-8/+8
| | | | | | | Move this device to the top to maintain alphabetic sorting in the file. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add missing kmod-mt7615-firmware for TP-Link RE500 v1Adrian Schmutzler2020-07-081-1/+1
| | | | | | | | | Adding this has been overlooked when rebasing the commit prior to merge. Fixes: ba0f4f0cfddc ("ramips: add support for TP-Link RE500 v1") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for ZyXEL WAP6805 (Altibox WiFi+)Bjørn Mork2020-07-085-0/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- SoC: MediaTek MT7621ST WiFi: MediaTek MT7603 Quantenna QT3840BC Flash: 128M NAND RAM: 64M LED: Dual colour red and green BTN: Reset WPS Eth: 4 x 10/100/1000 connected to MT7621 internal switch MT7621 RGMII port connected to Quantenna module GPIO: Power/reset of Quantenna module Quantenna module ---------------- The Quantenna QT3840BC (or QV840) is a separate SoC running another Linux installation. It is mounted on a wide mini-PCIe form factor module, but is connected to the RGMII port of the MT7621. It loads both a second uboot stage and an os image from the MT7621 using tftp. The module is configured using Quantenna specific RPC calls over IP, using 802.1q over the RGMII link to support multiple SSIDs. There is no support for using this module as a WiFi device in OpenWrt. A package with basic firmware and management tools is being prepared. Serial ports ------------ Two serial ports with headers: RRJ1 - 115200 8N1 - Connected to the Quantenna console J1 - 57600 8N1 - Connected to the MT7621 console Both share pinout with many other Zyxel/Mitrastar devices: 1 - NC (VDD) 2 - TX 3 - RX 4 - NC (no pin) 5 - GND Dual system partitions ---------------------- The vendor firmware and boot loader use a dual partition scheme storing a counter in the header of each partition. The partition with the highest number will be selected for boot. OpenWrt does not support this scheme and will always use the first OS partition. It will reset both counters to zero the first time sysupgrade is run, making sure the first partition is selected by the boot loader. Installation from vendor firmware --------------------------------- 1. Run a DHCP server. The WAP6805 is configured as a client device and does not have a default static IP address. Make a note of which address it is assigned 2. tftp the OpenWrt initramfs-kernel.bin image to this address. Wait for the WAP6805 to reboot. 3. ssh to the OpenWrt initramfs system on 192.168.1.1. Make a backup of all mtd partitions now. The last used OEM image is still present in either "Kernel" or "Kernel2" at this point, and can be restored later if you save a copy. 4. sysupgrade to the OpenWrt sysupgrade.bin image. Installation from U-Boot ------------------------ This requires serial console access 1. Copy the OpenWrt initramfs-kernel.bin image as "ras.bin" to your tftp server directory. Configure the server address as 192.168.0.33/24 2. Hit ESC when the message "Hit ESC key to stop autoboot" appears 3. Type "ATGU" + Enter, and then "2" immediately after pressing enter. 4. Answer Y to the question "Erase Linux in Flash then burn new one. Are you sure?", and answer the address/filename questions. Defaults: Input device IP (192.168.0.2) Input server IP (192.168.0.33) Input Linux Kernel filename ("ras.bin") 5. Wait until after you see the message "Done!" and power cycle the device. It will hang after flashing. 6. Continue with step 3 and 4 from the vendor firmware procedure. Notes on the WAP6805 U-Boot --------------------------- The bootloader has been modified with both ZyXELs zyloader and the device specific dual partition scheme. These changes appear to have broken a few things. The zyloader shell claims to support a number of ZyXEL AT commands, but not all of them work. The image selection scheme is unreliable and inconsistent. A limited U-Boot menu is available - and used by the above U-Boot install procedure. But direct booting into an uploaded image does not work, neither with ram nor with flash. Flashing works, but requires a hard reset after it is finished. Reverting to OEM firmware ------------------------- The OEM firmware can be restored by using mtd write from OpenWrt, flashing it to the "Kernel" partition. E.g. ssh root@192.168.1.1 "mtd -r -e Kernel write - Kernel" < oem.bin OEM firmwares for the WAP6805 are not avaible for public download, so a backup of the original installation is required. See above. Alternatively, firmware for the WAP6806 (Armor X1) may be used. This is exactly the same hardware. But the branding features do obviously differ. LED controller -------------- Hardware implementation is unknown. The dual-color LED is controlled by 3 GPIOs: 4: red 7: blinking green 13: green Enabling both red and green makes the LED appear yellow. The boot loader enables hardware blinking, causing the green LED to blink slowly on power-on, until the OpenWrt boot mode starts a faster software blink. Signed-off-by: Bjørn Mork <bjorn@mork.no> [fix alphabetic sorting for image build statement] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ramips: Add support for Xiaomi Mi Router(Black,R2100)Emir Efe Kucuk2020-07-087-155/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Xiaomi Mi Router AC2100 is a *black* cylindrical router that shares many characteristics (apart from its looks and the GPIO ports) with the 6-antenna *white* "Xiaomi Redmi Router AC2100" See the visual comparison of the two routers here: https://github.com/emirefek/openwrt-R2100/raw/imgcdn/rm2100-r2100.jpg Specification of R2100: - CPU: MediaTek MT7621A - RAM: 128 MB DDR3 - FLASH: 128 MB ESMT NAND - WIFI: 2x2 802.11bgn (MT7603) - WIFI: 4x4 802.11ac (MT7615) - ETH: 3xLAN+1xWAN 1000base-T - LED: Power, WAN in Yellow and Blue - UART: On board (Don't know where is should be confirmed by anybody else) - Modified u-boot Hacking of official firmware process is same at both RM2100 and R2100. Thanks to @namidairo Here is the detailed guide Hack: https://github.com/impulse/ac2100-openwrt-guide Guide is written for MacOS but it will work at linux. needed packages: python3(with scapy), netcat, http server, telnet client 1. Run PPPoE&exploit to get nc and wget busybox, get telnet and wget firmware 2. mtd write openwrt-ramips-mt7621-xiaomi_mi-router-ac2100-kernel1.bin kernel1 3. nvram set uart_en=1 4. nvram set bootdelay=5 5. nvram set flag_try_sys1_failed=1 6. nvram commit 7. mtd -r write openwrt-ramips-mt7621-xiaomi_mi-router-ac2100-rootfs0.bin rootfs0 other than these I specified in here. Everything is same with: https://github.com/openwrt/openwrt/commit/f3792690c4f0567a8965d82898295b9d50c3bb7e Thanks for all community and especially for this device: @Ilyas @scp07 @namidairo @Percy @thorsten97 @impulse (names@forum.openwrt.com) MAC Locations: WAN *:b5 = factory 0xe006 LAN *:b6 = factory 0xe000 WIFI 5ghz *:b8 = factory 0x8004 WIFI 2.4ghz *:b7 = factory 0x0004 Signed-off-by: Emir Efe Kucuk <emirefek@gmail.com> [refactored common image bits into Device/xiaomi-ac2100, fixed From:] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ramips: add support for Edimax Gemini RE23SDavide Fioravanti2020-07-083-9/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- SoC: Mediatek MT7621AT (880 MHz, 2 cores 4 threads) RAM: 128MB FLASH: 16MB NOR (Macronix MX25L12805D) ETH: 1x 10/100/1000 Mbps Ethernet (MT7530) WIFI: - 2.4GHz: 1x MT7615 (4x4:4) - 5GHz: 1x MT7615 (4x4:4) - 4 antennas: 2 external detachable and 2 internal BTN: - 1x Reset button - 1x WPS button LEDS: - 1x Green led (Power) - 1x Green-Amber-Red led (Wifi) UART: - 57600-8-N-1 Everything works correctly. Installation ------------ Flash the factory image directly from OEM web interface. (You can login using these credentials: admin/1234) Restore OEM Firmware -------------------- Flash the OEM "bin" firmware directly from LUCI. The firmware is downloadable from the OEM web page. Warning: Remember to not keep settings! Warning2: Remember to force the flash. Restoring procedure tested with RE23_1.08.bin MAC addresses ------------- factory 0x4 *:24 factory 0x8004 *:25 Cimage 0x07 *:24 Cimage 0x0D *:24 Cimage 0x13 *:24 Cimage 0x19 *:25 No other addresses were found in factory partition. Since the label contains both the 2.4GHz and 5GHz mac address I decided to set the 5GHz one as label-mac-device. Moreover it also corresponds to the lan mac address. Notes ----- The wifi led in the OEM firmware changes colour depending on the signal strength. This can be done in OpenWrt but just for one interface. So for now will not be any default action for this led. If you want to open the case, pay attention to the antenna placed on the bottom part of the front cover. The wire is a bit short and it breaks easily. (I broke it) Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com> [fix two typos and add extended MAC address section to commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: use WiFi LED DT triggers for TP-Link RE650 v1Adrian Schmutzler2020-07-072-5/+7
| | | | | | | | | | | | This moves WiFi LED triggers from 01_leds to device tree. While at it, convert the labels there to lower case; this is more commonly used and the change will actually remove competition between DT trigger and leftover uci config on already installed systems. Suggested-by: Georgi Vlaev <georgi.vlaev@gmail.com> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for TP-Link RE500 v1Christoph Krapp2020-07-076-125/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This device uses the same hardware as RE650 v1 which got supported in 8c51dde. Hardware specification: - SoC 880 MHz - MediaTek MT7621AT - 128 MB of DDR3 RAM - 16 MB - Winbond 25Q128FVSG - 4T4R 2.4 GHz - MediaTek MT7615E - 4T4R 5 GHz - MediaTek MT7615E - 1x 1 Gbps Ethernet - MT7621AT integrated - 7x LEDs (Power, 2G, 5G, WPS(x2), Lan(x2)) - 4x buttons (Reset, Power, WPS, LED) - UART header (J1) - 2:GND, 3:RX, 4:TX Serial console @ 57600,8n1 Flash instructions: Upload openwrt-ramips-mt7621-tplink_re500-v1-squashfs-factory.bin from the RE500 web interface. TFTP recovery to stock firmware: Unfortunately, I can't find an easy way to recover the RE without opening the device and using modified binaries. The TFTP upload will only work if selected from u-boot, which means you have to open the device and attach to the serial console. The TFTP update procedure does *not* accept the published vendor firmware binaries. However, it allows to flash kernel + rootfs binaries, and this works if you have a backup of the original contents of the flash. It's probably possible to create special image out of the vendor binaries and use that as recovery image. Signed-off-by: Christoph Krapp <achterin@googlemail.com> [remove dts-v1 in DTSI, do not touch WiFi LEDs for RE650, keep state_default in DTS files, fix label-mac-device, use lower case for WiFi LEDs] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: reduce spi-max-frequency for ipTIME A8004TSunguk Lee2020-07-061-2/+1
| | | | | | | | | | | | | | | | | | | Reduce spi-max-frequency for ipTIME A8004T and disable m25p,fast-read option. A8004T uses `en25qh128` for the MTD. This flash memory would allow 80MHz, sometimes kernel received wrong id value in initramfs installed router. (kernel expected `1c 70 18 1c 70 18`, but one of cases, it was `9c 70 18 1c 70 18`) In this case, openwrt can't detect the partition information, it would write the inccorect data to the firmware partition and also it would occur the bootlooping after sysupgrade. Signed-off-by: Sunguk Lee <d3m3vilurr@gmail.com> [minor commit title/message adjustments] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>