aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* ramips: mt7621-dts: remove 'bug-range' propertySergio Paracuellos2021-11-061-4/+0
| | | | | | | | | Property 'bus-range' when values are the default are not necessary to be defined. Hence, remove all of them. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210506170742.28196-2-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ramips: mt7621-dts: use standard 'syscon' stringSergio Paracuellos2021-11-061-4/+4
| | | | | | | | | | Both 'memc' and 'sysc' nodes are not using 'syscon' as a node string which is the standard one to be used. Update both of them. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210505132154.8263-3-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ramips: mt7621-dts: remove ethsys nodeSergio Paracuellos2021-11-061-8/+1
| | | | | | | | | | | | | | | | DT 'ethsys' node is being configured as a syscon to get access to reset and other registers in the 'mediateķ,mt7621-eth' driver. Since the 'sysc' is also a syscon, provides the clock and also is virtually mapped from the same physical address 0x1e000000 we can just use 'sysc' as the phandle for the syscon in the ethernet node. Compatible string 'mediatek,mt7621-ethsys' of the node is not being used anywhere inside the kernel so, this node can be safely removed. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210505132154.8263-2-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ramips: mt7621-dts: remove obsolete switch nodeDENG Qingfang2021-11-061-7/+0
| | | | | | | | | | This was for OpenWrt's swconfig driver, which never made it upstream, and was also superseded by MT7530 DSA driver. Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: DENG Qingfang <dqfext@gmail.com> Link: https://lore.kernel.org/r/20210108025155.31556-1-dqfext@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ramips: mt7621-dts: properly define 'cpc' and 'mc' nodesSergio Paracuellos2021-11-061-10/+10
| | | | | | | | | | | | | | | | 'cpc' and 'mc' nodes correspond with the MIPS 'Cluster Power Controller' and 'MIPS Common Device Memory Map' which are present in some MIPS related boards. There is already bindings documentation for these two located in: - Documentation/devicetree/bindings/power/mti,mips-cpc.yaml - Documentation/devicetree/bindings/bus/mti,mips-cdmm.yaml Hence, properly update compatible strings and align nodes with already mainlined bindings documentation. Also, move their definition to a proper place since both of them are not related with the palmbus at all. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20211002060706.30511-1-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ramips: mt7621-dts: change some node hex addresses to lower caseSergio Paracuellos2021-11-061-6/+6
| | | | | | | | | Hexadecimal addresses in device tree must be defined using lower case. There are some of them that are still in upper case. Change them all. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20211017070656.12654-2-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ramips: mt7621-dts: make use of 'IRQ_TYPE_LEVEL_HIGH' instead of magic numbersSergio Paracuellos2021-11-061-2/+2
| | | | | | | | | | Nodes 'gdma' and 'hsdma' are using magic number '4' in interrupts property. Use 'IRQ_TYPE_LEVEL_HIGH' instead to align with the rest of the nodes in the file. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20211019102915.15409-2-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* kernel: bump 5.10 to 5.10.77Rui Salvaterra2021-11-062-6/+6
| | | | | | | | | Deleted (upstreamed): bcm53xx/patches-5.10/081-v5.15-Revert-pinctrl-bcm-ns-support-updated-DT-binding-as-.patch [1] [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.10.y&id=01c2881bb0e0a71b87ca425e1b763ac13855aa7e Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* kernel: 5.10: packet mangling code only for ar8216 driverMathias Kresin2021-11-022-0/+2
| | | | | | | | Only the ar8216 switch driver uses the packet mangling code. Update the kernel configs accordingly. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: add support for HiLink HLK-7621A evaluation boardSergio Paracuellos2021-10-312-0/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: - SoC: MediaTek MT7621AT - RAM: 256 MB (DDR3) - Flash: 32 MB SPI NOR 44MHz - Switch: 1 WAN, 4 LAN (Gigabit) - LEDs: 1 WAN, 4 LAN (controlled by PHY) - USB Ports: 1 x USB2, 1 x USB3 - WLAN: 1 x 2.4, 5 GHz 866Mbps (MT7612E) - Button: 1 button (reset) - UART Serial: UART1 as console : 57600 baud - Power: 12VDC, 1A Installation: Update openWRT firmware using internal GNUBEE uboot: https://github.com/gnubee-git/GnuBee-MT7621-uboot By HTTP: Initial uboot address is http://10.10.10.123, your address needs to be 10.10.10.x, and mask 255.255.255.0. By TFTP: Uboot is in client mode, the address of the firmware must be tftp://10.10.10.3/uboot.bin Recovery: Manufacturer provides MTK OpenWrt 14.07 source code, compile then flash it by uboot. HLK-7621A is a stamp hole package module for embedded development, users have to design IO boards to use it. MAC addresses: - u-boot-env contains a placeholder address: > mtd_get_mac_ascii u-boot-env ethaddr 03:17:73:ab:cd:ef - phy0 gets a valid-looking address: > cat /sys/class/ieee80211/phy0/macaddress f8:62:aa:**:**:a8 - Calibration data for &pcie2 contains a valid address, however the zeros in the right half look like it's not real: 8c:88:2b:00:00:1b - Since it's an evaluation board and there is no solid information about the MAC address assignment, the ethernet MAC address is left random. Signed-off-by: Chen Yijun <cyjason@bupt.edu.cn> [add keys and pcie nodes to properly support evaluation board] Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> [remove ethernet address, wrap lines properly] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for Xiaomi MiWifi 3CEduardo Santos2021-10-313-0/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for Xiaomi MiWiFi 3C device. Xiaomi MiWifi 3C has almost the same system architecture as the Xiaomi Mi WiFi Nano, which is already officially supported by OpenWrt. The differences are: - Numbers of antennas (4 instead of 2). The antenna management is done via the µC. There is no configuration needed in the software code. - LAN port assignments are different. LAN1 and WAN are interchanged. OpenWrt Wiki: https://openwrt.org/toh/xiaomi/mir3c OpenWrt developers forum page: https://forum.openwrt.org/t/support-for-xiaomi-mi-3c Specifications: - CPU: MediaTek MT7628AN (575MHz) - Flash: 16MB - RAM: 64MB DDR2 - 2.4 GHz: IEEE 802.11b/g/n with Integrated LNA and PA - Antennas: 4x external single band antennas - WAN: 1x 10/100M - LAN: 2x 10/100M - LED: 1x amber/blue/red. Programmable - Button: Reset MAC addresses as verified by OEM firmware: use address source LAN *:92 factory 0x28 WAN *:92 factory 0x28 2g *:93 factory 0x4 OEM firmware uses VLAN's to create the network interface for WAN and LAN. Bootloader info: The stock bootloader uses a "Dual ROM Partition System". OS1 is a deep copy of OS2. The bootloader start OS2 by default. To force start OS1 it is needed to set "flag_try_sys2_failed=1". How to install: 1- Use OpenWRTInvasion to gain telnet, ssh and ftp access. https://github.com/acecilia/OpenWRTInvasion (IP: 192.168.31.1 - Username: root - Password: root) 2- Connect to router using telnet or ssh. 3- Backup all partitions. Use command "dd if=/dev/mtd0 of=/tmp/mtd0". Copy /tmp/mtd0 to computer using ftp. 4- Copy openwrt-ramips-mt76x8-xiaomi_miwifi-3c-squashfs-sysupgrade.bin to /tmp in router using ftp. 5- Enable UART access and change start image for OS1. ``` nvram set uart_en=1 nvram set flag_last_success=1 nvram set boot_wait=on nvram set flag_try_sys2_failed=1 nvram commit ``` 6- Installing Openwrt on OS1 and free OS2. ``` mtd erase OS1 mtd erase OS2 mtd -r write /tmp/openwrt-ramips-mt76x8-xiaomi_miwifi-3c-squashfs-sysupgrade.bin OS1 ``` Limitations: For the first install the image size needs to be less than 7733248 bits. Thanks for all community and especially for this device: minax007, earth08, S.Farid Signed-off-by: Eduardo Santos <edu.2000.kill@gmail.com> [wrap lines, remove whitespace errors, add mediatek,mtd-eeprom to &wmac, convert to nvmem] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix LAVA LR-25G001 broken wifi led triggersJani Partanen2021-10-302-4/+2
| | | | | | | | | | | | | | | LED labels for this device are different in 01_leds file and in device DTS. Switch to DT triggers, which works on Telewell TW-4 (LTE) clone device. This has not been tested on the LR-25G001 itself, just on the clone mentioned above. Fixes: 20b09a2125f5 ("ramips: add support for Lava LR-25G001") Signed-off-by: Jani Partanen <rtfm@iki.fi> [rephrase commit title/message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for TP-Link RE305 v3Michal Kozuch2021-10-305-81/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specs (same as in v1): - MT7628AN (575 MHz) - 64MB RAM - 8MB of flash (SPI NOR) - 1x 10/100Mbps Ethernet (MT7628AN built-in switch with vlan) - 1x 2.4GHz wifi (MT7628AN) - 1x 5Ghz wifi (MT7612E) - 4x LEDs (5 GPIO-controlled) - 1x reset button - 1x WPS button The only and important difference between v1 & v3 is in flash memory layout, so pls don't interchange these 2 builds! Installation through web-ui (on OEM factory firmware): 1. Visit http://tplinkrepeater.net or the configured IP address of your RE305 v3 (default 192.168.0.254). 2. Log in with the password you've set during initial setup of the RE305 (there is no default password). 3. Go to Settings -> System Tools -> Firmware upgrade 4. Click Browse and select the OpenWRT image with factory.bin suffix (not sysupgrade.bin) 5. A window with a progress bar will appear. Wait until it completes. 6. The RE305 will reboot into OpenWRT and serve DHCP requests on the ethernet port. 7. Connect an RJ45 cable from the RE305 to your computer and access LuCI at http://192.168.1.1/ to configure (or use ssh). Disassembly: Just unscrew 4 screws in the corners & take off the back cover. Serial is exposed to the right side of the main board (in the middle) and marked with TX/RX/3V3/GND, but the holes are filled with solder. Installation through serial: 1. connect trough serial (1n8, baudrate=57600) 2. setup the TFTP server and connect it via ethernet (ipaddr=192.168.0.254 of device, serverip=192.168.0.184 - your pc) 3. boot from a initramfs image first (choose 1 in the bootloader options) 4. test it a bit with that, then proceed to run sysupgrade build MAC addresses as verified by OEM firmware: use OpenWrt address reference LAN eth0 *:d2 label 2g wlan0 *:d1 label - 1 5g wlan1 *:d0 label - 2 The label MAC address can be found in config 0x2008. Signed-off-by: Michal Kozuch <servitkar@gmail.com> [redistribute WLAN node properties between DTS/DTSI, remove compatible on DTSI, fix indent/wrapping, split out firmware-utils change] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* build: move elecom-wrc-gs-factory to image-commands.mkINAGAKI Hiroshi2021-10-301-13/+0
| | | | | | | | ELECOM WRC-X3200GST3 uses the same header/footer as WRC-GS/GST devices in ramips/mt7621 subtarget, so move "Build/elecom-wrc-gs-factory" to image-commands.mk to use from mediatek/mt7622 subtarget. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* kernel: bump 5.10 to 5.10.76Rui Salvaterra2021-10-303-12/+12
| | | | | | | | | | | | | | | | Deleted (upstreamed): bcm27xx/patches-5.10/950-0145-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch [1] Manually rebased: bcm27xx/patches-5.10/950-0355-xhci-quirks-add-link-TRB-quirk-for-VL805.patch bcm53xx/patches-5.10/180-usb-xhci-add-support-for-performing-fake-doorbell.patch Note: although automatically rebaseable, the last patch has been edited to avoid conflicting bit definitions. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.10.y&id=b6f32897af190d4716412e156ee0abcc16e4f1e5 Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* ramips: minew g1-c: Allow dynamic RAM sizesBruno Randolf2021-10-261-5/+0
| | | | | | | | Allow RAM size to be passed thru U-Boot. There are 128MB and 64MB versions of Minew G1-C. This is also in line with the behaviour of most other RAMIPS boards. Signed-off-by: Bruno Randolf <br1@einfach.org>
* kernel: bump 5.10 to 5.10.75Rui Salvaterra2021-10-211-1/+1
| | | | | | | | | Deleted (upstreamed): bcm27xx/patches-5.10/950-0735-xhci-guard-accesses-to-ep_state-in-xhci_endpoint_res.patch [1] [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.10.y&id=dc3e0a20dbb9dbaa22f4a33dea34230f8c663c40 Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* kernel: bump 5.4 to 5.4.155John Audia2021-10-211-1/+1
| | | | | | All patches automatically rebased. Signed-off-by: John Audia <graysky@archlinux.us>
* ramips: remove kmod-mt7663-firmware-sta from device packagesFelix Fietkau2021-10-171-3/+3
| | | | | | | | This firmware should only be used for mobile devices (e.g. laptops), where AP mode functionality is typically not used. This firmware supports a lot of power saving offload functionality at the expense of AP mode support. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: fix dtc warnings for telco-electronics_x1Rosen Penev2021-10-171-16/+17
| | | | | | | In all other dts files, the entire block is not edited like this. They're edited separately. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* kernel: backport a rewrite of the mips eBPF JIT implementationFelix Fietkau2021-10-141-1/+1
| | | | | | | This adds support for eBPF JIT for 32 bit targets and significantly improves correctness. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: fix USW-Flex reversed switch-port orderDavid Bauer2021-10-041-4/+4
| | | | | | | Switch port order was reversed due to reading the internal labling (which mismatches the one on the case). Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: add support for Netgear R7450Dale Hui2021-09-264-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | Netgear R7450 is a clone of Netgear R6700v2 Specifications ============== SoC: MediaTek MT7621AT RAM: 256M DDR3 FLASH: 128M NAND WiFi: MediaTek MT7615N an+ac MediaTek MT7615N bgn ETH: MediaTek MT7621AT BTN: 1x Connect (WPS), 1x WLAN, 1x Reset LED: Power (white/amber), WAN(white/amber), 2.4G(white), 5G(white), USB(white) , GuestWifi(white) 4x LAN(white/amber), Wifi Button(white), WPS Button(white) Flash Instructions ================== Login to netgear webinterface and flash factory.img Signed-off-by: Dale Hui <strokes-races0b@icloud.com> [fix model/compatible in DTS] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for Netgear R6900v2Dale Hui2021-09-264-0/+30
| | | | | | | | | | | | | | | | | | | | | | | Netgear R6900v2 is a clone of Netgear R6700v2 Specifications ============== SoC: MediaTek MT7621AT RAM: 256M DDR3 FLASH: 128M NAND WiFi: MediaTek MT7615N an+ac MediaTek MT7615N bgn ETH: MediaTek MT7621AT BTN: 1x Connect (WPS), 1x WLAN, 1x Reset LED: Power (white/amber), WAN(white/amber), 2.4G(white), 5G(white), USB(white) , GuestWifi(white) 4x LAN(white/amber), Wifi Button(white), WPS Button(white) Flash Instructions ================== Login to netgear webinterface and flash factory.img Signed-off-by: Dale Hui <strokes-races0b@icloud.com>
* ramips: add Nighthawk AC2100 as name for Netgear R6700v2Dale Hui2021-09-261-0/+3
| | | | | | | | Netgear Nighthawk AC2100 is another name of the Netgear R6700v2. Signed-off-by: Dale Hui <strokes-races0b@icloud.com> [adjust commit message/title] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: make Netgear R7200 a separate device from R6700v2Dale Hui2021-09-264-4/+30
| | | | | | | | | With the various variants of Netgear R**** devices, make it more obvious which image should be used for the R7200. Signed-off-by: Dale Hui <strokes-races0b@icloud.com> [provide proper commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: enable I2C_CHARDEVDavid Bauer2021-09-251-0/+1
| | | | | | | Expose I2C busses with a chardev device. This is required to control the PSE controller on the Ubiquiti UniFi Flex Switch. Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: add support for Ubiquiti USW-FlexDavid Bauer2021-09-253-0/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- MediaTek MT7621AT 16M SPI-NOR Macronix MX25L12835FMI Microchip PD69104B1 4-Channel PoE-PSE controller TI TPS2373 PoE-PD controller PoE-Controller -------------- By default, the PoE outputs do not work with OpenWrt. To make them output power, install the "poemgr" package from the packages feed. This package can control the PD69104B1 PSE controller. Installation ------------ 1. Connect to the booted device at 192.168.1.20 using username/password "ubnt" via SSH. 2. Add the uboot-envtools configuration file /etc/fw_env.config with the following content $ echo "/dev/mtd1 0x0 0x1000 0x10000 1" > /etc/fw_env.config 3. Update the bootloader environment. $ fw_setenv boot_openwrt "fdt addr \$(fdtcontroladdr); fdt rm /signature; bootubnt" $ fw_setenv bootcmd "run boot_openwrt" 4. Transfer the OpenWrt sysupgrade image to the device using SCP. 5. Check the mtd partition number for bs / kernel0 / kernel1 $ cat /proc/mtd 6. Set the bootselect flag to boot from kernel0 $ dd if=/dev/zero bs=1 count=1 of=/dev/mtdblock4 7. Write the OpenWrt sysupgrade image to both kernel0 as well as kernel1 $ dd if=openwrt.bin of=/dev/mtdblock6 $ dd if=openwrt.bin of=/dev/mtdblock7 8. Reboot the device. It should boot into OpenWrt. Restore to UniFi ---------------- To restore the vendor firmware, follow the Ubiquiti UniFi TFTP recovery guide for access points. The process is the same for the Flex switch. Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: add support for I-O DATA WN-DX2033GRINAGAKI Hiroshi2021-09-253-1/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I-O DATA WN-DX2033GR is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based on MT7621A. Specification: - SoC : MediaTek MT7621A - RAM : DDR3 128 MiB - Flash : Raw NAND 128 MiB (Macronix MX30LF1G18AC-TI) - WLAN : 2.4/5 GHz - 2.4 GHz : 2T2R, MediaTek MT7603E - 5 GHz : 4T4R, MediaTek MT7615 - Ethernet : 5x 10/100/1000 Mbps - Switch : MediaTek MT7530 (SoC) - LEDs/Keys : 2x/3x (2x buttons, 1x slide-switch) - UART : through-hole on PCB - J5: 3.3V, TX, RX, NC, GND from triangle mark - 57600n8 - Power : 12 VDC, 1 A Flash instruction using initramfs image: 1. Boot WN-DX2033GR normally 2. Access to "http://192.168.0.1/" and open firmware update page ("ファームウェア") 3. Select the OpenWrt initramfs image and click update ("更新") button to perform firmware update 4. On the initramfs image, download the sysupgrade.bin image to the device and perform sysupgrade with it 5. Wait ~120 seconds to complete flashing Notes: - The hardware of WN-DX2033GR and WN-AX2033GR are almost the same, and it is certified under the same radio-wave related regulations in Japan - The last 0x80000 (512 KiB) in NAND flash is not used on stock firmware - stock firmware requires "customized uImage header" (called as "combo image") by MSTC (MitraStar Technology Corp.), but U-Boot doesn't - uImage magic ( 0x0 - 0x3 ) : 0x434F4D42 ("COMB") - header crc32 ( 0x4 - 0x7 ) : with "data length" and "data crc32" - image name (0x20 - 0x37) : model ID and firmware versions - data length (0x38 - 0x3b) : kernel + rootfs - data crc32 (0x3c - 0x3f) : kernel + rootfs - There are 2x important flags in the flash: - bootnum : select os partition for booting (persist, 0x4) - 0x01: firmware - 0x02: firmware_2 - debugflag : allow interrupt kernel loader, it's named as "Z-LOADER" (Factory, 0xFE75) - 0x00: disable debug - 0x01: enable debug MAC addresses: LAN : 50:41:B9:xx:xx:90 (Factory, 0xE000 (hex) / Ubootenv, ethaddr (text)) WAN : 50:41:B9:xx:xx:92 (Factory, 0xE006 (hex)) 2.4 GHz : 50:41:B9:xx:xx:90 (Factory, 0x4 (hex)) 5 GHz : 50:41:B9:xx:xx:91 (Factory, 0x8004 (hex)) Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ramips: add missing information to dlink headersAlan Luck2021-09-243-8/+11
| | | | | | | | | | | | Add additional header information required for newer bootloaders found on DIR-2660-A1 & A2. Also remove the MTD splitter compatible from the second firmware partition, as OpenWrt only supports handling of the first one. Signed-off-by: Alan Luck <luckyhome2008@gmail.com> [rephrase commit message, remove removal of read-only flags] Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: add support for Sitecom WLR-4100 v1 002Andrea Poletti2021-09-053-1/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sitecom WLR-4100 v1 002 (marked as X4 N300) is a wireless router Specification: SoC: MT7620A RAM: 64 MB DDR2 Flash: MX25L6405D SPI NOR 8 MB WIFI: 2.4 GHz integrated Ethernet: 5x 10/100/1000 Mbps QCA8337 USB: 1x 2.0 LEDS: 2x GPIO controlled, 5x switch Buttons: 1x GPIO controlled UART: row of 4 unpopulated holes near USB port, starting count from white triangle on PCB: VCC 3.3V GND TX RX baud: 115200, parity: none, flow control: none Installation Connect to one of LAN (yellow) ethernet ports, Open router configuration interface, Go to Toolbox > Firmware, Browse for OpenWrt factory image with dlf extension and hit Apply, Wait few minutes, after the Power LED will stop blinking, the router is ready for configuration. Known issues Some USB 2.0 devices work at full speed mode 1.1 only MAC addresses factory partition only contains one (binary) MAC address in 0x4. u-boot-env contains four (ascii) MAC addresses, of which two appear to be valid. factory 0x4 **:**:**:**:b9:84 binary u-boot-env ethaddr **:**:**:**:b9:84 ascii u-boot-env wanaddr **:**:**:**:b9:85 ascii u-boot-env wlanaddr 00:AA:BB:CC:DD:12 ascii u-boot-env iNICaddr 00:AA:BB:CC:DD:22 ascii The factory firmware only assigns ethaddr. Thus, we take the binary value which we can use directly in DTS. Additional information OEM firmware shell password is: SitecomSenao useful for creating backup of original firmware. There is also another revision of this device (v1 001), based on RT3352 SoC Signed-off-by: Andrea Poletti <polex73@yahoo.it> [remove config DT label, convert to nvmem, remove MAC address setup from u-boot-env, add MAC address info to commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: minew g1-c: use default static address for lan instead of dhcpAlexander Couzens2021-08-311-5/+1
| | | | | | | | | As Adrian Schmutzler suggested on github [1] the device should follow the default behaviour on ethernet using a static address instead using dhcp. [1] https://github.com/openwrt/openwrt/commit/8d497b65704f62294a4bbc0e1f5aa4eb1dbf9e24 Signed-off-by: Alexander Couzens <lynxis@fe80.eu>