Commit Graph

694 Commits (be2b61e4f1ec1e351733bebb7105629599034639)

Author SHA1 Message Date
Chuanhong Guo be2b61e4f1 ramips: drop m25p,chunked-io from dts
This option was a spi nor hack which is dropped in commit
bcf4a5f474 ("ramips: remove chunked-io patch and set spi->max_transfer_size instead")

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [edit message]
5 years ago
Deng Qingfang 6621da55b7 ramips: enable MT7610E 5GHz radio of MT7620a_MT7610e EVB
This enables MT7610E of the EVB

Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
5 years ago
Petr Štetiar dd3ec40d3d ramips: dts: Unify naming of gpio-led nodes
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.

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: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
5 years ago
Petr Štetiar e8eaf794ec ramips: dts: Unify naming of gpio-keys nodes
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.

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: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
5 years ago
Anton Arapov ae0a40d68d ramips: rb750gr3: License DTS as GPL-2.0-or-later OR MIT
Adding license in order to fully satisfy dts checklist:
- https://openwrt.org/submitting-patches#dts_checklist

Signed-off-by: Anton Arapov <arapov@gmail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
Acked-by: Thibaut <hacks@slashdirt.org>
Acked-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Acked-by: Chuanhong Guo <gch981213@gmail.com>
Acked-by: Andrew Yong <me@ndoo.sg>
Acked-by: Alex Maclean <monkeh@monkeh.net>
5 years ago
Rafał Miłecki acd790c150 ramips: specify "firmware" partition format for remaining devices
It results in calling the right MTD parser directly instead of trying
them one by one.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
[use the lzma splitter for the AR670W]
Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
David Bauer 01dcd574a2 ramips: add support for Archer C50 v4
This adds support for the TP-Link Archer C50 v4.
It uses the same hardware as the v3 variant, sharing the same FCC-ID.

CPU:   MediaTek MT7628 (580MHz)
RAM:   64M DDR2
FLASH: 8M SPI
WiFi:  2.4GHz 2x2 MT7628 b/g/n integrated
WiFI:  5GHz 2x2 MT7612 a/n/ac
ETH:   1x WAN 4x LAN
LED:   Power, WiFi2, WiFi5, LAN, WAN, WPS
BTN:   WPS/WiFi, RESET
UART:  Near ETH ports, 115200 8n1, TP-Link pinout

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 Wesite 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 the first TP-Link MediaTek device to feature a split-uboot
design. 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. 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: David Bauer <mail@david-bauer.net>
5 years ago
Deng Qingfang c2bcdabf2a ramips: fix support for MX25L25635F flash
Patch picked from commit 82618062cf

This enables 4B opcodes for MX25L25635F, to fix the reboot crash
issue (FS#1120) At least 3 devices are using this flash
- GeHua GHL-R-001
- Youku YK1
- Newifi D1

Now the MX25L25635F can be correctly detected without breaking MX25L25635E
[ 3.034324] spi-mt7621 1e000b00.spi: sys_freq: 220000000
[ 3.045962] m25p80 spi0.0: mx25l25635f (32768 Kbytes)
[ 3.056098] 4 fixed-partitions partitions found on MTD device spi0.0
[ 3.068748] Creating 4 MTD partitions on "spi0.0":

Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [added deprecation notice]
5 years ago
David Bauer 915fbd4e31 ramips: adjust Netgear R6120 model name
Adjust the model string and device title to match other Netgear routers
in the ramips target.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Mathias Kresin f5e61350e7 ramips: fix firmware splitter for edimax based boards
Use the correct splitter for board with the edimax header.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Anton Arapov 6ba58b7b02 ramips: cleanup the RB750Gr3 support
Always enable the pwr led and use the usr led for boot status indication.

Rename nodes in the dts, to match what is recommend in the devicetree
specification.

Increase the maximum spi frequency to 20MHz and drop the m25p,chunked-io
which isn't required on mt7621.

Use the BTN_0 keycode for the mode button. This board doesn't have any
wireless.

Use a more descriptive label for the reset button and the GPIO enabling
the usb vcc supply.

Use the beeper kernel module for the buzzer.

Fix the pinmux to switch only pins used as GPIOs to the GPIO function.
Add support for the PoE enable GPIO to the userspace. The PoE power
status can be read via GPIO7. Since OpenWrt doesn't have support for
reading inputs from userspace, prepare only the pinmux for the GPIO.

Signed-off-by: Anton Arapov <arapov@gmail.com>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Anton Arapov 52f2d7d2a9 ramips: add RB750Gr3 native support
This patch adds support of MikroTik RouterBOARD 750Gr3, without the need
to reflashing the bootloader.

Installation through RouterBoot follows the usual MikroTik method
https://openwrt.org/toh/mikrotik/common

Since the image isn't compatible with RouterBOARD 750Gr3 installations
which have replaced the bootloader, the former used userspace boardname
is not added to the SUPPORTED_DEVICES, to prevent a brick while trying
to upgrade to the image with native support.

Signed-off-by: Anton Arapov <arapov@gmail.com>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Paul Wassi 28a5674e33 treewide: fix spaces vs. tabs
Fix spaces vs. tabs issues in ath79 and ramips.

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
5 years ago
Deng Qingfang 5580a9dd31 ramips: add support for GeHua GHL-R-001
Specs
	SoC: MT7621AT
	RAM: 512MiB
	Flash: 32MiB MX25L25635F SPI NOR
	2.4G: MT7603EN
	5G: MT7612EN
	Ethernet: 4x GE ports (1x WAN, 3x LAN) with link status LEDs
	USB 3.0
	LEDs: POWER, 5G WIFI, 2.4G WIFI, USB, Internet.
	      The last two ones are controlled by GPIO
	UART: There are 2 UARTs (UARTLITE1/ttyS0 and UARTLITE3/ttyS1) on board.
	      UARTLITE1 is close to LEDs, and UARTLITE3 is close to flash chip.
	      The stock u-boot uses UARTLITE1 by default. Baud rate is 57600

Flash instruction
	1. telnet 192.168.9.1 2317, username is "root" and password is "admin"
	   One can alternatively use UART to log in
	2. Put OpenWrt firmware in a FAT32 USB drive, and connect it to the router
	   One can alternatively download the firmware via wget through Internet
	3. mtd write /path/to/openwrt.bin firmware
	4. reboot

Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
5 years ago
Deng Qingfang 0599cd90e1 ramips: fix MT7621 dtsi
Fix SysTick reg
Add uartlite2 and uartlite3 nodes

Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
5 years ago
Simon Quigley 9f0e233576 ramips: add support for DLINK DWR-922-E2
Very similar to the DWR-921-C1, except has a telephony/RJ11 port (not
sure if supported, I didn't try), wireless router with QMI LTE embedded
modem is based on the MT7620N SoC.

Specification:

  * MediaTek MT7620N (580 Mhz)
  * 64 MB of RAM
  * 16 MB of FLASH
  * 802.11bgn radio
  * 5x 10/100 Mbps Ethernet (1 WAN and 4 LAN)
  * 2x external, detachable (LTE) antennas
  * UART header on PCB (57600 8n1)
  * 6x LED (GPIO-controlled)
  * 1x bi-color Signal Strength LED (GPIO-controlled)
  * 2x button
  * JBOOT bootloader

The status led has been assigned to the dwr-922-e2:green:signalstrength
(lte signal strength) led. At the end of the boot it is switched off and
is available for lte operation. Works correctly also during sysupgrade
operation.

Installation:
Apply factory image via d-link http web-gui, or via recovery interface:

How to recover/revert to OEM firmware:
1.) Push and hold the reset button and turn on the power. Wait until all
    LEDs start rapidly blinking (~10sec.)
2.) DHCP should give you an IP in the 192.168.123.0/24 subnet, or set
    one manually
3.) Upload original factory image via JBOOT http interface at IP
    192.168.123.254
4.) If http doesn't work, it can be done with curl command:
      curl -F FN=@XXXXX.bin http://192.168.123.254/upg
    where XXXXX.bin is name of firmware file.
5.) You can optionally telnet to 192.168.123.254 before or during the
    upload and it will report the flashing status, memory address etc.
6.) Once web UI and/or telnet says "Success", power cycle the router, or
    type "reboot" into the telnet session.

Signed-off-by: Simon Quigley <squigley@squigley.net>
[squashed commits, word wrap commit message, rename signal strenght led
name to match what is used for the DWR-921-C1 since they share the led
configuration, add label referenced in the aliases node]
Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Andreas Ziegler d492da702a ramips: mt7621: fix 5GHz WiFi LED on ZBT WG3526
This fixes the 5GHz WiFi LED which was previously not working.

Signed-off-by: Andreas Ziegler <dev@andreas-ziegler.de>
5 years ago
Weijie Gao 74af8a833a ramips: add support for CreativeBox v1
Hardware:
SoC: MT7621
DRAM: 512MB DDR3
Flash: 32MB SPI-NOR
WiFi 2.4GHz: MT7603 @ PCIe0
WiFi 5.8GHz: MT7612 @ PCIe1
SATA: ASM1061 @ PCIe2

Interfaces:
GBE RJ45 x5
USB3.0 x1
eSATA (with USB2.0) x1
SATA x1
UART x1
I2C x1
JTAG x1

Flash instructions:
Through factory bootloader or firmware web interface

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
5 years ago
NOGUCHI Hiroshi d020ae79ab ramips: add SPDX license identifier into some dts,dtsi
Acked-by: Mathias Kresin <dev@kresin.me>
Acked-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: NOGUCHI Hiroshi <drvlabo@gmail.com>
5 years ago
Petr Štetiar 0d23fd2ab2 treewide: dts: Remove default-state=off property from all gpio LED nodes
>From the Documentation/devicetree/bindings/leds/common.txt:

- default-state : The initial state of the LED. Valid values are "on", "off",
  and "keep". If the LED is already on or off and the default-state property is
  set the to same value, then no glitch should be produced where the LED
  momentarily turns off (or on). The "keep" setting will keep the LED at
  whatever its current state is, without producing a glitch.  The default is
  off if this property is not present.

So setting the default-state of the LEDs to `off` is redundant as `off`
is default LED state anyway. We should remove it as almost every new
PR/patch submission contains this property by default which seems to be
just copy&paste from some DTS file already present in the tree.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
NOGUCHI Hiroshi 83a97c53fa ramips: add support for Netgear R6350
Netgear R6350 is a wireless router, aka Netgear AC1750.

Specification:
- SoC: Mediatek MT7621AT (2 CPU cores, 4 threads)
- RAM: 128MiB (Nanya NT5CC64M16GP-DI)
- ROM: 128MiB NAND Flash (Macronix MX30LF1G18AC-TI)
- Wireless:
   for 11b/g/n (upto 300Mbps): MT7603
   for 11a/ac  (upto 1450Mbps) : MT7615, is not avaliable now
- Ethernet LAN speed: up to 1000Mbps
- Ethernet LAN ports: 4
- Ethernet WAN speed: up to 1000Mbps
- Ethernet WAN ports: 1
- USB ports: 1 (USB 2.0)
- LEDs: 4 (all can be controlled by SoC's GPIO)
- buttons: 2
- serial ports: unknown

Installation through telnet:
  - Copy kernel.bin and rootfs.bin to a USB flash disk,
    plug to usb port on the router.
  - Enable telnet with link: http://192.168.1.1/setup.cgi?todo=debug
    (login if required, default: admin password)
  - You will see "Debug Enabled!"
  - Telnet 192.168.1.1 and login with "root"
  - ls /mnt/shares/ to find out path of your USB disk.
    'myUdisk' for example.
  - cd /mnt/shares/myUdisk
  - mtd_write write rootfs.bin Rootfs
  - mtd_write write kernel.bin Kernel
  - reboot

recovery when bricked:
  nmrpflash can be used to recover to the netgear firmware
  if a broken image was flashed.

The SC_PART_MAP partition suggests that an on flash partition table
exists. After implementing a partition parser/builder for the sercom
partition format, the definitions don't match the flash layout used by
the stock firmware.

It either means the partition format has not yet been completely
understood or it isn't used by the stock firmware. For now, use fixed
partitions instead.

Signed-off-by: NOGUCHI Hiroshi <drvlabo@gmail.com>
[apply latest ramips changes and document the on flash partition map
issues]
Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Deng Qingfang 47381aadd5 ramips: several fixes for HC5x61
- Mark other partitions as read-only for HC5x61

 - Only enable USB and PCIe for HC5761/HC5861
   HC5661 doesn't have a USB port, and there is nothing attached to its PCIe.

 - Fix HC5761 switch ports
   HC5761 has only 3 ethernet ports (1x WAN + 2x LAN). Remove unused ports.

 - Fix HC5861 5GHz radio
   HC5861 has MT7612EN 5GHz WiFi chip, not MT7610EN.

 - Fix HC5761/HC5861 WiFi LEDs
   After 5GHz is enabled, it becomes wlan0. And 2.4GHz would be wlan1.

 - Fix HC5x61 image size
   It should be 15872k (0xf80000)

Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
5 years ago
Rafał Miłecki c56241c052 ramips: mt7621: specify "firmware" partition format for remaining devices
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Mathias Kresin 8e40fbff0b ramips: drop support for ALLNET ALL0239-3G and Sitecom WL-341 v3
Beside one exception, no one took care of these two remaining boards
still using the legacy image build code during the last two years.

Since OpenWrt 14.07 the ALLNET ALL0239-3G image building is broken.

The Sitecom WL-341 v3 image build code looks pretty hackish and broken.
It's questionable if the legacy image works as all.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Russell Senior ed000fcaf2 ramips: fix firmware compatible string for dir860l-b1
In commit d70ec3008d, a firmware compatible
string of "denx,uimage" was added for the Dlink DIR-860L-B1. Unfortunately,
this was the wrong string. It needs "seama" instead.

Signed-off-by: Russell Senior <russell@personaltelco.net>
5 years ago
Mathias Kresin ffa55386f1 ramips: fix dtc compiler warnings
The latest dtc compiler considers nodes named i2c or spi as the
respective bus:

  /pinctrl/i2c: incorrect #address-cells for I2C bus
  /pinctrl/spi: incorrect #address-cells for SPI bus

Rename the node to fix the false positives.

Fix the spi node unit address for the DWR-512-B and UBNT-ER-e50 to get
rid of the following warning:

  SPI bus unit address format error, expected "n"

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Chuanhong Guo 5563d49a39 ramips: disable sdhc for HC5661A
Currently OpenWrt doesn't support switching MT7628 into AP mode
(which is done by writing some undocumented registers in MTK SDK)
Without doing so, enabling SD breaks 4 FE ports and the SD controller
doesn't work since SD pins aren't configured correctly.

Disable SDHC on HC5661A to recover the 4 FE ports.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
[drop the sdhci node completely]
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Pawel Dembicki e9a9b7d1ed ramips: add support for D-Link DWR-118-A1
The DWR-118-A1 Wireless Router is based on the MT7620A SoC.

Specification:

- MediaTek MT7620A (580 Mhz)
- 64 MB of RAM
- 16 MB of FLASH
- 1x 802.11bgn radio
- 1x 802.11ac radio (MT7610EN)
- 3x 10/100 Mbps Ethernet (3 LAN)
- 2x 10/100/1000 Mbps ICPlus IP1001 Ethernet PHY (1 WAN AND 1 LAN)
- 1x internal, non-detachable antenna
- 2x external, non-detachable antennas
- 1x USB 2.0
- UART (J1) header on PCB (57600 8n1)
- 7x LED (5x GPIO-controlled), 2x button
- JBOOT bootloader

Known issues:
- WIFI 5G LED not working
- flash is very slow

The status led has been assigned to the dwr-118-a1:green:internet led.
At the end of the boot it is switched off and is available for other
operation. Work correctly also during sysupgrade operation.

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>
6 years ago
Mathias Kresin 55101877d3 ramips: mt7620: disable PCIe if nothing is attached
All boards neither expose the PCIe as Mini-PCIe nor have anything
attached to the PCIe Bus. Disable PCIe for those by dropping the node
from the dts files.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Chen Minqiang 14b81c909f ramips: mt7620: add missing pci wifi nodes to dts files
These devices has pci wifi but not defined in dts:
 HC5761
 HC5861
 TINY-AC

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
6 years ago
Pawel Dembicki 465d57370f ramips: specify "firmware" partition format in JBOOT devices
Specify firmware partition format by compatible string.

List of devices:
-DWR-116-A1
-DWR-118-A2
-DWR-512-B
-DWR-921-C1
-LR-25G001

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 years ago
Valentín Kivachuk 30a7ab8f61 ramips: add support for MTC Wireless Router WR1201
MTC Wireless Router WR1201 is the OEM name of the board. It is also sold
rebranded as STRONG Dual Band Gigabit Router 1200.

Specification:
- SoC: MediaTek MT7621A (880 MHz)
- Flash: 16 MiB
- RAM: 128 MiB
- Wireless: 2.4Ghz(MT7602EN) and 5Ghz (MT7612EN)
- Ethernet speed: 10/100/1000
- Ethernet ports: 4+1
- 1x USB 3.0
- 1x microSD reader
- Serial baud rate of Bootloader and factory firmware: 57600

The OEM webinterface writes only as much bytes as listed in the
uImage header field to the flash. Also, the OEM webinterface
evaluates the name field of uImage header before flashing (the
string "WR1201_8_128")

To flash via webinterface, is mandatory to use first initramfs.bin
and after (from the OpenWrt) the sysupgrade.bin

Some notes:
- Some microSD will not work:

  mtk-sd 1e130000.sdhci: no support for card's volts
  mmc0: error -22 whilst initialising SDIO card
  mtk-sd 1e130000.sdhci: no support for card's volts
  mmc0: error -22 whilst initialising MMC card
  mtk-sd 1e130000.sdhci: no support for card's volts
  mmc0: error -22 whilst initialising SDIO card
  mtk-sd 1e130000.sdhci: card claims to support voltages below defined range
  mtk-sd 1e130000.sdhci: no support for card's volts
  mmc0: error -22 whilst initialising MMC card
  mtk-sd 1e130000.sdhci: no support for card's volts
  mmc0: error -22 whilst initialising SDIO card
  mtk-sd 1e130000.sdhci: no support for card's volts
  mmc0: error -22 whilst initialising MMC card

Signed-off-by: Valentín Kivachuk <vk18496@gmail.com>
6 years ago
INAGAKI Hiroshi d70ec3008d ramips: specify "firmware" partition format
Specify firmware partition format by compatible string.

formats in ramips:

- denx,uimage
- tplink,firmware
- seama

It's unlikely but the firmware splitting might not work any longer for
the following boards, due to a custom header:

- EX2700: two uImage headers
- BR-6478AC-V2: edimax-header
- 3G-6200N: edimax-header
- 3G-6200NL: edimax-header
- BR-6475ND: edimax-header
- TEW-638APB-V2: umedia-header
- RT-N56U: mkrtn56uimg

But it rather looks like the uImage splitter is fine with the extra
header.

The following dts are not touched, due to lack of a compatible string in
the matching firmware splitter submodule:

- CONFIG_MTD_SPLIT_JIMAGE_FW
    DWR-116-A1.dts
    DWR-118-A2.dts
    DWR-512-B.dts
    DWR-921-C1.dts
    LR-25G001.dts
- CONFIG_MTD_SPLIT_TRX_FW
    WCR-1166DS.dts
    WSR-1166.dts
- CONFIG_MTD_SPLIT_MINOR_FW
    RBM11G.dts
    RBM33G.dts
- CONFIG_MTD_SPLIT_LZMA_FW
    AR670W.dts
- CONFIG_MTD_SPLIT_WRGG_FW
    DAP-1522-A1.dts

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
Petr Štetiar 221d3e0234 ramips: bdcom-wap2100: Change DTS license to GPL-2.0-or-later OR MIT
Having MIT as alternative is sometimes preferred by upstream maintainers
and allows sharing that simple code with other projects. We don't really
want multiple DTS versions for the same device.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Felix Fietkau 5c9ad4fa6e ramips: fix MTD EEPROM offset for TL-WR840N v5
The previous offset was invalid and pointed to the end of the partition,
which was causing issues with mt76

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Petr Štetiar 8ba6e95eed ramips: bdcom-wap2100: Enable mt7610e 5GHz radio
The 5GHz radio of this device uses an mt7610e PCI-E chip, which has
been recently started to be supported.

 mt76x0e 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
 mt76x0e 0000:01:00.0: ASIC revision: 76100002
 mt76x0e 0000:01:00.0: Firmware Version: 0.1.00
 mt76x0e 0000:01:00.0: EEPROM ver:01 fae:00

Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Petr Štetiar 26ad357192 ramips: bdcom-wap2100: Set firmware partition format to denx,uimage
Specify firmware partition format to denx,uimage in compatible DTS property.

 2 uimage-fw partitions found on MTD device firmware
 Creating 2 MTD partitions on "firmware":
 0x000000000000-0x00000017f72b : "kernel"
 0x00000017f72b-0x000000f70000 : "rootfs"

Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Petr Štetiar 795211093f ramips: bdcom-wap2100: Fix boot failure by adding partitions compatible property
Flash partitions were moved under partition table node, but addition of
compatible property was omitted which lead to following boot failure:

 VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
 Please append a correct "root=" boot option; here are the available partitions:
 1f00           16384 mtdblock0
  (driver?)
 Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Fixes: e4d9217f (ramips: improve BDCOM WAP2100-SK support)
Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Roger Pueyo Centelles cb6a8aa584 ramips: mt7620: add DIR-810L's mt7610e 5 GHz radio
The 5 GHz radio of this device uses an mt7610e pci-e chip, which has
been recently added support.

Tested on the actual device as AP and client, TCP throughput ~90 Mbps
U/D.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
6 years ago
Nishant Sharma df3e0b5806 ramips: add support for UniElec U7621-06-512M-64M variant
Add support for UniElec U7621-06 variant with 512MB RAM and 64MB flash.

Additional specs are below:

CPU: MT7621 (880Mhz)
Bootloader: Ralink U-Boot
Flash: 64MB
 - U-Boot identifies as Macronix MX66L51235F
 - kernel identifies as MX66L51235l (65536 Kbytes)
RAM: 512MB

Rest of the details as per commit 46ab81e405 ("ramips add support for
UniElec U7621-06")

Signed-off-by: Nishant Sharma <nishant@unmukti.in>
[use generic board detection, add firmware partition compatible, extend
firmware partition to use all of the remaining flash space, add a
maximum image size matching the firmware partition size]
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Thomas Vincent-Cross a160f50d4f ramips: add support for Wavlink WL-WN570HA1
This commit adds support for the Wavlink WL-WN570HA1, a dual-band PoE
wireless router with the following specifications:

 - CPU: MediaTek MT7688AN 580MHz
 - Flash: 8MB
 - RAM: 64MB
 - Ethernet: 1x 10/100Mbps
 - 2.4 GHz: 802.11b/g/n SoC, 1T1R, 27 dBm
 - 5 GHz: 802.11a/n/ac MT7610E, 1T1R, 25 dBm
 - Antennas: 2x external (1 per radio), detachable
 - LEDs: 3 programmable + Wi-Fi, WAN/LAN, Power
 - Buttons: Reset

Flashing instructions:

Factory U-boot launches a TFTP client if reset button is pressed during power-on.
Rename the sysupgrade file and configure TFTP as follows:

 - Client (WL-WN570HA1) IP: 192.168.10.101
 - Server IP: 192.168.10.100
 - Filename: firmware.bin

Signed-off-by: Thomas Vincent-Cross <me@tvc.id.au>
[use generic board detection, add firmware partition compatible]
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Matthias Badaire 1100ba43db ramips: fix RavPower WD03 SoC dtsi include
The RavPower WD03 is a mt7620n based baord. With the change applied, I2C
should work now with the RavPower WD03.

Signed-off-by: Matthias Badaire <mbadaire@gmail.com>
[reworded commit message]
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin aa82fdf110 ramips: fix GB-PC1/PC2 build error
With ed25e3ac02 ("ramips: fix some clocks in mt7621.dtsi") the
cpuclock node was dropped from the mt7621.dtsi without removing the
references to this node from the GB-PC1/PC2 dts files.

Remove them now, to fix the build error.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin d7494f30f5 ramips: fix Lava LR-25G001 invalid led names
It has to be <board>:<colour>:<function> and is expected exactly this
way by the userspace scripts.

While at it, fix some whitespace issues in the dts file and rename the
flash node as required upstream.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin be3e69d991 ramips: rt2880: fix pci cells definition
Set the correct number of cells to fix "property has invalid length" dtc
compiler warnings.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin e4d9217fe5 ramips: improve BDCOM WAP2100-SK support
Use the generic board detection instead of the target specific one as
all recent additions are doing.

Setup the USB led via devicetree (a58535771f) and include the required
driver by default. Merge the led userspace setting with an existing
identical case.

Use the wps led for boot status indication.

Move the partitions into a partition table node (6031ab345d) and drop
needless labels. Drop misplaced cells properties (53624c1702).

Cleanup the pinmux and only switch pins to gpio functions which a
referenced as gpio in the dts.

Match the maximum image size with the size of the firmware partition.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 71ba834cf1 ramips: add Sanlinking Technologies D240 pinmux quirk
The sd function of the nd_sd group configures two of the groups pins as
gpios. The pins are used as PCIe reset/power.

Due to the driver load order, the pins are configured way to late if
triggered by the sd-card driver.

To not introduce another kind of driver load order dependency and
configure the pins as early as possible, means during pinmux driver
load.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 9ebce69611 ramips: revert fix rt3883 pci pinmux
This reverts commit dcdc6d9dad.

Even if described this way in the datasheet, it causes a bootloop on a
RT-N56U (v1):

  of-flash 1c000000.nor-flash: do_map_probe() failed for type cfi_probe
  of-flash 1c000000.nor-flash: do_map_probe() failed
  VFS: Cannot open root device “(null)” or unknown-block(0,0): error -6

Fixes: FS#1930

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 8ec1a66c34 ramips: improve Skylab SKW92A support
Use the generic board detection instead of the target specific one as
all recent additions are doing.

Add the wireless led according the gpio number from the datasheet.
Rename the board part of the leds to match the name used for the
compatible string. Finally, do not hijack the wps led for boot status
indication longer than necessary.

Merge userspace config into existing cases.

Include the manufacture Name in the dts model string.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Pawel Dembicki 20b09a2125 ramips: add support for Lava LR-25G001
The Lava LR-25G001 Wireless Router is based on the MT7620A SoC.

Specification:

- MediaTek MT7620A (580 Mhz)
- 64 MB of RAM
- 16 MB of FLASH
- 1x 802.11bgn radio
- 1x 802.11ac radio (MT7610EN)
- 5x 10/100/1000 Mbps AR8337 Switch (1 WAN AND 4 LAN)
- 2x external, detachable antennas
- 1x USB 2.0
- UART (J3) header on PCB (57600 8n1)
- 8x LED (3x GPIO-controlled), 2x button
- JBOOT bootloader

Known issues:
- Work only three Gigabit ports (3/5, 1 WAN and 2LAN)

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>
6 years ago