aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
Commit message (Collapse)AuthorAgeFilesLines
* Revert "ramips: add support for ipTIME AX2004M"Stijn Tintel2022-02-014-192/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit f4a79148f8cb ("ramips: add support for ipTIME AX2004M") seems to leak KERNEL_LOADADDR 0x82000000 to other devices, causing the to no longer boot. The leak is visible in u-boot: Using 'config-1' configuration Trying 'kernel-1' kernel subimage Description: MIPS OpenWrt Linux-5.10.92 Type: Kernel Image Compression: lzma compressed Data Start: 0x840000e4 Data Size: 10750165 Bytes = 10.3 MiB Architecture: MIPS OS: Linux Load Address: 0x82000000 Entry Point: 0x82000000 Normally, it should look like this: Using 'config-1' configuration Trying 'kernel-1' kernel subimage Description: MIPS OpenWrt Linux-5.10.92 Type: Kernel Image Compression: lzma compressed Data Start: 0xbfca00e4 Data Size: 2652547 Bytes = 2.5 MiB Architecture: MIPS OS: Linux Load Address: 0x80001000 Entry Point: 0x80001000 Revert the commit to avoid more people soft-bricking their devices. This reverts commit f4a79148f8cbb7dfbcddfb0c1128caec45a01596. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* ramips: add support for Wavlink WL-WN535K1Davide Fioravanti2022-01-304-0/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Wavlink WL-WN535K1 is a "mesh" router with 2 gigabit ethernet ports and one fast ethernet port. Mine is branded as Talius TAL-WMESH1. It can be found in kits of 2 or 3 (WL-WN535K2 or WL-WN535K3). The motherboard is labelled as WS-WN535G3-B-V1.2 so this image could potentially work for WL-WN535G3R and WS-WN535G3R with little to none effort, but it's untested. Hardware -------- SoC: Mediatek MT7620A RAM: 64MB FLASH: 8MB NOR (GigaDevice GD25Q64CS) ETH: - 2x 10/100/1000 Mbps Ethernet (RTL8211F) - 1x 10/100 Mbps Ethernet (integrated in SOC) WIFI: - 2.4GHz: 1x (integrated in SOC) (2x2:2) - 5GHz: 1x MT7612E (2x2:2) - 4 internal antennas BTN: - 1x Reset button - 1x Touchlink button (set to WPS) - 1x ON/OFF switch LEDS: - 1x Red led (system status) - 1x Blue led (system status) - 3x Green leds (ethernet port status/act) UART: - 57600-8-N-1 Everything works correctly. Currently there is no firmware update available. Because of this, in order to restore the OEM firmware, you must firstly dump the OEM firmware from your router before you flash the OpenWrt image. Backup the OEM Firmware ----------------------- The following steps are to be intended for users having little to none experience in linux. Obviously there are many ways to backup the OEM firmware, but probably this is the easiest way for this router. Procedure tested on WN535K1_V1510_200916 firmware version. 1) Go to http://192.168.10.1/webcmd.shtml 2) Type the following line in the "Command" input box and then press enter: mkdir /etc_ro/lighttpd/www/dev; dd if=/dev/mtd0ro of=/etc_ro/lighttpd/www/dev/mtd0ro 3) After few seconds in the textarea should appear this output: 16384+0 records in 16384+0 records out If your output doesn't match mine, stop reading and ask for help in the forum. 4) Open in another tab http://192.168.10.1/dev/mtd0ro to download the content of the whole NOR. If the file size is 0 byte, stop reading and ask for help in the forum. 5) Come back to the http://192.168.10.1/webcmd.shtml webpage and type: rm /etc_ro/lighttpd/www/dev/mtd0ro;for i in 1 2 3 4 5; do dd if=/dev/mtd${i}ro of=/etc_ro/lighttpd/www/dev/mtd${i}ro; done 6) After few seconds, in the textarea should appear this output: 384+0 records in 384+0 records out 128+0 records in 128+0 records out 128+0 records in 128+0 records out 14720+0 records in 14720+0 records out 1024+0 records in 1024+0 records out If your output doesn't match mine, stop reading and ask for help in the forum. 7) Open the following links to download the partitions of the OEM FW: http://192.168.10.1/dev/mtd1ro http://192.168.10.1/dev/mtd2ro http://192.168.10.1/dev/mtd3ro http://192.168.10.1/dev/mtd4ro http://192.168.10.1/dev/mtd5ro If one (or more) of these files are 0 byte, stop reading and ask for help in the forum. 8) Store these downloaded files in a safe place. 9) Reboot your router to remove any temporary file in ram. Installation ------------ Flash the initramfs image in the OEM firmware interface (http://192.168.10.1/update_mesh.shtml). When Openwrt boots, flash the sysupgrade image otherwise you won't be able to keep configuration between reboots. Restore OEM Firmware -------------------- Flash the "mtd4ro" file you previously backed-up directly from LUCI. Warning: Remember to not keep settings! Warning2: Remember to force the flash. Notes ----- 1) Router mac addresses: LAN XX:XX:XX:XX:XX:E2 (factory @ 0x28) WAN XX:XX:XX:XX:XX:E3 (factory @ 0x2e) WIFI 2G XX:XX:XX:XX:XX:E4 (factory @ 0x04) WIFI 5G XX:XX:XX:XX:XX:E5 (factory @ 0x8004) LABEL XX:XX:XX:XX:XX:E5 2) The OEM firmware upgrade page accepts only files containing the string "WN535K1" in the filename. 3) Additional notes 1,2,3 in the WS-WN583A6 commit are still valid (https://github.com/openwrt/openwrt/commit/92780d80ab6f5f03fac2407c06eb267dd83914a1) Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com> [remove trailing whitespace] Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: add support for ipTIME AX2004MSungbo Eo2022-01-294-0/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ipTIME AX2004M is an 802.11ax (Wi-Fi 6) router, based on MediaTek MT7621A. Specification: * SoC: MT7621A * RAM: 256 MiB * Flash: NAND 128 MiB * Wi-Fi: * MT7915D: 2.4/5 GHz (DBDC) * Ethernet: 5x 1GbE * Switch: SoC built-in * USB: 1x 3.0 * UART: J4 (115200 baud) * Pinout: [3V3] (TXD) (RXD) (GND) MAC address: | interface | MAC | source | comment |-----------|-------------------|----------------|--------- | LAN | 58:XX:XX:00:XX:9B | | [1] | WAN | 58:XX:XX:00:XX:99 | | | WLAN 2G | 58:XX:XX:00:XX:98 | factory 0x4 | | WLAN 5G | 5A:XX:XX:40:XX:98 | | | | | | | | 58:XX:XX:00:XX:98 | config ethaddr | [1] Used in this patch as WLAN 5G MAC address with the local bit set Load address: * stock * 0x80010000: FIT image * 0x81001000: kernel image -> entry * OpenWrt * 0x80010000: FIT image * 0x82000000: uncompressed kernel+relocate image * 0x80001000: relocated kernel image -> entry Installation via **recovery** mode: 1. Press reset button, power up the device, wait >10s for CPU LED to stop blinking. 2. Upload recovery image through the recovery web page at 192.168.0.1. Revert to stock firmware: 1. Install stock image via recovery mode. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: make the relocation address configurableSungbo Eo2022-01-291-1/+1
| | | | | | | | | If no argument is given to relocate-kernel, KERNEL_LOADADDR will be used just as before. This is a preparation for ramips support of ipTIME AX2004M. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: enable I2C_CHARDEV in mt7621/config-5.10Stijn Tintel2022-01-281-0/+1
| | | | | | | | I2C_CHARDEV used to be enabled in mt7621/config-5.4. Enable it in the 5.10 config, as it's required for PoE control on Unifi Switch Flex. Fixes: b4aad29a1d7a ("ramips: add support for kernel 5.10") Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* kernel: 5.10: drop broken-flash-reset patchChuanhong Guo2022-01-281-1/+1
| | | | | | | | | | | | | | | Flash accessing instruction templates are determined during probe since v5.6 for spimem-dirmap support in spi-nor driver in upstream commit: df5c21002cf4 ("mtd: spi-nor: use spi-mem dirmap API") As a result, changing bus_width on the fly doesn't work anymore and this patch will cause executing spi-mem ops with 3-byte address on 16-32M flash area. We can't easily revert that behavioral change upstream so drop the patch to prevent u-boot and eeprom from being erased. Fixes: b10d604459("kernel: add linux 5.10 support") Reported-by: Frank Di Matteo <dimatto@foxmail.com> Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: correct vendor name for COMFAST/JoowinRodrigo Araujo2022-01-227-44/+50
| | | | | | | | | | | | | | | | When Joowin WR758AC V1 and V2 devices were added, they should have been added with the primary manufacturer name which is COMFAST, since Joowin is just an alternate vendor name on some coutries or stores. Fix this by changing the the vendor name on the respective files and set Joowin as ALT0 variants while ensuring compatibility for early users. Also adjust the model names to better follow the naming rules. As a side effect, fix mt76x8 network script which was left incorrectly unsorted on the case block conditions. Fixes: 766733e172 ("ramips: add support for Joowin WR758AC V1 and V2") Signed-off-by: Rodrigo Araujo <araujo.rm@gmail.com>
* ramips: read Tenbay T-MB5EU address from single locationDavid Bauer2022-01-221-5/+2
| | | | | | | | | | | | | Currently the WAN MAC address is read from a different offset contrary to all other addresses. There's conflicting information whether offset 0x28 on the factory partition contains the valid WAN mac for all devices while 0x4 seems to be uniform. Read the WAN mac from this location and calculate it. Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: update Tenbay T-MB5EU wireless MAC addressDavid Bauer2022-01-221-2/+1
| | | | | | | | | | | | | | The current MAC address assignment is still incorrect. Use the same MAC address as seen on the stock firmware for both wireless interfaces. The 5GHz MAC address OUI is +2 in the first EUI octet. We currently don't do this in OpenWrt. Ignore this offset for now. With the current assignment, recurring MAC addresses between radios is already taken care of. Signed-off-by: David Bauer <mail@david-bauer.net>
* kernel: bump 5.10 to 5.10.92Rui Salvaterra2022-01-162-2/+2
| | | | | | Patches automatically rebased. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* ramips: fix reboot for remaining 32 MB boardsMichael Pratt2022-01-1522-7/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following devices have a Winbond W25Q256FV flash chip, which does not have the RESET pin enabled by default, and otherwise would require setting a bit in a status register. Before moving to Linux 5.4, we had the patch: 0053-mtd-spi-nor-add-w25q256-3b-mode-switch.patch which kept specific flash chips with explicit 3-byte and 4-byte address modes to stay in 3-byte address mode while idle (after an erase or write) by using a custom flag SPI_NOR_4B_READ_OP that was part of the patch. this was obsoleted by the patch: 481-mtd-spi-nor-rework-broken-flash-reset-support.patch which uses the newer upstream flag SNOR_F_BROKEN_RESET for devices with a flash chip that cannot be hardware reset with RESET pin and therefore must be left in 3-byte address mode when idle. The new patch requires that the DTS of affected devices have the property "broken-flash-reset", which was not yet added for most of them. This commit adds the property for remaining affected devices in ramips target, specifically because of the flash chip model. However, it is possible that there are other devices where the flash chip uses an explicit 4-byte address mode and the RESET pin is not connected to the SOC on the board, and those DTS would also need this property. Ref: 22d982ea0033 ("ramips: add support for switching between 3-byte and 4-byte addressing") Ref: dfa521f12953 ("generic: spi-nor: rework broken-flash-reset") Signed-off-by: Michael Pratt <mcpratt@pm.me>
* ramips: add support for ipTIME A6004NS-MSeongUk Moon2022-01-154-176/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ipTIME A6004NS-M is a 2.4/5GHz band AC1900 router, based on MediaTek MT7621A. Specifications: - SoC: MediaTek MT7621A (880MHz, Duel-Core) - RAM: DDR3 256MB - Flash: SPI NOR 16MB (Winbond W25Q128BV) - WiFi: MediaTek MT7615E (2.4GHz, 5GHz) - Ethernet: MediaTek MT7530 (WAN x1, LAN x4, SoC built-in Estimated) - USB: USB 3.0 x1 - UART: [3.3V, TX, RX, GND] (57600 8N1) Installation via web interface: 1. Flash initramfs image using OEM's Firmware Update page. 2. Connect to OpenWrt with an SSH connection to `192.168.1.1`. 3. Perform sysupgrade with sysupgrade image. Revert to stock firmware: 1. Flash stock firmware via OEM's Recovery mode How to use OEM's Recovery mode: 1. Power on the device and connect the shell through UART. 2. Connect to the shell and press the `t` key on the keyboard. 3. Set fixed IP with `192.168.0.2` with subnet mask `255.255.255.0` 4. Flash image via TFTP to `192.168.0.1` Additional Notes: 1. The higher the 5Ghz Frequency, the lower the stability. It is recommended to use less than 5.775Ghz. 2. If the 5Ghz frequency is too high, 5Ghz may not work. 3. A6ns-M use shared dtsi file of A6004NS-M. (reference: /mt7621_iptime_a6004ns-m.dtsi). Signed-off-by: SeongUk Moon <antegral@antegral.net> [convert CRLF to LF] Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: add support for HUMAX E2Kyoungkyu Park2022-01-154-1/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | HUMAX E2 (also known as HUMAX QUANTUM E2) is a 2.4/5GHz band AC router, based on MediaTek MT7620A. Specifications: - SoC: MT7620A - RAM: DDR2 64MB - Flash: SPI NOR 8MB (MXIC MX25L6405D) - WiFi: - 2.4GHz: SoC internal - 5GHz: MT7610E - Ethernet: 1x 10/100Mbps - Switch: SoC internal - UART: J2 (57600 8N1) - pinout: [3V3] (RXD) (GND) (TXD) Installation and Recovery via TFTP: 1. Connect ethernet cable between Router port and PC Ethernet port. 2. Set your computer to a static IP **192.168.1.1** 3. Turn the device off and wait a few seconds. Hold the WPS button on front of device and insert power. 4. Send a firmware image to **192.168.1.6** using TFTP. You can use any TFTP client. (tftp, curl, Tftpd64...) 5. Wait until Power LED stop flashing. **DO NOT TURN OFF DEVICE!** The device will be automatically rebooted. Signed-off-by: Kyoungkyu Park <choryu.park@choryu.space>
* ramips: enable badblock table support on linksys ea7xxx devicesFelix Fietkau2022-01-132-0/+6
| | | | | | Use remapping only on the kernel partitions. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: mt7621_nand: fix writing upper half of fdm dataFelix Fietkau2022-01-131-1/+1
| | | | | | | Since the loop iterates from 0-3, subtracting 4 from the shift multiplier does not make any sense Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mikrotik: make soft_config writableOskari Lemmela2022-01-131-1/+0
| | | | | | Parent mtd partition needs to be writable Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
* mikrotik: enable variable size eraseOskari Lemmela2022-01-131-0/+1
| | | | | | | Add support for variable size erase blocks. Enable it to all targets which has mikrotik targets. Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
* ramips: add support for Linksys EA6350 v4Nick McKinney2022-01-087-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: - SoC: MT7621DAT (880MHz, 2 Cores) - RAM: 128 MB - Flash: 128 MB NAND - Ethernet: 5x 1GiE MT7530 - WiFi: MT7603/MT7613 - USB: 1x USB 3.0 This is another MT7621 device, very similar to other Linksys EA7300 series devices. Installation: Upload the generated factory.bin image via the stock web firmware updater. Reverting to factory firmware: Like other EA7300 devices, this device has an A/B router configuration to prevent bricking. Hard-resetting this device three (3) times will put the device in failsafe (default) mode. At this point, flash the OEM image to itself and reboot. This puts the router back into the 'B' image and allows for a firmware upgrade. Troubleshooting: If the firmware will not boot, first restore the factory as described above. This will then allow the factory.bin update to be applied properly. Signed-off-by: Nick McKinney <nick@ndmckinney.net>
* ramips: add support for RAISECOM MSG1500 X.00Liangkuan Yang2022-01-085-0/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RAISECOM MSG1500 X.00 is a 2.4/5 GHz band 11ac (Wi-Fi 5) router. Apart from the general model, there are two ISP customized models: China Mobile and China Telecom. Specifications: - SoC: Mediatek MT7621AT - RAM: 256MiB DDR3 - Flash: 128MiB NAND - Ethernet: 5 * 10/100/1000Mbps: 4 * LAN + 1 * WAN - Switch: MediaTek MT7530 (SoC) - WLAN: 1 * MT7615DN Dual-Band 2.4GHz 2T2R (400Mbps) 5GHz 2T2R (867Mbps) - USB: 1 * USB 2.0 port - Button: 1 * RESET button, 1 * WPS button, 1 * WIFI button - LED: blue color: POWER, WAN, WPS, 2.4G, 5G, LAN1, LAN2, LAN3, LAN4, USB - UART: 1 * serial port header (4-pin) - Power: DC 12V, 1A - Switch: 1 * POWER switch MAC addresses as verified by vendor firmware: use address source LAN C8:XX:XX:3A:XX:E7 Config "protest_lan_mac" ascii (label) WAN C8:XX:XX:3A:XX:EA Config "protest_wan_mac" ascii 5G C8:XX:XX:3A:XX:E8 Factory "0x4" hex 2.4G CA:XX:XX:4A:XX:E8 [not on flash] The increment of the 4th byte for the 2.4g address appears to vary. Reported cases: 5g 2.4g increment C8:XX:XX:90:XX:C3 CA:XX:XX:C0:XX:C3 0x30 C8:XX:XX:3A:XX:08 CA:XX:XX:4A:XX:08 0x10 C8:XX:XX:3A:XX:E8 CA:XX:XX:4A:XX:E8 0x10 Since increment is inconsistent and there is no obvious pattern in swapping bytes, and the 2.4g address has local bit set anyway, it seems safer to use the LAN address with flipped byte here in order to prevent collisions between OpenWrt devices and OEM devices for this interface. This way we at least use an address as base that is definitely owned by the device at hand. Notes: 1. The vendor firmware allows you to connect to the router by telnet. (known version 1.0.0 can open telnet.) There is no official binary firmware available. Backup the important partitions data: "Bootloader", "Config", "Factory", and "firmware". Note that with the vendor firmware the memory is detected only 128MiB and the last 512KiB in NAND flash is not used. 2. The POWER LED is default on after press POWER switch. The WAN and LAN1 - 4 LEDs are wired to ethernet switch. The WPS LED is controlled by MT7615DN's GPIO. Currently there is no proper way to configure it. 3. At the time of adding support the wireless config needs to be set up by editing the wireless config file: * Setting the country code is mandatory, otherwise the router loses connectivity at the next reboot. This is mandatory and can be done from luci. After setting the country code the router boots correctly. A reset with the reset button will fix the issue and the user has to reconfigure. * This is minor since the 5g interface does not come up online although it is not set as disabled. 2 options here: 1- Either run the "wifi" command. Can be added from LuCI in system - startup - local startup and just add wifi above "exit 0". 2- Or add the serialize option in the wireless config file as shown below. This one would work and bring both interfaces automatically at every boot: config wifi-device 'radio0' option serialize '1' config wifi-device 'radio1' option serialize '1' Flash instructions using initramfs image: 1. Press POWER switch to power down if the router is running. 2. Connect PC to one of LAN ports, and set static IP address to "10.10.10.2", netmask to "255.255.255.0", and gateway to "10.10.10.1" manually on the PC. 3. Push and hold the WIFI button, and then power up the router. After about 10s (or you can call the recovery page, see "4" below) you can release the WIFI button. There is no clear indication when the router is entering or has entered into "RAISECOM Router Recovery Mode". 4. Call the recovery page for the router at "http://10.10.10.1". Keep an eye on the "WARNING!! tip" of the recovery page. Click "Choose File" to select initramfs image, then click "Upload". 5. If image is uploaded successfully, you will see the page display "Device is upgrading the firmware... %". Keep an eye on the "WARNING!! tip" of the recovery page. When the page display "Upgrade Successfully", you can set IP address as "automatically obtain". 6. After the rebooting (PC should automatically obtain an IP address), open the SSH connection, then download the sysupgrade image to the router and perform sysupgrade with it. Flash back to vendor firmware: See "Flash instructions 1 - 5" above. The only difference is that in step 4 you should select the vendor firmware which you backup. Signed-off-by: Liangkuan Yang <ylk951207@gmail.com>
* ramips: add support for Joowin WR758AC V1 and V2Rodrigo Araujo2022-01-085-0/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for Joowin (aka Comfast) WR758AC V1 and V2 devices. Both have the same wall AP/repeater form factor and differ only in the 5Ghz chipset (V1 has MT7662, V2 has MT7663). OpenWrt developers forum page: https://forum.openwrt.org/t/87355 Specifications: - CPU: MediaTek MT7628AN (580MHz) - Flash: 8MB - RAM: 64MB DDR2 - 2.4 GHz: 802.11b/g/n (MT7603) - 5 GHz: 802.11ac (V1 has MT7662, V2 has MT7663) - Antennas: 4x external single band antennas - LAN: 1x 10/100M - LED: Wifi 3x blue. Programmable - Button: WPS MAC addresses as verified by OEM firmware: use address source LAN *:83 factory 0xe000 2g *:85 factory 0x4 5g *:86 factory 0x8004 How to install: 1- Setup a TFTP server on a machine with IP address 192.168.1.10/24 2- Name the image as `firmware_auto.bin` and place it on the root of the TFTP server 3- Connect the device via Ethernet, it should pick and flash the image Signed-off-by: Rodrigo Araujo <araujo.rm@gmail.com>
* ramips: add ASUS RT-AC1200GU as alt nameShiji Yang2022-01-021-0/+2
| | | | | | | | | | | | RT-AC57U and RT-AC1200GU are the same models sold in different countries. The purpose of this commit is to allow users to easily find the corresponding firmware through the model number on the device label. More specifications: 14e0e4f138e3 ("ramips: add support for ASUS RT-AC57U") Signed-off-by: Shiji Yang <yangshiji66@qq.com> [reword commit title/message] Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: add support for ipTIME T5004Sungbo Eo2022-01-024-0/+141
| | | | | | | | | | | | | | | | | | | | | | | | ipTIME T5004 is a 5-port Gigabit Ethernet router, based on MediaTek MT7621A. Specifications: * SoC: MT7621AT * RAM: 128 MiB * Flash: NAND 128 MiB * Ethernet: 5x 1GbE * Switch: SoC built-in * UART: J4 (57600 baud) * Pinout: [3V3] (TXD) (RXD) (GND) Installation via web interface: 1. Flash **initramfs** image through the stock web interface. 2. Boot into OpenWrt and perform sysupgrade with sysupgrade image. Revert to stock firmware via recovery mode: 1. Press reset button, power up the device, wait >15s for CPU LED to stop blinking. 2. Upload stock image to TFTP server at 192.168.0.1. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: add support for ipTIME A3004TWonJung Kim2021-12-293-0/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ipTIME A3004T is a 2.4/5GHz band router, based on Mediatek MT7621. Specifications: - SoC: MT7621 (880MHz) - RAM: DDR3 256M - Flash: NAND 128MB (Macronix NAND 128MiB 3,3V 8-bit) - WiFi: - 2.4GHz: MT7615E - 5GHz : MT7615E - Ethernet: - 4x LAN - 1x WAN - USB: 1 * USB3.0 port - UART: - 3.3V, TX, RX, GND / 57600 8N1 Installation via web interface: 1. Flash initramfs image using OEM's Recovery mode 2. Boot into OpenWrt and perform sysupgrade with sysupgrade image. Revert to stock firmware: - Flash stock firmware via OEM's Recovery mode How to use OEM's Recovery mode: 1. Power up with holding down the reset key until CPU LED stop blinking. 2. Set fixed ip with `192.168.0.2` with subnet mask `255.255.255.0` 3. Flash image via tftp to `192.168.0.1` Additional Notes: This router shares one MT7915E chip for both 2.4Ghz/5Ghz. radio0 will not working on 5Ghz as it's not connected to the antenna. Signed-off-by: WonJung Kim <git@won-jung.kim> (added led dt-bindings) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ramips: add support for WeVO AIR DUOSungbo Eo2021-12-293-1/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WeVO AIR DUO is a 1-bay NAS & 802.11ac (Wi-Fi 5) router, based on MediaTek MT7620A. Specifications: * SoC: MT7620A * RAM: 64 MiB * Flash: SPI NOR 16 MiB * USB & SATA bridge controller: JMicron JMS567 * SATA 6Gb/s: 2.5" drive slot * USB 3.0: Micro-B * USB 2.0: connected to SoC * Wi-Fi: * 2.4 GHz: SoC built-in * 5 GHz: MT7612EN * Ethernet: 5x 1GbE * Switch: MT7530WU * UART: 4-pin 1.27 mm pitch through-hole (57600 baud) * Pinout: (3V3)|(RXD) (TXD) (GND) Notes: * The drive is accessible through the external USB port only when the router is turned off. Installation via web interface: 1. Flash **initramfs** image through the stock web interface. The image filename should have ".upload" extension. 2. Boot into OpenWrt and perform sysupgrade with sysupgrade image. Revert to stock firmware: 1. Perform sysupgrade with stock image. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: aw9523: add can_sleep flag for GPIO chipDavid Bauer2021-12-291-1/+1
| | | | | | | | The GPIO expander is connected via I2C, thus the can_sleep flag has to be set to true. This should fix spurious "scheduling while atomic" bugs in the kernel ringbuffer. Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: work around duplicate MAC address on U6 LiteDavid Bauer2021-12-201-0/+15
| | | | | | | | | | | | | | | | | | | | | | The UniFi 6 Lite has two MAC addresses for the 2.4 and 5GHz radio in it's EEPROM partition. On my unit these are F4 92 BF A0 BB 6F F6 92 BF A0 BB 6F The problem with these is that mac80211 increases the first octet by 2, which leads to conflicting MAC addresses between radios. Work around this problem for now by increasing the last octet by 1 on the 5 GHz radio. Ubiquiti increases the last octet by 2 for each subsequent VAP created per radio. Ideally we should do the same, however this functionality is currently lacking from mac80211. Signed-off-by: David Bauer <mail@david-bauer.net>
* kernel: 5.10: consolidate mac80211 crypto optionsSergey Ryazanov2021-12-171-6/+0
| | | | | | | | | | | | | | | | | | | | | | Each of - CRYPTO_AEAD2 - CRYPTO_AEAD - CRYPTO_GF128MUL - CRYPTO_GHASH - CRYPTO_HASH2 - CRYPTO_HASH - CRYPTO_MANAGER2 - CRYPTO_MANAGER - CRYPTO_NULL2 either directly required for mac80211 crypto support, or directly selected by such options. Support for the mac80211 crypto was enabled in the generic config since c7182123b9 ("kernel: make cryptoapi support needed by mac80211 built-in"). So move the above options from the target configs to the generic config to make it clear why do we need them. CC: Felix Fietkau <nbd@nbd.name> Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
* kernel: filter out both Clang and LLD versionsSergey Ryazanov2021-12-176-6/+0
| | | | | | | | Both CLANG_VERSION and LLD_VERISON are autogenerated runtime configuration options, so add them to the kernel configuration filter and remove from generic and per-target configs to keep configs clean. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
* ramips: mt7620: tidy up 02_networkSungbo Eo2021-12-161-14/+8
| | | | | | | * fix alphabetic sorting * consolidate duplicate cases Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: remove Linux 5.4 supportRui Salvaterra2021-12-1575-10093/+0
| | | | | | We're at 5.10 stable, this can finally go. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* ramips: fix Tenbay T-MB5EU v1 Wireless MACDavid Bauer2021-12-151-0/+5
| | | | | | | | | | | | | It was reported, that Tenbay T-MB5EU v1 do have incorrect Wireless MAC address set on 2.4 and 5 GHz. Some boards do not seem to have the correct MAC address set for the external PHY of the MT7915 radio at caldata offset 0xa. As the external PHY does not expose a DT binding (yet), fix up the mac address in userspace. Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: switch to kernel 5.10Rui Salvaterra2021-12-131-2/+1
| | | | | | | | Tested on mt7621 (Redmi AC2100) and running stable for several months. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> Tested-by: Stijn Segers <foss@volatilesystems.org> Tested-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
* ramips: mt7620: use OKLI loader with Jboot devicesPawel Dembicki2021-12-1310-13/+53
| | | | | | | | | | | Jboot devices have problem with >2MB kernelsize. The only way to avoid this problem is use small loader. This patch switch all mt7620 Jboot devices to lzma OKLI loader. Suggested-by: Szabolcs Hubai <szab.hu@gmail.com> Co-authored-by: Michael Pratt <mcpratt@pm.me> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
* kernel: bump 5.10 to 5.10.83John Audia2021-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Removed upstreamed: bcm53xx/patches-5.10/033-v5.16-0024-ARM-dts-BCM5301X-Fix-I2C-controller-interrupt.patch[1] bcm53xx/patches-5.10/033-v5.16-0025-ARM-dts-BCM5301X-Add-interrupt-properties-to-GPIO-no.patch[2] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.83&id=b2cd6fdcbe0a5cb44e4610a08cc58261d494a885 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.83&id=9db1d4a3c2700e1cc84c3d61199411d75c2a3ec6 Build system: x86_64* Build-tested: bcm2711/RPi4B, ipq806x/R7800† Run-tested: bcm2711/RPi4B, ipq806x/R7800† * Had to revert 7c99085bd69742f66207d61e9f2da5ec4f8f9d2f in order to build (latest bump of ca-certificates) † Had to revert 7f1edbd41295dff9f2127b169fbc086c0fb2c14e in order to build (binutils 2.37, https://bugs.openwrt.org/index.php?do=details&task_id=4149) Signed-off-by: John Audia <graysky@archlinux.us>
* ramips: add support for HUMAX E10Kyoungkyu Park2021-12-123-0/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HUMAX E10 (also known as HUMAX QUANTUM E10) is a 2.4/5GHz band AC router, based on MediaTek MT7621A. Specifications: - SoC: MT7621A - RAM: DDR3 128MB - Flash: SPI NOR 16MB (MXIC MX25L12805D) - WiFi: - 2.4GHz: MT7615 - 5GHz: MT7615 - Ethernet: 2x 10/100/1000Mbps - Switch: SoC internal - USB: 1x USB 2.0 Type-A - UART: J1 (57600 8N1) - pinout: [3V3] (RXD) (GND) (TXD) Installation via web interface: - Flash **factory** image through the stock web interface. Recovery procedure: 1. Connect ethernet cable between Router **LAN** port and PC Ethernet port. 2. Set your computer to a static IP **192.168.1.1** 3. Turn the device off and wait a few seconds. Hold the WPS button on front of device and insert power. 4. Send a firmware image to **192.168.1.6** using TFTP. You can use any TFTP client. (tftp, curl, Tftpd64...) - It can accept both images which is HUMAX stock firmware dump (0x70000-0x1000000) image and OpenWRT **sysupgrade** image. Signed-off-by: Kyoungkyu Park <choryu.park@choryu.space> [remove trailing whitespace] Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: mt76x8: tidy up 02_networkSungbo Eo2021-12-121-8/+5
| | | | | | | * fix alphabetic sorting * consolidate duplicate cases Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: add support for Zbtlink ZBT-WG1602Sergey Ryazanov2021-12-053-0/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Zbtlink ZBT-WG1602 is a Wi-Fi router intendent to use with WWAN (UMTS/LTE/3G/4G) modems. The router board offsers a couple of miniPCIe slots with USB and SIM only and another one pure miniPCIe slot as well as five Gigabit Ethernet ports (4xLAN + WAN). Specification: * SoC: MT7621A * RAM: 256/512 MiB * Flash: 16/32 MiB (SPI NOR) * external watchdog (looks like Torexsemi XC6131B) * Eth: 10/100/1000 Mbps Ethernet x5 ports (4xLAN + WAN) * WLAN 2GHz: MT7603EN (.11n, MIMO 2x2) * WLAN 5GHz: MT7612EN (.11ac, MIMO 2x2) * WLAN Ants: detachable x2, shared by 2GHz & 5GHz radios * miniPCIe: 2x slots with USB&SIM + 1x slot with regular PCIe bus * WWAN Ants: detachable x4 * External storage: microSD (SDXC) slot * USB: 2.0 Type-A port * LED: 11 (5 per Eth phy, 3 SoC controlled, 2 WLAN 2/5 controlled, 1 power indicator) * Button: 1 (reset) * UART: console (115200 baud) * Power: DC jack (12 V / 2.5 A) Additional HW information: * SoC USB port #1 is shared by internal miniPCIe slot and external Type-A USB port, USB D+/D- lines are toggled between ports using a GPIO controlled DPDT switch. * Power of the USB enabled miniPCIe slots can be individually controlled using dedicated GPIO lines. * Vendor firmware feeds the external watchdog with 1s pulses. GPIO watchdog driver is able to either generate a 1us pulses or toggle the output line. 1us is not enough for the external watchod timer, so the line toggling driver mode is utilized. Installation: Vendor's firmware is OpenWrt (LEDE) based, so the sysupgrade image can be directly used to install OpenWrt. Firmware must be upgraded using the 'force' and 'do not save configuration' command line options (or correspondig web interface checkboxes) since the vendor firmware is from the pre-DSA era. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
* ramips: add support for ipTIME A3004NS-dualYuchan Seo2021-12-042-0/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ipTIME A3004NS-dual is a 2.4/5GHz band router, based on Mediatek MT7621. Specifications: - SoC: MT7621 (880MHz) - RAM: DDR3 256M - Flash: SPI NOR 16MB - WiFi: - 2.4GHz: MT7602E - 5GHz : MT7612E - Ethernet: - 4x LAN - 1x WAN - USB: 1 * USB3.0 port - UART: - 3.3V, TX, RX, GND / 57600 8N1 Installation via web interface: - 1. Flash Initramfs image using OEM Firmware's web GUI - 2. Boot into OpenWrt and perform Sysupgrade with sysupgrade image. Revert to stock firmware: - 1. Boot into OpenWrt and perform Sysupgrade with OEM Stock Firmware image. Signed-off-by: Yuchan Seo <hexagonwin@disroot.org> Reviewed-by: Sungbo Eo <mans0n@gorani.run>
* ramips: fix tl-mr3020-v3 switch topology to configure vlans via luciSergey V. Lobanov2021-12-041-1/+4
| | | | | | | | | | Currently it is not possible to configure VLANs via LUCI on tplink tl-mr3020-v3. This patch fixes switch topology for the LUCI interface. Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in> [copied commit message from github PR] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ramips: mt7620: Enable PHY aneg of Lava LR-25G001Pawel Dembicki2021-12-042-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | In 20b09a2125f5 Lava LR-25G001 router have problem with two inactive ethernet ports. JBOOT bootloader didn't configure ethernet devices by default. The same situation was there. It is required to enable all phy ports. This is fragment of stock bootlog: switch reg write_athr offset=90, value=2b0 switch reg write_athr offset=8c, value=2b0 switch reg write_athr offset=88, value=2b0 switch reg write_athr offset=84, value=2b0 switch reg write_athr offset=80, value=2b0 This patch adds proper registers configuration ar8337 initvals. 0x2b0 value causes force flow control configuration, 0x1200 was used instead (flow control config auto-neg with phy). [1] When switch is now ok, let's fix port numeration too. Fixes: 20b09a2125f5 ("ramips: add support for Lava LR-25G001") [1] https://github.com/openwrt/openwrt/pull/4806#issuecomment-982019858 Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
* kernel: bump 5.4 to 5.4.162John Audia2021-11-281-1/+1
| | | | | | | | | | | | All patches automatically rebased. Build system: x86_64 Build-tested: ramips/mt7621* *I am hit with the binutils 2.37 bug so I had to revert 7f1edbd41295dff9f2127b169fbc086c0fb2c14e in order to downgrade to 2.35.1 Signed-off-by: John Audia <graysky@archlinux.us>
* kernel: bump 5.4 to 5.4.161John Audia2021-11-283-6/+6
| | | | | | | | | | | | | | | Removed upstreamed: ath79/patches-5.4/921-serial-core-add-support-for-boot-console-with-arbitr.patch[1] Manually rebased: layerscape/patches-5.4/804-crypto-0016-MLKU-114-1-crypto-caam-reduce-page-0-regs-access-to-.patch octeontx/patches-5.4/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch All other patches automatically rebased. 1. Private email exchange with patch author, Hauke Mehrtens Signed-off-by: John Audia <graysky@archlinux.us>
* ramips: fix ralink_i2s_debugfs_remove declarationEneas U de Queiroz2021-11-202-2/+2
| | | | | | | Correct ralink_i2s_debugfs_remove declaration in ralink patches when CONFIG_DEBUG_FS is not selected. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
* ramips: use lzma-loader on D-Link DIR-615 H1Mirko Parthey2021-11-201-0/+1
| | | | | | | Fixes the boot loader LZMA decompression issue: LZMA ERROR 1 - must RESET board to recover Signed-off-by: Mirko Parthey <mirko.parthey@web.de>
* ramips: add support for Wavlink WL-WN576A2Thomas Aldrian2021-11-204-2/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the Wavlink WL-WN576A2 wall-plug wireles repeater / router. It is also sold under the name SilverCrest SWV 733 B1. Device specs: - CPU: MediaTek MT7628AN - Flash: 8MB - RAM: 64MB - Bootloader: U-Boot - Ethernet: 1x 10/100 Mbps - 2.4 GHz: b/g/n SoC - 5 GHz: a/n/ac MT7610EN - Buttons: WPS, reset, sliding switch (ap/repeater) - LEDs: 5x wifi status, 1x LAN/WAN, 1x WPS Flashing: U-Boot launches a TFTP client if WPS button is held during boot. - Server IP: 192.168.10.100 - Firmware file name: firmware.bin Device will reboot automatically. First boot takes about 90s. Coelner (waenger@gmail.com) is the original author, but I have made some fixes. He does not wish to sign off using his real name. Signed-off-by: Thomas Aldrian <dev.aldrian@gmail.com>
* kernel: bump 5.10 to 5.10.80Rui Salvaterra2021-11-194-6/+6
| | | | | | | | | | | | | | | | | | | | | | Deleted (upstreamed): ath79/patches-5.10/921-serial-core-add-support-for-boot-console-with-arbitr.patch [1] bcm53xx/patches-5.10/033-v5.15-0012-ARM-dts-BCM5301X-Fix-memory-nodes-names.patch [2] lantiq/patches-5.10/0016-mtd-rawnand-xway-Keep-the-driver-compatible-with-on-.patch [3] lantiq/patches-5.10/0110-MIPS-lantiq-dma-add-small-delay-after-reset.patch [4] lantiq/patches-5.10/0111-MIPS-lantiq-dma-reset-correct-number-of-channel.patch [5] lantiq/patches-5.10/0112-MIPS-lantiq-dma-fix-burst-length-for-DEU.patch [6] Manually rebased: ipq806x/patches-5.10/0065-arm-override-compiler-flags.patch [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=47462c5e600fbaffd755cd13dedd80d04e41ff83 [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=2fde76df1885a6bec04317e457121326070450eb [3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=9b366f5221d8aa64b22f35be137a5749326444ce [4] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=5af57ce8a6155fe3e4270d28d171abf8903bebc0 [5] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=b92a5df2c7adc79a57481445f67de0c1c716581f [6] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=6b72caabc47011d03f44064452b2c65e8ed18326 Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* kernel: bump 5.4 to 5.4.158John Audia2021-11-072-3/+3
| | | | | | All patches automatically rebased. Signed-off-by: John Audia <graysky@archlinux.us>
* ramips: add broken-flash-reset for HLK-7621A EvBWout Bertrums2021-11-061-0/+1
| | | | | | | | | | This is needed because the HLK-7621 EvB has 32MB of flash, so it will have to use 4B addressing and the broken-flash-reset hack has to be used to be able to reboot. Signed-off-by: Wout Bertrums <wout@wbnet.eu> [copied github message into commit message] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ramips: mt7621-dts: properly organize pcie nodeSergio Paracuellos2021-11-061-10/+8
| | | | | | | | | | | Device tree pcie node for this SoC is using different styles in its different properties. Hence properly unify them to be able to write a a proper yaml schema documentation. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210505121736.6459-11-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ramips: mt7621-dts: add missing device_type in pcie root portsSergio Paracuellos2021-11-061-0/+3
| | | | | | | | | According to the YAML schema 'pci-bus.yaml' the 'device_type' property is mandatory for all pcie root ports. Hence add it. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210506170742.28196-3-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>