Commit Graph

17686 Commits (b757de65b3c3aa210022c65445df1d6dbbf9eadd)

Author SHA1 Message Date
Koen Vandeputte 3b4241071d imx6: disable UART dma
Fixes these prints on boot:

[   13.785600] imx-uart 2020000.serial: DMA transaction error.
[   13.793134] imx-uart 2020000.serial: DMA transaction error.
[   13.798721] imx-uart 2020000.serial: DMA transaction error.

Based on following upstream patch by Tim Harvey (Gateworks):

80a01b6582

TX complete DMA messages are getting missed.
This is also currently an issue in mainline.
For now we will disable DMA in serial/imx.c.

This resolves an issue encountered with RS485 transmit.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
7 years ago
Enrico Mioso acd8649b18 ramips: let the "reserved" MTD partition be RO for R6220
The "reserved" partition should probably be read-only, just in case. Even
not knowing it's content, other devices have marked it as such, so it
seems a good idea to do so also for this device.

Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
CC: Mathias Kresin <dev@kresin.me>
CC: Hanqing Wong <hquu@outlook.com>
7 years ago
Jo-Philipp Wich 66f25c98e0 ar71xx: disable ENS202EXT in mikrotik and nand subtargets
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Piotr Dymacz 6173f6d8f1 ar71xx: move Wallys DR344 to generic build target
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz 18d5cee2a8 ar71xx: fix Wallys DR344 GPIO-connected LEDs and button
This fixes wrong GPIO numbers for LEDs and button in Wallys DR344 board
and sets color of all LEDs to green as the mass production boards have
only green one.

Actually, DR344 has 6 GPIO-connected LEDs and one button:

- GPIO11: status
- GPIO12: sig1
- GPIO13: sig2
- GPIO14: sig3
- GPIO15: sig4
- GPIO16: reset button
- GPIO17: lan

WAN LED is connected directly with AR8035 PHY.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz 6713640b52 ar71xx: set GE interface as wan by default in Wallys DR344
This aligns default network interfaces configuration with vendor
firmware: GE (eth0) -> wan, FE (eth1) -> lan.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz c7bc8a9a13 ar71xx: fix GE interface support in Wallys DR344
GMAC0 interface of AR9344 SOC in Wallys DR344 board is connected with
AR8035, not with AR8327. Without this fix, GE interface doesn't work at
all or shows high packet loss ratio.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Marty Plummer 558d86923e ar71xx: add support for EnGenius ENS202EXT
EnGenius ENS202EXT is an outdoor wireless access point with
2-port 10/100 switch, detachable antennas and proprietery PoE.

The device is based on Qualcomm/Atheros AR9341 v1.

Specifications:
- 535/400/200 MHz (CPU/DDR/AHB)
- 64 MB of RAM
- 16 MB of FLASH
- UART (J1) header on PCB (unpopulated)
- 2x 10/100 Mbps Ethernet
- 2.4 GHz, up to 26dBm
- 2x external, detachable antennas
- 7x LED, 1x button

Flash instructions:

You have three options:

- Use the vendor firmware upgrade page on the web interface and give
it the factory.img. This is the easiest way to go about it.

- If you have serial access during u-boot, interrupt the normal boot
(any key before timeout) and run 'run failsafe_boot'; this will bring
you to a minimal openwrt luci image on ip 192.168.1.1 useful if you've
bricked the normal firmware.

- Use the vendor's management cli, which can be accessed via telnet
with the same credentials as the web login (default admin:admin), then
issue the following commands:

*** Hi admin, welcome to use cli(V-1.6.7) ***
---========= Commands Help =========---
      stat -- Status
       sys -- System
    wless2 -- 2.4G-Wireless
      mgmt -- Management
      tree -- Tree
      help -- Help
    reboot -- Reboot
ens202ext>mgmt
  Management
---========= Commands Help =========---
     admin -- Administration
     mvlan -- Management VLAN settings
      snmp -- SNMP settings
    backup -- Backup/Restore settings
    autorb -- Auto reboot settings
   fwgrade -- Firmware upgrade
      time -- Time settings
   wifisch -- Wifi schedule
       log -- Log
      diag -- Diagnostics
      disc -- Device Discovery
    logout -- Logout
      help -- Help
      exit -- Exit
ens202ext/mgmt>fwgrade
  Management --> Firmware upgrade
---========= Commands Help =========---
      fwup -- Firmware upgrade
      help -- Help
      exit -- Exit
ens202ext/mgmt/fwgrade>fwup http://web.server/lede-ar71xx-generic-ens202ext-squashfs-factory.bin

Signed-off-by: Marty Plummer <ntzrmtthihu777@gmail.com>
7 years ago
Andrey Polischuk 0f21873f7f ar71xx: fix LED defines for TP-Link TL-WR740N v6
Signed-off-by: Andrey Polischuk <androld.b@gmail.com>
[changed commit subject, dropped redundant kernel config symbol]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Josua Mayer d41a441bb6 mvebu: clearfog: assign SFP port to WAN zone
The single SFP port is meant for direct media access to WAN, such as
VDSL2, GPON). While it could also be used for in-home fiber, it is much
more likely that the LAN is standard ethernet, especially considering
that SFP is the onmly port that can go beyond 1Gbps.

Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
7 years ago
Josua Mayer 48cc065fe3 mvebu: clearfog: document interface configuration
Take explicit note of what physical ports eth{0,1,2} refer to.
Also repair port assignment:
At some point between 4.9.20 and 4.9.29 the numbering changed.
Keep previous port assignment that was:
LAN = SFP+Switch
WAN = standalone ethernet

Also use the same assignment for Clearfog-Base to avoid confusion.

Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
7 years ago
Josua Mayer 3f72f3a8b1 mvebu: clearfog: include DTB for all variants in image
Installing all armada-388-clearfog-* DTBs in the same sdcard image,
it now becomes much easier to swap sdcards between different device variants.

Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
7 years ago
Josua Mayer 88389bfe41 mvebu: update boot-script to use generic variables
U-Boot provides standard variables for load addresses, and
filesystem-agnostic load-commands. Furthermore thanks to distro-boot,
the device and partition from which the system boots is known.
The new boot-script makes use of all this information.

Tested on the only board that uses this boot-script: Clearfog Pro

Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
7 years ago
Matthias Schiffer ce06d2bd01
sunxi: sysupgrade: sync with x86
sunxi sysupgrade was based on the x86 implementation; sync fixes and other
changes from the current x86 version:

x86: fix sysupgrades on disks with 4k block size
x86: sysupgrade: move partition table change check to platform_check_image
x86: sysupgrade: refactor platform_do_upgrade
x86: sysupgrade: explicitly rescan disk after writing partition table

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Matthias Schiffer 6bb7b87315
sunxi: sysupgrade: don't write partitions twice
When existing partitions are retained, the dd call writing the uboot image
in the space before the first partition was accidentally writing the whole
image, making the code for individual partitions redundant. Limit the copy
to 1016KiB (the first 8KiB are skipped, and the first partition starts at
1024KiB).

In addition, conv=notrunc is replaced with conv=fsync. It seems this was an
oversight, as notrunc doesn't make sense for block devices and all other dd
commands use conv=fsync.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Matthias Schiffer dac07ca05b
x86: sysupgrade: explicitly rescan disk after writing partition table
This should ensure that the kernel partition can be mounted in
platform_copy_config when its size has changed.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Matthias Schiffer a77633d36d
x86: sysupgrade: refactor platform_do_upgrade
By returning early when no upgrade device can be found and handling the
SAVE_PARTITIONS=0 case differently, we can get rid of two levels of if.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Matthias Schiffer 19b84cfff2
x86: sysupgrade: move partition table change check to platform_check_image
The staged sysupgrade will prevent us from using ask_bool in
platform_do_upgrade; therefore, the check is moved to platform_check_image.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Matthias Schiffer 9ab81e63cd
ramips: sysupgrade: move nand_do_upgrade call to platform_do_upgrade
All targets with NAND support should gradually move their nand_do_upgrade
calls from platform_pre_upgrade to platform_do_upgrade.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Martin Schiller 82f7fd7457 lantiq: pinctrl: xway: fix copy/paste error in xrx200_grps
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
7 years ago
Ram Chandra Jangir 7bf74d3185 ipq806x: add qpic nand and bam dma node's in ipq4019 dts tree
This change adds QPIC BAM dma and NAND driver node's in IPQ4019
device tree, also enable this for AP-DK04.1 based boards.

Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
7 years ago
Ram Chandra Jangir 35307c0bbf ipq806x: Add support for custom data mapping in bam_dma dmaengine
This change adds a new function to support for preparing DMA descriptor
for custom data.

Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
7 years ago
Ram Chandra Jangir ea9e0cf2ce ipq806x: Added bam transaction and support additional CSRs
This change adds support for below:
- Bam transaction which will be used for any NAND request.
- Reset function for NAND BAM transaction
- Add support for additional CSRs.

Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
7 years ago
Ram Chandra Jangir 2048cab22b ipq806x: Add bam_dma support in qcom_nand driver
The existing qcom_nand driver supports ADM DMA which is mainly
required for ipq806x family based boards,
IPQ40xx based boards uses BAM DMA in NAND driver, so this patch
adds BAM DMA support with compatible string as qcom,ebi2-nandc-bam.

Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
7 years ago
Ram Chandra Jangir d227bb06df ipq806x: Add support to configure ipq40xx GPIO_PULL bits
GPIO_PULL bits configurations in TLMM_GPIO_CFG register
differs for IPQ40xx from rest of the other qcom SoC's.
This change add support to configure the msm_gpio_pull
bits for ipq40xx, It is required to fix the proper
configurations of gpio-pull bits for nand pins mux.

Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
7 years ago
Jo-Philipp Wich 833c500cb2 brcm47xx: remove target specific network preinit config
The generic preinit code is now able to setup network and switch vlan settings
from the /etc/board.json file, therefor drop the target specific code.

Fixes FS#790.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Hauke Mehrtens 2be8d34085 x86: fix build of geode target
The build bot complained that the OLPC option was not set.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens 69aaf1cd78 kernel: add missing config options
This broke the build for the x86 generic target.
This was found by the build bot.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Filip Moc 43e4e1f4a5 Move enablemodem from ramips to new package adb-enablemodem and make it used also by TL-MR6400
Signed-off-by: Filip Moc <lede@moc6.cz>
7 years ago
Filip Moc a639cbfd00 ar71xx: Add support for TP-Link MR6400
You can flash via tftp recovery (serve factory image as /mr6400_tp_recovery.bin
on 192.168.0.66/24, connect to any ethernet port and power on device while
holding the reset button). Flashing via OEM web interface does not work.

Hardware Specification (v1.0 EU):
 - SoC: QCA9531
 - Flash: Winbond W25Q64FV (8MiB)
 - RAM: EtronTech EM6AB160TSE-5G (64MiB)
 - Wireless: SoC platform only (2.4GHz b/g/n, 2x internal antenna)
 - Ethernet: 2NIC (3x100M + 1x100M)
 - WWAN: TP-LINK LTE MODULE (2x external detachable antenna)
 - Power: DC 12V 1A

Signed-off-by: Filip Moc <lede@moc6.cz>
7 years ago
Russell Senior b76248dd96 ramips: remove fictional LEDs from AsiaRF AWM00x device tree
Neither the AsiaRF AWM002 or AWM003 actually has an LED on the module
board.  The ld1 and ld2 do not represent actual LEDs.  These pins might
connect to LEDS on an eval board or other carrier board, but that is
outside the scope of this device tree file.

Signed-off-by: Russell Senior <russell@personaltelco.net>
7 years ago
Hauke Mehrtens 0b17375931 kernel: update kernel 4.9 to 4.9.30
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Florian Fainelli 48e500570e uml: Fix sample command line
Provide paths that match where LEDE is staging images.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years ago
Florian Fainelli e8c3b98973 uml: Check for glibc static libraries
UML statically links against libutil, librt and libpthread. Some hosts do not
necessarily have these libraries installed and we should find out sooner than
later (during the final vmlinux linking stage) about that.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years ago
Mathias Kresin 822ee54544 treewide: fix device tree path in scripts
The device tree is at /proc/device-tree/ without a base subdir.

Fixes: da472e5b30 ("treewide: access device tree from userspace via /proc/")

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Kyson Lok abbfcc8525 ramips: add support for GL-inet GL-MT300N-V2
This patch adds supports for the GL-inet GL-MT300N-V2.

Specification:
- SoC: MediaTek MT7628AN
- Flash: 16 MiB (W25Q128FVSG)
- RAM: 128 MiB DDR
- Ethernet: 1 x WAN (100 Mbps) and 1 x LAN (100 Mbps)
- USB: 1 x USB 2.0 port
- Button: 1 x switch button, 1 x reset button
- LED: 3 x LEDS (system power led is not GPIO controller)
- UART: 1 x UART on PCB (JP1: 3.3V, RX, TX, GND)

Installation through Luci:
- The original firmware is LEDE, so both LuCI or sysupgrade can be used.
- Do not keep settings, for sysupgrade please use the -n option.

Installation through bootloader webserver:
- Plug power and hold reset button until red LED blink to bright.
- Install sysupgrade image using web interface on 192.168.1.1.

Signed-off-by: Kyson Lok <kysonlok@gmail.com>
[match maximum image size with firmware partition]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin da472e5b30 treewide: access device tree from userspace via /proc/
Access the device tree via /proc/device-tree/ is the documented way to
access the properties. Everything else might not work in future.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Daniel Golle 62d0b1a444 x86/legacy: disable PAE again
commit 961c0eacea ('x86: fix lifting kernel CPU requirements and always
enable PAE') broke some older geode boards such as Soekris net4826.
Hence disable PAE on x86/legacy again in order to still support those
very old non-PAE capable CPUs.

Fixes FS#773 - PAE broke Soekris net4826

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 years ago
Giuseppe Lippolis 4ba2f4dc63 DWR-512: adding wwan support for the dwr-512 3G modem
This PR allow the 3G modem embedded in the DWR-512 to be managed
by the wwan-ncm scripts. The modem will use the usb-option and
usb-cdc-ether drivers.
The DWR-512 DT is updated accordingly.

Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com>
7 years ago
Philip Prindeville 910df3f06c x86_64: add drivers for Xeon controller hub based GPIO
These drivers are in many reference-design Xeon, iCore, or
Atom64 based server boards.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
7 years ago
Felix Fietkau 30bf133699 octeon: remove linux 4.4 support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
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
Matthias Fritzsche a4e63e2679 ar71xx: change image version for ubiquiti devices
changes the image version from hardcoded OpenWrt to
$VERSION_DIST. AirOS shows a notification with the image version
during a firmware upgrade.

fixes #582

Signed-off-by: Matthias Fritzsche <txt.file@txtfile.eu>
7 years ago
Stijn Tintel c454fab0f2 brcm2708: enable cpufreq
With cpufreq disabled, the CPU stays locked at the frequency set by the
bootloader. This severely degrades performance as the bootloader sets
the CPU at the lowest frequency by default.

Enable cpufreq for all subtargets and use the ondemand governor.

Tested bcm2708 on RPi0W. Tested bcm2709 and bcm2710 on RPi3.

Reported-by: Bryan Mayland <bmayland@capnbry.net>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years ago
Hauke Mehrtens 6153248052 lantiq: spi: double time out tolerance
The generic SPI code calculates how long the issued transfer would take
and adds 100ms in addition to the timeout as tolerance. On my 500 MHz
Lantiq Mips SoC I am getting timeouts from the SPI like this when the
system boots up:

m25p80 spi32766.4: SPI transfer timed out
blk_update_request: I/O error, dev mtdblock3, sector 2
SQUASHFS error: squashfs_read_data failed to read block 0x6e

After increasing the tolerance for the timeout to 200ms I haven't seen
these SPI transfer time outs any more.
The Lantiq SPI driver in use here has an extra work queue in between,
which gets triggered when the controller send the last word and the
hardware FIFOs used for reading and writing are only 8 words long.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Koen Vandeputte e842e16f45 kernel: update kernel 4.9 to 4.9.29
- Refresh all patches
- Removed upstreamed
- Adapted 1

Compile tested on: bcm53xx, cns3xxx, imx6, lantiq
Run tested on: cns3xxx & imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
[update from 4.9.28 to 4.9.29]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Kevin Darbyshire-Bryant 088e28772c kernel: update kernel 4.4 to version 4.4.69
Refresh patches. A number of patches have landed upstream & hence are no
longer required locally:

062-[1-6]-MIPS-* series
042-0004-mtd-bcm47xxpart-fix-parsing-first-block

Reintroduced lantiq/patches-4.4/0050-MIPS-Lantiq-Fix-cascaded-IRQ-setup
as it was incorrectly included upstream thus dropped from LEDE.
As it has now been reverted upstream it needs to be included again for
LEDE.

Run tested ar71xx Archer C7 v2 and lantiq.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
[update from 4.4.68 to 4.4.69]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Rafał Miłecki 0a05fbd135 bcm53xx: add support for TP-LINK Archer C5 V2
This model also contains few partitions non-discoverable partitions we
need to "protect". Othen than that it uses non-deprecated serial entry
in DTS that doesn't work with LEDE so we need to workaround it as well.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
John Crispin bad2f9c4dc Revert "ar71xx: Add support for Teltonika RUT900"
This reverts commit 224e5f5efa.

pepe2k pointed out that this was not ready to merge

Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Michael Lee eee09bfe01 ramips: support jumbo frame on mt7621 up to 2k
Signed-off-by: Michael Lee <igvtee@gmail.com>
7 years ago