aboutsummaryrefslogtreecommitdiffstats
path: root/target
Commit message (Collapse)AuthorAgeFilesLines
* generic: backport fix for #nvmem-cell-cells false warningRobert Marko2023-01-232-0/+88
| | | | | | | | | | | Recent backport of NVMEM layout support as well as acommpanying OF changes introduced a false #nvmem-cell-cells warning as #nvmem-cell-cells are fully optional. So, backport an upstream fix for this. Fixes: 11759a5bf3c6 ("kernel: backport of changes & helpers") Signed-off-by: Robert Marko <robimarko@gmail.com>
* ramips: Fix root volume for tplink-er605-v2Nikolay Martynov2023-01-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This device has two sets of volumes: main ones (`kernel`, `rootfs`, etc) and 'backup' (`kernel.b`, `rootfs.b`, etc). Bootloader tries to determine which set of volumes to use by looking at contens of `extra-para` and `extra-para.b` volumes. These volumes contain JSON that looks like this: ``` { "dbootFlag": "1", "integerFlag": "1", "fwFlag": "GOOD", "score":1 } ``` It looks like the bootloader looks for `"fwFlag": "GOOD"` (as opposed to `BAD`) then it compares `score` field - whichever 'good' volume has bigger score wins. This determines which set of volumes to use to boot. So for example if `extra-para` is good and has bigger score then `kernel`, `rootfs`, etc volumes are used. This means bootloader needs to explain to the kernel which volume to use for the rootfs. After looking at bootloader code with disassembler I think it contains a bug. Relevant part of code looks something like this: ``` if (image_id == 0) { rootfs_volume_id = 8; rootfs_volume_name = "rootfs"; } else { rootfs_volume_id = 0xf; rootfs_volume_name = "rootfs.b"; } sprintf( &buffer, 0x800, "console=ttyS0,115200 noinitrd ubi.mtd=3,2048 ubi.block=0,%s root=/dev/ubiblock0_%d DKMGT_IMAGE_ID=%d DKMGT_IMAGE_TYPE=ubi", rootfs_volume_name, rootfs_volume_id, image_id ); ``` Where `image_id == 0` if 'normal' (not '*.b' set of volumes is used). However from device dumps we know that from the factory `rootfs.b` has id 8 and `rootfs` has id 15. So from above we can see that ids and names of rootfs volumes do not match. More over - they are hardcoded in the bootloader. Both things are problematic for OpwnWRT which completely removes volumes on update meaning that volume ids may actually change. So instead of relying on bootloader to provide the kernel with root device this patch forces kernel to determine root automatically - and it defaults to `rootfs` volume which is correct for our purposes. Overall this makes image boot fine from flash after sysupgrade from inirams. assuming `extra-para*` volumes make bootloader use non-'*.b' set of volumes. Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
* omap: refresh configAlexey Smirnov2023-01-221-1/+4
| | | | | | | Refresh target config by running: make kernel_nconfig CONFIG_TARGET=target Signed-off-by: Alexey Smirnov <s.alexey@gmail.com>
* omap: enable ARM Accelerated Cryptographic AlgorithmsAlexey Smirnov2023-01-221-0/+12
| | | | | | | This selects cryptographic algorithms implemented using ARM specific CPU features. Signed-off-by: Alexey Smirnov <s.alexey@gmail.com>
* omap: enable cpuidle driverAlexey Smirnov2023-01-221-0/+2
| | | | | | This enables generic cpuidle driver for ARM. Signed-off-by: Alexey Smirnov <s.alexey@gmail.com>
* kernel: bump 5.15 to 5.15.89John Audia2023-01-223-44/+2
| | | | | | | | | | | | | | | Removed upstreamed: ipq806x/patches-5.15/007-v6.3-ASoC-qcom-lpass-cpu-Fix-fallback-SD-line-index-handl.patch[1] 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.89&id=d4fa65960a9d0cb87a1102d47145675ceed7a4e6 All other patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia <therealgraysky@proton.me>
* realtek: use irq_force_affinity on otto timer insteadINAGAKI Hiroshi2023-01-212-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After commit e0d2c59ee995 ("genirq: Always limit the affinity to online CPUs", 5.10) on Linux, the cpumask passed to irq_set_affinity of irqchip driver is limited to online CPUs. When irq_do_set_affinity called from otto timer driver with only one secondary CPU, that CPU is not marked as online yet, filtered out by cpu_online_mask and fall to error path. Then, fail to set affinity for that CPU and it leads to instability of timer on secondary CPU(s). At least, RTL839x system will be affected. log: [ 37.560020] rcu: INFO: rcu_sched detected stalls on CPUs/tasks: [ 37.638025] rcu: 1-...!: (0 ticks this GP) idle=6ac/0/0x0 softirq=0/0 fqs=1 (false positive?) [ 37.752683] (detected by 0, t=6002 jiffies, g=-1179, q=26293) [ 37.829510] Sending NMI from CPU 0 to CPUs 1: [ 37.886857] NMI backtrace for cpu 1 skipped: idling at r4k_wait_irqoff+0x1c/0x24 [ 37.984801] rcu: rcu_sched kthread timer wakeup didn't happen for 5999 jiffies! g-1179 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 [ 38.132743] rcu: Possible timer handling issue on cpu=1 timer-softirq=0 [ 38.221033] rcu: rcu_sched kthread starved for 6000 jiffies! g-1179 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->cpu=1 [ 38.356336] rcu: Unless rcu_sched kthread gets sufficient CPU time, OOM is now expected behavior. [ 38.474440] rcu: RCU grace-period kthread stack dump: ... Replace to irq_force_affinity from irq_set_affinity and ignore cpu_online_mask to fix the issue. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> Tested-by: Olliver Schinagl <oliver@schinagl.nl>
* kernel: mtk-bmt: fix usage of _oob_readChuanhong Guo2023-01-211-2/+8
| | | | | | | | _oob_read returns number of bitflips on success while bbt_nand_read should return 0. Fixes: 2d49e49b18 ("mediatek: bmt: use generic mtd api") Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ipq806x: Initial TP-Link and ASUS OnHub supportBrian Norris2023-01-2112-2/+931
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link and ASUS OnHub devices are very similar, sharing many of the same characteristics and much of their Device Tree. They both run a version of ChromeOS for their factory firmware, and so installation instructions look very similar to Google Wifi [1]. Things I've tested, and are working: * Ethernet * WiFi (2.4 and 5 GHz) * LEDs * USB * eMMC * Serial console (if you wire it up yourself) * 2x CPU * Speaker == Installation instructions summary == 1. Flash *-factory.bin to a USB drive (e.g., with `dd`) 2. Insert USB drive, to boot OpenWrt from USB 3. Copy the same *-factory.bin over to device, and flash it to eMMC to make OpenWrt permanent == Developer mode, booting from USB (Step 2) == To enter Developer Mode and boot OpenWrt from a USB stick: 1. Unplug power 2. Gain access to the "developer switch" through the bottom of the device 3. Hold down the "reset switch" (near the USB port / power plug) 4. Plug power back in 5. The LED on the device should turn white, then blink orange, then red. Release the reset switch. 6. Insert USB drive with OpenWrt factory.bin 7. Press the hidden developer switch under the device to boot to USB; you should see some activity lights (if you have any) on your USB drive 8. Depending on your configuration, the router's LED(s) should come on. You're now running OpenWrt off a USB stick. These instructions are derived from: https://www.exploitee.rs/index.php/Rooting_The_Google_OnHub#Enabling_%22Developer_Mode%22_on_the_OnHub https://www.exploitee.rs/index.php/Asus_OnHub#Enabling_%22Developer_Mode%22_on_the_OnHub ~~Finding the developer switch:~~ for TP-Link, the developer switch is on the bottom of the device, underneath some of the rubber padding and a screw. For ASUS, remove the entire base, via 4 screws under the rubber feet. See the Exploitee instructions for more info and photos. == Making OpenWrt permanent (on eMMC) (Step 3) == Once you're running OpenWrt via USB: 1. Connect Ethernet to the LAN port; router's LAN address should be at 192.168.1.1 2. Connect another system to the router's LAN, and copy the factory.bin image over, via SCP and SSH: scp -O openwrt-ipq806x-chromium-tplink_onhub-squashfs-factory.bin root@192.168.1.1: ssh root@192.168.1.1 -C "dd if=/dev/zero bs=512 seek=7552991 of=/dev/mmcblk0 count=33 && \ dd if=/root/openwrt-ipq806x-chromium-tplink_onhub-squashfs-factory.bin of=/dev/mmcblk0" 3. Reboot and remove the USB drive. == Developer mode beep == Note that every time you boot the OnHub in developer mode, the device will play a loud "beep" after a few seconds. This is described in the Chromium docs [2], and is intended to make it clear that the device is not running Google software. It is nontrivial to completely disable this beep, although it's possible to "acknowledge" developer mode (and skip the beep) by using a USB keyboard to press CTRL+D every time you boot. [1] https://openwrt.org/toh/google/wifi [2] https://chromium.googlesource.com/chromiumos/docs/+/HEAD/developer_mode.md Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* ipq806x: Add kmod-sound-soc-ipq8064-stormBrian Norris2023-01-211-0/+29
| | | | | | | For IPQ8064 systems based off the "Google Storm" reference platform, such as the TP-Link OnHub. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* ipq806x: ASoC: qcom: lpass-cpu: Fix fallback SD line index handlingBrian Norris2023-01-211-0/+42
| | | | | | | | | | This fixes device tree registration for 'qcom,lpass-cpu' as used by qcom-ipq8064 SoCs, and allows speaker audio to function. This patch has been submitted (and merged, for -next; likely v6.3) upstream. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* ipq806x: config-5.15: NormalizeBrian Norris2023-01-211-9/+11
| | | | | | | | Refresh target config with `make kernel_menuconfig`, then save the result. This drops missing symbols or otherwise accounts for defaults. It should not change any functionality. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* ipq806x: Point to externally compiled dtbs in recipesBrian Norris2023-01-213-89/+2
| | | | | | | | | | | | | | | | | Similar to commit 4d8b42d8a777 ("ipq40xx: point to externally compiled dtbs in recipes"). Currently, we patch our DTS files into the kernel source tree, so the kernel build process will produce DTBs for us. The kernel-to-DTS dependency can cause buildroot to perform excessive rebuilds of the kernel though, which slows down device development iteration. Buildroot also compiles DTBs on its own, to $(KDIR)/image-$(DEVICE_DTS).dtb. With small adjustments, we can leverage this, and stop patching DTS files into the kernel Makefile at the same time. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mvebu: cortexa9: use renamed U-boot binariesJosef Schlehofer2023-01-201-3/+3
| | | | | | | | | Due to upstream change in U-boot the binaries were renamed [1]. [1] https://source.denx.de/u-boot/u-boot/-/commit/87ac4b4b4ca5f00e2ddcdac41c9dc691ab2aecf1 Fixes: 2f83369e3e97 ("uboot-mvebu: update to version 2023.01") Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
* ipq807x: Add ZyXEL NBG7815André Valentin2023-01-195-2/+480
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ZyXEL NBG7815 is a premium 802.11ax "tri"-band router/AP. Specifications: * CPU: Qualcomm IPQ8072A Quad core Cortex-A53 2.2GHz * RAM: 1 GB 2x Nanya NT5CC256M16ER-EK * Storage: * 8MB serial flash Winbond W25Q64DW * 4GB eMMC flash Kingston EMMC04G-M627 * Ethernet: * 4x1G RJ45 ports (QCA8074A) with 1x status LED per port * 1x2.5G RJ45 port (QCA8081) with 1x status LED * 1x10G RJ45 port (AQR113C) with 1x status LED * Switch: Qualcomm Atheros QCA8075 * WLAN: * 2.4GHz: Qualcomm QCN5024 4x4@40MHz 802.11b/g/n/ax 1147 Mbps PHY rate * 2x 5GHz: Qualcomm QCN5054 4x4 802.11a/b/g/n/ac/ax 2402 PHY rate * Bluetooth CSR8811 using HSUART, currently unsupported * USB: 1x USB3.0 Type-A port * LED-s currently not supported: * White * Dark Blu * Amber * Purple * Purple and dark blue * Red * Buttons: * 1x Soft reset * Power: 12V DC Jack Installation instructions: * Disconnect WAN * Reset device to factory defaults by pushing reset button 15 sec, LEDs should lit orange color. * After 5-10 minutes, when the LEDs turn constant dark blue, put your LAN cable and connect at address 192.168.123.1 by telnet on port 23 * Login with NBG7815 login: root password: nbg7815@2019 * cd /tmp/ApplicationData * wget -O openwrt-ipq807x-generic-zyxel_nbg7815-squashfs-sysupgrade.bin http://... * wget https://github.com/itorK/nbg7815_tools/blob/main/flash_to_openwrt.sh * run flash_to_openwrt.sh If you can't use wget, you can transfer the files via nc. See https://openwrt.org/inbox/toh/zyxel/nbg7815_armor_g5 for installation details. Bluetooth usage: * you need at least package bluez-utils, recommended bluez-daemon * run following commands to enable and start hciattach /dev/ttyMSM1 bcsp hciconfig hci0 up Many thanks to itorK for his work on this device: https://github.com/itorK/openwrt/tree/nbg7815 Reviewed-by: Robert Marko <robimarko@gmail.com> Signed-off-by: André Valentin <avalentin@marcant.net>
* ipq807x: add nvmem uboot-env supportAndré Valentin2023-01-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enabling kernel symbol CONFIG_NVMEM_U_BOOT_ENV allows to use u-boot environement variable ethaddr with nvmen. That way it is possible to assign the MAC address to the ethernet device driver. Example of usage in dts: .... partition@600000 { compatible = "u-boot,env"; label = "0:appsblenv"; reg = <0x600000 0x10000>; macaddr_lan: ethaddr { }; }; .... &dp5 { status = "okay"; phy-handle = <&qca8081>; label = "wan"; nvmem-cells = <&macaddr_lan>; nvmem-cell-names = "mac-address-ascii"; mac-address-increment = <1>; }; This is needed for Zyxel NBG7815. Signed-off-by: André Valentin <avalentin@marcant.net>
* ipq40xx: convert Extreme AP3915i to DSAJames Andrewartha2023-01-173-2/+16
| | | | | | Convert and re-enabled Extreme AP3915i to DSA. Signed-off-by: James Andrewartha <trs80@ucc.asn.au>
* ipq40xx: add DSL support for FritzBox 7530Martin Schiller2023-01-164-6/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set up MAC, LED, settings and default packages for DSL usage, similar to the lantiq target. Due to licensing uncertainty, we do not include the firmware files for the DSL drivers. To have a working DSL setup, follow the instructions below. Download the firmware files locally: mkdir -p files/lib/firmware/09a9 wget -P files/lib/firmware/09a9 https://gitlab.com/prpl-foundation/intel/vrx518_aca_fw/-/raw/ugw-8.5.2/platform/xrx500/aca_fw.bin wget -P files/lib/firmware https://gitlab.com/prpl-foundation/intel/vrx518_ppe_fw/-/raw/ugw_8.5.2.10/platform/xrx500/ppe_fw.bin wget -P files/lib/firmware https://gitlab.com/prpl-foundation/intel/dsl_vr11_firmware_xdsl/-/raw/ugw-8.5.2/xcpe_8D1507_8D0901.bin ln -s xcpe_8D1507_8D0901.bin files/lib/firmware/vdsl.bin For people building their own images: Run the above commands in the root of your local OpenWrt clone, and the firmware files will be part of the resulting images. For people downloading images: Copy the firmware files onto the router once it's booted up: scp -O -r files/lib/firmware root@fritz:/lib Reboot the device afterwards. Signed-off-by: Martin Schiller <ms.3headeddevs@gmail.com> [cleaned up] Signed-off-by: Andre Heider <a.heider@gmail.com> [set up LED] Signed-off-by: Jan Hoffmann <jan@3e8.eu> Signed-off-by: Andre Heider <a.heider@gmail.com>
* ipq40xx: fritzbox-7530.dts: increase dma coherent pool sizeMartin Schiller2023-01-161-0/+4
| | | | | | | This is needed by the mei driver to be able to download the firmware. Signed-off-by: Martin Schiller <ms.3headeddevs@gmail.com> Signed-off-by: Andre Heider <a.heider@gmail.com>
* ipq40xx: add Intel/Lantiq ATM hacksMartin Schiller2023-01-162-0/+180
| | | | | | | | | | Similar to the lantiq platform, these are required for DSL support. Signed-off-by: Martin Schiller <ms.3headeddevs@gmail.com> [switch to kernel 5.10 and 5.15] Signed-off-by: Jan Hoffmann <jan@3e8.eu> [update patches based on UGW 8.5.2.10, remove 5.10 support] Signed-off-by: Andre Heider <a.heider@gmail.com>
* mediatek: filogic: fix sysupgrade on MMC on the BPi-R3Daniel Golle2023-01-161-4/+7
| | | | | | | | A previous attempt to simplify things went wrong and now sysupgrade is broken on this device. Fix that. Fixes: de94587e70 ("mediatek: filogic: don't rely on image preset in flash or sysupgrade") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mt7622: fix sysupgrade on MMC on BPi-R64Daniel Golle2023-01-161-0/+1
| | | | | | | | A previous attempt to simplify things went wrong and now sysupgrade is broken on this device. Fix that. Fixes: d640cbac0e ("mediatek: mt7622: don't rely on existing image for sysupgrade") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* kernel: fix kernel panic in mtk_ppeDaniel Golle2023-01-161-1/+1
| | | | | | | | | | | | | The patch that adds support for hw flow-offloading counters on newer MediaTek SoCs tries to prints acct->packets and acct->bytes in debugfs, without checking that acct isn't null. This causes a kernel panic when trying to read /sys/kernel/debug/ppe0/entries on older MediaTek SoCs. Fix this by adding a check for acct. Fixes: openwrt#11756 Fixes: 9721a42a27 ("kernel: support hw flow-offloading counters on newer MediaTek SoCs") Reported-by: Stijn Tintel <stijn@linux-ipv6.be> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* archs38: switch to 5.15 by defaultNick Hainke2023-01-161-2/+1
| | | | | | | | | It appears that only a few users are using the archs38 SoC. The most active user of the target has already approved the testing kernel and so it is very unlikely bugs will be reported in the near future. Therefore, the target should be directly bumped to 5.15. Signed-off-by: Nick Hainke <vincent@systemli.org>
* ipq807x: add Dynalink DL-WRX36Dirk Buchwalder2023-01-165-0/+263
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dynalink DL-WRX36 is a AX WIFI router with 4 1G and 1 2.5G ports. Specifications: • CPU: Qualcomm IPQ8072A Quad core Cortex-A53 2.2GHz • RAM: 1024MB of DDR3 • Storage: 256MB Nand • Ethernet: 4x 1G RJ45 ports (QCA8075) + 1 2.5G Port (QCA8081) • WLAN: 2.4GHz: Qualcomm QCN5024 2x2 802.11b/g/n/ax 1174 Mbps PHY rate 5GHz: Qualcomm QCN5054 4x4 802.11a/b/g/n/ac/ax 2402 PHY rate • 1x USB 3.0 • 1 gpio-controlled dual color led (blue/red) • Buttons: 1x soft reset / 1x WPS • Power: 12V DC jack A poulated serial header is onboard (J1004) the connector size is a 4-pin 2.0 mm JST PH. RX/TX is working, u-boot bootwait is active, secure boot is enabled. Notes: - Serial is completely deactivated in the stock firmware image. - This commit adds only single partition support, that means sysupgrade is upgrading the current rootfs partition. - Installation can be done by serial connection or SSH access on OEM firmware Installation Instructions: Most part of the installation is performed from an initramfs image running OpenWrt, and there are two options to boot it. Boot initramfs option 1: Using serial connection (3.3V) 1. Stop auto boot to get to U-boot shell 2. Transfer initramfs image to device (openwrt-ipq807x-generic-dynalink_dl-wrx36-initramfs-uImage.itb) Tested using TFTP and a FAT-formatted USB flash drive. 3. Boot the initramfs image # bootm Boot initramfs option 2: From SSH access on OEM firmware 1. Copy the initramfs image to a FAT-formatted flash drive (tested on single-partition drive) and connect it to device USB port. 2. Change boot command so it loads the initramfs image on next boot Fallback to OEM firmware is provided. # fw_setenv bootcmd 'usb start && fatload usb 0:1 0x44000000 openwrt-ipq807x-generic-dynalink_dl-wrx36-initramfs-uImage.itb && bootm 0x44000000; bootipq' 3. Reboot the device to boot the initramfs # reboot Install OpenWrt from initramfs image: 1. Use SCP (or other way) to transfer OpenWrt factory image 2. Connect to device using SSH (on a LAN port) 3. Check MTD partition table. rootfs and rootfs_1 should be mtd18 and mtd20 depending on current OEM slot. # cat /proc/mtd 4. Do a ubiformat to both rootfs partitions: # ubiformat /dev/mtd18 -y -f /path_to/factory_image # ubiformat /dev/mtd20 -y -f /path_to/factory_image 5. Set U-boot env variable: mtdids # fw_setenv mtdids 'nand0=nand0' 6. Get offset of mtd18 to determine current OEM slot - If current OEM slot is 1, offset is 16777216 (0x1000000) - If current OEM slot is 2, offset is 127926272 (0x7a00000) # cat /sys/class/mtd/mtd18/offset 7. Set U-boot env variable: mtdparts If current OEM slot is 1, run: # fw_setenv mtdparts 'mtdparts=nand0:0x6100000@0x1000000(fs),0x6100000@0x7a00000(fs_1)' If current OEM slot is 2, run: # fw_setenv mtdparts 'mtdparts=nand0:0x6100000@0x7a00000(fs),0x6100000@0x1000000(fs_1)' 8. Set U-boot env variable: bootcmd # fw_setenv bootcmd 'setenv bootargs console=ttyMSM0,115200n8 ubi.mtd=rootfs rootfstype=squashfs rootwait; ubi part fs; ubi read 0x44000000 kernel; bootm 0x44000000#config@rt5010w-d350-rev0' 9. Reboot the device # reboot Note: this PR adds only single partition support, that means sysupgrade is upgrading the current rootfs partition Signed-off-by: Dirk Buchwalder <buchwalder@posteo.de>
* ipq807x: add Edgecore EAP102Matthew Hagan2023-01-167-0/+435
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Edgecore EAP102 is a wall/ceiling mountable AP. The AP can be powered by either PoE or AC adapter. Device info: - IPQ8071-A SoC - 1GiB RAM - 256MiB NAND flash - 32MiB SPI NOR - 2 Ethernet ports - 1 Console port - 2GHz/5GHz AX WLAN - 2 USB 2.0 ports Install instructions: Prerequistes - TFTP server, preferrably within 192.168.1.0/24 Console cable plugged in (115200 8N1 no flow control) 1. Power on device and interrupt u-boot to obtain u-boot CLI 2. set serverip to IP address of the TFTP server: `setenv serverip 192.168.1.250` 3. Download image from TFTP server: `tftpboot 0x44000000 openwrt-ipq807x-generic-edgecore_eap102-squashfs-nand-factory.ubi` 4. Flash ubi image to both partitions and reset: `sf probe imxtract 0x44000000 ubi nand device 0 nand erase 0x0 0x3400000 nand erase 0x3c00000 0x3400000 nand write $fileaddr 0x0 $filesize nand write $fileaddr 0x3c00000 $filesize reset` Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
* ipq807x: Add Xiaomi AX9000Robert Marko2023-01-165-3/+557
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Xiaomi AX9000 is a premium 802.11ax "tri"-band router/AP. Specifications: * CPU: Qualcomm IPQ8072A Quad core Cortex-A53 2.2GHz * RAM: 1024MB of DDR3 * Storage: 256MB of parallel NAND * Ethernet: * 4x1G RJ45 ports (QCA8075) with 1x status LED per port * 1x2.5G RJ45 port (QCA8081) with 1x status LED * WLAN: * PCI based Qualcomm QCA9889 1x1 802.11ac Wawe 2 for IoT * 2.4GHz: Qualcomm QCN5024 4x4@40MHz 802.11b/g/n/ax 1147 Mbps PHY rate * 5.8GHz: Qualcomm QCN5054 4x4@80MHz or 2x2@160MHz 802.11a/b/g/n/ac/ax 2402Mbps PHY rate * 5GHz: PCI based Qualcomm QCN9024 4x4@160MHz 802.11a/b/g/n/ac/ax 4804Mbps PHY rate * USB: 1x USB3.0 Type-A port * LED-s: * System (Blue and Yellow) * Network (Blue and Yellow) * RGB light bar on top in X shape * Buttons: * 1x Power switch * 1x Soft reset * 1x Mesh button * Power: 12V DC Jack Installation instructions: Obtaining SSH access is mandatory https://openwrt.org/inbox/toh/xiaomi/ax9000#obtain_ssh_access Installation is done by the ubiformat method, through SSH: 1. Open an SSH shell to the router 2. Copy the file openwrt-ipq807x-generic-xiaomi_ax9000-initramfs-factory.ubi to the /tmp directory 3. Check which rootfs partition is your router booted in (0 = rootfs | 1 = rootfs_1): nvram get flag_boot_rootfs 4. Find the rootfs and rootfs_1 mtd indexes respectively: cat /proc/mtd Please confirm if mtd21 and mtd22 are the correct indexes from above! 5. Use the command ubiformat to flash the opposite mtd with UBI image: If nvram get flag_boot_rootfs returned 0: ubiformat /dev/mtd22 -y -f /tmp/openwrt-ipq807x-generic-xiaomi_ax9000-initramfs-factory.ubi && nvram set flag_boot_rootfs=1 && nvram set flag_last_success=1 && nvram commit otherwise: ubiformat /dev/mtd21 -y -f /tmp/openwrt-ipq807x-generic-xiaomi_ax9000-initramfs-factory.ubi && nvram set flag_boot_rootfs=0 && nvram set flag_last_success=0 && nvram commit 6. Reboot the device by: reboot Previous commands flashed an ubinized OpenWrt initramfs that will serve as the intermediate step since OpenWrt uses unified rootfs in order to fully utilize NAND and provide enough space for packages. Continue in order to pernamently flash OpenWrt: 7. SSH into OpenWrt from one of the LAN ports 8. Copy the file openwrt-ipq807x-generic-xiaomi_ax9000-squashfs-sysupgrade.bin to the /tmp directory 9. Sysupgrade the device: sysupgrade -n /tmp/openwrt-ipq807x-generic-xiaomi_ax9000-squashfs-sysupgrade.bin Device will reboot with OpenWrt, and then sysupgrade can be used to upgrade the device when desired. Signed-off-by: Robert Marko <robimarko@gmail.com>
* ipq807x: add QNAP 301wDirk Buchwalder2023-01-168-1/+526
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QNAP 301w is a AX WIFI router with 4 1G and 2 10G ports. Specifications: • CPU: Qualcomm IPQ8072A Quad core Cortex-A53 2.2GHz • RAM: 1024MB of DDR3 • Storage: 4GB eMMC (contains kernel and rootfs) / 8MB NOR (contains art and u-boot-env) • Ethernet: 4x 1G RJ45 ports + 2 10G ports (Aquantia AQR113C) • WLAN: 2.4GHz: Qualcomm QCN5024 4x4 (40 MHz) 802.11b/g/n/ax 1174 Mbps PHY rate 5GHz: Qualcomm QCN5054 4x4 (80 MHz) or 2x2 (160 MHz) 802.11a/b/g/n/ac/ax 2402 PHY rate • LEDs: 7 x GPIO-controlled dual color LEDs + 2 GPIO-controlled single color LEDs • Buttons: 1x soft reset / 1x WPS • Power: 12V DC jack A poulated serial header is onboard. RX/TX is working, bootwait is active, secure boot is not enabled. SSH can be activated in the stock firmware, hold WPS button til the second beep (yes the router has a buzzer) SSH is available on port 22200, login with user admin and password "mac address of the router". Installation Instructions: • obtain serial access (https://openwrt.org/inbox/toh/qnap/301w#serial) • stop auto boot • setenv serverip 192.168.10.1 • setenv ipaddr 192.168.10.10 • tftpboot the initramfs image (openwrt-ipq807x-generic-qnap_301w-initramfs-fit-uImage.itb) • bootm • make sure that current_entry is set to "0": "fw_printenv -n current_entry" should be print "0". If not, do "fw_setenv current_entry 0" • copy openwrt-ipq807x-generic-qnap_301w-squashfs-sysupgrade.bin to the device to /tmp folder • sysupgrade -n /tmp/openwrt-ipq807x-generic-qnap_301w-squashfs-sysupgrade.bin this flashes openwrt to the first kernel and rootfs partition (mmcblk0p1 / mmcblk0p4) • reboot Note: this leaves the second kernel / rootfs parition untouched. So if you want to go back to stock, stop u-boot autoboot, "setenv current_entry 1" , "saveenv", "bootipq". Stock firmware should start from the second partition. Then do a firmwareupgrade in the stock gui, that should overwrite the openwrt in the first partitions Make 10G Aquantia phy's work: The aquantia phy's need a firmware to work. This can either be loaded in linux with a userspace tool or in u-boot. I was not successfull to load the firmware in linux (aq-fw-download) but luckily there is aq_load_fw available in u-boot. But first the right firmware needs to write to the 0:ETHPHYFW mtd partition (it is empty on my device) Grab the ethphy firmware image from: https://github.com/kirdesde/nbg7815_gpl/blob/master/target/linux/ipq/ipq807x_64/prebuilt_images/AQR_ethphyfw.mbn and scp that to openwrt. Check the 0:ETHPHYFW partition number: cat /proc/mtd|grep "0:ETHPHYFW", should be mtd10. Backup the 0:ETHPHYFW partition: dd if=/dev/mtd10 of=/tmp/ethphyfw.backup, scp ethphyfw.backup to a save place. Write the new firmware image to the 0:ETHPHYFW partition: "mtd erase /dev/mtd10", "mtd -n write AQR_ethphyfw.mbn /dev/mtd10". Reboot to u-boot. Check if aq_load_fw is working: "aq_load_fw 0", that checks the firmware and if successfull, loads iram and dram to one of the aquantia phy's. If that worked, add the aq_load_fw to the bootcmd: setenv bootcmd "aq_load_fw 0 && aq_load_fw 8 && bootipq" "saveenv" "reset" Board reboots and the firmware load to both phy's should start and then openwrt boots. Check if the 10G ports work. Note: lan port labeled "10G-2" is configured as WAN port as per default. All other port are in the br-lan. This can be changed in the network config. Signed-off-by: Dirk Buchwalder <buchwalder@posteo.de>
* ipq807x: add Edimax CAX1800Dirk Buchwalder2023-01-165-0/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Edimax CAX1800 is a 802.11 ax dual-band AP with PoE. AP can be ceiling or wall mount. Specifications: • CPU: Qualcomm IPQ8070A Quad core Cortex-A53 1.4GHz • RAM: 512MB of DDR3 • Storage: 128MB NAND (contains rootfs) / 8MB NOR (contains art and uboot-env) • Ethernet: 1x 1G RJ45 port (QCA8072) PoE • WLAN: 2.4GHz: Qualcomm QCN5024 2x2 802.11b/g/n/ax 574 Mbps PHY rate 5GHz: Qualcomm QCN5054 2x2 802.11a/b/g/n/ac/ax 1201 PHY rate • LEDs: 3 x GPIO-controlled System-LEDs (form one virtual RGB System-LED) black_small_square Buttons: 1x soft reset black_small_square Power: 12V DC jack or PoE (802.3af ) An unpopulated serial header is onboard. RX/TX is working, bootwait is active, secure boot is not enabled. SSH can be activated in the stock firmware, but it drops only to a limited shell . Installation Instructions: black_small_square obtain serial access black_small_square stop auto boot black_small_square tftpboot the initramfs image (serverip is set to 192.168.99.8 in uboot) black_small_square bootm black_small_square copy openwrt-ipq807x-generic-edimax_cax1800-squashfs-nand-factory.ubi to the device black_small_square write the image to the NAND: black_small_square cat /proc/mtd and look for rootfs partition (should be mtd0) black_small_square ubiformat /dev/mtd0 -f -y openwrt-ipq807x-generic-edimax_cax1800-squashfs- nand-factory.ubi black_small_square reboot Note: Device is not using dual partitioning (NAND contains other partitions with different manufacture data etc.) Draytek VigorAP 960C and Lancom LW-600 both look similar, but I haven't checked them. Signed-off-by: Dirk Buchwalder <buchwalder@posteo.de>
* ipq807x: add Redmi AX6Zhijun You2023-01-166-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Redmi AX6 is a budget 802.11ax dual-band router/AP Specifications: * CPU: Qualcomm IPQ8071A Quad core Cortex-A53 1.4GHz * RAM: 512MB of DDR3 * Storage: 128MB NAND * Ethernet: 4x1G RJ45 ports (QCA8075) * WLAN: * 2.4GHz: Qualcomm QCN5024 2x2 802.11b/g/n/ax 574 Mbps PHY rate * 5GHz: Qualcomm QCN5054 4x4@80MHz or 2x2@160MHz 802.11a/b/g/n/ac/ax 2402 PHY rate * LEDs: * System (Blue/Yellow) * Network (Blue/Yellow) *Buttons: 1x soft reset *Power: 12V DC jack Installation instructions: Obtaining SSH access is mandatory https://openwrt.org/inbox/toh/xiaomi/xiaomi_redmi_ax6_ax3000#ssh_access Installation is done by the ubiformat method, through SSH: 1. Open an SSH shell to the router 2. Copy the file openwrt-ipq807x-generic-redmi_ax6-initramfs-factory.ubi to the /tmp directory 3. Check which rootfs partition is your router booted in (0 = rootfs | 1 = rootfs_1): nvram get flag_boot_rootfs 4. Find the rootfs and rootfs_1 mtd indexes respectively: cat /proc/mtd Please confirm if mtd12 and mtd13 are the correct indexes from above! 5. Use the command ubiformat to flash the opposite mtd with UBI image: If nvram get flag_boot_rootfs returned 0: ubiformat /dev/mtd13 -y -f /tmp/openwrt-ipq807x-generic-redmi_ax6-initramfs-factory.ubi && nvram set flag_boot_rootfs=1 && nvram set flag_last_success=1 && nvram commit otherwise: ubiformat /dev/mtd12 -y -f /tmp/openwrt-ipq807x-generic-redmi_ax6-initramfs-factory.ubi && nvram set flag_boot_rootfs=0 && nvram set flag_last_success=0 && nvram commit 6. Reboot the device by: reboot Previous commands flashed an ubinized OpenWrt initramfs that will serve as the intermediate step since OpenWrt uses unified rootfs in order to fully utilize NAND and provide enough space for packages. Continue in order to pernamently flash OpenWrt: 7. SSH into OpenWrt from one of the LAN ports 8. Copy the file openwrt-ipq807x-generic-redmi_ax6-squashfs-sysupgrade.bin to the /tmp directory 9. Sysupgrade the device: sysupgrade -n /tmp/openwrt-ipq807x-generic-redmi_ax6-squashfs-sysupgrade.bin Device will reboot with OpenWrt, and then sysupgrade can be used to upgrade the device when desired. Signed-off-by: Zhijun You <hujy652@gmail.com>
* ipq807x: add Xiaomi AX3600Robert Marko2023-01-167-0/+531
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Xiaomi AX3600 is a budget 802.11ax dual-band router/AP. Specifications: * CPU: Qualcomm IPQ8071A Quad core Cortex-A53 1.4GHz * RAM: 512MB of DDR3 * Storage: 256MB of parallel NAND * Ethernet: 4x1G RJ45 ports (QCA8075) with 1x status LED per port * WLAN: * PCI based Qualcomm QCA9889 1x1 802.11ac Wawe 2 for IoT * 2.4GHz: Qualcomm QCN5024 2x2 802.11b/g/n/ax 574 Mbps PHY rate * 5GHz: Qualcomm QCN5054 4x4@80MHz or 2x2@160MHz 802.11a/b/g/n/ac/ax 2402 PHY rate * LED-s: * System (Blue and Yellow) * IoT (Blue) * Network (Blue and Yellow) * Buttons: 1x Soft reset * Power: 12V DC Jack Installation instructions: Obtaining SSH access is mandatory https://openwrt.org/inbox/toh/xiaomi/xiaomi_ax3600#obtain_ssh_access Installation is done by the ubiformat method, through SSH: 1. Open an SSH shell to the router 2. Copy the file openwrt-ipq807x-generic-xiaomi_ax3600-initramfs-factory.ubi to the /tmp directory 3. Check which rootfs partition is your router booted in (0 = rootfs | 1 = rootfs_1): nvram get flag_boot_rootfs 4. Find the rootfs and rootfs_1 mtd indexes respectively: cat /proc/mtd Please confirm if mtd12 and mtd13 are the correct indexes from above! 5. Use the command ubiformat to flash the opposite mtd with UBI image: If nvram get flag_boot_rootfs returned 0: ubiformat /dev/mtd13 -y -f /tmp/openwrt-ipq807x-generic-xiaomi_ax3600-initramfs-factory.ubi -s 2048 -O 2048 && nvram set flag_boot_rootfs=1 && nvram set flag_last_success=1 && nvram commit otherwise: ubiformat /dev/mtd12 -y -f /tmp/openwrt-ipq807x-generic-xiaomi_ax3600-initramfs-factory.ubi -s 2048 -O 2048 && nvram set flag_boot_rootfs=0 && nvram set flag_last_success=0 && nvram commit 6. Reboot the device by: reboot Previous commands flashed an ubinized OpenWrt initramfs that will serve as the intermediate step since OpenWrt uses unified rootfs in order to fully utilize NAND and provide enough space for packages. Continue in order to pernamently flash OpenWrt: 7. SSH into OpenWrt from one of the LAN ports 8. Copy the file openwrt-ipq807x-generic-xiaomi_ax3600-squashfs-sysupgrade.bin to the /tmp directory 9. Sysupgrade the device: sysupgrade -n /tmp/openwrt-ipq807x-generic-xiaomi_ax3600-squashfs-sysupgrade.bin Device will reboot with OpenWrt, and then sysupgrade can be used to upgrade the device when desired. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Signed-off-by: Robert Marko <robimarko@gmail.com>
* ipq807x: include kmods for wired networking by defaultRobert Marko2023-01-161-1/+1
| | | | | | | Include NSS DP and SSDK (Pulled as dependency) by default on ipq807x to provide wired networking to the target. Signed-off-by: Robert Marko <robimarko@gmail.com>
* ipq807x: include ath11k-ahb by defaultRobert Marko2023-01-161-1/+1
| | | | | | | All of the IPQ807x devices support having 2 radios, so lets include the required driver as well. Signed-off-by: Robert Marko <robimarko@gmail.com>
* kernel: 5.15: add missing kernel configuration optionsRobert Marko2023-01-161-0/+3
| | | | | | Found during compilation of ipq807x with ALL_NONSHARED. Signed-off-by: Robert Marko <robimarko@gmail.com>
* ipq807x: add Qualcomm Atheros IPQ807x targetRobert Marko2023-01-16124-0/+26247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qualcomm Atheros IPQ807x is a modern WiSoC featuring: * Quad Core ARMv8 Cortex A-53 * @ 2.2 GHz (IPQ8072A/4A/6A/8A) Codename Hawkeye * @ 1.4 GHz (IPQ8070A/1A) Codename Acorn * Dual Band simultaneaous IEEE 802.11ax * 5G: 8x8/80 or 4x4/160MHz (IPQ8074A/8A) * 5G: 4x4/80 or 2x2/160MHz (IPQ8071A/2A/6A) * 5G: 2x2/80MHz (IPQ8070A) * 2G: 4x4/40MHz (IPQ8072A/4A/6A/8A) * 2G: 2x2/40MHz (IPQ8070A/1A) * 1x PSGMII via QCA8072/5 (Max 5x 1GbE ports) * 2x SGMII/USXGMII (1/2.5/5/10 GbE) on Hawkeye * 2x SGMII/USXGMII (1/2.5/5 GbE) on Acorn * DDR3L/4 32/16 bit up to 2400MT/s * SDIO 3.0/SD card 3.0/eMMC 5.1 * Dual USB 3.0 * One PCIe Gen2.1 and one PCIe Gen3.0 port (Single lane) * Parallel NAND (ONFI)/LCD * 6x QUP BLSP SPI/I2C/UART * I2S, PCM, and TDMA * HW PWM * 1.8V configurable GPIO * Companion PMP8074 PMIC via SPMI (GPIOS, RTC etc) Note that only v2 SOC models aka the ones ending with A suffix are supported, v1 models do not comply to the final 802.11ax and have lower clocks, lack the Gen3 PCIe etc. SoC itself has two UBI32 cores for the NSS offloading system, however currently no offloading is supported. Signed-off-by: Robert Marko <robimarko@gmail.com>
* generic: 5.15: add MHI SBL callback for ath11kRobert Marko2023-01-161-0/+48
| | | | | | | | | | | This adds the MHI SBL callback that ath11k will utilize in order to support multiple PCI cards or AHB+PCI combo which currently does not work due to QRTR ID-s conflicting. This is a prerequisite for the mac80211 patch targeting ath11k as it uses MHI from kernel. Signed-off-by: Robert Marko <robimarko@gmail.com>
* archs38: mark as source-onlyRobert Marko2023-01-161-0/+1
| | | | | | | | | | | archs38 seems to be pretty much unused, usually only treewide changes or kernel bumps in order to branch off new stable are done to it. Considering that target only support some Synopsis HS38 ARC reference boards and no consumer hardware so mark the target as source-only to stop using Buildbot resources on building the target and packages for it. Signed-off-by: Robert Marko <robimarko@gmail.com>
* ramips: mt7621: Add Arcadyan WE420223-99 supportHarm Berntsen2023-01-155-0/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Arcadyan WE420223-99 is a WiFi AC simultaneous dual-band access point distributed as Experia WiFi by KPN in the Netherlands. It features two ethernet ports and 2 internal antennas. Specifications -------------- SOC : Mediatek MT7621AT ETH : Two 1 gigabit ports, built into the SOC WIFI : MT7615DN BUTTON: Reset BUTTON: WPS LED : Power (green+red) LED : WiFi (green+blue) LED : WPS (green+red) LED : Followme (green+red) Power : 12 VDC, 1A barrel plug Winbond variant: RAM : Winbond W631GG6MB12J, 1GBIT DDR3 SDRAM Flash : Winbond W25Q256JVFQ, 256Mb SPI U-Boot: 1.1.3 (Nov 23 2017 - 16:40:17), Ralink 5.0.0.1 Macronix variant: RAM : Nanya NT5CC64M16GP-DI, 1GBIT DDR3 SDRAM Flash : MX25l25635FMI-10G, 256Mb SPI U-Boot: 1.1.3 (Dec 4 2017 - 11:37:57), Ralink 5.0.0.1 Serial ------ The serial port needs a TTL/RS-232 3V3 level converter! The Serial setting is 57600-8-N-1. The board has an unpopulated 2.54mm straight pin header. The pinout is: VCC (the square), RX, TX, GND. Installation ------------ See the Wiki page [1] for more details, it comes down to: 1. Open the device, take off the heat sink 2. Connect the SPI flash chip to a flasher, e.g. a Raspberry Pi. Also connect the RESET pin for stability (thanks @FPSUsername for reporting) 3. Make a backup in case you want to revert to stock later 4. Flash the squashfs-factory.trx file to offset 0x50000 of the flash 5. Ensure the bootpartition variable is set to 0 in the U-Boot environment located at 0x30000 Note that the U-Boot is password protected, this can optionally be removed. See the forum [2] for more details. MAC Addresses(stock) -------------------- +----------+------------------+-------------------+ | use | address | example | +----------+------------------+-------------------+ | Device | label | 00:00:00:11:00:00 | | Ethernet | + 3 | 00:00:00:11:00:03 | | 2g | + 0x020000f00001 | 02:00:00:01:00:01 | | 5g | + 1 | 00:00:00:11:00:01 | +----------+------------------+-------------------+ The label address is stored in ASCII in the board_data partition Notes ----- - This device has a dual-boot partition scheme, but OpenWRT will claim both partitions for more storage space. Known issues ------------ - 2g MAC address does not match stock due to missing support for that in macaddr_add - Only the power LED is configured by default References ---------- [1] https://openwrt.org/inbox/toh/arcadyan/astoria/we420223-99 [2] https://forum.openwrt.org/t/adding-openwrt-support-for-arcadyan-we420223-99-kpn-experia-wifi/132653 Acked-by: Arınç ÜNAL <arinc.unal@arinc9.com> Signed-off-by: Harm Berntsen <git@harmberntsen.nl>
* kernel/x86: fix typoFlorian Eckert2023-01-151-1/+1
| | | | | | Fix typo for KernelPackage w83627hf-wdt. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* ipq40xx: add support for Linksys WHW03 V2Vincent Tremblay2023-01-155-2/+541
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SOC: Qualcomm IPQ4019 WiFi 1: QCA4019 IEEE 802.11b/g/n WiFi 2: QCA4019 IEEE 802.11a/n/ac WiFi 3: QCA8888 IEEE 802.11a/n/ac Bluetooth: Qualcomm CSR8811 (A12U) Zigbee: Silicon Labs EM3581 NCP + Skyworks SE2432L Ethernet: Qualcomm Atheros QCA8072 (2-port) Flash 1: Mactronix MX30LF4G18AC-XKI RAM (NAND): SK hynix H5TC4G63CFR-PBA (512MB) LED Controller: NXP PCA9633 (I2C) Buttons: Single reset button (GPIO). - The three WiFis were fully tested and are configured with the same settings as in the vendor firmware. - The specific board files were submitted to the ATH10k mailing list but I'm still waiting for a reply. They can be removed once they are approved upstream. - Two ethernet ports are accessible on the device. By default one is configured as WAN and the other one is LAN. They are fully working. Bluetooth: ======== - Fully working with the following caveats: - RFKILL need to be enabled in the kernel. - An older version of bluez is needed as bccmd is needed to configure the chip. Zigbee: ====== - The spidev device is available in the /dev directory. - GPIOs are configured the same way as in the vendor firmware. - Tests are on-going. I am working on getting access to the Silicon Labs stack to validate that it is fully working. Installation: ========= The squash-factory image can be installed via the Linksys Web UI: 1. Open "http://192.168.1.1/ca" (Change the IP with the IP of your device). 2. Login with your admin password. 3. To enter into the support mode, click on the "CA" link and the bottom of the page. 4. Open the "Connectivity" menu and upload the squash-factory image with the "Choose file" button. 5. Click start. Ignore all the prompts and warnings by click "yes" in all the popups. The device uses a dual partition mechanism. The device automatically revert to the previous partition after 3 failed boot attempts. If you want to force the previous firmware to load, you can turn off and then turn on the device for 2 seconds, 3 times in a row. It can also be done via TFTP: 1. Setup a local TFTP server and configure its IP to 192.168.1.100. 2. Rename your image to "nodes_v2.img" and put it to the TFTP root of your server. 3. Connect to the device through the serial console. 4. Power on device and press enter when prompted to drop into U-Boot. 5. Flash the partition of your choice by typing "run flashimg" or "run flashimg2". 6. Once flashed, enter "reset" to reboot the device. Reviewed-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Vincent Tremblay <vincent@vtremblay.dev>
* kernel: bump 5.10 to 5.10.163John Audia2023-01-1453-130/+111
| | | | | | | | | | | | | | | Removed upstreamed: generic/101-Use-stddefs.h-instead-of-compiler.h.patch[1] All patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.163&id=ddd2bb08bd99b7ee4442fbbe0f9b80236fdd71d2 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>
* ramips: cudy wr1300v1 reduce SPI freq to 10000000Filip Milivojevic2023-01-141-2/+1
| | | | | | | | | | | | | | Reducing SPI flash frequency allows the build to boot on both old variants with W25Q128 chip and new variants with XM25QH128C chip. The old 80000000 value only boots on devices with the W25Q128 flash. This is also the change Cudy themselves made in their openwrt builds and their .dts file. Removed m25p,fast-read as it is not needed with slower speeds. Signed-off-by: Filip Milivojevic <zekica@gmail.com>
* ipq40xx: Add support ZTE MF18AMarcin Gajda2023-01-144-0/+498
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Light and small router ( In Poland operators sells together with MC7010 outdoor modem to provide WIFI inside home). Device specification SoC Type: Qualcomm IPQ4019 RAM: 256 MiB Flash: 128 MiB SPI NAND (Winbond W25N01GV) ROM: 2MiB SPI Flash (GD25Q16) Wireless 2.4 GHz (IP4019): b/g/n, 2x2 Wireless 5 GHz (QCA9982): a/n/ac, 3x3 Ethernet: 2xGbE (WAN/LAN1, LAN2) USB ports: No Button: 2 (Reset/WPS) LEDs: 3 external leds: Power (blue) , WiFI (blue and red), SMARTHOME (blue and red) and 1 internal (blue) -- NOTE: Power controls all external led (if down ,all others also not lights even signal is up) Power: 5VDC, 2,1A via USB-C socket Bootloader: U-Boot On board ZWave and Zigbee (EFR32 MG1P232GG..) modules ( not supported by orginal software ) Installation 1.Open MF18A case by ungluing rubber pad under the router and unscrew screws, and connect to serial console port, with the following pinout, starting from pin 1, which is the topmost pin when the board is upright (reset button on the bottom) : VCC (3.3V). Do not use unless you need to source power for the converer from it. TX RX GND Default port configuration in U-boot as well as in stock firmware is 115200-8-N-1. 2.Place OpenWrt initramfs image for the device on a TFTP in the server's root. This example uses Server IP: 192.168.0.2 3.Connect TFTP server to RJ-45 port (WAN/LAN1). 4.Power on MF18A , stop in u-Boot (using ESC button) and run u-Boot commands: setenv serverip 192.168.0.2 setenv ipaddr 192.168.0.1 set fdt_high 0x85000000 tftpboot 0x84000000 openwrt-ipq40xx-generic-zte_mf18a-initramfs-fit-zImage.itb bootm 0x84000000 5.Please make backup of original partitions, if you think about revert to stock, specially mtd8 (Web UI) and mtd9 (rootFS). Use /tmp as temporary storage and do: WEB PARITION cat /dev/mtd8 > /tmp/mtd8.bin scp /tmp/mtd8.bin root@YOURSERVERIP:/ rm /tmp/mtd8.bin ROOT PARITION cat /dev/mtd9 > /tmp/mtd9.bin scp /tmp/mtd9.bin root@YOURSERVERIP:/ rm /tmp/mtd9.bin If you are sure ,that you want to flash openwrt, from uBoot, before bootm, clean rootfs partition with command: nand erase 0x1800000 0x1D00000 6.Login via ssh or serial and remove stock partitions (default IP 192.168.1.1): ubiattach -m 9 # it could return error if ubi was attached before or rootfs part was erased before ubirmvol /dev/ubi0 -N ubi_rootfs # it could return error if rootfs part was erased before ubirmvol /dev/ubi0 -N ubi_rootfs_data # some devices doesn't have it 7. Install image via : sysupgrade -n /tmp/openwrt-ipq40xx-generic-zte_mf18a-squashfs-sysupgrade.bin previously wgeting bin. Sometimes it could print ubi attach error, but please ignore it if process goes forward. Back to Stock (!!! need original dump taken from initramfs !!!) ------------- Place mtd8.bin and mtd9.bin initramfs image for the device on a TFTP in the server's root. This example uses Server IP: 192.168.0.2 Connect serial console (115200,8n1) to serial console connector . Connect TFTP server to RJ-45 port (WAN/LAN1). rename mtd8.bin to web.img and mtd9.bin to root_uImage_s Stop in u-Boot (using ESC button) and run u-Boot commands: This will erase Web and RootFS: nand erase 0x1000000 0x800000 nand erase 0x1800000 0x1D00000 This will restore RootFS: tftpboot 0x84000000 root_uImage_s nand erase 0x1800000 0x1D00000 nand write 0x84000000 0x1800000 0x1D00000 This will restore Web Interface: tftpboot 0x84000000 web.img nand erase 0x1000000 0x800000 nand write 0x84000000 0x1000000 0x800000 After first boot on stock firwmare, do a factory reset. Push reset button for 5 seconds so all parameters will be reverted to the one printed on label on bottom of the router As reference was taken MF289F support by Giammarco Marzano stich86@gmail.com and MF286D by Pawel Dembicki paweldembicki@gmail.com Signed-off-by: Marcin Gajda <mgajda@o2.pl>
* ath79: Fix glinet ar300m usb not workingLuo Chongjun2023-01-142-13/+8
| | | | | | | | | | | | | | | | | | glinet forum users reported the problem at https://forum.gl-inet.com/t/gl-ar300m16-openwrt-22-03-0-rc5-usb-port-power-off-by-default/23199 The current code uses the regulator framework to control the USB power supply. Although usb0 described in DTS refers to the regulator by vbus-supply, but there is no code related to regulator implemented in the USB driver of QCA953X, so the USB of the device cannot work. Under the regulator framework, adding the regulator-always-on attribute fixes this problem, but it means that USB power will not be able to be turned off. Since we need to control the USB power supply in user space, I didn't find any other better way under the regulator framework of Linux, so I directly export gpio. Signed-off-by: Luo Chongjun <luochongjun@gl-inet.com>
* ramips: add support for D-Link DIR-1935 A1Keith Harrison2023-01-143-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for D-Link DIR-1935 A1 based on similarities to DIR-882 A1, DIR-867 A1 and other DIR-8xx A1 models. Existing DIR-882 A1 openwrt "factory" firmware installs without modificaitons via the D-Link Recovery GUI and has no known incompatibilities with the DIR-1935 A1. Changes to be committed: new file: target/linux/ramips/dts/mt7621_dlink_dir-1935-a1.dts modified: target/linux/ramips/image/mt7621.mk modified: target/linux/ramips/mt7621/base-files/etc/board.d/01_leds Specifications: * Board: Not known * SoC: MediaTek MT7621 Family * RAM: 128 MB (DDR3) * Flash: 16 MB (SPI NOR) * WiFi: MediaTek MT7615 Family (x2) * Switch: 1 WAN, 4 LAN (Gigabit) * Ports: 1 USB 3.0 * Buttons: Reset, WiFi Toggle, WPS * LEDs: Power (green/orange), Internet (green/orange), WiFi 2.4G (green), WiFi 5G (green) Notes: * 160MHz 5GHz is available in LuCi but does not appear to work (i.e. no SSID is visible in wifi scanning apps on other devices) with either official DIR-882 A1 firmware or a test build for the DIR-1935 A1 based on the 22.03.2 branch. 80 MHz 5GHz works. Serial port: * Untested (potential user damage/error) * Expected to be identical to other DIR-8xx A1 models: * Parameters: 57600, 8N1 * Location: J1 header (close to the Reset, WiFi and WPS buttons) * Pinout: 1 - VCC 2 - RXD 3 - TXD 4 - GND Installation: * D-Link Recovery GUI: power down the router, press and hold the reset button, then re-plug it. Keep the reset button pressed until the power LED starts flashing orange, manually assign a static IP address under the 192.168.0.xxx subnet (e.g. 192.168.0.2) and go to http://192.168.0.1 * Some modern browsers may have problems flashing via the Recovery GUI, if that occurs consider uploading the firmware through cURL: curl -v -i -F "firmware=@file.bin" 192.168.0.1 Signed-off-by: Keith Harrison <keithh@protonmail.com>
* ramips: Alternative name Asus RT-AX1800U for Asus RT-AX53UFelix Baumann2023-01-141-0/+2
| | | | | | | | The Asus RT-AX1800U is identical to the already supported Asus RT-AX53U. Use the ALT0 buildroot tags to show both devices. Tested-by: Marian Sarcinschi <znevna@gmail.com> Signed-off-by: Felix Baumann <felix.bau@gmx.de>
* ramips: add support for xiaomi RA75 Range ExtenderJo Deisenhofer2023-01-142-0/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This device is a 'Range extender' variant of the Xiaomi 4A router. Its identical to the 100m non-intl/chinese version as much as it can run the same firmware, differences being form factor, LEDs, WPS button and one 100M port only. The stock firmware differs significantly, being 'app managed only'. Device specification -------------------- SoC: MT7628DAN MIPS_24KEc@580MHz 2.4G-n 2x2 WiFi: MT7612EN 5G-ac 80MHz 2T2R Flash: 16MB W25Q128BV DRAM: 64MB built-in SoC Switch: built-in SoC Ethernet: 1x10/100 Mbps USB: None Antennas: 2 x external, non-detachable LEDs: 2 programmable blue/amber Buttons: WPS and reset (hidden) Housing: Range Extender / Wall wart Serial: 115200,8n1 MAC Addresses ------------- All 3 MACs are read from flash and identical to stock. Label MAC is WIFI 2G Installation ------------ No HTML UI on this device, serial console only. The serial connector is unpopulated but standard size and clearly marked. Flash from the U-Boot shell at boot by choosing (2) and flashing the sysupgrade file via tftp. Recovery/Debricking procedures of the xiaomi 4A and variants should work, but there currently is no official source for the stock firmware. Signed-off-by: Jo Deisenhofer <jo.deisenhofer@gmail.com>
* ramips: Move LED definition out of included dtsi into dtsJo Deisenhofer2023-01-144-27/+81
| | | | | | | Prepare for a new target with different led definitions that wants to include this dtsi. The resulting dtb are unchanged, verified with dtdiff Signed-off-by: Jo Deisenhofer <jo.deisenhofer@gmail.com>
* ramips: add basic support for TP-Link EC330-G5u v1Mikhail Zhilkin2023-01-147-0/+356
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds basic support for TP-Link EC330-G5u Ver:1.0 router (also known as TP-Link Archer C9ERT). Device specification -------------------- SoC Type: MediaTek MT7621AT RAM: 128 MiB, Nanya NT5CC64M16GP-DI Flash: 128 MiB NAND, ESMT F59L1G81MA-25T Wireless 2.4 GHz (MediaTek MT7615N): b/g/n, 4x4 Wireless 5 GHz (MediaTek MT7615N): a/n/ac, 4x4 Ethernet: 5xGbE (WAN, LAN1, LAN2, LAN3, LAN4) USB ports: 1xUSB3.0 Button: 4 (Led, WiFi On/Off, Reset, WPS) LEDs: 7 blue LEDs, 1 orange(amber) LED, 1 white(non-gpio) LED Power: 12 VDC, 2 A Connector type: Barrel Bootloader: First U-Boot (1.1.3), Main U-Boot (1.1.3). Additionally, original TP-Link firmware contains Image U-Boot (1.1.3). Serial console (UART) --------------------- V +-------+-------+-------+-------+ | +3.3V | GND | TX | RX | +---+---+-------+-------+-------+ | J2 | +--- Don't connect Installation ------------ 1. Rename OpenWrt initramfs image to test.bin and place it on tftp server with IP 192.168.0.5 2. Attach UART, switch on the router and interrupt the boot process by pressing 't' 3. Load and run OpenWrt initramfs image: tftpboot bootm 4. Once inside OpenWrt, switch to the first boot image: fw_setenv BootImage 0 5. Run 'sysupgrade -n' with the sysupgrade OpenWrt image Back to Stock ------------- 1. Run in the OpenWrt shell: fw_setenv BootImage 1 reboot Recovery -------- 1. Press Reset button and power on the router 2. Navigate to U-Boot recovery web server (http://192.168.0.1/) and upload the OEM firmware MAC addresses ------------- +---------+-------------------+-------------------+-------------+ | | MAC example 1 | MAC example 2 | Algorithm | +---------+-------------------+-------------------+-------------+ | label | 68:ff:7b:xx:xx:f4 | 50:d4:f7:xx:xx:da | label | | LAN | 68:ff:7b:xx:xx:f4 | 50:d4:f7:xx:xx:da | label | | WAN | 72:ff:7b:xx:xx:f5 | 54:d4:f7:xx:xx:db | label+1 [1] | | WLAN 2g | 68:ff:7b:xx:xx:f4 | 50:d4:f7:xx:xx:da | label | | WLAN 5g | 68:ff:7b:xx:xx:f6 | 50:d4:f7:xx:xx:dc | label+2 | +---------+-------------------+-------------------+-------------+ label MAC address was found in factory at 0x165 (text format xx:xx:xx:xx:xx:xx). Notes ----- [1] WAN MAC address: a. First octet of WAN MAC is differ than others and OUI is not related to TP-Link company. This probably should be fixed. b. Flipping bits in first octet and hex delta are different for the different MAC examples: +-----------------+----------------+----------------+ | | Example 1 | Example 2 | +-----------------+----------------+----------------+ | LAN | 68 = 0110 1000 | 50 = 0101 0000 | | MAC (1st octet) | ^ ^ ^ | | +-----------------+----------------+----------------+ | WAN | 72 = 0111 0010 | 54 = 0101 0100 | | MAC (1st octet) | ^ ^ ^ | ^ | +-----------------+----------------+----------------+ | HEX delta | 0xa | 0x4 | +-----------------+----------------+----------------+ | DEC delta | 4 | 4 | +-----------------+----------------+----------------+ c. DEC delta is a constant (4). This looks like a mistake in OEM firmware and probably should be fixed. Based on the above, I decided to keep correct OUI and make WAN MAC = label + 1. [2] Bootloaders The device contains 3 bootloaders: - First U-Boot: U-Boot 1.1.3 (Mar 18 2019 - 12:50:24). The First U-Boot located on NAND Flash to load next full-feature Uboot. - Main U-Boot + its backup: U-Boot 1.1.3 (Mar 18 2019 - 12:50:29). This bootloader includes recovery webserver. Requires special uImages to continue the boot process: 0x00 (os0, os1) - firmware uImage 0x40 (os0, os1) - standalone uImage (OpenWrt kernel is here) - Additionally, both slots of the original TP-Link firmware contains Image U-Boot: U-Boot 1.1.3 (Oct 16 2019 - 08:14:45). It checks image magics and CRCs. We don't use this U-Boot with OpenWrt. Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
* ramips: add support for ELECOM WRC-2533GHBK2-TINAGAKI Hiroshi2023-01-143-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ELECOM WRC-2533GHBK2-T is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based on MT7621A. Specification: - SoC : MediaTek MT7621A - RAM : DDR3 128 MiB - Flash : SPI-NOR 16 MiB (Macronix MX25L12835FM2I-10G) - WLAN : 2.4/5 GHz 4T4R (2x MediaTek MT7615) - Ethernet : 10/100/1000 Mbps x5 - Switch : MediaTek MT7530 (SoC) - LED/keys : 4x/3x (2x buttons, 1x slide-switch) - UART : through-hole on PCB - J4: 3.3V, RX, GND, TX from SoC side - 57600n8 - Power : 12 VDC, 1.5 A Flash instruction using factory image: 1. Boot WRC-2533GHBK2-T normally 2. Access to "http://192.168.2.1/" and open firmware update page ("ファームウェア更新") 3. Select the OpenWrt factory image and click apply ("適用") button 4. Wait ~150 seconds to complete flashing MAC addresses: LAN : BC:5C:4C:xx:xx:FD (Config, "ethaddr" (text)) WAN : BC:5C:4C:xx:xx:FC (Config, "wanaddr" (text), Label) 2.4 GHz: BC:5C:4C:xx:xx:FE (Factory, 0x4 (hex)) 5 GHz : BC:5C:4C:xx:xx:FF (Factory, 0x8004 (hex)) Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>