Commit Graph

27 Commits (b3514e3569b35e66b8986cf0c8fa658aeb888b38)

Author SHA1 Message Date
Koen Vandeputte b947de25a6 ar71xx: fix nand init issues on some rb2011 devices
While flashing lots of RB2011 devices, I noticed that
some of them refused to boot properly, failing over the NAND parameters.

Checking in detail shows that some device seem to use another NAND flash
which only support standard 2048-byte pages, without 512-byte subpage support.

This commit disables usage of these small subpage completely.

Advantages:
- Both NAND's with(out) subpage support are working now
- The nand speed increases a bit (measured roughly 1%) in typical usecases

Disadvantages:
- The maximum storage capacity decreases by ~0.2%
as small changes can consume a full page (2048 bytes) now.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 743654f30d ar71xx: add missing include for checking kernel version
Fixes these build errors:

arch/mips/ath79/mach-rb2011.c:20:5: error: "LINUX_VERSION_CODE" is not defined, evaluates to 0 [-Werror=undef]
 #if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
     ^~~~~~~~~~~~~~~~~~
arch/mips/ath79/mach-rb2011.c:20:26: error: "KERNEL_VERSION" is not defined, evaluates to 0 [-Werror=undef]
 #if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
                          ^~~~~~~~~~~~~~
arch/mips/ath79/mach-rb2011.c:20:40: error: missing binary operator before token "("
 #if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
                                        ^

Fixes: 318e19ba67 ("ar71xx: add v4.14 support")

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
John Crispin 318e19ba67 ar71xx: add v4.14 support
adds v4.14 patches for testing but leaves v4.9 as default for now.

Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
Hauke Mehrtens 27f23bac8f ar71xx: fix section mismatches
Fix some section mismatches found with kernel 4.9.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens 7bbf4117c6 ar71xx: Add kernel 4.9 support
This add support for kernel 4.9 to the ar71xx target.
It was compile tested with the generic, NAND and mikrotik subtarget.
Multiple members of the community tested it on their boards and did not
report any major problem so far.

Especially the NAND part received some changes to adapt to the new
kernel APIs. The serial driver hack used for the Arduino Yun was not
ported because the kernel changed there a lot.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
René Mayrhofer e457d22261 Make GBit switch work on RB2011
This change is required to make the GBit switch work on my Mikrotik Routerboard RB2011UiAS-RM, and I assume that the other RB2011 variants are exactly the same in terms of the switch. I have tested the board without and with the patch and confirm that the GBit ports are not supported at all (i.e. no communication works) with the current version in trunk and that everything works with the patch applied. The test box has been running for a few days with the patch applied, and does not show any performance problems in a test setting. I have not used it with LEDE in production so far, but with a previous turnk version of OpenWRT for many years - with the same patch applied. I therefore have good indication that it is stable.

For the record, the switch chip on my test box is identified as
	switch0: Atheros AR8327 rev. 4 switch registered on ag71xx-mdio.0

The value 0x6f000000 has been taken from the table at https://wiki.openwrt.org/toh/mikrotik/rb2011uias with the previous discussion thread still online at https://lists.openwrt.org/pipermail/openwrt-devel/2014-December/029949.html.
One definite improvement from the older OpenWRT trunk version I have been running in production and current LEDE trunk is that the SFP interface can be kept in the default configuration without excessive kernel messages about it constantly going up and down. I have not yet tested an actual SFP module, though.

Performance seems to be reasonable. Routing between two GBit ports on that switch separated by different VLANs with the default firewall ruleset (and one additional rule two allow traffic between the VLANs), but without NAT, iperf3 results are:
	[ ID] Interval           Transfer     Bandwidth       Retr
	[  4]   0.00-10.00  sec   508 MBytes   426 Mbits/sec  102             sender
	[  4]   0.00-10.00  sec   506 MBytes   425 Mbits/sec                  receiver
With a connection going through NAT (also 2 ports on the same GBit switch, same ruleset, but NAT active), routing performance drops to around 250 MBit/s.
(Note that RouterOS achieves beyond 900 MBit/s on the same hardware with the default rule set and the FastTrack rule active even for NAT, see https://wiki.mikrotik.com/index.php?title=Manual:IP/Fasttrack and http://www.mikrotik.com/download/share/FastTrack.pdf).

Summarizing, I strongly recommend to apply this patch in trunk, so that the GBit switch chip rev. 4 can be supported upstream in the next LEDE release (hopefully soon).

Signed-off-by: René Mayrhofer <rene@mayrhofer.eu.org>
7 years ago
Felix Fietkau 9db9072d67 ar71xx: convert mikrotik routerboard support to UBI
Remove the wget2nand script, drop the need for manual installation,
use sysupgrade instead.

There are now two different NAND images, one for 64 MiB flashes, the
other for >= 128 MiB

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Luka Perkov 0067ab8e39 ar71xx: rb2011: apply patch to file
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 44314
10 years ago
Gabor Juhos 4c54635106 ar71xx: rb2011: define LEDs connected to the AR8327 switch
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39341
11 years ago
Gabor Juhos b4dc45e07d ar71xx: rb2011: fix eth5 LED
The eth5 LED on the RB2011 is not working because the
LED control rule is missing. Fix it.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39335
11 years ago
Gabor Juhos d7a0184446 ar71xx: rb2011: use board name from the hardware config
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39096
11 years ago
Gabor Juhos 26ca95fefa ar71xx: rb2011: simplify setup code
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39095
11 years ago
Gabor Juhos 59b6cf1e70 ar71xx: rb2011: use the new RouterBOOT helpers
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39094
11 years ago
Gabor Juhos da66ea52ec ar71xx: register USB port for RB2011U* devices
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36801
11 years ago
Gabor Juhos 151dca0935 ar71xx: make the SFP port usable on RB2011*S boards
The port 6 of the switch is connected to the SFP
cage on the RB2011*S boards. Add a helper function
to correctly initialize the switch configuration
data on those boards to make the SFP port usable.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36799
11 years ago
Gabor Juhos 3467b17e69 ar71xx: rb2011: add switch led control values
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36796
11 years ago
Gabor Juhos 4cf6e53ccc ar71xx: rb2011: update RGMII RX/TX delay values
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36795
11 years ago
Gabor Juhos 6da63a8793 ar71xx: rb2011: move NAND nCE init to rb2011_nand_init
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36794
11 years ago
Gabor Juhos d6554bf66a ar71xx: add kernel support for the RB2011UAS
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36792
11 years ago
Felix Fietkau 144cfb65a4 ar71xx: add hard_cfg offset detection for rb2011 support - fixes wlan on some newer devices
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 36631
11 years ago
Gabor Juhos a0b31f97bb generic: ar8216: rename cpuport_cfg to port0_cfg in ar8327_platform_data
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 34846
12 years ago
Gabor Juhos 1f7ae58a2c ar71xx: ar934x_nfc: allow to control DMA data swap via platform data
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 34588
12 years ago
Gabor Juhos 31387947c8 ar71xx: use the ath79_set_ar934x_eth_cfg helper in machine setup routines
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 33818
12 years ago
Gabor Juhos 5804b9d1b7 ar71xx: register the NAND controller device on the RB2011
SVN-Revision: 33388
12 years ago
Gabor Juhos aa2f4d4c8d ar71xx: add initial support for RB2011UAS-2HnD
SVN-Revision: 33349
12 years ago
Gabor Juhos 44bf7c7cc1 ar71xx: define MTD partitions for RB2011
SVN-Revision: 33345
12 years ago
Gabor Juhos 6ae5ec16e0 ar71xx: add preliminary support for Mikrotik RB2011L
This patch adds preliminary support for the Mikrotik RB2011L.
The NAND flash is not yet supported, so only the initramfs
kernel can be used for now.

[juhosg: remove unnecessary PCI/USB related stuff, the board
does not use that, update commit message]

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

SVN-Revision: 33344
12 years ago