aboutsummaryrefslogtreecommitdiff
path: root/target
Commit message (Collapse)AuthorAge
* kernel: allow adding devices without hw offload to a hw flowtableFelix Fietkau2023-09-01
| | | | | | This allows supporting a mix of devices with or without hw offloading support Signed-off-by: Felix Fietkau <nbd@nbd.name>
* bcm53xx: store a copy of NVRAM content in NVMEM driverRafał Miłecki2023-09-01
| | | | | | | | This stops NVMEM driver from using MMIO access past booting and messing with NAND controller state. Link: https://forum.openwrt.org/t/asus-rt-ac88u-hw-a6-broken-in-22-03-3/147882 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mediatek: mt7622: set DEVICE_DTC_ADDR for BPi-R64Daniel Golle2023-08-31
| | | | | | | | Relocating the device tree is required for being apply to apply device tree overylay at boot. Fixes: 34bb33094a ("mediatek: use updated device tree overlay mechanism for BPi-R64") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* kernel: add unset CONFIG_INPUT_IBM_PANEL symbol to config-6.1Rafał Miłecki2023-08-31
| | | | | | | | | | | | | This symbol was added by commit 2e6f34faa7e0 ("Input: Add IBM Operation Panel driver") to v6.1. It depends on I2C so it's available to limited amount of targets. It needs to be specified thought to allow kernel configuration. For bcm53xx this fixes: IBM Operation Panel driver (INPUT_IBM_PANEL) [N/m/?] (NEW) Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
* kernel: backport v6.6 nvmem changesRafał Miłecki2023-08-31
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* kernel: ensure VFIO related suboptions are disabledMathew McBride2023-08-29
| | | | | | | | | | | These suboptions (PLATFORM, FSL_MC and MLX5_VFIO_PCI) may be prompted for when VFIO is enabled, regardless of architecture. These are not related to the main vfio use case (passthrough of PCIe devices) Signed-off-by: Mathew McBride <matt@traverse.com.au>
* mediatek: filogic: remove stray quoteDaniel Golle2023-08-28
| | | | | | | | When adapting the network configuration for MT7988 RFB a stray quote was left in a script. Remove it to fix generating the default network configuration. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* generic: sync MediaTek Ethernet driver with upstreamDaniel Golle2023-08-28
| | | | | | | 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>
* mediatek: add support for Ubiquiti UniFi 6 LR v3Daniel Golle2023-08-28
| | | | | | | | | Some recent models of the Ubiquiti Networks UniFi 6 LR access point come with a RealTek RTL8211FS 1000M/100M/10M PHY instead of the Aquantia AQR112 2500M/1000M/100M/10M PHY used in both v1 and v2. Add build for this variant so we can support Ethernet with the PHY. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: generate bootloader artifacts for mt7988_rfbDaniel Golle2023-08-28
| | | | | | | Switch to OpenWrt uImage.FIT bootmethod and include various bootloader artifacts with the generated binaries. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: improve mt7981.dtsiDaniel Golle2023-08-28
| | | | | | | * re-factor WED components to boot fine also on limited loaders * add LEDs of integrated GE PHY Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: filogic: improve pinctrl driversDaniel Golle2023-08-28
| | | | | | | Set correct pull-type data and add additional uart groups for MT7981. Assign functions to configure pin bias for MT7986. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: i2c: mt65xx: allow optional pmic clockDaniel Golle2023-08-28
| | | | | | | | | | | | | Using the I2C host controller on the MT7981 SoC requires 4 clocks to be enabled. One of them, the pmic clk, is only enabled in case 'mediatek,have-pmic' is also set which has other consequences which are not desired in this case. Allow defining a pmic clk even in case the 'mediatek,have-pmic' propterty is not present and the bus is not used to connect to a pmic, but may still require to enable the pmic clock. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: re-add missing patch for Linux 6.1Daniel Golle2023-08-28
| | | | | | | | | The patch was wrongly tagged as being part of Linux 6.0 even though it was only committed with Linux 6.2 and hence needs to be backported for Linux 6.1. Fixes: fa79baf4a6 ("generic: copy backport, hack, pending patch and config from 5.15 to 6.1") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: re-add dropped properties on BPi-R3Daniel Golle2023-08-28
| | | | | | | | | | | Unfortunately some device tree properties have slipped under the table when switching from our downstream device tree. Bring back 3W power for SFP cages and restore thermal trip points to make sense again. Fixes: 7a0ec001ff ("mediatek: sync MT7986 device trees with upstream") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* bcm53xx: Add support for D-Link DIR-890LLinus Walleij2023-08-28
| | | | | | | | | | | | | | | | | The DIR-890L is very similar to DIR-885L, but has both USB2 and USB3. The signature for the wrgac36 board was copied from DD-Wrt. The DIR-890L bootstrap will only load the first 2 MB after the SEAMA header in the NAND flash, uncompress it with LZMA and execute it. Since the compressed kernel will not fit in 2 MB we have a problem. Solve this by putting a LZMA compressed U-Boot into the first 128 KB of the flash followed by the kernel. The bootstrap will then uncompress and execute U-Boot and then we let U-Boot read the kernel from flash and execute it. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* ipq806x: onhub: Enable adm_dma nodeBrian Norris2023-08-27
| | | | | | | | | | One of our SPI devices references this node, but we never enabled it. This clutters up probe deferral logs. (NB: this SPI device still doesn't have a real driver, so it's just here for documentation and/or tinkering.) Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* ipq806x: chromium: Disable kernel's CONFIG_QCOM_SPMBrian Norris2023-08-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The qcom spm driver is currently broken for IPQ8064 OnHub devices on kernel 6.1, such that it hangs the system when booting, much to the consternation of users. This is especially bad as these devices don't yet have a fully-supported release branch, and are still sometimes landing on snapshot builds. OnHub devices have their own kernel config, so it's not that wide of an impact to disable this. I haven't fully gotten to the bottom of this, but: (a) The vendor kernel didn't have any SPM driver at all, and didn't utilize cpuidle. (b) The device tree has never included any (non-disabled) cpuidle states, so even when this driver was present on 5.15 (last known-working kernel), it didn't actually do anything -- it bailed early, before ever doing any SPM initialization. (c) Refactoring in Linux 5.16 [1] caused the SPM driver to be activated unconditionally, including setting us into standby mode (PM_SLEEP_MODE_STBY) by default. Removing the one PM_SLEEP_MODE_STBY line from drivers/soc/qcom/spm.c seems to fix the problem, but that isn't much different than simply disabling the driver, so I go with that for now. I also disable CONFIG_ARM_QCOM_SPM_CPUIDLE, becuase it 'select's QCOM_SPM. NB: it's possible there's some other deeper root cause involved in here. For one, I notice that CPU hotplug (e.g., echo 0 > /sys/devices/system/cpu/cpu1/online, echo 1 > ...) doesn't work right either. Perhaps there's some mismatch on upstream Linux qcom-scm behavior and the old boot firmware used for these systems? It wouldn't be the first time, as we've had some similar incompatibilities on the next generation of these devices, Google WiFi [2]. [1] Commit 60f3692b5f0b ("cpuidle: qcom_spm: Detach state machine from main SPM handling") [2] [RFC] qcom_scm: IPQ4019 firmware does not support atomic API? https://lore.kernel.org/linux-arm-kernel/20200913201608.GA3162100@bDebian/ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* rockchip: add support for PINE64 ROCK64Antonio Flores2023-08-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This add support for PINE64 ROCK64, rockchip rk3328 board. Specifications: 4 x ARM Cortex A53 cores @ 1.5 GHz ARM Mali 450 MP2 GPU LPDDR3 RAM (up to 4GB) Gigabit Ethernet Micro SD Slot eMMC module slot SPI Flash 128Mbit 4K digital video out 2x USB 2.0 Host 1x USB 3.0 Host PI-2 bus PI-P5+ bus IR R/X port Real Time Clock (RTC) port Power Over Ethernet (POE) (when using optional HAT module) A/V jack Power, Reset and Recovery buttons 3.5mm barrel power (5V 3A) port To install write image to the sd using dd (dd if=*.img of=/*) Signed-off-by: Antonio Flores <antflores627@gmail.com>
* ramips: add support for D-Link DRA-1360Rani Hod2023-08-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DRA-1360 rev A is a wall-plug AC1300 repeater. Hardware is identical (same FCC ID, black case instead of white) to D-Link DAP-1620 rev B, which is already supported, but a different model name, revision, and hardware ID are needed. Thus, the bulk of the DAP-1620 device tree is extracted to a common dtsi included by the two models' device trees. Repeating specs and installation instructions from e4c7703: (note that the RAM size mentioned there was incorrect, oops) Specs: - SoC: MT7621AT (880MHz dual-core MIPS1004Kc) - Memory: 128 MiB RAM, 16 MiB NOR SPI - WiFi: MT7615DN 2x2 802.11n + 2x2 802.11ac (DBDC) - Ethernet: 1 RJ45 port 10/100/1000 - Power/status LED: red+green - LED RSSI bargraph: 2x green, 1x red+green Installation: - Keep reset button pressed during plug-in - Web Recovery Updater is at 192.168.0.50 (pings are ignored, it listens only for http) - Upload factory.bin, confirm flashing (seems to work best with Chromium-based browsers) Revert to OEM firmware: - tail -c+117 DRA1360A1_FW112B03.bin | \ openssl aes-256-cbc -d -md md5 -out decrypted.bin \ -k c471706398cb147c6619f8a04a18d53e9c17ede8 - flash decrypted.bin via D-Link Web Recovery Signed-off-by: Rani Hod <rani.hod@gmail.com>
* kernel: bump 5.15 to 5.15.128John Audia2023-08-27
| | | | | | | | | | | | Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.128 All patches automatically rebased. Build system: x86_64 Build-tested: ramips/tplink_archer-a6-v3 Run-tested: ramips/tplink_archer-a6-v3 Signed-off-by: John Audia <therealgraysky@proton.me>
* ipq40xx: re-add label MAC address for FritzBox 4040Fabian Bläse2023-08-27
| | | | | | | | | | | | | | The MAC address of the GMAC is contained inside the CWMP-Account number on the label. The label MAC address alias was defined previously, but it has been removed with the switch to IPQESS / DSA. Restore the label MAC address alias. Fixes: 27b441cbaf42 ("ipq40xx: drop ESSEDMA + AR40xx DTS nodes") Signed-off-by: Fabian Bläse <fabian@blaese.de> Reviewed-by: Robert Marko <robimarko@gmail.com>
* x86: remove built-in vhost-net driverMathew McBride2023-08-26
| | | | | | This is now available as a kmod package (kmod-vhost-net). Signed-off-by: Mathew McBride <matt@traverse.com.au>
* kernel: bump 6.1 to 6.1.47John Audia2023-08-26
| | | | | | | | | | | | Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.47 All patches automatically rebased. Build system: x86/64 Build-tested: x86/64/AMD Cezanne Run-tested: x86/64/AMD Cezanne Signed-off-by: John Audia <therealgraysky@proton.me>
* mediatek: enable NMBM remapping for NWA50AX Pro UBIDavid Bauer2023-08-25
| | | | | | | | | Don't skip remapping of the UBI area for the ZyXEL NWA50AX Pro. This is due to the kernel being loaded from the UBI partition by U-Boot. Link: https://github.com/openwrt/openwrt/pull/13335 Signed-off-by: David Bauer <mail@david-bauer.net>
* sunxi: add testing kernel 6.1Zoltan HERPAI2023-08-24
| | | | | | | | | | | | Compile-tested: all targets Runtime-tested: - Cortex-A53: Pine64+ - Cortex-A7: Bananapro, Orange Pi 2 - Cortex-A8: pcDuino v2 Patches refreshed. Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
* sunxi: copy patches from 5.15 to 6.1Zoltan HERPAI2023-08-24
| | | | | | To start the migration, we copy the patches from 5.15 to 6.1. Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
* ath79: fix first reboot issue on Netgear WNDR4300 v2 and WNDR4500 v3Shiji Yang2023-08-24
| | | | | | | | | | | | | | | From the Netgear u-boot GPL code[1]. Bootloader always unconditionally marks block 768, 1020 - 1023 as bad blocks on each boot. This may lead to conflicts with the OpenWrt nand driver since these blocks may be good blocks. In this case, U-boot will override the oob of these blocks so that break the ubi volume. The system will be damaged after first reboot. To avoid this issue, manually skip these blocks by using "mtd-concat". [1] https://www.downloads.netgear.com/files/GPL/EX7300v2series-V1.0.0.146_gpl_src.tar.bz2.zip Fixes: https://github.com/openwrt/openwrt/issues/8878 Tested-by: Yousaf <yousaf465@gmail.com> Signed-off-by: Shiji Yang <yangshiji66@qq.com>
* ath79: rework Netgear nand devices image recipeShiji Yang2023-08-24
| | | | | | | | | | | | | | | | | | In Netgear u-boot GPL code, nand devices uses this formula to locate the rootfs offset. offset = (((128 + KERNEL_SIZE) / BLOCK_SIZE) + 1) * BLOCK_SIZE; Howerver, WNDR4500 source code incorrectly define the nand block size to 64k. In some cases, it causes u-boot can't get the correct rootfs offset, which result in boot failure. This patch workaround it by padding kernel size to (128k * n - 128 - 1). The additional char '\0' is used to ensure the (128 + KERNEL_SIZE) can't be divided by the BLOCK_SIZE. Fixes: https://github.com/openwrt/openwrt/issues/13050 Fixes: 3c1512a25d92 ("ath79: optimize the firmware recipe for Netgear NAND devices") Tested-by: Yousaf <yousaf465@gmail.com> Signed-off-by: Shiji Yang <yangshiji66@qq.com>
* mediatek: enable NWA50AX Pro eth LEDsDavid Bauer2023-08-22
| | | | | | | | | | | | | Enable the ethernet LED's on the ZyXEL NWA50AX Pro to show link-state as well as activity. Both LED's are configured pulsing. AMBER | 10/100 GREEN | 1000 A+G | 2500 Signed-off-by: David Bauer <mail@david-bauer.net>
* mediatek: filogic: wax220: cleanup device treeStefan Agner2023-08-22
| | | | | | | Fix compatible string to match what is supported upstream, fix alignment and order MTD partitions according to offset. Signed-off-by: Stefan Agner <stefan@agner.ch>
* mediatek: filogic: wax220: support factory imageStefan Agner2023-08-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable building a factory image which can be flashed through the OEM firmware's web interface. It seems that the web interface requires a minimum file size of 10MiB, otherwise it will not accept the image. The update image is a regular sysupgrade tarball packed in a Netgear encrypted image. The Netgear encrypted image is the same as used in WAX202 or WAX206, including the encryption keys and IV. This adds a script which creates the rootfs_data volume on first startup. This is required since the OEM firmware's sysupgrade scripts do not create such a paritition. Note that any script ordered after 70_initramfs_test will not get executed on initramfs. Hence this new script 75_rootfs_prepare won't create the rootfs_data volume when using the recovery initramfs. Also, this deletes the kernel_backup and rootfs_backup volumes in case we have to create the rootfs_data volumes. This makes sure that OpenWrt is the actual backup firmware instead of the stock firmware. References in WAX220 GPL source: https://www.downloads.netgear.com/files/GPL/WAX220-V1.0.2.8-gpl-src.tar.gz * package/base-files/files/lib/upgrade/nand.sh:186 Creation of rootfs_data is disabled * Uboot-upstream/board/mediatek/common/ubi_helper.c Automatic creation of UBI backup volumes Signed-off-by: Stefan Agner <stefan@agner.ch>
* mediatek: add missing packages for Acer Predator W6David Bauer2023-08-22
| | | | | | Add missing packages for creating the overlay filesystem. Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: add support for I-O DATA WN-DEAX1800GRINAGAKI Hiroshi2023-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I-O DATA WN-DEAX1800GR is a 2.4/5 GHz band 11ax (Wi-Fi 6) router, based on MT7621A. Specification: - SoC : MediaTek MT7621A - RAM : DDR3 256 MiB (Nanya NT5CC128M16JR-EK) - Flash : RAW NAND 128 MiB (Winbond W29N01HVSINF) - WLAN : 2.4/5 GHz (MediaTek MT7915) - Ethernet : 5x 10/100/1000 Mbps - Switch : MT7530 (SoC) - LEDs/Keys : 6x/3x - UART : through-hole on PCB (J2) - assignment: 3.3V, GND, TX, RX from "1" marking - settings : 115200n8 - Power : 12 VDC, 1 A Flash instruction using initramfs-factory image: 1. Boot WN-DEAX1800GR normally 2. Access to "http://192.168.0.1/" and open firmware update page ("ファームウェア") 3. Select the OpenWrt initramfs-factory.bin image and click update ("更新") button to perform firmware update 4. On the initramfs image, perform sysupgrade with the squashfs-sysupgrade.bin image 5. Wait ~120 seconds to complete flashing Note: - This device has 2x OS images on the flash storage. In this support, the first one will be used. Warning: - Do not use "saveenv" command on U-Boot CLI. This device has wrong u-boot-env data. The actual length of individual env data installed to the device is 0x1000 (4 KiB), but installed U-Boot requires 0x20000 (128 KiB). So U-Boot determines the data is invalid. Then, if you perform saving environment data with saveenv on U-Boot CLI, installed env data will be overwritten with too few default values without individual values (SSID, password, MAC addresses, etc...). MAC addresses: LAN : 50:41:B9:xx:xx:F4 (Config, ethaddr (text)) WAN : 50:41:B9:xx:xx:F6 (Config, wanaddr (text)) 2.4 GHz: 50:41:B9:xx:xx:F4 (Config, rmac (text) / Factory, 0x4 (hex)) 5 GHz : 50:41:B9:xx:xx:F5 (none) Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ramips: improve sysupgrade helpers for I-O DATA devicesINAGAKI Hiroshi2023-08-20
| | | | | | | | | | | | | | | | | | | | I-O DATA devices manufactured by MSTC (MitraStar Technology Corp.) have some important flags for booting, "bootnum" and "debugflag". The almost devices have both flags but some devices have only "bootnum" flag. So optimize helper functions in iodata.sh to set each flags. - both: - WN-AX1167GR2 - WN-AX2033GR - WN-DX1167R - WN-DX1200GR - WN-DX2033GR - "bootnum" only - WN-DEAX1800GR Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* filogic: support Telenor branded ZyXEL EX5700Bjørn Mork2023-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Telenor quirks -------------- The operator specific firmware running on the Telenor branded ZyXEL EX5700 includes U-Boot modifications affecting the OpenWrt installation. Notable changes to U-Boot include - environment is stored in RAM and reset to defaults when power cycled - dual partition scheme with "nomimal" or "rescue" systems, falling back to "rescue" unless the OS signals success in 3 attempts - several runtime additions to the device-tree Some of these modifications have side effects requiring workarounds - U-Boot modifies /chosen/bootargs in an unsafe manner, and will crash unless this node exists - U-Boot verifies that the selected rootfs UBI volume exists, and refuses to boot if it doesn't. The chosen "rootfs" volume must contain a squashfs signature even for tftp or initramfs booting. - U-Boot parses the "factoryparams" UBI volume, setting the "ethaddr" variable to the label mac. But "factoryparams" does not always exist. Instead there is a "RIP" volume containing all the factory data. Copying the "RIP" volume to "factoryparams" will fix this Hardware -------- SOC: MediaTek MT7986 RAM: 1GB DDR4 FLASH: 512MB SPI-NAND (Mikron xxx) WIFI: Mediatek MT7986 802.11ax 5 GHz Mediatek MT7916 DBDC 802.11ax 2.4 + 6 GHz ETH: MediaTek MT7531 Switch + SoC 3 x builtin 1G phy (lan1, lan2, lan3) 2 x MaxLinear GPY211C 2.5 N-Base-T phy (lan4, wan) USB: 1 x USB 3.2 Enhanced SuperSpeed port UART: 3V3 115200 8N1 (Pinout: GND KEY RX TX VCC) Installation ------------ 1. Download the OpenWrt initramfs image. Copy the image to a TFTP server reachable at 192.168.1.2/24. Rename the image to C0A80101.img. 2. Connect the TFTP server to lan1, lan2 or lan3. Connect to the serial console, Interrupt the autoboot process by pressing ESC when prompted. 3. Download and boot the OpenWrt initramfs image. $ env set uboot_bootcount 0 $ env set firmware nominal $ tftpboot $ bootm 4. Wait for OpenWrt to boot. Transfer the sysupgrade image to the device using scp and install using sysupgrade. $ sysupgrade -n <path-to-sysupgrade.bin> Missing features ---------------- - The "lan1", "lan2" and "lan3" port LEDs are driven by the switch but OpenWrt does not correctly configure the output. - The "lan4" and "wan" port LEDs are driven by the GPH211C phys and not configured by OpenWrt. Signed-off-by: Bjørn Mork <bjorn@mork.no>
* mediatek: filogic: set wan label in preinitBjørn Mork2023-08-20
| | | | | | | | | Implement the functionality of target/linux/ramips/patches-5.15/700-net-ethernet-mediatek-support-net-labels.patch in userspace, since the driver patch has been rejected as a generic solution: https://github.com/openwrt/openwrt/pull/11435 Signed-off-by: Bjørn Mork <bjorn@mork.no>
* ipq807x: add support for Netgear RAX120v2Thomas Kupper2023-08-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Netgear Nighthawk RAX120v2 AX WIFI router with 5 1G and 1 5G ports. The majority of the code is based on @jewwest's PR #11830. Specifications: * CPU: Qualcomm IPQ8074 Quad core Cortex-A53 2.2GHz * RAM: 1024MB of DDR3 (Nanya NT5CC256M16EP-EK × 2) * Flash: SPI-NAND 512 MiB (Winbond W29N04GZBIBA) * Ethernet: 4x 10/100/1000 Mbps LAN, 1x 10/100/1000 Mbps WAN (Qualcomm QCA8075), 1x 10/100/1000/2500/5000 Mbps LAN/WAN (Aquantia AQR111B0 PHY) * Wi-Fi: * 2.4 GHz: Qualcomm QCN5024 4x4 * 2x 5 GHz: Qualcomm QCN5054 4x4 * USB: 2x USB 3.0 * LEDs: Power, 2.4GHz & 5GHz Radio, WPS, WAN, USB1 & USB2, 5G LAN * Keys: LEDs On/Off, Power, Reset, RFKILL, WPS * UART: Marked J9003 VCC TX RX GND, beginning from "1". 3.3v, 115200n8 * Power: 19 VDC, 3.1 A Installation: * Flashing OpenWrt is done in two steps: a) Flash *-squashfs-web-ui-factory.img from stock UI (thanks to @wangyu-). This writes an initramfs based OpenWrt image onto the RAX120v2 b) From OpenWrt flash the *-squashfs-sysupgrade.bin using LuCI or the commandline * U-Boot allows booting an initramfs image via TFTP: - Set ip of your PC to 192.168.1.100 - At the serial console interrupt boot at "Hit any key to stop autoboot:" - In u-boot run `tftpsrv` - On your PC send the OpenWrt initramfs image: tftp 192.168.1.1 -m binary -c put openwrt-ipq807x-generic-netgear_rax120v2-initramfs-uImage.itb Make 5G Aquantia phy work: For the 5G port labeled 'lan5' to work a firmware is needed. This can be loaded in u-boot by writing the firmware to the correct mtd partition. The firmware file found in the Netgear stock firmware under /lib/firmware/ named 'AQR-G3_v4.3.C-AQR_DNI_DR-EQ35AX8-R-prov1_ID23888_VER1311.cld' is needed and has to be converted to a MBN file. The `mkheader.py` script used here can be found in the Netgear V1.2.8.40 GPL source, under 'git_home/u-boot.git/tools/mkheader.py' Convert the CLD file to MBN using: $ python2 mkheader.py 0x44000000 0x13 <*.cld file> aqr_4.3.C.mbn This MBN file can then be flashed to the MTD partition to be used by u-boot. The necessary files can also be found in https://github.com/boretom/openwrt-fork/tree/rax120v2/aquantia-firmware * Write MBN file to MTD partition to be loaded automatically by u-boot: U-boot automatically tries to load the firmware from nand at address 0x7e00000 which corresponds to `/dev/mtd25` in OpenWrt. - find ETHPHYFW partition while running OpenWrt (expected: /dev/mtd25) $ fgrep -i 'ethphyfw' /proc/mtd mtd25: 00080000 00020000 "ethphyfw - copy mbn file to /tmp/ folder of the router $ scp aqr-v4.3.C.mbn 192.168.1.1:/tmp/ - write mbn file to ethphyfw partition $ mtd write /tmp/aqr_v4.3.C.mbn /dev/mtd25 Revert to stock firmware: * Flash the stock firmware to the bootloader using TFTP/NMRP. References to RAX120v2 GPL source: https://www.downloads.netgear.com/files/GPL/RAX120-V1.2.8.40_gpl_src.zip Reviewed-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Thomas Kupper <thomas.kupper@gmail.com>
* ipq40xx: qca8k: add ageing setting supportRobert Marko2023-08-19
| | | | | | | | qca8k driver we are currently based of is rather out of date and is lacking support for setting the ageing time or fast ageing so until we update the driver lets just backport support for those from qca8k. Signed-off-by: Robert Marko <robimarko@gmail.com>
* ipq4019: add support for ZTE MF287 Pro aka DreiNeo ProAndreas Böhler2023-08-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* generic: 6.1: backport patch adding support for LED PHYChristian Marangi2023-08-19
| | | | | | | Backport patch adding support for LED PHY directly in PHY ops struct. Add new PHYLIB_LEDS config and refresh patches. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* bcm53xx: add support for ASUS RT-AC3100Arınç ÜNAL2023-08-19
| | | | | | | | | | | | | ASUS RT-AC3100 is ASUS RT-AC88U without the external switch. OpenWrt forum users effortless and ktmakwana have confirmed that there are revisions with either 4366b1 or 4366c0 wireless chips. Therefore, include firmware for 4366b1 along with 4366c0. This way, all hardware revisions of the router will be supported by having brcmfmac use the firmware file for the wireless chip it detects. Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
* bcm53xx: backport DT changes for ASUS RT-AC3100 queued for v6.6Arınç ÜNAL2023-08-19
| | | | | | Backport the patch that adds the DT for ASUS RT-AC3100. Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
* kernel: bump 5.15 to 5.15.127John Audia2023-08-18
| | | | | | | | | | | | Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.127 All patches automatically rebased. Build system: x86_64 Build-tested: ramips/tplink_archer-a6-v3 Run-tested: ramips/tplink_archer-a6-v3 Signed-off-by: John Audia <therealgraysky@proton.me>
* kernel: bump 6.1 to 6.1.46John Audia2023-08-18
| | | | | | | | | | | | Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.46 All patches automatically rebased. Build system: x86/64 Build-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia <therealgraysky@proton.me>
* Revert "kernel: switch back 5.15 to fw_devlink=permissive"Rafał Miłecki2023-08-18
| | | | | | | | | | | | | This reverts commit 79af0593a30bfe382b350e9540ecfafa133b6ac0. A hack adjusting fw_devlink value was added to workaround issue with probing device drivers caused by of_platform_populate(). With upstream mtd commit (the one adding OF_POPULATED) backported there is no need for that hack anymore. Ref: 3eebb91317c6 ("kernel: backport proper fix for mtd preventing devices probing") Ref: #10232 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* ipq40xx: remove DK01 and DK04 boardsRobert Marko2023-08-15
| | | | | | | | | | | | | | | | | DK01 and DK04 board support has been in a form of 2 patches that we have been carrying for a long time. Both of the patches contain weird changes, dont follow any DT syntax and I honestly doubt they are even valid. DK01 and DK04 also have not been converted to DSA even after a long time and I doubt that anybody in the community even has these boards as they are QCA reference boards that are not even obtainable anymore. Since patches for these 2 boards have been just causing us pain when trying to update the kernel to a new major release or even point releases lets remove the support for these boards, and if there are users they can easily be reinstated. Signed-off-by: Robert Marko <robimarko@gmail.com>
* ipq40xx: Use SoC DTSI for Teltonika RUTXRobert Marko2023-08-15
| | | | | | | | | Teltonika RUTX currently is the only device pulling in DK01 DTSI and thus preventing removal of DK01 and DK04 support. So, lets add the missing nodes from DK01 DTSI and use the SoC DTSI instead. Signed-off-by: Robert Marko <robimarko@gmail.com>
* ipq40xx: add header to SCM cold boot address patchRobert Marko2023-08-15
| | | | | | | Lets add a proper commit title and description to the SCM cold boot patch so it applies with a git apply or git-am. Signed-off-by: Robert Marko <robimarko@gmail.com>
* ipq40xx: update SCM SDI patches with pending upstreamRobert Marko2023-08-15
| | | | | | | | | SCM SDI disable support is pending upstream, so lets use that instead. Since the board check needs to be split out, export it with a header so it applies with git-am. Signed-off-by: Robert Marko <robimarko@gmail.com>