aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
Commit message (Collapse)AuthorAgeFilesLines
* ramips: add support for Netgear WN3100RPv2Rodolphe de Saint Léger2022-03-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the Netgear WN3100RPv2 http://www.netgear.com/support/product/wn3100rpv2.aspx Specifications: - SoC: MediaTek MT7620A (580MHz, ramips) - RAM: 32MB DDR - Storage: 8MB NOR SPI flash - Wireless: builtin MT7620A, 2x2:2 with u.FL connectors - Ethernet: 1x100M - Stock firmware based on OpenWRT Kamikaze Like the EX2700, the bootloader expects a secondary image signature, see https://forum.openwrt.org/viewtopic.php?pid=312577#p312577 This device seems to be same hardware as a WN3000RPv3 Flash instructions: - Use the Netgear WebUI to upgrade to OpenWRT using the factory image (see note below), - Use the sysupgrade image for upgrading versions from OpenWRT, - TFTP recovery procedure can be used to flash the factory image (preferred method). Note: - The WebUI may not reboot automatically, wait at least 5 minutes before powercycling the device Flashing using TFTP: - Set you IP address to 192.168.1.10/24 (no gateway) - Connect your machine to the Ethernet port - Power off the device and wait for 10 seconds, - Hold the reset button and power on the device (do not release reset), - Hold the reset button until the green light is flashing (Approx. 15s) - launch tftp, set mode to binary and connect to 192.168.1.1 - put the factory firmware image - All leds will switch off (like a power off), this is normal - Wait for the device to reboot in the new OpenWRT image (max 5 mins) - The first boot will take longer than usual. - After boot, the Device IP on the ethernet port is 192.168.1.1 Signed-off-by: Rodolphe de Saint Léger <rdesaintleger@gmail.com> [drop unneeded includes in dts, wrap commit message] Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* Revert "ramips: add support for Netgear WN3000RPv3"Sungbo Eo2022-03-161-1/+0
| | | | | | | | | This reverts commit 7bc20cb6143e089fae6ad4b173fc42b55bdbecfe. It adds support for Netgear WN3100RPv2, but the commit title is wrong. It will be re-added with the correct title. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: add support for Netgear WN3000RPv3Rodolphe de Saint Léger2022-03-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the Netgear WN3100RPv2 http://www.netgear.com/support/product/wn3100rpv2.aspx Specifications: - SoC: MediaTek MT7620A (580MHz, ramips) - RAM: 32MB DDR - Storage: 8MB NOR SPI flash - Wireless: builtin MT7620A, 2x2:2 with u.FL connectors - Ethernet: 1x100M - Stock firmware based on OpenWRT Kamikaze Like the EX2700, the bootloader expects a secondary image signature, see https://forum.openwrt.org/viewtopic.php?pid=312577#p312577 This device seems to be same hardware as a WN3000RPv3 Flash instructions: - Use the Netgear WebUI to upgrade to OpenWRT using the factory image (see note below), - Use the sysupgrade image for upgrading versions from OpenWRT, - TFTP recovery procedure can be used to flash the factory image (preferred method). Note: - The WebUI may not reboot automatically, wait at least 5 minutes before powercycling the device Flashing using TFTP: - Set you IP address to 192.168.1.10/24 (no gateway) - Connect your machine to the Ethernet port - Power off the device and wait for 10 seconds, - Hold the reset button and power on the device (do not release reset), - Hold the reset button until the green light is flashing (Approx. 15s) - launch tftp, set mode to binary and connect to 192.168.1.1 - put the factory firmware image - All leds will switch off (like a power off), this is normal - Wait for the device to reboot in the new OpenWRT image (max 5 mins) - The first boot will take longer than usual. - After boot, the Device IP on the ethernet port is 192.168.1.1 Signed-off-by: Rodolphe de Saint Léger <rdesaintleger@gmail.com> [drop unneeded includes in dts, wrap commit message] Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: mt7620: Add support for D-Link DWR-961 A1Pawel Dembicki2022-03-161-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DWR-961 A1 Wireless Router is based on the MT7620A SoC. It's a merge of two Amit boards: DWR-960 with ethernet part of Lava LR-25G001. ROMID it's taken from Telenor branded version and it works with tested device. Images from D-Link site for this router are from DWR-953 and it have ROMID DLK6E2424001. I don't know if it's mistake on web-site or if it's will require different image. Specification: - MediaTek MT7620A (580 Mhz) - 128 MB of RAM - 16 MB of FLASH - 1x 802.11bgn radio - 1x 802.11ac radio (MT7612 mpcie card) - 5x 10/100/1000 Mbps Ethernet: 4xLAN and 1xWAN (QCA8337) - 2x internal, non-detachable antennas (Wifi 2.4G) - 3x external, detachable antennas (2x LTE, 1x Wifi 5G) - 1x LTE modem cat 6 - UART (J5) header on PCB (57600 8n1) - 13x LED, 2x button - JBOOT bootloader Installation: Apply factory image via http web-gui or JBOOT recovery page How to revert to OEM firmware: - push the reset button and turn on the power. Wait until LED start blinking (~10sec.) - upload original factory image via JBOOT http (IP: 192.168.123.254) Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
* ramips: add support for Wavlink WL-WN535K1Davide Fioravanti2022-01-301-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 HUMAX E2Kyoungkyu Park2022-01-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: add support for WeVO AIR DUOSungbo Eo2021-12-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: 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: mt7620: Enable PHY aneg of Lava LR-25G001Pawel Dembicki2021-12-041-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ramips: add support for Sitecom WLR-4100 v1 002Andrea Poletti2021-09-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: add support for DomyWifi DM202/DM203/DW22DShiji Yang2021-08-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: * SOC: MT7620A + MT7610E * ROM: 16 MiB spi flash (W25Q128FVSG) * RAM: 128 MiB DDR2 (W971GG6KB-25) * WAN: 10/100M *1 * LAN: 10/100M *4 * USB: Type-A USB2.0 *1 * SD: MicroSD *1 * Button: Reset *1 * Antennas: 2.4 GHz *2 + 5 GHz *1 * TTL Baudrate: 57600 * U-Boot Recovery: IP: 10.10.10.123, Server: 10.10.10.3 Installation: * Web UI Update 1. Open http://192.168.10.1/upgrade.html in the browser. 2. Rename firmware to a short name like firmware.bin and then upload it. 3. Fill in the password column with the following content: password | mtd -x mIp2osnRG3qZGdIlQPh1 -r write /tmp/firmware.bin firmware * TFTP + U-Boot 1. Connect device with a TTL cable. 2. Press "2" when booting to select "Load system code then write to Flash via TFTP". 3. Upload firmware by tftpd64, it will boot when write instruction is executed. Signed-off-by: Shiji Yang <yangshiji66@qq.com>
* ramips: add new flash layout support to Phicomm K2Shiji Yang2021-08-241-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Descriptions: Phicomm K2 (PSG1218) got a new "permanent_config" partition after update firmware to v22.5. This partition located in front of the firmware partition, same as The Phicomm K2P and K2G. Due to this change the new bootloader can't load previous firmware any more. This commit is aimed at add support for Phicomm K2 which official firmware version is 22.5.x or newer. For which runs old firmware version, just update OpenWrt that has a prefix of "k2-v22.4". For uniform naming, this commit also changed the model name PSG1218 to a more recognizable name K2, refer to Phicomm K2G, K2P K2T. OpenWrt selection table: official firmware version OpenWrt v22.4.x.x or older phicomm_k2-v22.4 v22.5.x.x or newer phicomm_k2-v22.5 Installation: Same as Phicomm K2G, K2P, PSG1208. a. TFTP + U-Boot b. Open telnet by some web page vulnerability (Search Baidu by key words "K2 telnet"), and then we can upload firmware image to /tmp and write it to firmware partition with mtd instruction. Signed-off-by: Shiji Yang <yangshiji66@qq.com> [rebase, add/harmonize version in model variables, fix version typo in commit message, wrap commit message properly] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* 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-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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-061-1/+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: 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: 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: use proper name for RAVPower RP-WD03Adrian Schmutzler2020-09-111-1/+1
| | | | | | | | 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-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: add support for Netgear JWNR2010 v5Shibajee Roy2020-08-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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: 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-261-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: 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-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: add support for D-Link DWR-960Pawel Dembicki2020-04-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DWR-960 Wireless Router is based on the MT7620A SoC. Specification: - MediaTek MT7620A (580 Mhz) - 128 MB of RAM - 16 MB of FLASH - 1x 802.11bgn radio - 1x 802.11ac radio (MT7610 mpcie card) - 4x 10/100 Mbps Ethernet (1 WAN and 3 LAN) - 1x 10/100/1000 Mbps Ethernet (1 LAN) (AR8035) - 2x internal, non-detachable antennas (Wifi 2.4G) - 3x external, detachable antennas (2x LTE, 1x Wifi 5G) - 1x LTE modem - UART (J4) header on PCB (57600 8n1) - 9x LED, 2x button - JBOOT bootloader Known issues: - Flash is extremely slow. Installation: Apply factory image via http web-gui or JBOOT recovery page How to revert to OEM firmware: - push the reset button and turn on the power. Wait until LED start blinking (~10sec.) - upload original factory image via JBOOT http (IP: 192.168.123.254) Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
* ramips: add support for TP-Link RE210 v1Christoph Krapp2020-03-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- SoC: MediaTek MT7620A RAM: 64MB FLASH: 8MB SPI WLAN: 2G: MediaTek MT7620A 5G: MediaTek MT7610EN ETH: 1x 10/100/1000M (Atheros AR8035) LED: RSSI (orange/green) WiFi 2G (green) WiFi 5G (green) Power (green) System (red / green) BTN: Power Reset LED WPS Serial ------ P1 - Tx P2 - Rx P3 - GND P4 - VCC Pin 4 is the one closest to the LAN port. MAC overview ------------ WAN *:4c uboot 0x1fc00 2.4 *:4c uboot 0x1fc00 5 *:4e uboot 0x1fc00 +2 Installation ------------ Web interface: It is possible to upgrade to OpenWrt via the web interface. However, the OEM firmware upgrade file is required and a tool to fix the MD5 sum of the header. This procedure overwrites U-Boot and there is not failsafe / recovery mode present! To prepare an image, you need to take the header and U-Boot (i.e. 0x200 + 0x20000 bytes) from an OEM firmware file and attach the factory image to it. Then fix the header MD5Sum1. Serial/TFTP: You can use initramfs for booting via RAM or flash the image directly. Additional Notes: If the web interface upgrade fails, you have to open your device and attach serial console. Since the web upgrade overwrites the boot loader, you might also brick your device. In order to flash back to stock, the first header and U-Boot needs to be stripped from the original firmware. Signed-off-by: Christoph Krapp <achterin@googlemail.com> [change rssi LED labels] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for TP-Link RE200 v1Andreas Böhler2019-12-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link RE200 v1 is a wireless range extender with Ethernet and 2.4G and 5G WiFi with internal antennas. It's based on MediaTek MT7620A+MT7610EN. Specifications -------------- - MediaTek MT7620A (580 Mhz) - 64 MB of RAM - 8 MB of FLASH - 2T2R 2.4 GHz and 1T1R 5 GHz - 1x 10/100 Mbps Ethernet - UART header on PCB (57600 8n1) - 8x LED (GPIO-controlled; only 6 supported), 2x button There are 2.4G and 5G LEDs in red and green which are controlled separately. The 5G LED is currently not supported, since the GPIOs couldn't be determined. Installation ------------ Web Interface ------------- It is possible to upgrade to OpenWrt via the web interface. However, the OEM firmware upgrade file is required and a tool to fix the MD5 sum of the header. This procedure overwrites U-Boot and there is not failsafe / recovery mode present! To prepare an image, you need to take the header and U-Boot (i.e. 0x200 + 0x20000 bytes) from an OEM firmware file and attach the factory image to it. Then fix the header MD5Sum1. Serial console -------------- Opening the case is quite hard, since it is welded together. Rename the OpenWrt factory image to "test.bin", then plug in the device and quickly press "2" to enter flash mode (no line feed). Follow the prompts until OpenWrt is installed. Unfortunately, this devices does not offer a recovery mode or a tftp installation method. If the web interface upgrade fails, you have to open your device and attach serial console. Since the web upgrade overwrites the boot loader, you might also brick your device. Additional notes ---------------- MAC address assignment is based on stock-firmware. For me, the device assigns the MAC on the label to Ethernet and the 2.4G WiFi, while the 5G WiFi has a separate MAC with +2. *:88 Ethernet/2.4G label, uboot 0x1fc00, userconfig 0x0158 *:89 unused userconfig 0x0160 *:8A 5G not present in flash This seems to be the first ramips device with a TP-Link v1 header. The original firmware has the string "EU" embedded, there might be some region- checking going on during the firmware upgrade process. The original firmware also contains U-Boot and thus overwrites the boot loader during upgrade. In order to flash back to stock, the first header and U-Boot need to be stripped from the original firmware. Signed-off-by: Andreas Böhler <dev@aboehler.at>
* ramips: add support for ipTIME A104nsSungbo Eo2019-12-171-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ipTIME A104ns is a 2.4/5GHz band AC750 router, based on MediaTek MT7620A. Specifications: - SoC: MT7620A - RAM: DDR2 64MB - Flash: SPI NOR 8MB - WiFi: - 2.4GHz: SoC internal - 5GHz: MT7610EN - Ethernet: 5x 10/100Mbps - Switch: SoC internal - 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. In contrast to to-be-supported A1004ns, the A104ns has no usable value in 0x1fc40 (uboot), so wan_mac needs to be calculated. Also note that GPIOs for the LEDs really are inverted compared to the A1004ns. Signed-off-by: Sungbo Eo <mans0n@gorani.run> [moved state_default to device DTS, reordered properties in wmac, added comment about wan_mac and LED GPIOs] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: mt7620: use flash location for wan_mac in 02_networkAdrian Schmutzler2019-12-121-12/+16
| | | | | | | | | | | This uses the flash locations instead of eth0 MAC address to calculate MAC address increments for WAN. The change will make the MAC address setup of a particular device more obvious and removes the dependency of 02_network on the eth0 initialization. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: remove wan_mac setup for evaluation boardsAdrian Schmutzler2019-12-121-4/+0
| | | | | | | | The evaluation boards do not set up a MAC address for eth0 in the first place, so it does not make sense to calculate a WAN address from the random MAC used there. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix switch port order for TP-Link Archer C20iWalter Sonius2019-12-081-1/+1
| | | | | | | | | | | | | | | | | | Physical port order watched from the backside of the C20i (from left to right) is: Internet / 1 / 2 / 3 / 4 Physical Port Switch port WAN 0 LAN 3 1 LAN 4 2 LAN 1 3 LAN 2 4 (not used) 5 CPU 6 Signed-off-by: Walter Sonius <walterav1984@gmail.com> [commit message/title improvements] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for ALFA Network R36M-E4GPiotr Dymacz2019-11-131-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ALFA Network R36M-E4G is a dual-SIM, N300 Wi-Fi, compact size platform based on MediaTek MT7620A WiSoC. This product is designed for operation with 4G modem (can be bought in bundle with Quectel EC25, EG25 or EP06) but supports also Wi-Fi modules (miniPCIe slot has USB and PCIe buses). Specification: - MT7620A (580 MHz) - 64/128/256 MB of RAM (DDR2) - 16/32+ MB of FLASH (SPI NOR) - 2x 10/100 Mbps Ethernet, with passive PoE support (24 V) - 2T2R 2.4 GHz (MT7620A), with ext. LNA (RFFM4227) - 1x miniPCIe slot (with PCIe and USB 2.0 buses and optional 5 V) - 2x SIM slot (mini, micro) with detect and switch driven by GPIO - 2x u.fl antenna connectors (for Wi-Fi) - 8x LED (7 driven by GPIO) - 2x button (reset, wifi) - 2x UART (4-pin/2.54 mm pitch, 10-pin/1.27 mm pitch) headers on PCB - 1x I2C (4-pin, 1.27 mm pitch) header on PCB - 1x LED (8-pin, 1.27 mm pitch) header on PCB - 1x DC jack with lock (12 V) Other: - there is a dedicated, 4-pin connector for optional RTC module (Holtek HT138x) with 'enable' input, not available at the time of preparing support for this board - miniPCIe slot supports additional 5 V supply on pins 47 and 49 but a jumper resistor (R174) is not installed by default - U-Boot selects default SIM slot, based on value of 'default_sim' env variable: '1' or unset -> SIM1 (mini), '2' -> SIM2 (micro). This will work only if both slots are occupied, otherwise U-Boot will always select slot with SIM card inside (user can override it later, in user-space) - U-Boot resets the modem, using PERSTn signal, before starting kernel - this board supports 'dual image' feature (controlled by 'dual_image' U-Boot environment variable) Flash instruction: You can use the 'sysupgrade' image directly in vendor firmware which is based on OpenWrt (make sure to not preserve settings - use 'sysupgrade -n -F ...' command). Alternatively, use web recovery mode in U-Boot: 1. Power the device with reset button pressed, the modem LED will start blinking slowly and after ~3 seconds, when it starts blinking faster, you can release the button. 2. Setup static IP 192.168.1.2/24 on your PC. 3. Go to 192.168.1.1 in browser and upload 'sysupgrade' image. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ramips: read label MAC address from flash instead of using phy0/phy1Adrian Schmutzler2019-11-131-3/+3
| | | | | | | | This replaces all uses of $(cat /sys/class/ieee80211/phyX/macaddress) by retrieval from the proper flash locations. This will make 02_network independent of WiFi setup again. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for Netgear EX6130Frederik Noe-Sdun2019-11-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: * SoC: MT7620A * RAM: 64 MB DDR * Flash: 8MB NOR SPI flash * WiFi: MT7612E (5Ghz) and builtin MT7620A (2.4GHz) * LAN: 1x100M The -factory images can be flashed from the device's web interface or via nmrpflash. The device seems to use base PCB as EX3700/EX3800, but supporting AC1200 using MT7612E. MAC adresses: 5.0 GHz 0x8004 *:9a 2.4 GHz 0x4 *:9b lan 0x28 *:9b wan 0x2e *:9c Since this is a one-port device, although wan MAC address is set in flash, it is not used in OpenWrt setup. Signed-off-by: Frederik Noe-Sdun <Frederik.Sdun@googlemail.com> [rebased, extended commit message, tiny DTS style fixes] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: remove default case for MAC address assignmentAdrian Schmutzler2019-11-061-8/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far, MAC address assignment in ramips has contained a default case, which defined wan_mac = eth0 + 1 for _every_ device not having an explicit case there. This is not desirable, as many device supporters will just not care or know about this definition, so another MAC address will be introduced by accident. In some cases the wan_mac is assigned although it is not needed, in other cases even addresses not dedicated to the device will be used (e.g. wan_mac actually is eth0 - 1, but during support nobody cared, so eth0 + 1 is used now, which might actually belong to another device ...). Thus, in this PR the former default case is converted to an explicit case. This one comprises all devices not being accounted for by other cases, reduced by those not having wan at all. The big number of entries for this node might be another indication that many of them wouldn't actually be there if there hadn't been default wan_mac setup. In exchange, the current "do nothing" case can be removed, as it will be the new default case. The devices being put in the newly created explicit case were determined as follows: 1. Create a list of all devices based on the DTS files. 2. Remove all devices already having an explicit entry setting their address. 3. Remove all devices that only have lan set up in the first part of 02_network: mt7620: - alfa-network,tube-e4g - asus,rp-n53 - buffalo,wmr-300 - comfast,cf-wr800n - edimax,ew-7476rpc - edimax,ew-7478ac - elecom,wrh-300cr - hnet,c108 - kimax,u25awf-h1 - kimax,u35wf - kingston,mlw221 - kingston,mlwg2 - microduino,microwrt - netgear,ex2700 - netgear,ex3700 - netgear,wn3000rp-v3 - planex,cs-qr10 - planex,mzk-ex300np - planex,mzk-ex750np - ravpower,wd03 - sercomm,na930 - yukai,bocco - zbtlink,zbt-cpe102 - zte,q7 mt7621: - gnubee,gb-pc1 - gnubee,gb-pc2 - linksys,re6500 - mikrotik,rbm11g - netgear,ex6150 - thunder,timecloud - tplink,re350-v1 - tplink,re650-v1 mt76x8: - alfa-network,awusfree1 - d-team,pbr-d1 - glinet,vixmini - vocore,vocore2-lite - tama,w06 - tplink,tl-mr3020-v3 - tplink,tl-wa801nd-v5 - tplink,tl-wr802n-v4 - tplink,tl-wr902ac-v3 - vocore,vocore2 - widora,neo-16m - widora,neo-32m rt288x: - buffalo,wli-tx4-ag300n - dlink,dap-1522-a1 rt305x: - allnet,all0256n-4m - allnet,all0256n-8m - allnet,all5002 - allnet,all5003 - alphanetworks,asl26555-16m - alphanetworks,asl26555-8m - asus,wl-330n - aximcom,mr-102n - dlink,dcs-930 - easyacc,wizard-8800 - hame,mpr-a2 - hootoo,ht-tm02 - huawei,d105 - intenso,memory2move - planex,mzk-dp150n - rt305x dlink,dcs-930l-b1 - sparklan,wcr-150gn - tenda,3g150b - tenda,3g300m - tenda,w150m - trendnet,tew-638apb-v2 - unbranded,a5-v11 - vocore,vocore-16m - vocore,vocore-8m - wansview,ncs601w - zorlik,zl5900v2 rt3883: - loewe,wmdr-143n - omnima,hpm 4. Put the remaining devices in the new case. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for ZBT WE1026-HKristian Evensen2019-11-031-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the ZBT WE1026-H, an outdoor AP with support for adding an internal LTE modem. The detailed specs are: * CPU: MT7620A * 2x 10/100Mbps Ethernet (LAN port has passive PoE support). * 16/32 MB Flash. * 128/256 MB RAM. * 1x USB 2.0 port. * 1x mini-PCIe slot (only USB2.0 bus). * 1x SIM slot (standard size). * 1x 2.4Ghz WIFI (rt2800). * 1x button. * 6x LEDS (4 GPIO-controlled). * 1x micro-SD reader. The following have been tested and working: - Ethernet switch - Wifi - Mini-PCIe slot + SIM slot - USB port - microSD slot - sysupgrade - reset button Installation and recovery: In order to install OpenWRT the first time or ito recover the router, you can use the web-based recovery system. Keep the reset button pressed during boot and access 192.168.1.1 in your browser when your machine obtains an IP address. Upload the firmware to start the recovery process. Notes: * When binding the USB LED to a usbport, the LED is switched on all the time due to the presence of an internal hub. Thus, it does not really signal any USB-information. * I only have the 32MB version and have only added support for this device. However, the files are structured so that adding support for the 16MB version should be easy. * Only the LAN port is accessible from the outside of the casing and LEDs are not visible. Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com> [rebased onto base-files split, minor style fixes, removed use of USB led as power LED] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: update ZBT WE1026 DTS-filesKristian Evensen2019-11-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | This commit makes the following changes to the WE1026 DTS-files: * The parts that are unique to the -5G-version (LED and 5GHz wifi) are moved to a separate file, so that WE1026.dtsi can be referenced also by the DTS for the -H version. * Use the generic "flash"-name for the spi-nor node. * Add label MAC. All changes have been tested on the WE1026-5G-16M and work fine. I.e., the device works as before the DTS-changes. Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com> Acked-by: Mathias Kresin <dev@kresin.me> Acked-by: Alex Maclean <monkeh@monkeh.net> Acked-by: INAGAKI Hiroshi <musashino.open@gmail.com> Acked-by: Petr Štetiar <ynezz@true.cz> [minor style fixes, rebased onto base-files split, remove obsolete gpio-keys comment] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix Xiaomi MiWiFi Mini switch definitionChih-Wei Chen2019-11-031-2/+2
| | | | | | | | | | | | | | | | | | | | | Based on OpenWRT Table of Hardware > Xiaomi > Xiaomi Mi WiFi Mini Switch Ports Defaults: 0, 1: LAN 4: WAN 6: CPU Port in Web GUI (word printed on bottom of case) WAN(Internet) map to switch port 4 LAN1(.) map to switch port 1 LAN2(..) map to switch port 0 CPU map to switch port 6 current setting is 1 WAN/ 4 LAN port, fix it. Signed-off-by: Chih-Wei Chen <changeway@gmail.com> [rebased after base-files split, fixed commit title] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>