aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
Commit message (Collapse)AuthorAgeFilesLines
* ramips: mt7620: eMMC: stop invalid memory access if only one device is definedAndré Draszik2018-04-042-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pdev->id is -1 when only one device exists, and is used: * as an index into drv_mode[] to determine whether to use PIO or DMA mode (via host->id) * as an index into msdc_6575_host[], to store the mmc_priv() data. Obviously, -1 is not a valid index in either case, causing us to read invalid memory, and memory corruption, respectively. The invalid memory read is causing non-deterministic behaviour, in particular in the v4.4 kernel it still picked DMA mode, but in the v4.9 it now always picks PIO mode. Also, PIO mode doesn't work, causing the following: / # echo 3 > /proc/sys/vm/drop_caches [ 3845.249237] sh (128): drop_caches: 3 / # /root/usr/lib/libc.so [ 3846.096070] do_page_fault(): sending SIGSEGV to libc.so for invalid read access from 7f9cb5a0 [ 3846.104758] epc = 779b0ea4 in libc.so[7792f000+c3000] [ 3846.109907] ra = 779a8004 in libc.so[7792f000+c3000] Segmentation fault / # /root/usr/lib/libc.so musl libc (mipsel-sf) Version 1.1.16-git-40-g54807d47 Dynamic Program Loader Usage: /root/usr/lib/libc.so [options] [--] pathname [args] (i.e. initial page-in of any binary causes a segfault, subsequent access works.) While this change doesn't fix PIO mode, it at least makes us deterministically use DMA (which works), and it also stops us from corrupting memory. Signed-off-by: André Draszik <git@andred.net>
* ramips: mt7620: eMMC: fix MODULE_DEVICE_TABLEAndré Draszik2018-04-042-2/+2
| | | | | | | This was referencing an undefined symbol, probably due to copy/paste error. Signed-off-by: André Draszik <git@andred.net>
* ramips: mt7620: eMMC: fix compiler warning (misleading indentation)André Draszik2018-04-042-8/+8
| | | | | | | | | | | drivers/mmc/host/mtk-mmc/sd.c:2782:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if ((hw->flags & MSDC_SDIO_IRQ) || (hw->flags & MSDC_EXT_SDIO_IRQ)) ^~ drivers/mmc/host/mtk-mmc/sd.c:2785:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' cd_active_low = !of_property_read_bool(pdev->dev.of_node, "mediatek,cd-high"); ^~~~~~~~~~~~~ Signed-off-by: André Draszik <git@andred.net>
* ramips: mt7620: eMMC: clear owner fieldAndré Draszik2018-04-042-4/+2
| | | | | | | a) This is not needed in recent kernels anymore (> 3.x ??) b) this allows driver unloading now Signed-off-by: André Draszik <git@andred.net>
* kernel: update kernel 4.14 to 4.14.32Hauke Mehrtens2018-04-031-3/+3
| | | | | | | | | | | | | The following patches are now included upstream: * 0052-MIPS-lantiq-fix-usb-clocks.patch * 0053-MIPS-lantiq-enable-AHB-Bus-for-USB.patch * 0060-lantiq-ase-enable-MFD-SYSCON.patch Closes: FS#1466 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Tested-by: Stijn Segers <foss@volatilesystems.org> Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: update kernel 4.9 to version 4.9.91Hauke Mehrtens2018-03-314-8/+8
| | | | | | | | | | * Refreshed patches. * Deleted 210-Revert-led-core-Fix-brightness-setting-when-setting-.patch (was accepted upstream) * Deleted 812-pci-dwc-fix-enumeration.patch (was accepted upstream) Compile and run tested on lantiq Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* Kernel: bump 4.14 to 4.14.29Stijn Segers2018-03-234-10/+10
| | | | | | | | | | | | Right patch version this time, sorry! * Patch 180-usb-xhci-add-support-for-performing-fake-doorbell.patch had to be adjusted slightly because of upstream adapted code. * Refreshed patches. Compile-tested: ramips/mt7621, x86/64 Run-tested: ramips/mt7621, x86/64 Signed-off-by: Stijn Segers <foss@volatilesystems.org> Tested-by: Rosen Penev <rosenp@gmail.com>
* ramips: remove dead (and potentially crashy) code in mt7621 gsw initFelix Fietkau2018-03-231-11/+0
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: rename ethernet priv->device field to dev to match upstreamFelix Fietkau2018-03-237-26/+26
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: fix switch and MAC address for WHR-G300NINAGAKI Hiroshi2018-03-232-1/+7
| | | | | | | | | | | | WHR-G300N has 5 ethernet ports (lan: 4, wan: 1), but there was no correct configuration in 02_network script and 6 ports was configured on the switch. Also, since the MAC address was not acquired from factory partition, incorrect values was set to LAN and WAN interfaces. This commit fixes these issues. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ramips: add support for TP-Link TL-WR902AC v3Peter Lundkvist2018-03-186-0/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link TL-WR902AC v3 is a pocket-size dual-band (AC750) router based on MediaTek MT7628N + MT7650E. Specification: - MediaTek MT7628N/N (580 Mhz) - 64 MB of RAM - 8 MB of FLASH - 2T2R 2.4 GHz and 1T1R 5 GHz - 1x 10/100 Mbps Ethernet * MT7650 ac chip isn't not supported by LEDE/OpenWrt at the moment. Therefore 5Ghz won' work. Flash instruction: The only way to flash LEDE image in TL-WR902AC v3 is to use tftp recovery mode in U-Boot: 1. Configure PC with static IP 192.168.0.66/24 and tftp server. 2. Rename "openwrt-ramips-mt76x8-tplink_tl-wr902ac-v3-squashfs-tftp-recovery.bin" to "tp_recovery.bin" and place it in tftp server directory. 3. Connect PC with the LAN port, press the reset button, power up the router and keep button pressed for around 6-7 seconds, until device starts downloading the file. 4. Router will download file from server, write it to flash and reboot. Signed-off-by: Peter Lundkvist <peter.lundkvist@gmail.com> [drop p2led_an pinmux, this pin isn't used as gpio, fix whitespace issues] Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: add support for D-Link DWR-116-A1/2Pawel Dembicki2018-03-1810-1/+175
| | | | | | | | | | | | | | | | | | | | | | | | | The DWR-116-A1/2 Wireless Router is based on the MT7620N SoC. Specification: MediaTek MT7620N (580 Mhz) 32 MB of RAM 8 MB of FLASH 802.11bgn radio 5x 10/100 Mbps Ethernet (1 WAN and 4 LAN) 2x external, non-detachable antennas UART (J1 in A1, JP1 in A2) header on PCB (57600 8n1) 6x LED (GPIO-controlled), 2x button JBOOT bootloader Known issues: WAN LED is drived by uartl tx pin. I decide to use this pin as uartlite tx pin. Installation: Apply factory image via http web-gui. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
* ramips: fix switch for Nexx devicesINAGAKI Hiroshi2018-03-171-5/+8
| | | | | | | | | | | | | | | | | There are 2 ethernet ports on Nexx WT1520 and WT3020. These ethernet ports are assigned as follows, and other ports cannot be used. - WT1520: - port0 -> lan - port4 -> wan - WT3020: - port0 -> wan - port4 -> lan I dropped ports that cannot be used. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ramips: mt7620n: add mdio node and disable port4 by defaultMathias Kresin2018-03-131-1/+8
| | | | | | | | | | | | | | | | | Revert the changes I applied to aa5014dd1a58 ("ramips: mt7620n: enable port 4 as EPHY by default"). The driver expects a node mdio-bus to be present, regardless of the actual node status. If the node is missing the driver fails to load with mtk_soc_eth 10100000.ethernet: no mdio-bus child node found Disable port4 by default again. If the port is enabled but not present, a "invalid port id 4" warning is shown during boot. Fixes: FS#1428 Signed-off-by: Mathias Kresin <dev@kresin.me>
* Revert "ramips: gpio: fix compilation if CONFIG_GPIO_SYSFS=n"John Crispin2018-03-131-3/+12
| | | | | | | | This reverts commit cff2dedebc665dc1d3d64d850afd0124c6d35eaa. This patch causes build issues Signed-off-by: John Crispin <john@phrozen.org>
* ramips: gpio: fix compilation if CONFIG_GPIO_SYSFS=nAndré Draszik2018-03-131-12/+3
| | | | | | | | | | | | | | | If CONFIG_GPIO_SYSFS=n, compilation fails with drivers/built-in.o: In function `gpio_export_with_name': include/asm-generic/gpio.h:128: undefined reference to `__gpiod_export' This is because the stub in that case has the wrong name, _gpiod_export() - note the missing underscore (_) at the start. Fix the stub, and add the correct prototype for the real implementation. Signed-off-by: André Draszik <git@andred.net>
* ramips: mt7620n: enable port 4 as EPHY by defaultGiuseppe Lippolis2018-03-061-5/+5
| | | | | | | | | | | | According to the datasheet the mt7620n have a fixed switch configuration with 5 ephy (10/100) port. No RGMII configuration is possible. Drop the mdio node as well. Without RGMII, the mdio node doesn't make any sense Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com> [drop mdio node, enable port4 by default] Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: mt7620: power up ephy port 4Pawel Dembicki2018-03-062-0/+2
| | | | | | | | | | | In some boards port 4 of mt7620 switch is powered down in bootloader configuration as lan/wan package leak mitigation. Reset ephy port 4 to default settings to power up the port. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> [clarify issue in commit message] Signed-off-by: Mathias Kresin <dev@kresin.me>
* kernel: bump 4.9 to 4.9.85Magnus Kroken2018-03-032-2/+2
| | | | Signed-off-by: Magnus Kroken <mkroken@gmail.com>
* kernel: bump 4.14 to 4.14.23Stijn Segers2018-03-021-2/+2
| | | | | | | | | | | | | This patch bumps the 4.14 kernel to .23. - Refreshed patches. - Deleted bcm53xx/patches-4.14/089-PCI-iproc-Fix-NULL-pointer-dereference-for-BCMA.patch. Has been accepted upstream. - Deleted generic/pending-4.14/821-usb-Remove-annoying-warning-about-bogus-URB.patch. The upstream URB code was changed, the patch no longer applies. I discussed this with the patch author and removed it for now, we'll see how it goes. Compile-tested on: ramips/mt7621, x86/64 Run-tested on: ramips/mt7621, x86/64 Signed-off-by: Stijn Segers <foss@volatilesystems.org>
* ramips: fix spurious IRQ7 events when using perf on 4.14Felix Fietkau2018-02-271-0/+15
| | | | | | | | | | | | | Upstream handling of MIPS CPU IRQs is rather hackish and the interrupts are being enabled unconditionally in various places because of legacy code. Performance counter events are routed both through the GIC and through legacy CPU IRQ7 events, causing spurious interrupts. Fix this by disabling IRQ7 when trying to access the performance counter IRQ. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* Revert "ramips: improve NAPI polling to increase GRO batch size" (fixes FS#1333)Felix Fietkau2018-02-271-13/+16
| | | | | | This reverts commit 968b8616127a52fe5baff20a1f29ff49ade26bc2. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: mt7621: add Mediatek AP-MT7621A-V60 EVB supportRoman Yeryomin2018-02-244-0/+137
| | | | | | | | | | | | | | | | | | | | This board has: - mt7621 SoC - 8MB SPI flash - 128MB RAM - 5x ethernet ports from internal (SoC) switch - 1x ethernet port sitting on gmac2 and IC+ phy (not yet supported) - 3x PCIe slots - 1x USB 2.0 and 1x USB 3.0 - sound based on wm8960 - SDXC card slot (full size) First fw write from interactive u-boot menu, interrupt with 2. After that sysupgrade. Tested both with 4.9 and 4.14 Signed-off-by: Roman Yeryomin <roman@advem.lv>
* ramips: remove chunked-io patch and set spi->max_transfer_size insteadFelix Fietkau2018-02-244-184/+15
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: optimize for performance by default starting with 4.14Felix Fietkau2018-02-245-0/+10
| | | | | | Keep size optimizations for smaller targets that already switched Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: enable power LED and second uart on GL-MT300N-V2Benjamin Valentin2018-02-232-2/+12
| | | | | | | | | The device has a second uart accessible via pin headers, so enable it. There is also a green power led which was not enabled previously. Enable it too and use it as status LED. Signed-off-by: Benjamin Valentin <benjamin.valentin@volatiles.de>
* ramips: add support for ALFA Network AWUSFREE1Piotr Dymacz2018-02-226-20/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ALFA Network AWUSFREE1 is an USB Wi-Fi N300 adapter based on MT7628. Specification: - MT7628AN (580 MHz) - 64 MB of RAM (DDR2) - 8 MB of FLASH (SPI NOR) - 2T2R 2.4 GHz (MT7628) with external FEM (RFFM4203) - 2x detachable antennas (RP-SMA) - ASIX AX88772 USB to Ethernet bridge (connected with MT7628 PHY0) - 4x LED (2 driven by GPIO) - 1x button (reset) - 1x mini USB for host and main power input - UART header on PCB Flash instruction: You can use sysupgrade image directly in vendor firmware which is based on LEDE/OpenWrt. Alternatively, you can use web recovery mode in U-Boot: 1. Power device with reset button pressed and release it after ~5 sec. 2. Setup static IP 192.168.1.2/4 on your PC. 3. Go to 192.168.1.1 in browser and upload "sysupgrade" image. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ramips: mt7621: fix usb initRoman Yeryomin2018-02-221-0/+1
| | | | | | | | | | In 4.14 reg-names is required to identify resources. Otherwise init fails with: [ 5.900501] xhci-mtk 1e1c0000.xhci: invalid resource [ 5.910499] xhci-mtk: probe of 1e1c0000.xhci failed with error -22 Signed-off-by: Roman Yeryomin <roman@advem.lv>
* ramips: fix MT7621 switch driver IRQ storm on init with linux 4.14Felix Fietkau2018-02-211-4/+7
| | | | | | | | The hardware emits some interrupts while initializing and handling them can mess up the state or cause infinite loops. Fix this by disabling IRQs during init and re-enabling them afterwards Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: fix MT7621 PCI driver on 4.14Felix Fietkau2018-02-211-1/+1
| | | | | | The .map_irq hook can now be called after init. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: add support for Tama W06INAGAKI Hiroshi2018-02-205-0/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tama Electric Axing W06 is a 2.4 GHz band 11n router, based on Mediatek MT7688AN. Specification: - MT7688AN (575 MHz) - 64 MB of RAM (DDR2 SDRAM) - 16 MB of Flash (SPI) - 1T1R 2.4 GHz - 1x 10/100/1000 Mbps Ethernet - 4x LEDs (GPIO connected: 3), 1x button - 1x USB 2.0 Type-A (host) - UART header on PCB (GND, RX, TX, Vcc from RJ45 side) Flash instruction using sysupgrade image: 1. Connect micro-USB cable for power supply into W06 and turn on the router 2. Connect to wifi with SSID "tama-*" with password. Complete SSID and password are listed on the back of the router 3. Access to 192.168.1.1 and login with user name "admin" and password empty 4. In firmware update(ファームウェア更新) page, click "参照" button and click "ブラウザー" button to open file browser, select the sysupgrade image and press OK button 5. Wait ~150 seconds to complete flashing Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ramips: improve GnuBee Personal Cloud Two supportMathias Kresin2018-02-207-36/+22
| | | | | | | | | | | | | | | | | | Use the generic board detection for the GnuBee Personal Cloud Two instead of the target specific one as all recent additions are doing. Fixup the pinmux to set all pins used as GPIO to the function GPIO. Request pins where used. Drop the i2c from the dts. There is nothing connected. While at it fix an indentation issue and use references instead of duplicating the whole node path. Use the same switch config as for the GB-PC1 and drop the led trigger for the not supported IP1001 phy connected to second rgmii. Fixes: c60a21532bc9 ("ramips: Add support for the GnuBee Personal Cloud Two") Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: use generic board detection for D-Link DAP-1522 A1Mathias Kresin2018-02-205-8/+5
| | | | | | | Use the generic board detection for the D-Link DAP-1522 A1 instead of the target specific one as all recent additions are doing. Signed-off-by: Mathias Kresin <dev@kresin.me>
* kernel: bump 4.9 to 4.9.82Stijn Tintel2018-02-182-4/+4
| | | | | | | | | | | | | | | | | | | | | | Refresh patches. Remove upstreamed patches: - ar7/002-MIPS-AR7-ensure-the-port-type-s-FCR-value-is-used.patch - backport/040-crypto-fix-typo-in-KPP-dependency-of-CRYPTO_ECDH.patch Remove layerscape/819-Revert-dmaengine-dmatest-move-callback-wait-queue-to.patch, it is superseded by upstream commit 297c7cc4b5651b174a62925b6c961085f04979fd. Remove pending/650-pppoe_header_pad.patch, it is superseded by upstream commit 1bd21b158e07e0b8c5a2ce832305a0ebfe42c480. Update patches that no longer apply: - ar71xx/004-register_gpio_driver_earlier.patch - hack/204-module_strip.patch - pending/493-ubi-set-ROOT_DEV-to-ubiblock-rootfs-if-unset.patch Fixes CVE-2017-8824. Compile-tested: ar71xx. Runtime-tested: ar71xx. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* kernel: bump 4.14 to 4.14.20Stijn Tintel2018-02-182-4/+4
| | | | | | | | | | | | | | | | Refresh patches. Remove upstreamed patches: - backport/080-v4.15-0001-arch-define-weak-abort.patch - backport/081-v4.15-0002-kernel-exit.c-export-abort-to-modules.patch Update patch that no longer applies: pending/493-ubi-set-ROOT_DEV-to-ubiblock-rootfs-if-unset.patch Fixes CVE-2017-8824. Compile-tested: octeon, x86/64. Runtime-tested: octeon, x86/64. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* treewide: remove obsolete sysupgrade watchdog killMathias Kresin2018-02-161-9/+0
| | | | | | | | | The watchdog kill command was meant for busybox watchdog. Busybox watchdog was replaced by the procd watchdog mid 2013 with commit df7ce9301a25 ("busybox: disable the watchdog utility by default"), which makes the kill command obsolete since quite some time. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: preliminary support for 4.14Roman Yeryomin2018-02-1574-0/+27443
| | | | | | | | - removed upstreamed patches - 0901-spansion_nand_id_fix.patch is disabled, not clear if it's needed Signed-off-by: Roman Yeryomin <roman@advem.lv> Signed-off-by: John Crispin <john@phrozen.org>
* ramips: fix reporting effective VLAN ID on MT7621 switchesJo-Philipp Wich2018-02-141-2/+21
| | | | | | | | | | | | On MT7621, the REG_ESW_VLAN_VTIM reads are undefined, causing swconfig to always report `vid: 0` in swconfig show output. Since a 4K VLAN table is used on this platform, the VLAN ID always correponds to the actual VLAN table index so provide a specific MT7621 implementation of the get_vid callback which returns the table index as VLAN ID. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* ramips: properly map pvid for vlans with remapped vid on mt7530/762x switchesJo-Philipp Wich2018-02-141-1/+7
| | | | | | | | | | | | | Currently, untagged port primary vlan IDs are set to the VLAN table index, and not the actual VLAN ID, breaking configurations with IDs deviating from the VLAN index. Fix the issue by resolving the per-port pvid property to the target VLAN ID value before committing to the hardware. Fixes FS#991, FS#1147, FS#1341 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* ramips: don't clobber vlans with remapped vid on mt7530/762x switchesJo-Philipp Wich2018-02-141-36/+53
| | | | | | | | | | | | | Avoid overwriting vlan entries with remapped vid in later iterations of the vlan enumeration loop of mt7530_apply_config(). Fix the problem by refactoring the code to first reset the entire table, then reprogram only vlans with members to prevent overwriting configured vlans with unconfigured ones. Fixes FS#1147, FS#1341 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* ramips: add support for D-Link DAP-1522 A1George Hopkins2018-02-137-9/+173
| | | | | | | | | | | | | | | | | | D-Link DAP-1522 is a wireless bridge/access point with 4 LAN ports and a dual-band wireless chipset. Specifications: - Ralink RT2880 - 32 MB of RAM - 4 MB of Flash - 4x 10/100/1000 Mbps Ethernet (RTL8366SR) - 802.11abgn (RT2850) Flash Instructions: 1. Download lede-ramips-rt288x-dap-1522-a1-squashfs-factory.bin 2. Open the web interface and upload the image Signed-off-by: George Hopkins <george-hopkins@null.net>
* ramips: use new image build code for WHR-G300NINAGAKI Hiroshi2018-02-132-42/+21
| | | | | | | | The tftp.bin image for Buffalo WHR-G300N was not built, so I was fixed it after rewriting to new image build code. And the code for factory-EU.bin was broken, so I deleted it. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ramips: Add support for the GnuBee Personal Cloud TwoRosen Penev2018-02-137-0/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GnuBee Personal Cloud Two crowdfunded on https://www.crowdsupply.com It is a low-cost, low-power, network-attached storage device. Specifications: - SoC: MediaTek MT7621AT - RAM: DDR3 512 MB - Flash: 32 MB - Six SATA ports for 3.5" Drives - One SDcard - One USB 3.0 - Two USB 2.0 - Gigabit Ethernet: Three Ports - UART 3.5mm Audio Jack or 3 pin header - 57600 8N1 - Three GPIOs available on a pin header Flash instructions: The GnuBee Personal Cloud Two ships with libreCMC installed. libreCMC is a Free Software Foundation approved fork of LEDE/OpenWrt. As such one can upgrade using the webinterface or sysupgrade. Das U-Boot has multiple options for recovery or updates including : - USB - http - tftp Errata: - While there are three ethernet ports, the third requires support for the second GMAC. This will come in kernel 4.14. - The first hard drive slot has a clearance issue with the two fan headers. Workaround is to pull the headers out and connect the pins to jumper wires. - Using this device as a NAS is problematic with the 4.9 kernel as many /dev/sdX reads throw silent errors. The current theory behind this is some kind of unhandled DMA mapping error in the kernel. This is not an issue with kernel 4.4. Signed-off-by: L. D. Pinney <ldpinney@gmail.com> Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ramips: add support for TP-Link Archer C50 v3Henryk Heisig2018-02-116-0/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link Archer C50 v3 is a router with 5-port FE switch and non-detachable antennas. It's based on MediaTek MT7628N+MT7612E. Specification: - MediaTek MT7628N/N (580 Mhz) - 64 MB of RAM - 8 MB of FLASH - 2T2R 2.4 GHz and 2T2R 5 GHz - 5x 10/100 Mbps Ethernet - 4x external, non-detachable antennas - UART (J1) header on PCB (115200 8n1) - 7x LED (GPIO-controlled*), 2x button, power switch * WAN LED in this devices is a dual-color, dual-leads type which isn't (fully) supported by gpio-leds driver. This type of LED requires both GPIOs state change at the same time to select color or turn it off. For now, we support/use only the green part of the LED. Flash instruction: The only way to flash LEDE image in ArcherC50v3 is to use tftp recovery mode in U-Boot: 1. Configure PC with static IP 192.168.0.66/24 and tftp server. 2. Rename "openwrt-ramips-mt7628-ArcherC50v3-squashfs-tftp-recovery.bin" to "tp_recovery.bin" and place it in tftp server directory. 3. Connect PC with one of LAN ports, press the reset button, power up the router and keep button pressed for around 6-7 seconds, until device starts downloading the file. 4. Router will download file from server, write it to flash and reboot. Signed-off-by: Henryk Heisig <hyniu@o2.pl>
* ramips: ArcherC20v4: use common TP-Link dtsi fileHenryk Heisig2018-02-111-72/+3
| | | | | | and remove common part from dts file. Signed-off-by: Henryk Heisig <hyniu@o2.pl>
* ramips: change the TP-Link dtsi filenameHenryk Heisig2018-02-114-3/+3
| | | | Signed-off-by: Henryk Heisig <hyniu@o2.pl>
* ramips: various fixes for zbt-we1226Daniel Golle2018-02-067-18/+15
| | | | | | | | | | | Convert userspace code to use generic device-tree compatible board detection method. Users of the existing code will have to use sysupgrade -F once to switch to the new generic board naming. Properly setup pinctrl fixing the switch port LEDs. Fixes commit 9c4fe103cb (ramips: add support for ZBT-WE1226) Reported-by: Mathias Kresin <dev@kresin.me> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ramips: use napi_alloc_frag and skb_free_fragFelix Fietkau2018-02-051-4/+4
| | | | | | Slightly improves rx performance Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: improve NAPI polling to increase GRO batch sizeFelix Fietkau2018-02-051-16/+13
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: replace uses of OpenWrt with $(VERSION_DIST)Felix Fietkau2018-02-051-1/+1
| | | | | | This makes the distribution name more configurable. Signed-off-by: Felix Fietkau <nbd@nbd.name>