aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq40xx
Commit message (Collapse)AuthorAgeFilesLines
* kernel: bump 5.4 to 5.4.32Petr Štetiar2020-04-141-1/+1
| | | | | | | | | | | Refreshed patches, removed upstreamed patches: generic: 746-stable-net-dsa-mt7530-fix-null-pointer-dereferencing-in-por.patch Run tested: qemu-x86-64, apalis Build tested: x86/64, imx6, sunxi/a53 Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ipq40xx: add support for Cell C RTL30VWPawel Dembicki2020-04-109-2/+841
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cell C RTL30VW is a LTE router with tho gigabit ethernets and integrated QMI mPCIE modem. This is stripped version of ASKEY RTL0030VW. Hardware: Specification: -CPU: IPQ4019 -RAM: 256MB -Flash: NAND 128MB + NOR 16MB -WiFi: Integrated bgn/ac -LTE: mPCIe card (Modem chipset MDM9230) -LAN: 2 Gigabit Ports -USB: 2x USB2.0 -Serial console: RJ-45 115200 8n1 -Unsupported VoIP Known issues: None so far. Instruction install: There are two methods: Factory web-gui and serial + tftp. Web-gui: 1. Apply factory image via stock web-gui. Serial + initramfs: 1. Rename OpenWrt initramfs image to "image" 2. Connect serial console (115200,8n1) 3. Set IP to different than 192.168.1.11, but 24 bit mask, eg. 192.168.1.4. 4. U-Boot commands: sf probe && sf read 0x80000000 0x180000 0x10000 setenv serverip 192.168.1.4 set fdt_high 0x85000000 tftpboot 0x84000000 image bootm 0x84000000 5. Install sysupgrade image via "sysupgrade -n" Back to stock: All is needed is swap 0x4c byte in mtd8 from 0 to 1 or 1 to 0, do firstboot and factory reset with OFW: 1. read mtd8: dd if=/dev/mtd8 of=/tmp/mtd8 2. go to tmp: cd /tmp/ 3. write first part of partition: dd if=mtd8 of=mtd8.new bs=1 count=76 4. check which layout uses bootloader: cat /proc/mtd 5a. If first are kernel_1 and rootfs_1 write 0: echo -n -e '\x00' >> mtd8.new 5b. If first are kernel and rootfs write 1: echo -n -e '\x01' >> mtd8.new 6. fill with rest of data: dd if=mtd8 bs=1 skip=77 >> mtd8.new 7. CHECK IF mtd8.new HAVE CHANGED ONLY ONE BYTE! e.g with: hexdump mtd8.new 8. write new mtd8 to flash: mtd write mtd8.new /dev/mtd8 9. do firstboot 10.reboot 11. Do back to factory defaults in OFW GUI. Based on work: Cezary Jackiewicz <cezary@eko.one.pl> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
* ipq40xx: add support for MobiPromo CM520-79FDENG Qingfang2020-04-109-2/+737
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MobiPromo CM520-79F is an AC1300 dual band router based on IPQ4019 Specification: SoC/Wireless: QCA IPQ4019 RAM: 512MiB Flash: 128MiB SLC NAND Ethernet PHY: QCA8075 Ethernet ports: 1x WAN, 2x LAN LEDs: 7 LEDs 2 (USB, CAN) are GPIO other 5 (2.4G, 5G, LAN1, LAN2, WAN) are connected to a shift register Button: Reset Flash instruction: Disassemble the router, connect UART pins like this: GND TX RX [x x . . x .] [. . . . . .] (QCA8075 and IPQ4019 below) Baud-rate: 115200 Set up TFTP server: IP 192.168.1.188/24 Power on the router and interrupt the booting with UART console env backup (in case you want to go back to stock and need it there): printenv (Copy the output to somewhere save) Set bootenv: setenv set_ubi 'set mtdids nand0=nand0; set mtdparts mtdparts=nand0:0x7480000@0xb80000(fs); ubi part fs' setenv bootkernel 'ubi read 0x84000000 kernel; bootm 0x84000000#config@1' setenv cm520_boot 'run set_ubi; run bootkernel' setenv bootcmd 'run cm520_boot' setenv bootargs saveenv Boot initramfs from TFTP: tftpboot openwrt-ipq40xx-generic-mobipromo_cm520-79f-initramfs-fit-zImage.itb bootm After initramfs image is booted, backup rootfs partition in case of reverting to stock image cat /dev/mtd12 > /tmp/mtd12.bin Then fetch it via SCP Upload nand-factory.ubi to /tmp via SCP, then run mtd erase rootfs mtd write /tmp/*nand-factory.ubi rootfs reboot To revert to stock image, restore default bootenv in uboot UART console setenv bootcmd 'bootipq' printenv use the saved dump you did back when you installed OpenWrt to verify that there are no other differences from back in the day. saveenv upload the backed up mtd12.bin and run tftpboot mtd12.bin nand erase 0xb80000 0x7480000 nand write 0x84000000 0xb80000 0x7480000 The BOOTCONFIG may have been configured to boot from alternate partition (rootfs_1) instead In case of this, set it back to rootfs: cd /tmp cat /dev/mtd7 > mtd7.bin echo -ne '\x0b' | dd of=mtd7.bin conv=notrunc bs=1 count=1 seek=4 for i in 28 48 68 108; do dd if=/dev/zero of=mtd7.bin conv=notrunc bs=1 count=1 seek=$i done mtd write mtd7.bin BOOTCONFIG mtd write mtd7.bin BOOTCONFIG1 Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn> [renamed volume to ubi to support autoboot, as per David Lam's test in PR#2432] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: re-add LEDS_LP5523 for the ASUS Lyra MAP-AC2200Stefan Lippers-Hollmann2020-04-092-0/+2
| | | | | | | | | | | | | | This symbol had been enabled in the initial device support submission for kernel 4.14, but apparently got lost during the v4.19 port. The ASUS Lyra MAP-AC2200 has a single (very bright) rgb LED, which is controlled by the TI/National LP5523/55231 LED driver chip. It is left enabled in a pulsating infinite rainbow loop by the bootloader, expecting it to be reconfigured (disabled by default) after the boot process has finished and is also required to indicate failsafe/ firstboot conditions. Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* ipq40xx: fix DAP-2610 boot failurePetr Štetiar2020-03-311-0/+1
| | | | | | | | | | | | | Albert has reported, that his DAP-2610 wont boot with the latest snapshot and Fredrik has found out, that the device gets stuck at "Waiting for root device ..." due to missing 5.4 kernel config symbol CONFIG_MTD_SPLIT_WRGG_FW which was probably lost during the kernel version bump. Ref: https://forum.openwrt.org/t/dap-2610-bricked-help-needed Fixes: 272e0a702a2b ("ipq40xx: add v5.4 support") Suggested-by: Fredrik Olofsson <fredrik.olofsson@anyfinetworks.com> Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ipq40xx: switch to 5.4 kernelPetr Štetiar2020-03-281-1/+1
| | | | | | | 5.4.24 seems to be working fine on my zyxel,nbg6617, so let's start wider userbase testing. Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ipq40xx: wpj428: fix missing MDIO GPIO reset and pinmuxLeon M. George2020-03-282-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | The bootloader does not always initialize the MDIO pins before booting Linux. E.g. on version "U-Boot 2012.07 [Chaos Calmer 15.05.1,r35193] (Jul 25 2017 - 11:36:26)" this is the case when booting automatically without activating the U-Boot console. Without this change, the kernel boot will complain about missing PHYs: libphy: ipq40xx_mdio: probed ar40xx c000000.ess-switch: Probe failed - Missing PHYs! libphy: Fixed MDIO Bus: probed With this change it will work as expected: libphy: ipq40xx_mdio: probed ESS reset ok! ESS reset ok! libphy: Fixed MDIO Bus: probed Ref: GH-2835 Tested-by: Fredrik Olofsson <fredrik.olofsson@anyfinetworks.com> Signed-off-by: Leon M. George <leon@georgemail.eu> [commit description from Fredrik, subject facelift] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* treewide: omit IMAGE_SIZE argument from check-sizeSungbo Eo2020-03-211-7/+7
| | | | | | | | | Now that check-size uses IMAGE_SIZE by default, we can skip the argument from image recipes to reduce redundancy. Signed-off-by: Sungbo Eo <mans0n@gorani.run> [do not touch ar71xx] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: gather DEVICE_VARS into one placeSungbo Eo2020-03-211-3/+3
| | | | | | | | | | | Place DEVICE_VARS assignments at the top of the file or above Device/Default to make them easier to find. For ramips, remove redundant values already present in parent file. Signed-off-by: Sungbo Eo <mans0n@gorani.run> [do not touch ar71xx, extend commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: move TEO governor to generic configTomasz Maciej Nowak2020-03-171-1/+0
| | | | | | | | This new symbol popped up in few places. Disable it in generic config. Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl> [fixed merge conflict in generic/config-5.4] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* treewide: remove maintainer variable from targetsPetr Štetiar2020-03-161-1/+0
| | | | | | | | | | | | | There is no such role as target maintainer anymore, one should always send corresponding changes for the review and anyone from the commiters is allowed to merge them or eventually use the hand break and NACK them. Lets make it clear, that it is solely a community doing the maintenance tasks. Signed-off-by: Petr Štetiar <ynezz@true.cz> Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Acked-by: Piotr Dymacz <pepe2k@gmail.com>
* ipq40xx: 5.4: fix ethernet driverRobert Marko2020-03-161-29/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 5.4 kernel old u32 array way of setting network features was dropped and linkmode is now the only way. So lets migrate the EDMA driver to support linkmode. Also, old get/set settings API for ethtool is also dropped so lets convert to new ksettings API while at it as it demands linkmode. Now, gigabit works properly as well as ethtool. Previously you would get this in ethtool: root@OpenWrt:/# ethtool eth1 Settings for eth1: Supports Wake-on: d Wake-on: d Current message level: 0x00000000 (0) Link detected: yes Now, features are properly advertised: root@OpenWrt:/# ethtool eth1 Settings for eth1: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Advertised pause frame use: Symmetric Receive-only Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Link partner advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Link partner advertised pause frame use: No Link partner advertised auto-negotiation: No Link partner advertised FEC modes: Not reported Speed: 1000Mb/s Duplex: Full Port: Twisted Pair PHYAD: 4 Transceiver: internal Auto-negotiation: on MDI-X: Unknown Supports Wake-on: d Wake-on: d Current message level: 0x00000000 (0) Link detected: yes Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: 5.4: fix networking PHY driverRobert Marko2020-03-162-14/+3
| | | | | | | | In 5.4 kernel old u32 array way of setting network features was dropped and linkmode is now the only way. So lets migrate the PHY driver to support linkmode. Also, now in order for gigabit to work, PHY driver needs to advertise PHY_GBIT_FEATURES instead of PHY_BASIC_FEATURES Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: 5.4: fix of_get_mac_address obsolete usage OOPsPetr Štetiar2020-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of_get_mac_address returns valid pointer or ERR_PTR since 5.2 via commit d01f449c008a ("of_net: add NVMEM support to of_get_mac_address") so the patch fixes following OOPs on nbg6617: Unable to handle kernel paging request at virtual address ffffffed CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.4.24 #0 PC is at edma_axi_probe+0x444/0x1114 LR is at bus_find_device+0x88/0x9c Where the PC can be resolved to: >>> l *edma_axi_probe+0x444 0xc067be5c is in edma_axi_probe (./include/linux/string.h:378). >>> l *edma_axi_probe+0x43f 0xc067be57 is in edma_axi_probe (drivers/net/ethernet/qualcomm/essedma/edma_axi.c:936) Which leads to the following code fragment: 935 mac_addr = of_get_mac_address(pnp); 936 if (mac_addr) 937 memcpy(edma_netdev[idx_mac]->dev_addr, mac_addr, ETH_ALEN); Where using mac_addr=0xffffffed (-ENODEV) as source address in memcpy() is causing the OOPs. Acked-by: John Crispin <john@phrozen.org> Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ipq40xx: 5.4: enable NANDRobert Marko2020-03-151-0/+5
| | | | | | | | | | Lets enable RAW NAND and Qcom NANDC drivers again in kernel 5.4. They were dropped when 5.4 support was introduced due to upstream changing the symbol names so refreshing was not enough. Signed-off-by: Robert Marko <robert.marko@sartura.hr> [cut long line in commit message, enabled BCH as well] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* generic: 4.19: Add 4B_OPCODES flag to w25q256Robert Marko2020-03-121-27/+0
| | | | | | This patch backports the upstream patch that adds the 4B_OPCODES flag to w25q256 under 4.19 kernel. This is needed for ipq40xx and ramips. Signed-off-by: Robert Marko <robimarko@gmail.com>
* ipq40xx: Remove kernel 4.14 supportHauke Mehrtens2020-03-1281-22206/+0
| | | | | | | | | This target was switched to kernel 4.19 more than 6 months ago in commit f342ffd300da ("treewide: kernel: bump some targets to 4.19") and now with kernel 5.4 support being added it gets harder to support kernel 4.14 in addition to kernel 4.19 and 5.4. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* ipq40xx: replace ${} with $()Sungbo Eo2020-03-111-3/+3
| | | | | | ${} and $() are exactly the same. Follow the convention of using $(). Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ipq40xx: add cpximg to flash Compex WPJ428 via bootloaderLeon M. George2020-03-101-1/+18
| | | | | | | | | | | | | | | | | | | | | | Generate a cpximg that is compatible with the cpximg loader in Compex' u-boot. The cpximg loader can be started either by holding the reset button during power up or by entering the u-boot prompt and entering 'cpximg'. Once it's running, a TFTP-server under 192.168.1.1 will accept an image appropriate for the board revision that is etched on the board (e.g. 6A04). The image can be pushed using tftp: tftp -v -m binary 192.168.1.1 -c put openwrt-ipq40xx-generic-compex_wpj428-squashfs-cpximg-6a04.bin cpximg files can also be used with the sysupgrade utility in stock images. (add SSH key in luci for root access) In mkmylofw_32m, the calculation of the "partition size" has been preferred to just padding the partition as this will result in less block transfers during flashing (while the additional complexity is bearable). Signed-off-by: Leon M. George <leon@georgemail.eu> Co-developed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: 5.4: move some kconfig options to genericYousong Zhou2020-03-101-6/+0
| | | | | | | | | | | CONFIG_64BIT_TIME=y CONFIG_KASAN_STACK=1 CONFIG_UBSAN_ALIGNMENT=y CONFIG_UNIX_SCM=y CONFIG_DMA_DECLARE_COHERENT=y CONFIG_OF_RESERVED_MEM=y Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
* kernel: bump 5.4 to 5.4.24Koen Vandeputte2020-03-091-2/+2
| | | | | | | | | Refreshed all patches. Compile-tested on: imx6 Runtime-tested on: imx6 Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: bump 4.19 to 4.19.108Koen Vandeputte2020-03-092-5/+5
| | | | | | | | | Refreshed all patches. Compile-tested on: cns3xxx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: bump 4.14 to 4.14.172Koen Vandeputte2020-03-091-1/+1
| | | | | | | | | Refreshed all patches. Compile-tested on: cns3xxx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ipq40xx: add support for 8devices Habanero DVKRobert Marko2020-03-098-2/+763
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the 8devices Habanero development board. Specs are: CPU: QCA IPQ4019 RAM: DDR3L 512MB Storage: 32MB SPI-NOR and optional Parallel SLC NAND(Some boards ship with it and some without) WLAN1: 2.4 GHz built into IPQ4019 (802.11n) 2x2 WLAN2: 5 GHz built into IPO4019 (802.11ac Wawe-2) 2x2 Ethernet: 5x Gbit LAN (QCA 8075) USB: 1x USB 2.0 and 1x USB 3.0 (Both built into IPQ4019) MicroSD slot (Uses SD controller built into IPQ4019) SDIO3.0/EMMC slot (Uses the same SD controller) Mini PCI-E Gen 2.0 slot (Built into IPQ4019) 5x LEDs (4 GPIO controllable) 2x Pushbutton (1 is connected to GPIO, other to SoC reset) LCD ZIF socket (Uses the LCD controller built into IPQ4019 which has no driver support) 1x UART 115200 rate on J18 2x breakout development headers 12V DC Jack for power DIP switch for bootstrap configuration Installation instructions: Since boards ship with vendors fork of OpenWrt sysupgrade can be used. Signed-off-by: Robert Marko <robimarko@gmail.com>
* ipq40xx: add IPQ4019 SD/MMC controller supportRobert Marko2020-03-0917-22/+520
| | | | | | | | | | This commit finally adds support for the built in SD/MMC controller in IPQ4019 SoC. Controller is supported by the upstream SDHCI-MSM driver with a minor clock setting patch. Patch is special to the IPQ4019 and cannot be upstreamed. LDO and SDHCI node are upstreamed, and LDO node is awaiting to be accepted. Signed-off-by: Robert Marko <robimarko@gmail.com>
* ipq40xx: fix support of EnGenius EAP2200Adrian Schmutzler2020-03-053-21/+21
| | | | | | | | | | | | This fixes a typo in the device string for MAC address setup in 02_network and corrects the indent in the device's DTS files. While at it, move the aliases section before the keys section to have it closer to the top of the file. Fixes: a736d912e2ba ("ipq40xx: add support for EnGenius EAP2200") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: move commonly disabled symbols to generic configDavid Bauer2020-03-011-4/+0
| | | | | | | Move new commonly disabled kernel 5.4 symbols to the generic kernel configuration. Signed-off-by: David Bauer <mail@david-bauer.net>
* ipq40xx: 5.4: refresh patches and configChristian Lamparter2020-02-2823-206/+49
| | | | | | | | | | | This patch just refreshes the 5.4 patches. It seems as if 070-v4.20-soc-qcom-spm-add-SCM-probe-dependency.patch is already applied, so drop it. It also does a quick make kernel_oldconfig to get rid of unneeded symbols. [Looks like USB and Ethernet need some more work]. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: qce - add fixes for AES ciphersEneas U de Queiroz2020-02-2818-0/+1866
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This backports commits from master that fix AES ciphers when using the qce driver: - A couple of simple fixes for CTR and XTS modes used with AES: * 041-crypto-qce-fix-ctr-aes-qce-block-chunk-sizes.patch * 042-crypto-qce-fix-xts-aes-qce-key-sizes.patch - A fix for a bug that affected cases when there were more entries in the input sg list than necessary to actually encrypt, resulting in failure in gcm, where the authentication tag is present after the encryption data: * 043-crypto-qce-save-a-sg-table-slot-for-result-buf.patch - A fix to update the IV buffer passed to the driver from the kernel: * 044-crypto-qce-update-the-skcipher-IV.patch - A patch that reduces memory footprint and driver initialization by only initializing the fallback mechanism where it is actually used: * 046-crypto-qce-initialize-fallback-only-for-AES.patch - Three patches that make gcm and xts modes work with the qce driver, and improve performance with small blocks: * 047-crypto-qce-use-cryptlen-when-adding-extra-sgl.patch * 048-crypto-qce-use-AES-fallback-for-small-requests.patch * 049-crypto-qce-handle-AES-XTS-cases-that-qce-fails.patch - A patch that allows the hashes/ciphers to be built individually. * 051-crypto-qce-allow-building-only-hashes-ciphers.patch Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com> [renumbered patches, added patches from dropped commit, refreshed, 5.4] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: use neon crypto driversEneas U de Queiroz2020-02-282-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the neon based implementations of AES & SHA256. For AES, according to the kernel config help: Use a faster and more secure NEON based implementation of AES in CBC, CTR and XTS modes. Bit sliced AES gives around 45% speedup on Cortex-A15 for CTR mode and for XTS mode encryption, CBC and XTS mode decryption speedup is around 25%. (CBC encryption speed is not affected by this driver.) This implementation does not rely on any lookup tables so it is believed to be invulnerable to cache timing attacks. ... The observed speedups on ipq40xx are more modest: speedup is around 20% for CTR mode and for XTS mode encryption, CBC and XTS mode decryption speedup is around 10%. Measurements were made using tcrypt, with 1024-bytes blocks for CTR & CBC, and 4096-bytes for XTS. The aes-neon-bs driver uses a fallback for CBC encryption; that fallback could be either the generic driver written in C, or the scalar arm-asm one. Even though aes-arm is 1.9% slower, it is more resilient to timing attacks (the reason for being slower), so it is being included here. The neon sha256 module increases performance over the generic module by 33%. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com> [Enable only ciphers for now, reorder patch in series to help bisect as new symbols could lead to build failures, 5.4] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: qce - switch to skcipher APIEneas U de Queiroz2020-02-284-2/+1968
| | | | | | | | | This backports a commit updating the API of the QCE crypto engine to what is used in current kerenl, easing future upstream backports. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com> [renumber patches, refreshed, added 5.4 patches] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: add support for EnGenius EAP2200Steven Lin2020-02-2810-7/+599
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SOC: IPQ4019 / QCA Dakota CPU: Quad-Core ARMv7 Processor rev 5 (v7l) Cortex-A7 DRAM: 256 MiB FLASH: NOR 4 MiB + NAND 128 MiB ETH: Qualcomm Atheros QCA8072 WLAN1: Qualcomm Atheros QCA4019 2.4GHz 802.11bgn 2:2x2 WLAN2: Qualcomm Atheros QCA4019 5GHz 802.11a/n/ac 2:2x2 WLAN2: Qualcomm Atheros QCA9888 5GHz 802.11a/n/ac 2:2x2 INPUT: WPS Button LEDS: Power, LAN1, LAN2, WLAN 2.4GHz, WLAN 5GHz-1, WLAN 5GHz-2, OPMODE 1. Load Ramdisk via U-Boot To set up the flash memory environment, do the following: a. As a preliminary step, ensure that the board console port is connected to the PC using these RS232 parameters: * 115200bps * 8N1 b. Confirm that the PC is connected to the board using one of the Ethernet ports. c. Set a static ip 192.168.99.8 for Ethernet that connects to board. d. The PC must have a TFTP server launched and listening on the interface to which the board is connected. e. At this stage power up the board and, after a few seconds, press 4 and then any key during the countdown. U-BOOT> set serverip 192.168.99.9 && tftpboot 0x84000000 192.168.99.8:openwrt.itb && bootm Signed-off-by: Steven Lin <steven.lin@senao.com> [copied 4.19 dts to 5.4] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: add v5.4 supportJohn Crispin2020-02-2870-0/+18656
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* kernel: bump 4.19 to 4.19.105Koen Vandeputte2020-02-242-6/+6
| | | | | | | | | | | | | Refreshed all patches. Fixes: - CVE-2013-1798 - CVE-2019-3016 Compile-tested on: cns3xxx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: bump 4.14 to 4.14.171Koen Vandeputte2020-02-241-5/+5
| | | | | | | | | | | | Refreshed all patches. Fixes: - CVE-2013-1798 Compile-tested on: cns3xxx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: bump 4.19 to 4.19.101Koen Vandeputte2020-02-041-4/+4
| | | | | | | | | | | | | | | | | | Refreshed all patches. Fixes: - CVE-2019-14896 - CVE-2019-14897 Remove upstreamed: - 023-0007-crypto-crypto4xx-Fix-wrong-ppc4xx_trng_probe-ppc4xx_.patch - 950-0202-staging-bcm2835-camera-fix-module-autoloading.patch - 001-4.22-01-MIPS-BCM63XX-drop-unused-and-broken-DSP-platform-dev.patch Compile-tested on: cns3xxx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: bump 4.14 to 4.14.169Koen Vandeputte2020-02-041-4/+4
| | | | | | | | | | | | | | | | | Refreshed all patches. Fixes: - CVE-2019-14896 - CVE-2019-14897 Remove upstreamed: - 023-0007-crypto-crypto4xx-Fix-wrong-ppc4xx_trng_probe-ppc4xx_.patch - 001-4.22-01-MIPS-BCM63XX-drop-unused-and-broken-DSP-platform-dev.patch Compile-tested on: cns3xxx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ipq40xx: fix misplaced cells-sizes in WPJ419's dtsChristian Lamparter2020-01-261-2/+2
| | | | | | | | | | This patch fixes the occurences of the following warning message from the dtc: Warning (reg_format): /soc/spi@78b5000/flash0@0/partitions/partition@0:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: add support for EnGenius EMD1Yen-Ting-Shen2020-01-265-1/+261
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SOC: IPQ4018 / QCA Dakota CPU: Quad-Core ARMv7 Processor rev 5 (v7l) Cortex-A7 DRAM: 256 MiB NOR: 32 MiB ETH: Qualcomm Atheros QCA8072 (1 port) WLAN1: Qualcomm Atheros QCA4018 2.4GHz 802.11bgn 2:2x2 WLAN2: Qualcomm Atheros QCA4018 5GHz 802.11a/n/ac 2:2x2 INPUT: RESET Button LEDS: White, Blue, Red, Orange Flash instruction: From EnGenius firmware to OpenWrt firmware: In Firmware Upgrade page, upgrade your openwrt-ipq40xx-generic-engenius_emd1-squashfs-factory.bin directly. From OpenWrt firmware to EnGenius firmware: 1. Setup a TFTP server on your computer and configure static IP to 192.168.99.8 Put the EnGenius firmware in the TFTP server directory on your computer. 2. Power up EMD1. Press 4 and then press any key to enter u-boot. 3. Download EnGenius firmware (IPQ40xx) # tftpboot 0x84000000 openwrt-ipq40xx-emd1-nor-fw-s.img 4. Flash the firmware (IPQ40xx) # imgaddr=0x84000000 && source 0x84000000:script 5. Reboot (IPQ40xx) # reset Signed-off-by: Yen-Ting-Shen <frank.shen@senao.com> [removed BOARD_NAME] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: Add support for D-Link DAP-2610Fredrik Olofsson2020-01-266-2/+295
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications ============== - SOC: IPQ4018 - RAM: DDR3 256MB - Flash: SPI NOR 16MB - WiFi: - 2.4GHz: IPQ4018, 2x2, front end SKY85303-11 - 5GHz: IPQ4018, 2x2, front end SKY85717-21 - Ethernet: 1x 10/100/1000Mbps, POE 802.3af - PHY: QCA8072 - UART: GND, blocked, 3.3V, RX, TX / 115200 8N1 - LED: 1x red / green - Button: 1x reset / factory default - U-Boot bootloader with tftp and "emergency web server" accessible using serial port. Installation ============ Flash factory image from D-Link web UI. Constraints in the D-Link web UI makes the factory image unnecessarily large. Flash again using sysupgrade from inside OpenWrt to reclaim some flash space. Return to stock D-Link firmware =============================== Partition layout is preserved, and it is possible to return to the stock firmware simply by downloading it from D-Link and writing it to the firmware partition. # mtd -r write dap2610-firmware.bin firmware Quirks ====== To be flashable from the D-Link http server, the firmware must be larger then 6MB, and the size in the firmware header must match the actual file size. Also, the boot loader verifies the checksum of the firmware before each boot, thus the jffs2 must be after the checksum covered part. This is solved in the factory image by having the rootfs at the very end of the image (without pad-rootfs). The sysupgrade image which does not have to be flashable from the D-Link web UI may be smaller, and the checksum in the firmware header only covers the kernel part of the image. Signed-off-by: Fredrik Olofsson <fredrik.olofsson@anyfinetworks.com> [added WRGG Variables to DEVICE_VARS, squashed spi pinconf/mux, added emd1's gmac0 config,fix dtc warnings] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* kernel: bump 4.19 to 4.19.98Koen Vandeputte2020-01-242-2/+2
| | | | | | | | | Refreshed all patches. Compile-tested on: cns3xxx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ipq40xx: add support for Aruba AP-303HDavid Bauer2020-01-146-3/+443
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Aruba AP-303H is the hospitality version of the Aruba AP-303 with a POE-passthrough enabled ethernet switch instead of a sigle PHY. Hardware -------- SoC: Qualcomm IPQ4029 RAM: 512M DDR3 FLASH: - 128MB SPI-NAND (Macronix) - 4MB SPI-NOR (Macronix MX25R3235F) TPM: Atmel AT97SC3203 BLE: Texas Instruments CC2540T attached to ttyMSM1 ETH: Qualcomm QCA8075 LED: WiFi (amber / green) System (red / green /amber) PSE (green) BTN: Reset USB: USB 2.0 To connect to the serial console, you can solder to the labled pads next to the USB port or use your Aruba supplied UARt adapter. Do NOT plug a standard USB cable into the Console labled USB-port! Aruba/HPE simply put UART on the micro-USB pins. You can solder yourself an adapter cable: VCC - NC D+ - TX D- - RX GND - GND The console setting in bootloader and OS is 9600 8N1. Voltage level is 3.3V. To enable a full list of commands in the U-Boot "help" command, execute the literal "diag" command. Installation ------------ 1. Get the OpenWrt initramfs image. Rename it to ipq40xx.ari and put it into the TFTP server root directory. Configure the TFTP server to be reachable at 192.168.1.75/24. Connect the machine running the TFTP server to the E0 (!) ethernet port of the access point, as it only tries to pull from the WAN port. 2. Connect to the serial console. Interrupt autobooting by pressing Enter when prompted. 3. Configure the bootargs and bootcmd for OpenWrt. $ setenv bootargs_openwrt "setenv bootargs console=ttyMSM0,9600n8" $ setenv nandboot_openwrt "run bootargs_openwrt; ubi part aos1; ubi read 0x85000000 kernel; set fdt_high 0x87000000; bootm 0x85000000" $ setenv ramboot_openwrt "run bootargs_openwrt; setenv ipaddr 192.168.1.105; setenv serverip 192.168.1.75; netget; set fdt_high 0x87000000; bootm" $ setenv bootcmd "run nandboot_openwrt" $ saveenv 4. Load OpenWrt into RAM: $ run ramboot_openwrt 5. After OpenWrt booted, transfer the OpenWrt sysupgrade image to the /tmp folder on the device. You will need to plug into E1-E3 ports of the access point to reach OpenWrt, as E0 is the WAN port of the device. 6. Flash OpenWrt: $ ubidetach -p /dev/mtd16 $ ubiformat /dev/mtd16 $ sysupgrade -n /tmp/openwrt-sysupgrade.bin To go back to the stock firmware, simply reset the bootcmd in the bootloader to the original value: $ setenv bootcmd "boot" $ saveenv Signed-off-by: David Bauer <mail@david-bauer.net>
* ipq40xx: add support for EZVIZ CS-W3-WD1200G EUPTom Brouwer2020-01-127-1/+275
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware: SOC: Qualcomm IPQ4018 RAM: 128 MB Nanya NT5CC64M16GP-DI FLASH: 16 MB Macronix MX25L12805D ETH: Qualcomm QCA8075 (4 Gigabit ports, 3xLAN, 1xWAN) WLAN: Qualcomm IPQ4018 (2.4 & 5 Ghz) BUTTON: Shared WPS/Reset button LED: RGB Status/Power LED SERIAL: Header J8 (UART, Left side of board). Numbered from top to bottom: (1) GND, (2) TX, (3) RX, (4) VCC (White triangle next to it). 3.3v, 115200, 8N1 Tested/Working: * Ethernet * WiFi (2.4 and 5GHz) * Status LED * Reset Button (See note below) Implementation notes: * The shared WPS/Reset button is implemented as a Reset button * I could not find a original firmware image to reverse engineer, meaning currently it's not possible to flash OpenWrt through the Web GUI. Installation (Through Serial console & TFTP): 1. Set your PC to fixed IP 192.168.1.12, Netmask 255.255.255.0, and connect to one of the LAN ports 2. Rename the initramfs image to 'C0A8010B.img' and enable a TFTP server on your pc, to serve the image 2. Connect to the router through serial (See connection properties above) 3. Hit a key during startup, to pause startup 4. type `setenv serverip 192.168.1.12`, to set the tftp server address 5. type `tftpboot`, to load the image from the laptop through tftp 6. type `bootm` to run the loaded image from memory 6. (If you want to return to stock firmware later, create an full MTD backup, e.g. using instructions here https://openwrt.org/docs/guide-user/installation/generic.backup#create_full_mtd_backup) 7. Transfer the 'sysupgrade' OpenWrt firmware image from PC to router, e.g.: `scp xxx-squashfs-sysupgrade.bin root@192.168.1.1:/tmp/upgrade.bin` 8. Run sysupgrade to permanently install OpenWrt to flash: `sysupgrade -n /tmp/upgrade.bin` Revert to stock: To revert to stock, you need the MTD backup from step 6 above: 1. Unpack the MTD backup archive 2. Transfer the 'firmware' partition image to the router (e.g. mtd8_firmware.backup) 3. On the router, do `mtd write mtd8_firmware.backup firmware` Signed-off-by: Tom Brouwer <tombrouwer@outlook.com> [removed BOARD_NAME, OpenWRT->OpenWrt, changed LED device name to board name] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: fix usbport trigger on the RT-AC58U with USB 2.0 devicesChristian Lamparter2020-01-122-2/+12
| | | | | | | | | | This patch partially reverts "ipq40xx: remove unnecessary usb nodes in DTS for ASUS RT-AC58U" as the change removed the usb2 port-trigger, so the LED would no longer light-up when a USB 2.0 was inserted into the USB port. Fixes: d0efb1ba95f3 ("ipq40xx: remove unnecessary usb nodes in DTS for ASUS RT-AC58U") Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: build DEVICE_DTS based on SOC and device nameAdrian Schmutzler2019-12-2715-41/+42
| | | | | | | | | | | | | | | | | | | This patch uses the SOC variable to calculate DTS names automatically based on the SOC and the device definition node name. This reduces redundancy and (by having to choose DTS name appropriately) will unify the naming of a device in different places (image/Makefile, DTS name, compatible, image name). This is supposed to make life easier for developers and reviewers. Since the kernel uses a "soc-device.dts" scheme for this target, we use this for the derivation of DEVICE_DTS, too, and rename the files not having followed it so far. Note that for some devices the kernel itself is inconsistent, leaving us with a manual overwrite for ap.dk01.1-c1 and ap.dk04.1-c1. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ipq40xx: use ath10k-ct-smallbuffers for 128 MiB devicesPaul Fertser2019-12-261-1/+3
| | | | Signed-off-by: Paul Fertser <fercerpav@gmail.com>
* kernel: Deactivate CONFIG_SFP in generic configHauke Mehrtens2019-12-231-1/+0
| | | | | | | | Deactivate CONFIG_SFP for kernel 4.19 in the generic configuration. The CONFIG_SFP configuration option was not set to anything in the ath79 build for me, set it to deactivated by default. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* ipq40xx: remove unnecessary usb nodes in DTS for ASUS RT-AC58USungbo Eo2019-12-222-48/+2
| | | | | | RT-AC58U has single USB 3.0 port, and only usb3_port1 is actually used. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ipq40xx: improve ASUS RT-AC58U supportSungbo Eo2019-12-224-20/+26
| | | | | | | | | | | | | | | | | | | | This patch does the following: - move WiFi LED setup to DTS - fix LAN/WAN MAC addresses and add label MAC address - wan5G -> wlan5G, power -> led_power - increase flash SPI frequency to 30MHz MAC addresses are stored in Factory partition at: 0x1006: WiFi 2.4GHz, WAN (label_mac) 0x5006: WiFi 5GHz, LAN (label_mac +4) By improving flash speed, `time dd if=/dev/mtdblock8 of=/dev/null bs=2k` is reduced from 7m 10.26s to 5m 9.52s. Using higher frequencies did not improve speed further. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ipq40xx: add support for Aruba AP-303David Bauer2019-12-209-1/+469
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- SoC: Qualcomm IPQ4029 RAM: 512M DDR3 FLASH: - 128MB NAND (Macronix MX30LF1G18AC) - 4MB SPI-NOR (Macronix MX25R3235F) TPM: Atmel AT97SC3203 BLE: Texas Instruments CC2540T attached to ttyMSM0 ETH: Atheros AR8035 LED: WiFi (amber / green) System (red / green) BTN: Reset To connect to the serial console, you can solder to the labled pads next to the USB port or use your Aruba supplied UARt adapter. Do NOT plug a standard USB cable into the Console labled USB-port! Aruba/HPE simply put UART on the micro-USB pins. You can solder yourself an adapter cable: VCC - NC D+ - TX D- - RX GND - GND The console setting in bootloader and OS is 9600 8N1. Voltage level is 3.3V. To enable a full list of commands in the U-Boot "help" command, execute the literal "diag" command. Installation ------------ 1. Get the OpenWrt initramfs image. Rename it to ipq40xx.ari and put it into the TFTP server root directory. Configure the TFTP server to be reachable at 192.168.1.75/24. Connect the machine running the TFTP server to the ethernet port of the access point. 2. Connect to the serial console. Interrupt autobooting by pressing Enter when prompted. 3. Configure the bootargs and bootcmd for OpenWrt. $ setenv bootargs_openwrt "setenv bootargs console=ttyMSM1,9600n8" $ setenv nandboot_openwrt "run bootargs_openwrt; ubi part aos1; ubi read 0x85000000 kernel; bootm 0x85000000" $ setenv ramboot_openwrt "run bootargs_openwrt; setenv ipaddr 192.168.1.105; setenv serverip 192.168.1.75; netget; set fdt_high 0x87000000; bootm" $ setenv bootcmd "run nandboot_openwrt" $ saveenv 4. Load OpenWrt into RAM: $ run ramboot_openwrt 5. After OpenWrt booted, transfer the OpenWrt sysupgrade image to the /tmp folder on the device. 6. Flash OpenWrt: $ ubidetach -p /dev/mtd1 $ ubiformat /dev/mtd1 $ sysupgrade -n /tmp/openwrt-sysupgrade.bin To go back to the stock firmware, simply reset the bootcmd in the bootloader to the original value: $ setenv bootcmd "boot" $ saveenv Signed-off-by: David Bauer <mail@david-bauer.net>