aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
Commit message (Collapse)AuthorAgeFilesLines
* kernel: update 4.9 to 4.9.51Stijn Tintel2017-09-201-3/+3
| | | | | | | | | | | | Refresh patches. Compile-tested on octeon and x86/64. Runtime-tested on octeon and x86/64. Fixes the following CVEs: - CVE-2017-14106 - CVE-2017-14497 Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* ramips: fix used MAC addresses for Phicomm K2PJiawei Wang2017-09-151-1/+1
| | | | | | | | | | | | | | | The factory partition of the Phicomm K2P contains two MAC addresses. The lower MAC address is at offset 0xe006 and the higher one is at offset 0xe000. Use the lower MAC address as base mac-address which the switch driver increments by one for the second (wan) vlan. The MAC addresses are still inverted in contrast to the stock firmware where the lower MAC address is used for wan. But at least the use of a MAC address not intended/reserved for this particular board is fixed. Signed-off-by: Jiawei Wang <me@jwang.link>
* ramips: fix D240 mini-PCIe power control GPIOsKristian Evensen2017-09-131-3/+14
| | | | | | | | | | | | | | | | In commit b11c51916cb9 ("ramips: Improve Sanlinking D240 config") I made a mistake with regards GPIO numbering. And in addition to specifying the wrong GPIO for controling the power of one of the mini-PCIe, I recently discovered that the power of both slots can be controlled. This patch specifies the correct GPIO for the left-most mini-PCIe slot of the D240 (labeled power_mpcie2 since the slot is attached to SIM2), and adds a GPIO that can be used to control the power of the other mini-PCIe slot (labeled power_mpcie1). Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com> [do not use the gpio active macros for the gpio-export value] Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: add support for TP-Link Archer C20 v1Maxim Anisimov2017-09-137-0/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link Archer C20 v1 is a router with 5-port FE switch and non-detachable antennas. It's very similiar to TP-Link Archer C50. Also it's based on MediaTek MT7620A+MT7610EN. Specification: - MediaTek MT7620A (580 Mhz) - 64 MB of RAM - 8 MB of FLASH - 2T2R 2.4 GHz and 1T1R 5 GHz - 5x 10/100 Mbps Ethernet - 2x external, non-detachable antennas - UART (J1) header on PCB (115200 8n1) - 8x LED (GPIO-controlled*), 2x button, power input switch - 1 x USB 2.0 port * 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 blue part of the LED. * MT7610EN ac chip isn't not supported by LEDE. Therefore 5Ghz won't work. Factory image notes: These devices use version 3 of TP-Link header, fortunately without RSA signature (at least in case of devices sold in Europe). The difference lays in the requirement for a non-zero value in "Additional Hardware Version" field. Ideally, it should match the value stored in vendor firmware header on device. We are able to prepare factory firwmare file which is accepted and (almost) correctly flashed from the vendor GUI. As it turned out, it accepts files without U-Boot image with second header at the beginning but due to some kind of bug in upgrade routine, flashed image gets corrupted before it's written to flash. So, to flash this device we must to prepare image using original firmware from tp-link site with uboot. Flash instruction: Until (if at all) TP-Link fixes described problem, the only way to flash LEDE image in these devices is to use tftp recovery mode in U-Boot. There are two ways to flash the device to LEDE: 1) Using tftp mode with UART connection and original LEDE image - Place lede-ramips-mt7620-ArcherC20-squashfs-factory.bin in tftp server directory - Configure PC with static IP 192.168.0.66/24 and tftp server. - Connect PC with one of LAN ports, power up the router and press key "4" to access U-Boot CLI. - Use the following commands to update the device to LEDE: setenv serverip 192.168.0.66 tftp 0x80060000 lede-ramips-mt7620-ArcherC20-squashfs-factory.bin erase tplink 0x20000 0x7a0000 cp.b 0x80060000 0x20000 0x7a0000 reset - After that the device will reboot and boot to LEDE 2) Using tftp mode without UART connection but require some manipulations with target image - Download and unpack TP-Link Archer C20 v1 firmware from original web site - Split uboot.bin from original firmware by this command (example): dd if=Archer_C20v1_0.9.1_4.0_up_boot(160427)_2016-04-27_13.53.59.bin of=uboot.bin bs=512 count=256 skip=1 - Create ArcherC20V1_tp_recovery.bin using this command: cat uboot.bin lede-ramips-mt7620-ArcherC20-squashfs-factory.bin > ArcherC20V1_tp_recovery.bin - Place ArcherC20V1_tp_recovery.bin in tftp server directory. - Configure PC with static IP 192.168.0.66/24 and tftp server. - 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. - Router will download file from server, write it to flash and reboot. Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
* ramips: fix hg255d LED status supportDavid Yang2017-09-131-0/+1
| | | | | | | | Use the green power LED for boot status indication. Source: https://my.oschina.net/osbin/blog/278782 Para 3 Signed-off-by: David Yang <mmyangfl@gmail.com>
* ramips: Add support for ZBT WE1026-5GKristian Evensen2017-09-117-1/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ZBT WE1026-5G (http://www.zbtlink.com/products/router/WE1026-5G.html) is the follow-up to the ZBT WE1026 and is based on MT7620. For the previous WE1026, the ZBT WE826 image could be used. However, as the name implies, the -5G comes equipped with a 5GHz wifi radio. As the WE826 only has a 2.4GHz radio, the addition of 5GHz means that a separate image is needed for the WE1026-5G. I suspect that this image will also work on the previous WE1026, but I don't have a device to test with. The WE1026-5G has following specifications: * CPU: MT7620A * 1x 10/100Mbps Ethernet. * 16 MB Flash. * 64 MB RAM. * 1x USB 2.0 port. * 1x mini-PCIe slots. * 1x SIM slots. * 1x 2.4Ghz WIFI. * 1x 5GHz wifi (MT7612) * 1x button. * 3x controllable LEDs. Works: * Wifi. * Switch. * mini-PCIe slot. Only tested with a USB device (a modem). * SIM slot. * Sysupgrade. * Button (reset). Not working: * The 5GHz WIFI LED is completely dead. I suspect the issue is the same as on other devices with Mediatek 5Ghz wifi-cards/chips. The LED is controlled by the driver, and mt76 (currently) does not support this. Not tested: * SD card reader. Notes: * The modem (labeled 3G/4G) and power LEDs are controlled by the hardware. * There is a 32MB version of this device available, but I do not have access to it. I have therefor only added support for the 16MB version, but added all the required infrastructure to make adding support for the 32MB version easy. Installation: The router comes pre-installed with OpenWRT, including a variant of Luci. The initial firmware install can be done through this UI, following normal procedure. I.e., access the UI and update the firmware using the sysupgrade-image. Remember to select that you do not want to keep existing settings. Recovery: If you brick the device, the WE1026-5G supports recovery using HTTP. Keep the reset button pressed for ~5sec when booting to start the web server. Set the address of the network interface on your machine to 192.168.1.2/24, and point your browser to 192.168.1.1 to access the recovery UI. From the recovery UI you can upload a firmware image. Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
* ramips: Change ethernet driver to use napi_complete_done.Rosen Penev2017-09-111-1/+1
| | | | | | Backport of mailine linux commit. Speeds up ethernet slightly and reduces latency. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ramips: Archer C50v1: support US and EU versionsThibaut VARENE2017-09-091-4/+6
| | | | | | | | | | | | | | | | | For the Archer C50v1, the EU and US versions are differentiated by their respective HW additional version (0x0 for US, 0x2 for EU). The stock web interface checks this field before flashing, making it impossible to flash the current (US) factory image on EU hardware. However the bootloader does not check this field, making it possible to use a single sysupgrade image for both hardware. This patch adds the necessary build bits to generate both EU and US factory images, and renames the target as "Archer C50v1" since there are as of now 3 different versions of Archer C50 (all with different CPUs). Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
* ramips: add support for the HNET C108Kristian Evensen2017-09-097-0/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HNET C108 (http://www.szhwtech88.com/Product-product-cid-100-id-4374.html) is a mifi based on MT7602A, which has the following specifications: * CPU: MT7620A * 1x 10/100Mbps Ethernet. * 16 MB Flash. * 64 MB RAM. * 1x USB 2.0 port. Only power is connected, this port is meant for charging other devices. * 1x mini-PCIe slots. * 1x SIM slots. * 1x 2.4Ghz WIFI. * 1x button. * 6000 mAh battery. * 5x controllable LEDs. Works: * Wifi. * Switch. * mini-PCIe slot. Only tested with a USB device (a modem). * SIM slot. * Sysupgrade. * Button (reset). Not working (also applies to the factory firmware): * Wifi LED. It is always switched on, there is no relation to the up/down state or activity of the wireless interface. Not tested: * SD card reader. Notes: * The C108 has no dedicated status LED. I therefore set the LAN LED as status LED. Installation: The router comes pre-installed with OpenWRT, including a variant of Luci. The initial firmware install can be done through this UI, following normal procedure. I.e., access the UI and update the firmware using the sysupgrade-image. Remember to select that you do not want to keep existing settings. Recovery: If you brick the device, the C108 supports recovery using TFTP. Keep the reset button pressed for ~5sec when booting to trigger TFTP. Set the address of the network interface on your machine to 10.10.10.3/24, and rename your image file to Kernal.bin. Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
* ramips: fix default LED configurationKristian Evensen2017-09-061-0/+0
| | | | | | | | | | | | | | | Commit 77645ffcd9ad ("ramips: add support for the GnuBee Personal Cloud One") dropped the execution permission from 01_leds with the result that the file isn't started during first boot and no default LED configuration is added. Revert the introduced file permission change. Fixes: FS#979 Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com> [cherry picked the fix from a board support patch] Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: fix mt76x8 dependenciesJohn Crispin2017-09-051-4/+4
| | | | | | | The commit merging mt7628 and mt7688 failed to update some dependencies. Signed-off-by: John Crispin <john@phrozen.org>
* ramips: provide get_port_stats() on mt7530/762x switchesThibaut VARENE2017-09-011-0/+36
| | | | | | | | | | This patch provides a generic switch_dev_ops 'get_port_stats()' callback by taping into the relevant port MIB counters. This callback is used by swconfig_leds led trigger to blink LEDs with port network traffic. Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
* ramips: merge mt7628/mt7688 into mt76x8L. D. Pinney2017-08-3010-354/+103
| | | | | | | | | | The ramips subtargets of mt7628 and mt7688 dts files all #include "mt7628an.dtsi" They are essentially a single subtarget. This patch merges the ramips subtargets mt7628 and mt7688 into a single subtarget mt76x8. Signed-off-by: L. D. Pinney <ldpinney@gmail.com>
* kernel: update 4.9 to 4.9.45Koen Vandeputte2017-08-302-16/+8
| | | | | | | | Refreshed all patches Compiled & run-tested on targets: cns3xxx, imx6 Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ramips: refresh kernel patchesJohn Crispin2017-08-242-10/+16
| | | | | | the reordering patch fixes random kernel hangs. bug/fix was reported by MTK/WCN. Signed-off-by: John Crispin <john@phrozen.org>
* ramips: make mt7621 select WEAK_REORDERING_BEYOND_LLSCJohn Crispin2017-08-241-0/+12
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* ramips: set ethernet mac address for VoCore2L. D. Pinney2017-08-231-0/+4
| | | | | | This patch sets the mac address for the VoCore2 devices. Signed-off-by: L. D. Pinney <ldpinney@gmail.com>
* ramips: add Xiaomi Mi Router 3G supportPavel Kubelun2017-08-237-0/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for Xiaomi Mi WiFi Router 3G. Short specification: - MT7621AT + MT7603EN + 7612EN - 256MB DDR3 RAM - 128MB NAND flash - 1+2 x 1000M Ethernet - 1x USB 3.0 port - reset button - yellow, blue, red leds Installation through telnet/ssh: - copy lede-ramips-mt7621-mir3g-squashfs-kernel1.bin and lede-ramips-mt7621-mir3g-squashfs-rootfs0.bin to usb disk or wget it from LEDE download site to /tmp - switch to /extdisks/sda1/ (if copied to USB drive) or to /tmp if wgetted from LEDE download site - run: mtd write lede-ramips-mt7621-mir3g-squashfs-kernel1.bin kernel1 - run: mtd write lede-ramips-mt7621-mir3g-squashfs-rootfs0.bin rootfs0 - run: mtd erase kernel0 - run: reboot Originally stock firmware has following partitions: - ... - kernel0 (primary kernel image) - kernel1 (secondary kernel image, used by u-boot in failsafe routine) - rootfs0 (primary rootfs) - rootfs1 (secondary rootfs in case primary fails) - overlay (used as ubi overlay) This commit squashes rootfs0, rootfs1 and overlay partitions into 1, so it can be used by LEDE fully for package installation, resulting in 117,5MiB. This device lacks hw watchdog, so adding softdog instead (stock does the same). Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
* kernel: update 4.9 to 4.9.44Stijn Tintel2017-08-176-19/+13
| | | | | | | | | | | | | | | Refresh patches. Adapt 704-phy-no-genphy-soft-reset.patch. Remove brcm2708/950-0005-mm-Remove-the-PFN-busy-warning.patch. Compile-tested on brcm2708/bcm2708 and x86/64. Runtime-tested on brcm2708/bcm2708 and x86/64. Fixes the following vulnerabilities: - CVE-2017-7533 - CVE-2017-1000111 - CVE-2017-1000112 Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* ramips: add support for the VoCore2 LiteL. D. Pinney2017-08-119-51/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The VoCore2 Lite uses the same PCB as the Vocore2. This patch moves the common VoCore2 parts into dtsi. Removed memory node in the device tree source file. Memory is detected automatically. http://vocore.io/ http://vonger.net/ http://vonger.cn/ Specifications: - SoC: MediaTek MT7688AN - RAM: 64MB DDR2 EtronTech EM68B16CWQH-25H - Flash: 8MB NOR SPI Flash GigaDevice GD25Q64CWIG - Wireless: Built into MT7688AN with onboard IPEX connector Firmware installation: - VoCore2-Lite ships with firmware forked from OpenWrt. - Installation from the bootloader is recommended. - If using luci/sysupgrade use the -n option (do not keep settings) original firmware uses a modified proprietary MediaTek wireless driver. - The wireless is disabled by default in LEDE. - If reverting to factory firmware using the bootloader is recommended. Signed-off-by: L. D. Pinney <ldpinney@gmail.com> Tested by: Noble Pepper <noblepepper@gmail.com>
* ramips: fix WHR-1166D WAN portMathias Kresin2017-08-111-1/+1
| | | | | | | | | | | | By adding the ICPlus IP1001 phy driver an already set RGMII delay mode is reset during driver load. Set the rgmii rx delay to fix corrupt/no packages in case the WAN port negotiates to 1000MBit. Fixes: FS#670 Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: ArcherC50v1: fix wlan2g MAC addressThibaut VARENE2017-08-061-0/+2
| | | | | | | | | | By default the wlan eprom contains the generic ralink MAC which is not the vendor (TP-Link) one. Based on OFW bootlog, it appears that addresses are decremented from the ethernet MAC. This patch fixes the MAC address for wlan2g in line with OFW. Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
* ramips: fix cd-poll sd card remove randomlyQin Wie2017-08-041-0/+4
| | | | | | | Fix when add 'mediatek,cd-poll' to dts cause the sd card be removed randomly. Special for the device without card-detect pin. Signed-off-by: Qin Wie <me@vonger.cn>
* ramips: move common parts into dtsiMathias Kresin2017-08-0315-690/+379
| | | | | | | Move the common parts of boards with multiple flash size variants into dtsi files. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: update device tree source filesL. D. Pinney2017-08-03212-1103/+1343
| | | | | | | | Use the GPIO dt-bindings macros and add compatible strings in the ramips device tree source files. Signed-off-by: L. D. Pinney <ldpinney@gmail.com> Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: Add support for Netgear EX3800Thibaut VARENE2017-08-033-5/+6
| | | | | | | | | | | | The Netgear EX3800 is essentially an EX3700 with a mains output socket. Both devices use the exact same firmware image (original firmware is named EX3700-EX3800-version.chk). This patch adds suport by renaming the EX3700 device to EX3700/EX3800 and updating the necessary glue. Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
* ramips: EX3700: rename factory.bin to factory.chkThibaut VARENE2017-08-031-2/+2
| | | | | | | The stock firmware upgrade interface requires the file to end with a .chk extension. Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
* ramips: cleanup EX2700 and WN3000RPv3 LEDsThibaut VARENE2017-08-032-5/+4
| | | | | | | | | | | | | | | This patch cleans up the WN3000RPv3 and EX2700 setup, bringing it in line with other similar devices: The power led is a bicolor one. The bootloader brings the red side on at powerup. Instead of blinking the red side in diag.sh and need to forcefully turn it off in 01_leds, this patch simplifies the setup by relying on the default off state of the gpio-led driver for the red side and blinking the green side as with other devices. Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
* ramips: cleanup AsiaRF AWM002 eval board supportMathias Kresin2017-08-037-162/+130
| | | | | | | | | | | Cleanup the dtsi files and remove one layer of dtsi. Set the size of the firmware partition to a value matching the flash size from the board (variant) name. Remove the usb led trigger. There is neither a default config for the usb led trigger nor a LED for usb activity indication. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: drop AsiaRF AWM003 eval boardMathias Kresin2017-08-035-77/+1
| | | | | | | Everything is identical to the AWM002 8m eval board. No need to duplicate it once more. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: fix Omnima MiniEMBWiFi imageMathias Kresin2017-08-031-0/+1
| | | | | | | Reference the Omnima MiniEMBWiFi device tree source file in the image build code. Otherwise the dts of the image processed before is used. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: build HuaWei HG255D imageMathias Kresin2017-08-031-0/+7
| | | | | | | The code to build an image was disabled some time ago for unknown reasons albeit the image looks fine. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: drop Edimax BR-6425 supportMathias Kresin2017-08-034-80/+0
| | | | | | Code to build an image for the Edimax BR-6425 never existed. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: add missing partitionsMathias Kresin2017-08-032-9/+57
| | | | | | The partitions were lost during migration to device tree. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: fix PCI init on MT7620 with Linux 4.9+Ilya Katsnelson2017-07-311-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So, this is kind of complicated. This has been upstream for a while, imported from OpenWRT/LEDE with some cleanups. LEDE ramips has stayed on linux-4.4 this whole time, with the old(er) version of the patch that had correct behavior[0], while upstream got changed[1]. When LEDE updated to kernel 4.9, the older version of the code from the patch got replaced with the upstream version containing the bug. The original behavior, however, seems to be correct here, as the official programming guide[2] indicates that bit 31 (PDRV_SW_SET) in register PPLL_CFG1 is reserved, but bit 23 (added as PPLL_LD) is the PPLL lock state (which also happens to line up with the error message). The original confusion probably comes from the double definition of PDRV_SW_SET[3, 4] in the upstream code, with one correct definition (31) and one incorrect one (23). I've also used the opportunity to clean up the error message a bit - it's still not really helpful to anyone who doesn't already know what the PPLL is, but at least it's slightly more readable now. This will probably need to be upstreamed as well, since with the way it's currently set up, it's unlikely PCI ever worked for anyone who's running an upstream kernel on that SoC. [0]: https://github.com/lede-project/source/blob/05d6e92594c507dcd1f4be6c1bcb2282fe1abe1f/target/linux/ramips/patches-4.4/0009-PCI-MIPS-adds-mt7620a-pcie-driver.patch#L259 [1]: https://github.com/torvalds/linux/blob/026d15f6b9878794fae1f794cae881ccd65052e5/arch/mips/pci/pci-mt7620.c#L246 [2]: http://www.anz.ru/files/mediatek/MT7620_ProgrammingGuide.pdf [3]: https://github.com/torvalds/linux/blob/026d15f6b9878794fae1f794cae881ccd65052e5/arch/mips/pci/pci-mt7620.c#L36 [4]: https://github.com/torvalds/linux/blob/026d15f6b9878794fae1f794cae881ccd65052e5/arch/mips/pci/pci-mt7620.c#L39 Signed-off-by: Ilya Katsnelson <me@0upti.me>
* ramips: Archer C50v1: fix power ledThibaut VARENE2017-07-292-1/+1
| | | | | | | | | | 01_leds had a workaround for the power led to compensate for the inverted GPIO state. This patch was missing from my previous commit. Signed-off-by: Thibaut VARENE <hacks@slashdirt.org> [add the power led default-state which was omitted in the last commit by me] Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: Archer C50v1: fix switch port numberingThibaut VARENE2017-07-291-1/+4
| | | | | | | | Luci shows switch ports in wrong order on that device. This patch fixes switch port numbering and matches them to the device silkscreen. Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
* ramips: Archer C50v1: fix LEDs active levelsThibaut VARENE2017-07-291-2/+2
| | | | | | | | | | All LEDs GPIOs are active low on this device. WAN and POWER states were inverted. Add default state for power. Tested on Archer C50v1. Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
* ramips: fix Mercury MAC1200R v2.0 board nameMathias Kresin2017-07-292-1/+2
| | | | | | | | | | | | With d2b6bf141662 ("ramips: fix image validation errors") the board name was changed to fix an image validation error. But this change wasn't applied to all other files using the board name, which broke sysupgrade. Revert this change and use the former board name in the metadata instead. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: mt7621: add compatible stringsL. D. Pinney2017-07-2925-0/+27
| | | | | | | Add compatible strings to all mt7621 based device tree source files to fix formal issues. Signed-off-by: L. D. Pinney <ldpinney@gmail.com>
* ramips: add NULL clock fix send upstreamMathias Kresin2017-07-291-0/+43
| | | | | | | | | | Make the behaviour of clk_get_rate consistent with common clk's clk_get_rate by accepting NULL clocks as parameter. Some device drivers rely on this, and will cause an OOPS otherwise. Fixes: FS#735 Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: drop stray kernel 4.4 configsMathias Kresin2017-07-277-1494/+0
| | | | | | | The kernel 4.4 patches where already removed with the bump to 4.9. Drop the the subtarget configs as well. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: add support for Loewe WMDR-143NOliver Fleischmann2017-07-275-1/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The WMDR-143N is a small module originally used as a Wifi client in some Loewe smart TV sets. It is sold cheaply at german surplus shops. The module contains a RT3662 SOC. Specifications: - 500 MHz CPU Clock - 1x 10/100Mbps Ethernet (pin header) - 32 MB of RAM - 8 MB of FLASH - 2T3R 2.4/5 GHz (SOC internal) - 3 Antennas on PCB - UART pads on PCB (J3: 1 = +3.3V, 2 = RX, 3 = TX, 4 = GND), TX and RX are 3,3V only! The square hole is pin 1 - Power supply pads on PCB (J6: 1 and 2 = +5V, 3 and 4 = GND) The square hole is pin 1 The original firmware has two identical kernel/rootfs images and two "Factory" calibration data blocks in flash. The LEDE image leaves only the first "Factory" block in place and uses both "Kernel" blocks and the redundant "Factory" block together to gain enough space for the jffs2 partition. Flash instructions: You need UART and Ethernet connections to flash the board. Use the LEDE "sysupgrade.bin" image with tftp. Apply power to the board and in the first 5 seconds, hit 2 to select TFTP upload. The bootloader asks for board- and server IP addresses and filename. Alternate method: With the vendor firmware running, assign an IP address to the ethernet port, tftp the firmware image to /tmp and write to mtd4 ("KernelA"). Signed-off-by: Oliver Fleischmann <ogf@bnv-bamberg.de> [remove pinctrl node from dts, no pin is used as GPIO] Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: pinctrl: return proper error if pinctrl0 is emptyMathias Kresin2017-07-271-1/+1
| | | | | | | | Children of the pinctrl0 node are optional. Return EINVAL (=missing) instead of 0. Fixes a hang if the pinctrl0 has no children. Signed-off-by: Mathias Kresin <dev@kresin.me> Acked-by: John Crispin <john@phrozen.org>
* ramips: refresh the rcu_sched patch and remove debug infoJohn Crispin2017-07-261-27/+6
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* ralink: fix rcu_sched stalls on mt7621John Crispin2017-07-262-0/+132
| | | | | | | | there were 2 bugs *) core1 came up with a bad bogo mips, looks like the clock needed time to stabilize *) HPT frequency was not set making r4k timers not come up properly Signed-off-by: John Crispin <john@phrozen.org>
* ramips: add support for the GnuBee Personal Cloud OneL. D. Pinney2017-07-257-0/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GnuBee Personal Cloud One 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 2.5" Drives - One micro SDcard - One USB 3.0 - Two USB 2.0 - Gigabit Ethernet: 1 x WAN and 1 x LAN - UART 3.5mm Audio Jack or 3 pin header - 57600 8N1 - Four GPIOs available on a pin header Flash instructions: The GnuBee Personal Cloud One 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 Signed-off-by: L. D. Pinney <ldpinney@gmail.com> [use switchdev led trigger, all interfaces are in vlan1; rename leds according to board.d setting; remove ge2 group from the pinmux, this group doesn't exist in the driver] Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: DIR-860L-B1 fix switch port numberingThibaut VARENE2017-07-251-1/+4
| | | | | | | | Luci shows switch ports in inverted order on that device. This patch fixes switch port numbering and matches them to the device silkscreen. Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
* ramips: fix wps button gpio for DWR-512Giuseppe Lippolis2017-07-251-1/+1
| | | | | | The WPS button is at GPIO#7. Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com>
* ramips: DTS: VoCore2 improvements/fixesPaul Wassi2017-07-251-22/+3
| | | | | | | | | | | The VoCore2 features 128MB of RAM, therefore set memory in DTS to 128*1024*1024 = 0x8000000 The board's LED is connected to GND, set it to ACTIVE_HIGH here. Make serial console working again on kernel 4.9 by change of pinmux configuration. Signed-off-by: Paul Wassi <p.wassi@gmx.at>