aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/dts
Commit message (Collapse)AuthorAgeFilesLines
* ramips: add support for D-Link DWR-116-A1/2Pawel Dembicki2018-03-181-0/+104
| | | | | | | | | | | | | | | | | | | | | | | | | The DWR-116-A1/2 Wireless Router is based on the MT7620N SoC. Specification: MediaTek MT7620N (580 Mhz) 32 MB of RAM 8 MB of FLASH 802.11bgn radio 5x 10/100 Mbps Ethernet (1 WAN and 4 LAN) 2x external, non-detachable antennas UART (J1 in A1, JP1 in A2) header on PCB (57600 8n1) 6x LED (GPIO-controlled), 2x button JBOOT bootloader Known issues: WAN LED is drived by uartl tx pin. I decide to use this pin as uartlite tx pin. Installation: Apply factory image via http web-gui. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
* ramips: mt7620n: add mdio node and disable port4 by defaultMathias Kresin2018-03-131-1/+8
| | | | | | | | | | | | | | | | | Revert the changes I applied to aa5014dd1a58 ("ramips: mt7620n: enable port 4 as EPHY by default"). The driver expects a node mdio-bus to be present, regardless of the actual node status. If the node is missing the driver fails to load with mtk_soc_eth 10100000.ethernet: no mdio-bus child node found Disable port4 by default again. If the port is enabled but not present, a "invalid port id 4" warning is shown during boot. Fixes: FS#1428 Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: mt7620n: enable port 4 as EPHY by defaultGiuseppe Lippolis2018-03-061-5/+5
| | | | | | | | | | | | According to the datasheet the mt7620n have a fixed switch configuration with 5 ephy (10/100) port. No RGMII configuration is possible. Drop the mdio node as well. Without RGMII, the mdio node doesn't make any sense Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com> [drop mdio node, enable port4 by default] Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: mt7621: add Mediatek AP-MT7621A-V60 EVB supportRoman Yeryomin2018-02-241-0/+127
| | | | | | | | | | | | | | | | | | | | This board has: - mt7621 SoC - 8MB SPI flash - 128MB RAM - 5x ethernet ports from internal (SoC) switch - 1x ethernet port sitting on gmac2 and IC+ phy (not yet supported) - 3x PCIe slots - 1x USB 2.0 and 1x USB 3.0 - sound based on wm8960 - SDXC card slot (full size) First fw write from interactive u-boot menu, interrupt with 2. After that sysupgrade. Tested both with 4.9 and 4.14 Signed-off-by: Roman Yeryomin <roman@advem.lv>
* ramips: enable power LED and second uart on GL-MT300N-V2Benjamin Valentin2018-02-231-1/+11
| | | | | | | | | The device has a second uart accessible via pin headers, so enable it. There is also a green power led which was not enabled previously. Enable it too and use it as status LED. Signed-off-by: Benjamin Valentin <benjamin.valentin@volatiles.de>
* ramips: add support for ALFA Network AWUSFREE1Piotr Dymacz2018-02-221-0/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ALFA Network AWUSFREE1 is an USB Wi-Fi N300 adapter based on MT7628. Specification: - MT7628AN (580 MHz) - 64 MB of RAM (DDR2) - 8 MB of FLASH (SPI NOR) - 2T2R 2.4 GHz (MT7628) with external FEM (RFFM4203) - 2x detachable antennas (RP-SMA) - ASIX AX88772 USB to Ethernet bridge (connected with MT7628 PHY0) - 4x LED (2 driven by GPIO) - 1x button (reset) - 1x mini USB for host and main power input - UART header on PCB Flash instruction: You can use sysupgrade image directly in vendor firmware which is based on LEDE/OpenWrt. Alternatively, you can use web recovery mode in U-Boot: 1. Power device with reset button pressed and release it after ~5 sec. 2. Setup static IP 192.168.1.2/4 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: mt7621: fix usb initRoman Yeryomin2018-02-221-0/+1
| | | | | | | | | | In 4.14 reg-names is required to identify resources. Otherwise init fails with: [ 5.900501] xhci-mtk 1e1c0000.xhci: invalid resource [ 5.910499] xhci-mtk: probe of 1e1c0000.xhci failed with error -22 Signed-off-by: Roman Yeryomin <roman@advem.lv>
* ramips: add support for Tama W06INAGAKI Hiroshi2018-02-201-0/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tama Electric Axing W06 is a 2.4 GHz band 11n router, based on Mediatek MT7688AN. Specification: - MT7688AN (575 MHz) - 64 MB of RAM (DDR2 SDRAM) - 16 MB of Flash (SPI) - 1T1R 2.4 GHz - 1x 10/100/1000 Mbps Ethernet - 4x LEDs (GPIO connected: 3), 1x button - 1x USB 2.0 Type-A (host) - UART header on PCB (GND, RX, TX, Vcc from RJ45 side) Flash instruction using sysupgrade image: 1. Connect micro-USB cable for power supply into W06 and turn on the router 2. Connect to wifi with SSID "tama-*" with password. Complete SSID and password are listed on the back of the router 3. Access to 192.168.1.1 and login with user name "admin" and password empty 4. In firmware update(ファームウェア更新) page, click "参照" button and click "ブラウザー" button to open file browser, select the sysupgrade image and press OK button 5. Wait ~150 seconds to complete flashing Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ramips: improve GnuBee Personal Cloud Two supportMathias Kresin2018-02-201-17/+14
| | | | | | | | | | | | | | | | | | Use the generic board detection for the GnuBee Personal Cloud Two instead of the target specific one as all recent additions are doing. Fixup the pinmux to set all pins used as GPIO to the function GPIO. Request pins where used. Drop the i2c from the dts. There is nothing connected. While at it fix an indentation issue and use references instead of duplicating the whole node path. Use the same switch config as for the GB-PC1 and drop the led trigger for the not supported IP1001 phy connected to second rgmii. Fixes: c60a21532bc9 ("ramips: Add support for the GnuBee Personal Cloud Two") Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: add support for D-Link DAP-1522 A1George Hopkins2018-02-131-0/+139
| | | | | | | | | | | | | | | | | | D-Link DAP-1522 is a wireless bridge/access point with 4 LAN ports and a dual-band wireless chipset. Specifications: - Ralink RT2880 - 32 MB of RAM - 4 MB of Flash - 4x 10/100/1000 Mbps Ethernet (RTL8366SR) - 802.11abgn (RT2850) Flash Instructions: 1. Download lede-ramips-rt288x-dap-1522-a1-squashfs-factory.bin 2. Open the web interface and upload the image Signed-off-by: George Hopkins <george-hopkins@null.net>
* ramips: Add support for the GnuBee Personal Cloud TwoRosen Penev2018-02-131-0/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GnuBee Personal Cloud Two crowdfunded on https://www.crowdsupply.com It is a low-cost, low-power, network-attached storage device. Specifications: - SoC: MediaTek MT7621AT - RAM: DDR3 512 MB - Flash: 32 MB - Six SATA ports for 3.5" Drives - One SDcard - One USB 3.0 - Two USB 2.0 - Gigabit Ethernet: Three Ports - UART 3.5mm Audio Jack or 3 pin header - 57600 8N1 - Three GPIOs available on a pin header Flash instructions: The GnuBee Personal Cloud Two ships with libreCMC installed. libreCMC is a Free Software Foundation approved fork of LEDE/OpenWrt. As such one can upgrade using the webinterface or sysupgrade. Das U-Boot has multiple options for recovery or updates including : - USB - http - tftp Errata: - While there are three ethernet ports, the third requires support for the second GMAC. This will come in kernel 4.14. - The first hard drive slot has a clearance issue with the two fan headers. Workaround is to pull the headers out and connect the pins to jumper wires. - Using this device as a NAS is problematic with the 4.9 kernel as many /dev/sdX reads throw silent errors. The current theory behind this is some kind of unhandled DMA mapping error in the kernel. This is not an issue with kernel 4.4. Signed-off-by: L. D. Pinney <ldpinney@gmail.com> Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ramips: add support for TP-Link Archer C50 v3Henryk Heisig2018-02-111-0/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link Archer C50 v3 is a router with 5-port FE switch and non-detachable antennas. It's based on MediaTek MT7628N+MT7612E. Specification: - MediaTek MT7628N/N (580 Mhz) - 64 MB of RAM - 8 MB of FLASH - 2T2R 2.4 GHz and 2T2R 5 GHz - 5x 10/100 Mbps Ethernet - 4x external, non-detachable antennas - UART (J1) header on PCB (115200 8n1) - 7x LED (GPIO-controlled*), 2x button, power 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. Flash instruction: The only way to flash LEDE image in ArcherC50v3 is to use tftp recovery mode in U-Boot: 1. Configure PC with static IP 192.168.0.66/24 and tftp server. 2. Rename "openwrt-ramips-mt7628-ArcherC50v3-squashfs-tftp-recovery.bin" to "tp_recovery.bin" and place it in tftp server directory. 3. Connect PC with one of LAN ports, press the reset button, power up the router and keep button pressed for around 6-7 seconds, until device starts downloading the file. 4. Router will download file from server, write it to flash and reboot. Signed-off-by: Henryk Heisig <hyniu@o2.pl>
* ramips: ArcherC20v4: use common TP-Link dtsi fileHenryk Heisig2018-02-111-72/+3
| | | | | | and remove common part from dts file. Signed-off-by: Henryk Heisig <hyniu@o2.pl>
* ramips: change the TP-Link dtsi filenameHenryk Heisig2018-02-114-3/+3
| | | | Signed-off-by: Henryk Heisig <hyniu@o2.pl>
* ramips: various fixes for zbt-we1226Daniel Golle2018-02-061-8/+8
| | | | | | | | | | | Convert userspace code to use generic device-tree compatible board detection method. Users of the existing code will have to use sysupgrade -F once to switch to the new generic board naming. Properly setup pinctrl fixing the switch port LEDs. Fixes commit 9c4fe103cb (ramips: add support for ZBT-WE1226) Reported-by: Mathias Kresin <dev@kresin.me> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ramips: add support for Widora Neo 32MB flash revisionJackson Ming Hu2018-01-231-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Widora has updated their Widora Neo board recently. The new model uses 32MB WSON-8 factor SPI flash instead of the original 16MB SOP-8 factor SPI flash. All the other hardware components are the same as the first revision. Detailed hardware specs listed below: CPU: MTK MT7688AN RAM: 128MB DDR2 ROM: 32MB WSON-8 factor SPI Flash (Winbond) WiFi: Built-in 802.11n 150Mbps? Ethernet: 10/100Mbps x1 Audio codec: WM8960 Other IO: USB OTG; USB Power+Serial (CP2104); 3x LEDs (Power, LAN, WiFi); 2x Keys (WPS, CPU Reset) 1x Audio In/Out 1x IPEX antenna port 1x Micro SD slot Signed-off-by: Jackson Ming Hu <huming2207@gmail.com> Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: add flash size postfix to Widora neoMathias Kresin2018-01-232-50/+54
| | | | | | | | | | Rename the Widora neo by adding a flash size prefix. Move the common parts into a dtsi to be prepare everything for upcomming support of the 32MB version. Migrate the Widora neo to the generic board detection as well. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: Fix GB-PC1 cpuclock againRosen Penev2018-01-241-1/+1
| | | | | | | The intended frequency is 900 MHz, not 90. Fixes: 7059ab48a6d5 ("ramips: fix cpuclock for the GB-PC1") Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ramips: add support for ZBT-WE1226Daniel Golle2018-01-231-0/+111
| | | | | | | | MT7628NN (580MHz), 8MB SPI NOR, 64MB DDR2 RAM Everything except for the switch LEDs works great. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ramips: tl-wr840n-v5: increase firmware partition for 4Mmtk layotSerg Studzinskii2018-01-181-7/+1
| | | | | | | | | | | According to console log during TP-Link TL-WR840N v5 OEM firmware update procedure 0x3e0000-0x3f0000 64kB "config" partition, which is used to store router's configuration settings, is erased and recreated again during every OEM firmware update procedure, thus does not contain any valuable factory data. So it is conviniant to use this extra 64kB erase block for jffs overlay due limited flash size on this device like it used on TP-Link's ar71xx boards. Signed-off-by: Serg Studzinskii <serguzhg@gmail.com>
* ramips: add support for TP-Link Archer C20 v4Maxim Anisimov2018-01-151-0/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link Archer C20 v4 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. * MT7610EN ac chip isn't not supported by LEDE. Therefore 5Ghz won't work. Flash instruction: The only way to flash LEDE image in ArcherC20v4 is to use tftp recovery mode in U-Boot: 1. Configure PC with static IP 192.168.0.66/24 and tftp server. 2. Rename "openwrt-ramips-mt7628-ArcherC20v4-squashfs-tftp-recovery.bin" to "tp_recovery.bin" and place it in tftp server directory. 3. Connect PC with one of LAN ports, press the reset button, power up the router and keep button pressed for around 6-7 seconds, until device starts downloading the file. 4. Router will download file from server, write it to flash and reboot. Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
* ramips: rename TP-Link Archer C20 to TP-Link Archer C20 v1Maxim Anisimov2018-01-151-12/+13
| | | | | | | | This changes device name from "TP-Link Archer C20" to "TP-Link Archer C20 v1" because of TPLINK released new TP-Link Archer C20 v4. Additionally migration to the generic board detection has been made. Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
* ramips: add support for ALFA Network AC1200RMPiotr Dymacz2018-01-151-0/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | ALFA Network AC1200RM is an AC1200 router, with 5-port FE switch and USB 2.0 port. Device is based on MediaTek MT7620A + MT7612EN. Specification: - MT7620A (580 MHz) - 64 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - 5x 10/100 Mbps Ethernet with passive PoE output in WAN and LAN4 - 2T2R 2.4 GHz (MT7620A) - 2T2R 5 GHz (MT7612EN) - 1x USB 2.0 - 9x LED (8 driven by GPIO) - 1x button (reset) - DC jack for main power input (12-24 V) - 2x UART, I2C, I2S and LED headers Flash instruction (do it under U-Boot, using UART and TFTP server): Select option "2: Load system code then write to Flash via TFTP" and use "sysupgrade" image. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ramips: fix cpuclock for the GB-PC1Rosen Penev2018-01-121-0/+5
| | | | | | The GnuBee PC1 stock bootloader runs at 900Mhz. This fixes bad clock drift when running the platform. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ramips: add missing soc compatibles to dtsMathias Kresin2018-01-092-2/+2
| | | | | | Add SoC compatibles where missing. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: fix Omega2 compatible stringMathias Kresin2017-12-293-1/+3
| | | | | | | Change the compatibel from Omega to Omega2 and add the compatible string where missing. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: fix Linkit smart 7688 supportMathias Kresin2017-12-231-23/+4
| | | | | | | | | | Use a more appropriate compatible string. Fix the wireless led GPIO and add the default wireless trigger. Use the wireless LED for boot state indication as well. Remove the GPIO pinmux for pins not exposed on the board. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: add support for TP-Link TL-MR3420 v5Henryk Heisig2017-12-231-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link TL-MR3420 v5 are simple N300 router with 5-port FE switch and non-detachable antennas. Its very similar to TP-Link TL-WR841N V13. Specification: - MT7628N/N (580 MHz) - 64 MB of RAM (DDR2) - 8 MB of FLASH - 2T2R 2.4 GHz - 5x 10/100 Mbps Ethernet - 2x external, non-detachable antennas - USB 2.0 Port - UART (J1) header on PCB (115200 8n1) - 8x LED, 2x button, power input switch Flash instruction: The only way to flash LEDE image in mr3420v5 is to use tftp recovery mode in U-Boot: 1. Configure PC with static IP 192.168.0.225/24 and tftp server. 2. Rename "lede-ramips-mt7628-tplink_tl-mr3420-v5-squashfs-tftp-recovery.bin" to "tp_recovery.bin" and place it in tftp server directory. 3. Connect PC with one of LAN ports, press the reset button, power up the router and keep button pressed for around 6-7 seconds, until device starts downloading the file. 4. Router will download file from server, write it to flash and reboot. Signed-off-by: Henryk Heisig <hyniu@o2.pl>
* ramips: fix devicetree compat stringsMathias Kresin2017-12-215-5/+5
| | | | | | | | | | | | "PandoraBox" is not the name of the manufacturer, it's a firmware made by the manufacturer actually. Their official English name is "D-Team". PBR-M1 is the only one they use "PandoraBox" as a brand name. Their other products are using "Newifi" as their trademark (including Y1 and Y1S which used to be OEM products for Lenovo). Signed-off-by: Chuanhong Guo <gch981213@gmail.com> Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: add support for newifi d2Jackson Ming Hu2017-12-211-0/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously Newifi D2 could only use PandoraBox M1's firmware. It works fine, but LED GPIO is different. As a result, a separated DTS file for this device should be implemented. Hardware spec: * CPU: MTK MT7621A * RAM: 512MB * ROM: 32MB SPI Flash * WiFi: MTK MT7603+MT7612 * Button: 2 buttons (reset, wps) * LED: 3 single-color LEDs (USB, WiFi 2.4GHz, WiFi 5GHz) & 2 dual-color LEDs (Power, Internet) * Ethernet: 5 ports, 4 LAN + 1 WAN Installation method: Same as Newifi D1, users may need to request unlock code from the device manufacturer. Otherwise, a SPI flash programmer may be necessary to get the firmware flashed. After the device is unlocked, press and hold reset button before power cable plugs in. Then go to http://192.168.1.1 to upload and flash the firmware package. Signed-off-by: Jackson Ming Hu <huming2207@gmail.com>
* ramips: add support for Vonets VAR11N-300Andrew Crawley2017-12-211-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The VAR11N-300 is a tiny wireless-N device with a hardwired Ethernet cable, one extra Ethernet port, and an internal antenna, based on the MediaTek MT7620n chipset. Specs: - MT7620n WiSoC @ 600MHz - 32 MB SDRAM - 4 MB SPI flash - 2T2R 2.4GHz WiFi-N - 1 attached 10/100 Ethernet cable (LAN) - 1 10/100 Ethernet port (WAN) - 1 attached USB / barrel 5vdc power cable - 5 LEDs (see notes below) - 1 reset button - 1 UART (3 pads on board) Installation: The stock firmware does not support uploading new firmware directly, only checking the manufacturer's site for updates. This process may be possible to spoof, but the update check uses some kind of homebrew encryption that I didn't investigate. Instead, you can install via a backdoor: 1. Set up a TFTP server to serve the firmware binary (lede-ramips-mt7620-var11n-300-squashfs-sysupgrade.bin) 2. Factory reset the device by holding the reset button for a few seconds. 3. Open the web interface (default IP: 192.168.253.254) 4. Log in with the "super admin" credentials: username `vonets`, password `vonets26642519`. 5. On the "Operative Status" page, click the text "System Uptime", then quickly click the uptime value. 6. If successful, an alert dialog will appear reading "Ated start", and the device will now accept telnet connections. If the alert does not appear, repeat step 5 until it works (the timing is a bit tricky). 7. Telnet to the device using credentials "admin / admin" 8. Retrieve the firmware binary from the tftp server: `tftp -l lede.bin -r lede-ramips-mt7620-var11n-300-squashfs-sysupgrade.bin -g <tftp-server-ip>` 9. Write the firmware to flash: `mtd_write write lede.bin /dev/mtd4` 10. Reboot Tested: - LAN / WAN ethernet - WiFi - LAN / WAN / status LED GPIOs (see notes below) - Reset button - Sysupgrade Notes: LEDs: The board has 5 LEDs - two green LEDs for LAN / WAN activity, one blue LED for WiFi, and a pair of "status" LEDs connected to the same GPIO (the blue LED lights when the GPIO is low, and the green when it's high). I was unable to determine how to operate the WiFi LED, as it does not appear to be controlled by a GPIO directly. Recovery: The default U-boot installation will only boot from flash due to a missing environment block. I generated a valid 4KB env block using U-boot's `fw_setenv` tool and wrote it to flash at 0x30000 using an external programmer. After this, it was possible to enter the U-boot commandline interface and download a new image via TFTP (`tftpboot 81b00000 <image-filename>`), but while I could boot this image sucessfully (`bootm`), writing it to flash (`cp.linux`) just corrupted the flash chip. The sysupgrade file can be written to flash at 0x50000 using an external programmer. Signed-off-by: Andrew Crawley <acrawley@gmail.com>
* ramips: fix polarity in gpio-export nodeMathias Kresin2017-12-1811-16/+11
| | | | | | | | If we need to set the initial output value to GPIOF_OUT_INIT_HIGH (1) to enable something, the pin is ACTIVE_HIGH. The same applies to GPIOF_OUT_INIT_LOW (0) and ACTIVE_LOW. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: add support for Asus RT-N11P / RT-N12+ / RT-N12E b1Zoltan HERPAI2017-12-061-0/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a variant of the MT7620N-based Asus routers. Specifications: - MT7620N (580 MHz) - 32 MB RAM - 8 MB Flash - 5x 10/100Mbps Ethernet (built-in switch) - 2.4 GHz WLAN - 2x external, non-detachable antennas - UART (J2) header on PCB (115200 8n1) Flash instructions: 1. Configure PC with static IP 192.168.1.75/24 2. Connect PC with one of LAN ports, press the reset button, power up the router and keep button pressed for around 6-7 seconds. All 4 LEDs will start to blink, which is when the router will accept firmware files via TFTP. No known limitations on firmware filenames, just send it with a TFTP client to 192.168.1.1. 3. Router will download file from server, write it to flash and reboot. Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
* ramips: add missing reset button for Nexx WT1520INAGAKI Hiroshi2017-11-281-9/+15
| | | | | | | | | | | | | This commit adds missing the GPIO key used as reset button. Nexx WT1520 has a GPIO key for factory reset, but it's not defined in WT1520.dtsi and cannot use it. Drop the UART (full) from the device tree source file, it was never used for this board. Adjust the kernel bootargs accordingly. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> [add note about dropped UART (full) to the commit message] Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: use pinmux nodes from dtsiMathias Kresin2017-11-2215-132/+32
| | | | | | | Use the pinmux nodes from the included dtsi file instead of adding duplicate nodes. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: add missing pinmuxes to SoC dtsiMathias Kresin2017-11-225-2/+58
| | | | | | | Add pinmuxes defined by some board which are including the dtsi files to the dtsi files itself. Allows to reduce duplication. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: backport MT7628 pinmux fixesMathias Kresin2017-11-223-3/+3
| | | | | | | | | | | | According to the datasheet the REFCLK pin is shared with GPIO#37 and the PERST pin is shared with GPIO#36. While at it fix a typo inside the pinmux setup code. The function is called refclk and not reclk. Update device tree source files accordingly. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: fix DCH-M225 supportMathias Kresin2017-11-221-1/+6
| | | | | | | | | | | | | | Setting the pins of the UARTF group to GPIO+I2S at the time the I2C driver loads is to late for the wps GPIO button. The gpio-keys driver fails to load since the pin used by the wps button is not yet set to GPIO. The wps button with the rfkill keycode is essential for this wireless only board. Add the missing sound and I2C kernel modules corresponding to the device nodes. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: add support for ZBT WE3526Felix Fietkau2017-11-161-0/+117
| | | | | | | | | | | | | | | | | This is a variant of the ZBT WG3526 with a few minor modifications. The wifi chips are swapped, and there is no GPIO controllable status LED. There is also no SATA port. Specifications: - MT7621AT (880 MHz) - 512 MB RAM - 16 MB Flash (SPI NOR) - 5x 1Gbps Ethernet (built-in switch) - MT7612E 802.11ac 5 GHz WLAN - MT7603E 802.11n 2.4 GHz WLAN Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: add support for UniElec U7628-01Piotr Dymacz2017-11-142-0/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UniElec U7628-01 is a router platform board based on MediaTek MT7628AN. The device has the following specifications: - MT7628AN (580MHz) - 64/128/256 MB of RAM (DDR2) - 8/16 MB of flash (SPI NOR) - 5x 10/100 Mbps Ethernet (MT7628 built-in switch) - 1x 2T2R 2.4 GHz Wi-Fi (MT7628) - 1x miniPCIe slot (with PCIe and USB 2.0 buses) - 1x miniSIM slot - 1x microSD slot - 1x USB 2.0 port - 7x single-color LEDs (GPIO-controlled) - 1x bi-color LED (green GPIO-controlled, red -> LED_WLAN# in miniPCIe) - 1x reset button - 1x UART header (4-pins) - 1x SDXC/GPIO header (10-pins, connected with microSD slot) - 1x DC jack for main power (12 V) The following has been tested and is working: - Ethernet switch - miniPCIe slot (tested with modem and Wi-Fi card) - miniSIM slot - sysupgrade - reset button - USB 2.0 port* Due to a missing driver (MMC over GPIO) this is not supported: - microSD card reader * Warning: USB buses in miniPCIe and regular A-type socket are connected together, without any proper analog switch or USB HUB. Installation: This board might come with a different firmware versions (MediaTek SDK, PandoraBox, Padavan, etc.). If your board comes with PandoraBox, you can install LEDE using sysupgrade. Just SSH to the router and perform forced sysupgrade (due to a board name mismatch). The default IP of this board should be: 192.168.1.1 and username/password: root/admin. In case of a different firmware, you can use web based recovery described below. Use the following command to perform the sysupgrade (for the 128MB RAM/16MB flash version): sysupgrade -n -F lede-ramips-mt76x8-u7628-01-128M-16M-squashfs-sysupgrade.bin Recovery: This board contains a Chinese, closed-source bootloader called Breed (Boot and Recovery Environment for Embedded Devices). Breed supports web recovery and to enter it, you keep the reset button pressed for around 5 seconds during boot. Your machine will be assigned an IP through DHCP and the router will use IP address 192.168.1.1. The recovery website is in Chinese, but is easy to use. Click on the second item in the list to access the recovery page, then the second item on the next page is where you select the firmware. In order to start the recovery, you click the button at the bottom. SDXC/GPIO header (J3): 1. SDXC_D3 / I2C_SCLK 2. SDXC_D2 / I2C_SD 3. SDXC_D1 / I2S_DI 4. SDXC_D0 / I2S_WS 5. SDXC_CMD / I2S_CLK 6. SDXC_CLK / GPIO0 7. SDXC_CD / UART_RXD1 8. UART_TXD1 9. 3V3 10. GND Other notes: 1. The board is available with different amounts of RAM and flash. We have only added support for the 128/16 MB configuration, as that seems to be the default. However, all the required infrastructure is in place for making support for the other configurations easy. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com> Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
* ramips: add support for UniElec U7621-06Piotr Dymacz2017-11-142-0/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UniElec U7621-06 is a router platform board based on MediaTek MT7621AT. The device has the following specifications: - MT7621AT (880 MHz) - 256/512 MB of RAM (DDR3) - 8/16/32/64 MB of FLASH (SPI NOR) - 5x 1 Gbps Ethernet (MT7621 built-in switch) - 1x ASMedia ASM1061 (for mSATA and SATA) - 2x miniPCIe slots (PCIe bus only) - 1x mSATA slot (with USB 2.0 bus for modem) - 1x SATA - 1x miniSIM slot - 1x microSD slot - 1x USB 3.0 - 12x LEDs (3 GPIO-controlled) - 1x reset button - 1x UART header (4-pins) - 1x GPIO header (30-pins) - 1x FPC connector for LEDs (20-pin, 0.5 mm pitch) - 1x DC jack for main power (12 V) The following has been tested and is working: - Ethernet switch - miniPCIe slots (tested with Wi-Fi cards) - mSATA slot (tested with modem and mSATA drive) - miniSIM slot - sysupgrade - reset button - microSD slot Installation: This board might come with a different firmware versions (MediaTek SDK, PandoraBox, Padavan, etc.). If your board comes with PandoraBox, you can install LEDE using sysupgrade. Just SSH to the router and perform forced sysupgrade (due to a board name mismatch). The default IP of this board should be: 192.168.1.1 and username/password: root/admin. In case of a different firmware, you can use web based recovery described below. Use the following command to perform the sysupgrade (for the 256MB RAM/16MB flash version): sysupgrade -n -F lede-ramips-mt7621-u7621-06-256M-16M-squashfs-sysupgrade.bin Recovery: This board contains a Chinese, closed-source bootloader called Breed (Boot and Recovery Environment for Embedded Devices). Breed supports web recovery and to enter it, you keep the reset button pressed for around 5 seconds during boot. Your machine will be assigned an IP through DHCP and the router will use IP address 192.168.1.1. The recovery website is in Chinese, but is easy to use. Click on the second item in the list to access the recovery page, then the second item on the next page is where you select the firmware. In order to start the recovery, you click the button at the bottom. LEDs list (top row, left to right): - LED_WWAN# (connected with pin 42 in LTE/mSATA slot) - Power (connected directly to 3V3) - CTS2_N (GPIO10, configured as "status" LED) - TXD2 (GPIO11, configured as "led4", without default trigger) - RXD2 (GPIO12, configured as "led5", without default trigger) - LED_WLAN# (connected with pin 44 in wifi0 slot) LEDs list (bottom row, left to right): - ESW_P0_LED_0 - ESW_P1_LED_0 - ESW_P2_LED_0 - ESW_P3_LED_0 - ESW_P4_LED_0 - LED_WLAN# (connected with pin 44 in wifi1 slot) Other notes: 1. The board is available with different amounts of RAM and flash. We have only added support for the 256/16 MB configuration, as that seems to be the default. However, all the required infrastructure is in place for making support for the other configurations easy. 2. The manufacturer offers five different wireless cards with MediaTek chipsets, based on MT76x2, MT7603 and MT7615. Images of the board all show that the miniPCIe slots are dedicated to specific Wi-Fi cards. However, the slots are generic. 3. All boards we got access to had the same EEPROM content. The default firmware reads the Ethernet MAC from offset 0xe000 in factory partition. This offset only contains 0xffs, so a random MAC will be generated on every boot of the router. There is a valid MAC stored at offset 0xe006 and this MAC is shown as the WAN MAC in the bootloader. However, it is the same on all boards we have checked. Based on information provided by the vendor, all boards sold in small quantities are considered more as samples for development purposes. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com> Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
* ramips: add support for TP-Link TL-WR840N v5Robert Marko2017-11-081-0/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link TL-WR840N v5 is simple N300 router with 5-port FE switch and non-detachable antennas, based on MediaTek MT7628NN (aka MT7628N) WiSoC. Specification: - MT7628N/N (580 MHz) - 64 MB of RAM (DDR2) - 4 MB of FLASH - 2T2R 2.4 GHz - 5x 10/100 Mbps Ethernet - 2x external, non-detachable antennas - UART (J1) header on PCB (115200 8n1) - 1x LED (GPIO-controlled), 1x button * LED in TL-WR840N v5 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. Orange LED is registered so you can later use it for your own purposes. Flash instruction: Unlike TL-WR840N v4 flashing through WEB UI works in v5. 1. Download lede-ramips-mt76x8-tl-wr840n-v5-squashfs-sysupgrade.bin image. 2. Go to 192.168.0.1 3. Flash the sysupgrade image through Firmware upgrade section of WEB UI. 4. Wait until green LED stops flashing and use the router. Notes: TFTP recovery is broken since TP-Link reused bootloader code for v4 and that does not take into account only 4 MB of flash and bricks the device. So do not use TFTP Recovery or you will have to rewrite SPI flash. They fixed it in later GPL code,but it is unknown which version of bootloader you have. After manually compiling and flashing bootloader from GPL sources TFTP recovery works properly. Signed-off-by: Robert Marko <robimarko@gmail.com>
* ramips: fix Youku-YK1 supportEdmunt Pienkowsky2017-10-271-2/+1
| | | | | | | | | | | | | | | | | | | | | | Remove the ephy-pins from the ethernet device tree node. The ephy-pins are useed to controll the ePHY LEDs and this board doesn't have these. Instead one of the ePHY pins is used in GPIO mode to control the WAN LED. Use the switch LED trigger to control the WAN LED. Move the power LED handling to diag.sh to show the boot status via this LED. Add the missing kernel packages for USB and microSD card reader to the default package selection. Fix the maximum image size value. The board has a 32MByte flash chip. Fixes: FS#1055 Signed-off-by: Edmunt Pienkowsky <roed@onet.eu> [make the commit message more verbose, remove GPIO pinmux for pins not used as GPIOs] Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: remove erroneous "wdt rst" DTS entriesKevin Darbyshire-Bryant2017-10-253-3/+3
| | | | | | | | | | | | Remove reference to pinmux group "wdt rst" on EW1200, ZBT-WG2626 and ZBT-WG3526 devices. "wdt rst" is a pinmux function and not a pinmux group. Fixes the following error message during boot: rt2880-pinmux pinctrl: invalid group "wdt rst" for function "gpio" Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
* ramips: don't enable usb for the WT3020-4MMathias Kresin2017-10-252-9/+8
| | | | | | | | | That device does not have a USB port. It as the same board as the WT3020-8M, but without soldered USB port port. Also the case lacks the opening for the port. Reported-by: Alberto Bursi <alberto.bursi@outlook.it> Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: add support for Kimax U25AWF-H1Daniel Kucera2017-10-141-0/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Kimax U-25AWF-H1 is is a 2,5" HDD Enclosure with Wi-Fi/Eth conection and battery, based on MediaTek MT7620A. Patch rewritten from: https://forum.openwrt.org/viewtopic.php?pid=305643 Specification: - MT7620A CPU - 64 MB of RAM - 16 MB of FLASH - 802.11bgn WiFi - 1x 10/100 Mbps Ethernet - USB 2.0 Host - UART for serial console Flash instruction: 1. Download lede-ramips-mt7620-u25awf-h1-squashfs-sysupgrade.bin 2. Open webinterface a upgrade 3. After boot connect via ethernet to ip 192.168.1.1 Signed-off-by: Daniel Kucera <daniel.kucera@gmail.com> [fix reset button gpio, don't add a lan/wan vlan config for single port board, add -H1 suffix do make sure that this revision of the board is supported/tested] Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: keep Archer C20 Power LED On during bootSergey Ryazanov2017-10-041-0/+1
| | | | | | | | Keep Archer C20 Power LED in the same state as it was configured by bootloader (keep it hightlighed) to avoid unexpectable LED turning off during kernel boot. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
* ramips: improve Xiaomi Mi Router 3G supportKevin Darbyshire-Bryant2017-09-281-21/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit improves support for the Xiaomi Mi Router 3G originally added in commit 6e283cdc0da25928f8148805ebef7f8f2b769ee8 Improvements: - Remove software watchdog as hardware watchdog now working as per commit 3fbf3ab44f5cebb22e30a4c8681b13341feed6a6 for all mt7621 devices. - Reset button polarity corrected - length of press determines reboot (short press) vs. reset to defaults (long press) behaviour. - Enable GPIO amber switch port LEDs on board rear - lit indicates 1Gbit link and blink on activity. Green LEDs driven directly by switch indicating any link speed and tx activity. - USB port power on/off GPIO exposed as 'usbpower' - Add access to uboot environment settings for checking/setting uboot boot order preference from user space. Changes: - Front LED indicator is physically made of independent Yellow/Amber, Red & Blue LEDs combined via a plastic 'lightpipe' to a front panel indicator, hence the colour behaviour is similar to an RGB LED. RGB LEDs are not supported at this time because they produce colour results that do not then match colour labels, e.g. enabling 'mir3g:red' and 'mir3g:blue' would result in a purple indicator and we have no such label for purple. The yellow, red & blue LEDs have been split out as individual yellow, red & blue status LEDs, with yellow being the default status LED as before and with red's WAN and blue's USB default associations removed. - Swapped order of vlan interfaces (eth0.1 & eth0.2) to match stock vlan layout. eth0.1 is LAN, eth0.2 is WAN - Add 'lwlll' vlan layout to mt7530 switch driver to prevent packet leakage between kernel switch init and uci swconfig uboot behaviour & system 'recovery' uboot expects to find bootable kernels at nand addresses 0x200000 & 0x600000 known by uboot as "system 1" and "system 2" respectively. uboot chooses which system to hand control to based on 3 environment variables: flag_last_success, flag_try_sys1_failed & flag_try_sys2_failed last_success represents a preference for a particular system and is set to 0 for system 1, set to 1 for system 2. last_success is considered *if* and only if both try_sys'n'_failed flags are 0 (ie. unset) If *either* failed flags are set then uboot will attempt to hand control to the non failed system. If both failed flags are set then uboot will check the uImage CRC of system 1 and hand control to it if ok. If the uImage CRC of system is not ok, uboot will hand control to system 2 irrespective of system 2's uImage CRC. NOTE: uboot only ever sets failed flags, it *never* clears them. uboot sets a system's failed flag if that system's was selected for boot but the uImage CRC is incorrect. Fortunately with serial console access, uboot provides the ability to boot an initramfs image transferred via tftp, similarly an image may be flashed to nand however it will flash to *both* kernels so a backup of stock kernel image is suggested. Note that the suggested install procedure below set's system 1's failed flag (stock) thus uboot ignores the last_success preference and boots LEDE located in system 2. Considerable thought has gone into whether LEDE should replace both kernels, only one (and which one) etc. LEDE kernels do not include a minimal rootfs and thus unlike the stock kernel cannot include a method of controlling uboot environment variables in the event of rootfs mount failure. Similarly uboot fails to provide an external mechanism for indicating boot system failure. Installation - from stock. Installation through telnet/ssh: - copy lede-ramips-mt7621-mir3g-squashfs-kernel1.bin and lede-ramips-mt7621-mir3g-squashfs-rootfs0.bin to usb disk or wget it from LEDE download site to /tmp - switch to /extdisks/sda1/ (if copied to USB drive) or to /tmp if wgetted from LEDE download site - run: mtd write lede-ramips-mt7621-mir3g-squashfs-kernel1.bin kernel1 - run: mtd write lede-ramips-mt7621-mir3g-squashfs-rootfs0.bin rootfs0 - run: nvram set flag_try_sys1_failed=1 - run: nvram commit - run: reboot Recovery - to stock. Assuming you used the above installation instructions you will have a stock kernel image in system 1. If it can be booted then it may be used to perform a stock firmware recovery, thus erasing LEDE completely. From a 'working' LEDE state (even failsafe) Failsafe only: - run: mount_root - run: sh /etc/uci-defaults/30_uboot-envtools Then do the steps for 'All' All: - run: fw_setenv flag_try_sys2_failed 1 - run: reboot The board will reboot into system 1 (stock basic kernel) and wait with system red light slowly blinking for a FAT formatted usb stick with a recovery image to be inserted. Press and hold the reset button for around 1 second. Status LED will turn yellow during recovery and blue when recovery complete. Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
* ramips: RT5350F-OLINUXINO: enable ttyS1Zoltan Gyarmati2017-09-281-1/+16
| | | | | | | | | The RT5350F's second UART pins are available on the base module and on the EVB as well, so enable it in the device tree. In order to keep the origian serial port numbering (ttyS0 is the serial console), aliases added for the UART devices. Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
* ramips: RT5350F-OLINUXINO: enable i2cZoltan Gyarmati2017-09-281-0/+4
| | | | | | | The RT5350F i2c pins is available on the base module and on the EVB as well, so enable it in the dts. Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>