aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/dts
Commit message (Collapse)AuthorAgeFilesLines
* ramips: add support for Ubiquiti UniFi nanoHDDavid Bauer2020-03-101-0/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- SoC: MediaTek MT7621AT WiFi: MediaTek MT7603 bgn 2T2R MediaTek MT7615 ac 4T4R Flash: 32M SPI (Macronix MX25L25635F) RAM: 128M DDR3 (Winbond W631GG6KB) LED: Dome (Blue / White) BTN: Reset Installation ------------ These instructions were written for firmware version v3.9.27. Downgrade if necessary. 1. Copy the OpenWrt sysupgrade image to the devices /tmp folder via scp. On factory defaults, user and password is "ubnt" at 192.168.1.20/24. 2. Write the bootselect flag. Otherwise, the device might boot from the wrong partition. Verify the mtd partition used in the command below is the one labled "bs" in /proc/mtd (as this might change in the future). > dd if=/dev/zero bs=1 count=1 of=/dev/mtd4 3. Write the OpenWrt sysupgrade to the mtd partitions labled "kernel0" and "kernel1". > dd if=/tmp/openwrt-sysupgrade.bin of=/dev/mtdblock6 > dd if=/tmp/openwrt-sysupgrade.bin of=/dev/mtdblock7 4. Reboot or powercycle the device. Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: add support for TP-Link RE210 v1Christoph Krapp2020-03-093-88/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: increase spi-max-frequency to 50 MHz for D-Link DIR-810LAdrian Schmutzler2020-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Read times drop when increasing frequency to 25 MHz and 50 MHz, but not in between or for further increase. So, use 50 MHz as the lowest frequency with the fastest speed. Test results (thanks to Roger): The device reports a mx25l6405d flash chip. I tried all the maximum values in the devices' datasheet (Table 10. AC CHARACTERISTICS). All of them worked with and without "m25p,fast-read": > 10 MHz root@OpenWrt:~# time cat /dev/mtd* > /dev/null real 1m 33.00s user 0m 0.01s sys 1m 7.56s > 25 MHz root@OpenWrt:~# time cat /dev/mtd* > /dev/null real 0m 34.42s user 0m 0.02s sys 0m 23.58s > 25 MHz, fast read root@OpenWrt:~# time cat /dev/mtd* > /dev/null real 0m 34.45s user 0m 0.02s sys 0m 23.59s > 33 MHz root@OpenWrt:~# time cat /dev/mtd* > /dev/null real 0m 34.39s user 0m 0.00s sys 0m 23.60s > 33 MHz, fast read root@OpenWrt:~# time cat /dev/mtd* > /dev/null real 0m 34.46s user 0m 0.01s sys 0m 23.62s > 50 MHz root@OpenWrt:~# time cat /dev/mtd* > /dev/null real 0m 26.81s user 0m 0.01s sys 0m 18.25s > 50 MHz, fast read root@OpenWrt:~# time cat /dev/mtd* > /dev/null real 0m 26.84s user 0m 0.00s sys 0m 18.25s > 66 MHz root@OpenWrt:~# time cat /dev/mtd* > /dev/null real 0m 26.80s user 0m 0.01s sys 0m 18.23s > 66 MHz, fast read root@OpenWrt:~# time cat /dev/mtd* > /dev/null real 0m 26.80s user 0m 0.02s sys 0m 18.23s > 86 MHz root@OpenWrt:~# time cat /dev/mtd* > /dev/null real 0m 26.84s user 0m 0.01s sys 0m 18.24s > 86 MHz, fast read root@OpenWrt:~# time cat /dev/mtd* > /dev/null real 0m 26.80s user 0m 0.02s sys 0m 18.23s Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
* ramips: fix and tidy up DTS for D-Link DIR-810LAdrian Schmutzler2020-03-051-8/+10
| | | | | | | | | | | | | This patch addresses several issues for D-Link DIR-810L: - add correct button codes - harmonize button node names - use generic flash@0 - remove unused pin groups from state_default - improve sorting of properties Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
* ramips: fix partition offset for D-Link DIR-810LAdrian Schmutzler2020-03-051-2/+2
| | | | | | | | | | | | | | The Jffs2 partition for the D-Link DIR-810L is currently off by 0x10000. Apply the correct offset based on the other partitions' size/offset and the information about stock OS from the Wiki. This is just based on the named information and _not_ verified on device. Fixes: 36e3424fa520 ("ramips: add support for dir810l and asus rp-n53") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
* ramips: add support for NETGEAR R6700v2/AC2400Adrian Schmutzler2020-03-041-0/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SoC: MediaTek MT7621AT RAM: 256M DDR3 FLASH: 128M NAND WiFi: MediaTek MT7615N an+ac MediaTek MT7615N bgn ETH: MediaTek MT7621AT BTN: 1x Connect (WPS), 1x WLAN, 1x Reset LED: Power (white/amber), WAN(white/amber), 2.4G(white), 5G(white), USB(white) , GuestWifi(white) 4x LAN(white/amber), Wifi Button(white), WPS Button(white) Installation: Login to netgear webinterface and flash factory.img Based on a discontinued GitHub Pull Request by kuyokushin <codenamezero@protonmail.com> https://github.com/openwrt/openwrt/pull/2545 NOTE: Netgear R6700 v2 have five clones: R6900 v2, R7450, Nighthawk AC2400, Nighthawk AC2100 and already added R6800. Rest of them should be really easy supportable. Image for R6700v2 should work perfectly with them. Please refer: https://github.com/openwrt/openwrt/pull/2614 Tested-by: Víctor Gibrán <victorgibranmz@hotmail.com> [R6700v2] Tested-by: John Landrum <jl31m10@yahoo.com> [AC2400] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> [add guest led to mt7621_netgear_r6700-v2.dts end edit commit message] Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
* ramips: mt7621: add support for Netgear R6800Pawel Dembicki2020-03-042-0/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the Netgear R6800, aka Netgear AC1900 and R6800-100PES. Specification: - SoC: MediaTek MT7621AT (880 MHz) - Flash: 128 MiB NAND - RAM: 256 MiB - Wireless: MediaTek MT7615EN b/g/n , MediaTek MT7615EN an+ac - LAN speed: 10/100/1000 - LAN ports: 4 - WAN speed: 10/100/1000 - WAN ports: 1 - USB 2.0 - USB 3.0 - Serial baud rate of Bootloader and factory firmware: 57600 Known issues: - Device has 3 wifi LEDs: Wifi 5Ghz, Wifi 2.4Ghz and Wifi on/off. Wifi on/off is not used. Installation: - apply factory image via stock web-gui. Back to stock: - nmrpflash can be used to recover to the stock Netgear firmware. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
* ramips: move includes to DTSI for mt7628an_tplink_8m*Adrian Schmutzler2020-02-2213-33/+6
| | | | | | | | | | All devices inherited from mt7628an_tplink_8m.dtsi and mt7628an_tplink_8m-split-uboot.dtsi contain the same additional includes in the DTS files. Move them to the DTSI files instead. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: move compatible for Ubiquiti Edgerouter X to DTS fileAdrian Schmutzler2020-02-222-2/+1
| | | | | | | | | | | | So far, the compatible for the Ubiquiti Edgerouter X has been defined in the DTSI file and inherited for the edgerouterx.dts, but overwritten for the edgerouterx-sfp.dts. In contrast, the model was stored in the DTS file in both cases. To resolve this somewhat confusing situation, move the compatible with the device name for edgerouterx to the DTS file as well. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: remove redundant includes in DTS filesAdrian Schmutzler2020-02-227-15/+2
| | | | | | | | | | Many DTS files contain the same includes again that are already present in the DTSI files they are derived from. Remove those redundant includes in the DTS files. For vocore, the include is moved to the parent DTSI file. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix HiWiFi HC5761A USB portDENG Qingfang2020-02-211-1/+12
| | | | | | Export GPIO 41 to power USB port Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
* ramips: fix device name of netis WF-2881 to WF2881Sungbo Eo2020-02-071-4/+4
| | | | | | | | | | | The correct model name of WF-2881 is WF2881 without hyphen. The former used boardnames are not added to SUPPORTED_DEVICES, to make it explicit that the sysupgrade-tar image, which is newly added in the previous commit, should not be used to upgrade from older version. Signed-off-by: Sungbo Eo <mans0n@gorani.run> [adjust commit title] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: use nand_do_upgrade for netis WF-2881Sungbo Eo2020-02-071-1/+14
| | | | | | | | | | WF-2881 sysupgrade image uses UBI rootfs, but still relies on default_do_upgrade. Because of this, config backup is not restored after sysupgrade. It can be fixed by switching to nand_do_upgrade and sysupgrade-tar image. default_do_upgrade does not handle sysupgrade-tar properly, so one should use factory image to upgrade from older version. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: add support for I-O DATA WN-AX1167GR2INAGAKI Hiroshi2020-02-051-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I-O DATA WN-AX1167GR2 is a 2.4/5 GHz band 11ac router, based on MediaTek MT7621A. Specification: - SoC : MediaTek MT7621A - RAM : DDR3 128 MiB - Flash : NAND 128 MiB - WLAN : MediaTek MT7615D (2.4/5 GHz, 2T2R) - Ethernet : 5x 10/100/1000 Mbps - Switch : MediaTek MT7621A (MT7530) - LEDs/Input : 2x/3x (2x buttons, 1x slide-switch) - UART : through-hole on PCB - J5: Vcc, TX, RX, NC, GND - 57600 bps Flash instruction using initramfs image: 1. Boot WN-AX1167GR2 normally 2. Access to "http://192.168.0.1/" and open firmware update page ("ファームウェア") 3. Select the OpenWrt initramfs image and click update ("更新") button to perform firmware update 4. On the initramfs image, perform sysupgrade with squashfs-sysupgrade image 5. Wait ~120 seconds to complete flashing Notes: - configuration in DeviceTree of DBDC (Dual-Band-Dual-Concurrent) mode for MT7615D chip is not supported in mt76 driver - last 0x80000 (512 KiB) in NAND flash is not used on stock firmware - stock firmware requires "customized uImage header" by MSTC (MitraStar Technology Corp.), but U-Boot doesn't - uImage magic (0x0 - 0x3) : 0x434F4D42 (COMB) - header crc32 (0x4 - 0x7) : with data length and data crc32 - image name (0x20 - 0x37) : model ID and firmware versions - data length (0x38 - 0x3b): kernel + rootfs - data crc32 (0x3c - 0x3f) : kernel + rootfs Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> Reviewed-by: Sungbo Eo <mans0n@gorani.run>
* ramips: add support for I-O DATA WN-DX1167RINAGAKI Hiroshi2020-02-052-0/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I-O DATA WN-DX1167R is a 2.4/5 GHz band 11ac rotuer, based on MediaTek MT7621A. Specification: - SoC : MediaTek MT7621A - RAM : DDR3 128 MiB - Flash : NAND 128 MiB - WLAN : MediaTek MT7615D (2.4/5 GHz, 2T2R) - Ethernet : 5x 10/100/1000 Mbps - Switch : MediaTek MT7621A (MT7530) - LEDs/Input : 2x/3x (2x buttons, 1x slide-switch) - UART : through-hole on PCB - J5: Vcc, TX, RX, NC, GND - 57600 bps Flash instruction using initramfs image: 1. Boot WN-DX1167R normally 2. Access to "http://192.168.0.1/" and open firmware update page ("ファームウェア") 3. Select the OpenWrt initramfs image and click update ("更新") button to perform firmware update 4. On the initramfs image, perform sysupgrade with squashfs-sysupgrade image 5. Wait ~120 seconds to complete flashing Notes: - configuration in DeviceTree of DBDC (Dual-Band-Dual-Concurrent) mode for MT7615D chip is not supported in mt76 driver - last 0x80000 (512 KiB) in NAND flash is not used on stock firmware - stock firmware requires "customized uImage header" by MSTC (MitraStar Technology Corp.), but U-Boot doesn't - uImage magic (0x0 - 0x3) : 0x434F4D43 (COMC) - header crc32 (0x4 - 0x7) : with data length and data crc32 - image name (0x20 - 0x37) : model ID and firmware versions - data length (0x38 - 0x3b): kernel + rootfs - data crc32 (0x3c - 0x3f) : kernel + rootfs Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> Reviewed-by: Sungbo Eo <mans0n@gorani.run>
* ramips: remove unnecessary execute permission bitSungbo Eo2020-02-041-0/+0
| | | | | | | | dts file does not need to be executable. 644 is enough. Fixes: f098c612b6db ("ramips: create shared DTSI for Netgear EX2700 and WN3000RP v3") Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: add support for TP-Link RE200 v2Andreas Böhler2020-02-012-0/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link RE200 v2 is a wireless range extender with Ethernet and 2.4G and 5G WiFi with internal antennas. It's based on MediaTek MT7628AN+MT7610EN. Specifications -------------- - MediaTek MT7628AN (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), 2x button There are 2.4G and 5G LEDs in red and green which are controlled separately. MAC addresses ------------- The MAC address assignment matches stock firmware, i.e.: LAN : *:0D 2.4G: *:0E 5G : *:0F Installation ------------ Web Interface ------------- It is possible to upgrade to OpenWrt via the web interface. Simply flash the -factory.bin from OEM. In contrast to a stock firmware, this will not overwrite U-Boot. 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. Additonal notes --------------- It is possible to flash back to stock by using tplink-safeloader to create a sysupgrade image based on a stock update. After the first boot, it is necessary upgrade to another stock image, otherwise subsequent boots fail with LZMA ERROR 1 and you have to attach serial to recover the device. Signed-off-by: Andreas Böhler <dev@aboehler.at> [remove DEVICE_VARS change] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: use tpt DTS trigger for TP-Link TL-MR3020 v3 and TL-WA801ND v5Jan Alexander2020-01-302-0/+2
| | | | | | | | | | | | | | This converts the TP-Link TL-MR3020v3 board to use the WLAN throughput LED trigger in order to react to all VAPs. It also moves the WLAN trigger config of the TP-Link TL-WA801NDv5 to the DTS and merges the now identical LAN LED configs. Verified these changes on a TL-MR3020v3. Signed-off-by: Jan Alexander <jan@nalx.net> [changed commit title and extended commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* Revert "ramips: fix NETGEAR R6260 EEPROM offset"David Bauer2020-01-304-26/+4
| | | | | | | | | | | | | This reverts commit 4716c843d62a5a4c37e7886f54bcf446aa26e786. Netgear seems to use different partition layouts on the R6260, which would require us to dynamically detect the position of (at least) the factory partition. Revert this fix to avoid breaking existing installations until a better solution has been worked out. Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: fix NETGEAR R6260 EEPROM offsetDavid Bauer2020-01-294-4/+26
| | | | | | | | | | The EEPROM offset for the NETGEAR R6260 is incorrect, thus no valid calibration data is used. Fix this only for the NETGEAR R6260, as it's currently unknown whether or not other boards are affected. Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: add support for GL.iNet microuter-N300David Bauer2020-01-293-91/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GL.iNet microuter-N300 (internally referred as MT300N-v4) is a pocket-size travel router. It is essentially identical to the VIXMINI (internally referred as MT300N-v3) but with double the RAM and SPI-flash. Additionally, set the label-mac for both the VIXMINI as well as the microuter-N300. Hardware -------- SoC: MediaTek MT7628NN RAM: 128M DDR2 FLASH: 16M LED: Power - WLAN BTN: Reset UART: 115200 8N1 TX and RX are labled on the board as pads next to the SoC Installation via web-interface ------------------------------ 1. Visit the web-interface at 192.168.8.1 Note: The ethernet port is by default WAN. So you need to connect to the router via WiFi 2. Navigate to the Update tab on the left side. 3. Select "Local Update" 4. Upload the OpenWrt sysupgrade image. Note: Make sure you select not to preserve the configuration. Installation via U-Boot ----------------------- 1. Hold down the reset button while powering on the device. Wait for the LED to flash 5 times. 2. Assign yourself a static IPv4 in 192.168.1.0/24 3. Upload the OpenWrt sysupgrade image at 192.168.1.1. Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: add support for TP-Link RE305 v1Steffen Förster2020-01-181-0/+150
| | | | | | | | | | | | | | | | | | | | | | Specification: SoC: MediaTek MT7628AN RAM: 64MiB Flash: 8MiB Wifi: - 2.4GHz: MT7628AN - 5GHz: MT7612EN LAN: 1x 10/100 Mbps Flash instructions: Flash factory image through stock firmware WEB UI. Back to stock is possible by using TFTP and stripping down the Firmware provided by TP-Link to a initramfs. The flash space between 0x650000 and 0x7f0000 is blank in the stock firmware so I left it out as well. Signed-off-by: Steffen Förster <nemesis@chemnitz.freifunk.net>
* ramips: rt305x: remove unnecessary mediatek,portmapSungbo Eo2020-01-182-2/+0
| | | | | | | | | "#mediatek,portmap" is not a valid property name. If mediatek,portmap equals 0x0, then the esw driver ditches it and uses the default value, 0x3f. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: mt76x8: fix bogus mediatek,portmapSungbo Eo2020-01-1818-14/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | mt76x8 uses esw_rt3050 driver, which does not accept mediatek,portmap with string values. Convert the strings to integers to make it work. According to its switch setup, WRTnode 2P/2R have a WAN port at port 0, so the correct value should be 0x3e. tplink_8m.dtsi uses "llllw", but it does not match switch setups of any device using the DTSI. Remove it from the DTSI and add correct value to DTS for each device. These devices have a WAN port at port 0. Set the value to 0x3e. - tplink,archer-c20-v4 - tplink,archer-c50-v3 - tplink,tl-mr3420-v5 - tplink,tl-wr840n-v4 - tplink,tl-wr841n-v13 - tplink,tl-wr842n-v5 These devices have only one ethernet port. They don't need portmap setting. - tplink,tl-wa801nd-v5 - tplink,tl-wr802n-v4 - tplink,tl-wr902ac-v3 Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: mt7620/mt7621: remove invalid mediatek,portmapSungbo Eo2020-01-183-5/+3
| | | | | | | | | | mt7620 and mt7621 use mt7530 driver, which only accepts "llllw", "wllll", and "lwlll" values. According to its switch setup, Mi Router 3G v2 has a WAN port at port 4, so the correct value should be "llllw". Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: fix wps leds/btn for TP-Link TL-WA801ND v5Jan Alexander2020-01-171-4/+16
| | | | | | | | | | - fix color and active mode for existing wps led - add green wps led - add wps button Signed-off-by: Jan Alexander <jan@nalx.net> [wrap line] Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: fix HiWiFi HC5962 status LEDDENG Qingfang2020-01-161-3/+4
| | | | | | | | | Match LED behavior to stock firmware: Red: booting White: running Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
* ramips: add support for TP-Link Archer C20 v5Maxim Anisimov2020-01-091-0/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link Archer C20 v5 is a router with 5-port FE switch and non-detachable antennas. It's based on MediaTek MT7628N+MT7610EN. Specification: - MediaTek MT7628N/N (580 Mhz) - 64 MB of RAM - 8 MB of FLASH - 2T2R 2.4 GHz and 1T1R 5 GHz - 5x 10/100 Mbps Ethernet - 3x external, non-detachable antennas - UART (J1) header on PCB (115200 8n1) - 7x LED (GPIO-controlled*), 2x button, power input switch * WAN LED in this devices is a dual-color, dual-leads type which isn't (fully) supported by gpio-leds driver. This type of LED requires both GPIOs state change at the same time to select color or turn it off. For now, we support/use only the green part of the LED. Create Factory image -------------------- As all installation methods require a U-Boot to be integrated into the Image (and we do not ship one with the image) we are not able to create an image in the OpenWRT build-process. Download a TP-Link image from their Website and a OpenWRT sysupgrade image for the device and build yourself a factory image like following: TP-Link image: tpl.bin OpenWRT sysupgrade image: owrt.bin > dd if=tpl.bin of=boot.bin bs=131584 count=1 > cat owrt.bin >> boot.bin Installing via Web-UI --------------------- Upload the boot.bin via TP-Links firmware upgrade tool in the web-interface. Installing via Recovery ----------------------- Activate Web-Recovery by beginning the upgrade Process with a Firmware-Image from TP-Link. After starting the Firmware Upgrade, wait ~3 seconds (When update status is switching to 0%), then disconnect the power supply from the device. Upgrade flag (which activates Web-Recovery) is written before the OS-image is touched and removed after write is succesfull, so this procedure should be safe. Plug the power back in. It will come up in Recovery-Mode on 192.168.0.1. When active, all LEDs but the WPS LED are off. Remeber to assign yourself a static IP-address as DHCP is not active in this mode. The boot.bin can now be uploaded and flashed using the web-recovery. Installing via TFTP ------------------- Prepare an image like following (Filenames from factory image steps apply here) > dd if=/dev/zero of=tp_recovery.bin bs=196608 count=1 > dd if=tpl.bin of=tmp.bin bs=131584 count=1 > dd if=tmp.bin of=boot.bin bs=512 skip=1 > cat boot.bin >> tp_recovery.bin > cat owrt.bin >> tp_recovery.bin Place tp_recovery.bin in root directory of TFTP server and listen on 192.168.0.66/24. Connect router LAN ports with your computer and power up the router while pressing the reset button. The router will download the image via tftp and after ~1 Minute reboot into OpenWRT. U-Boot CLI ---------- U-Boot CLI can be activated by holding down '4' on bootup. Dual U-Boot ----------- This is TP-Link MediaTek device with a split-uboot feature design like a TP-Link Archer C50 v4. The first (factory-uboot) provides recovery via TFTP and HTTP, jumping straight into the second (firmware-uboot) if no recovery needs to be performed. The firmware-uboot unpacks and executed the kernel. Web-Recovery ------------ TP-Link integrated a new Web-Recovery like the one on the Archer C7v4 / TL-WR1043v5 / Archer C50v4. Stock-firmware sets a flag in the "romfile" partition before beginning to write and removes it afterwards. If the router boots with this flag set, bootloader will automatically start Web-recovery and listens on 192.168.0.1. This way, the vendor-firmware or an OpenWRT factory image can be written. By doing the same while performing sysupgrade, we can take advantage of the Web-recovery in OpenWRT. It is important to note that Web-Recovery is only based on this flag. It can't detect e.g. a crashing kernel or other means. Once activated it won't boot the OS before a recovery action (either via TFTP or HTTP) is performed. This recovery-mode is indicated by an illuminated WPS-LED on boot. Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com> [adjust some node names for LEDs in DTS] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix leds for TP-Link Archer C20 v4Maxim Anisimov2020-01-091-1/+3
| | | | | | | | | | - add "gpio" group for wan_orange led - use tpt triggers for wifi led indication - add wifi 5 GHz led support Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com> [slight commit message adjustment] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for ipTIME A8004TYong-hyu Ban2020-01-051-0/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ipTIME A8004T is a 2.4/5GHz band AC2600 router, based on Mediatek MT7621A. Specifications: - SoC: MT7621A - RAM: DDR3 256M - Flash: SPI NOR 16MB - WiFi: - 2.4GHz: MT7615E - 5GHz: MT7615E - Ethernet: 5x 10/100/1000Mbps - Switch: SoC internal - USB: 1 * USB3.0 port - UART: - J4: 3.3V, TX, RX, GND (3.3V is the square pad) / 57600 8N1 - Other info: - J9: Unknown unpopulated header. 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: Yong-hyu Ban <perillamint@quendi.moe> [do not enable xhci node in DTS which is already enabled in DTSI] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add label MAC address for Netgear EX6130Adrian Schmutzler2020-01-051-0/+1
| | | | | | | The MAC address on the label of this device corresponds to the 2.4 GHz and ethernet MAC address. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: remove duplicate dts nodes of MediaTek LinkIt Smart 7688Jack Chen2020-01-051-4/+0
| | | | | | | There are two identical wmac nodes in the dts file of MediaTek LinkIt Smart 7688, so delete one of them. Signed-off-by: Jack Chen <redchenjs@live.com>
* ramips: add support for Edimax RA21SMaksym Medvedev2020-01-043-107/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Edimax RA21S is a dual band 11ac router, based on MediaTek MT7621A and MT7615N chips. Specification: - SoC: MediaTek MT7621A dual-core @ 880MHz - RAM: 256M (Nanya NT5CC128M16IP) - FLASH: 16MB (Macronix MX25L12835F) - WiFi: 2.4/5 GHz 4T4R - 2.4GHz MediaTek MT7615N bgn - 5GHz MediaTek MT7615N nac - Switch: SoC integrated Gigabit Switch (4 x LAN, 1 x WAN) - USB: No - BTN: Reset, WPS - LED: 4 red LEDs, indistinguishable when case closed - UART: through-hole on PCB. J1: 3.3V - RX - GND - TX / 57600-8N1. 3.3V is the square pad Installation: Update the factory image via the OEM web-interface (by default: http://192.168.2.1/) User: admin Password: 1234 The sysupgrade image can be installed via TFTP from the U-Boot bootloader. Connect via ethernet port 2. Tested on device by @UAb5eSMn Signed-off-by: Maksym Medvedev <redrathnure@gmail.com> [split DTS and take over improvements from RG21S, extend commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix inverted reset button for Ravpower WD03Moritz Warning2020-01-031-1/+1
| | | | | | The button events "pressed" and "released" were switched. Tested with v18.06.4. Signed-off-by: Moritz Warning <moritzwarning@web.de>
* ramips: fix Archer C20i wireless MAC addressDavid Bauer2020-01-021-0/+9
| | | | | | | | | | The TP-Link Archer C20i previously had a generic Ralink MAC address set for both radios, as the caldata does only contain a generic MAC address. Set the MAC address from the vendor firmware for both radios to assign unique MAC addresses to every device. Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: fix Archer C2 v1 5GHz MAC addressDavid Bauer2020-01-021-0/+2
| | | | | | | | | | | The TP-Link Archer C2 v1 previously had a generic Ralink MAC address set for the 5GHz radio (MT7610), as the caldata does only contain a generic MAC address. Set the MAC address from the vendor firmware for the 5GHz radio to assign unique MAC addresses to every device. Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: add system LED indicators for TP-Link C20iDavid Bauer2020-01-021-1/+5
| | | | | | | Use the WPS LED to indicate system status like it is done for the TP-Link Archer C2 v1 and many other boards. Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: convert TP-Link MT7620 boards to tpt triggerDavid Bauer2020-01-026-1/+8
| | | | | | | | | | | | This converts all MediaTek MT7620 boards from TP-Link to use the now supported WiFi throughput LED trigger. This way, the LED state now covers all VAPs regardless of their name. Also align all single-WiFi LEDs to represent the state of the 2.4GHz radio. This was not always the case previously, as later-added support for the MT7610 altered the phy probing order. Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: mt7620: use throughput trigger on HiWiFi HC5x61DENG Qingfang2019-12-313-0/+5
| | | | | | Throughput trigger support for MT7620 has been added, so switch to it Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
* ramips: remove HiWiFi HC5661 non-existent 5GHz LEDDENG Qingfang2019-12-311-5/+0
| | | | | | | | HC5661 does not have 5GHz WiFi or LED. Fixes: e6e373d3480e ("ramips: Add DTS files for HiWiFi HC5x61 models") Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
* ramips: add support for TP-Link RE200 v1Andreas Böhler2019-12-311-0/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: fix switch setup for Xiaomi MiWiFi NanoSungbo Eo2019-12-311-0/+5
| | | | | | | MiWiFi Nano has two LAN ports, which are in reverse order. Add port numbers to them, and disable unused ports. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: remove bogus ralink,mtd-eeprom with offset 0x4Adrian Schmutzler2019-12-276-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several devices in mt76x8 subtarget use the following line to set up wmac in their DTS(I) files: ralink,mtd-eeprom = <&factory 0x4> This is strange for several reasons: - They should use mediatek,mtd-eeprom on this SOC - The caldata is supposed to start at 0x0 - The parent DTSI mt7628an.dtsi specifies mediatek,mtd-eeprom anyway, starting from 0x0 - The offset coincides with the default location of the MAC address in caldata Based on the comment in b28e94d4bfa1 ("ramips: MiWiFi Nano fixes"), it looks like the author for this device wanted to actually use mtd-mac-address instead of ralink,mtd-eeprom. A check on the same device revealed that actually the MAC address start at offset 4 there, so the correct caldata offset is 0x0. Based on these findings, and the fact that the expected location on this SOC is 0x0, we remove the "ralink,mtd-eeprom = <&factory 0x4>" statement from all devices in ramips (being only mt7628an anyway). Thanks to Sungbo Eo for finding and researching this. Reported-by: Sungbo Eo <mans0n@gorani.run> Fixes: b28e94d4bfa1 ("ramips: MiWiFi Nano fixes") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: simplify state_default/pinctrl0 in device DTS filesAdrian Schmutzler2019-12-23295-1941/+1355
| | | | | | | | | The node pinctrl0 is already set up in the SOC DTSI files, but defined again as member of pinctrl in most of the device DTS(I) files. This patch removes this redundancy for the entire ramips target. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix MAC address setup for Xiaomi MiWiFi NanoSungbo Eo2019-12-221-0/+1
| | | | | | | | MAC addresses are stored in factory partition at: 0x0004: WiFi 2.4GHz (label_mac +1) 0x0028: LAN, WAN (label_mac) Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: further improve support for Xiaomi MiWiFi NanoSungbo Eo2019-12-221-15/+13
| | | | | | | | | | | | | | | | | This patch does the following: - prepend vendor name to model - set status LEDs to follow the behavior in stock FW - simplify state_default node definition - use generic name for flash node Stock FW status indicators: https://files.xiaomi-mi.com/files/Mi_Router_Wi-Fi_Nano/Mi_router-NANO_EN.pdf > Yellow: power on / off > Blue: during normal operation > Red: in case of problems with the operation of the device Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: further DTS improvements for Edimax RG21SAdrian Schmutzler2019-12-221-8/+6
| | | | | | | | | | This fixes the state_default node by setting the correct groups and inheriting &state_default from parent DTSI directly. The compatible for the wifi nodes is changed to the more generic mediatek,mt76. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add eth0 MAC address for Edimax RG21SAdrian Schmutzler2019-12-221-0/+3
| | | | | | | | | | | | | | | So far, lan/wan MAC address for Edimax RG21S are only read using mtd_get_mac_ascii, so eth0.1 and eth0.2 addresses are set, but eth0 address is random. Since the device's LAN address is the same as for 2.4 GHz, though, this patch set's the eth0 address based on the 2.4 GHz one, which can be extracted by mtd-mac-address. This will also allow to move the label MAC address setup to DT. The setup of lan_mac and wan_mac are kept in 02_network, so those locations are still in use, too. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix portmap for TP-Link Archer C50 v4Maxim Anisimov2019-12-191-1/+1
| | | | | | According to 02_network portmap is wan=0 lan1=1 lan2=2 lan3=3 lan4=4 Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
* ramips: add support for ipTIME A104nsSungbo Eo2019-12-172-0/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>