aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/mt7620
Commit message (Collapse)AuthorAgeFilesLines
* ramips: fix missing NVMEM subsystemDavid Bauer2021-07-212-0/+2
| | | | | | | | | | | | MAC address retrieval was switched to more generic upstream (5.13) NVMEM based solution in commit 06bb4a5018cd ("ramips: convert mtd-mac-address to nvmem implementation") , but NVMEM subsystem wasn't enabled in the kernel, so fix it now. References: https://github.com/openwrt/openwrt/pull/4041#issuecomment-883322801 Fixes: 06bb4a5018cd ("ramips: convert mtd-mac-address to nvmem implementation") Signed-off-by: David Bauer <mail@david-bauer.net> Signed-off-by: Petr Štetiar <ynezz@true.cz> [commit message]
* ramips: add AW9523 I2C GPIO expander driverDavid Bauer2021-06-272-0/+2
| | | | | | | | | | | | | | This adds a driver for the AW9523 I2C GPIO expander. This driver is required to make LEDs as well as buttons on the Tenbay T-MB5EU-V01 work. This driver already had several upstream iterations. I'm working to push this driver to mainline. Ref: https://patchwork.ozlabs.org/project/linux-gpio/list/?series=226287 Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: mt7620: disable SOC VLANs for external switchesMichael Pratt2021-06-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | These boards have AR8327 or QCA8337 external ethernet switch. The SOC also has it's own internal switch where VLAN is now enabled by default. Changes to preinit caused all switches to have VLANs enabled by default even if they are not configured with a topology in uci_defaults (see commit f017f617aecbd47debd4d3a734dc0e471342db96) When both internal and external switches have VLANs, and the external switch has both LAN and WAN, the TX traffic from the SOC cannot flow to the tagged port on the external switch because the VLAN IDs are not matching. So disable the internal switch VLANs by default on these boards. Also, add a topology for the internal switch, so that on LuCI there is not an "unknown topology" warning. In theory, it may be possible to have LAN ports on both switches through internal and external PHYs, but there are no known boards that have this. Signed-off-by: Michael Pratt <mcpratt@pm.me>
* ramips: add support for the Wavlink WL-WN579X3Ben Gainey2021-06-062-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | About the device ---------------- SoC: MediaTek MT7620a @ 580MHz RAM: 64M FLASH: 8MB WiFi: SoC-integrated: MediaTek MT7620a bgn WiFi: MediaTek MT7612EN nac GbE: 2x (RTL8211F) BTN: - WPS - Reset - Router/Repeater/AP (3-way slide-switch) LED: - WPS (blue) - 3-segment Wifi signal representation (blue) - WiFi (blue) - WAN (blue) - LAN (blue) - Power (blue) UART: UART is present as Pads with through-holes on the PCB. They are located next to the reset button and are labelled Vcc/TX/RX/GND as appropriate. Use 3.3V, 57600-8N1. Installation ------------ Using the webcmd interface -------------------------- Warning: Do not update to the latest Wavlink firmware (version 20201201) as this removes the webcmd console and you will need to use the serial port instead. You will need to have built uboot/sqauashfs image for this device, and you will need to provide an HTTP service where the image can be downloaded from that is accessible by the device. You cannot use the device manufacturers firmware upgrade interface as it rejects the OpenWrt image. 1. Log into the device's admin portal. This is necessary to authenticate you as a user in order to be able to access the webcmd interface. 2. Navigate to http://<device-ip>/webcmd.shtml - you can access the console directly through this page, or you may wish to launch the installed `telnetd` and use telnet instead. * Using telnet is recommended since it provides a more convenient shell interface that the web form. * Launch telnetd from the form with the command `telnetd`. * Check the port that telnetd is running on using `netstat -antp|grep telnetd`, it is likely to be 2323. * Connect to the target using `telnet`. The username should be `admin2860`, and the password is your admin password. 3. On the target use `curl` to download the image. e.g. `curl -L -O http://<some-other-lan-ip>/openwrt-ramips-mt7620-\ wavlink_wl-wn579x3-squashfs-sysupgrade.bin`. Check the hash using `md5sum`. 4. Use the mtd_write command to flash the image. * The flash partition should be mtd4, but check /sys/class/mtd/mtd4/name first. The partition should be called 'Kernel'. * To flash use the following command: `mtd_write -r -e /dev/mtd<n> write <image-file> /dev/mtd<n>` Where mtd<n> is the Kernel partition, and <image-file> is the OpenWrt image previously downloaded. * The command above will erase, flash and then reboot the device. Once it reboots it will be running OpenWrt. Connect via ssh to the device at 192.168.1.1 on the LAN port. The WAN port will be configured via DHCP. Using the serial port --------------------- The device uses uboot like many other MT7260a based boards. To use this interface, you will need to connect to the serial interface, and provide a TFTP server. At boot follow the bootloader menu and select option 2 to erase/flash the image. Provide the address and filename details for the tftp server. The bootloader will do the rest. Once the image is flashed, the board will boot into OpenWrt. The console is available over the serial port. Signed-off-by: Ben Gainey <ba.gainey@googlemail.com>
* ramips: split Youku YK1 to YK-L1 and YK-L1cShiji Yang2021-06-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Device specifications: * Model: Youku YK-L1/L1c * CPU: MT7620A * RAM: 128 MiB * Flash: 32 MiB (YK-L1)/ 16 MiB (YK-L1c) * LAN: 2* 10M/100M Ports * WAN: 1* 10M/100M Port * USB: 1* USB2.0 * SD: 1* MicroSD socket * UART: 1* TTL, Baudrate 57600 Descriptions: Previous supported device YOUKU yk1 is actually Youku YK-L1. Though they look really different, the only hardware difference between the two models is flash size, YK-L1 has 32 MiB flash but YK-L1c has 16MiB. It seems that YK-L1c can compatible with YK-L1's firmware but it's better to split it to different models. It is easy to identify the models by looking at the label on the bottom of the device. The label has the model number "YK-L1" or "YK-L1c". Due to different flash sizes, YK-L1c that using previous YK-L1's firmware needs to apply "force update" to install compatible firmware, so please backup config file before system upgrade. Signed-off-by: Shiji Yang <yangshiji66@qq.com> [use more specific name for DTSI] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix mac addresses of Youku YK1Shiji Yang2021-05-101-2/+2
| | | | | | | | | | | | | | MAC addresses read from official firmware value location Wlan xx 71 de factory@0x04 Lan xx 71 dd factory@0x28 Wan xx 71 df factory@0x2e Label xx 71 dd factory@0x28 Signed-off-by: Shiji Yang <yangshiji66@qq.com> [fix sorting in 02_network, redact commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: switch the timer frequency to 100 HzRui Salvaterra2021-04-212-4/+0
| | | | | | | | Some targets select HZ=100, others HZ=250. There's no reason to select a higher timer frequency (and 100 Hz are available in every architecture), so change all targets to 100 Hz. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* ramips: improve pinctrl for Youku YK-L1Shiji Yang2021-04-101-4/+0
| | | | | | | 1. rename led pin "air" to a more common name "wlan" and use "phy0tpt" to trigger it. 2. led "wan" can be triggered by ethernet pinctrl by default so just drop it. Signed-off-by: Shiji Yang <yangshiji66@qq.com>
* ramips: correct switch config of Youku yk1Shiji Yang2021-03-271-1/+4
| | | | | | | | | | There are only two lan ports and one wan port on Youku yk1 Fixes: e9baf8265bb8 ("ramips: add support for Youku YK1") Signed-off-by: Shiji Yang <yangshiji66@qq.com> [add Fixes:] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: remove execute bit and shebang from board.d filesAdrian Schmutzler2021-03-063-3/+0
| | | | | | | | | | | | | | | | So far, board.d files were having execute bit set and contained a shebang. However, they are just sourced in board_detect, with an apparantly unnecessary check for execute permission beforehand. Replace this check by one for existance and make the board.d files "normal" files, as would be expected in /etc anyway. Note: This removes an apparantly unused '#!/bin/sh /etc/rc.common' in target/linux/bcm47xx/base-files/etc/board.d/01_network Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: 5.10: refresh configsIlya Lipnitskiy2021-03-061-6/+4
| | | | | | | | Run-tested on Ubiquiti EdgeRouter X. Compile tested on all other subtargets. Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
* ramips: copy config-5.4 to config-5.10Ilya Lipnitskiy2021-03-061-0/+195
| | | | | | Strict copy, no changes made. Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
* Revert "ramips: add support for kernel 5.10"Adrian Schmutzler2021-03-061-193/+0
| | | | | | | | | This reverts commit b4aad29a1d7ad77d67073c1c54b28c429c64ed9b. This was accidentally folded into a single commit. Remove it and apply it properly again. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for kernel 5.10Ilya Lipnitskiy2021-03-051-0/+193
| | | | | | | | | | | | | | | | | | | | | | | | | Enable testing kernel. Delete upstreamed patches: 0098-disable_cm.patch can be dropped, upstream fixed CM handling. Fix compile errors by using new kernel APIs. Fix fuzz by manually editing patches to ensure the code goes in the right place. For 721-NET-no-auto-carrier-off-support.patch, revert upstream commit a307593a6 to keep the OpenWrt ralink driver operational. Add mt7621-pci-phy patch to select REGMAP_MMIO as discussed in PR #3693 and #3952. Rename patches to follow the 3-digit classification from the OpenWrt Developer Guide. Run automatic quilt refresh. Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
* ramips: 5.4: refresh configsIlya Lipnitskiy2021-03-051-54/+3
| | | | | | Automatic refresh by running make kernel_oldconfig on each target. Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
* ramips: fix Phicomm PSG1218A switch port labelsShiji Yang2021-02-221-1/+1
| | | | | | | | The lan port sequence was reversed compared to the labels. Signed-off-by: Shiji Yang <yangshiji66@qq.com> [improve commit title/message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: correct/add Phicomm K2x WAN/label MAC addressShiji Yang2021-02-221-4/+4
| | | | | | | | | | | | | | Phicomm K2G: add missing label_mac Phicomm PSG1218A & PSG1218B: The previous wan mac was set as factory@0x28 +1 (originally based on the default case for the ramips target), but the correct wan mac is factory@0x28 -1, being equal to factory@0x2e. Signed-off-by: Shiji Yang <yangshiji66@qq.com> [minor commit title/message adjustments] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: remove generic profilesAdrian Schmutzler2021-01-271-17/+0
| | | | | | | | | | | | | On a platform with many very different devices, like found on ramips, the generic profiles seem like remnants of the past that do not have a real use anymore. Remove them to have one thing less to maintain. Actually, rt288x didn't have a default profile in the first place. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Acked-by: Paul Spooren <mail@aparcar.org>
* ramips: add support for Wavlink WL-WN530HG4Nuno Goncalves2020-10-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Same hardware as Phicomm K2G but different flash layout. Specification: - SoC: MediaTek MT7620A - Flash: 8 MB - RAM: 64 MB - Ethernet: 4 FE ports and 1 GE port (RTL8211F on port 5) - Wireless radio: MT7620 for 2.4G and MT7612E for 5G, both equipped with external PA. - UART: 1 x UART on PCB - 57600 8N1 Flash instruction: To avoid requiring UART for TFTP a dual flash procedure is suggested to install the squashfs image: 1. Rename openwrt-ramips-mt7620-wavlink_wl-wn530hg4-initramfs-kernel.bin to WN530HG4-WAVLINK. 2. Flash this file with the factory web interface. 3. With OpenWRT now running use standard sysupgrade to install the squashfs image. Signed-off-by: Nuno Goncalves <nunojpg@gmail.com> [remove dts-v1, remove model from LED labels, wrap commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: remove set_wifi_led function in 01_ledsAdrian Schmutzler2020-10-021-30/+26
| | | | | | | | | | | | | | | | | | | While we mostly use the ucidef_set_led_* functions directly in 01_leds we still have the set_wifi_led function in parallel for several old devices. This is not only inconsistent with the other definitions, it also links to the wlan0 interface instead of using a phy trigger which would be independent of the interface name (and is used for all newer devices anyway). Apart from that, the standard names "wifi" and "wifi-led" are not very helpful in a world with different radio bands either. Thus, this patch removes the set_wifi_led function and puts the relevant commands into the cases explicitly. This makes the mechanism used more evident and will hopefully lead to some future improvements or at least prevent some copy-pasting of the old setups. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: remove option to set WiFi LED via aliasesAdrian Schmutzler2020-10-021-3/+0
| | | | | | | | | | | | | In ramips, it's not common to use an alias for specifying the WiFi LED; actually only one device uses this mechanism (TL-WR841N v14). Particularly since the WiFi LEDs are typically distinguished between 2.4G and 5G etc. it is also not very useful for this target. Thus, this patch removes the setup lines for this mechanism and converts the TL-WR841N v14 to the normal setup. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: remove model name from LED labelsAdrian Schmutzler2020-10-022-152/+95
| | | | | | | | | | | | | | | | | Like in the previous patch for ath79 target, this will remove the "devicename" from LED labels in ramips as well. The devicename is removed in DTS files and 01_leds, consolidation of definitions into DTSI files is done where (easily) possible, and migration scripts are updated. For the latter, all existing definitions were actually just devicename migrations anyway. Therefore, those are removed and a common migration file is created in target base-files. This is actually another example of how the devicename removal makes things easier. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: assign LEDs for RAVPower RP-WD03Adrian Schmutzler2020-09-121-0/+3
| | | | | | | | | | | | | | | According to the User Manual, there is a "Wi-Fi LED" with blue and green colors, doing the following by default: Flashing Blue: System loading Solid Blue: System loaded Flashing Green: Connecting to the Internet Solid Green: Connected to the Internet According to this vendor behavior, we keep refer to the LED as "wifi" but implement the according default behavior as in OEM firmware. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix partitions and boot for RAVPower RP-WD03Adrian Schmutzler2020-09-111-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RAVPower RP-WD03 is a battery powered router, with an Ethernet and USB port. Due due a limitation in the vendor supplied U-Boot bootloader, we cannot exceed a 1.5 MB kernel size, as is the case with recent builds (i.e. post v19.07). This breaks both factory and sysupgrade images. To address this, use the lzma loader (loader-okli) to work around this limitation. The improvements here also address the "misplaced" U-Boot environment partition, which is located between the kernel and rootfs in the stock image / implementation. This is addressed by making use of mtd-concat, maximizing space available in the booted image. This will make sysupgrade from earlier versions impossible. Changes are based on the recently supported HooToo HT-TM05, as the hardware is almost identical (except for RAM size) and is from the same vendor (SunValley). While at it, also change the SPI frequency accordingly. Installation: - Download the needed OpenWrt install files, place them in the root of a clean TFTP server running on your computer. Rename the files as, - openwrt-ramips-mt7620-ravpower_rp-wd03-squashfs-kernel.bin => kernel - openwrt-ramips-mt7620-ravpower_rp-wd03-squashfs-rootfs.bin => rootfs - Plug the router into your computer via Ethernet - Set your computer to use 10.10.10.254 as its IP address - With your router shut down, hold down the power button until the first white LED lights up. - Push and hold the reset button and release the power button. Continue holding the reset button for 30 seconds or until it begins searching for files on your TFTP server, whichever comes first. - The router (10.10.10.128) will look for your computer at 10.10.10.254 and install the two files. Once it has finished installation, it will automatically reboot and start up OpenWrt. - Set your computer to use DHCP for its IP address Notes: - U-Boot environment can be modified, u-boot-env is preserved on initial install or sysupgrade - mtd-concat functionality is included, to leave a "hole" for u-boot-env, combining the OEM kernel and rootfs partitions Most of the changes in this commit are the work of Russell Morris (as credited below), I only wrapped them up and added compat-version. Thanks to @mpratt14 and @xabolcs for their help getting the lzma loader to work! Fixes: 5ef79af4f80f ("ramips: add support for Ravpower WD03") Suggested-by: Russell Morris <rmorris@rkmorris.us> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: use proper name for RAVPower RP-WD03Adrian Schmutzler2020-09-112-1/+4
| | | | | | | | The proper model name is RP-WD03 (i.e. with the RP- prefix). Adjust all names to that. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for HooToo HT-TM05Russell Morris2020-09-032-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HooToo HT-TM05 is a battery powered router, with an Ethernet and USB port. Vendor U-Boot limited to 1.5 MB kernel size, so use lzma loader (loader-okli). Specifications: SOC: MediaTek MT7620N BATTERY: 10400mAh WLAN: 802.11bgn LAN: 1x 10/100 Mbps Ethernet USB: 1x USB 2.0 (Type-A) RAM: 64 MB FLASH: GigaDevice GD25Q64, Serial 8 MB Flash, clocked at 50 MHz Flash itself specified to 80 MHz, but speed limited by mt7620 SPI fast-read enabled (m25p) LED: Status LED (blue after boot, green with WiFi traffic 4 leds to indicate power level of the battery (unable to control) INPUT: Power, reset button MAC assignment based on vendor firmware: 2.4 GHz *:b4 (factory 0x04) LAN/label *:b4 (factory 0x28) WAN *:b5 (factory 0x2e) Tested and working: - Ethernet - 2.4 GHz WiFi (Correct MAC-address) - Installation from TFTP (recovery) - OpenWRT sysupgrade (Preserving and non-preserving), through the usual ways: command line and LuCI - LEDs (except as noted above) - Button (reset) - I2C, which is needed for reading battery charge status and level - U-Boot environment / variables (from U-Boot, and OpenWrt) Installation: - Download the needed OpenWrt install files, place them in the root of a clean TFTP server running on your computer. Rename the files as, - ramips-mt7620-hootoo_tm05-squashfs-kernel.bin => kernel - ramips-mt7620-hootoo_tm05-squashfs-rootfs.bin => rootfs - Plug the router into your computer via Ethernet - Set your computer to use 10.10.10.254 as its IP address - With your router shut down, hold down the power button until the first white LED lights up. - Push and hold the reset button and release the power button. Continue holding the reset button for 30 seconds or until it begins searching for files on your TFTP server, whichever comes first. - The router (10.10.10.128) will look for your computer at 10.10.10.254 and install the two files. Once it has finished installation, it will automatically reboot and start up OpenWrt. - Set your computer to use DHCP for its IP address Notes: - U-Boot environment can be modified, u-boot-env is preserved on initial install or sysupgrade - mtd-concat functionality is included, to leave a "hole" for u-boot-env, combining the OEM kernel and rootfs partitions I would like to thank @mpratt14 and @xabolcs for their help getting the lzma loader to work! Signed-off-by: Russell Morris <rmorris@rkmorris.us> [drop changes in image/Makefile, fix indent and PKG_RELEASE in uboot-envtools, fix LOADER_FLASH_OFFS, minor commit message facelift, add COMPILE to Device/Default] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: drop support for kernel 4.14Adrian Schmutzler2020-09-021-235/+0
| | | | | | | The target seems to be working on 5.4, so drop 4.14 support in preparation for removing it from master entirely. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: use wpad-basic-wolfssl as defaultPetr Štetiar2020-08-201-1/+1
| | | | | | | | | | | | | | | In order to support SAE/WPA3-Personal in default images. Replace almost all occurencies of wpad-basic and wpad-mini with wpad-basic-wolfssl for consistency. Keep out ar71xx from the list as it won't be in the next release and would only make backports harder. Build-tested (build-bot settings): ath79: generic, ramips: mt7620/mt76x8/rt305x, lantiq: xrx200/xway, sunxi: a53 Signed-off-by: Petr Štetiar <ynezz@true.cz> [rebase, extend commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for Netgear JWNR2010 v5Shibajee Roy2020-08-062-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specification: - CPU: MediaTek MT7620N (580 MHz) - Flash size: 4 MB NOR SPI - RAM size: 32 MB DDR1 - Bootloader: U-Boot - Wireless: MT7620N 2x2 MIMO 802.11b/g/n (2.4 GHz) - Switch: MT7620 built-in 10/100 switch with vlan support - Ports: 4x LAN, 1x WAN - Others: 7x LED, Reset button, UART header on PCB (57600 8N1) Flash instructions: 1. Use ethernet cable to connect router with PC/Laptop, any router LAN port will work. 2. To flash openwrt we are using nmrpflash[1]. 3. Flash commands: First we need to identify the correct Ethernet id. nmrpflash -L nmrpflash -i net* -f openwrt-ramips-mt7620-netgear_jwnr2010-v5-squashfs-factory.img This will show something like "Advertising NMRP server on net*..." (net*, *=1,2,3... etc.) 4. Now remove the power cable from router back side and immediately connect it again. You will see flash notification in CMD window, once it says reboot the device just plug off the router and plug in again. Revert to stock: 1. Download the stock firmware from official netgear support[2]. 2. Follow the same nmrpflash procedure like above, this time just use the stock firmware. nmrpflash -i net* -f N300-V1.1.0.54_1.0.1.img MAC addresses on stock firmware: LAN = *:28 (label) WAN = *:29 WLAN = *:28 On flash, the only valid MAC address is found in factory 0x4. Special Note: This openwrt firmware will also support other netgear N300 routers like below as they share same stock firmware[3]. JNR1010v2 / WNR614 / WNR618 / JWNR2000v5 / WNR2020 / WNR1000v4 / WNR2020v2 / WNR2050 [1] https://github.com/jclehner/nmrpflash [2] https://www.netgear.com/support/product/JWNR2010v5.aspx [3] http://kb.netgear.com/000059663 Signed-off-by: Shibajee Roy <ador250@protonmail.com> [create DTSI, use netgear_sercomm_nor, disable by default, add MAC addresses to commit message, add label MAC address] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: unify CONFIG_GPIO_SYSFS in kernel configsFelix Fietkau2020-08-062-2/+0
| | | | | | Enable it for all platforms Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: switch rt305x subtarget to kernel 5.4Alexey Dobrovolsky2020-08-051-2/+0
| | | | | | | | | | | | | | RT3x5x seems to work fine with kernel 5.4. Set the default kernel version to 5.4 to bring this to a broader audience. Since 4 of 6 targets are on kernel 5.4 now, invert the kernel version setup logic in Makefile/target.mk files. Tested on ZyXEL Keenetic. Signed-off-by: Alexey Dobrovolsky <dobrovolskiy.alexey@gmail.com> [invert version setup logic] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: switch MT7620 subtarget to 5.4David Bauer2020-07-221-0/+2
| | | | | | | | | MT7620 seems to work fine with kernel 5.4. Set the default kernel version to 5.4 to bring this to a broader audience. Tested on Archer C2 v1 / Archer C20i Signed-off-by: David Bauer <mail@david-bauer.net>
* treewide: drop shebang from non-executable target filesAdrian Schmutzler2020-06-161-2/+0
| | | | | | | | | | | | | | This drops the shebang from all target files for /lib and /etc/uci-defaults folders, as these are sourced and the shebang is useless. While at it, fix the executable flag on a few of these files. This does not touch ar71xx, as this target is just used for backporting now and applying cosmetic changes would just complicate things. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix port display for TRENDnet TEW-810DRJ. Scott Heppler2020-06-121-1/+1
| | | | | | | | | | This updates the display port order for the TEW-810DR to be in line with the DIR-810L. Both share the same board and pictures on the vendors' pages indicate the same external numbering scheme as well. Signed-off-by: J. Scott Heppler <shep971@centurylink.net> [replace commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix port display for D-Link DIR-810LAdrian Schmutzler2020-06-111-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The port order displayed in LuCI is currently inverted for this devices: LuCI - Device LAN1 - LAN4 LAN2 - LAN3 LAN3 - LAN2 LAN4 - LAN1 Fix it. Strangely, the owner of a TRENDnet TEW-810DR reports that the initial port order is correct, while both devices share the same board and look similar from the outside. Since I cannot investigate this without having any of the devices, this does only touch the DIR-810L for now. While at it, also merge in the case for zbtlink,zbt-we2026, as the display port specified for WAN there won't have any effect anyway. Reported-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix WAN LED for D-Link DIR-810L/TRENDnet TEW-810DRAdrian Schmutzler2020-06-111-3/+4
| | | | | | | | | | | | | | | | | | The WAN LED on DIR-810L was actually blinking on LAN1 port activity. This has already been improved for the TEW-810DR, where the GPIO has been set up explicitly rather than having it controlled by the switch. This patch also applies this setup to the DIR-810L. In addition, the trigger in 01_leds is set up with ucidef_set_led_switch for both devices now, so state changes should be displayed correctly as well. Reported-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> [DIR-810L] Tested-by: J. Scott Heppler <shep971@centurylink.net> [TEW-810DR]
* ramips: add support for Netgear EX6120Adrian Schmutzler2020-06-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: * SoC: MT7620A * CPU: 580 MHz * RAM: 64 MB DDR * Flash: 8MB NOR SPI flash * WiFi: MT7612E (5GHz) and builtin MT7620A (2.4GHz) * LAN: 1x100M The device is identical to the EX6130 except for the mains socket and the hardware ID. Installation: The -factory images can be flashed from the device's web interface or via nmrpflash. Notes: MAC addresses were set up based on the EX6130 setup. This is based on prior work of Adam Serbinski and Mathias Buchwald. Tested by Mathias Buchwald. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for TRENDnet TEW-810DRJ. Scott Heppler2020-05-262-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: * MediaTek MT7620A (580 Mhz) * 8 MB of FLASH * 64 MB of RAM * 2.4Ghz and 5.0Ghz radios * 5x 10/100 Mbps Ethernet (1 WAN and 4 LAN) * UART header on PCB (57600 8n1) * Green/Orange Power LEDs illuminating a Power-Button Lens * Green/Orange Internet LEDs GPIO controlled illuminating a Globe/Internet Lens * 3x button - wps, power and reset * U-boot bootloader Installation: The sysupgrade.bin image is reported to be OEM web flashed with an ncc_att_hwid appended. ncc_att_hwid is a 32bit binary in the GPL Source download for either the TEW-810DR or DIR-810L and is located at source/user/wolf/cameo/ncc/hostTools. The invocation is: ncc_att_hwid -f tew-810dr-squashfs-factory.bin -a -m "TEW-810DR" -H "1.0R" -r "WW" -c "1.0" This may need to be altered if your hardware version is "1.1R". The image can also be directly flashed via serial tftp: 1. Load *.sysupgrade.bin to your tftp server directory and rename for convenience. 2. Set a static ip 192.168.10.100. 3. NIC cable to a lan port. 4. Serial connection parameters 57600,8N1 5. Power on the TEW-810 and press 4 for a u-boot command line prompt. 6. Verify IP's with U-Boot command "printenv". 7. Adjust tftp settings if needed per the tftp documentation 8. Boot the tftp image to test the build. 9. If the image loads, reset your server ip to 192.168.1.10 and restart network. 10. Log in to Luci, 192.168.1.1, and flash the *sysupgrade.bin image. Notes: The only valid MAC address is found in 0x28 of the factory partition. Other typical offsets/caldata only contain example data: 00:11:22:00:0f:xx Signed-off-by: J. Scott Heppler <shep971@centurylink.net> [remove "link rx tx" in 01_leds, format and extend commit message, fix DTS led node names] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: remove default switch setup in 02_networkChuanhong Guo2020-05-191-12/+8
| | | | | | | | ramips images now relies on explicit switch setup for proper failsafe functionality. Remove default cases where it relies on vlan setup in dts and add switch setup for devices affected. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: set WAN address in DTS for ASUS RT-AC51U/RT-AC54UAdrian Schmutzler2020-05-181-2/+1
| | | | | | | | | | | | | The location 0x28 in factory partition is the common one used for ethernet address on this architecture. Despite, it contains the label MAC address for the devices at hand. Consequently, this patch moves 0x28 to the &ethernet node in DTS files (setting the WAN MAC address there) and sets up the lan_mac from 0x22 in 02_network. As a benefit, this allows to use label-mac-device in DTS instead of ucidef_set_label_macaddr. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: use DT trigger for 2G WiFi on ASUS RT-AC51UAdrian Schmutzler2020-05-181-6/+5
| | | | | | | | | | | Like for the RT-AC54U, this uses a DT trigger for WiFi also at the RT-AC51U. While at it, rename node and label to wifi2g. Note that the 5g WiFi LED still isn't supported (see PR #3017 for further details: https://github.com/openwrt/openwrt/pull/3017 ) Tested-by: Davide Fioravanti <pantanastyle@gmail.com> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix MAC address assignment for ASUS RT-AC51UAdrian Schmutzler2020-05-181-1/+1
| | | | | | | | | | | | | | | | The current MAC address assignment for the ASUS RT-AC51U is "wrong", it actually should be the same as for the RT-AC54U. Fix it. MAC assignment based on vendor firmware: 2g 0x4 label 5g 0x8004 label +4 lan 0x22 label +4 wan 0x28 label Thanks to Davide Fioravanti for checking this on his device. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for netis WF2770Sungbo Eo2020-05-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | netis WF2770 is a 2.4/5GHz band AC750 router, based on MediaTek MT7620A. Specifications: - SoC: MT7620A - RAM: DDR2 64MB - Flash: SPI NOR 16MB - WiFi: - 2.4GHz: SoC internal - 5GHz: MT7610EN - Ethernet: 5x 10/100/1000Mbps - Switch: MT7530BU - UART: - J2: 3.3V, RX, TX, GND (3.3V is the square pad) / 57600 8N1 MAC addresses in factory partition: 0x0004: LAN, WiFi 2.4GHz (label_mac-6) 0x0028: not used (label_mac-1) 0x002e: WAN (label_mac) 0x8004: WiFi 5GHz (label_mac+2) 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: 1. Perform sysupgrade with stock image. Reviewed-by: Pawel Dembicki <paweldembicki@gmail.com> Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: add support for ASUS RT-AC54UZhijun You2020-05-171-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specification: - CPU: MTK MT7620A - RAM: 64MB - ROM: 16MB SPI Flash Macronix MX25L12835E - WiFi1: MediaTek MT7620A - WiFi2: MediaTek MT7612E - Button: reset, wps - LED: 9 LEDs:Power, WiFi 2.4G,WiFi 5G, USB, LAN1, LAN2, LAN3, LAN4, WAN - Ethernet: 5 ports, 4 LAN + 1 WAN - Other: 1x UART 1x USB2.0 Installation: Update using ASUS Firmware Restoration Tool: 1. Download the ASUS Firmware Restoration Tool but don't open it yet 2. Unplug your computer from the router 3. Put the router into Rescue Mode by: turning the power off, using a pin to press and hold the reset button, then turning the router back on while keeping the reset button pressed for ~5 secs until the power LED starts flashing slowly (which indicates the router has entered Rescue Mode) 4. Important (if you don't do this next step the Asus Firmware Restoration Tool will wrongly assume that the router is not in Rescue Mode and will refuse to flash it): go to the Windows Control Panel and temporarily disable ALL other network adapters except the one you will use to connect your computer to the router 5. For the single adapter you left enabled, temporarily give it the static IP 192.168.1.10 and the subnet mask 255.255.255.0 6. Connect a LAN cable between your computer (make sure to use the Ethernet port of the adapter you've just set up) and port 1 of the router (not the router's WAN port) 7. Rename sysupgrade.bin to factory.trx 8. Open the Asus Firmware Restoration Tool, locate factory.trx and click upload (if Windows shows a compatibility prompt, confirm that the tool worked fine) 9. Flashing and reboot is finished when the power LED stops blinking and stays on MAC assignment based on vendor firmware: 2g 0x4 label 5g 0x8004 label +4 lan 0x22 label +4 wan 0x28 label Signed-off-by: Zhijun You <hujy652@gmail.com> [rebased due to DTSI patch, minor commit message adjustments, fix label MAC address (lan->wan), do spi frequency increase separately] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for LB-Link BL-W1200Pawel Dembicki2020-05-092-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BL-W1200 Wireless Router is based on the MT7620A SoC. Specification: - MediaTek MT7620A (580 Mhz) - 64 MB of RAM - 8 MB of FLASH - 1x 802.11bgn radio - 1x 802.11ac radio (MT7612E) - 5x 10/100/1000 Mbps Ethernet (MT7530) - 2x external, non-detachable antennas (Wifi 2.4G/5G) - 1x USB 2.0 - UART (R2) on PCB (57600 8n1) - 9x LED (1 GPIO controlled), 1x button - u-Boot bootloader Known issues: - No status LED. Used WPS LED during boot/failsafe/sysupgrade. Installation: 1. Apply initramfs image via factory web-gui. 2. Install sysupgrade image. How to revert to OEM firmware: - sysupgrade -n -F stock_firmware.bin Reviewed-by: Sungbo Eo <mans0n@gorani.run> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
* ramips: add support for ipTIME A1004nsSungbo Eo2020-04-181-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | ipTIME A1004ns is a 2.4/5GHz band AC750 router, based on MediaTek MT7620A. Specifications: - SoC: MT7620A - RAM: DDR2 128MB - Flash: SPI NOR 16MB - WiFi: - 2.4GHz: SoC internal - 5GHz: MT7610EN - Ethernet: 5x 10/100/1000Mbps - Switch: MT7530BU - USB: 1x 2.0 - UART: - J2: 3.3V, TX, RX, GND (3.3V is the square pad) / 57600 8N1 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: 1. Perform sysupgrade with stock image. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: explicitly disable built-in switch when neededChuanhong Guo2020-04-121-18/+18
| | | | | | | | | | previously we rely on the failsafe setup in preinit scripts to disable built-in switch implicitly for single-port devices. This doesn't work anymore due to preinit script removal. this patch explicitly disable built-in switch for needed devices. Fixes: a8d62a4eb1 ("ramips: remove set_preinit_iface script") Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: refresh kernel config for 5.4Chuanhong Guo2020-04-121-36/+46
| | | | Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: copy kernel config for 5.4Chuanhong Guo2020-04-121-0/+236
| | | | Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: move and rename out-of-tree mtk eth driverChuanhong Guo2020-04-121-7/+7
| | | | | | | move the driver into shared 'files' directory and rename all symbols from mediatek/mtk to ralink. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>