aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx
Commit message (Collapse)AuthorAgeFilesLines
* ar71xx: add support for UniFi-AC-Mesh-ProChristoph Krapp2018-12-155-8/+21
| | | | | | | | | | | | | | | | | This adds the build option for UniFi AC Mesh Pro as well as model detection for it. The device is a hardware clone of the AC Pro. - SoC: QCA9563-AL3A (775Mhz) - RAM: 128MiB - Flash: 16MiB - dual firmware partitions! - LAN: 2x 1000M - POE+ - Wireless: 2.4G: QCA9563 5G: UniFi Chip, QCA988X compatible Signed-off-by: Christoph Krapp <achterin@googlemail.com> (cherry picked from commit 987b961537b7002eda21df97dd8bfebe8882bc6d)
* ar71xx: fix TP-Link Archer C7 v5 switch LEDsRinki Kumari2018-11-171-3/+15
| | | | Signed-off-by: Rinki Kumari <rinki13@gmail.com>
* kernel: bump 4.9 to 4.9.134Koen Vandeputte2018-10-191-5/+5
| | | | | | | | | Refreshed all patches. Compile-tested on: ar71xx Runtime-tested on: ar71xx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ar71xx: fix mtd corruptionFabio Bettoni2018-10-172-3/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 9e1530b2a35e ("kernel: bump 4.9 to 4.9.117 for 18.06") [1], the following patch for removed: - 403-mtd_fix_cfi_cmdset_0002_status_check.patch This patch contained fixes for both write and erase functions. While the chip-detects for erase got fixed upstream [2], some modifications are still required, even with the fixes applied. Not doing so results in following errors seen: Collected errors: * pkg_write_filelist: Failed to open //usr/lib/opkg/info/luci-lib-ip.list: I/O error. * opkg_install_pkg: Failed to extract data files for luci-lib-ip. Package debris may remain! * opkg_install_cmd: Cannot install package luci-ssl. * opkg_conf_write_status_files: Can't open status file //usr/lib/opkg/status: I/O error. [ 0.780920] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc. [ 8.406396] jffs2: notice: (415) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found. [ 8.423476] mount_root: switching to jffs2 overlay [ 270.902671] jffs2: Write of 1989 bytes at 0x005ce6f8 failed. returned -5, retlen 962 [ 270.931965] jffs2: Write of 1989 bytes at 0x005ceec0 failed. returned -5, retlen 0 [ 270.939631] jffs2: Not marking the space at 0x005ceec0 as dirty because the flash driver returned retlen zero [ 270.950397] jffs2: Write of 68 bytes at 0x005ceec0 failed. returned -5, retlen 0 [ 270.957838] jffs2: Not marking the space at 0x005ceec0 as dirty because the flash driver returned retlen zero [ 270.968584] jffs2: Write of 68 bytes at 0x005ceec0 failed. returned -5, retlen 0 [ 270.976027] jffs2: Not marking the space at 0x005ceec0 as dirty because the flash driver returned retlen zero [ 270.986735] jffs2: Write of 68 bytes at 0x005ceec0 failed. returned -5, retlen 0 [ 270.994225] jffs2: Not marking the space at 0x005ceec0 as dirty because the flash driver returned retlen zero [1] https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=fec8fe806963c96a6506c2aebc3572d3a11f285f [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v4.9.133&id=a0239d83e1cb60de5e78452d4708c083b9e3dcbe Fixes: 9e1530b2a35e ("kernel: bump 4.9 to 4.9.117 for 18.06") Signed-off-by: Fabio Bettoni <fbettoni@gmail.com> Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ar71xx: Fix installation of fw_setenv in sysupgrade ramdiskSven Eckelmann2018-10-072-6/+6
| | | | | | | | | | | | The install_bin from /lib/upgrade/common.sh is no longer creating the symlinks when a secondary parameter is added. But the fw_setenv program was always copied this way to the ramdisk for the upgrade. Instead, just install fw_setenv and let install_bin handle the detection of the required dependencies. Fixes: 438dcbfe74a6 ("base-files: automatically handle paths and symlinks for RAMFS_COPY_BIN") Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
* ar71xx: flag FritzBox 4020 buttons as active lowDavid Bauer2018-10-021-2/+2
| | | | | | | | | | Buttons of AVM FritzBox 4020 are incorrectly flagged as active high. This was an oversight as RFKill button was working as expected even with incorrectly flagged GPIO. Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit cd02d4faf981bd4de0427cd23812b41192635d82)
* kernel: bump 4.9 to 4.9.130Koen Vandeputte2018-10-021-2/+2
| | | | | | | | | Refreshed all patches. Compile-tested on: ar71xx Runtime-tested on: ar71xx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: bump 4.9 to 4.9.129Koen Vandeputte2018-09-261-20/+0
| | | | | | | | | | | | Refreshed all patches. Removed upstreamed: - 203-MIPS-ath79-fix-restart.patch Compile-tested on: ar71xx Runtime-tested on: ar71xx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: bump 4.9 to 4.9.125Koen Vandeputte2018-09-072-14/+8
| | | | | | | | | Refreshed all patches. Compile-tested on: ar71xx Runtime-tested on: ar71xx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ar71xx: allow to override at803x sgmii aneg statusDavid Bauer2018-09-032-0/+43
| | | | | | | | | | | | | | When checking the outcome of the PHY autonegotiation status, at803x currently returns false in case the SGMII side is not established. Due to a hardware-bug, ag71xx needs to fixup the SoCs SGMII side, which it can't as it is not aware of the link-establishment. This commit allows to ignore the SGMII side autonegotiation status to allow ag71xx to do the fixup work. Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit 4e39e213af7e3e0cd747403e8c227e145cfef988)
* ar71xx: fix QCA955X SGMII link lossDavid Bauer2018-09-035-0/+127
| | | | | | | | | | | | | | | | | | | | The QCA955X is affected by a hardware bug which causes link-loss of the SGMII link between SoC and PHY. This happens on change of link-state or speed. It is not really known what causes this bug. It definitely occurs when using a AR8033 Gigabit Ethernet PHY. Qualcomm solves this Bug in a similar fashion. We need to apply the fix on a per-device base via platform-data as performing the fixup work will break connectivity in case the SGMII interface is connected to a Switch. This bug was first proposed to be fixed by Sven Eckelmann in 2016. https://patchwork.ozlabs.org/patch/604782/ Based-on-patch-by: Sven Eckelmann <sven.eckelmann@open-mesh.com> Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit f4f99ec9737c653815268f2efad0210caaa32e2d)
* kernel: bump 4.9 to 4.9.124Koen Vandeputte2018-08-281-5/+5
| | | | | | | | | Refreshed all patches. Compile-tested on: ar71xx Runtime-tested on: ar71xx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ar71xx: WNR612v2: fix kernel panic due to wrong Wifi LED initMichal Cieslakiewicz2018-08-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Netgear WNR612v2 flashed with recent OpenWrt builds suffers from kernel panic at boot during wireless chip initialization, making device unusable: ath: phy0: Ignoring endianness difference in EEPROM magic bytes. ath: phy0: Enable LNA combining CPU 0 Unable to handle kernel paging request at virtual address 1000fee1, epc == 801d08f0, ra == 801d0d90 Oops[#1]: CPU: 0 PID: 469 Comm: kmodloader Not tainted 4.9.120 #0 [ ... register dump etc ... ] Kernel panic - not syncing: Fatal exception Rebooting in 1 seconds.. This simple patch fixes above error. It keeps LED table in memory after kernel init phase for ath9k driver to operate correctly (__initdata removed). Also, another bug is fixed - correct array size is provided to function that adds platform LEDs (this device has only 1 connected to Wifi chip) preventing code from going outside array bounds. Fixes: 1f5ea4eae46e ("ar71xx: add correct named default wireless led by using platform leds") Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl> [trimmed commit message] Signed-off-by: Mathias Kresin <dev@kresin.me>
* ar71xx/generic: enable Zyxel NBG6616 in kernel config againMatthias Schiffer2018-08-271-0/+1
| | | | | | | | | The NBG6616 shares a config symbol with the NBG6716. It was accidentally removed from the config when the ar71xx-tiny target was split off. Fixes: 0cd5e85e7ad6 ("ar71xx: create new ar71xx/tiny subtarget for 4MB flash devices") Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> (cherry picked from commit a4f4ddba61e61d3f15d19c4e57733a9e44ec8d09)
* kernel: bump 4.9 to 4.9.118Koen Vandeputte2018-08-081-1/+1
| | | | | | | | | | Refreshed all patches. Compile-tested on: ar71xx Runtime-tested on: ar71xx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com> (backported from commit f7036a34ace38b701243e9357d7f509f8a66f0b1)
* kernel: bump 4.9 to 4.9.117 for 18.06Stijn Segers2018-08-066-106/+14
| | | | | | | | | | | | | | | | | | | | | | | * Refreshed patches. * Removed patches: - target/linux/ar71xx/patches-4.9/103-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch superseded by upstream - target/linux/ar71xx/patches-4.9/403-mtd_fix_cfi_cmdset_0002_status_check.patch superseded by upstream - target/linux/brcm63xx/patches-4.9/001-4.11-01-mtd-m25p80-consider-max-message-size-in-m25p80_read.patch accepted upstream - target/linux/brcm63xx/patches-4.9/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch accepted upstream - target/linux/brcm63xx/patches-4.9/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch accepted upstream - target/linux/generic/pending-4.9/900-gen_stats-fix-netlink-stats-padding.patch * New backported patch to address ext4 breakage, introduced in 4.9.112: - backport-4.9/500-ext4-fix-check-to-prevent-initializing-reserved-inod.patch Also add ARM64_SSBD symbol to ARM64 targets still running kernel 4.9 Thanks to Koen Vandeputte for pointing out the need to add the ARM64_SSBD symbol, and the ext4 patch. Compile-tested on: ar71xx Run-tested on: ar71xx Signed-off-by: Stijn Segers <foss@volatilesystems.org>
* kernel: re-add patch for AT8032 Ethernet PHYDaniel Golle2018-07-311-4/+4
| | | | | | | | | | | The patch was wrongly removed by a kernel version bump to 4.9.106 in the believe that it was merged upstream thow it wasn't. This lead to unrecoverable link losses on devices which use those PHYs such as many ubnt single-port CPEs. Fixes: 6f8eb1b50f ("kernel: bump 4.9 to 4.9.106 for 18.06") Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit a497e47762)
* Revert "ar71xx: define switch for rb-952ui-5ac2nd"Jo-Philipp Wich2018-07-301-2/+2
| | | | | | | | | This reverts commit 3442ec5d5724ca747c9f76b949dc8d21c94228c0. The device behaviour is reportedly erratic so let's not take chances and leave this out for now. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* ar71xx: define switch for rb-952ui-5ac2ndThibaut VARÈNE2018-07-301-2/+2
| | | | | | | | QCA9533 built-in switch can be configured Tested-by: Thibaut VARÈNE <hacks@slashdirt.org> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> (cherry picked from commit 0e43c31ebde996ca88f5857bb7e6c4cbf3f65756)
* ar71xx:add support for E750G v8张鹏2018-07-3012-2/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qxwlan E750G v8 is based on Qualcomm QCA9344. Specification: - 560/450/225 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 8/16 MB of FLASH (SPI NOR) - 2T2R 2.4G GHz (AR9344) - 2x 10/100 Mbps Ethernet (PoE support) - 2x 10/100/1000 Mbps Ethernet - 7x LED (6 driven by GPIO) - 1x button (reset) - 1x DC jack for main power input (9-48 V) - UART (J23) and LEDs (J2) headers on PCB Flash instruction (using U-Boot CLI and tftp server): - Configure PC with static IP 192.168.1.10 and tftp server. - Rename "sysupgrade" filename to "firmware.bin" and place it in tftp server directory. - Connect PC with one of RJ45 ports, power up the board and press "enter" key to access U-Boot CLI. - Use the following command to update the device to OpenWrt: "run lfw". Flash instruction (using U-Boot web-based recovery): - Configure PC with static IP 192.168.1.xxx(2-254)/24. - Connect PC with one of RJ45 ports, press the reset button, power up the board and keep button pressed for around 6-7 seconds, until LEDs start flashing. - Open your browser and enter 192.168.1.1, select "sysupgrade" image and click the upgrade button. Signed-off-by: 张鹏 <sd20@qxwlan.com> (cherry picked from commit 53a45020135b504cb4bee0fa8d98c8eaf6391066)
* ar71xx:add support for E750A v4张鹏2018-07-3011-1/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qxwlan E750A v4 is based on Qualcomm QCA9344. Specification: - 560/450/225 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 8/16 MB of FLASH (SPI NOR) - 2T2R 5G GHz (AR9344) - 2x 10/100 Mbps Ethernet (one port with PoE support) - 1x miniPCIe slot (USB 2.0 bus only) - 7x LED (6 driven by GPIO) - 1x button (reset) - 1x DC jack for main power input (9-48 V) - UART (J23) and LEDs (J2) headers on PCB Flash instruction (using U-Boot CLI and tftp server): - Configure PC with static IP 192.168.1.10 and tftp server. - Rename "sysupgrade" filename to "firmware.bin" and place it in tftp server directory. - Connect PC with one of RJ45 ports, power up the board and press "enter" key to access U-Boot CLI. - Use the following command to update the device to OpenWrt: "run lfw". Flash instruction (using U-Boot web-based recovery): - Configure PC with static IP 192.168.1.xxx(2-254)/24. - Connect PC with one of RJ45 ports, press the reset button, power up the board and keep button pressed for around 6-7 seconds, until LEDs start flashing. - Open your browser and enter 192.168.1.1, select "sysupgrade" image and click the upgrade button. Signed-off-by: 张鹏 <sd20@qxwlan.com> (cherry picked from commit ac03d51a3f4daa2f6a2a83f041dcd71674a9f724)
* ar71xx:add support for E558 v2张鹏2018-07-3012-0/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qxwlan E558 v2 is based on Qualcomm QCA9558 + AR8327. Specification: - 720/600/200 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 8/16 MB of FLASH (SPI NOR) - 2T2R 2.4 GHz (QCA9558) - 3x 10/100/1000 Mbps Ethernet (one port with PoE support) - 4x miniPCIe slot (USB 2.0 bus only) - 1x microSIM slot - 5x LED (4 driven by GPIO) - 1x button (reset) - 1x 3-pos switch - 1x DC jack for main power input (9-48 V) - UART (JP5) and LEDs (J8) headers on PCB Flash instruction (using U-Boot CLI and tftp server): - Configure PC with static IP 192.168.1.10 and tftp server. - Rename "sysupgrade" filename to "firmware.bin" and place it in tftp server directory. - Connect PC with one of RJ45 ports, power up the board and press "enter" key to access U-Boot CLI. - Use the following command to update the device to OpenWrt: "run lfw". Flash instruction (using U-Boot web-based recovery): - Configure PC with static IP 192.168.1.xxx(2-254)/24. - Connect PC with one of RJ45 ports, press the reset button, power up the board and keep button pressed for around 6-7 seconds, until LEDs start flashing. - Open your browser and enter 192.168.1.1, select "sysupgrade" image and click the upgrade button. Signed-off-by: 张鹏 <sd20@qxwlan.com> (cherry picked from commit b74f63f81d6121b5eace3f0c0c87399f7e0fde92)
* ar71xx: rbspi: fix RB wAP AC gpio conflict and LEDThibaut VARÈNE2018-07-302-11/+9
| | | | | | | | | | | | | | | | e15c63a37574bd15ce3a6636c2f04741ab76f7b9 introduced code that was trying to register GPIO 1 as both an LED and a button. The OEM source makes it clear that LED1 is not wired to the SoC GPIOs. GPIO 1 is the reset button. Furthermore the (green) power led default state should also be defined, (matching OEM source), and it should be used by diag.sh since it's currently the only software-controllable LED. This patch fixes these issues and renames the corresponding #defines for clarity Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> (cherry picked from commit e99f760235bb45716018faab52d31ce8165f49a0)
* ar71xx: add missing diag LED support for RB wAP 2nDThibaut VARÈNE2018-07-301-1/+2
| | | | | | | | 3b15eb06c366cf3805590a61f22e966a95bf8101 did not include diag.sh edit Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> (cherry picked from commit 5c2419b6f82e2ec49ecac17ae17fdbdb151701c7)
* kernel: bump 4.9 to 4.9.110 for 18.06Stijn Segers2018-07-021-1/+1
| | | | | | Compile-tested on ar71xx. Signed-off-by: Stijn Segers <foss@volatilesystems.org>
* ar71xx: Add support for TP-Link CPE210 v2Adrian Schmutzler2018-06-236-11/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR adds support for a popular low-cost 2.4GHz N based AP Specifications: - SoC: Qualcomm Atheros QCA9533 (650MHz) - RAM: 64MB - Storage: 8 MB SPI NOR - Wireless: 2.4GHz N based built into SoC 2x2 - Ethernet: 1x 100/10 Mbps, integrated into SoC, 24V POE IN Installation: Flash factory image through stock firmware WEB UI or through TFTP To get to TFTP recovery just hold reset button while powering on for around 4-5 seconds and release. Rename factory image to recovery.bin Stock TFTP server IP:192.168.0.100 Stock device TFTP adress:192.168.0.254 Notes: TP-Link does not use bootstrap registers so without this patch reference clock detects as 40MHz while it is actually 25MHz. This is due to messed up bootstrap resistor configuration on the PCB. Provided GPL code just forces 25MHz reference clock. That causes booting with completely wrong clocks, for example, CPU tries to boot at 1040MHz while the stock is 650MHz. So this PR depends on PR #672 to remove 40MHz reference clock. Thanks to Sven Eckelmann <sven@narfation.org> for properly patching that. Signed-off-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 5c5bf8b8658a588423f6ec445d7ef6a36f99a396)
* ar71xx: Add TP-Link Pharos v2 board detectionAdrian Schmutzler2018-06-232-14/+33
| | | | | | | | | | | Add support for detecting TP-Link Pharos v2 boards. They use different format in product-info partition than v1 boards. Code was written mostly by Alexander Couzens <lynxis@fe80.eu> Signed-off-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 2524febf7927a1bf430d64b7790feb126023e3d1)
* ar71xx: add support for TP-LINK Archer C7 v5Arvid E. Picciani2018-06-219-1/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link Archer C7 v5 is a dual-band AC1750 router, based on Qualcomm/Atheros QCA9563+QCA9880. Specification: - 750/400/250 MHz (CPU/DDR/AHB - 128 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz - 3T3R 5 GHz - 5x 10/100/1000 Mbps Ethernet - 10x LED, 2x button - UART header on PCB Flash instruction: 1. Upload lede-ar71xx-generic-archer-c7-v5-squashfs-factory.bin via Web interface Flash instruction using TFTP recovery: 1. Set PC to fixed ip address 192.168.0.66 2. Download lede-ar71xx-generic-archer-c7-v5-squashfs-factory.bin and rename it to ArcherC7v5_tp_recovery.bin 3. Start a tftp server with the file tp_recovery.bin 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. Signed-off-by: Arvid E. Picciani <aep@exys.org> (cherry picked from commit bf39d5594b3c8f9409e6d9408a1f370c9f18d0dd)
* ar71xx: add support for Fritz!WLAN Repeater 450EDavid Bauer2018-06-2113-1/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the AVM Fritz!WLAN Repeater 450E SOC: Qualcomm QCA9556 (Scorpion) 560MHz MIPS74Kc RAM: 64MB Zentel A3R12E40CBF DDR2 FLASH: 16MiB Winbond W25Q128 SPI NOR WLAN1: QCA9556 2.4 GHz 802.11b/g/n 3x3 INPUT: WPS button LED: Power, WiFi, LAN, RSSI indicator Serial: Header Next to Black metal shield Pinout is 3.3V - RX - TX - GND (Square Pad is 3.3V) The Serial setting is 115200-8-N-1. Tested and working: - Ethernet - 2.4GHz WiFi (correct MAC) - Installation via EVA bootloader - OpenWRT sysupgrade - Buttons - Most LEDs Not working: - 2 RSSI LEDs AVM used for RSSI{0,1} two of the Ethernet PHYs LEDs which they control over MDIO. Our driver doesn't expose these LEDs as GPIOs. While it is possible to implement this feature, it would require an additional kernel patch for a minor functionality. Installation via EVA: In the first seconds after Power is connected, the bootloader will listen for FTP connections on 192.168.178.1. Firmware can be uploaded like following: ftp> quote USER adam2 ftp> quote PASS adam2 ftp> binary ftp> debug ftp> passive ftp> quote MEDIA FLSH ftp> put openwrt-sysupgrade.bin mtd1 Note that this procedure might take up to two minutes. You need to powercycle the Device afterwards to boot OpenWRT. Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit b4bf43c66767648f98494dd5f44e1301024b577c)
* ar71xx: add support for OCEDO KoalaDavid Bauer2018-06-2113-0/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the OCEDO Koala SOC: Qualcomm QCA9558 (Scorpion) RAM: 128MB FLASH: 16MiB WLAN1: QCA9558 2.4 GHz 802.11bgn 3x3 WLAN2: QCA9880 5 GHz 802.11nac 3x3 INPUT: RESET button LED: Power, LAN, WiFi 2.4, WiFi 5, SYS Serial: Header Next to Black metal shield Pinout is 3.3V - GND - TX - RX (Arrow Pad is 3.3V) The Serial setting is 115200-8-N-1. Tested and working: - Ethernet - 2.4 GHz WiFi - 5 GHz WiFi - TFTP boot from ramdisk image - Installation via ramdisk image - OpenWRT sysupgrade - Buttons - LEDs Installation seems to be possible only through booting an OpenWRT ramdisk image. Hold down the reset button while powering on the device. It will load a ramdisk image named 'koala-uImage-initramfs-lzma.bin' from 192.168.100.8. Note: depending on the present software, the device might also try to pull a file called 'koala-uimage-factory'. Only the name differs, it is still used as a ramdisk image. Wait for the ramdisk image to boot. OpenWRT can be written to the flash via sysupgrade or mtd. Due to the flip-flop bootloader which we not (yet) support, you need to set the partition the bootloader is selecting. It is possible from the initramfs image with > fw_setenv bootcmd run bootcmd_1 Afterwards you can reboot the device. Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit e36f8b3f3980903d5cefc51fe274c19c7a0719f2)
* ar71xx: fix incorrect speed setting on QCA9556David Bauer2018-06-211-3/+17
| | | | | | | | | | The QCA9556 only has a SGMII interface. However the speed on the ethernet link is set for the non-existant xMII interface. This commit fixes this behavior. Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit abb4ab076f37961a4dcaef4e87167b834f84e44e)
* ar71xx: add kmod-usb-ehci to fix USB on RB hAP ACThomas Nixon2018-06-181-1/+1
| | | | | Signed-off-by: Thomas Nixon <tom@tomn.co.uk> (cherry picked from commit bb71a3f27efb4140c47e98b933bdb64384cbcbbf)
* ar71xx: Fix offset to WMAC address for 8devices LimaSven Eckelmann2018-06-181-3/+1
| | | | | | | | | | | | | | | | | | | The ART partition of the Lima board stores exactly three mac addresses: * 0x0: eth0 * 0x6: eth1 * 0x1002: wmac The first two are correctly assigned in the mach file but the latter points to 0x800. But this position is set to ff:ff:ff:ff:ff:ff. Luckily, the driver falls back in ath9k_hw_init_macaddr to the EEPROM mac address when it doesn't find a valid mac address in the platform_data. Remove this bogus offset to the ART partition to directly load the wmac via the EEPROM data in the ART partition. Signed-off-by: Sven Eckelmann <sven@narfation.org> (cherry picked from commit 4f6320704f7e37368a1dae2deba767a73b3bf121)
* kernel: bump 4.9 to 4.9.108 for 18.06Koen Vandeputte2018-06-181-1/+1
| | | | | | | | | Refreshed all patches Compile-tested on: ar71xx Runtime-tested on: ar71xx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ar71xx: use Power-LED as Diag-LED on FRITZBox 4020David Bauer2018-06-092-1/+1
| | | | | | | This commit makes use of the Power-LED as Diag-LED, allowing the LED to work as a status indicator. Signed-off-by: David Bauer <mail@david-bauer.net>
* ar71xx: fix AVM package selectionDavid Bauer2018-06-091-2/+2
| | | | | | | The AVM package selection partially broke with the addition of the FRITZ!Box 4020. This commit restores the intended behavior. Signed-off-by: David Bauer <mail@david-bauer.net>
* ar71xx: fix USB switch to mPCIE for Mikrotik rb91x boardsKoen Vandeputte2018-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices like the Mikrotik RB912 only have 1 USB port which is shared between an USB A type port, and the mini PCIe socket. Toggling a gpio selects the output to which USB is connected. Since kernel 4.9, gpio base is rounded up to a value of 32. Commit 65da6f9ca164 ("ar71xx: fix secondary gpio controller base values") accounts correctly for that. In this commit, rb912 sees it's value changed from AR934X_GPIO_COUNT (23) to 32 This means that the USB toggle gpio number actually also changes from 52 to 61. But .. Some of these GPIO numbers are also used in other locations, like the boardfile. The author forgot to also change them over there. Switching the USB port to mPCIe now shows my modem is correctly discovered again: [ 2863.864471] usb 1-1: new high-speed USB device number 4 using ehci-platform [ 2864.055303] usb 1-1: config 1 has an invalid interface number: 8 but max is 3 [ 2864.062728] usb 1-1: config 1 has no interface number 1 [ 2864.074567] qcserial 1-1:1.0: Qualcomm USB modem converter detected [ 2864.081474] usb 1-1: Qualcomm USB modem converter now attached to ttyUSB0 [ 2864.111960] qcserial 1-1:1.2: Qualcomm USB modem converter detected [ 2864.118976] usb 1-1: Qualcomm USB modem converter now attached to ttyUSB1 [ 2864.139808] qcserial 1-1:1.3: Qualcomm USB modem converter detected [ 2864.146777] usb 1-1: Qualcomm USB modem converter now attached to ttyUSB2 [ 2864.165276] qmi_wwan 1-1:1.8: cdc-wdm0: USB WDM device [ 2864.171879] qmi_wwan 1-1:1.8 wwan0: register 'qmi_wwan' at usb-ehci-platform-1, WWAN/QMI device, 02:00:44:ed:3b:11 Fixes: 65da6f9ca164 ("ar71xx: fix secondary gpio controller base values") Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com> Cc: Robin Leblon <robin.leblon@ncentric.com> Cc: Felix Fietkau <nbd@nbd.name> (cherry picked from commit 55b4b1eba0af6d2240f48eb93d68fb2e9ff41b08)
* kernel: bump 4.9 to 4.9.106 for 18.06Stijn Segers2018-06-072-33/+4
| | | | | | | | | | | Refreshed patches. The following patches were upstreamed and have been deleted: * target/linux/ar71xx/patches-4.9/106-01-MIPS-ath79-fix-AR724X_PLL_REG_PCIE_CONFIG-offset.patch * target/linux/generic/pending-4.9/180-net-phy-at803x-add-support-for-AT8032.patch * target/linux/generic/pending-4.9/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch * target/linux/generic/pending-4.9/182-net-qmi_wwan-add-BroadMobi-BM806U-2020-2033.patch Signed-off-by: Stijn Segers <foss@volatilesystems.org>
* ar71xx: switch CPE/WBS 210/510 to okli-loaderMatthias Schiffer2018-06-061-1/+4
| | | | | | | | | | | | | | | | | | | | | We recently increased the kernel partition size of the CPE/WBS 210/510. This works fine for new installations of the factory image, but on sysupgrades, the partition table read by the bootloader is not adjusted. This limits the maximum size of the kernel loaded by the bootloader to the old partition size. While adjusting the partition table would be a cleanest solution, such a migration would have to happen before an upgrade to a new version with a newer kernel. This is error-prone and would require a two-step upgrade, as we mark the partition table partition read-only. Instead, switch from the lzma-loader with embedded kernel to the okli-loader, so only the tiny lzma-loader is loaded by the bootloader as "kernel", and the lzma-loader will then load the rest of the kernel by itself. Fixes: e39847ea2f70 ("ar71xx: increase kernel partition size for CPE/WBS 210/510") Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* ar71xx: make loader-okli build step more genericMatthias Schiffer2018-06-061-2/+3
| | | | | | Add support for different loader types. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* ar71xx: lzma-loader: constify kernel argv arrayMatthias Schiffer2018-06-061-1/+1
| | | | | | | By making the kernel argv array const, the .data section can always be omitted from the laoder binary. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* ar71xx: lzma-loader: set page size to 4KBMatthias Schiffer2018-06-061-1/+1
| | | | | | | | The text section in the ELF loader is aligned to the maximum page size, which defaults to 64KB. Reduce it to the actual page size to avoid wasting flash space for this alignment. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* ar71xx: lzma-loader: move padding workaround to gzip stepMatthias Schiffer2018-06-062-2/+5
| | | | | | | | | | | | | | | | | | | | | | | Some devices (TP-Link TL-WR1043ND v1) don't boot reliably when the uncompressed loader is too small. This was workarounded in the loader by adding 512KB of padding to the .data section of the loader binary. This approach had two issues: - The padding was only working when .data was non-empty (otherwise the section would become NOBITS, omitting it in the binary). .data was only empty when no CMDLINE was set, leading to further workarounds like fe594bf90d09 ("ath79: fix loader-okli, lzma-loader"), and this workaround was only effective because a missing "const" led to the kernel argv being stored in .data instead of .rodata - The padding was not only added to the compressed .gz loader, but also uncompressed .bin and .elf loaders. The prevented embedding the kernel cmdline in the loader for non-gz loader types. To fix both issues, move the creation of the padding from the linker script to the gzip step. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* ar71xx: Add support for PISEN TS-D084Chuanhong Guo2018-05-2411-0/+117
| | | | | | | | | | | | | | | | | | | PISEN TS-D084 is an wireless router with a battery and integrated power supply based on Atheros AR9331. Specification: - 400/400/200 MHz (CPU/DDR/AHB) - 64 MB of RAM (DDR2) - 8 MB of FLASH (SPI NOR) - 1x 10/100 Mbps Ethernet - 1T1R 2.4 GHz (AR9331) - 1x USB 2.0 Flash instruction: The manufacturer are using exactly the same firmware header as TP-LINK TL-WR703N (including device ID!). Simply upload the factory firmware into WebUI and flashing is done. Signed-off-by: Chuanhong Guo <gch981213@gmail.com> (cherry picked from commit a789c0f49159c618d990541c23e00630f7296ebc)
* ar71xx: Fix build for dap-1330-a1 boardHauke Mehrtens2018-05-241-1/+1
| | | | | | | | | | | | | | | | | Using a version number of 16 character causes a buffer overflow in the version number overwriting the first bit of the signature in the mkdapimg2 tool. I am not sure if the version number should be null terminated or not. This patch reduces the size of the version number by removing the number of private commits from it. This was the original version number which caused problems: OpenWrt-r6727+10 Now it uses this version number: OpenWrt-r6727 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit ae8ff1c65c4ea4e0b2e1e8ef94fad87587d979bc)
* ar71xx: WNDR3700: enable RFKILL function for Wifi buttonMichal Cieslakiewicz2018-05-241-4/+4
| | | | | | | | | | | | | | | | | | Wifi button for WNDR3700 dual band routers has been renamed to "rfkill" and its emitted keycode changed to KEY_RFKILL. This allows OpenWrt/LEDE to support it 'out of the box' without additional tweaking. Until this patch, button had been sending BTN_2 keycode which was ignored by default (no action script present). To get expected behaviour of switching radios on and off, user had to manually rename/link 'rfkill' script to name 'BTN_2' in /etc/rc.button directory. This patch follows similar changes for other Netgear ar71xx routers, for example WNR2000v3. It applies cleanly to both latest trunk and 17.01 branch. Tested on WNDR3700v1. Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl> (cherry picked from commit 45dc530334d8694a962d0833432effd14fa5cc4a)
* kernel: bump 4.9 to 4.9.102 for 18.06Koen Vandeputte2018-05-244-12/+12
| | | | | | | | | | | Refreshed all patches Added new ARM64 symbol: ARM64_ERRATUM_1024718 Compile-tested on: ar71xx Runtime-tested on: ar71xx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ar71xx: fix and improve ALFA Network Tube2H supportPiotr Dymacz2018-05-091-1/+12
| | | | | | | | | Fix ART offset (make it universal for 8/16 MB versions of the board) and while at it, include also GPIO setup for h/w watchdog (EM6324QYSP5B). Fixes: FS#1532 Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ar71xx: add support for Fritz!Box 4020David Bauer2018-05-0714-6/+300
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the AVM Fritz!Box 4020 WiFi-router. SoC: Qualcomm Atheros QCA9561 (Dragonfly) 750MHz RAM: Winbond W971GG6KB-25 FLASH: Macronix MX25L12835F WiFi: QCA9561 b/g/n 3x3 450Mbit/s USB: 1x USB 2.0 IN: WPS button, WiFi button OUT: Power LED green, Internet LED green, WLAN LED green, LAN LED green, INFO LED green, INFO LED red UART: Header Next to Black metal shield Pinout is 3.3V - RX - TX - GND (Square Pad is 3.3V) The Serial setting is 115200-8-N-1. Tested and working: - Ethernet (LAN + WAN) - WiFi (correct MAC) - Installation via EVA bootloader - OpenWRT sysupgrade - Buttons - LEDs Not working: - USB port Installation via EVA: In the first seconds after Power is connected, the bootloader will listen for FTP connections on 169.254.157.1 (Might also be 192.168.178.1). Firmware can be uploaded like following: ftp> quote USER adam2 ftp> quote PASS adam2 ftp> binary ftp> debug ftp> passive ftp> quote MEDIA FLSH ftp> put openwrt-sysupgrade.bin mtd1 Note that this procedure might take up to two minutes. After transfer is complete you need to powercycle the device to boot OpenWRT. Signed-off-by: David Bauer <mail@david-bauer.net>
* ar71xx: Add userspace support for Mikrotik rb-2011iLSSimon Paterson2018-04-306-0/+10
| | | | | | | | | | Kernel support already present. Patch adds userspace for the 'iLS' suffix model of the RB2011 family. Enables correct initial switch settings, sysupgrade, etc. https://mikrotik.com/product/RB2011iLS-IN Signed-off-by: Simon Paterson <simon.paterson.nz@gmail.com>