aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq40xx
Commit message (Collapse)AuthorAgeFilesLines
* ipq40xx: ZTE MF287 fix sysupgradeAndreas Böhler2023-09-251-0/+1
| | | | | | | | While refactoring support for the MF287 series, an entry in platform.sh was overlooked - this fixes sysupgrade on this devices. Signed-off-by: Andreas Böhler <dev@aboehler.at> (cherry picked from commit 964b576fc133019d0379983df597e4eb343cd635)
* ipq40xx: ZTE MF287 series: move to gpio-export for modem-reset GPIOAndreas Böhler2023-09-244-27/+20
| | | | | | | | | | Turn the "gpio-restart" node into a "gpio-export" node for all MF287 variants, similar to the MF287 Pro. Unfortunately, there doesn't seem to be a "power button blocker" GPIO for the MF287 and MF287 Plus, so a modem reset always triggers a system reset. Signed-off-by: Andreas Böhler <dev@aboehler.at> (cherry picked from commit 053f8f92d1395fa5d33b0b8f2fef44a4b926c112)
* ipq40xx: refactor ZTE MF287 seriesAndreas Böhler2023-09-247-7/+258
| | | | | | | | | The ZTE MF287 requires a different board calibration file for ath10k than the ZTE MF287+. The two devices receive their own DTS, thus the device tree is slightly refactored. Signed-off-by: Andreas Böhler <dev@aboehler.at> (cherry picked from commit 9c7578d560708c040dc04d0db37ef682db58f6b5)
* ipq40xx: fix image building for ZTE MF287 seriesAndreas Böhler2023-09-181-1/+1
| | | | | | | | | For the ZTE MF287 series, a special recovery image is built. The Makefile worked fine on snapshot, but created corrupt images on the 23.05 images. By using the appropriate variable, this should be fixed. Signed-off-by: Andreas Böhler <dev@aboehler.at> (cherry picked from commit a9cc3708e0c3c4869711a9ba4b9c1437ed250721)
* generic: sync MediaTek Ethernet driver with upstreamDaniel Golle2023-09-041-2/+2
| | | | | | | | Import commits from upstream Linux replacing some downstream patches. Move accepted patches from pending-{5.15,6.1} to backport-{5.15,6.1}. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit f631c7bbb16f1d39d59c4cdf3f7189abab4fd9c6)
* generic: backport initial LEDs hw control supportChristian Marangi2023-09-043-7/+8
| | | | | | | | | | | | | | Backport initial LEDs hw control support. Currently this is limited to only rx/tx and link events for the netdev trigger but the API got accepted and the additional modes are working on and will be backported later. Refresh every patch and add the additional config flag for QCA8K new LEDs support. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 0a4b309f41062ef40706162ae53b6428982a0685)
* ipq4019: add support for ZTE MF287 Pro aka DreiNeo ProAndreas Böhler2023-08-217-179/+476
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ZTE MF287 Pro is a LTE router used (exclusively?) by the network operator "3". It is very similar to the MF287+, but the hardware layout and partition layout have changed quite a bit. Specifications ============== SoC: IPQ4018 RAM: 256MiB Flash: 8MiB SPI-NOR + 128MiB SPI-NAND LAN: 4x GBit LAN LTE: ZTE Cat12 WiFi: 802.11a/b/g/n/ac SoC-integrated USB: 1x 2.0 MAC addresses ============= LAN: from config + 2 WiFi 1: from config WiFi 2: from config + 1 Installation ============ Option 1 - TFTP --------------- TFTP installation using UART is preferred. Disassemble the device and connect serial. Put the initramfs image as openwrt.bin to your TFTP server and configure a static IP of 192.168.1.100. Load the initramfs image by typing: setenv serverip 192.168.1.100 setenv ipaddr 192.168.1.1 tftpboot 0x82000000 openwrt.bin bootm 0x82000000 From this intiramfs boot you can take a backup of the currently installed partitions as no vendor firmware is available for download: ubiattach -m17 cat /dev/ubi0_0 > /tmp/ubi0_0 cat /dev/ubi0_1 > /tmp/ubi0_1 Copy the files /tmp/ubi0_0 and /tmp/ubi0_1 somewhere save. Once booted, transfer the sysupgrade image and run sysupgrade. You might have to delete the stock volumes first: ubirmvol /dev/ubi0 -N ubi_rootfs ubirmvol /dev/ubi0 -N kernel Option 2 - From stock firmware ------------------------------ The installation from stock requires an exploit first. The exploit consists of a backup file that forces the firmware to download telnetd via TFTP from 192.168.0.22 and run it. Once exploited, you can connect via telnet and login as admin:admin. The exploit will be available at the device wiki page. Once inside the stock firmware, you can transfer the -factory.bin file to /tmp by using "scp" from the stock frmware or "tftp". ZTE has blocked writing to the NAND. Fortunately, it's easy to allow write access - you need to read from one file in /proc. Once done, you need to erase the UBI partition and flash OpenWrt. Before performing the operation, make sure that mtd13 is the partition labelled "rootfs" by calling "cat /proc/mtd". Complete commands: cd /tmp tftp -g -r factory.bin 192.168.0.22 cat /proc/driver/sensor_id flash_erase /dev/mtd17 0 0 dd if=/tmp/factory.bin of=/dev/mtdblock17 bs=131072 Afterwards, reboot your device and you should have a working OpenWrt installation. Restore Stock ============= Option 1 - via UART ------------------- Boot an OpenWrt initramfs image via TFTP as for the initial installation. Transfer the two backed-up files to your box to /tmp. Then, run the following commands - replace $kernel_length and $rootfs_size by the size of ubi0_0 and ubi0_1 in bytes. ubiattach -m 17 ubirmvol /dev/ubi0 -N kernel ubirmvol /dev/ubi0 -N rootfs ubirmvol /dev/ubi0 -N rootfs_data ubimkvol /dev/ubi0 -N kernel -s $kernel_length ubimkvol /dev/ubi0 -N ubi_rootfs -s $rootfs_size ubiupdatevol /dev/ubi0_0 /tmp/ubi0_0 ubiupdatevol /dev/ubi0_1 /tmp/ubi0_1 Option 2 - from within OpenWrt ------------------------------ This option requires to flash an initramfs version first so that access to the flash is possible. This can be achieved by sysupgrading to the recovery.bin version and rebooting. Once rebooted, you are again in a default OpenWrt installation, but no partition is mounted. Follow the commands from Option 1 to flash back to stock. LTE Modem ========= The LTE modem is similar to other ZTE devices and controls some more LEDs and battery management. Configuring the connection using uqmi works properly, the modem provides three serial ports and a QMI CDC ethernet interface. Other Notes =========== Contrary to the stock firmware, the USB port on the back can be used. There is one GPIO Switch "Power button blocker" which, if enabled, does not trigger a reset of the SoC if the modem reboots. If disabled, the SoC is rebooted along with the modem. The modem can be rebooted via the exported GPIO "modem-reset" in /sys/class/gpio. Signed-off-by: Andreas Böhler <dev@aboehler.at> (cherry picked from commit edfe91372adfdaf5ee4e294fb0f5860a16adc551)
* ipq40xx: meraki: define DTB load addressRobert Marko2023-08-151-2/+1
| | | | | | | | | | | | | | | | | | | | | | It seems that the Meraki bootloader does not respect the kernel ARM booting specification[1] that requires that address where DTB is located needs to be 64-bit aligned and often places the DTB on a non 64-bit aligned address and then kernel fails to find the DTB magic and fails to boot. Even worse, there is no prints until early printk is enabled and then its visible that kernel is trying to find the ATAG-s as DTB was not found or is invalid. Unifi 6 devices had the same issue and it can be solved by passing the load adress as part of the FIT image. It seems that the vendor was aware of the issue and is always relocating the DTB to 0x89000000, so lets just do the same. Now that booting is reliable, reenable default images for the Meraki MR33 and MR74 devices. Reviewed-by: Lech Perczak lech.perczak@gmail.com Signed-off-by: Robert Marko <robimarko@gmail.com> (cherry picked from commit f1c80445bd7e3b2f7fc3e4c8136402b30834d4e9)
* ipq40xx: meraki: remove swconfig in DEVICE_PACKAGESRobert Marko2023-08-151-1/+1
| | | | | | | | ipq40xx was converted to DSA and swconfig is not being included at all in the default packages so there is no need to drop it from device packages. Signed-off-by: Robert Marko <robimarko@gmail.com> (cherry picked from commit bb4a25860f593790aaedc1b31dde33fbc519e7bf)
* ipq40xx: commonize Meraki recipeRobert Marko2023-08-151-8/+7
| | | | | | | | MR33 and MR74 share pretty much everything in the image recipe, so lets extract a common recipe to avoid duplication. Signed-off-by: Robert Marko <robimarko@gmail.com> (cherry picked from commit 9e9dc1890c6f58d858208136ecfa435445dfca09)
* kernel: bump 5.15 to 5.15.123John Audia2023-07-311-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Manually rebased: bcm4908/patches-5.15/071-v6.1-0001-net-broadcom-bcm4908_enet-handle-EPROBE_DEFER-when-g.patch bcm53xx/patches-5.15/180-usb-xhci-add-support-for-performing-fake-doorbell.patch ipq40xx/patches-5.15/902-dts-ipq4019-ap-dk04.1.patch[*] bcm27xx/patches-5.15/950-0600-xhci-quirks-add-link-TRB-quirk-for-VL805.patch bcm27xx/patches-5.15/950-0606-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch bcm27xx/patches-5.15/950-0717-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch Removed upstreamed: backport-5.15/735-v6.5-net-bgmac-postpone-turning-IRQs-off-to-avoid-SoC-han.patch[1] backport-5.15/817-v6.5-01-leds-trigger-netdev-Recheck-NETDEV_LED_MODE_LINKUP-o.patch[2] pending-5.15/143-jffs2-reduce-stack-usage-in-jffs2_build_xattr_subsys.patch[3] pending-5.15/160-workqueue-fix-enum-type-for-gcc-13.patch[4] bcm53xx/patches-5.15/036-v6.5-0003-ARM-dts-BCM5301X-Drop-clock-names-from-the-SPI-node.patch[5] bcm53xx/patches-5.15/036-v6.5-0015-ARM-dts-BCM5301X-fix-duplex-full-full-duplex.patch[6] ipq807x/patches-5.15/0048-v6.1-clk-qcom-reset-Allow-specifying-custom-reset-delay.patch[7] ipq807x/patches-5.15/0049-v6.2-clk-qcom-reset-support-resetting-multiple-bits.patch[8] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=02474292a44205c1eb5a03634ead155a3c9134f4 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=86b93cbfe104e99fd3d25a49748b99fb88101573 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=79b9ab357b6f5675007f4c02ff8765cbd8dc06a2 4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=d528faa9e828b9fc46dfb684a2a9fd8c2e860ed8 5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=5899bc4058e89d5110a23797ff94439c53b77c25 6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=95afd2c7c7d26087730dc938709e025a303e5499 7. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=40844343a8853a08b049d50c967e2a1e28f0ece6 8. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.123&id=6ad5ded420f5d96f7c65b68135f5787a1c7e58d7 Build system: x86/64 Build-tested: ramips/tplink_archer-a6-v3 Run-tested: ramips/tplink_archer-a6-v3 Co-authored-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John Audia <therealgraysky@proton.me> [rebased ipq40xx/patches-5.15/902-dts-ipq4019-ap-dk04.1.patch ] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 8590531048f138ff719c8b317c443a6a7538a762) [Refreshed on top of openwrt-23.05] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* ipq4019: fix support for AVM FRITZ!Repeater 3000Alexander Friese2023-07-271-0/+3
| | | | | | | | | new versions of the device have NAND with 8bit ECC which was not yet supported before. This change removes ECC restrictions. Signed-off-by: Alexander Friese <af944580@googlemail.com> (cherry picked from commit 6b11f0ec83ceb9747dcbb0ffca0882b90da46b59)
* ipq40xx: add support for Teltonika RUTX50David Bauer2023-07-265-2/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- CPU: Qualcomm IPQ4018 RAM: 256M Flash: 16MB SPI-NOR (W25Q128) 128MB SPI-NAND (XTX) WiFi: 2T2R (2GHz 802.11n ; 5 GHz 802.11ac) ETH: 4x LAN ; 1x WAN (Gigabit) CELL: Quectel RG501Q 3G/4G/5G UART: Available on the goldfinger connector (Pinout silkscreened) 115200 8N1 3V3 - Only connect RX / TX / GND Installation ------------ 1. Enable SSH in the Teltonika UI (System --> Administration --> Access Control) 2. Check from which partition set the device is currently running from. $ cat /proc/boot_info/rootfs/primaryboot In case this output reads 0, install a Software update from Teltonika first. After upgrade completion, check this file now reads 1 before continuing. 2. Transfer the OpenWrt factory image to the device using scp. Use the same password (user root!) as used for the Web-UI. $ scp -O openwrt-factory.bin root@192.168.1.1:/tmp 3. Connect to the device using ssh as the root user. 4. Install OpenWrt by writing the factory image to flash. $ ubiformat /dev/mtd16 -y -f /tmp/openwrt-factory.bin 5. Instruct the bootloaer to boot from the first partition set. $ echo 0 > /proc/boot_info/rootfs/primaryboot $ cat /proc/boot_info/getbinary_bootconfig > /tmp/bootconfig.bin $ cat /proc/boot_info/getbinary_bootconfig1 > /tmp/bootconfig1.bin $ mtd write /tmp/bootconfig.bin /dev/mtd2 $ mtd write /tmp/bootconfig1.bin /dev/mtd3 6. Reboot the device. $ reboot Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit 844bb4bfad84cc6267f9b138d1f63b07ed3b77d0)
* ipq40xx: move Teltonika RUT STM32 IO to specific DTSDavid Bauer2023-07-262-37/+37
| | | | | | | Prepare to re-use the DTS for the RUTX50. Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit dbc4be142e206e681ac53afa3fd1e4018e7843b7)
* ipq-wifi: fix upstream board-2.bin ZTE M289F snafuChristian Lamparter2023-07-041-1/+1
| | | | | | | | | | | | | | | | | | | | | The upstream board-2.bin file in the linux-firmware.git repository for the QCA4019 contains a packed board-2.bin for this device for both 2.4G and 5G wifis. This isn't something that the ath10k driver supports. Until this feature either gets implemented - which is very unlikely -, or the upstream boardfile is mended (both, the original submitter and ath10k-firmware custodian have been notified). OpenWrt will go back and use its own bespoke boardfile. This unfortunately means that 2.4G and on some revisions the 5G WiFi is not available in the initramfs image for this device. Fixes: #12886 Reported-by: Christian Heuff <christian@heuff.at> Debugged-by: Georgios Kourachanis <geo.kourachanis@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (cherry picked from commit 75505c5ec724b9b961dcb411bac1d4b9aede3e1d)
* ipq4019: add support for ZTE MF287+ aka DreiNeoAndreas Böhler2023-07-014-0/+408
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ZTE MF287+ is a LTE router used (exclusively?) by the network operator "3". The MF287 (i.e. non-plus aka 3Neo) is also supported (the only difference is the LTE modem) Specifications ============== SoC: IPQ4018 RAM: 256MiB Flash: 8MiB SPI-NOR + 128MiB SPI-NAND LAN: 4x GBit LAN LTE: ZTE Cat12 (MF287+) / ZTE Cat6 (MF287) WiFi: 802.11a/b/g/n/ac SoC-integrated MAC addresses ============= LAN: from config + 2 WiFi 1: from config WiFi 2: from config + 1 Installation ============ Option 1 - TFTP --------------- TFTP installation using UART is preferred. Disassemble the device and connect serial. Put the initramfs image as openwrt.bin to your TFTP server and configure a static IP of 192.168.1.100. Load the initramfs image by typing: setenv serverip 192.168.1.100 setenv ipaddr 192.168.1.1 tftpboot 0x82000000 openwrt.bin bootm 0x82000000 From this intiramfs boot you can take a backup of the currently installed partitions as no vendor firmware is available for download: ubiattach -m14 cat /dev/ubi0_0 > /tmp/ubi0_0 cat /dev/ubi0_1 > /tmp/ubi0_1 Copy the files /tmp/ubi0_0 and /tmp/ubi0_1 somewhere save. Once booted, transfer the sysupgrade image and run sysupgrade. You might have to delete the stock volumes first: ubirmvol /dev/ubi0 -N ubi_rootfs ubirmvol /dev/ubi0 -N kernel Option 2 - From stock firmware ------------------------------ The installation from stock requires an exploit first. The exploit consists of a backup file that forces the firmware to download telnetd via TFTP from 192.168.0.22 and run it. Once exploited, you can connect via telnet and login as admin:admin. The exploit will be available at the device wiki page. Once inside the stock firmware, you can transfer the -factory.bin file to /tmp by using "scp" from the stock frmware or "tftp". ZTE has blocked writing to the NAND. Fortunately, it's easy to allow write access - you need to read from one file in /proc. Once done, you need to erase the UBI partition and flash OpenWrt. Before performing the operation, make sure that mtd13 is the partition labelled "rootfs" by calling "cat /proc/mtd". Complete commands: cd /tmp tftp -g -r factory.bin 192.168.0.22 cat /proc/driver/sensor_id flash_erase /dev/mtd13 0 0 dd if=/tmp/factory.bin of=/dev/mtdblock13 bs=131072 Afterwards, reboot your device and you should have a working OpenWrt installation. Restore Stock ============= Option 1 - via UART ------------------- Boot an OpenWrt initramfs image via TFTP as for the initial installation. Transfer the two backed-up files to your box to /tmp. Then, run the following commands - replace $kernel_length and $rootfs_size by the size of ubi0_0 and ubi0_1 in bytes. ubiattach -m 14 ubirmvol /dev/ubi0 -N kernel ubirmvol /dev/ubi0 -N rootfs ubirmvol /dev/ubi0 -N rootfs_data ubimkvol /dev/ubi0 -N kernel -s $kernel_length ubimkvol /dev/ubi0 -N ubi_rootfs -s $rootfs_size ubiupdatevol /dev/ubi0_0 /tmp/ubi0_0 ubiupdatevol /dev/ubi0_1 /tmp/ubi0_1 Option 2 - from within OpenWrt ------------------------------ This option requires to flash an initramfs version first so that access to the flash is possible. This can be achieved by sysupgrading to the recovery.bin version and rebooting. Once rebooted, you are again in a default OpenWrt installation, but no partition is mounted. Follow the commands from Option 1 to flash back to stock. LTE Modem ========= The LTE modem is similar to other ZTE devices and controls some more LEDs and battery management. Configuring the connection using uqmi works properly, the modem provides three serial ports and a QMI CDC ethernet interface. Signed-off-by: Andreas Böhler <dev@aboehler.at> (cherry picked from commit f70ee53b08466f612546f699c556cbdaa39e1466)
* ipq40xx: Enable gpio-restart in kernel configurationAndreas Böhler2023-07-011-0/+1
| | | | | | | | Some ZTE devices require the gpio-restart driver to support restarting the LTE modem along with OpenWrt Signed-off-by: Andreas Böhler <dev@aboehler.at> (cherry picked from commit 9ffdaa7fa1478146b5d8c77d4b3a5d4d4007a487)
* ipq40xx: meraki-mr33, meraki-mr74: disable image generationLech Perczak2023-06-251-0/+2
| | | | | | | | | | | | | | After migrating to kernel 5.15, upgrading causes the units to become soft-bricked, hanging forever at the kernel startup. Kernel size limitation of 4000000 bytes is suspected here, but this is not fully confirmed. Disable the images to protect users from inadvertent bricking of units, because recovery of those is painful with Cisco's U-boot, until the root cause is found and fixed. Signed-off-by: Lech Perczak <lech.perczak@gmail.com> (cherry picked from commit 9d64cc068fbb15d9e6498c1eba79851823b2f4f5)
* ipq40xx: convert Buffalo WTR-M2133HP to DSAYanase Yuki2023-06-083-2/+31
| | | | | | | This commit convert WTR-M2133HP to DSA setup. Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp> (cherry picked from commit edb3a4162c0763ecc9d5e7660700a68a25bf28e3)
* ipq40xx: e2600ac-c1 remove KERNEL_SIZE张 鹏2023-05-311-2/+0
| | | | | | | | | | Currently, e2600ac-c1 cannot be built as the kernel is larger than the defined KERNEL_SIZE, however, there is no bootloader limit for the kernel size so remove KERNEL_SIZE completely. Signed-off-by: 张 鹏 <sd20@qxwlan.com> [ improve commit title, fix merge conflict ] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> (cherry picked from commit b764268acb7ed410d1d81e783f1b0ce407efda82)
* ipq40xx: add e2600ac c2 to dsa张 鹏2023-05-313-2/+44
| | | | | | | | | Convert E2600ac c2 to DSA and enable it. Signed-off-by: 张 鹏 <sd20@qxwlan.com> [ rename port to more generic name ] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> (cherry picked from commit 0dca52cf595cedcabec5d384ddc83f1954cca46d)
* ipq40xx: add e2600ac c1 to dsa张 鹏2023-05-313-2/+36
| | | | | | | | | Convert E2600ac c1 to DSA and enable it. Signed-off-by: 张 鹏 <sd20@qxwlan.com> [ rename port to more generic name ] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> (cherry picked from commit 7f2ecab0f4623e9b437b1a6656275695ac063fe4)
* kernel: remove obsolete kernel version switchesAleksander Jan Bajkowski2023-05-202-77/+0
| | | | | | | This removes unneeded kernel version switches from the targets after kernel 5.10 has been dropped. Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
* ipq40xx: convert EZVIZ CS-W3-WD1200G-EUP to DSAChristian Lamparter2023-05-203-2/+38
| | | | | | Convert the repeater to DSA. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: fix rebooting after 5.15.111Robert Marko2023-05-181-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kernel 5.15.111 includes backport of commit ("firmware: qcom_scm: Clear download bit during reboot") which is causing reboot on ipq40xx to stop working, more precisely the board will hang after reboot is called with: root@OpenWrt:/# reboot root@OpenWrt:/# [ 76.473541] device lan1 left promiscuous mode [ 76.474204] br-lan: port 1(lan1) entered disabled state [ 76.527975] device lan2 left promiscuous mode [ 76.530301] br-lan: port 2(lan2) entered disabled state [ 76.579376] device lan3 left promiscuous mode [ 76.581698] br-lan: port 3(lan3) entered disabled state [ 76.638434] device lan4 left promiscuous mode [ 76.638777] br-lan: port 4(lan4) entered disabled state [ 76.978489] qca8k-ipq4019 c000000.switch wan: Link is Down [ 76.978883] device eth0 left promiscuous mode [ 76.987077] ipqess-edma c080000.ethernet eth0: Link is Down [ Format: Log Type - Time(microsec) - Message - Optional Info Log Type: B - Since Boot(Power On Reset), D - Delta, S - Statistic S - QC_IMAGE_VERSION_STRING=BOOT.BF.3.1.1-00123 S - IMAGE_VARIANT_STRING=DAABANAZA S - OEM_IMAGE_VERSION_STRING=CRM S - Boot Config, 0x00000021 S - Reset status Config, 0x00000010 S - Core 0 Frequency, 0 MHz B - 261 - PBL, Start B - 1339 - bootable_media_detect_entry, Start B - 1679 - bootable_media_detect_success, Start B - 1693 - elf_loader_entry, Start B - 5076 - auth_hash_seg_entry, Start B - 7223 - auth_hash_seg_exit, Start B - 578349 - elf_segs_hash_verify_entry, Start B - 696356 - PBL, End B - 696380 - SBL1, Start B - 787236 - pm_device_init, Start D - 7 - pm_device_init, Delta B - 788701 - boot_flash_init, Start D - 52782 - boot_flash_init, Delta B - 845625 - boot_config_data_table_init, Start D - 3836 - boot_config_data_table_init, Delta - (419 Bytes) B - 852841 - clock_init, Start D - 7566 - clock_init, Delta B - 864883 - CDT version:2,Platform ID:9,Major ID:0,Minor ID:0,Subtype:64 B - 868413 - sbl1_ddr_set_params, Start B - 873402 - cpr_init, Start D - 2 - cpr_init, Delta B - 877842 - Pre_DDR_clock_init, Start D - 4 - Pre_DDR_clock_init, Delta D - 13234 - sbl1_ddr_set_params, Delta B - 891155 - pm_driver_init, Start D - 2 - pm_driver_init, Delta B - 909105 - Image Load, Start B - 1030210 - Boot error ocuured!. Error code: 303d So, until a proper fix is found, lets revert the culprit patch to have reboot working again. Fixes: 228e0e10398b ("kernel: bump 5.15 to 5.15.111") Signed-off-by: Robert Marko <robimarko@gmail.com>
* ipq-wifi: drop upstreamed board-2.binChristian Lamparter2023-05-181-20/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BDFs for the: Aruba AP-365 Devolo Magic 2 WiFi next Edgecore ECW5410 Edgecore OAP100 Extreme Networks WS-AP3915i GL.iNet GL-A1300 GL.iNet GL-AP1300 GL.iNet GL-S1300 Linksys EA8300 Linksys WHW03v2 Nokia Wi4A AC400i P&W R619AC Pakedge WR-1 Qxwlan E2600AC C1 Sony NCP-HG100/Cellular Teltonika RUTX10 ZTE MF18A were upstreamed to the ath10k-firmware repository and landed in linux-firmware.git. Furthermore the BDFs for the: 8devices Habanero 8devices Jalapeno Qxwlan E2600AC C2 have been updated. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: 5.15: add patch commenting unused sdhci functionChristian Marangi2023-05-121-0/+108
| | | | | | | | | | | | Add patch commenting unused sdhci function, hopin this will be dropped when the problem is actually found. Fix compilation warning: drivers/mmc/host/sdhci-msm.c:1781:13: error: 'sdhci_msm_set_clock' defined but not used [-Werror=unused-function] 1781 | static void sdhci_msm_set_clock(struct sdhci_host *host, unsigned int clock) | ^~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ipq40xx: add PSGMII PHY mode to phylink_get_linkmodes()Robert Marko2023-05-121-4/+12
| | | | | | | | | | | | | | | Upstream commit ("net: phylink: add generic validate implementation") was backported, however PSGMII PHY mode patch for ipq40xx was not updated to add PSGMII to phylink_get_linkmodes() so the following warning would be printed during kernel compilation: drivers/net/phy/phylink.c: In function 'phylink_get_linkmodes': drivers/net/phy/phylink.c:360:9: error: enumeration value 'PHY_INTERFACE_MODE_PSGMII' not handled in switch [-Werror=switch] 360 | switch (interface) { | ^~~~~~ Resolve the warning by adding the PSGMII mode to phylink_get_linkmodes(). Signed-off-by: Robert Marko <robimarko@gmail.com>
* kernel: improve handling of CONFIG_IO_URINGTony Ambardar2023-05-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | Kernel setting CONFIG_IO_URING supports high-performance I/O for file access and servers, generally for more performant platforms, and adds ~45 KB to kernel sizes. The need for this on less "beefy" devices is questionable, as is the size cost considering many platforms have kernel size limits which require tricky repartitioning if outgrown. The size cost is also large relative to the ~180 KB bump expected between major OpenWRT kernel releases. No OpenWrt packages have hard dependencies on this; samba4 and mariadb can take advantage if available (+KERNEL_IO_URING:liburing) but otherwise build and work fine. Since CONFIG_IO_URING is already managed via the KERNEL_IO_URING setting in Config-kernel.in (default Y), remove it from those target configs which unconditionally enable it, and update the defaults to enable it conditionally only on more powerful 64-bit x86 and arm devices. It may still be manually enabled as needed for high-performance custom builds. Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
* kernel: fix handling of CONFIG_DYNAMIC_DEBUGTony Ambardar2023-05-031-1/+0
| | | | | | | | | | Since CONFIG_DYNAMIC_DEBUG is already managed via the KERNEL_DYNAMIC_DEBUG setting in Config-kernel.in (default N), remove or disable it in target configs which unconditionally enable it, along with the related setting CONFIG_DYNAMIC_DEBUG_CORE. This saves several KB in the kernels for ipq40xx, ipq806x, filogic, mt7622, qoriq, and sunxi. Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
* ipq40xx: convert AVM FRITZ!Repeater 3000 to DSANick Hainke2023-05-033-2/+22
| | | | | | Convert the repeater to DSA. Signed-off-by: Nick Hainke <vincent@systemli.org>
* kernel: bump 5.15 to 5.15.109John Audia2023-04-301-1/+1
| | | | | | | | | | | | | | | Removed upstreamed: backport-5.15/743-v6.3-0005-net-dsa-b53-mmap-add-phy-ops.patch[1] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.109&id=357fa038d93d0e9159a0f0d45bae0f8654e2ade5 Build system: x86_64 Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia <therealgraysky@proton.me>
* ipq40xx: convert GL-AP1300 to DSANick Hainke2023-04-244-6/+37
| | | | | | | | | | Convert GL-AP1300 to DSA and enable it. While working on it rename the GL-AP1300 leds from green to white. Tested-by: Rob White <rob@blue-wave.net> Tested-by: Robert Sommer <frauhottelmann@gmail.com> Signed-off-by: Nick Hainke <vincent@systemli.org>
* ipq40xx: convert AP-365 to DSADavid Bauer2023-04-152-2/+2
| | | | | | | | | Re-enable the Aruba AP-365 with DSA support. Changes are trvivial, as the board design is pretty much the already updated AP-303. Run-tested on the device. Signed-off-by: David Bauer <mail@david-bauer.net>
* base-files: fix Linksys upgrade, restore config stepMichael Trinidad2023-04-111-1/+1
| | | | | | | | | | | | | It appears that the refactor of the upgrade process for NAND devices resulted in the nand_do_upgrade_success step not being called for devices using the linksys.sh script. As a result, configuration was not preserved over sysupgrade steps. This corrects a typo in the call of nand_do_upgrade_failed for ipq40xx and ipq806x devices using the linksys.sh script. Fixes: 8634c1080d50 ("ipq40xx: Fix Linksys upgrade, restore config step") Fixes: 2715aff5df83 ("ipq806x: Fix Linksys upgrade, restore config step") Signed-off-by: Michael Trinidad <trinidude4@hotmail.com>
* ipq40xx: add LED functions for Google WiFiJan-Niklas Burfeind2023-03-311-2/+9
| | | | | | | | | | | | | | | | | Add LED function properties for the LED controller to avoid failing driver probe with kernel 5.15. While at it, also define the OpenWrt LED indicator patterns for this device. Ref commit 583ac0e11df7 ("mpc85xx: update lp5521 led-controller node for 5.10") Google uses white for running and red for an issue Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me> Tested-by: Andrijan Möcker <amo@ct.de> Reviewed-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: David Bauer <mail@david-bauer.net>
* ipq40xx: add reset button for Google WiFi (Gale)Jan-Niklas Burfeind2023-03-311-1/+14
| | | | | | | | | | Add the external reset button for use with OpenWrt. Co-authored-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me> Reviewed-by: Brian Norris <computersforpeace@gmail.com> Tested-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: David Bauer <mail@david-bauer.net>
* ipq40xx: Fix Linksys upgrade, restore config stepJeff Kletsky2023-03-261-1/+6
| | | | | | | | | | | | | | | | | | | | It appears that the refactor of the upgrade process for NAND devices resulted in the nand_do_upgrade_success step not being called for devices using the linksys.sh script. As a result, configuration was not preserved over sysupgrade steps. This was restored for some devices in commit 84ff6c90dda1 ("base-files: bring back nand_do_upgrade_success"). This restored preservation of config for ipq40xx devices using the linksys.sh script. Other devices and targets have not been examined. Closes: #11677 Fixes: e25e6d8e54 ("base-files: fix and clean up nand sysupgrade code") Tested-on: EA8300 Signed-off-by: Jeff Kletsky <git-commits@allycomm.com> (checkpatch nitpick) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: add support for Wallystech DR40x9Robert Marko2023-03-215-1/+441
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for the Wallys DR40x9 series boards. They come in IPQ4019 and IPQ4029 versions. IPQ4019/4029 only differ in that that IPQ4029 is the industrial version that is rated to higher temperatures. Specifications are: * CPU: Qualcomm IPQ40x9 (4x ARMv7A Cortex A7) at 716 MHz * RAM: 512 MB * Storage: 2MB of SPI-NOR, 128 MB of parallel NAND * USB 3.0 TypeA port for users * MiniPCI-E with PCI-E 2.0 link * MiniPCI-E for LTE modems with only USB2.0 link * 2 SIM card slots that are selected via GPIO11 * MicroSD card slot * Ethernet: 2x GBe with 24~48V passive POE * SFP port (Does not work, I2C and GPIO's not connected on hardware) * DC Jack * UART header * WLAN: In-SoC 2x2 802.11b/g/n and 2x2 802.11a/n/ac * 4x MMCX connectors for WLAN * Reset button * 8x LED-s Installation instructions: Connect to UART, pins are like this: -> 3.3V | TX | RX | GND Settings are 115200 8n1 Boot initramfs from TFTP: tftpboot 0x84000000 openwrt-ipq40xx-generic-wallys_dr40x9-initramfs-fit-uImage.itb bootm Then copy the sysupgrade image to the /tmp folder and execute sysupgrade -n <image_name> The board file binary was provided from Wallystech on March 14th 2023 including full permission to use and distribute. Signed-off-by: Robert Marko <robert.marko@sartura.hr> Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
* ipq40xx: mf18a: rename wifi0 calibration variant to ZTE-MF18AChristian Marangi2023-03-181-1/+1
| | | | | | | Rename wifi0 calibration variant to ZTE-MF18A to allign to BDF changes for ZTE MF18A. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ipq40xx: rutx10: Add missing variant to ath10k wifiChristian Marangi2023-03-181-0/+10
| | | | | | | Add missing variant to ath10k wifi to allign to BDF changes for Teltonika RUTX10. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ipq40xx: mf18a: Add missing variant to PCI ath10k cardChristian Marangi2023-03-181-0/+1
| | | | | | | Add missing variant to PCI ath10k card to allign to BDF changes for ZTE MF18A. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ipq40xx: update Crisis Innovation Lab MeshPoint.One BDFMantas Pucka2023-03-171-1/+1
| | | | | | | | | | Make sure it uses updated Jalapeno BDF inherited from Device/8dev_jalapeno-common Fixes: 146eb4925c7f ("ipq40xx: add support for Crisis Innovation Lab MeshPoint.One") Signed-off-by: Mantas Pucka <mantas@8devices.com> [ fix Fixes tag to correct format and fix commit title ] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ipq40xx: set specific BDF file for 8devices Habanero/JalapenoMantas Pucka2023-03-171-0/+2
| | | | | | | | | Set specific BDF file for 8devices Habanero/Jalapeno in ipq40xx generic.mk Signed-off-by: Mantas Pucka <mantas@8devices.com> [ split ipq40xx changes in separate commit ] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ipq40xx: convert Netgear EX6100/EX6150 v2 to DSADavid Bauer2023-03-083-5/+19
| | | | Signed-off-by: David Bauer <mail@david-bauer.net>
* ipq40xx: Linksys MR8300: fix the USB port powerDaniel González Cabanelas2023-02-251-1/+11
| | | | | | | | | | | | | The USB port on the MR8300 randomly fails to feed bus-powered devices. This is caused by a misconfigured pinmux. The GPIO68 should be used to enable the USB power (active low), but it's inside the NAND pinmux. This GPIO pin was found in the original firmware at a startup script in both MR8300 and EA8300. Therefore apply the fix for both boards. Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com> Reviewed-by: Robert Marko <robimarko@gmail.com>
* ipq40xx: chromium: Enable kmod-ramoops by defaultBrian Norris2023-02-181-1/+5
| | | | | | | | Chromium devices (like Google WiFi) have ramoops memory reserved by the bootloader. Let's enable the ramoops kernel module by default, so we get better crash logging. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* treewide: replace /sys/devices/virtual/ubi by /sys/class/ubiDaniel Golle2023-02-151-1/+1
| | | | | | | | | | Starting from Linux Kernel version 6.3 UBI devices will no longer be considered virtual, but rather have an MTD device parent. Hence they will no longer be listed under /sys/devices/virtual/ubi which is used in multiple places in OpenWrt. Prepare for future kernels by using /sys/class/ubi instead of /sys/devuces/virtual/ubi. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ipq40xx: fix dts whitespaceFelix Baumann2023-02-092-2/+2
| | | | | | Remove whitespace from otherwise empty lines Signed-off-by: Felix Baumann <felix.bau@gmx.de>
* ipq4019: fix dts white-spaceFelix Baumann2023-02-088-438/+438
| | | | | | | Replace blanks with tabs Remove whitespace from otherwise empty lines Signed-off-by: Felix Baumann <felix.bau@gmx.de>