aboutsummaryrefslogtreecommitdiffstats
path: root/target
Commit message (Collapse)AuthorAgeFilesLines
...
* imagebuilder: Remove json_info_files/ before buildPaul Spooren2020-07-131-0/+1
| | | | | | | | | | | | | | | The folder `json_info_files` contains multiple JSON files which describe created firmware images. The folder is not removed between builds as the ImageBuilder does not use `image.mk`. Not removing the JSON files result in a merged `profiles.json` file containing entries for outdated or non-existing images. This commit adds the `json_info_files/` cleanup step to the ImageBuilder Makefile. Signed-off-by: Paul Spooren <mail@aparcar.org> (cherry picked from commit 941ec28b355ea690b5682d2bf8175aa513379997)
* kirkwood: support for button in Pogoplug V4Sungbo Eo2020-07-101-1/+1
| | | | | | | | Pogoplug V4 has a reset button on a GPIO pin. To use it, kmod-gpio-button-hotplug package needs to be installed. Signed-off-by: Sungbo Eo <mans0n@gorani.run> (cherry picked from commit 91472dc2ce051d255eecb7fbba3484de917fa65d)
* lantiq: dts: Move the &usb_vbus nodes out of &gpioLuca Olivetti2020-07-104-48/+48
| | | | | | | | | | | | | | | | | | | | | | Move the USB VBUS regulator nodes out of the GPIO controller node. This fixes a problem where the "regulator-fixed" driver wasn't probed for these regulators because the GPIO driver doesn't scan the child-nodes and based on the dt-bindings documentation it's not supposed to. This fixed the following error reported by Luca Olivetti: ... dwc2 1e101000.usb: DWC OTG Controller dwc2 1e101000.usb: new USB bus registered, assigned bus number 1 dwc2 1e101000.usb: irq 62, io mem 0x1e101000 dwc2 1e101000.usb: startup error -517 dwc2 1e101000.usb: USB bus 1 deregistered dwc2 1e101000.usb: dwc2_hcd_init() FAILED, returning -517 Fixes: FS#1634 Cc: Luca Olivetti <luca@ventoso.org> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> [backported from 982468de35d499f85470b7b547d2b27cea53bae0] Signed-off-by: Luca Olivetti <luca@ventoso.org>
* ar71xx: Fix mikrotik NAND compile problemHauke Mehrtens2020-07-071-1/+1
| | | | | | | | | | | This fixes the following compile error: drivers/mtd/nand/rb91x_nand.c: In function 'rb91x_nand_remove': drivers/mtd/nand/rb91x_nand.c:445:16: error: 'rbni' undeclared (first use in this function) nand_release(&rbni->chip); Fixes: 9cad70044f75 ("kernel: fix nand_release() usage.") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 66e04abbb6d0dec8642be5deb2fca4bba470f8ac)
* ar71xx: Fix mikrotik NAND compile problemHauke Mehrtens2020-07-061-1/+1
| | | | | | | | There is one closing bracket too much. Fixes: 9cad70044f75 ("kernel: fix nand_release() usage.") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 014d3f593acea13ee6aa002d858f182806ed43f0)
* armvirt,x86: fix build breakage of crypto ccp modulePetr Štetiar2020-07-052-0/+2
| | | | | | | | | | | Upstream in commit f9f8f0c24203 ("crypto: ccp -- don't "select" CONFIG_DMADEVICES") removed dependency on CONFIG_DMADEVICES symbol which leads to build breakage of ccp crypto module, so fix this by adding that symbol back in the kernel config. Fixes: f4985a22ca1b ("kernel: Update kernel 4.14 to version 4.14.187") Signed-off-by: Petr Štetiar <ynezz@true.cz> (cherry picked from commit 472b8fc91bbab0530d72e9780a482bacc1bbe5f7)
* kernel: fix nand_release() usage.Hauke Mehrtens2020-07-047-13/+12
| | | | | | | | nand_release() takes nand_chip since commit 5bcfcbfc4019 ("mtd: rawnand: Pass a nand_chip object to nand_release()") Fixes: f4985a22ca1b ("kernel: Update kernel 4.14 to version 4.14.187") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: Update kernel 4.14 to version 4.14.187Hauke Mehrtens2020-07-0450-181/+103
| | | | | | | | | | Fixes: - CVE-2020-10757 Run tested: ath79, ipq40xx Build tested: ath79, ipq40xx Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* build: refactor JSON info files to `profiles.json`Paul Spooren2020-06-301-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JSON info files contain machine readable information of built profiles and resulting images. These files were added in commit 881ed09ee6e2 ("build: create JSON files containing image info"). They are useful for firmware wizards and script checking for reproducibility. Currently all JSON files are stored next to the built images, resulting in up to 168 individual files for the ath79/generic target. This patch refactors the JSON creation to store individual per image (not per profile) files in $(BUILD_DIR)/json_info_files and create an single overview file called `profiles.json` in the target directory. Storing per image files and not per profile solves the problem of parallel file writes. If a profiles sysupgrade and factory image are finished at the same time both processes would write to the same JSON file, resulting in randomly broken outputs. Some target like x86/64 do not use the image code yet, resulting in missing JSON files. If no JSON info files were created, no `profiles.json` files is created as it would be empty anyway. As before, this creation is enabled by default only if `BUILDBOT` is set. Tested via buildroot & ImageBuilder on ath79/generic, imx6 and x86/64. Signed-off-by: Paul Spooren <mail@aparcar.org> [json_info_files dir handling in Make, if case refactoring] Signed-off-by: Petr Štetiar <ynezz@true.cz> (backported from commit 07449f692ce4c4525e946401f4c3ed0cbbc8c4df) Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: do not build TP-Link tiny images by defaultAdrian Schmutzler2020-06-281-0/+2
| | | | | | | | | | | | | | | For quite some time, the tiny (4M flash) TP-Link sysupgrade and factory images cannot be built anymore by the buildbots, just the initramfs-kernel.bin files are still there. Disable these images for the buildbots and don't waste build resources. Note that these devices still build fine with default settings, just not with the additional packages and config symbols for the buildbots. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* mediatek: fix IPv4-only corner case and commit in 99-net-psAdrian Schmutzler2020-06-281-1/+4
| | | | | | | | | | | | | | | | | The uci config section network.globals set up in /bin/config_generate will only be created if /proc/sys/net/ipv6 exists. Correspondingly, lacking IPv6 support, the command uci set network.globals.packet_steering=1 will fail with "uci: Invalid argument" as the network.globals config has not been set up. Fix that by adding the setup there as well. While at it, limit the uci commit to the network config file. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 636b62e8e232951154ac4ccd7972fda3f8de0379)
* bcm63xx: DGND3700v1: fix port orderDaniel González Cabanelas2020-06-281-4/+4
| | | | | | | | | | Fix the switch LAN labels for the DGND3700v1/DGND3800B router, the order is reversed. Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com> [cut out of bigger patch, adjust commit title/message accordingly] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 583b3e40254076693eb5227a9d9ae49eb2b0bcbf)
* ramips: increase SPI frequency for ELECOM WRC-GST devicesINAGAKI Hiroshi2020-06-281-1/+1
| | | | | | | | | | | | Increase the SPI frequency for ELECOM WRC-1900GST and WRC-2533GST to 40 MHz by updating the common DTSI file. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> [WRC-1900GST] Acked-by: NOGUCHI Hiroshi <drvlabo@gmail.com> [split patch, adjust commit title/message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit b5ae70d0530d1a733816f921ae0fe4dd58251fbb)
* mvebu: fix default EU regdomain for Linksys WRT AC devicesJose Olivera2020-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | The mwlwifi driver sets the default country code for EU (fi- rmware region code 0x30) certified devices to FR (France), not DE (Germany). Whilst this is a trivial fix, novice users may not know how mwlwifi negatively reacts to a non-matching country code and may leave the setting alone. Especially si- nce it is under the advanced settings section in LuCI. Relevant mwlwifi driver code: https://github.com/kaloz/mwlwifi/commit/0a550312ddb5a9e00e8d602d5571598f25a78158 The mwlwifi driver readme states "Please don't change country code and let mwlwifi set it for you." However, OpenWrt's current behaviour does not adhere to this with its default, 'just flashed from factory' setting for EU devices. Signed-off-by: Jose Olivera <oliverajeo@gmail.com> [rebase, extend commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit d0e8b8310f7079ccf250f7eddbdf8b9d319c274d)
* ath79: drop and consolidate redundant chosen/bootargsAdrian Schmutzler2020-06-2850-190/+12
| | | | | | | | | | | | | | | | | In ath79, for several SoCs the console bootargs are defined to the very same value in every device's DTS. Consolidate these definitions in the SoC dtsi files and drop further redundant definitions elsewhere. The only device without any bootargs set has been OpenMesh OM5P-AC V2. This will now inherit the setting from qca955x.dtsi While this is a cosmetic change, backporting it to 19.07 will be a major help for anyone doing backports of device support. Without it, every backporter would have to remember to manually add the chosen node to the device's DTS. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 635f111148c3f7ccb0ecc92863a3b1a142f6ebeb)
* ath79: add support for TP-Link TL-WA801ND v3/v4Adrian Schmutzler2020-06-216-0/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ports support for these devices from ar71xx. Specification: - System-On-Chip: Qualcomm Atheros QCA9533 - CPU/Speed: v3: 560 MHz, v4: 650 MHz - Flash: 4096 KiB - RAM: 32 MiB - Ethernet: 1 port @ 100M - Wireless: SoC-integrated: QCA9533 2.4GHz 802.11bgn In contrast to the implementation in ar71xx (reset and WiFi button), the device actually features reset and WPS buttons. Flashing instructions: Upload the ...-factory.bin file via OEM web interface. TFTP Recovery: 1. Set PC to fixed IP address 192.168.0.66 2. Download *-factory.bin image and rename it to wa801ndv3_tp_recovery.bin 3. Start a tftp server with the image file in its root directory 4. Turn off the router 5. Press and hold Reset button 6. Turn on router with the reset button pressed and wait ~15 seconds 7. Release the reset button and after a short time the firmware should be transferred from the tftp server 8. Wait ~30 second to complete recovery. TFTP recovery has only been tested with v3, and the Wiki states that the procedure won't work for v4, which cannot be verified or falsified at the moment. Tested by Tim Ward (see forum): https://forum.openwrt.org/t/ath79-support-for-tp-link-tl-wa901nd-v3-v4-v5/61246/13 Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 9a477b833ab2aea96b9eee55acb5f9e7b01b36d8)
* bcm63xx: a226m-fwb: fix linux partition offsetDaniel González Cabanelas2020-06-151-4/+4
| | | | | | | | | | | | | | | | | | | The Pirelli A226M-FWB has a wrong linux partition offset, caused by a copy-paste error. As of result of this, OpenWrt is currently broken in this unit. Fix it. While at it, also use generic node names and fix the addresses there as well. Fixes: a27d59bb4274 ("brcm63xx: switch to new partition layout specification") Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com> [also fix/update node names, extend commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit d64d5ed1425f4397d093c8777ca03f70ff1ee90c)
* ipq40xx: essedma: Disable TCP segmentation offload for IPv6Sven Eckelmann2020-06-131-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | It was noticed that the the whole MAC can hang when transferring data from one ar40xx port (WAN ports) to the CPU and from the CPU back to another ar40xx port (LAN ports). The CPU was doing only NATing in that process. Usually, the problem first starts with a simple data corruption: $ wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.4.0-amd64-netinst.iso -O /dev/null ... Connecting to saimei.ftp.acc.umu.se (saimei.ftp.acc.umu.se)|2001:6b0:19::138|:443... connected. ... Read error at byte 48807936/352321536 (Decryption has failed.). Retrying. But after a short while, the whole MAC will stop to react. No traffic can be transported anymore from the CPU port from/to the AR40xx PHY/switch and the MAC has to be resetted. The whole problem can be avoided by disabling IPv6 TSO for this ethernet MAC driver. Signed-off-by: Sven Eckelmann <sven@narfation.org> Acked-by: John Crispin <john@phrozen.org> (backported from commit 678569505623e50bbbbc344c7e820fb315b79ede, with updated commit message) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ath79: wndr3700 series: fix wifi range & throughputChristian Lamparter2020-06-092-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds ar71xx's GPIO setup for the 2.4GHz and 5GHz antennae demultiplexer: | 158 /* 2.4 GHz uses the first fixed antenna group (1, 0, 1, 0) */ | 159 ap9x_pci_setup_wmac_gpio(0, (0xf << 6), (0xa << 6)); | 160 | 161 /* 5 GHz uses the second fixed antenna group (0, 1, 1, 0) */ | 162 ap9x_pci_setup_wmac_gpio(1, (0xf << 6), (0x6 << 6)); This should restore the range and throughput of the 2.4GHz radio on all the derived wndr3700 variants and versions with the AR7161 SoC. A special case is the 5GHz radio. The original wndr3700(v1) will benefit from this change. However the wndr3700v2 and later revisions were unaffected by the missing bits, as there is no demultiplexer present in the later designs. This patch uses gpio-hogs within the device-tree for all wndr3700/wndr3800/wndrmac variants. Notes: Based on the PCB pictures, the WNDR3700(v1) really had eight independent antennae. Four antennae for each radio and all of those were printed on the circut board. The WNDR3700v2 and later have just six antennae. Four of those are printed on the circuit board and serve the 2.4GHz radio. Whereas the remaining two are special 5GHz Rayspan Patch Antennae which are directly connected to the 5GHz radio. Hannu Nyman dug pretty deep and unearthed a treasure of information regarding the history of how these values came to be in the OpenWrt archives: <https://dev.archive.openwrt.org/ticket/6533.html>. Mark Mentovai came across the fixed antenna group when he was looking into the driver: fixed_antenna_group 1, (0, 1, 0, 1) fixed_antenna_group 2, (0, 1, 1, 0) fixed_antenna_group 3, (1, 0, 0, 1) fixed_antenna_group 4, (1, 0, 1, 0) Fixes: FS#3088 Reported-by: Luca Bensi Reported-by: Maciej Mazur Reported-by: Hannu Nyman <hannu.nyman@iki.fi> Debugged-by: Hannu Nyman <hannu.nyman@iki.fi> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (cherry picked from commit 61307544d1f1ab81a2eb3a200164456c59308d81)
* oxnas: build with 8021Q VLAN supportDaniel Golle2020-06-091-1/+0
| | | | | | | | | CONFIG_VLAN_8021Q was explicitely disabled in oxnas kernel config. Don't do that, so VLANs can be used on the target. Fixes: dcc34574ef ("oxnas: bring in new oxnas target") Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit fd0cc72d9ceba6d4dc315c7f0e52d6513023f669)
* ath79: add support for TP-Link TL-WR802N V1 and V2Lech Perczak2020-06-036-2/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specification: - SoC: Qualcomm Atheros QCA9533 (560 MHz, MIPS 24Kc) - RAM: 32 MiB - Storage: 4 MiB of Flash on board - Wireless: Built into QCA9533 (Honey Bee), PHY modes b/g/n - Ethernet: 1x100M (port0) Installation through OEM Web Interface: - Connect to TL-WR802N by Ethernet or Wi-Fi - Go to web interface: [V1] http://192.168.0.1 [V2] http://192.168.0.254 Default user is "admin" & password is "admin". On V2, there is no DHCP server running by default, so remember to set IP manually. - Go to "System Tools -> Firmware Upgrade" - Browse for firmware: [V1] "*.factory.bin" [V2] "*.factory-us.bin" or "*.factory-eu.bin" for eu model Web interface may complain if filename is too long. In such case, rename .bin to something shorter. - Click upgrade Installation through tftp: Note: T_OUT, T_IN and GND on the board must be connected to USB TTL Serial Configuration 115200 8n1 - Boot the TL-WR802N - When "Autobooting in 1 seconds" appears type "tpl" followed by enter - Connect to the board Ethernet port (IPADDR: 192.168.1.1, ServerIP: 192.168.1.10) - tftpboot 0x80000000 <Firmware Image Name> - Record the result of "printenv bootcmd" - Enter "erase <Result of 'printenv bootcmd'> +0x3c0000" (e.g erase 0x9f020000 +0x3c0000) - Enter "cp.b 0x80000000 <Result of 'printenv bootcmd'> 0x3c0000" (e.g cp.b 0x80000000 0x9f020000 0x3c0000) - Enter "bootm <Result of 'printenv bootcmd'>" (e.g bootm 0x9f020000) Notes: When porting from ar71xx target to ath79, I found out that on V2, reset button is on GPIO12 and active low, instead of GPIO11 and active high. By cross-flashing V1 firmware to V2, I confirmed the same is true for V1. Also according to manual of V1, this one also has green LED instead of blue - both of those issues were fixed accordingly. The MAC address assignment has been checked with OEM firmware. Installation manual based on ar71xx support by Thomas Roberts Signed-off-by: Lech Perczak <lech.perczak@gmail.com> [slightly adjust commit message, add MAC address comment] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 7e513136c63108bf55b38be4d2b65aa00b0d2b26)
* ath79: update WA/XC devices UBNT_VERSION to 8.5.3Roger Pueyo Centelles2020-06-031-2/+2
| | | | | | | | | | | | | | | Ubiquiti WA devices with newer hw version 2011K require UBNT_VERSION to be at least 8.5.3, otherwise the image is rejected: New ver: WA.ar934x.v8.5.0-42.OpenWrt-r10947-65030d81f3 Versions: New(525568) 8.5.0, Required(525571) 8.5.3 Invalid version 'WA.ar934x.v8.5.0-42.OpenWrt-r10947-65030d81f3' For consistency, also increase version number for XC devices. Tested-by: Pedro <pedrowrt@cas.cat> Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> (cherry picked from commit 95caa3436d98dac3709e550765f3f86d11a99782)
* ipq806x: EA8500 fix boot partition detectionSamantha Collard2020-06-031-2/+0
| | | | | | | | Remove extraneous code that disabled boot partition detection. Fixes: b3770eaca39f ("mtd: base-files: Unify dual-firmware devices (Linksys)") Signed-off-by: Samantha Collard <sammyrc34@gmail.com> (cherry picked from commit 0f910a8c4c03d92e399dd79dbc5d707eb03b22df)
* ath79: fix LEDs for GL.inet GL-AR150Adrian Schmutzler2020-06-032-12/+10
| | | | | | | | | | | | | | | | | | Since the wireless LED was used for boot and set up with a DT trigger, the WiFi indication hasn't worked on ath79 at all. In addition, a look into the manual revealed that the OEM configuration is as follows: LED 1 (green): power LED 2 (green): configurable LED 3 (red): wireless So, let's just keep the WiFi trigger and convert the rest to its "intended" use. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 705fe43522c756962589b360141d4c398363ce1c)
* ar71xx: fix reset key for TP-Link TL-WR802N V1/V2Lech Perczak2020-06-011-2/+2
| | | | | | | | | | | | | | | | | | | During porting support for this router to ath79 target it was discovered that GPIO mapping was incorrect (GPIO11 active high). Correct mapping for both V1 and V2 is GPIO12 active low. Default configuration from GPL source for V2 explicitly states this, and this was confirmed experimentally on ath79 by looking on /sys/kernel/debug/gpio. Correctness of this was also validated for V1 by cross-flashing vendor firmware for V1 on V2 hardware, in which reset button also worked. Fix it. Signed-off-by: Lech Perczak <lech.perczak@gmail.com> [slightly adjust commit title] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit f841e706403b1a111cbb6dc5930b7886307bf633)
* generic: fix flow table hw offloadJohn Crispin2020-06-011-15/+18
| | | | | | | | | Make the driver work with recent upstream changes. Fixes: FS#2632 Ref: https://github.com/openwrt/openwrt/pull/2815 Signed-off-by: John Crispin <john@phrozen.org> (cherry picked from commit 6786dc26a205da55ec2d9771693cdfb99e756e59)
* ar71xx: correct button type for TL-MR3020 mode sliderDavid Bauer2020-05-311-2/+2
| | | | | | | | | | | | | | | The TP-Link TL-MR3020 has a three-state mode slider which was previously integrated as a button (EV_KEY). This led to spurious activations of failsafe mode. Set the type for the button to switch (EV_SW), to avoid unintended activations of failsafe mode. Related: commit 27f3f493de06 ("gpio-button-hotplug: unify polled and interrupt code") Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit b017a016cc0cd26f84a7e6b8de3dc02dc101e888)
* ar71xx: fix splitting firmware partition for TL-WR902AC v1Adrian Schmutzler2020-05-301-0/+2
| | | | | | | | | | | | | The -O option for the tplink-v1-header was missing for the TP-Link TL-WR902AC v1, while safeloader and MTDPARTS where set up with a single firmware partition. This led to bootloops after using sysupgrade. Fixes: FS#3118 Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit a7b07f8ba880895f0d235a63729dd189cb2410a7)
* ramips: gsw_mt7621: disable PORT 5 MAC RX/TX flow control by defaultPetr Štetiar2020-05-261-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Looking at the current upstream driver implementation, it seems like the TX/RX flow control is enabled only if the flow control pause option is resolved from the device/link partner advertisements (or otherwise set). On the other hand, our current in-tree driver force enables TX/RX flow control by default, thus possibly leading to TX timeouts if the other end sends pause frames (which are not properly handled?): WARNING: CPU: 3 PID: 0 at net/sched/sch_generic.c:320 dev_watchdog+0x1ac/0x324 NETDEV WATCHDOG: eth0 (mtk_soc_eth): transmit queue 0 timed out Disabling the flow control on PORT 5 MAC seems to fix this issues as the pause frames are then filtered out. While at it, I'm removing the if condition completely as suggested, since this code is run only on mt7621 SoC, so there is no need to check for the silicon revisions. Ref: https://lists.openwrt.org/pipermail/openwrt-devel/2017-November/009882.html Ref: https://forum.openwrt.org/t/mtk-soc-eth-watchdog-timeout-after-r11573/50000/12 Suggested-by: Felix Fietkau <nbd@nbd.name> Reported-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Petr Štetiar <ynezz@true.cz> (cherry picked from commit c8f8e59816eca49d776562d2d302bf990a87faf0)
* brcm47xx: disable Netgear WNR2000 v2 by defaultJo-Philipp Wich2020-05-241-0/+1
| | | | | | | | | | Disable the Netgear WNR2000 v2 image by default as the device has insufficient flash space for release build images. Ref: https://forum.openwrt.org/t/devices-too-big-to-save-overlay/18161/72 Signed-off-by: Jo-Philipp Wich <jo@mein.io> [drop change on netgear-wnr3500l-v1-na] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for TP-Link TL-WA901ND v4 and v5Adrian Schmutzler2020-05-208-69/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ports support for the TL-WA901ND v4 and v5 from ar71xx to ath79. They are similar to the TP9343-based TL-WR940N v3/v4 and TL-WR941ND v6. Specifications: SoC: TP9343 Flash/RAM: 4/32 MiB CPU: 750 MHz WiFi: 2.4 GHz b/g/n Ethernet: 1 port (100M) Flashing instructions: Upload the factory image via the vendor firmware upgrade option. Flash instruction (TFTP): 1. Set PC to fixed ip address 192.168.0.66 2. Download *-factory.bin image and rename it to * (see below) 3. Start a tftp server with the image file in its root directory 4. Turn off the router 5. Press and hold Reset button 6. Turn on router with the reset button pressed and wait ~15 seconds 7. Release the reset button and after a short time the firmware should be transferred from the tftp server 8. Wait ~30 second to complete recovery. * The image name for TFTP recovery is wa901ndv4_tp_recovery.bin for both variants. In ar71xx, a MAC address with offset 1 was used for ethernet port. That's probably wrong, but this commit sticks to it until we know the correct value. Like in ar71xx, this builds the default factory.bin with EU country code. Thanks to Leonardo Weiss for testing on the v5. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (backported from commit 4a61a88f9006f70444e00699f76551c75f73c14e)
* ath79: add support for TP-Link TL-WA701ND/730RE/801ND/901ND v1Adrian Schmutzler2020-05-208-1/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the various clones of the TL-WA830RE recently supported in fb99ac6807f2 ("ath79: add support for TP-Link TL-WA830RE v1"): - tplink,tl-wa701nd-v1 - tplink,tl-wa730re-v1 - tplink,tl-wa801nd-v1 - tplink,tl-wa830re-v1 (already supported) - tplink,tl-wa901nd-v1 Since these devices are 100%-clones in ar71xx, this patch adds all of them without run-testing (as this has been done for TL-WA830RE v1). Specifications: - SOC: Atheros AR7240 - CPU: 400MHz - Flash: 4 MiB (Spansion S25FL032P) - RAM: 32 MiB (Zentel A3S56D40FTP-G5) - WLAN: Atheros AR9280 bgn 2x2 - Ethernet: 1 port (100M) Flash instructions: - install from u-boot with tftp (requires serial access) > setenv ipaddr a.b.c.d > setenv serverip e.f.g.h > tftpboot 0x80000000 \ openwrt-ath79-tiny-tplink_tl-waxxxxx-v1-squashfs-factory.bin > erase 0x9f020000 +0x3c0000 > cp.b 0x80000000 0x9f020000 0x3c0000 > bootm 0x9f020000 - flash factory image from OEM WebUI - sysupgrade from ar71xx image Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (backported from commit 2f1cc5c3d5e35d6aa76e794e3d5b4f5856cd38bc)
* ath79: add support for TP-Link TL-WR940N v6Adrian Schmutzler2020-05-204-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TL-WR940N v6 is similar to v3/v4, it just has different LEDs and MAC address assignment. Specification: - 750 MHz CPU - 32 MB of RAM - 4 MB of FLASH - 2.4 GHz WiFi - 4x 10/100 Mbps Ethernet The use of LEDs is based on ar71xx, so blue LED is used for WAN and orange LED for diag (boot/failsafe/etc.). Flash instruction (WebUI): Download *-factory.bin image and upload it via the firmwary upgrade function of the stock firmware WebUI. Flash instruction (TFTP): 1. Set PC to fixed ip address 192.168.0.66 2. Download *-factory.bin image and rename it to wr940nv6_tp_recovery.bin 3. Start a tftp server with the image file in its root directory 4. Turn off the router 5. Press and hold Reset button 6. Turn on router with the reset button pressed and wait ~15 seconds 7. Release the reset button and after a short time the firmware should be transferred from the tftp server 8. Wait ~30 second to complete recovery. Thanks to Manuel Kock for reviewing and testing this patch. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: Manuel Kock <github.web@manu.li> (backported from commit fbd00bb8d406a0ace7ea9c49a79cbad2418689a5)
* ath79: add support for TP-Link TL-WA830RE v1Christian Buschau2020-05-206-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ports support for the TL-WA830RE v1 range extender from ar71xx to ath79. Specifications: - SOC: Atheros AR7240 - CPU: 400MHz - Flash: 4 MiB (Spansion S25FL032P) - RAM: 32 MiB (Zentel A3S56D40FTP-G5) - WLAN: Atheros AR9280 bgn 2x2 - Ethernet: 1 port (100M) Flash instructions: - install from u-boot with tftp (requires serial access) > setenv ipaddr a.b.c.d > setenv serverip e.f.g.h > tftpboot 0x80000000 \ openwrt-ath79-tiny-tplink_tl-wa830re-v1-squashfs-factory.bin > erase 0x9f020000 +0x3c0000 > cp.b 0x80000000 0x9f020000 0x3c0000 > bootm 0x9f020000 - flash factory image from OEM WebUI - sysupgrade from ar71xx image The device seems to be a clone of the following devices not yet added to ath79: - tl-wa701nd-v1 - tl-wa730re-v1 - tl-wa801nd-v1 - tl-wa901nd-v1 Signed-off-by: Christian Buschau <christian.buschau@mailbox.org> [make use of ar7240_tplink.dtsi, add note about clones] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit fb99ac6807f29eb5fe50271eff711e7415038731)
* ath79: reorganize DTSI for ar7240 TP-Link devicesAdrian Schmutzler2020-05-208-46/+57
| | | | | | | | | | | | | | | | | The current set of TP-Link devices with ar7240 SoC all share the same DTSI file. As the latter is very similar to the definition required for the to-be-supported TP-Link TL-WA devices with ar7240, this patch splits the definitions into a shared part for all TP-Link devices (ar7240_tplink.dtsi) and a file containing the specific setup for the present TL-WR devices (ar7240_tplink_tl-wr.dtsi), equivalent to the former ar7240_tplink_tl-wr74xn-v1.dtsi. While at it, remove unused firmware partition label and rename pinmux_switch_led_pins. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 273e00c4a506c076dddfc51c3c00d4523496f5f4)
* ath79: migrate TP-Link TL-MR3420v2 to ath79Lim Guo Wei2020-05-204-20/+226
| | | | | | | | | | | | | | | | | | | | | | | Specifications: - SoC: ar9341 - RAM: 32M - Flash: 4M - Ethernet: 5x FE ports - WiFi: ar9341-wmac Flash instruction: Upload generated factory firmware on vendor's web interface. This changes the key assignment compared to ar71xx support of this device, since of the two keys on the device one is used as combined Reset/WPS and the second one as WiFi on/off button. Despite, the reset button required GPIO_ACTIVE_HIGH to work correctly. Signed-off-by: Lim Guo Wei <limguowei@gmail.com> [redo commit message] Signed-off-by: Chuanhong Guo <gch981213@gmail.com> (backported from commit e7ab1b517397fdf6613f4682b7a752649841f7cd) Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for TP9343-based TP-Link TL-WR94x devicesAdrian Schmutzler2020-05-208-0/+290
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for several TP-Link devices based on TP9343 ("a QCA9561 without PCIe and USB"): - TL-WR940N v3 - TL-WR940N v4 - TL-WR941ND v6 The devices are only different concerning LEDs and MAC address assignment. All TL-WR940 are with non-detachable antennas (N), all TL-WR941 devices are with detachable antennas (ND). Specification: - 750 MHz CPU - 32 MB of RAM - 4 MB of FLASH - 2.4 GHz WiFi - 4x 10/100 Mbps Ethernet Flash instruction (WebUI): Download *-factory.bin image and upload it via the firmwary upgrade function of the stock firmware WebUI. Flash instruction (TFTP): 1. Set PC to fixed ip address 192.168.0.66 2. Download *-factory.bin image and rename it to * (see below) 3. Start a tftp server with the image file in its root directory 4. Turn off the router 5. Press and hold Reset button 6. Turn on router with the reset button pressed and wait ~15 seconds 7. Release the reset button and after a short time the firmware should be transferred from the tftp server 8. Wait ~30 second to complete recovery. * TFTP image names: 940 v3: wr941ndv6_tp_recovery.bin 940 v4: wr940nv4_tp_recovery.bin 941 v6: wr941ndv6_tp_recovery.bin Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (backported picked from commit c02b9818a51ab189be11218e626e9cad2c21ec94)
* generic: platform/mikrotik: disambiguate SPDX-License-IdentifierThibaut VARÈNE2020-05-203-3/+3
| | | | | | | I meant it to be GPL-2.0-only, as evidenced by the boilerplate. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> (cherry picked from commit 6934b20912d308854b7adf63a7098d38bf67d153)
* ramips: drop non-existant ralink,port-map for Ravpower WD03Adrian Schmutzler2020-05-191-1/+0
| | | | | | | | | | | The property "ralink,port-map" has been obsolete long before this device was added, and the device is a one-port anyway. Just remove it. Fixes: 5ef79af4f80f ("ramips: add support for Ravpower WD03") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit c00b2df6c8e421ea7aa96f53178dc85db99f2305)
* bcm63xx: mask interrupts on initÁlvaro Fernández Rojas2020-05-181-0/+12
| | | | | | | | Fixes BCM6348/BCM6358 hangs while booting: https://bugs.openwrt.org/index.php?do=details&task_id=2202 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> (cherry picked from commit 13c33f3f121ca6fe2ab1f80e04cf2d4f2cd6abec)
* bcm63xx: periph_intc: report effective affinityDaniel Gonzalez Cabanelas2020-05-181-0/+20
| | | | | | | | | | | | | The bcm6345-periph-intc driver only targets a single CPU at a time, even if the notional affinity is wider. Let's inform the core code about this. This patch gets rid of the kernel message: "genirq: irq_chip bcm6345-periph-intc did not update eff. affinity mask of irq 52" Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> (cherry picked from commit e04ff3c7cc52c23f5b40730ee426710e22940d68)
* bcm63xx: ext_intc: fix warningÁlvaro Fernández Rojas2020-05-181-0/+28
| | | | | | | | | | | | | | | | | | In file included from ./arch/mips/include/asm/io.h:34, from ./arch/mips/include/asm/mmiowb.h:5, from ./include/linux/spinlock.h:60, from ./include/linux/irq.h:14, from drivers/irqchip/irq-bcm6345-ext.c:10: drivers/irqchip/irq-bcm6345-ext.c: In function 'bcm6345_ext_intc_of_init': ./arch/mips/include/asm/mach-bcm63xx/ioremap.h:48:9: warning: 'base' may be used uninitialized in this function [-Wmaybe-uninitialized] return is_bcm63xx_internal_registers((unsigned long)addr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/irqchip/irq-bcm6345-ext.c:255:16: note: 'base' was declared here void __iomem *base; ^~~~ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> (cherry picked from commit 29c3bb5f413f0962971c66e6516b8409a78e0135)
* bcm63xx: periph_intc: fix warningÁlvaro Fernández Rojas2020-05-181-0/+20
| | | | | | | | | | drivers/irqchip/irq-bcm6345-periph.c: In function 'bcm6345_periph_irq_handle': drivers/irqchip/irq-bcm6345-periph.c:55:21: warning: 'block' may be used uninitialized in this function [-Wmaybe-uninitialized] struct intc_block *block; ^~~~~ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> (cherry picked from commit f2f2cf07a61e9c170ab8d65e1e054f0131a84e2a)
* bcm63xx: redboot: fix warningÁlvaro Fernández Rojas2020-05-181-1/+1
| | | | | | | | | | drivers/mtd/parsers/redboot.c: In function 'parse_redboot_partitions': drivers/mtd/parsers/redboot.c:194:59: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses] fis_origin = (buf[i].flash_base & (master->size << 1) - 1); ~~~~~~~~~~~~~~~~~~~~^~~ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> (cherry picked from commit f314cbe54be4d90e748e18ae5e9fb00d5fd31c91)
* bcm63xx: bcm6362: fix pinctrl bugÁlvaro Fernández Rojas2020-05-181-0/+11
| | | | | Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> (cherry picked from commit ee6bf7e865510ff1e0645b08bec65f8212ed70d4)
* bcm63xx: refresh kernel configÁlvaro Fernández Rojas2020-05-181-1/+3
| | | | Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* generic: platform/mikrotik: fix LZOR supportThibaut VARÈNE2020-05-161-21/+36
| | | | | | | | | | | | | 31e99fe3da which introduced this code was unfortunately untested. This commit fixes a number of issues and works around the fact that in this particular scheme, the LZO payload may be padded at the end which will trigger a harmless lzo decompression error. This commit also disambiguates the debug printks. Tested-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> Fixes: 31e99fe3da ("generic: platform/mikrotik: support LZOR encoding") (cherry picked from commit 2ea481193c1654c9cb42aa0331cdbc4570783e26)
* ar71xx: remove hard-coded folder name from Mikrotik RB upgradeAdrian Schmutzler2020-05-121-1/+6
| | | | | | | | | | | | | | | So far, specifying "BOARD_NAME := routerboard" is required by the upgrade code of Mikrotik NAND devices, as "sysupgrade-routerboard" is hardcoded in platform_do_upgrade_mikrotik_rb(). This patch replaces the latter with a grep for the name like it is already done in nand_upgrade_tar() in /lib/upgrade/nand.sh. This should enable upgrades from ar71xx to ath79 without setting BOARD_NAME for the latter. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (backported from commit 281785d74fcc70153c0741be36ee1f9d05e74f6f)
* ar71xx: mikrotik: mach-rbspi.c remove wlan idThibaut VARÈNE2020-05-121-7/+7
| | | | | | | Following on the previous commit, this patch removes useless id argument from rbspi_wlan_init(). Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ar71xx: mikrotik: bypass id check in __rb_get_wlan_data()Thibaut VARÈNE2020-05-121-7/+3
| | | | | | | | | | | | | | | | | | | The id parameter in __rb_get_wlan_data() was incorrectly used on the assumption that id "0" would always be tied to ath9k with RLE encoding and positive id (in fact, only id "1" was valid) would always be tied to ("external") ath10k with LZO encoding. Newer hardware revisions of supported devices prove this assumption to be invalid, with ath9k caldata being now wrapped in MAGIC_ERD and LZO compressed, so disable this check to allow newer hardware to correctly decode caldata for ath9k. Since ath10k caldata is no longer pulled from this implementation, this commit also disables the publication in sysfs to avoid wasting memory. Note: this patch assumes that ath9k caldata is never stored with the new "LZOR" encoding scheme found on some ath10k devices. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>