aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
Commit message (Collapse)AuthorAgeFilesLines
* ramips: 5.15: add patch fixing compilation warning for hsdma-mt7621Christian Marangi2023-05-121-0/+31
| | | | | | | | | | | Add patch fixing compilation warning for hsdma-mt7621: drivers/staging/mt7621-dma/hsdma-mt7621.c: In function 'mtk_hsdma_probe': drivers/staging/mt7621-dma/hsdma-mt7621.c:685:9: error: ignoring return value of 'device_reset' declared with attribute 'warn_unused_result' [-Werror=unused-result] 685 | device_reset(&pdev->dev); | ^~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ralink: rt3833: fix compilation warning from device_reset in fe_probeChristian Marangi2023-05-121-1/+3
| | | | | | | | | | | | | Fix compilation warning from device_reset in fe_probe. On fail print a warning but don't fail probe. Fix compilation warning: drivers/net/ethernet/ralink/mtk_eth_soc.c: In function 'fe_probe': drivers/net/ethernet/ralink/mtk_eth_soc.c:1564:9: error: ignoring return value of 'device_reset' declared with attribute 'warn_unused_result' [-Werror=unused-result] 1564 | device_reset(&pdev->dev); | ^~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ralink: mt76x8: fix compilation warning in esw driverChristian Marangi2023-05-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | Fix compilation warning for debug string in esw driver: drivers/net/ethernet/ralink/esw_rt3050.c:1535:9: note: in expansion of macro 'dev_info' 1535 | dev_info(&pdev->dev, "mediatek esw at 0x%08lx, irq %d initialized\n", | ^~~~~~~~ drivers/net/ethernet/ralink/esw_rt3050.c:1535:53: note: format string is defined here 1535 | dev_info(&pdev->dev, "mediatek esw at 0x%08lx, irq %d initialized\n", | ~~~~^ | | | long unsigned int | %08p cc1: all warnings being treated as errors Fix unused variable causing compilation warning: drivers/net/ethernet/ralink/esw_rt3050.c: In function 'esw_interrupt': drivers/net/ethernet/ralink/esw_rt3050.c:769:13: error: unused variable 'i' [-Werror=unused-variable] 769 | int i; | ^ cc1: all warnings being treated as errors Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ramips: mtk-mcc: move cmd_buf for dbg under ifdefChristian Marangi2023-05-121-2/+3
| | | | | | | | | | Move cmd_buf for dbg under ifdef to fix compilation warning: drivers/mmc/host/mtk-mmc/dbg.c:51:13: error: 'cmd_buf' defined but not used [-Werror=unused-variable] 51 | static char cmd_buf[256]; | ^~~~~~~ cc1: all warnings being treated as errors Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ralink: mt7620: fix compilation warning for device_reset in i2s driverChristian Marangi2023-05-121-2/+6
| | | | | | | | | | | | | Fix compilation warning for device_reset in i2s driver. Fix compilation warning: sound/soc/ralink/ralink-i2s.c: In function 'ralink_i2s_probe': sound/soc/ralink/ralink-i2s.c:885:9: error: ignoring return value of 'device_reset' declared with attribute 'warn_unused_result' [-Werror=unused-result] 885 | device_reset(&pdev->dev); | ^~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errorralink: mt7620: fix compilation warning for device_reset in i2s driver Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ramips: 5.15: handle return from device_reset in I2C driverChristian Marangi2023-05-121-2/+7
| | | | | | | | | | | | | | Handle return from device reset in I2C driver. Don't fail on device_reset error but print a warning. Fix compilation warning: sound/soc/ralink/ralink-i2s.c: In function 'ralink_i2s_probe': sound/soc/ralink/ralink-i2s.c:885:9: error: ignoring return value of 'device_reset' declared with attribute 'warn_unused_result' [-Werror=unused-result] 885 | device_reset(&pdev->dev); | ^~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ramips: mt7620: handle request_irq fail in gsw ethernet driverChristian Marangi2023-05-121-2/+7
| | | | | | | | | | | | | | Handle return from request_irq in gsw ethernet driver. Fix compilation warning: drivers/net/ethernet/ralink/gsw_mt7620.c: In function 'mtk_gsw_init': drivers/net/ethernet/ralink/gsw_mt7620.c:236:17: error: ignoring return value of 'request_irq' declared with attribute 'warn_unused_result' [-Werror=unused-result] 236 | request_irq(gsw->irq, gsw_interrupt_mt7620, 0, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 237 | "gsw", priv); | ~~~~~~~~~~~~ cc1: all warnings being treated as errors Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ramips: 5.15: handle error from device_reset in SPI ralink driverChristian Marangi2023-05-121-3/+8
| | | | | | | | | | | | | Handle error from device reset in SPI ralink driver fixing compilation warning: drivers/spi/spi-rt2880.c: In function 'rt2880_spi_probe': drivers/spi/spi-rt2880.c:474:17: error: ignoring return value of 'device_reset' declared with attribute 'warn_unused_result' [-Werror=unused-result] 474 | device_reset(&pdev->dev); | ^~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ramips: add support for Linksys RE7000Christoph Krapp2023-05-093-0/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware specification: - SoC: MediaTek MT7621AT (880 MHz) - Flash: 16 MB (Macronix MX25L12835FM2I-10G) - RAM: 128 MB (Nanya NT5CC64M16GP-DI) - WLAN 2.4 GHz: 2x2 MediaTek MT7603EN - WLAN 5 GHz: 2x2 MediaTek MT7615N - Ethernet: 1x 10/100/1000 Mbps - LED: Power, Wifi, WPS - Button: Reset, WPS - UART: 1:VCC, 2:GND, 3:TX, 4:RX (from LAN port) Serial console @ 57600,8n1 Flash instructions: Connect to serial console and start up the device. As the bootloader got locked you need to type in a password to unlock U-Boot access. When you see the following output on the console: relocate_code Pointer at: 87f1c000 type in the super secure password: 1234567890 Then select TFTP boot from RAM by selecting option 1 in the boot menu. As Linksys decided to leave out a basic TFTP configuration you need to set server- & client ip as well as the image filename the device will search for. You need to use the initramfs openwrt image for the TFTP boot process. Once openwrt has booted up, upload the sysupgrade image via scp and run sysupgrade as normal. Signed-off-by: Christoph Krapp <achterin@gmail.com>
* ramips: fix dts file name for SNR-CPE-ME1Maximilian Weinmann2023-05-081-0/+0
| | | | | | | | | Rename file mt7621_snr_snr-spe-me-1.dts Fixes: #12562 Fixes: ecdb248 ("ramips: add support for SNR-CPE-ME1") Tested-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Maximilian Weinmann <x1@disroot.org>
* ramips: add support for SNR-CPE-ME1Maximilian Weinmann2023-05-073-0/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | SNR-CPE-ME1 is a wireless WiFi 5 router manufactured by SNR/NAG company. Specification: - SoC : MediaTek MT7621A - RAM : DDR3 256 MiB - Flash : SPI-NOR 16 MiB (GD25Q128CSIG) - WLAN : 2.4 GHz (MediaTek MT7603EN) 5 GHz (MediaTek MT7610EN) - Ethernet : 10/100/1000 Mbps x5 - Switch : MediaTek MT7530 (in SoC) - USB : 3.0 x1 - UART : through-hole on PCB - [J4] 3.3V, RX, TX, GND (57600n8) - Power : 12 VDC, 2 A Flash instruction via TFTP: 1. Boot SNR-CPE-ME1 to recovery mode (hold the reset button while power on) 2. Send firmware via TFTP client: TFTP Server address: 192.168.1.1 TFTP Client address: 192.168.1.131 3. Wait ~120 seconds to complete flashing 4. Do sysupgrade using web-interface Signed-off-by: Maximilian Weinmann <x1@disroot.org>
* ramips: mt7621: rename Asus RT-AC57U to v1Felix Baumann2023-05-062-4/+6
| | | | | | rename RT-AC57U to avoid confusion with unsupported revisions 2 and 3 Signed-off-by: Felix Baumann <felix.bau@gmx.de>
* ramips: mt7621: add support for Cudy X6 v2Felix Baumann2023-05-025-52/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename existing device to v1 and create common .dtsi Difference to v1: 16MB Flash Specifications: SoC: MediaTek MT7621 RAM: 256 MB Flash: 16 MB (SPI NOR, XM25QH128C on my device) WiFi: MediaTek MT7915E Switch: 1 WAN, 4 LAN (Gigabit) Buttons: Reset, WPS LEDs: Two Power LEDs (blue and red; together they form purple) Power: DC 12V 1A center positive Serial: 115200 8N1 C440 - (3V3 - GND - RX - TX) - C41 | v1 and v2 (P - G - R - T) | v2 labels them on the board Installation: Download and flash the manufacturer's built OpenWrt image available at http://www.cudytech.com/openwrt_software_download Install the new OpenWrt image via luci (System -> Backup/Flash firmware) Be sure to NOT keep settings. Recovery: Loads only signed manufacture firmware due to bootloader RSA verification Serve tftp-recovery image as /recovery.bin on 192.168.1.88/24 Connect to any lan ethernet port Power on the device while holding the reset button Wait at least 8 seconds before releasing reset button for image to download MAC addresses as verified by OEM firmware: use address source LAN f4:a4:54:86:75:a2 label WAN f4:a4:54:86:75:a3 label + 1 2g f4:a4:54:86:75:a2 label 5g f6:a4:54:b6:75:a2 label + LA-Bit set + 4th oktet increased The label MAC address is found in bdinfo 0xde00. Signed-off-by: Felix Baumann <felix.bau@gmx.de>
* ramips: add factory image for TP-Link EC330-G5u v1Mikhail Zhilkin2023-04-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds factory.bin image for TP-Link EC330-G5u v1. This allows to install OpenWrt without connecting a serial cable (UART). Installation using factory image -------------------------------- Tested with "3.16.0 0.9.1 v6037.0 Build 191016 Rel.30619nb" TP-Link firmware. 1. Login to the router web interface (http://192.168.0.1/ by default) and save running config to "conf.bin" file 2. Open configuration file in any TP-Link config editor (e.g. https://jahed.github.io/tp-link-config-editor/) 3. Find "DeviceInfo" section and insert a new string "<Description val="Modem Router`telnetd -p 1023 -l login`" />" according to the following example: <DeviceInfo> ... <Description val="Modem Router`telnetd -p 1023 -l login`" /> ... </DeviceInfo> 4. Save configuration file and upload changed configuration using stock firmware interface 5. Login using telnet to IP:192.168.0.1 (Username:admin, password:1234) 6. Run "cat /proc/mtd | grep mtd7" a. If the result is 'mtd7: 03000000 00020000 "rootfs" 03400000', then install stock firmware using web interface to toggle booted firmware image from "os1" to "os0" b. If the result is 'mtd7: 03000000 00020000 "rootfs" 00400000', then all is ok, go to the next step 7. Set up a tftp server with OpenWrt factory.bin image (IP:192.168.0.100 in this example) 8. Login using telnet to 192.168.0.1 9. Download OpenWrt factory.bin image from the tftp server: cd /tmp tftp -g -r factory.bin 192.168.0.100 10. Write OpenWrt factory.bin image: dd if=/tmp/factory.bin of=/dev/mtdblock1 11. Power cycle the router Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
* ramips: TP-Link EC330-G5u v1: switch to mac-address-asciiMikhail Zhilkin2023-04-293-10/+26
| | | | | | | | | | | | | The TP-Link EC330-G5u v1 router has MAC address that stored in factory mtd in ascii format. This commit makes the router use of "mac-address-ascii" in dts. After the change: 1. All MAC addresses are explicitly assigned in dts (the workarounds in network scripts are no longer needed); 2. gmac0 (eth0) MAC address is no longer random. Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
* ramips: lzma-loader: Refactor loaderAntonio Vázquez2023-04-299-87/+75
| | | | | | | | | * Delete unused lantiq makefile * Delete redundant makefiles and unify them into the main makefile * Refactor and unify board code into a single file * Add support and review subtarget specific board support Signed-off-by: Antonio Vázquez <antoniovazquezblanco@gmail.com>
* ramips: add support for D-Link DAP-1620 B1Rani Hod2023-04-295-8/+191
| | | | | | | | | | | | | | | | | | | | | | | | | The DAP-1620 rev B is a wall-plug AC1300 repeater. Specifications: - MT7621AT, 256 MiB RAM, 16 MiB SPI NOR - MT7615DN 2x2 802.11n +2x2 802.11ac (DBDC) - Ethernet: 1 port 10/100/1000 - Status LEDs (1x red+green) - LED RSSI bargraph (2x green, 1x red+green) Installation: - Keep reset button pressed during plug-in - Web Recovery Updater is at 192.168.0.50 - Upload factory.bin, confirm flashing (seems to work best with Chromium-based browsers) Revert to OEM firmware: - tail -c+117 DAP1620B1_FW212B03.bin | \ openssl aes-256-cbc -d -md md5 -out decrypted.bin \ -k 905503a4e0c3cd3c1ce062246de427a68962347e - flash decrypted.bin via D-Link Web Recovery Signed-off-by: Rani Hod <rani.hod@gmail.com>
* ramips: mt7621: add support for ZyXEL WSM20Andreas Böhler2023-04-296-1/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ZyXEL WSM20 aka Multy M1 is a cheap mesh router system by ZyXEL based on the MT7621 CPU. Specifications ============== SoC: MediaTek MT7621AT (880MHz) RAM: 256MiB Flash: 128MiB NAND Wireless: 802.11ax (2x2 MT7915E DBDC) Ethernet: 4x 10/100/1000 (MT7530) Button: 1x WPS, 1x Reset, 1x LED On/Off LED: 7 LEDs (3x white, 2x red, 2x green) MAC address assignment ====================== The MAC address assignment follows stock: The label MAC address is the LAN MAC address, the WAN address is read from flash. The WiFi MAC addresses are set in userspace to label MAC + 1 and label MAC + 2. Installation (web interface) ============================ The device is cloud-managed, but there is a hidden local firmware upgrade page in the OEM web interface. The device has to be registered in the cloud in order to be able to access this page. The system has a dual firmware design, there is no way to tell which firmware is currently booted. Therefore, an -initramfs version is flashed first. 1. Log into the OEM web GUI 2. Access the hidden upgrade page by navigating to https://192.168.212.1/gui/#/main/debug/firmwareupgrade 3. Upload the -initramfs-kernel.bin file and flash it 4. Wait for OpenWrt to boot and log in via SSH 5. Transfer the sysupgrade file via SCP 6. Run sysupgrade to install the image 7. Reboot and enjoy NB: If the initramfs version was installed in RAS2, the sysupgrade script sets the boot number to the first partition. A backup has to be performed manually in case the OEM firwmare should be kept. Installation (UART method) ========================== The UART method is more difficult, as the boot loader does not have a timeout set. A semi-working stock firmware is required to configure it: 1. Attach UART 2. Boot the stock firmware until the message about failsafe mode appears 3. Enter failsafe mode by pressing "f" and "Enter" 4. Type "mount_root" 5. Run "fw_setenv bootmenu_delay 3" 6. Reboot, U-Boot now presents a menu 7. The -initramfs-kernel.bin image can be flashed using the menu 8. Run the regular sysupgrade for a permanent installation Changing the partition to boot is a bit cumbersome in U-Boot, as there is no menu to select it. It can only be checked using mstc_bootnum. To change it, issue the following commands in U-Boot: nand read 1800000 53c0000 800 mw.b 1800004 1 1 nand erase 53c0000 800 nand write 1800000 53c0000 800 This selects FW1. Replace "mw.b 1800004 1 1" by "mw.b 1800004 2 1" to change to the second slot. Back to stock ============= It is possible to flash back to stock, but a OEM firmware upgrade is required. ZyXEL does not provide the link on its website, but the link can be acquired from the OEM web GUI by analyzing the transferred JSON objects. It is then a matter of writing the firmware to Kernel2 and setting the boot partition to FW2: mtd write zyxel.bin Kernel2 echo -ne "\x02" | dd of=/dev/mtdblock7 count=1 bs=1 seek=4 conv=notrunc Signed-off-by: Andreas Böhler <dev@aboehler.at> Credits to forum users Annick and SirLouen for their initial work on this device
* ramips: reduce Archer AX23 / MR70X SPI-frequencyDavid Bauer2023-04-272-2/+2
| | | | | | | | | | | | | | It was brought to attention the Archer AX23 v1 fails to read jffs2 data from time to time. While this is not reproducible on my unit, it is on others. Reducing the SPI frequency does the trick. While it worked with at lest 40 MHz, opt for the cautious side and choose a save frequency of 25 MHz. Apply the same treatment to the Mercusys MR70X which uses a similar design just in case. Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: fix green LED for D-Link DAP-X1860Sebastian Schaper2023-04-241-4/+9
| | | | | | | | | | | It was found this device uses a single tri-color power/status LED rather than individual red/orange LEDs, which also supports green. Add GPIO for green color and use with `boot` and `running` aliases. Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net> Reviewed-by: Philip Prindeville <philipp@redfish-solutions.com> Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: Cudy X6 fixes / improvementsFelix Baumann2023-04-243-16/+19
| | | | | | | | | | | | | | | | | | | | | | - Correct WiFi MACs, they didn't match oem firmware - Move nvmem-cells to bdinfo partition and remove &bdinfo reference - Add OEM device model name R13 to SUPPORTED_DEVICES This allows sysupgrading from Cudy's OpenWrt fork without force - Label red_led and use it during failsafe mode and upgrades MAC addresses as verified by OEM firmware: use address source LAN b4:4b:d6:2d:c8:4a label WAN b4:4b:d6:2d:c8:4b label + 1 2g b4:4b:d6:2d:c8:4a label 5g b6:4b:d6:3d:c8:4a label + LA-Bit set + 4th oktet increased The label MAC address is found in bdinfo 0xde00. Signed-off-by: Felix Baumann <felix.bau@gmx.de> [read wifi mac from flash offset] Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: fix lzma-loader for buffalo_WSR_600DHPHaoan Li2023-04-231-0/+1
| | | | | | | | This fixes a well known "LZMA ERROR 1" error, reported previously on numerous of similar devices. Fixes: #11919 Signed-off-by: Haoan Li <lihaoan1001@163.com>
* generic: 5.15: replace ramips AR8033 fiber patch with 5.18 patchesDaniel Kestrel2023-04-221-184/+0
| | | | | | | | | | | | A patch was added in kernel 5.4 to support the fiber operation of AR8033 with ramips devices. In kernel 5.18 similar enhancements were added to the kernel. Those patches are required for other fiber based devices but when added, build fails for ramips targets. This commit removes the ramips patch and adds the kernel 5.18 ones. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de> [ split commit,refresh patch and improve commit message ] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* generic: 5.10: replace ramips AR8033 fiber patch with 5.18 patchesDaniel Kestrel2023-04-221-184/+0
| | | | | | | | | | | | A patch was added in kernel 5.4 to support the fiber operation of AR8033 with ramips devices. In kernel 5.18 similar enhancements were added to the kernel. Those patches are required for other fiber based devices but when added, build fails for ramips targets. This commit removes the ramips patch and adds the kernel 5.18 ones. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de> [ split commit, refresh patch and improve commit title ] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ramips: MSG1500 X.00: switch to mac-address-ascii dtsChukun Pan2023-04-213-17/+30
| | | | | | | | The Config partition of some machines is special, and the openwrt script cannot read the protest_lan_mac correctly. This problem can be solved by reading the mac address (ascii) in dts. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* ramips: add Xiaomi RA75 red signal ledOleksandr Zharov2023-04-171-0/+11
| | | | | | | | | | | | | | | | | RA75 has 5 physical LEDs under 2 indicators, mixed with light pipes: Indicator "System": GPIO0: blue GPIO2: amber Indicator "Signal": GPIO44: blue GPIO37: amber GPIO46: red All except GPIO46 were already added by Jo Deisenhofer. GPIO46 is used for UART1 by default, so it needs additional pin control change in devicetree to be operational. Verified on my RA75. Signed-off-by: Oleksandr Zharov <alex.zeed@gmail.com>
* ramips: sercomm-payload: use pide-file argumentÁlvaro Fernández Rojas2023-04-091-1/+1
| | | | | | | Instead of passing an array of hex bytes for the Sercomm PID we can now use the --pid-file parameter. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* kernel: bump 5.10 to 5.10.177John Audia2023-04-083-8/+8
| | | | | | All patches automatically rebased. Signed-off-by: John Audia <therealgraysky@proton.me>
* ramips: lower re305-v3 spi-max-frequencyJoe Mullally2023-04-081-1/+1
| | | | | | | | | | | | | Fix flash I/O instability observed in newer devices with cFeon QH64A-104HIP (detected as en25qh64). Ref: https://forum.openwrt.org/t/support-for-tp-link-re305-v3/75893/91 Reported-by: Dimitri Souza <dimitri.souza@gmail.com> Tested-by: Dimitri Souza <dimitri.souza@gmail.com> Signed-off-by: Joe Mullally <jwmullally@gmail.com> [alter commit-message - target master] Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: define remapping-range for DAP-X1860David Bauer2023-04-081-0/+7
| | | | | | | | | Prevent the BBT translation layer from remapping the UBI used for storing rootfs. Explicitly define the number of blocks reserved for remapping. Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: add support for OrayBox X1Bin We2023-04-024-0/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for OrayBox X1. It is a 802.11n router, based on MediaTek MT7628N. Specifications: SoC: MediaTek MT7628N (580MHz) RAM: 64 MiB Flash: 16 MiB NOR (Winbond W25Q128JVSIQ) Wireless: 802.11b/g/n 2x2 2.4GHz (Built In) Ethernet: 1x 100Mbps only USB: 1x USB Type-A 2.0 Host Port Button: 1x "Reset" button LED: 1x Blue LED + 1x Red LED + 1x White LED Power: 5V Micro-USB input Manufacturer Page: https://pgy.oray.com/router/x1.html/parameter Flash Layout: 0x000000000000-0x000000030000 : "u-boot" 0x000000030000-0x000000040000 : "kpanic" 0x000000040000-0x000000050000 : "factory" 0x000000050000-0x000000fe0000 : "firmware" 0x000000fe0000-0x000000ff0000 : "bdinfo" 0x000000ff0000-0x000001000000 : "reserve" Install via SSH: Original firmware is based on OpenWRT, but SSH is not start by default, You should enable it first 1. Login into web admin (10.168.1.1), default password is 'admin' 2. Open the following link, and the result should be {"code":0}; SSH is now started, username is root, password is same as web admin password http://10.168.1.1/cgi-bin/oraybox?_api=ssh_set&enabled=1 4. You can flash firmware via mtd: mtd write /tmp/firmware_image.bin firmware Signed-off-by: Bin We <me@udp.pw>
* ramips: mt7621: add migration script for WLAN PCI pathsFelix Baumann2023-04-011-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PCI paths of the WLAN devices have changed between kernel 5.10 and 5.15; migrate config so existing wifi-iface definitions don't break. This is implemented as a hotplug handler rather than a uci-defaults script as the migration script must run before the 10-wifi-detect hotplug handler. based on b452af23a8602ebf7bfb0eb084383ecd595face5 migration was forgotten when device trees were adjusted in 688697889c9ceb9d2d8d413d1abcc5fa7edb402b c77913be5be5f11a0f20dba1b45b96470099e8a8 fixes #9374 affected devices: Netgear R6220 Netgear WAC104 Netgear WNDR3700 v5 Zbtlink ZBT-WE1326 Wiflyer WF3526-P Arcadyan WE420223-99 Beeline Smartbox Flash (Arcadyan WG443223) MTS WG430223 (Arcadyan WG430223) Tested-by: Maximilian Baumgartner <aufhaxer@googlemail.com> Tested-by: Mikhail Zhilkin <csharper2005@gmail.com> Signed-off-by: Felix Baumann <felix.bau@gmx.de>
* ramips: Add support for CJ-Hello HYC-G920Muhammad AL-Qadhy2023-04-012-0/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hanyang Digitech Co., Ltd. MSIP-CMM-HYD-HYC-G920 CJ-Hello HYC-G920 SoC : MediaTek MT7621AT RAM : 256M (SK hynix H5TQ2G63FFR) FLASH : 16MB (Winbond W25Q128BV) WiFi : MediaTek MT7602EN bgn 2SS WiFi : MediaTek MT7612EN nac 2SS BTN : Reset LED : - Power RED - WAN Green - LAN {1-4} - WiFi 2.4 GHz Blue - WiFi 5 GHz Blue - USB Green **For MT7621 stage1 DDR Test** UART : J4 GND - 3V3 - TX - RX - GND / 57600-8N1 ``` MT7621 stage1 code 10:33:55 (ASIC) CPU=500000000 HZ BUS=166666666 HZ ``` **For u boot environment** UART : J4 GND - 3V3 - TX - RX - GND / 115200-8N1 **UART Menu** ``` Please choose the operation: 1: Load system code to SDRAM via TFTP. 2: Load system code then write to Flash via TFTP. 3: Boot system code via Flash (default). 4: Entr boot command line interface. 7: Load Boot Loader code then write to Flash via Serial. 9: Load Boot Loader code then write to Flash via TFTP. ``` **Steps** Press 4: Entr boot command line interface. On the pormpt enter. `setenv firmware_size 0xf60000` Then enter. `saveenv` Then enter. `reset` **Device will reboot** Set your IP 192.168.100.100/24 Connect your lan cable to wan port. **On the UART Menu** Press 2: Load system code then write to Flash via TFTP. Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N) **enter** `Y` Please Input new ones /or Ctrl-C to discard Input device IP (192.168.100.55) ==:`192.168.100.55` Input server IP (192.168.100.100) ==:`192.168.100.100` Input Linux Kernel filename () ==:`openwrt-22.03.0-ramips-mt7621-hanyang_hyc-g920-squashfs-sysupgrade.bin` After uploading firmware image, device will boot Openwrt. Signed-off-by: Muhammad AL-Qadhy <m.ismael@gmail.com>
* ramips: mt7621: remove set-affinity scriptRosen Penev2023-04-011-19/+0
| | | | | | | | | | | | From https://github.com/openwrt/openwrt/pull/12280#issuecomment-1489279860 On Ethernet and WLAN, NAPI is threaded for all queues. This means that the processing work is not stuck on the CPU that fired the IRQ. Under heavy load, IRQs get disabled anyway, so it should not matter at all which CPUs the IRQs fire on. Basic testing indicates this to be true. There's no speedup or slowdown. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ramips: mt7621: ASUS RT-AX53U add NMBM, nest firmwareFelix Baumann2023-04-011-7/+26
| | | | | | | | | | | | Nests kernel and ubi into firmware partition in-order to be compatible with OEM firmware. This allows restoring oem firmware from a backup of firmware2. Add jffs2 partition which is present in the oem firmware. Add support for mediatek NMBM (wear leveling on newer mediatek devices). Exclude UBI partition from NMBM management. Continues PR #10685. Tested-by: Felix Baumann <felix.bau@gmx.de> Signed-off-by: Felix Baumann <felix.bau@gmx.de>
* kernel: bump 5.15 to 5.15.105John Audia2023-04-013-8/+8
| | | | | | | | | | | | | | | | | | | Manually rebased: Removed upstreamed: backport-5.15/743-v6.3-0005-net-dsa-b53-mmap-fix-device-tree-support.patch[1] backport-5.15/743-v6.3-0006-net-dsa-tag_brcm-legacy-fix-daisy-chained-switches.patch[2] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.105&id=9bbb3d3f218f1cf51f57a43cf8fd63b05be1b821 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.105&id=48f52431af9980582b6faa32ff8b581edb10486c Build system: x86_64 Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia <therealgraysky@proton.me>
* ramips: Refresh patchesHauke Mehrtens2023-03-291-2/+2
| | | | | | | Refresh the ramips kernel patches. Fixes: 7472476aef26 ("kernel: fix mtk_eth_soc throughput regressions on gigabit PHY ports") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* generic: mtk_eth_soc: switch to external PCS driverDaniel Golle2023-03-271-2/+2
| | | | | | Backport patch to make use of the new PCS driver in mtk_eth_soc. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* generic: backport some phylink helper functionsDaniel Golle2023-03-271-1/+1
| | | | | | | | | | | | | | It isn't feasible to literally backport all upstream phylink_pcs changes down to Linux 5.15: It's just too many patches, and many downstream drivers and hacks are likely to break. We are too close to branching off to risk this, and it's also just too much work. Instead just add helper functions used by modern PCS drivers while keeping the original functions instact as well. While this may add a kilobyte or two of extra kernel size, it has the advantage that we get the best of both worlds: None of the existing codepaths are touched, but yet we have the option to backport singular improvements to Ethernet drivers where needed. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ramips: add support for Keenetic Lite III rev. AAlexey Bartenev2023-03-274-0/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | General specification: SoC Type: MediaTek MT7620N (580MHz) ROM: 8 MB SPI-NOR (W25Q64FV) RAM: 64 MB DDR (EM6AB160TSD-5G) Switch: MediaTek MT7530 Ethernet: 5 ports - 5×100MbE (WAN, LAN1-4) Wireless: 2.4 GHz (MediaTek RT5390): b/g/n Buttons: 3 button (POWER, RESET, WPS) Slide switch: 4 position (BASE, ADAPTER, BOOSTER, ACCESS POINT) Bootloader: U-Boot 1.1.3 Power: 9 VDC, 0.6 A MAC in stock: |- + | | LAN | RF-EEPROM + 0x04 | | WLAN | RF-EEPROM + 0x04 | | WAN | RF-EEPROM + 0x28 | OEM easy installation 1. Use a PC to browse to http://my.keenetic.net. 2. Go to the System section and open the Files tab. 3. Under the Files tab, there will be a list of system files. Click on the Firmware file. 4. When a modal window appears, click on the Choose File button and upload the firmware image. 5. Wait for the router to flash and reboot. OEM installation using the TFTP method 1. Download the latest firmware image and rename it to klite3_recovery.bin. 2. Set up a Tftp server on a PC (e.g. Tftpd32) and place the firmware image to the root directory of the server. 3. Power off the router and use a twisted pair cable to connect the PC to any of the router's LAN ports. 4. Configure the network adapter of the PC to use IP address 192.168.1.2 and subnet mask 255.255.255.0. 5. Power up the router while holding the reset button pressed. 6. Wait approximately for 5 seconds and then release the reset button. 7. The router should download the firmware via TFTP and complete flashing in a few minutes. After flashing is complete, use the PC to browse to http://192.168.1.1 or ssh to proceed with the configuration. Signed-off-by: Alexey Bartenev <41exey@proton.me>
* ramips: mt7621: enable unused PCIe port to fix potential boot failureShiji Yang2023-03-264-16/+0
| | | | | | | | | | | | | One user reported that his SIMAX1800T couldn't boot like the others. After debugging, I found that this was caused by the disabled PCIe port. I cannot reproduce this issue on my SIMAX1800T. But when I disabled pcie2 on the ASUS RT-AC57U, I got the same result. It seems that disabling these unused PCIe ports on some mt7621 revisions will cause PCIe to fail to initialize. So we'd better to re-enable them on all related mt7621 devices. Signed-off-by: Shiji Yang <yangshiji66@qq.com>
* ramips: fix 5g mac for TOTOLINK X5000RChuanhong Guo2023-03-261-0/+4
| | | | | | | | | There's no valid mac address for the second band in the eeprom. The vendor fw uses 2.4G mac + 4 as the mac for 5G radio. Do the same in our firmware. Fixes: 23be410b3d ("ramips: add support for TOTOLINK X5000R") Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* kernel: bump 5.15 to 5.15.103John Audia2023-03-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Manually rebased: backport-5.15/704-15-v5.19-net-mtk_eth_soc-move-MAC_MCR-setting-to-mac_finish.patch Removed upstreamed: backport-5.15/060-v6.0-01-tools-build-Add-feature-test-for-init_disassemble_in.patch[1] backport-5.15/060-v6.0-02-tools-include-add-dis-asm-compat.h-to-handle-version.patch[2] backport-5.15/060-v6.0-03-tools-perf-Fix-compilation-error-with-new-binutils.patch[3] backport-5.15/060-v6.0-04-tools-bpf_jit_disasm-Fix-compilation-error-with-new-.patch[4] backport-5.15/060-v6.0-05-tools-bpftool-Fix-compilation-error-with-new-binutil.patch[5] pending-5.15/733-02-net-ethernet-mtk_eth_soc-fix-RX-data-corruption-issu.patch[6] bcm47xx/patches-5.15/170-bgmac-fix-initial-chip-reset-to-support-BCM5358.patch[7] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=51b99dc38c1a053e2e732d7f9e2740e343ae7eae 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=451c9d7b16169645ed291ebb2ca9844caa088f2d 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=97f005c0bdbaf656a7808586d234965385a06c58 4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=1c27fab243333821375e4d63128d60093fdbe149 5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=4441a90091931fd81607567961dc122f24f735bb 6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=2adc29350a5b4669544566f71f208d2abaec60ab 7. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=04bfc5bcdfc0fdb73587487c71b04d63807ae15a Build system: x86_64 Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia <therealgraysky@proton.me>
* ramips: add support for Mercusys MR70XDavid Bauer2023-03-243-4/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware ======== - SoC: MediaTek MT7621AT (880MHz, Duel-Core) - RAM: DDR3 128MB - Flash: Winbond W25Q128JV (SPI-NOR 16MB) - WiFi: MediaTek MT7915D (2.4GHz, 5GHz, DBDC) - Ethernet: MediaTek MT7530 (WAN x1, LAN x3, SoC) - UART: >TX RX GND 3v3 (115200 8N1, J1) Do not connect 3v3. TX is marked with an arrow. Installation ============ Flash factory image. This can be done using stock web ui. Revert to stock firmware ======================== Flash stock firmware via OEM Web UI Recovery mode. Web UI Recovery method ====================== 1. Unplug the router 2. Plug in and hold reset button 5~10 secs 3. Set your computer IP address manually to 192.168.1.x / 255.255.255.0 4. Flash image with web browser to 192.168.1.1 Co-authored-by: Robert Senderek <robert.senderek@10g.pl> Co-authored-by: Yoonji Park <koreapyj@dcmys.kr> Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: mt7621: enable lzma-loader for AFOUNDRY EW1200Tony Butler2023-03-221-0/+1
| | | | | | | | | Fixes boot loader LZMA decompression issues (LZMA ERROR 1) As reported in issue #12208 Reported-by: Raúl M. <raul.m@sparkedhost.com> Tested-by: Raúl M. <raul.m@sparkedhost.com> Signed-off-by: Tony Butler <spudz76@gmail.com>
* ramips: fix Archer AX23 WiFi MAC address conflictDavid Bauer2023-03-211-4/+1
| | | | | | | | | | The original claim about conflicting MAC addresses is wrong. mac80211 does increment the first octet and sets the LA bit. This means our "workaround" actually leads to the issue while incrementing the last octet is safe. Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: cudy wr1300v2 reduce SPI freq to 40000000Óscar García Amor2023-03-201-2/+1
| | | | | | | | | Cases have been reported in which certain devices do not boot correctly or have errors. After various tests by users who have such errors it has been concluded that the SPI frequency should be reduced to 40Mhz, at this speed it appears that all devices work correctly. Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
* kernel: bump 5.10 to 5.10.175John Audia2023-03-201-2/+2
| | | | | | | | | | | | | | Manually rebased: backport-5.10/611-v5.12-net-ethernet-mediatek-support-setting-MTU.patch Removed upstreamed: bcm47xx/patches-5.10/170-bgmac-fix-initial-chip-reset-to-support-BCM5358.patch[1] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.175&id=cbf11ff3708ff163387da924f80a47ce7c721e9b Signed-off-by: John Audia <therealgraysky@proton.me>
* kernel: bump 5.10 to 5.10.173John Audia2023-03-202-11/+10
| | | | | | | | | Manually rebased: ramips/patches-5.10/810-uvc-add-iPassion-iP2970-support.patch All other patches automatically rebased. Signed-off-by: John Audia <therealgraysky@proton.me>
* kernel: bump 5.15 to 5.15.100John Audia2023-03-182-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Manually rebased: bcm27xx/patches-5.15/950-0421-Support-RPi-DPI-interface-in-mode6-for-18-bit-color.patch bcm27xx/patches-5.15/950-0706-media-i2c-imx219-Scale-the-pixel-clock-rate-for-the-.patch ramips/patches-5.15/810-uvc-add-iPassion-iP2970-support.patch Removed upstreamed: bcm27xx/patches-5.15/950-0707-drm-vc4-For-DPI-MEDIA_BUS_FMT_RGB565_1X16-is-mode-1-.patch[1] bcm27xx/patches-5.15/950-0596-drm-vc4-dpi-Add-option-for-inverting-pixel-clock-and.patch[2] ipq807x/0006-v5.16-arm64-dts-qcom-Fix-IPQ8074-PCIe-PHY-nodes.patch [3] ipq807x/0034-v6.1-arm64-dts-qcom-ipq8074-fix-PCIe-PHY-serdes-size.patch [4] ipq807x/0103-arm64-dts-qcom-ipq8074-fix-Gen2-PCIe-QMP-PHY.patch [5] ipq807x/0104-arm64-dts-qcom-ipq8074-fix-Gen3-PCIe-QMP-PHY.patch [6] ipq807x/0105-arm64-dts-qcom-ipq8074-correct-Gen2-PCIe-ranges.patch [7] ipq807x/0108-arm64-dts-qcom-ipq8074-fix-Gen3-PCIe-node.patch [8] ipq807x/0109-arm64-dts-qcom-ipq8074-correct-PCIe-QMP-PHY-output-c.patch [9] ipq807x/0132-arm64-dts-qcom-ipq8074-correct-USB3-QMP-PHY-s-clock-.patch [10] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.99&id=d2991e6b30020e286f2dd9d3b4f43548c547caa6 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/gpu/drm/vc4/vc4_dpi.c?h=v5.15.100&id=8e04aaffb6de5f1ae61de7b671c1531172ccf429 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=a55a645aa303a3f7ec37db69822d5420657626da 4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=d9df682bcea57fa25f37bbf17eae56fa05662635 5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=7e6eeb5fb3aa9e5feffdb6e137dcc06f5f6410e1 6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=e88204931d9a60634cd50bbc679f045439c4b91d 7. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=1563af0f28afd3b6d64ac79a2aecced3969c90bf 8. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=feb8c71f015d416f1afe90e1f62cf51e47376c67 9. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=69c7a270357a7d50ffd3471b14c60250041200e3 10. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=dd3d021ae5471d98adf81f1e897431c8657d0a18 Build system: x86_64 Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3 Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3 Signed-off-by: John Audia <therealgraysky@proton.me> Tested-by: Robert Marko <robimarko@gmail.com> #ipq807x/Dynalink WRX36 Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> #ipq807x/ax3600, x86_64/FW-7543B, ath79/tl-wdr3600, ipq806x/g10, ipq806x/nbg6817