aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq40xx
Commit message (Collapse)AuthorAgeFilesLines
...
* ipq40xx: sysupgrade: drop disabled UBI to UBI logicBjørn Mork2021-12-031-22/+2
| | | | | | | | | | | | | | | | The commented out code is not required, as the comment indicates. The purpose of this code seems to be to avoid issues caused by partially overwriting an existing UBI partition, where some of the erase counters would be reset but not the unmodified ones. This problem has been solved in a more generic way by the UBI EOF marker. This ensures that any old PEBs after the marker are properly initialized. It is therefore unnecessary to erase the whole partition before flashing a new OpenWrt factory image. Signed-off-by: Bjørn Mork <bjorn@mork.no>
* ipq40xx: add support for GL.iNet GL-B2200TruongSinh Tran-Nguyen2021-12-028-2/+422
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds supports for the GL-B2200 router. Specifications: - SOC: Qualcomm IPQ4019 ARM Quad-Core - RAM: 512 MiB - Flash: 16 MiB NOR - SPI0 - EMMC: 8GB EMMC - ETH: Qualcomm QCA8075 - WLAN1: Qualcomm Atheros QCA4019 2.4GHz 802.11b/g/n 2x2 - WLAN2: Qualcomm Atheros QCA4019 5GHz 802.11n/ac W2 2x2 - WLAN3: Qualcomm Atheros QCA9886 5GHz 802.11n/ac W2 2x2 - INPUT: Reset, WPS - LED: Power, Internet - UART1: On board pin header near to LED (3.3V, TX, RX, GND), 3.3V without pin - 115200 8N1 - UART2: On board with BLE module - SPI1: On board socket for Zigbee module Update firmware instructions: Please update the firmware via U-Boot web UI (by default at 192.168.1.1, following instructions found at https://docs.gl-inet.com/en/3/troubleshooting/debrick/). Normal sysupgrade, either via CLI or LuCI, is not possible from stock firmware. Please do use the *gl-b2200-squashfs-emmc.img file, gunzipping the produced *gl-b2200-squashfs-emmc.img.gz one first. What's working: - WiFi 2G, 5G - WPA2/WPA3 Not tested: - Bluetooth LE/Zigbee Credits goes to the original authors of this patch. V1->V2: - updates *arm-boot-add-dts-files.patch correctly (sorry, my mistake) - add uboot-envtools support V2->V3: - Li Zhang updated official patch to fix wrong MAC address on wlan0 (PCI) interface V3->V4: - wire up sysupgrade Signed-off-by: Li Zhang <li.zhang@gl-inet.com> [fix tab and trailing space, document what's working and what's not] Signed-off-by: TruongSinh Tran-Nguyen <i@truongsinh.pro> [rebase on top of master, address remaining comments] Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com> [remove redundant check in platform.sh] Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ipq40xx: add MikroTik LHGG-60ad outdoor 802.11ad (60GHz) dishAlexander Couzens2021-12-027-3/+286
| | | | | | | | | | | | | | | | | | | | | | | | | | | | LHGG-60ad is IPQ4019 + wil6210 based. Specification: - Qualcomm IPQ4019 (717 MHz) - 256 MB of RAM (DDR3L) - 16 MB (SPI NOR) of flash - 1x Gbit ethernet, 802.3af/at POE IN connected through AR8035. - WLAN: wil6210 802.11ad PCI card - No USB or SD card ports - UART disabled - 8x LEDs Biggest news is the wil6210 PCI card. Integration for its configuration and detection has already been taken care of when adding support for TP-Link Talon AD7200. However, signal quality is much lower than with stock firmware, so probably additional board-specific data has to be provided to the driver and is still missing at the moment. Signed-off-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Alexander Couzens <lynxis@fe80.eu> Signed-off-by: Daniel Golle <daniel@makrotopia.org> [Fix Ethernet Interface] Signed-off-by: Nick Hainke <vincent@systemli.org>
* ipq40xx: Add support for Teltonika RUTX10Felix Matouschek2021-11-288-3/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the Teltonika RUTX10. This device is an industrial DIN-rail router with 4 ethernet ports, 2.4G/5G dualband WiFi, Bluetooth, a USB 2.0 port and two GPIOs. The RUTX series devices are very similiar so common parts of the DTS are kept in a DTSI file. They are based on the QCA AP-DK01.1-C1 dev board. See https://teltonika-networks.com/product/rutx10 for more info. Hardware: SoC: Qualcomm IPQ4018 RAM: 256MB DDR3 SPI Flash 1: XTX XT25F128B (16MB, NOR) SPI Flash 2: XTX XT26G02AWS (256MB, NAND) Ethernet: Built-in IPQ4018 (SoC, QCA8075), 4x 10/100/1000 ports WiFi 1: Qualcomm QCA4019 IEEE 802.11b/g/n Wifi 2: Qualcomm QCA4019 IEEE 802.11a/n/ac USB Hub: Genesys Logic GL852GT Bluetooth: Qualcomm CSR8510 (A10U) LED/GPIO controller: STM32F030 with custom firmware Buttons: Reset button Leds: Power (green, cannot be controlled) WiFi 2.4G activity (green) WiFi 5G activity (green) MACs Details verified with the stock firmware: eth0: Partition 0:CONFIG Offset: 0x0 eth1: = eth0 + 1 radio0 (2.4 GHz): = eth0 + 2 radio1 (5.0 GHz): = eth0 + 3 Label MAC address is from eth0. The LED/GPIO controller needs a separate kernel driver to function. The driver was extracted from the Teltonika GPL sources and can be found at following feed: https://github.com/0xFelix/teltonika-rutx-openwrt USB detection of the bluetooth interface is sometimes a bit flaky. When not detected power cycle the device. When the bluetooth interface was detected properly it can be used with bluez / bluetoothctl. Flash instructions via stock web interface (sysupgrade based): 1. Set PC to fixed ip address 192.168.1.100 2. Push reset button and power on the device 3. Open u-boot HTTP recovery at http://192.168.1.1 4. Upload latest stock firmware and wait until the device is rebooted 5. Open stock web interface at http://192.168.1.1 6. Set some password so the web interface is happy 7. Go to firmware upgrade settings 8. Choose openwrt-ipq40xx-generic-teltonika_rutx10-squashfs-nand-factory.ubi 9. Set 'Keep settings' to off 10. Click update, when warned that it is not a signed image proceed Return to stock firmware: 1. Set PC to fixed ip address 192.168.1.100 2. Push reset button and power on the device 3. Open u-boot HTTP recovery at http://192.168.1.1 4. Upload latest stock firmware and wait until the device is rebooted Note: The DTS expects OpenWrt to be running from the second rootfs partition. u-boot on these devices hot-patches the DTS so running from the first rootfs partition should also be possible. If you want to be save follow the instructions above. u-boot HTTP recovery restores the device so that when flashing OpenWrt from stock firmware it is flashed to the second rootfs partition and the DTS matches. Signed-off-by: Felix Matouschek <felix@matouschek.org>
* ipq40xx: add support for MikroTik hAP ac3Robert Marko2021-11-289-5/+392
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the MikroTik RouterBOARD RBD53iG-5HacD2HnD (hAP ac³), a indoor dual band, dual-radio 802.11ac wireless AP with external omnidirectional antennae, USB port, five 10/100/1000 Mbps Ethernet ports and PoE passthrough. See https://mikrotik.com/product/hap_ac3 for more info. Specifications: - SoC: Qualcomm Atheros IPQ4019 - RAM: 256 MB - Storage: 16 MB NOR + 128 MB NAND - Wireless: · Built-in IPQ4019 (SoC) 802.11b/g/n 2x2:2, 3 dBi antennae · Built-in IPQ4019 (SoC) 802.11a/n/ac 2x2:2, 5.5 dBi antennae - Ethernet: Built-in IPQ4019 (SoC, QCA8075) , 5x 1000/100/10 port, passive PoE in, PoE passtrough on port 5 - 1x USB Type A port Installation: 1. Boot the initramfs image via TFTP 2. Run "cat /proc/mtd" and look for "ubi" partition mtd device number, ex. "mtd1" 3. Use ubiformat to remove MikroTik specific UBI volumes * Detach the UBI partition by running: "ubidetach -d 0" * Format the partition by running: "ubiformat /dev/mtdN -y" Replace mtdN with the correct mtd index from step 2. 3. Flash the sysupgrade image using "sysupgrade -n" Signed-off-by: Robert Marko <robimarko@gmail.com> Tested-by: Mark Birss <markbirss@gmail.com> Tested-by: Michael Büchler <michael.buechler@posteo.net> Tested-by: Alex Tomkins <tomkins@darkzone.net>
* ipq40xx: utilize nvmem on Netgear EX61X0 v2 SeriesChristian Lamparter2021-11-282-10/+27
| | | | | | | | the Netgear EX6100v2 and EX6150v2 can utilize the nvmem for the pre-calibration and mac-address for both WIFI devices. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: purge clk_ignore_unused bootargChristian Lamparter2021-11-272-2/+2
| | | | | | | | | these flags have been creeping in from the QSDK. All needed clocks should be accounted for, and if a device is broken due to this. It should be looked into. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: update 105-ipq40xx-fix-sleep-clock.patchChristian Lamparter2021-11-271-13/+10
| | | | | | Bjorn Anderson has suggestions which would help to upstream the patch. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: fix missing includeChristian Lamparter2021-11-141-0/+1
| | | | | | | | | | | | This patch fixes a blunder of mine. The include needed for LED_COLOR_ID_BLUE property is missing. This caused the builds to fail with: |Error: arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi:91.13-14 syntax error |FATAL ERROR: Unable to parse input tree Fixes: 12d33d388c52 ("ipq40xx: add support for P&W R619AC (aka G-DOCK 2.0)") Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: reenable Zyxel NBG6617 by defaultChristian Lamparter2021-11-141-1/+0
| | | | | | | | | The Zyxel NBG6617 already uses lzma to compress the kernel. A local build with every module enabled (either as =Y or =M) ended produced a 3058 KiB kernel (the kernel partition is 4MiB). It booted just fine, let's reenable the device. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: add support for P&W R619AC (aka G-DOCK 2.0)Richard Yu2021-11-148-1/+415
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | P&W R619AC is a IPQ4019 Dual-Band AC1200 router. It is made by P&W (p2w-tech.com) known as P&W R619AC but marketed and sold more popularly as G-DOCK 2.0. Specification: * SOC: Qualcomm Atheros IPQ4019 (717 MHz) * RAM: 512 MiB * Flash: 16 MiB (NOR) + 128 MiB (NAND) * Ethernet: 5 x 10/100/1000 (4 x LAN, 1 x WAN) * Wireless: - 2.4 GHz b/g/n Qualcomm Atheros IPQ4019 - 5 GHz a/n/ac Qualcomm Atheros IPQ4019 * USB: 1 x USB 3.0 * LED: 4 x LAN, 1 x WAN, 2 x WiFi, 1 x Power (All Blue LED) * Input: 1 x reset * 1 x MicroSD card slot * Serial console: 115200bps, pinheader J2 on PCB * Power: DC 12V 2A * 1 x Unpopulated mPCIe Slot (see below how to connect it) * 1 x Unpopulated Sim Card Slot Installation: 1. Access to tty console via UART serial 2. Enter failsafe mode and mount rootfs <https://openwrt.org/docs/guide-user/troubleshooting/failsafe_and_factory_reset> 3. Edit inittab to enable shell on tty console `sed -i 's/#ttyM/ttyM/' /etc/inittab` 4. Reboot and upload `-nand-factory.bin` to the router (using wget) 5. Use `sysupgrade` command to install Another installation method is to hijack the upgrade server domain of stock firmware, because it's using insecure http. This commit is based on @LGA1150(at GitHub)'s work <https://github.com/LGA1150/openwrt/commit/a4932c8d5a275d1fb4297bd20ec03f9270a45d1c> With some changes: 1. Added `qpic_bam` node in dts. I don't know much about this, but I observed other dtses have this node. 2. Removed `ldo` node under `sd_0_pinmux`, because `ldo` cause SD card not working. This fix is from <https://github.com/coolsnowwolf/lede/commit/51143b4c7571f717afe071db60bbb4db1532cbf2> 3. Removed the 32MB NOR variant. 4. Removed `cd-gpios` in `sdhci` node, because it's reported that it makes wlan2g led light up. 5. Added ethphy led config in dts. 6. Changed nand partition label from `rootfs` to `ubi`. About the 128MiB variant: The stock bootloader sets size of nand to 64MiB. But most of this devices have 128MiB nand. If you want to use all 128MiB, you need to modify the `MIBIB` data of bootloader. More details can be found on github: <https://github.com/openwrt/openwrt/pull/3691#issuecomment-818770060> For instructions on how to flash the MIBIB partition from u-boot console: <https://github.com/openwrt/openwrt/pull/3691#issuecomment-819138232> About the Mini PCIe slot: (from "ygleg") "The REFCLK signals on the Mini PCIe slot is not connected on this board out of the box. If you want to use the Mini PCIe slot on the board, you need to (preferably) solder two 0402 resistors: R436 (REFCLK+) and R444 (REFCLK-)..." This and much more information is provoided in the github comment: <https://github.com/openwrt/openwrt/pull/3691#issuecomment-968054670> Signed-off-by: Richard Yu <yurichard3839@gmail.com> Signed-off-by: DENG Qingfang <dqfext@gmail.com> [Added comment about MIBIB+128 MiB variant. Added commit message section about pcie slot. Renamed gpio-leds' subnodes and added color, function+enum properties.] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* kernel: bump 5.4 to 5.4.158John Audia2021-11-072-2/+2
| | | | | | All patches automatically rebased. Signed-off-by: John Audia <graysky@archlinux.us>
* ipq40xx: use zImage for Cell-C RTL30VWPawel Dembicki2021-11-061-4/+3
| | | | | | | | | | After switch to 5.10 kernel, kernel size was too high. This patch switches Cell-C RTL30VW from uImage to zImage build. Lzma uImage wrap is required for factory booting and it must left untouched. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
* ipq40xx: 5.10: refresh configRobert Marko2021-11-061-0/+1
| | | | | | | | It looks like CONFIG_BLK_CMDLINE_PARSER was forgotten during the Orbi device merge. So lets refresh the config with it. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* kernel: bump 5.10 to 5.10.77Rui Salvaterra2021-11-061-1/+1
| | | | | | | | | Deleted (upstreamed): bcm53xx/patches-5.10/081-v5.15-Revert-pinctrl-bcm-ns-support-updated-DT-binding-as-.patch [1] [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.10.y&id=01c2881bb0e0a71b87ca425e1b763ac13855aa7e Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* ipq40xx: disable some devices due to kernel sizeRobert Marko2021-11-031-0/+9
| | | | | | | | | | Disable some of the ipq40xx devices due to their kernel size limitations. These devices fail to build with kernel 5.10 and full buildbot config. Signed-off-by: Robert Marko <robert.marko@sartura.hr> [keep gl-b1300/gl-s1300 enabled, extend commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ipq40xx: switch to kernel 5.10Adrian Schmutzler2021-11-031-1/+1
| | | | | | | | | | There have been enough tests and new developments require the new kernel, so let's update it. There is a bunch of devices that do not build anymore due to kernel size limitations. These are disabled in a subsequent commit. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ipq40xx: add support for Netgear SRR60/SRS60 and RBR50/RBS50Davide Fioravanti2021-11-0112-5/+591
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Netgear SRS60 and SRR60 (sold together as SRK60) are two almost identical AC3000 routers. The SRR60 has one port labeled as wan while the SRS60 not. The RBR50 and RBS50 (sold together as RBK50) have a different external shape but they have an USB 2.0 port on the back. This patch has been tested only on SRS60 and RBR50, but should work on SRR60 and RBS50. Hardware -------- SoC: Qualcomm IPQ4019 (717 MHz, 4 cores 4 threads) RAM: 512MB DDR3 FLASH: 4GB EMMC ETH: - 3x 10/100/1000 Mbps Ethernet - 1x 10/100/1000 Mbps Ethernet (WAN) WIFI: - 2.4GHz: 1x IPQ4019 (2x2:2) - 5GHz: 1x IPQ4019 (2x2:2) - 5GHz: 1x QCA9984 (4x4:4) - 6 internal antennas BTN: - 1x Reset button - 1x Sync button - 1x ON/OFF button LEDS: - 8 leds controlled by TLC59208F (they can be switched on/off independendently but the color can by changed by GPIOs) - 1x Red led (Power) - 1x Green led (Power) UART: - 115200-8-N-1 Everything works correctly. Installation ------------ These routers have a dual partition system. However this firmware works only on boot partition 1 and the OEM web interface will always flash on the partition currently not booted. The following steps will use the SRS60 firmware, but you have to chose the right firmware for your router. There are 2 ways to install Openwrt the first time: 1) Using NMRPflash 1. Download nmrpflash (https://github.com/jclehner/nmrpflash) 2. Put the openwrt-ipq40xx-generic-netgear_srs60-squashfs-factory.img file in the same folder of the nmrpflash executable 3. Connect your pc to the router using the port near the power button. 4. Run "nmrpflash -i XXX -f openwrt-ipq40xx-generic-netgear_srs60-squashfs-factory.img". Replace XXX with your network interface (can be identified by running "nmrpflash -L") 5. Power on the router and wait for the flash to complete. After about a minute the router should boot directly to Openwrt. If nothing happens try to reboot the router. If you have problems flashing try to set "10.164.183.253" as your computer IP address 2) Without NMRPflash The OEM web interface will always flash on the partition currently not booted, so to flash OpenWrt for the first time you have to switch to boot partition 2 and then flash the factory image directly from the OEM web interface. To switch on partition 2 you have to enable telnet first: 1. Go to http://192.168.1.250/debug.htm and check "Enable Telnet". 2. Connect through telent ("telnet 192.168.1.250") and login using admin/password. To read the current boot_part: artmtd -r boot_part To write the new boot_part: artmtd -w boot_part 02 Then reboot the router and then check again the current booted partition Now that you are on boot partition 2 you can flash the factory Openwrt image directly from the OEM web interface. Restore OEM Firmware -------------------- 1. Download the stock firmware from official netgear support. 2. Follow the nmrpflash procedure like above, using the official Netgear firmware (for example SRS60-V2.2.1.210.img) nmrpflash -i XXX -f SRS60-V2.2.1.210.img Notes ----- 1) You can check and edit the boot partition in the Uboot shell using the UART connection. "boot_partition_show" shows the current boot partition "boot_partition_set 1" sets the current boot partition to 1 2) Router mac addresses: LAN XX:XX:XX:XX:XX:69 WAN XX:XX:XX:XX:XX:6a WIFI 2G XX:XX:XX:XX:XX:69 WIFI 5G XX:XX:XX:XX:XX:6b WIFI 5G (2nd) XX:XX:XX:XX:XX:6c LABEL XX:XX:XX:XX:XX:69 Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com> Signed-off-by: Robert Marko <robimarko@gmail.com> [added 5.10 changes for 901-arm-boot-add-dts-files.patch, moved sysupgrade mmc.sh to here and renamed it, various dtsi changes] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: enable CONFIG_CMDLINE_PARTITION and CONFIG_LEDS_TLC591XXDavide Fioravanti2021-11-012-0/+4
| | | | | | | | | | | | | | | | CONFIG_CMDLINE_PARTITION: Some devices with mmc like the Netgear Orbi Pro SRS60 or Netgear Orbi RBR50 needs to hardcode the partitions layout in the cmdline boot correctly CONFIG_LEDS_TLC591XX: This is needed for the led driver found in the Netgear Orbi Pro SRS60 Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com> Signed-off-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Shang Jia <jiash416@gmail.com> [added 5.10 config] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: fix sleep clockPavel Kubelun2021-11-012-0/+58
| | | | | | | | It seems like sleep_clk was copied from ipq806x. Fix ipq40xx sleep_clk to the value QSDK defines. Signed-off-by: Pavel Kubelun <be.dissent@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [5.4+5.10]
* ipq40xx: detangle ath10k-board-qca4019 from ath10k-firmware-qca4019*Christian Lamparter2021-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | Back in the day, the board-2.bin came with ath10k-firmware-qca4019. This changed with commit c3b2efaf24b5 ("linux-firmware: ath10k: add board firmware packages") which placed the board-2.bin into a separate package: ath10k-board-qca4019. This was great, because it addressed one of the caveat of the original ipq-wifi package: commit fa03d441e96e ("firmware: add custom IPQ wifi board definitions") | 2. updating ath10k-firmware-qca4019 will also replace | the board-2.bin. For this cases the user needs to | manually reinstall the wifi-board package once the | ath10k-firmware-qca4019 is updated. This could be extended further so that ipq-wifi packages no longer use "install-override" and the various QCA4019 variants list the ath10k-board-qca4019 as a CONFLICT package. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* kernel: 5.10: backport qca8k stability improvementsMatthew Hagan2021-10-241-3/+3
| | | | | | | | | This is a backport of Ansuel Smith's "Multiple improvement to qca8k stability" series. The QCA8337 switch is available on multiple platforms including ipq806x, ath79 and bcm53xx. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
* ipq40xx: MR33: Fix LP5562 LED driver probeTan Zien2021-10-231-4/+15
| | | | | | | | | | | | | Add the reg and color property to each channel node. This update is to accommodate the multicolor framework. Refer to: <https://lore.kernel.org/all/20200622185919.2131-9-dmurphy@ti.com> <https://lore.kernel.org/all/20210818070209.1540451-1-michal.vokac@ysoft.com> Signed-off-by: Tan Zien <nabsdh9@gmail.com> [replaced links to lore, wrote something of a commit message] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: use zImage for GL.iNet GL-B1300, GL-S1300 to shrink below 4096kSzabolcs Hubai2021-10-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | In the "ipq40xx: switch to Kernel 5.10" discussion at GitHub, Adrian noted [0] that these GL.iNet Conexa series devices, GL-B1300 and GL-S1300 failed their image generation [1] as their gzipped uImage kernel went above 4096k. While notifying the vendor about this problem [2], I tested all U-Boot releases from GL.iNet: - they really fail to boot kernel above 4096k - they don't support lzma: "Unimplemented compression type 3" - but they boot zImage Using zImage (xz compression) the kernel is 2909k which is more than a megabyte away from the KERNEL_SIZE := 4096k limit. The gzip compressed version would be 4116k. [0]: https://github.com/openwrt/openwrt/pull/4620#issuecomment-932765776 [1]: commit 7b1fa276f5a2 ("ipq40xx: add testing support for kernel 5.10") [2]: https://forum.gl-inet.com/t/ipq40xx-kernel-size-and-u-boot-v5-10-is-too-big-for-4-mb/17619 Signed-off-by: Szabolcs Hubai <szab.hu@gmail.com>
* ipq40xx: add testing support for kernel 5.10Robert Marko2021-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Add kernel 5.10 as the testing kernel to ipq40xx to get wider testing. The following devices failed to build with buildbot settings and all feeds installed (apparently due to kernel size): * cell-c rtl30vw * compex wpj428 * devolo magic 2 next * engenius emr3500 * glinet gl-b1300 * glinet gl-s1300 * qcom ap-dk01.1-c1 * qcom ap-dk04.1-c1 Signed-off-by: Robert Marko <robert.marko@sartura.hr> Tested-by: Nick Hainke <vincent@systemli.org> [ipq4019/fritzbox-7530 ipq4019/fritzbox-4040 ipq4019/sxtsq-5ac] Tested-by: Szabolcs Hubai <szab.hu@gmail.com> [ipq4029/gl-b1300] Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [ipq4019/map-ac2200] [add tested-by and note about failed devices] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ipq40xx: 5.10: move AR40xx to MDIO driversRobert Marko2021-09-256-23/+2256
| | | | | | | | | | | MDIO drivers were moved into their own sub directory of networking drivers. This has caused the AR40xx driver to probe before MDIO drivers and that wont work as it depends on the MDIO bus to be up so it can be fetched. Lets solve it by moving the AR40xx into MDIO folder so they get probed like before. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: net: ethernet: edma: reject unsupported coalescing paramsRobert Marko2021-09-251-0/+4
| | | | | | | | | | | Set ethtool_ops->supported_coalesce_params to let the core reject unsupported coalescing parameters. This driver did not previously reject unsupported parameters. This is a required ethtool op since kernel 5.7. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: net: ethernet: edma: update of_get_phy_mode() for 5.10Robert Marko2021-09-251-1/+9
| | | | | | | | | | In kernel v5.5 of_get_phy_mode had its API changed, so its now returning 0 or errors instead of phymode. Phymode is now returning by passing a pointer to phy_interface_t where it will be stored. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: 5.10: add kernel configRobert Marko2021-09-251-0/+493
| | | | | | | | | | Copy config from 5.4 and run "make kernel_oldconfig". Select default ("N") for all new symbols. Signed-off-by: Robert Marko <robert.marko@sartura.hr> [make commit message more explicit] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ipq40xx: 5.10: refresh patches to applyRobert Marko2021-09-259-31/+30
| | | | | | | | Refresh the kernel patches on top of 5.10 so they apply. Manually fixup the 705-net-add-qualcomm-ar40xx-phy.patch to apply. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: 5.10: replace patches with upstreamed versionsRobert Marko2021-09-253-11/+18
| | | | | | | | | USB and SDHCI LDO DTS patches have been upstreamed into 5.12, so replace the local versions with upstreamed ones. Reorder, and clearly mark the kernel version. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: 5.10: remove duplicate GPIO export patchRobert Marko2021-09-251-165/+0
| | | | | | | Its in the generic target already, so remove the duplicate as it breaks compilation. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: 5.10: drop upstreamed patchesRobert Marko2021-09-2522-3005/+0
| | | | | | Drop patches that have been upstreamed in before 5.10. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: 5.10: copy patchesRobert Marko2021-09-2544-0/+4683
| | | | | | Copy over the 5.4 kernel patches to 5.10 folder. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* kernel: bump 5.4 to 5.4.144John Audia2021-09-131-1/+1
| | | | | | | | | | | | | Manually rebased: backport-5.4/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch All other patches automatically rebased. Build system: x86_64 Build-tested: ipq806x/R7800 Run-tested: ipq806x/R7800 Signed-off-by: John Audia <graysky@archlinux.us>
* ipq40xx: Fix board-2.bin package name for Plasma Cloud PA2200Sven Eckelmann2021-09-121-1/+1
| | | | | | | | | | | The board data file for the Plasma Cloud PA2200 is not part of the default board-2.bin which is shipped by ath10k-board-qca4019. A typo in the device package name resulted in a not correctly selected package for the device specific board-2.bin. The wifi driver has therefore loaded the wrong calibration information into the wifi chip. Fixes: 4871fd2616ac ("ipq40xx: add support for Plasma Cloud PA2200") Signed-off-by: Sven Eckelmann <sven@narfation.org>
* ipq40xx: Fix board-2.bin package name for Plasma Cloud PA1200Sven Eckelmann2021-09-121-1/+1
| | | | | | | | | | | The board data file for the Plasma Cloud PA1200 is not part of the default board-2.bin which is shipped by ath10k-board-qca4019. A typo in the device package name resulted in a not correctly selected package for the device specific board-2.bin. The wifi driver has therefore loaded the wrong calibration information into the wifi chip. Fixes: ea5bb6bbfee0 ("ipq40xx: add support for Plasma Cloud PA1200") Signed-off-by: Sven Eckelmann <sven@narfation.org>
* ipq40xx: Select correct board-2.bin for EnGenius EMR3500Sven Eckelmann2021-09-121-0/+1
| | | | | | | | | The board data file for the EnGenius EMR3500 is not part of the default board-2.bin which is shipped by ath10k-board-qca4019. As result, the wrong calibration information will be loaded into the wifi chip. Fixes: 3f61e5e1b97e ("ipq40xx: add support for EnGenius EMR3500") Signed-off-by: Sven Eckelmann <sven@narfation.org>
* ipq40xx: Select correct board-2.bin for EnGenius EMD1Sven Eckelmann2021-09-121-0/+1
| | | | | | | | | The board data file for the EnGenius EMD1 is not part of the default board-2.bin which is shipped by ath10k-board-qca4019. As result, the wrong calibration information will be loaded into the wifi chip. Fixes: 51f303597839 ("ipq40xx: add support for EnGenius EMD1") Signed-off-by: Sven Eckelmann <sven@narfation.org>
* kernel: Set CONFIG_RCU_CPU_STALL_TIMEOUT=21Hauke Mehrtens2021-09-091-1/+0
| | | | | | | | | | | | The default value for CONFIG_RCU_CPU_STALL_TIMEOUT was changed from 60 seconds to 21 seconds in 2012 in the upstream kernel. Some targets already use 21 seconds. This patch changes the default value in the generic configuration to 21 seconds and removes the target specific configuration options. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Rui Salvaterra <rsalvaterra@gmail.com>
* kernel: move two symbols to the generic kconfigsRui Salvaterra2021-08-291-2/+0
| | | | | | | CONFIG_RCU_{NEED_SEGCBLIST,STALL_COMMON} are set basically everywhere. Move them to the generic kconfigs. And resort the generic kconfigs while at it. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* ipq40xx: fix Edgecore ECW5211 bootStijn Tintel2021-08-181-0/+1
| | | | | | | The bootloader will look for a configuration section named ap.dk01.1-c2 in the FIT image. If this doesn't exist, the device won't boot. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* ipq40xx: ar40xx: reset port status registerDavid Bauer2021-08-141-2/+1
| | | | | | | This resolves incosnsitencies of the configured RX / TX flow control modes between different boards or bootloaders. Signed-off-by: David Bauer <mail@david-bauer.net>
* ipq40xx: ar40xx: use FIELD_GET macroDavid Bauer2021-08-141-7/+8
| | | | | | This improves code readability. Signed-off-by: David Bauer <mail@david-bauer.net>
* ipq40xx: increase EX6150v2 SPI frequencyDavid Bauer2021-08-141-1/+1
| | | | | | | | | The chip supports clock speeds up to 50 MHz, however it won't even read the chip-id correctly at this frequency. 45 MHz however works reliable. Signed-off-by: David Bauer <mail@david-bauer.net>
* treewide: backport support for nvmem on non platform devicesAnsuel Smith2021-08-051-5/+1
| | | | | | | | | | | | In the current state, nvmem cells are only detected on platform device. To quickly fix the problem, we register the affected problematic driver with the of_platform but that is more an hack than a real solution. Backport from net-next the required patch so that nvmem can work also with non-platform devices and rework our current patch. Drop the mediatek and dsa workaround and rework the ath10k patches. Rework every driver that use the of_get_mac_address api. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* ipq40xx: convert mtd-mac-address to nvmem implementationAnsuel Smith2021-07-192-4/+32
| | | | | | | Define nvmem-cells and convert mtd-mac-address to nvmem implementation. The conversion is done with an automated script. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* ipq40xx: fix FRITZRepeater 1200 RGMII delayDavid Bauer2021-07-171-1/+1
| | | | | | | | | | | | | | When the AVM FRITZ!Repeater 1200 was introduced on Kernel 4.19, the at803x PHY driver incorrectly set up the delays, not disabling delays set by the bootloader. The PHY was always operating with RX as well as TX delays enabled, but with kernel 5.4 and later, the required TX delay is disabled, breaking ethernet operation. Correct the PHY mode, so the driver enables both delays. Signed-off-by: David Bauer <mail@david-bauer.net>
* ipq40xx: increase SPI frequency for Zyxel NBG6617Dmitry Tunin2021-07-111-3/+3
| | | | | | | | | | | | The mx25l25635f supports clock speed up to 50Mhz. Also remove obsolete "mx25l25635f" hack and rename the matching device-tree flash node. Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com> [mention node rename as well. chip is very very likely always the "f" revision for all NBG6617] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* treewide: call check-size before append-metadataAdrian Schmutzler2021-07-102-5/+5
| | | | | | | | | | sysupgrade metadata is not flashed to the device, so check-size should be called _before_ adding metadata to the image. While at it, do some obvious wrapping improvements. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Acked-by: Paul Spooren <mail@aparcar.org>