aboutsummaryrefslogtreecommitdiff
path: root/target/linux/ipq40xx/files
Commit message (Collapse)AuthorAge
* ipq40xx: split files in 6.1 and 6.6 dedicated directoryChristian Marangi2024-04-02
| | | | | | | | | | | Since with recent kernel version DTS moved to a dedicated directory, it's required to split files to per kernel version to follow kernel version directory structure. Also makes use of DEVICE_DTS_DIR to target the correct DTS directory based on the kernel version. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ipq40xx: Add support Netgear LBR20Marcin Gajda2024-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | **Netgear LBR20** is a router with two gigabit ethernets , three wifi radios and integrated LTE cat.18 modem. SoC Type: Qualcomm IPQ4019 RAM: 512 MiB Flash: 256 MiB , SLC NAND, 2 Gbit (Macronix MX30LF2G18AC) Bootloader: U-Boot Modem: LTE CAT.18 Quectel EG-18EA , Max. 1.2Gbps downlink / 150Mbps uplink WiFi class AC2200: - radio0 : 5G on QCA9888 , WiFi5- 802.11a/n/ac MU-MIMO 2x2 , 887Mbps , 80MHz - limited for low channels - radio1: 2,4G on IPQ4019 ,WiFi4- 802.11b/g/n MIMO2x2 300Mbps 40Mhz - radio2: 5G on IPQ4019 , WiFi5- 802.11a/n/ac MU-MIMO 2x2 , 887Mbps ,80Mhz - limited for high channels (from 100 up to 165) . Becouse of DFS remember to set country before turning on. Ethernet: 2x1GbE (WAN/LAN1, LAN2) LEDs: section power : green and red , section on top (orbi) drived by TLC59208F: red, green ,blue and white USB ports: No Buttons: 2 Reset and SYNC(WPS) Power: 12 VDC, 2,5 A Connector type: Barrel OpenWRT Installation 1. Simplest way is just do upgrade from webpage with *factory.img 2. You can also do it with standard tool for Netgear's debricking - NMPRFlash 3. Most advanced way is to open device , connect to UART console and : - Prepare OpenWrt initramfs image in TFTP server root (server IP 192.168.1.10) - Connect serial console (115200,8n1) to UART connector - Connect TFTP server to RJ-45 port - Stop in u-Boot and run u-Boot command: > setenv serverip 192.168.1.10 > set fdt_high 0x85000000 > tftpboot 0x83000000 openwrt-ipq40xx-generic-netgear_lbr20-initramfs-zImage.itb > bootm 0x83000000 - Login via ssh - upload or download *sysupgrade.bin ( like wget ... or scp transfer) - Install image via "sysupgrade -n" (like “sysupgrade -n /tmp/openwrt-ipq40xx-generic-netgear_lbr20-squashfs-sysupgrade.bin”) Back to Stock - Download firmware from official Netgear's webpage , it will be *.img file after decompressing. - Use NMRPFlash tool ( detailed insructions on project page https://github.com/jclehner/nmrpflash ) Open the case - Unscrew nuts and remove washers from antenna's conectors. - There are two Torx T10 screws under the label next to antenna conectors. You have to unglue this label from left and right corner to get it - Two parts of shell covers will slide out from eachother , you have to unglue two small rubber pads and namplate sticker on bottom to do that. - PCB is screwed with 4Pcs of Torx T10 screws - Before lifting up PCB remove pigtiles for LTE antennas and release them from PCB and radiator (black and white wires) - On other side of PCB ,in left bottom corner there is already soldered with 4 pins UART connector for console. Counting from left it is +3,3V , TX , RX ,GND (reffer to this picture: https://i.ibb.co/Pmrf9KB/20240116-103524.jpg ) BDF's files are in firmware_qca-wireless https://github.com/openwrt/firmware_qca-wireless/ and in parallel sent to ath10k@lists.infradead.org. Signed-off-by: Marcin Gajda <mgajda@o2.pl>
* ipq40xx: adapt to new Upstream QCA807x PHY driverChristian Marangi2024-02-11
| | | | | | | | Adapt patches to new Upstream QCA807x PHY driver. Rework the PHY patch to new PHY Package nodes. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ipq40xx: fix dts error in LED color/function conversionChristian Marangi2024-02-09
| | | | | | | | Fix DTS error in LED color/function conversion due to a bug in the conversion script. Fixes: a9e0d97e1fc8 ("ipq40xx: convert to new LED color/function format where possible") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ipq40xx: convert to new LED color/function format where possibleChristian Marangi2024-02-07
| | | | | | | | Initial conversion to new LED color/function format and drop label format where possible. The same label is composed at runtime. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ipq40xx: drop redundant label with new LED color/function formatChristian Marangi2024-02-07
| | | | | | | | | Drop redundant label with new LED color/function format declared. This was needed previously when the new format wasn't supported by leds.sh functions script. Now that is supported this property can be removed in favor of the new format. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* generic: 6.1: backport at803x split patchesChristian Marangi2024-02-01
| | | | | | | | | | | | | | Backport at803x split patches merged upstream to tidy things up for the at803x PHY driver. New Kernel config are introduced hence any user needs to be updated. Downstream ipq40xx patch require rework to correctly move them to the qcom specific PHY directory. All affected patch automatically refreshed. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ipq40xx: update ASUS RT-AC58U leds DTS nodesChristian Lamparter2023-12-02
| | | | | | | | | | | | - use color, function, function-enumerator properties. - removes the label properties from LED nodes. - add panic-indicator to the blue power/status LED. Note: yes this brings the combined LAN/"switch" LED sort of back, though I fully admit, it's a bit jank. Do you know a better option? then please tell/make a PR! Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: remove mac-address-incrementRosen Penev2023-11-25
| | | | | | nvmem-layout allows removal Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ipq40xx: convert to nvmem-layoutRosen Penev2023-11-25
| | | | | | Allows replacing mac-address-increment with mac-base. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ipq40xx: fix dtc warnimgRosen Penev2023-11-25
| | | | | | I2C bus unit address format error, expected "62" Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ipq40xx: use upstreamed SDI disable supportRobert Marko2023-10-02
| | | | | | | | | | | | | | | Google WiFi board has what seems as debug version of TZ/QSEE and it is always enabling SDI (Secure Debug Image) and in order to do a regular reboot it must be disabled, as otherwise you are stuck in a debug state where you are supposed to extract debug logs via QCA tooling which is not helpfull at all for regular users. So, instead of using our downstream version to disable SDI lets use the version that was merged upstream and relies on a boolean property in the SCM node instead of checking the compatible. Signed-off-by: Robert Marko <robimarko@gmail.com> Tested-by: Brian Norris <computersforpeace@gmail.com>
* ipq40xx: add support for Extreme Networks WS-AP391x series APsGlen Lee2023-09-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This in a single image to run many types of hardware in the AP391x series (AP3912/AP3915/AP3916/AP3917/AP7662). Hardware -------- Qualcomm IPQ4029 WiSoC 2T2R 802.11 abgn 2T2R 802.11 nac Macronix MX25L25635E SPI-NOR (32M) 512M DDR3 RAM 1-4x Gigabit Ethernet Senao EXT1025 HD Camera (AP3916 only) USB 2.0 Port (AP3915e only) 1x Cisco RJ-45 Console port - except for AP3916 and AP3912 where there is no external serial console and it is TDB how to solder one. Possibly J12 is UART with pin1 = 3.3V, pin2 = GND, pin3 = TXD, pin4 = RXD. - Settings: 115200 8N1 Installation With Serial Console -------------------------------- 1. Attach to the Console port. Power up the device and press the s key to interrupt autoboot. 2. The default username / password to the bootloader is admin / new2day 3. Check uboot variables using printenv, and update if necessary: $ setenv AP_MODE 0 $ setenv WATCHDOG_COUNT 0 $ setenv WATCHDOG_LIMIT 0 $ setenv AP_PERSONALITY identifi $ setenv serverip <SERVER_IPADDR> $ setenv ipaddr <UNIQUE_IPADDR> $ setenv MOSTRECENTKERNEL 0; ## OpenWRT only uses the primary image $ saveenv $ saveenv ## 2nd time to write the secondary copy 4. On the TFTP server located at <SERVER_IPADDR>, download the OpenWrt initramfs image. Rename and serve it as vmlinux.gz.uImage.3912 5. TFTP boot the OpenWrt initramfs image from the AP serial console: $ run boot_net 6. Wait for OpenWrt to start. Internet port sw-eth5 is assiged to LAN bridge and sw-eth4 (if available) is assigned to WAN. The LAN port will use default IP address 192.168.1.1 and run a DHCP server. If you already have a working DHCP server or already have 192.168.1.1 on your network you MUST DISCONNECT the LAN cable from your active network immediately after the power/status LED turns green! At this point, you need to temporarily reconfigure the AP to have a way to transfer the OpenWRT sysupgrade image to it. Reconfigure the newly converted OpenWRT AP using serial console or plug in a PC to a sw-eth5 as a separate network. Note -- the LAN/WAN port assignments were designed to make it possible to convert to OpenWRT without serial console and using a common firmware image for many AP models -- they may not make the most sense when fully deployed. 7. Download and transfer the sysupgrade image to the device using e.g. SCP. 8. Install OpenWrt to the device using "sysupgrade" $ sysupgrade -n /path/to/openwrt.bin 9. After it boots up again, as in step 6, connect to AP and reconfigure for final deployment. This build supports APs in the AP391x series and similar such as WiNG AP7662. Ethernet devices within OpenWRT are named "sw-eth1" thru "sw-eth5". Mapping from OpenWRT internal naming to external naming on the case is as follows: ``` |sw-eth1|sw-eth2|sw-eth3|sw-eth4|sw-eth5 ------------+-------+-------+-------+-------+------- AP3917 | | | | GE2 | GE1 ------------+-------+-------+-------+-------+------- AP7662 | | | | GE2 | GE1 ------------+-------+-------+-------+-------+------- AP3916 | | | | CAM* | GE1 ------------+-------+-------+-------+-------+------- AP3915 | | | | | GE1 ------------+-------+-------+-------+-------+------- AP3912 | | P1 | P2 | P3 | LAN1 ------------+-------+-------+-------+-------+------- ``` By default sw-eth4 is mapped to WAN. All others are assigned to the LAN. CAM* - On AP3916, sw-eth4 is the camera's interface. You should reconfigure this to be on LAN after OpenWRT boots from flash. Installation Without Serial Console ----------------------------------- The main premise is to set u-boot environment variables using the Extreme Networks firmware's rdwr_boot_cfg program. $ rdwr_boot_cfg Utility to manipulate the boot ROM config blocks All errors are written to the sytem log file (/tmp/log/ap.log) ``` Usage: rdwr_boot_cfg <read_all|read_var|read_var_f|write_var|rm_var> ... read_all read the entire active block read_var <var> read a single variable from the active block read_var_f <var> read a single variable from the active block (formatted) write_var <var=val> write a single variable/value pair to both blocks rm_var <var> delete a single variable from both blocks ``` WARNING: Be very sure you have set the u-boot environment correctly. If not, it can only be fixed by attaching serial console! Be aware that the Extreme Networks shell environment will automatically reboot every 5 minutes if there is no controller present. Read and understand these steps fully before attempting. It is easy to make mistakes! 1. Place the OpenWRT initramfs on the TFTP server and name it as vmlinux.gz.uImage.3912 2. Boot up to Extreme Networks WING-Campus mode OS. Port GE1/LAN1 will be a DHCP **client**. Find out the IP address from your DHCP server and SSH in. Default user/passwd is admin/new2day or admin/admin123. If it is booting to WING-Distributed mode, use this command to convert to Campus mode. $ operational-mode centralized 3. Upon bootup you have about 5mins to changed these u-boot variables if necessary using the rdwr_boot_cfg command in Linux shell: $ rdwr_boot_cfg write_var AP_MODE=0 $ rdwr_boot_cfg write_var MOSTRECENTKERNEL=0 $ rdwr_boot_cfg write_var WATCHDOG_COUNT=0 $ rdwr_boot_cfg write_var WATCHDOG_LIMIT=0 $ rdwr_boot_cfg write_var AP_PERSONALITY=identifi $ rdwr_boot_cfg write_var serverip=<SERVER_IPADDR> $ rdwr_boot_cfg write_var ipaddr=<UNIQUE_IPADDR> $ rdwr_boot_cfg write_var bootcmd="run boot_net" 4. Reboot AP. 5. Connect PC with ethernet to GE1/LAN1 port. You should get a DHCP address in the 192.168.1.x range and should be able to SSH to the new OpenWRT TFTP recovery/installation shell. 6. At this point, u-boot is still set to TFTP boot, so you have to replace the TFTP image with the original Extreme Networks image so that you can change the u-boot environment. See the instructions for Extracting Extreme Networks firmware image. DON'T REBOOT YET! 7. Next you must follow steps 6 thru 8 from the Installation with serial console. After which you should have OpenWRT installed to primary flash firmware. 8. Now Reboot. This time it will boot using TFTP into Extreme Networks image. You may need to reconnect cables at this point -- GE1/LAN1 will be a DHCP **client** and you can SSH in -- just like step 2. Get the IP address from you own DHCP server. 9. Set u-boot env as follows: $ rdwr_boot_cfg write_var MOSTRECENTKERNEL=0 $ rdwr_boot_cfg write_var WATCHDOG_COUNT=0 $ rdwr_boot_cfg write_var bootcmd="run boot_flash" 10. Reboot AP. This time it should be into OpenWRT. GE1/LAN1 will be a DHCP **server** and have static IP 192.168.1.1 -- just like step 5. 11. SSH into the LAN port and reconfigure to final configuration. Don't make any changes that prevent you from SSH or Luci access! Restoring Extreme Networks firmware ----------------------------------- Assuming you have the original Extreme Networks image: 1. Login to OpenWRT shell 2. scp the Extreme Networks packaged firmware image file AP391x-*.img to /tmp 3. Extract the firmware uimage file: $ tar xjf AP391x-*.img vmlinux.gz.uImage 4. Force run sysupgrade: $ sysupgrade -F /tmp/AP391x-*.img / 5. Restore the u-boot varable(s): $ rdwr_boot_cfg write_var WATCHDOG_LIMIT=3 USB 2.0 Port on AP3915e ----------------------- Enable this by setting LED "eth:amber_or_usb_enable" to ALWAYS ON. Reviewed-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Glen Lee <g2lee@yahoo.com>
* ipq40xx: wpj428: panic on squashfs error to work around boot limboLeon M. Busch-George2023-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently, a few ipq40xx devices have sporadic problems when reading the flash over SPI. When that happens, the result of the faulty SPI read is cached and it isn't re-attempted. Depending on when it happens, the router either panics and reboots or is left in a partially broken state (an application wont start). The data on the flash is alright. This wasn't the case with Openwrt with Linux < 5.x but I wasn't able to work out which software change was responsible. Github user karlpip created a patch for testing that disabled the cache entirely and added logs. Typically, only one or two SPI operations fail at a time: [689200.631152] spi-nor spi0.0: SPI transfer failed: -110 [689200.631280] spi_master spi0: failed to transfer one message from queue [689200.635369] jffs2: Write of 68 bytes at 0x00ffccf4 failed. returned -110, retlen 0 [689200.642014] jffs2: Not marking the space at 0x00ffccf4 as dirty because the flash driver returned retlen zero Because reads aren't re-attempted, squashfs can't recover: [3171844.279235] SQUASHFS error: Failed to read block 0x2bb912: -5 [3171844.279284] SQUASHFS error: Unable to read fragment cache entry [2bb912] [3171844.283980] SQUASHFS error: Unable to read page, block 2bb912, size 14e6c [3171844.291650] SQUASHFS error: Unable to read fragment cache entry [2bb912] [3171844.297831] SQUASHFS error: Unable to read page, block 2bb912, size 14e6c I assume there to be some kind of underlying electrical problem because, in my experience, this happens a lot more when PoE is used. NoTengoBattery has made an in-depth investigation: https://forum.openwrt.org/t/patch-squashfs-data-probably-corrupt/70480 .. and created a patch that evicts the page cache and retries reading: https://github.com/NoTengoBattery/openwrt/blob/linksys-ea6350v3-mastertrack/target/linux/ipq40xx/patches-5.4/9996-fs_squashfs_improve_squashfs_error_resistance.patch The patch also works well with the WPJ428 but NoTengoBattery didn't try to upstream it ("This is not the solution that should be used"). In 2020, I tried and failed to create a working patch that prevents faulty pages to be cached in the first place. Because I needed a solution, I backported "squashfs: add option to panic on errors " (10dde05b89980ef) which has since become available in Openwrt. The 'error=panic' option has been tested on a fleet of multiple hundred WPJ428s over multiple years. Without this patch, devices regularly went into 'limbo' on reboot or update and required a manual reboot. Devices with this patch don't. I was initially concerned that the kernel panic would leave devices with a real corrupted data but I haven't seen a case of actual corruption since (outside of people turning off the power during upgrades). The WPJ428 is the only device I tested this patch on - others might also benefit. Reviewed-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
* ipq4019: add support for ZTE MF282 Plus aka DreiTubeAndreas Böhler2023-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ZTE MF282 Plus is a LTE router used (exclusively?) by the network operator "3". It is very similar to the MF286/MF287 but in the form factor of the MF282. Specifications ============== SoC: IPQ4019 RAM: 256MiB Flash: 8MiB SPI-NOR + 128MiB SPI-NAND LAN: 1x GBit LAN LTE: ZTE Cat6 WiFi: 802.11a/b/g/n/ac SoC-integrated MAC addresses ============= LAN: from config WiFi 1: from config + 1 WiFi 2: from config + 2 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 0x84000000 openwrt.bin bootm 0x84000000 From this intiramfs boot you can take a backup of the currently installed partitions as no vendor firmware is available for download: ubiattach -m9 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 mtd9 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/mtd9 0 0 dd if=/tmp/factory.bin of=/dev/mtdblock9 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 9 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 the MF286R, it provides an RNDIS interface and an AT interface. Other Notes =========== 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>
* ipq40xx: ZTE MF287 series: move to gpio-export for modem-reset GPIOAndreas Böhler2023-09-19
| | | | | | | | | Turn the "gpio-restart" node into a "gpio-export" node for all MF287 variants, similar to the MF287 Pro. Unfortunately, there doesn't seem to be a "power button blocker" GPIO for the MF287 and MF287 Plus, so a modem reset always triggers a system reset. Signed-off-by: Andreas Böhler <dev@aboehler.at>
* ipq40xx: refactor ZTE MF287 seriesAndreas Böhler2023-09-19
| | | | | | | | The ZTE MF287 requires a different board calibration file for ath10k than the ZTE MF287+. The two devices receive their own DTS, thus the device tree is slightly refactored. Signed-off-by: Andreas Böhler <dev@aboehler.at>
* ipq40xx: add support for YYeTs LE1Chukun Pan2023-09-18
| | | | | | | | | | | | | | | | | | | Hardware Highlights: SoC: Qualcomm IPQ4019 717 MHz RAM: 512M NT5CC256M16ER-EK Flash: 32M SPI NOR MX25L25635F WIFI1: 2.4 GHz 2T2R integrated WIFI2: 5 GHz 2T2R integrated Ethernet: QCA8075 (4x LAN, 1x WAN) LEDS: power, wlan2g, wlan5g, usb USB: 1x 3.0 Button: Reset Installation: Upload factory.bin in stock firmware's upgrade page, and this will take a few minutes. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* ipq40xx: qca807x: adapt for 6.1Robert Marko2023-09-17
| | | | | | | Kernel 6.1 has changed format of sfp_parse_support(), so lets adapt to those changes so it works on newer kernels as well. Signed-off-by: Robert Marko <robimarko@gmail.com>
* ipq40xx: move DSA and ethernet driver to 5.15 specific directoryRobert Marko2023-09-17
| | | | | | | | As a preparation to move to 6.1, we need to move the DSA and ethernet drivers to a 5.15 specific directory as 6.1 will use the latest patchset that was sent upstream which is too hard to backport to 5.15. Signed-off-by: Robert Marko <robimarko@gmail.com>
* ipq40xx: add support for Netgear RBX40Thomas Makin2023-09-16
| | | | | | | | This adds support for the RBR40 and RBS40 (sold together as RBK40), two netgear routers identical to SRR60/SRS60 in all but antennae (and hardware id). See 2cb24b3f3c for details. Signed-off-by: Thomas Makin <halorocker89@gmail.com>
* ipq40xx: convert devolo Magic 2 WiFi next to DSAThomas Bong2023-09-03
| | | | | | | | | | Renamed the interfaces to match the other devices. Name the interface connected to the builtin G.hn chip 'ghn'. This might toggle at runtime while the G.hn chip is in the bootloader. Reviewed-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Thomas Bong <thomas.bong@devolo.de>
* 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>
* 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>
* 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>
* ipq4019: fix support for AVM FRITZ!Repeater 3000Alexander Friese2023-07-26
| | | | | | | | new versions of the device have NAND with 8bit ECC which was not yet supported before. This change removes ECC restrictions. Signed-off-by: Alexander Friese <af944580@googlemail.com>
* ipq40xx: add support for Teltonika RUTX50David Bauer2023-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- CPU: Qualcomm IPQ4018 RAM: 256M Flash: 16MB SPI-NOR (W25Q128) 128MB SPI-NAND (XTX) WiFi: 2T2R (2GHz 802.11n ; 5 GHz 802.11ac) ETH: 4x LAN ; 1x WAN (Gigabit) CELL: Quectel RG501Q 3G/4G/5G UART: Available on the goldfinger connector (Pinout silkscreened) 115200 8N1 3V3 - Only connect RX / TX / GND Installation ------------ 1. Enable SSH in the Teltonika UI (System --> Administration --> Access Control) 2. Check from which partition set the device is currently running from. $ cat /proc/boot_info/rootfs/primaryboot In case this output reads 0, install a Software update from Teltonika first. After upgrade completion, check this file now reads 1 before continuing. 2. Transfer the OpenWrt factory image to the device using scp. Use the same password (user root!) as used for the Web-UI. $ scp -O openwrt-factory.bin root@192.168.1.1:/tmp 3. Connect to the device using ssh as the root user. 4. Install OpenWrt by writing the factory image to flash. $ ubiformat /dev/mtd16 -y -f /tmp/openwrt-factory.bin 5. Instruct the bootloaer to boot from the first partition set. $ echo 0 > /proc/boot_info/rootfs/primaryboot $ cat /proc/boot_info/getbinary_bootconfig > /tmp/bootconfig.bin $ cat /proc/boot_info/getbinary_bootconfig1 > /tmp/bootconfig1.bin $ mtd write /tmp/bootconfig.bin /dev/mtd2 $ mtd write /tmp/bootconfig1.bin /dev/mtd3 6. Reboot the device. $ reboot Signed-off-by: David Bauer <mail@david-bauer.net>
* ipq40xx: move Teltonika RUT STM32 IO to specific DTSDavid Bauer2023-07-26
| | | | | | Prepare to re-use the DTS for the RUTX50. Signed-off-by: David Bauer <mail@david-bauer.net>
* ipq4019: add support for ZTE MF287+ aka DreiNeoAndreas Böhler2023-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ZTE MF287+ is a LTE router used (exclusively?) by the network operator "3". The MF287 (i.e. non-plus aka 3Neo) is also supported (the only difference is the LTE modem) Specifications ============== SoC: IPQ4018 RAM: 256MiB Flash: 8MiB SPI-NOR + 128MiB SPI-NAND LAN: 4x GBit LAN LTE: ZTE Cat12 (MF287+) / ZTE Cat6 (MF287) WiFi: 802.11a/b/g/n/ac SoC-integrated MAC addresses ============= LAN: from config + 2 WiFi 1: from config WiFi 2: from config + 1 Installation ============ Option 1 - TFTP --------------- TFTP installation using UART is preferred. Disassemble the device and connect serial. Put the initramfs image as openwrt.bin to your TFTP server and configure a static IP of 192.168.1.100. Load the initramfs image by typing: setenv serverip 192.168.1.100 setenv ipaddr 192.168.1.1 tftpboot 0x82000000 openwrt.bin bootm 0x82000000 From this intiramfs boot you can take a backup of the currently installed partitions as no vendor firmware is available for download: ubiattach -m14 cat /dev/ubi0_0 > /tmp/ubi0_0 cat /dev/ubi0_1 > /tmp/ubi0_1 Copy the files /tmp/ubi0_0 and /tmp/ubi0_1 somewhere save. Once booted, transfer the sysupgrade image and run sysupgrade. You might have to delete the stock volumes first: ubirmvol /dev/ubi0 -N ubi_rootfs ubirmvol /dev/ubi0 -N kernel Option 2 - From stock firmware ------------------------------ The installation from stock requires an exploit first. The exploit consists of a backup file that forces the firmware to download telnetd via TFTP from 192.168.0.22 and run it. Once exploited, you can connect via telnet and login as admin:admin. The exploit will be available at the device wiki page. Once inside the stock firmware, you can transfer the -factory.bin file to /tmp by using "scp" from the stock frmware or "tftp". ZTE has blocked writing to the NAND. Fortunately, it's easy to allow write access - you need to read from one file in /proc. Once done, you need to erase the UBI partition and flash OpenWrt. Before performing the operation, make sure that mtd13 is the partition labelled "rootfs" by calling "cat /proc/mtd". Complete commands: cd /tmp tftp -g -r factory.bin 192.168.0.22 cat /proc/driver/sensor_id flash_erase /dev/mtd13 0 0 dd if=/tmp/factory.bin of=/dev/mtdblock13 bs=131072 Afterwards, reboot your device and you should have a working OpenWrt installation. Restore Stock ============= Option 1 - via UART ------------------- Boot an OpenWrt initramfs image via TFTP as for the initial installation. Transfer the two backed-up files to your box to /tmp. Then, run the following commands - replace $kernel_length and $rootfs_size by the size of ubi0_0 and ubi0_1 in bytes. ubiattach -m 14 ubirmvol /dev/ubi0 -N kernel ubirmvol /dev/ubi0 -N rootfs ubirmvol /dev/ubi0 -N rootfs_data ubimkvol /dev/ubi0 -N kernel -s $kernel_length ubimkvol /dev/ubi0 -N ubi_rootfs -s $rootfs_size ubiupdatevol /dev/ubi0_0 /tmp/ubi0_0 ubiupdatevol /dev/ubi0_1 /tmp/ubi0_1 Option 2 - from within OpenWrt ------------------------------ This option requires to flash an initramfs version first so that access to the flash is possible. This can be achieved by sysupgrading to the recovery.bin version and rebooting. Once rebooted, you are again in a default OpenWrt installation, but no partition is mounted. Follow the commands from Option 1 to flash back to stock. LTE Modem ========= The LTE modem is similar to other ZTE devices and controls some more LEDs and battery management. Configuring the connection using uqmi works properly, the modem provides three serial ports and a QMI CDC ethernet interface. Signed-off-by: Andreas Böhler <dev@aboehler.at>
* ipq40xx: convert Buffalo WTR-M2133HP to DSAYanase Yuki2023-06-01
| | | | | | This commit convert WTR-M2133HP to DSA setup. Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp>
* ipq40xx: add e2600ac c2 to dsa张 鹏2023-05-29
| | | | | | | | Convert E2600ac c2 to DSA and enable it. Signed-off-by: 张 鹏 <sd20@qxwlan.com> [ rename port to more generic name ] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ipq40xx: add e2600ac c1 to dsa张 鹏2023-05-29
| | | | | | | | Convert E2600ac c1 to DSA and enable it. Signed-off-by: 张 鹏 <sd20@qxwlan.com> [ rename port to more generic name ] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* kernel: remove obsolete kernel version switchesAleksander Jan Bajkowski2023-05-20
| | | | | | | This removes unneeded kernel version switches from the targets after kernel 5.10 has been dropped. Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
* ipq40xx: convert EZVIZ CS-W3-WD1200G-EUP to DSAChristian Lamparter2023-05-20
| | | | | | Convert the repeater to DSA. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: convert AVM FRITZ!Repeater 3000 to DSANick Hainke2023-05-03
| | | | | | Convert the repeater to DSA. Signed-off-by: Nick Hainke <vincent@systemli.org>
* ipq40xx: convert GL-AP1300 to DSANick Hainke2023-04-24
| | | | | | | | | | Convert GL-AP1300 to DSA and enable it. While working on it rename the GL-AP1300 leds from green to white. Tested-by: Rob White <rob@blue-wave.net> Tested-by: Robert Sommer <frauhottelmann@gmail.com> Signed-off-by: Nick Hainke <vincent@systemli.org>
* ipq40xx: add LED functions for Google WiFiJan-Niklas Burfeind2023-03-31
| | | | | | | | | | | | | | | | | Add LED function properties for the LED controller to avoid failing driver probe with kernel 5.15. While at it, also define the OpenWrt LED indicator patterns for this device. Ref commit 583ac0e11df7 ("mpc85xx: update lp5521 led-controller node for 5.10") Google uses white for running and red for an issue Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me> Tested-by: Andrijan Möcker <amo@ct.de> Reviewed-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: David Bauer <mail@david-bauer.net>
* ipq40xx: add reset button for Google WiFi (Gale)Jan-Niklas Burfeind2023-03-31
| | | | | | | | | | Add the external reset button for use with OpenWrt. Co-authored-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me> Reviewed-by: Brian Norris <computersforpeace@gmail.com> Tested-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: David Bauer <mail@david-bauer.net>
* ipq40xx: add support for Wallystech DR40x9Robert Marko2023-03-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for the Wallys DR40x9 series boards. They come in IPQ4019 and IPQ4029 versions. IPQ4019/4029 only differ in that that IPQ4029 is the industrial version that is rated to higher temperatures. Specifications are: * CPU: Qualcomm IPQ40x9 (4x ARMv7A Cortex A7) at 716 MHz * RAM: 512 MB * Storage: 2MB of SPI-NOR, 128 MB of parallel NAND * USB 3.0 TypeA port for users * MiniPCI-E with PCI-E 2.0 link * MiniPCI-E for LTE modems with only USB2.0 link * 2 SIM card slots that are selected via GPIO11 * MicroSD card slot * Ethernet: 2x GBe with 24~48V passive POE * SFP port (Does not work, I2C and GPIO's not connected on hardware) * DC Jack * UART header * WLAN: In-SoC 2x2 802.11b/g/n and 2x2 802.11a/n/ac * 4x MMCX connectors for WLAN * Reset button * 8x LED-s Installation instructions: Connect to UART, pins are like this: -> 3.3V | TX | RX | GND Settings are 115200 8n1 Boot initramfs from TFTP: tftpboot 0x84000000 openwrt-ipq40xx-generic-wallys_dr40x9-initramfs-fit-uImage.itb bootm Then copy the sysupgrade image to the /tmp folder and execute sysupgrade -n <image_name> The board file binary was provided from Wallystech on March 14th 2023 including full permission to use and distribute. Signed-off-by: Robert Marko <robert.marko@sartura.hr> Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
* ipq40xx: mf18a: rename wifi0 calibration variant to ZTE-MF18AChristian Marangi2023-03-18
| | | | | | | Rename wifi0 calibration variant to ZTE-MF18A to allign to BDF changes for ZTE MF18A. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ipq40xx: rutx10: Add missing variant to ath10k wifiChristian Marangi2023-03-18
| | | | | | | Add missing variant to ath10k wifi to allign to BDF changes for Teltonika RUTX10. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ipq40xx: mf18a: Add missing variant to PCI ath10k cardChristian Marangi2023-03-18
| | | | | | | Add missing variant to PCI ath10k card to allign to BDF changes for ZTE MF18A. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ipq40xx: convert Netgear EX6100/EX6150 v2 to DSADavid Bauer2023-03-08
| | | | Signed-off-by: David Bauer <mail@david-bauer.net>
* ipq40xx: Linksys MR8300: fix the USB port powerDaniel González Cabanelas2023-02-25
| | | | | | | | | | | | | The USB port on the MR8300 randomly fails to feed bus-powered devices. This is caused by a misconfigured pinmux. The GPIO68 should be used to enable the USB power (active low), but it's inside the NAND pinmux. This GPIO pin was found in the original firmware at a startup script in both MR8300 and EA8300. Therefore apply the fix for both boards. Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com> Reviewed-by: Robert Marko <robimarko@gmail.com>
* ipq40xx: fix dts whitespaceFelix Baumann2023-02-09
| | | | | | Remove whitespace from otherwise empty lines Signed-off-by: Felix Baumann <felix.bau@gmx.de>
* ipq4019: fix dts white-spaceFelix Baumann2023-02-08
| | | | | | | Replace blanks with tabs Remove whitespace from otherwise empty lines Signed-off-by: Felix Baumann <felix.bau@gmx.de>
* ipq40xx: fix assignment of lan port numbers for Cell C RTL30VWCezary Jackiewicz2023-02-06
| | | | | | After switching to DSA, the LAN ports in Cell C RTL30VW have swapped numbers. Assigning the right numbers. Signed-off-by: Cezary Jackiewicz <cezary@eko.one.pl>
* ipq40xx: convert Extreme AP3915i to DSAJames Andrewartha2023-01-17
| | | | | | 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-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>