aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
Commit message (Collapse)AuthorAgeFilesLines
* ramips: add support for TP-Link MR6400 v5Filip Moc2020-11-254-0/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | TL-MR6400v5 is very similar to TL-MR6400v4. Main differences are: - smaller form factor - different LED GPIOs - different switch connections You can flash via tftp recovery: - serve tftp-recovery image as /tp_recovery.bin on 192.168.0.225/24 - connect to any ethernet port - power on the device while holding the reset button - wait at least 8 seconds before releasing reset button Flashing via OEM web interface does not work. LTE module does not support DHCP so it must be configured via QMI. Hardware Specification (v5.0 EU): - SoC: MT7628NN - Flash: Winbond W25Q64JVS (8MiB) - RAM: ESMT M14D5121632A (64MiB) - Wireless: SoC platform only (2.4GHz b/g/n, 2x internal antenna) - Ethernet: 1NIC (4x100M) - WWAN: TP-LINK LTE MODULE (2x external detachable antenna) - Power: DC 9V 0.85A Signed-off-by: Filip Moc <lede@moc6.cz>
* ramips: add license to TP-Link MR6400 v4's DTSFilip Moc2020-11-251-0/+2
| | | | Signed-off-by: Filip Moc <lede@moc6.cz>
* kernel: bump 5.4 to 5.4.79John Audia2020-11-241-6/+4
| | | | | | | | | | | | | | | | | | | | | | | Manually rebased patches: ath79/patches-5.4/910-unaligned_access_hacks.patch bcm27xx/patches-5.4/950-0135-spi-spi-bcm2835-Disable-forced-software-CS.patch bcm27xx/patches-5.4/950-0414-SQUASH-Fix-spi-driver-compiler-warnings.patch ipq806x/patches-5.4/093-4-v5.8-ipq806x-PCI-qcom-Use-bulk-clk-api-and-assert-on-error.patch Removed since could be reverse-applied by quilt and found to be included upstream: ipq806x/patches-5.4/096-PCI-qcom-Make-sure-PCIe-is-reset-before-init-for-rev.patch All modifications made by update_kernel.sh Build system: x86_64 Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711 Run-tested: ipq806x/R7800 No dmesg regressions, everything functional Signed-off-by: John Audia <graysky@archlinux.us> [refresh altered targets after rebase] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: phy: at803x: Select SFP interface mode that both sides supports.René van Dorst2020-11-231-16/+35
| | | | | | | | | | | | | | | | Currently sfp_select_interface() return the fastest interface that the sfp modules supports even if the phy don't support that mode. For example an GPON module that support both 2500basex and 1000basex. Currently sfp_select_interface() picks 2500basex instead of 1000basex. So limit the interfaces which both sides supports before calling sfp_select_interface() or return an error if we don't have match. Reviewed-by: John Thomson <git@johnthomson.fastmail.com.au> Tested-by: Braihan Cantera <bcanterac@gmail.com> [MikroTik RB760iGS + Nokia G-010S-A 3FE46541AA SFP] Tested-by: John Thomson <git@johnthomson.fastmail.com.au> [Mikrotik rb760igs + SFP SM/LC, SFP base1000T, SFP+ passive DAC] Signed-off-by: René van Dorst <opensource@vdorst.com>
* ramips: add support for TP-Link MR6400 v4Filip Moc2020-11-234-0/+121
| | | | | | | | | | | | | | | | | | | | | | | You can flash via tftp recovery: - serve tftp-recovery image as /tp_recovery.bin on 192.168.0.225/24 - connect to any ethernet port - power on the device while holding the reset button - wait at least 8 seconds before releasing reset button Flashing via OEM web interface does not work. LTE module does not support DHCP so it must be configured via QMI. Hardware Specification (v4.0 EU): - SoC: MT7628NN - Flash: Winbond W25Q64JVS (8MiB) - RAM: ESMT M14D5121632A (64MiB) - Wireless: SoC platform only (2.4GHz b/g/n, 2x internal antenna) - Ethernet: 1NIC (4x100M) - WWAN: TP-LINK LTE MODULE (2x external detachable antenna) - Power: DC 9V 0.85A Signed-off-by: Filip Moc <lede@moc6.cz>
* ramips: add support for the Hak5 WiFi Pineapple Mark 7Marc Egerton2020-11-183-0/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the WiFi Pineapple Mark 7, a wireless penetration testing tool. Specifications: * SoC: MediaTek MT7628 (580MHz) * RAM: 256MiB (DDR2) * Storage 1: 32MiB NOR (SPI) * Storage 2: 2GB eMMC * Wireless 1: 802.11b/g/n 2.4GHz (Built In) * Wireless 2: 802.11b/g/n 2.4GHz (MT7601) * Wireless 3: 802.11b/g/n 2.4GHz (MT7601) * USB: 1x USB Type-A 2.0 Host Port * Ethernet: 1x USB Type-C AX88772C Ethernet * UART: 57600 8N1 on PCB * Inputs: 1x Reset Button * Outputs: 1x RGB LED * FCCID: 2AA52MK7 Flash Instructions: Original firmware is based on OpenWRT. Use sysupgrade via SSH to flash. Signed-off-by: Marc Egerton <foxtrot@realloc.me> [pepe2k@gmail.com: set only required/used gpio groups to gpio function] Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ramips: use m25p,fast-read on Xiaomi Mi Router 4A Gb/3G v2Adrian Schmutzler2020-11-181-0/+1
| | | | | | | | | | | The Xiaomi Mi Router 4A Gigabit model has a race condition on bootup causing the SQUASHFS data errors to appear and create a bootloop scenario. Adding the m25p,fast-read property resolves this issue. Suggested-by: David Bentham <db260179@gmail.com> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: mt7621: fix Telco X1 GPIO switchesDENG Qingfang2020-11-161-1/+1
| | | | | | | The GPIO base of MT7621 GPIO 0~31 is 480 on kernel 5.4 Fix the GPIO numbering. Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
* ramips: add Xiaomi Mi Router 4A Gigabit explicitlyAdrian Schmutzler2020-11-125-160/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This device has previously been supported by the image for Xiaomi Mi Router 3G v2. Since this is not obvious, the 4A is marketed as a new major revision and it also seems to have a different bootloader, this will be both more tidy and more helpful for the users. Apart from that, note that there also is a 100M version of the device that uses mt7628 platform, so a specifically named image will also prevent confusion in this area. Specifications: - SoC: MediaTek MT7621 - Flash: 16 MiB NOR SPI - RAM: 128 MiB DDR3 - Ethernet: 3x 10/100/1000 Mbps (switched, 2xLAN + WAN) - WIFI0: MT7603E 2.4GHz 802.11b/g/n - WIFI1: MT7612E 5GHz 802.11ac - Antennas: 4x external (2 per radio), non-detachable - LEDs: Programmable "power" LED (two-coloured, yellow/blue) Non-programmable "internet" LED (shows WAN activity) - Buttons: Reset Installation: Bootloader won't accept any serial input unless "boot_wait" u-boot environment variable is changed to "on". Vendor firmware won't accept any serial input until "uart_en" is set to "1". Using the https://github.com/acecilia/OpenWRTInvasion exploit you can gain access to shell to enable these options: To enable uart keyboard actions - 'nvram set uart_en=1' To make uboot delay boot work - 'nvram set boot_wait=on' Set boot delay to 5 - 'nvram set bootdelay=5' Then run 'nvram commit' to make the changes permanent. Once in the shell (following the OpenWRTInvasion instructions) you can then run the following to flash OpenWrt and then reboot: 'cd /tmp; curl https://downloads.openwrt.org/...-sysupgrade.bin --output firmware.bin; mtd -e OS1 -r write firmware.bin OS1' Suggested-by: David Bentham <db260179@gmail.com> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for D-Link DIR-2640 A1James McGuire2020-11-114-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for D-Link DIR-2640 A1. 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 2.0, 1 USB 3.0 * Buttons: Reset, WPS * LEDs: Power (blue/orange), Internet (blue/orange), WiFi 2.4G (blue), WiFi 5G (blue), USB 3.0 (blue), USB 2.0 (blue) 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 *:a7 (label) wan factory 0xe006 *:aa 2.4 factory 0xe000 +1 *:a8 5.0 factory 0xe000 +2 *:a9 Seems like vendor didn't replace the dummy entries in the calibration data. Signed-off-by: James McGuire <jamesm51@gmail.com> [fix device definition title] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix kernel oops in `mt7621_nfc_write_page_hwecc`Anton Ryzhov2020-11-041-4/+6
| | | | | | | | | | `mt7621_nfc_write_page_hwecc` may be called with `buf=NULL`, but `mt7621_nfc_check_empty_page` always tries to read it. That caused Oops: `Unable to handle kernel paging request at virtual address 00000000` Fixes: FS#3416 Signed-off-by: Anton Ryzhov <anton@ryzhov.me>
* mt7621: mikrotik: use vmlinuz (zBoot ELF)John Thomson2020-10-292-2/+5
| | | | | | | | | | | | - minimal built initramfs: 11MB vmlinux ELF -> 4.5MB vmlinuz - ~5 seconds for kernel decompression, which was equivalent to the additional time to load the uncompressed ELF from SPI NOR. - Removes requirement for lzma-loader, which may have been causing some image builds to fail to boot on Mikrotik mt7621. Fixes: FS#3354 Suggested-by: Thibaut VARÈNE <hacks@slashdirt.org> Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
* ramips: add linux zboot supportChuanhong Guo2020-10-291-0/+26
| | | | | | | | linux-mips has zboot code which can create a self-extracting kernel image. This allows enabling kernel zboot support for ramips targets. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: add support for Wavlink WL-WN530HG4Nuno Goncalves2020-10-273-2/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | Same hardware as Phicomm K2G but different flash layout. Specification: - SoC: MediaTek MT7620A - Flash: 8 MB - RAM: 64 MB - Ethernet: 4 FE ports and 1 GE port (RTL8211F on port 5) - Wireless radio: MT7620 for 2.4G and MT7612E for 5G, both equipped with external PA. - UART: 1 x UART on PCB - 57600 8N1 Flash instruction: To avoid requiring UART for TFTP a dual flash procedure is suggested to install the squashfs image: 1. Rename openwrt-ramips-mt7620-wavlink_wl-wn530hg4-initramfs-kernel.bin to WN530HG4-WAVLINK. 2. Flash this file with the factory web interface. 3. With OpenWRT now running use standard sysupgrade to install the squashfs image. Signed-off-by: Nuno Goncalves <nunojpg@gmail.com> [remove dts-v1, remove model from LED labels, wrap commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: mt7621: use lzma-loader for U7621-06Jianhui Zhao2020-10-251-0/+2
| | | | | | | The U7621-06 fails to boot if the kernel is large. Enabling lzma-loader resolves the issue. Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
* ramips: add support for TOTOLINK X5000RChuanhong Guo2020-10-252-0/+149
| | | | | | | | | | | | | | | | | | | | | | Specifications: - SoC: MT7621AT - RAM: 256MB - Flash: 16MB (EN25QH128A) - Ethernet: 5xGbE - WiFi: MT7915 2x2 2.4G 573.5Mbps + 2x2 5G 1201Mbps Known issue: MT7915 DBDC variant isn't supported yet. Flash instruction: Upload the sysupgrade firmware to the firmware upgrade page in vendor fw. Other info: MT7915 seems to have two PCIEs connected to MT7621. Card detected on PCIE0 has an ID of 14c3:7916 and the other one on PCIE1 has 14c3:7915. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: add support for TP-Link RE200 v4Richard Fröhning2020-10-204-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link RE200 v4 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/v3. 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 - UART connection holes on PCB (57600 8n1) There are 2.4G and 5G LEDs in red and green which are controlled separately. MAC addresses ------------- The MAC address assignment matches stock firmware, i.e.: LAN : *:8E 2.4G: *:8D 5G : *:8C 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. 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> [removed empty line, fix commit message formatting] Signed-off-by: David Bauer <mail@david-bauer.net>
* mediatek: rewrite flow offload codeFelix Fietkau2020-10-161-2/+2
| | | | | | | | | The code is now much cleaner and works better than the old code. Preparation for submitting it upstream (though with a different API) Also add back MT7621 support and fix flow table coherence issues on MT7622 Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: drop kernel version switchesAdrian Schmutzler2020-10-093-35/+2
| | | | | | | The ramips target only supports 5.4, so drop all kernel version switches for older kernels there. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix logic level for DIR-645 buttonsDavid Bauer2020-10-031-2/+2
| | | | | | | | | | | The D-Link DIR-645 currently uses an incorrect logic level for its buttons. Correct them in order to prevent unintentional activation of failsafe mode. Reported-by: Perry Melange <isprotejesvalkata@gmail.com> Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: remove set_wifi_led function in 01_ledsAdrian Schmutzler2020-10-026-77/+53
| | | | | | | | | | | | | | | | | | | While we mostly use the ucidef_set_led_* functions directly in 01_leds we still have the set_wifi_led function in parallel for several old devices. This is not only inconsistent with the other definitions, it also links to the wlan0 interface instead of using a phy trigger which would be independent of the interface name (and is used for all newer devices anyway). Apart from that, the standard names "wifi" and "wifi-led" are not very helpful in a world with different radio bands either. Thus, this patch removes the set_wifi_led function and puts the relevant commands into the cases explicitly. This makes the mechanism used more evident and will hopefully lead to some future improvements or at least prevent some copy-pasting of the old setups. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: remove option to set WiFi LED via aliasesAdrian Schmutzler2020-10-027-21/+5
| | | | | | | | | | | | | In ramips, it's not common to use an alias for specifying the WiFi LED; actually only one device uses this mechanism (TL-WR841N v14). Particularly since the WiFi LEDs are typically distinguished between 2.4G and 5G etc. it is also not very useful for this target. Thus, this patch removes the setup lines for this mechanism and converts the TL-WR841N v14 to the normal setup. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: remove model name from LED labelsAdrian Schmutzler2020-10-02379-3123/+1975
| | | | | | | | | | | | | | | | | Like in the previous patch for ath79 target, this will remove the "devicename" from LED labels in ramips as well. The devicename is removed in DTS files and 01_leds, consolidation of definitions into DTSI files is done where (easily) possible, and migration scripts are updated. For the latter, all existing definitions were actually just devicename migrations anyway. Therefore, those are removed and a common migration file is created in target base-files. This is actually another example of how the devicename removal makes things easier. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: merge ethernet setup for RT-AC51U/RT-AC54UAdrian Schmutzler2020-09-283-10/+6
| | | | | | | The ethernet setup/label MAC address for RT-AC51U and RT-AC54U are the same, so move them into the shared DTSI. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: move dts-v1 statement to top-level DTSI filesAdrian Schmutzler2020-09-25414-695/+33
| | | | | | | | | | | | | | | | | The "/dts-v1/;" identifier is supposed to be present once at the top of a device tree file after the includes have been processed. In ramips, we therefore requested to have in the DTS files so far, and omit it in the DTSI files. However, essentially the syntax of the parent mtxxxx/rtxxxx DTSI files already determines the DTS version, so putting it into the DTS files is just a useless repetition. Consequently, this patch puts the dts-v1 statement into the top-level SoC-based DTSI files, and removes all other occurences. Since the dts-v1 statement needs to be before any other definitions, this also moves the includes accordingly where necessary. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for Linksys EA7300 v2J. Scott Heppler2020-09-237-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This submission relied heavily on the work of Santiago Rodriguez-Papa <contact at rodsan.dev> Specifications: * SoC: MediaTek MT7621A (880 MHz 2c/4t) * RAM: Winbond W632GG6MB-12 (256M DDR3-1600) * Flash: Winbond W29N01HVSINA (128M NAND) * Eth: MediaTek MT7621A (10/100/1000 Mbps x5) * Radio: MT7603E/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) 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: J. Scott Heppler <shep971@centurylink.net>
* target: update SPDX license namesAdrian Schmutzler2020-09-2219-19/+19
| | | | | | | SPDX moved from GPL-2.0 to GPL-2.0-only and from GPL-2.0+ to GPL-2.0-or-later. Reflect that in the SPDX license headers. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: bump 5.4 to 5.4.66John Audia2020-09-191-2/+2
| | | | | | | | | | | | All modifications made by update_kernel.sh/no manual intervention needed Run-tested: ipq806x (R7800), ath79 (Archer C7v5), x86/64 No dmesg regressions, everything appears functional Signed-off-by: John Audia <graysky@archlinux.us> [add run test from PR] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: mt7621: pbr-m1: fix firmware sizeChuanhong Guo2020-09-132-2/+2
| | | | | | | This board is equipped with Winbond W25Q256FV 32M SPI-NOR. Fix partition size for that. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: mt7621: pbr-m1: increase SPI clock to 50MHzChuanhong Guo2020-09-131-1/+2
| | | | Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: mt7621: pbr-m1: add pcie reset for asm1061Chuanhong Guo2020-09-131-0/+12
| | | | | | | | this board has a pcie to sata bridge connected to pcie2 with a separated pcie reset on gpio7. add reset-gpios and corresponding pinctrl nodes into dts. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* kernel: bump 5.4 to 5.4.64John Audia2020-09-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | Remove upstreamed patches: generic-backport 701-v5.5-net-core-use-listified-Rx-for-GRO_NORMAL-in-napi_gro.patch Manually merged: mediatek/patches-5.4 0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch All other modifications made by update_kernel.sh Build-tested: ipq806x, lantiq/xrx200, mvebu, x86/64 Run-tested: ipq806x (R7800), mvebu (mamba, rango), lantiq/xrx200 (Easybox 904 xDSL), x86/64 No dmesg regressions, everything functional Signed-off-by: John Audia <graysky@archlinux.us> [add community build/run tests to commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: create common DTSI for Sunvalley Filehub devicesAdrian Schmutzler2020-09-123-258/+138
| | | | | | | | | | HooToo HT-TM05 and RAVPower RP-WD03 have almost identical hardware (except for RAM size) and are from the same vendor (SunValley). Create a common DTSI file for them. Suggested-by: Russell Morris <rmorris@rkmorris.us> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix baud rate for RAVPower RP-WD03Adrian Schmutzler2020-09-121-4/+0
| | | | | | | | | | | | The baud rate for the RAVPower RP-WD03 is 57600, not 115200. Since this is the default from mt7620n.dtsi, the chosen node can simply be removed from the device DTS. Fixes: 5ef79af4f80f ("ramips: add support for Ravpower WD03") Suggested-by: Russell Morris <rmorris@rkmorris.us> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: assign LEDs for RAVPower RP-WD03Adrian Schmutzler2020-09-122-2/+9
| | | | | | | | | | | | | | | According to the User Manual, there is a "Wi-Fi LED" with blue and green colors, doing the following by default: Flashing Blue: System loading Solid Blue: System loaded Flashing Green: Connecting to the Internet Solid Green: Connected to the Internet According to this vendor behavior, we keep refer to the LED as "wifi" but implement the according default behavior as in OEM firmware. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix MAC address assignment for RAVPower RP-WD03Adrian Schmutzler2020-09-121-1/+5
| | | | | | | | | | | | | | | | | MAC assignment based on vendor firmware: 2.4 GHz *:b4 (factory 0x04) LAN/label *:b4 (factory 0x28) WAN *:b5 (factory 0x2e) The previously used location 0x4000 for ethernet is actually empty. Therefore, fix the ethernet MAC address and set it as label-mac-address. Fixes: 5ef79af4f80f ("ramips: add support for Ravpower WD03") Suggested-by: Russell Morris <rmorris@rkmorris.us> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix partitions and boot for RAVPower RP-WD03Adrian Schmutzler2020-09-113-12/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RAVPower RP-WD03 is a battery powered router, with an Ethernet and USB port. Due due a limitation in the vendor supplied U-Boot bootloader, we cannot exceed a 1.5 MB kernel size, as is the case with recent builds (i.e. post v19.07). This breaks both factory and sysupgrade images. To address this, use the lzma loader (loader-okli) to work around this limitation. The improvements here also address the "misplaced" U-Boot environment partition, which is located between the kernel and rootfs in the stock image / implementation. This is addressed by making use of mtd-concat, maximizing space available in the booted image. This will make sysupgrade from earlier versions impossible. Changes are based on the recently supported HooToo HT-TM05, as the hardware is almost identical (except for RAM size) and is from the same vendor (SunValley). While at it, also change the SPI frequency accordingly. Installation: - Download the needed OpenWrt install files, place them in the root of a clean TFTP server running on your computer. Rename the files as, - openwrt-ramips-mt7620-ravpower_rp-wd03-squashfs-kernel.bin => kernel - openwrt-ramips-mt7620-ravpower_rp-wd03-squashfs-rootfs.bin => rootfs - Plug the router into your computer via Ethernet - Set your computer to use 10.10.10.254 as its IP address - With your router shut down, hold down the power button until the first white LED lights up. - Push and hold the reset button and release the power button. Continue holding the reset button for 30 seconds or until it begins searching for files on your TFTP server, whichever comes first. - The router (10.10.10.128) will look for your computer at 10.10.10.254 and install the two files. Once it has finished installation, it will automatically reboot and start up OpenWrt. - Set your computer to use DHCP for its IP address Notes: - U-Boot environment can be modified, u-boot-env is preserved on initial install or sysupgrade - mtd-concat functionality is included, to leave a "hole" for u-boot-env, combining the OEM kernel and rootfs partitions Most of the changes in this commit are the work of Russell Morris (as credited below), I only wrapped them up and added compat-version. Thanks to @mpratt14 and @xabolcs for their help getting the lzma loader to work! Fixes: 5ef79af4f80f ("ramips: add support for Ravpower WD03") Suggested-by: Russell Morris <rmorris@rkmorris.us> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: use proper name for RAVPower RP-WD03Adrian Schmutzler2020-09-114-9/+13
| | | | | | | | The proper model name is RP-WD03 (i.e. with the RP- prefix). Adjust all names to that. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: move ravpower-wd009-factory recipe to mt76x8.mkAdrian Schmutzler2020-09-112-6/+8
| | | | | | | The recipe is only used for a single device, so put it in the subtarget file. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: disable default build for Ravpower RP-WD03Adrian Schmutzler2020-09-091-0/+1
| | | | | | | | | | This device has a 1.5M kernel size limit during boot and is unbootable since February 2019 [1]. [1] https://forum.openwrt.org/t/ravpower-wd03-does-not-start-with-openwrt-master/49792 Reported-by: Szabolcs Hubai <szab.hu@gmail.com> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: revert sysupgrade adjustments for early DSA-adoptersAdrian Schmutzler2020-09-081-8/+0
| | | | | | | | | | | | | | | | | The uci-default mechanism to update the compat-version was only meant for early DSA-adopters, which should have updated by now. Remove this workaround again in order to prevent the intended experiences for all the other people. This reverts: a9703db72030 ("mvebu: fix sysupgrade experience for early DSA-adopters") 86c89bf5e8f5 ("kirkwood: fix sysupgrade experience for early DSA-adopters") Partially reverted: 1eac573b5304 ("ramips: mt7621: implement compatibility version for DSA migration") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* Revert "treewide: add sysupgrade comment for early DSA-adopters"Adrian Schmutzler2020-09-081-2/+1
| | | | | | | | | | This reverts commit e81e625ca375d6dc3c885ec870ec15757ac76d72. This was meant just for early DSA-adopters. Those should have updated by now, remove it so future updaters get the intended experience. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: bump 5.4 to 5.4.63John Audia2020-09-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Manually merged: hack-5.4 230-openwrt_lzma_options.patch bcm27xx 950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch x86 011-tune_lzma_options.patch Remove upstreamed patches in collaboration with Ansuel Smith: ipq806x 093-1-v5.8-ipq806x-PCI-qcom-Add-missing-ipq806x-clocks-in-PCIe-driver.patch 093-2-v5.8-ipq806x-PCI-qcom-Change-duplicate-PCI-reset-to-phy-reset.patch 093-3-v5.8-ipq806x-PCI-qcom-Add-missing-reset-for-ipq806x.patch All other modifications made by update_kernel.sh Build-tested: bcm27xx/bcm2708, ipq806x, x86/64 Run-tested: ipq806x (R7800), x86/64 No dmesg regressions, everything functional Signed-off-by: John Audia <graysky@archlinux.us> [update commit message/tested] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for D-Link DIR-2660 A1Josh Bendavid2020-09-064-1/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for D-Link DIR-2660 A1. 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 2.0, 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), USB 2.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 *:a7 (label) wan factory 0xe006 *:aa 2.4 factory 0xe000 +1 *:a8 5.0 factory 0xe000 +2 *:a9 Seems like vendor didn't replace the dummy entries in the calibration data. Signed-off-by: Josh Bendavid <joshbendavid@gmail.com> [rebase onto already merged DIR-1960 A1, add MAC addresses to commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for HooToo HT-TM05Russell Morris2020-09-035-0/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HooToo HT-TM05 is a battery powered router, with an Ethernet and USB port. Vendor U-Boot limited to 1.5 MB kernel size, so use lzma loader (loader-okli). Specifications: SOC: MediaTek MT7620N BATTERY: 10400mAh WLAN: 802.11bgn LAN: 1x 10/100 Mbps Ethernet USB: 1x USB 2.0 (Type-A) RAM: 64 MB FLASH: GigaDevice GD25Q64, Serial 8 MB Flash, clocked at 50 MHz Flash itself specified to 80 MHz, but speed limited by mt7620 SPI fast-read enabled (m25p) LED: Status LED (blue after boot, green with WiFi traffic 4 leds to indicate power level of the battery (unable to control) INPUT: Power, reset button MAC assignment based on vendor firmware: 2.4 GHz *:b4 (factory 0x04) LAN/label *:b4 (factory 0x28) WAN *:b5 (factory 0x2e) Tested and working: - Ethernet - 2.4 GHz WiFi (Correct MAC-address) - Installation from TFTP (recovery) - OpenWRT sysupgrade (Preserving and non-preserving), through the usual ways: command line and LuCI - LEDs (except as noted above) - Button (reset) - I2C, which is needed for reading battery charge status and level - U-Boot environment / variables (from U-Boot, and OpenWrt) Installation: - Download the needed OpenWrt install files, place them in the root of a clean TFTP server running on your computer. Rename the files as, - ramips-mt7620-hootoo_tm05-squashfs-kernel.bin => kernel - ramips-mt7620-hootoo_tm05-squashfs-rootfs.bin => rootfs - Plug the router into your computer via Ethernet - Set your computer to use 10.10.10.254 as its IP address - With your router shut down, hold down the power button until the first white LED lights up. - Push and hold the reset button and release the power button. Continue holding the reset button for 30 seconds or until it begins searching for files on your TFTP server, whichever comes first. - The router (10.10.10.128) will look for your computer at 10.10.10.254 and install the two files. Once it has finished installation, it will automatically reboot and start up OpenWrt. - Set your computer to use DHCP for its IP address Notes: - U-Boot environment can be modified, u-boot-env is preserved on initial install or sysupgrade - mtd-concat functionality is included, to leave a "hole" for u-boot-env, combining the OEM kernel and rootfs partitions I would like to thank @mpratt14 and @xabolcs for their help getting the lzma loader to work! Signed-off-by: Russell Morris <rmorris@rkmorris.us> [drop changes in image/Makefile, fix indent and PKG_RELEASE in uboot-envtools, fix LOADER_FLASH_OFFS, minor commit message facelift, add COMPILE to Device/Default] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: image: add recipe for OKLI loaderChuanhong Guo2020-09-031-1/+17
| | | | Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: lzma-loader: make FLASH_START configurableChuanhong Guo2020-09-033-4/+8
| | | | | | | | | | | FLASH_START is supposed to point at the memory area where NOR flash are mapped. We currently have an incorrect FLASH_START copied from ar71xx back then and the loader doesn't work under OKLI mode. On ramips, mt7621 has it's flash mapped to 0x1fc00000 and other SoCs uses 0x1c000000. This commit makes FLASH_START a configurable value to handle both cases. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: drop support for kernel 4.14Adrian Schmutzler2020-09-0253-15043/+0
| | | | | | | The target seems to be working on 5.4, so drop 4.14 support in preparation for removing it from master entirely. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* mediatek/ramips: unify ethernet driver fixes and add performance optimizationsFelix Fietkau2020-09-013-100/+2
| | | | | | Increase DMA burst size and tx ring size and optimize tx processing Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: rt3883: use lzma-loader for DIR-645Perry Melange2020-08-281-0/+1
| | | | | | | | | The DIR-645 fails to boot if the kernel is large. Enabling lzma-loader resolves the issue. Run-tested on D-Link DIR-645. Signed-off-by: Perry Melange <isprotejesvalkata@gmail.com>