Commit graph

18998 commits

Author SHA1 Message Date
Felix Fietkau
9595a9e8d3 kernel: fix return value of usb_xhci_needs_pci_reset
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-02-20 22:29:32 +01:00
Felix Fietkau
c38fb58576 kernel: fix disabling common usb quirks on 4.14
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-02-20 22:19:41 +01:00
INAGAKI Hiroshi
e1d4aa36b0 ramips: add support for Tama W06
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>
2018-02-20 19:25:17 +01:00
Mathias Kresin
cb741654e5 ramips: improve GnuBee Personal Cloud Two support
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: c60a21532b ("ramips: Add support for the GnuBee Personal Cloud Two")
Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-02-20 19:25:17 +01:00
Mathias Kresin
c330408ea9 ramips: use generic board detection for D-Link DAP-1522 A1
Use the generic board detection for the D-Link DAP-1522 A1 instead of the
target specific one as all recent additions are doing.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-02-20 19:25:17 +01:00
Hauke Mehrtens
6eaf8b3d89 lantiq: kernel 4.14: update dts files
Updated the devicetree source files to make use of the following
upstreamed drivers:

 - xrx200 ethernet phy
 - reset controller unit
 - dwc2
 - fpi

Use our custom xrx200 ethernet phy compatible to support boards, which
have switched the vr9 revision during lifetime, with a single devicetree
source file.

By switching to the dwc2 driver + usb phy framework, we don't need to used
our custom gpio power patch and can use a fixed regulator instead.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-02-20 19:25:17 +01:00
Mathias Kresin
f519fea4c6 lantiq: kernel 4.14: cleanup dts files
Move common used parts to dtsi. Add labels to nodes and reference nodes
via labels in dts files.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-02-20 19:25:17 +01:00
Mathias Kresin
82ae68be70 lantiq: kernel 4.14: fix usb
On danube the USB0 registers are at 1e101000 similar to all other lantiq
SoCs.

On Danube and AR9 the USB core is connected to the AHB bus, hence we need
to enable the AHB Bus as well.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-02-20 19:25:17 +01:00
Mathias Kresin
2368f7cb78 lantiq: kernel 4.14: autoselect matching vr9 rev firmware
Add a custom xrx200 ethernet phy compatible to load the firmware matching
the vr9 revision without specifing an expected revision.

We have quite a few boards in the tree were later produced ones are using
a more recent vr9. It is impossible to distinguish which revision of the
vr9 is used without opening the case and removing a heatsink for some of
them.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-02-20 19:25:17 +01:00
Mathias Kresin
a48b4ae38b lantiq: kernel 4.14: don't use CPU interrupt controller IPI IRQ domain support
This reverts kernel commit 1eed40043579 ("MIPS: smp-mt: Use CPU interrupt
controller IPI IRQ domain support"). With the patch applied, the kernel
hangs during boot if SMP is active.

The Lantiq IRQ controller gets registered first and it directly handles
the MIPS native SW1/2 and HW0 - HW5 IRQs. It looks like this controller
already registers IRQ 0 - 7 and the generic driver only gets the following
IRQs starting later.

The upstream discussion can be found at
https://www.linux-mips.org/archives/linux-mips/2017-05/msg00059.html.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-02-20 19:25:17 +01:00
Mathias Kresin
cf53f2180c lantiq: kernel 4.14: select MFD SYSCON for ase
Enable syscon to use it for the RCU MFD on Amazon SE as well.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-02-20 19:25:17 +01:00
Hauke Mehrtens
f1d84023cb lantiq: kernel 4.14: update patches and config
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-02-20 19:25:17 +01:00
Hauke Mehrtens
5eeaba31b8 lantiq: kernel 4.14: copy patches, config and dts files
This just copies the patches, configuration and dts files into the
directories hich are used for kernel 4.14.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-02-20 19:25:17 +01:00
Mathias Kresin
f8a6987cd1 lantiq: make dts files and kernel config kernel version specific
Move the devicetree source files to a kernel specific directory in
preparation of adding kernel 4.14 support.

Rename the subtarget kernel config files to match a specific kernel
version.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-02-20 19:25:17 +01:00
Mathias Kresin
627a28eb09 lantiq: rename gphy firmware
Rename the gphy firmware to match the name requested by kernel 4.14 and
update the devicetree source files to use the new name.

Update the u-boot lantiq Makefile to be compatible with the new names as
well.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-02-20 19:25:17 +01:00
Michael Heimpold
240e1e3fe4 mxs: drop support for 4.9
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2018-02-20 13:25:00 +01:00
Michael Heimpold
4812a3d1b5 mxs: enable LRADC driver
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2018-02-20 13:24:52 +01:00
Zoltan HERPAI
0a2494545e mxs: bump to use 4.14 by default
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2018-02-20 13:24:46 +01:00
Zoltan HERPAI
1bbd66c4fc mxs: add support for 4.14
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2018-02-20 13:24:43 +01:00
John Crispin
ba5f700d7f kernel: ar83xx: remove stray leading space
Signed-off-by: John Crispin <john@phrozen.org>
2018-02-20 10:33:47 +01:00
Tan Hong Hui
1263d07b89 kernel: ar83xx: add support to configure per port VLAN priority
Add support to allow for per switch port VLAN priority (PCP) bits
for the ar8327/8337 chip using the swconfig utility.

Tested on Netgear R7800

Signed-off-by: Tan Hong Hui <hhtan72@yahoo.com>
2018-02-20 10:33:34 +01:00
Koen Vandeputte
2f85985da2 kernel: backport pcie enumeration fix to kernel 4.9
This issue is also present in kernel 4.9 starting from 4.9.71
Adapted the patch, as the fixed function is in another location here.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-02-20 08:32:33 +01:00
Stijn Tintel
858ff4f3e1 Revert "brcm2708: fix sdcard image"
This reverts commit 6c2e1ff80f.

GNU gzip does not fail when the image filename already contains the .gz
extension, this is a problem specific to pigz. Revert the commit, as we
now gzip the image twice.

Reported-by: Martin Schleier <drahemmaps@gmx.net>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2018-02-19 23:52:45 +01:00
Rafał Miłecki
8651f1149d kernel: backport patches simplifying mtd_device_parse_register code
These 2 patches were recently queued for 4.17.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2018-02-19 16:01:44 +01:00
Rafał Miłecki
eefe02b23f kernel: order mtd backported patches by kernel release
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2018-02-19 15:28:47 +01:00
Tim Harvey
1188f35a98 imx6: remove support for 4.9
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-02-19 09:32:43 +01:00
Tim Harvey
8f9668f46c imx6: switch to Linux 4.14
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-02-19 09:32:43 +01:00
Tim Harvey
3b2708f09c imx6: add support for Linux 4.14
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-02-19 09:32:43 +01:00
Tim Harvey
3282e7189f kernel: backport dwc pci enumeration fix
Backport of:  http://patchwork.ozlabs.org/patch/860701/

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-02-19 09:32:43 +01:00
John Crispin
cc8921162f kernel: add missing symbols for v4.14
Signed-off-by: John Crispin <john@phrozen.org>
2018-02-19 09:32:43 +01:00
Hauke Mehrtens
47c5415023 brcm2708: Fix compile after adding kernel 4.9.82
Fixes: f621b53951 ("kernel: bump 4.9 to 4.9.82")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-02-18 19:52:06 +01:00
Hauke Mehrtens
b377a908bf x86: Use kernel 4.14 by default
Support for kernel 4.14 was added 2 months ago, make it now the default
kernel to use for the x86 target.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Stijn Segers <francesco.borromini@inventati.org>
2018-02-18 19:51:58 +01:00
Stijn Tintel
ae42e7c01b kernel: add missing config symbols
They were introduced for arm64 in 4.14.20.

Fixes: 88ba41453d ("kernel: bump 4.14 to 4.14.20")

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2018-02-18 14:34:00 +01:00
John Crispin
761d45eb87 kernel: add missing symbol
this caused v4.14.20 based builds so fail on aarch64

Signed-off-by: John Crispin <john@phrozen.org>
2018-02-18 09:21:12 +01:00
Stijn Tintel
f621b53951 kernel: bump 4.9 to 4.9.82
Refresh patches.
Remove upstreamed patches:
- ar7/002-MIPS-AR7-ensure-the-port-type-s-FCR-value-is-used.patch
- backport/040-crypto-fix-typo-in-KPP-dependency-of-CRYPTO_ECDH.patch
Remove layerscape/819-Revert-dmaengine-dmatest-move-callback-wait-queue-to.patch,
it is superseded by upstream commit 297c7cc4b5651b174a62925b6c961085f04979fd.
Remove pending/650-pppoe_header_pad.patch, it is superseded by
upstream commit 1bd21b158e07e0b8c5a2ce832305a0ebfe42c480.
Update patches that no longer apply:
- ar71xx/004-register_gpio_driver_earlier.patch
- hack/204-module_strip.patch
- pending/493-ubi-set-ROOT_DEV-to-ubiblock-rootfs-if-unset.patch

Fixes CVE-2017-8824.

Compile-tested: ar71xx.
Runtime-tested: ar71xx.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2018-02-18 02:59:57 +01:00
Stijn Tintel
88ba41453d kernel: bump 4.14 to 4.14.20
Refresh patches.
Remove upstreamed patches:
- backport/080-v4.15-0001-arch-define-weak-abort.patch
- backport/081-v4.15-0002-kernel-exit.c-export-abort-to-modules.patch
Update patch that no longer applies:
pending/493-ubi-set-ROOT_DEV-to-ubiblock-rootfs-if-unset.patch

Fixes CVE-2017-8824.

Compile-tested: octeon, x86/64.
Runtime-tested: octeon, x86/64.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2018-02-18 02:59:48 +01:00
Stijn Tintel
6c2e1ff80f brcm2708: fix sdcard image
The gzip step in the sdcard image build fails because the image filename
already has the gzip extension. This results in an empty image file, to
which the metadata is finally appended.

Remove the .gz extension from the image filename to fix this.

Fixes: e79b096ee1 ("brcm2708: convert to metadata")

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2018-02-17 21:00:49 +01:00
Evgeniy Didin
4cedd1ddb3 archs38: add HSDK board to network configure scripts
In the initial patch which adds HSDK board there were no update
of network configuration scripts. Without it by default static IP
is set for br-lan and there is no access to internet.
This patch fixes the issue.

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
CC: Alexey Brodkin <abrodkin@synopsys.com>
CC: Hauke Mehrtens <hauke@hauke-m.de>
CC: John Crispin <john@phrozen.org>
2018-02-17 12:29:55 +01:00
Hauke Mehrtens
6be73c07db sunxi: Add Xunlong Orange Pi Zero Plus
This is based on a patch from armbian:
https://github.com/armbian/build/blob/master/patch/kernel/sunxi-next/sunxi-add-orangepi-zero-plus.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-02-17 01:15:25 +01:00
Hauke Mehrtens
ef73ebbfe2 sunxi: Add Realtek PHY driver or ARM64 devices
The Orange Pi Zero Plus uses a RTL8211E, add the driver for this PHY.
This is probably used on more boards with a Allwinner SoC.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-02-17 01:15:24 +01:00
Antony Antony
3c24a1d423 sunxi: add support for NanoPi NEO Plus2 board
arm64: allwinner: h5: NanoPi NEO Plus2 DT support
Add initial DT for NanoPi NEO Plus2 by FriendlyARM
    - Allwinner quad core H5 Cortex A53 with an ARM Mali-450MP GPU
    - 1 GB DDR3 RAM
    - 8GB eMMC flash (Samsung KLM8G1WEPD-B031)
    - micro SD card slot
    - Gigabit Ethernet (external RTL8211E-VB-CG chip)
    - 802.11 b/g/n WiFi, Bluetooth 4.0 (Ampak AP6212A module)
    - 2x USB 2.0 host ports & 2x USB via headers

Signed-off-by: Antony Antony <antony@phenome.org>
2018-02-17 01:15:24 +01:00
Antony Antony
b7a1aa4df2 sunxi: add kernel DT for NanoPi NEO Plus2 board
Linux Kernel upstream commit d73413058

Signed-off-by: Antony Antony <antony@phenome.org>
2018-02-17 01:15:24 +01:00
Mathias Kresin
7a6de6d77a ar71xx: fix sysupgrade syntax error
Fix syntax error introduced with 188328111b ("treewide: move
nand_do_upgrade call to platform_do_upgrade").

Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-02-16 22:56:56 +01:00
Mathias Kresin
188328111b treewide: move nand_do_upgrade call to platform_do_upgrade
Calling nand_do_upgrade() from platform_pre_upgrade() was deprecated
with 30f61a34b4 ("base-files: always use staged sysupgrade").

Update the platform upgrade code to use platform_do_upgrade() for NAND
images as well.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-02-16 14:44:02 +01:00
Mathias Kresin
c4ac02ffca treewide: remove obsolete sysupgrade watchdog kill
The watchdog kill command was meant for busybox watchdog. Busybox watchdog
was replaced by the procd watchdog mid 2013 with commit df7ce9301a
("busybox: disable the watchdog utility by default"), which makes the kill
command obsolete since quite some time.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-02-16 14:44:02 +01:00
Zoltan HERPAI
eae6003174 sunxi: switch to kernel 4.14
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2018-02-16 12:20:39 +01:00
John Crispin
6873cf4f63 kernel: add missing symbols
These cause mediatek arm to fail full builds

Signed-off-by: John Crispin <john@phrozen.org>
2018-02-16 10:02:08 +01:00
Roman Yeryomin
f4e5880d0f ramips: preliminary support for 4.14
- removed upstreamed patches
- 0901-spansion_nand_id_fix.patch is disabled, not clear if it's needed

Signed-off-by: Roman Yeryomin <roman@advem.lv>
Signed-off-by: John Crispin <john@phrozen.org>
2018-02-15 10:46:39 +01:00
Jo-Philipp Wich
dc7a1e8555 ramips: fix reporting effective VLAN ID on MT7621 switches
On MT7621, the REG_ESW_VLAN_VTIM reads are undefined, causing swconfig
to always report `vid: 0` in swconfig show output.

Since a 4K VLAN table is used on this platform, the VLAN ID always
correponds to the actual VLAN table index so provide a specific MT7621
implementation of the get_vid callback which returns the table index
as VLAN ID.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-02-14 16:43:30 +01:00
Jo-Philipp Wich
341b1427fc ramips: properly map pvid for vlans with remapped vid on mt7530/762x switches
Currently, untagged port primary vlan IDs are set to the VLAN table index,
and not the actual VLAN ID, breaking configurations with IDs deviating from
the VLAN index.

Fix the issue by resolving the per-port pvid property to the target VLAN ID
value before committing to the hardware.

Fixes FS#991, FS#1147, FS#1341

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-02-14 16:43:30 +01:00
Jo-Philipp Wich
bb4002c79d ramips: don't clobber vlans with remapped vid on mt7530/762x switches
Avoid overwriting vlan entries with remapped vid in later iterations of
the vlan enumeration loop of mt7530_apply_config().

Fix the problem by refactoring the code to first reset the entire table,
then reprogram only vlans with members to prevent overwriting configured
vlans with unconfigured ones.

Fixes FS#1147, FS#1341

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-02-14 16:43:29 +01:00
Jo-Philipp Wich
b9aca834e8 at91: fix image building with CONFIG_TARGET_MULTI_PROFILE
The current image build code has a number of race conditions and interface
contract violations in the custom image build steps:

 - Build/install-zImage, solely used by at91, relies on $(PROFILE_SANITIZED)
   which is not available when building with CONFIG_TARGET_MULTI_PROFILE

 - Build/at91-sdcard, which may run concurrently, creates scratch files at
   fixed locations and manipulates target files directly which can lead
   to file corruption and other unexpected failures

Rename the install-zImage macro to at91-install-zImage and move it to the
at91 image Makefile since this target is the sole user. Also utilize "$@"
as output file name and switch the usage of $(PROFILE_SANITIZED) to
$(DEVICE_NAME) in order to fix naming under multi profile builds.

Fix the at91-sdcard macro to construct scratch file paths relative to "$@",
which is guaranteed to be unique and store the final artifact output in "$@"
as well, instead of inside $(BIN_DIR). The generic image build code takes
care of moving a build steps "$@" output to the final destination in a
concurrency-safe manner.

Finally remove the broken install-zImage from the generic image-commands
Makefile.

Fixes: d7a679a036 ("at91: Install zImage.")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-02-14 15:47:16 +01:00
John Crispin
7762c07c88 mediatek: bump to v4.14
This drops support for all the !emmc EVB and adds banannaPi-R2
Also drop mtkhnat until the nftables offoad driver is ready

Signed-off-by: John Crispin <john@phrozen.org>
2018-02-14 11:27:50 +01:00
Dongming Han
04d3308b62 ipq806x: add support for GL.iNet GL-B1300
This patch adds support for GL.iNet GL-B1300

Specification:
- SOC:        IPQ4028 / QCA Dakota
- RAM:        256 MiB
- FLASH:      32 MiB
- ETH:        Qualcomm Atheros QCA8075 Gigabit Switch (2 x LAN, 1 x WAN)
- USB:        1 x 3.0 (via Synopsys DesignWare DWC3 controller in the SoC)
- WLAN1:      Qualcomm Atheros QCA4028 2.4GHz 802.11bgn 2:2x2
- WLAN2:      Qualcomm Atheros QCA4028 5GHz 802.11a/n/ac 2:2x2
- INPUT:      one reset and one WPS button
- LEDS:       3 leds: Power, WIFI(only for 2.4G currently), and one reserved
- UART:       1 x UART on PCB (3.3V, TX, RX, GND) - 115200 8N1

Installation:
Method 1:
- use serial port to stop uboot
- uboot command: run lf
Method 2:
- push down reset button and power on
- wait until three leds constantly on then release
- upgrade by uboot web at http://192.168.1.1
Note:
- the sysupgrade image need to be renamed to lede-gl-b1300.bin in both method.
- the sysupgrade image can be automatically downloaded if tftp server at
  192.168.1.2 have that file.
- the wifi led will be flashing when writing image.

Signed-off-by: Dongming Han <handongming@gl-inet.com>
2018-02-14 09:40:32 +01:00
Evgeniy Didin
d55a05fc9e archs38: add HSDK board
Synopsys DesignWare HSDK (which stands for ARC HS
Development Kit) is the latest and greatest development
platform that sports quad-core ARC HS38 in real silicon.

Most noticeable features of the board are:
 * Quad-core ARC HS38 CPU running at 1GHz
 * 4Gb of DDR
 * Built-in Vivante GPU (well supported via open source
   Etnaviv drivers)
 * Built-in Wi-Fi/Bluetooth module (RedPine RS-9113)

And as usual we have:
 * [micro] SD-card slot
 * 2 USB 2.0 ports
 * 1Gbit Ethernet port
 * Built-in Digilent JTAG probe
 * Serial port accessible via micro-USB port

For more information about HSDK board visit:
https://www.synopsys.com/dw/ipdir.php?ds=arc-hs-development-kit

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
CC: Alexey Brodkin <abrodkin@synopsys.com>
CC: Hauke Mehrtens <hauke@hauke-m.de>
CC: John Crispin <john@phrozen.org>
2018-02-14 07:54:24 +01:00
Evgeniy Didin
0a1a672e95 archs38: switch to kmod-usb2
We have managed to get USB 2.0 working good enough
on all archs38 platforms so we're ready to switch
to much faster USB 2.0.

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
CC: Alexey Brodkin <abrodkin@synopsys.com>
CC: Hauke Mehrtens <hauke@hauke-m.de>
CC: John Crispin <john@phrozen.org>
2018-02-14 07:54:24 +01:00
Kevin Darbyshire-Bryant
0b4e3b1bed generic: swconfig: reduce lock duration on sysfs files
sysfs attributes 'port_mask' & 'speed_mask' held locks whilst doing
mundane tasks such as sprintf.  Refactor code to reduce length of time
locks are held unnecessarily.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2018-02-14 07:54:24 +01:00
Kevin Darbyshire-Bryant
eb8fbc4318 generic: swconfig: add mode led attribute
Add sysfs 'mode' attribute to swconfig controlled LEDs.

swconfig 'link state' LEDs blink in the presence of port traffic.  This
behaviour becomes more obvious as switches start to support
get_port_stats() e.g. commits 0369e35891,
3056d09b40,
4ddbc43cc1,
4d8a66d934.

This blinking can be confusing/distracting if the switch has other LEDs
used to indicate traffic.  Provide a 'mode' sysfs attribute that
controls the blink on traffic behaviour.

mode - either "none" (LED is off) or a space separated list of one or more:

link: LED's normal state reflects whether the link is up (has carrier) or not
tx:   LED blinks on transmitted data
rx:   LED blinks on receive data

Note that 'link' considers any port speed mask that may be applicable.
e.g. if an LED is configured to indicate 1Gbit link speed and mode is
set to 'link rx tx' but the port is connected at 100Mbit then the LED
will not light or blink. A mode of 'tx rx' will blink in the presence of
traffic only if the port matches the rate (if configured)
This maintains compatibility with existing behaviour.

Attribute is 'link tx rx' by default for backwards compatible behaviour.

Many thanks to Thibaut Varene for providing a more sensible led_event
routine after I had mangled the original, and other coding style hints.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Acked-by: Thibaut VARENE <hacks@slashdirt.org>
2018-02-14 07:54:24 +01:00
Hauke Mehrtens
0bd5aa89fc mvebu: Migrate uci config to new PCIe path
The name of the PCIe controller node in device tree changed between
kernel 4.9 and kernel 4.14. Migrate the configuration when an update
from kernel 4.9 to 4.14 or back is done to the new name to make
the existing wifi configuration compatible with the new names.

This replaces the "pcie-controller" part with "pcie" on all nodes if the
file exists in sys fs.

This is not done in the uci-defualts, because they are getting executed
to late in the boot process. The kernel module gets loaded before the
uci-defaults scripts are executed. When the mwlwifi driver gets loaded
it will trigger an event via hotplug to detect new devices and as the
paths are not in the uci configuration they will be added again.
When the migration is done before the script will detect that they are
already there.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-02-13 22:30:59 +01:00
Hauke Mehrtens
4ccad92229 mvebu: Add support for kernel 4.14
Add support for kernel 4.14 to the mvebu target.

This also replaces the old sfp and phylink patches with new versions
from Russell's clearfog-4.13 branch
http://git.arm.linux.org.uk/cgit/linux-arm.git/log/?h=clearfog-4.13

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-02-13 22:29:56 +01:00
Hauke Mehrtens
47106f55e0 mvebu: move files to files-4.9 and files-4.4 folder
This is needed to prevent copying it into kernel 4.14.
These device tree files are already integrated into kernel 4.14 and we
would like to use the upstream versions only.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-02-13 22:24:56 +01:00
Hauke Mehrtens
87b35c16ad kernel: ubifs: create use file system format 4 by default
Instead of creating an ubifs file system with format version 5 by
default on empty UBI volumes use the older format 4 by default. This
will make it possible to mount these file systems also on older kernel
versions.

When a user wants to do a sysupgrade from kernel 4.14 to kernel 4.9 the
old kernel has to read the file system created by the more recent kernel
which currently does not work for ubifs.

This fixes the problem by creating file systems which are compatible
with older kernel versions by default.
Kernel 4.14 will still be able to read and write UBI FS file system
version 5, it will just not be used when a ubifs partition is created
implicitly on an empty UBI volume.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-02-13 22:24:56 +01:00
Hauke Mehrtens
970cbfc307 kernel: Add missing config options
These were found when compiling the new octeontx target.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-02-13 22:24:02 +01:00
Jonas Gorski
0f063f8ac7 brcm63xx: drop root parameter from cmdline
The root= parameter overrides the automatic rootfs detection by partition
name, so drop it. Fixes boot from flash after renumeration changes of
partitions due to parser changes.

Fixes FS#1350.

Fixes: a27d59bb42 ("brcm63xx: switch to new partition layout specification")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2018-02-13 13:17:26 +01:00
Stefan Lippers-Hollmann
4baffa02ce ipq806x: switch to full dual-boot for the nbg6817 sysupgrade support
Instead of writing to the currently booted partition set, this
implements full dual-boot support for sysupgrade by always writing to
the other, currently inactive, partition set and toggling the dualflag
after a successful flash.

The currently active/ booted partition set is determined by parsing
/proc/cmdline for its rootfs parameter (supplied by the DTS), instead
of reading from the 0:DUAL_FLAG mtd, in order to prevent (potentially)
bricking both partition sets.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
2018-02-13 12:45:00 +01:00
Stefan Lippers-Hollmann
42fe7b3bbe ipq806x: request the first free loop device dynamically for the nbg6817 sysupgrade
Instead of hardcoding /dev/loop0, it's safer to query for the first
free loop device and assign that dynamically. While /dev/loop0 is a
reasonable assumption immediately following "losetup --detach-all",
detaching the mounted overlay is no longer strictly necessary once
dual-boot support has been added for the nbg6817.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
2018-02-13 12:45:00 +01:00
Stefan Lippers-Hollmann
b36cf0be30 ipq806x: use absolute the device path in $kernel for the nbg6817 sysupgrade
Harmonize the variable usage for $kernel and $rootfs to always contain
the full device path, instead of just its basename.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
2018-02-13 12:45:00 +01:00
Luis Araneda
887925b098 ipq806x: support new location of USB PHY kernel module
PHY drivers were grouped into vendor specific directories
by upstream commit 0b56e9a7e8358e59b21d8a425e463072bfae523c

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
2018-02-13 11:56:40 +01:00
Julien Dusser
8dd455e3c4 ar71xx: add more registers to ar71x_regs.h
Add more registers and flags to ar71x_regs.h for QCA955x and QCA956x
SoCs. Values come from Qualcomm Atheros u-boot code.

Patches can be merged into
622-MIPS-ath79-add-more-register-defines-for-QCA956x-SoC.patch

Signed-off-by: Julien Dusser <julien.dusser@free.fr>
2018-02-13 11:20:58 +01:00
George Hopkins
13f9e40602 ramips: add support for D-Link DAP-1522 A1
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>
2018-02-13 11:18:07 +01:00
George Hopkins
5c7a58764e kernel: mtdsplit: split by WRG header
Support splitting WRG images, which can be found in older
D-Link devices.

Signed-off-by: George Hopkins <george-hopkins@null.net>
2018-02-13 11:16:49 +01:00
John Crispin
6e7357097f kernel: add missing symbol
Signed-off-by: John Crispin <john@phrozen.org>
2018-02-13 10:55:46 +01:00
Karl Palsson
b2a5f7683b ar71xx: Add eTactica EG-200 support
EG-200 is a DIN rail mountable device with one ethernet port, wifi,
an RS-485 port, and an internal USB attached uSD card reader.

Two leds, "modbus" and "etactica" are managed by userspace applications
in factory firmware.

Flash instruction:
    Original firmware is based on OpenWrt.
    Use sysupgrade image directly in vendor GUI.

Signed-off-by: Karl Palsson <karlp@etactica.com>
2018-02-13 10:01:53 +01:00
INAGAKI Hiroshi
192b5a7710 ramips: use new image build code for WHR-G300N
The tftp.bin image for Buffalo WHR-G300N was not built, so I was fixed
it after rewriting to new image build code. And the code for
factory-EU.bin was broken, so I deleted it.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-02-13 10:01:53 +01:00
John Crispin
5555545494 mediatek: remove the CPU_SUBTYPE
Signed-off-by: John Crispin <john@phrozen.org>
2018-02-13 10:01:53 +01:00
Koen Vandeputte
5adf16b492 cns3xxx: remove linux 4.9 support
- Remove kernel 4.9 support
- Apply specific 4.14 changes directly to source
- Refreshed all

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-02-13 10:01:53 +01:00
John Crispin
1fe888554c kernel: add missing symbol for v4.14
Signed-off-by: John Crispin <john@phrozen.org>
2018-02-13 10:01:52 +01:00
Tim Harvey
fc03b3aa16 octeontx: add support for OCTEON TX target
The Cavium OCTEON TX is an ARM 64-bit SoC leveraging CPU cores and
periperhals from the Cavium ThunderX SoC.

This initial support provides a 4.14 kernel and kernel+initramfs that is
bootable on the Gateworks Newport GW630x as well as the Cavium sff8104
reference board.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2018-02-13 10:01:52 +01:00
Michael Heimpold
f34b118b35 mxs: rename files to files-4.9
The Device Tree file for I2SE Duckbill boards was updated upstream.
Let's use the upstream version for upcoming kernel 4.14 by keeping
our current version for v4.9 still around.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2018-02-13 10:01:52 +01:00
Rosen Penev
c60a21532b ramips: Add support for the GnuBee Personal Cloud Two
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>
2018-02-13 10:01:52 +01:00
Yangbo Lu
f226e652f6 layerscape: fix call trace of pfe module removing
Updated pfe kernel patch to clean up iounmap(pfe->ddr_baseaddr).
pfe->ddr_baseaddr was got through phys_to_virt() not ioremap(),
so iounmap() for pfe->ddr_baseaddr should be removed.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2018-02-13 10:01:51 +01:00
Yangbo Lu
35a61fef56 layerscape: fix DPAA2 QDMA issue
This patch is to reverse a upstream dmatest patch for now
which is causing DPAA2 QDMA test issue.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2018-02-13 10:01:51 +01:00
Yangbo Lu
f78168be62 layerscape: add a make menuconfig known issue in README
This patch is to add a known issue of make menuconfig
in README file. This is also a common issue for OpenWrt.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2018-02-13 10:01:51 +01:00
Yangbo Lu
7b93a18b10 layerscape: fix type for kernel 4.9 dpaa2_mac_get_stats() function
This patch changes the declarations of ndo_get_stats64 handlers
to the previous struct rtnl_link_stats64 * return type instead of
the mainline void return.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2018-02-13 10:01:51 +01:00
Yangbo Lu
94698fa6ab layerscape: update README
Tis patch is to fix up some descriptions in README.
Per-device rootfs had been supported, and a known issue
had been found. These also should be updated accordingly.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2018-02-13 10:01:51 +01:00
Yangbo Lu
1079a03886 layerscape: support ubifs rootfs
Some layerscape devices (ls1012ardb/ls1012afrdm/ls1046ardb/ls1088ardb)
were using ext4 rootfs because there were issues using squashfs.
This patch is to drop using ext4 rootfs and use ubifs rootfs instead
which is more proper for SPI-NOR flash.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2018-02-13 10:01:51 +01:00
Yangbo Lu
841ad46b90 layerscape: remove USB configs for 64-bit
Removed USB configs for 64-bit device since they're
already in kmod package.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2018-02-13 10:01:50 +01:00
Yangbo Lu
6e9a5f4db4 layerscape: remove USB and TI specific configs for 32-bit
This patch is to remove USB configs for 32-bit device since
they're already in kmod package. Also removed TI platform
specific configs.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2018-02-13 10:01:50 +01:00
Yangbo Lu
1a28100e68 layerscape: update patches-4.9 to LSDK1712
Patches changes
- Updated patches-4.9 to NXP LSDK1712 linux-4.9.
- Merged changes of patch 303 into integrated patch 201.
- Split changes of patch 706 into dpaa part and dpaa2
  part, and merged these changes into integrated patches
  701 and 705.
- Removed patch 819 since ehci-fsl driver could be compiled now.
- Refreshed these patches.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2018-02-13 10:01:49 +01:00
Yangbo Lu
5f36f3193f layerscape: update build guide in README
Added package feeds updating and installing in build guide
of README.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2018-02-13 10:01:49 +01:00
Henryk Heisig
a338491a30 ar71xx: add support for TP-Link RE355
This device is identical as TP-Link RE450
RE355 is a dual-band AC1200 router, based on Qualcomm/Atheros
QCA9558+QCA9880.

Specification:

720/600/200 MHz (CPU/DDR/AHB)
64/128 MB of RAM (DDR2)
8 MB of FLASH (SPI NOR)
3T3R 2.4 GHz
3T3R 5 GHz
1x 10/100/1000 Mbps Ethernet
7x LED, 3x button
UART header on PCB

Flash instruction:
Web:
Download lede-ar71xx-generic-archer-c60-v2-squashfs-factory.bin
and use OEM System Tools - Firmware Upgrade site.

Signed-off-by: Henryk Heisig <hyniu@o2.pl>
2018-02-13 09:21:20 +01:00
Jonas Gorski
8fdfba3d1a brcm63xx: switch to kernel 4.9
Now that we have support for it, let's switch to kernel 4.9.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2018-02-12 11:45:33 +01:00
Jonas Gorski
cf90313ab2 ar7: switch to kernel 4.9
With generic run tested and ac49x compile tested, and no complaints so
far, let's switch to 4.9.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2018-02-12 11:45:33 +01:00
Jonas Gorski
09bc44454f ar7: fix ac49x compilation with 4.9
This will introduce a warning on 3.18, but fixes an error when
compiling for 4.9.

Fixes: cf9e0a59aa ("ar7: add kernel 4.9 support")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2018-02-12 11:45:33 +01:00
John Crispin
a464fba7eb Revert "mediatek: activate fpu feature flag"
This reverts commit 3594447a7d.

This causes the userland to not come up properly

Signed-off-by: John Crispin <john@phrozen.org>
2018-02-12 11:36:24 +01:00
Jonas Gorski
e2ec3f7550 mvebu: fix sysupgrade from 17.04 for clearfog pro
When clearfog was renamed to clearfog pro, it broke sysupgrade from
17.04 as the new images now get rejected as incompatible. Fix this by
adding the legacy boardname to the compatible devices.

Fixes: ec4a8c6dee ("mvebu: ClearFog renamed upstream to ClearFog Pro")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2018-02-11 23:15:05 +01:00
Jonas Gorski
1ba38f6100 brcm63xx: add kernel 4.14 support
Add support for kernel 4.14. Increases compressed kernel size by ~64k
compared to 4.9.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2018-02-11 23:15:05 +01:00
Jonas Gorski
b0c5e8b927 brcm63xx: add kernel 4.9 support
Add support for kernel 4.9 based on the more upstream comformant
partition defintions. Increases compressed kernel size by ~95k
compared to 4.4.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2018-02-11 23:15:05 +01:00
Jonas Gorski
a27d59bb42 brcm63xx: switch to new partition layout specification
Now that we support parsing the expected upstream definition, update
the dts files to it.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2018-02-11 23:15:05 +01:00
Jonas Gorski
85f31afa88 brcm63xx: enhance dt partitions support to match upstream more closely
Partitions are supposed to be enclosed in an extra partitions node. Allow
the bcm63xxpart parser to cope with that.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2018-02-11 23:15:05 +01:00
Jonas Gorski
a41ad1b6f6 brcm63xx: backport latest bcm63xx_enet changes from upstream
No functional changes, just simple cleanups.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2018-02-11 23:15:05 +01:00
Jonas Gorski
457e7a160a brcm63xx: fix ephy reset gpio lookup
The lookup needs to be called just "reset" for the common code.

Fixes: 054c0d4e31 ("brcm63xx: backport mdio-bus reset gpio support")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2018-02-11 23:14:56 +01:00
Matthias Schiffer
355009ebe7
ar71xx: add missing config symbol ATH79_MACH_CF_E375AC
Fixes: bf66bb8c96 "ar71xx:add support for COMFAST CF-E375AC"
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2018-02-11 18:41:25 +01:00
Hauke Mehrtens
3594447a7d mediatek: activate fpu feature flag
The arm CPUs uses in the supported Mediatket SoCs have a FPU accordingly
to the datasheet, activate it also. The CPU subtype "neon-vfpv4" is
selected, but the toolcahin generated for this SoC will still be
compiled with soft float and not with the hard float ABI as we haven't
the fpu feature flag set. If this toolchain is reused by other targets
this will even affect other targets.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-02-11 16:42:28 +01:00
Sven Eckelmann
25a72f5a01 ipq-wifi: drop OpenMesh A42 board-2.bin
The BDFs for OpenMesh A42 were upstreamed [1] to the ath10k-firmware
repository and are now part of ath10k-firmware 2018-01-26. The
ipq-wifi-openmesh_a42 package can now be dropped because OpenWrt already
ships the QCA4019 board-2.bin from this version.

[1] https://wireless.wiki.kernel.org/en/users/drivers/ath10k/boardfiles

Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2018-02-11 16:33:00 +01:00
Ding Tengfei
bf66bb8c96 ar71xx:add support for COMFAST CF-E375AC
COMFAST CF-E375AC is a ceiling mount AP with PoE support, based on
Qualcomm/Atheros QCA9563 + QCA9886 + QCA8337.

Short specification:

    2x 10/100/1000 Mbps Ethernet, with PoE support
    128MB of RAM (DDR2)
    16 MB of FLASH
    3T3R 2.4 GHz, 802.11b/g/n
    2T2R 5 GHz, 802.11ac/n/a, wave 2
    built-in 5x 3 dBi antennas
    output power (max): 500 mW (27 dBm)
    1x RGB LED, 1x button
    built-in watchdog chipset

Flash instruction:

Original firmware is based on OpenWrt.
Use sysupgrade image directly in vendor GUI.

Signed-off-by: Ding Tengfei <dtf@comfast.cn>
2018-02-11 16:20:24 +01:00
David Bauer
f17173f5a3 ar71xx: remove bs-partition ro-flag for UniFi AC
This removes the read-only flag from the bs (bootselect) partition
on UniFi AC devices. This allows to correct the indicator from which
partition the device is booting its kernel from.

See also:
 - https://github.com/freifunk-gluon/gluon/issues/1301
 - https://bugs.lede-project.org/index.php?do=details&task_id=662

Signed-off-by: David Bauer <mail@david-bauer.net>
2018-02-11 16:16:03 +01:00
Henryk Heisig
14951e8f8e ramips: add support for TP-Link Archer C50 v3
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>
2018-02-11 16:04:16 +01:00
Henryk Heisig
e39a240ba2 ramips: ArcherC20v4: use common TP-Link dtsi file
and remove common part from dts file.

Signed-off-by: Henryk Heisig <hyniu@o2.pl>
2018-02-11 16:04:16 +01:00
Henryk Heisig
368a7f4cec ramips: change the TP-Link dtsi filename
Signed-off-by: Henryk Heisig <hyniu@o2.pl>
2018-02-11 16:04:16 +01:00
Pawel Dembicki
680e867d7f kernel: mtdsplit: Add support for D-link JBOOT
The D-Link devices with JBOOT bootloader use their own kernel
image header (stag + sch2 headers).

This driver find jImage header and set rootfs start after kernel file.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2018-02-11 16:02:52 +01:00
David Bauer
1113fcdc80 ipq806x: mark AVM FB4040 switchport as untagged
This commit marks the CPUs switchport explicit as untagged.
Otherwise, an eth0.1 interface is created and the devices
LAN-ports are not working.

Signed-off-by: David Bauer <mail@david-bauer.net>
2018-02-11 16:02:52 +01:00
Zoltan HERPAI
1ba6d59f2b x86: add preinit hook to reload microcode
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2018-02-11 14:39:24 +01:00
Zoltan HERPAI
72d949e7ba x86: enable microcode loading for Intel and AMD
Enable for 4.9 and 4.14.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2018-02-11 14:39:12 +01:00
Arne Zachlod
186aebf90a
ar71xx: Orders the names of the devices alphabetically.
Signed-off-by: Arne Zachlod <arne@nerdkeller.org>
2018-02-11 00:08:25 +01:00
Adrià Llaudet
90ceb0aeb1 imx6: use DTS_DIR at image build code
Use "$(DTS_DIR)", defined at include/image.mk, instead of
"$(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts" in order to generalize and
allow a better Device/* device-tree parameterization (i.e. DEVICE_DTS_DIR
and DTS_DIR).

Signed-off-by: Adrià Llaudet <adria.llaudet@gmail.com>
2018-02-10 21:02:53 +01:00
Evgeniy Didin
2fca8aa73e archs38: bump kernel to 4.14.
Update Linux kernel version from 4.9 to 4.14 for archs38.
config-4.14 was simply regenerated with "make kernel_menuconfig".

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: John Crispin <john@phrozen.org>
2018-02-10 20:59:52 +01:00
Evgeniy Didin
b38758d4d4 kernel: backport fix undefined abort
While building mpi.ko module with stable Linux v4.14.14 an error occured:
>ERROR: "abort" [lib/mpi/mpi.ko] undefined!
In upstream Linux 4.15 this issue is fixed:
Commit 7c2c11b208be ("arch: define weak abort()")
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7c2c11b208be09c156573fc0076b7b3646e05219

Commit dc8635b78cd8 ("kernel/exit.c: export abort() to modules")
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dc8635b78cd8669c37e230058d18c33af7451ab1

So lets add backport patches until these fixes
are not applied in stable version.

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
CC: John Crispin <john@phrozen.org>
CC: Hauke Mehrtens <hauke@hauke-m.de>
2018-02-10 20:58:39 +01:00
Hauke Mehrtens
3a2a54c055 kernel: rename CONFIG_TRACE_ENUM_MAP_FILE to CONFIG_TRACE_EVAL_MAP_FILE
This config option was renamed in upstream Linux commit 681bec0367
("tracing: Rename update the enum_map file")

Reported-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-02-10 15:39:00 +01:00
Felix Fietkau
634673b215 ixp4xx: remove linux 4.4 support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-02-09 10:29:07 +01:00
Stijn Tintel
9a08c104e2 octeon: switch to kernel 4.14
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2018-02-08 19:04:38 +01:00
Stijn Tintel
3072908d0d kernel: bump 4.14 to 4.14.18
Refresh patches.

Remove upstreamed patches:
- apm821xx/010-crypto-gcm-add-GCM-IV-size-constant.patch
- backport/040-crypto-fix-typo-in-KPP-dependency-of-CRYPTO_ECDH.patch
Remove pending-4.14/650-pppoe_header_pad.patch, it is superseded by
upstream commit d32e5740001972c1bb193dd60af02721d047a17e.
Update patch that no longer applies: hack/204-module_strip.patch

Compile-tested: octeon, x86/64.
Runtime-tested: octeon, x86/64.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2018-02-08 18:43:13 +01:00
Daniel Golle
32f120b783 ramips: various fixes for zbt-we1226
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>
2018-02-06 03:00:33 +01:00
Daniel Danzberger
653af8ffd3 kernel: fix forwarding locally generated packages in bridge isolation patch
Locally generated packets weren't forwarded to the isolated interfaces in a
bridge. Isolation should only prevent the flooding of incomming packets to
other interfaces in the bridge.

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-02-05 10:16:26 +01:00
Felix Fietkau
d3ea5fc9f3 ramips: use napi_alloc_frag and skb_free_frag
Slightly improves rx performance

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-02-05 10:16:26 +01:00
Felix Fietkau
968b861612 ramips: improve NAPI polling to increase GRO batch size
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-02-05 10:16:26 +01:00
Felix Fietkau
798497c66e ar71xx: use global timestamp for hang check
Shrink the size of struct ag71xx_buf to 8 bytes, which improves cache
footprint

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-02-05 10:16:25 +01:00
Felix Fietkau
31e6016d2e ar71xx: only access device stats in tx handler if packets were processed
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-02-05 10:16:25 +01:00
Felix Fietkau
890e7458b0 ar71xx: allocate rx/tx descriptor/buffers in one chunk
Reduces false sharing due to cache aliases

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-02-05 10:16:25 +01:00
Rosen Penev
4e03a742e0 ag71xx: Reorder ag71xx struct members for better cache performance
Qualcomm claims this improves the D-cache footprint. Origina commit message below:

From: Ben Menchaca <ben.menchaca@qca.qualcomm.com>
Date: Fri, 7 Jun 2013 10:57:28 -0500
Subject: [ag71xx] cluster/align structs for cache perf

Cluster the frequently used, per-packet structures in ag71xx near
to each other, and cacheline-align them.  Some other re-ordering
occurred to move "warmer" structures near the per-packet structures.

Signed-off-by: Ben Menchaca <ben.menchaca@qca.qualcomm.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2018-02-05 10:16:25 +01:00
Felix Fietkau
cde71a543c build: replace uses of OpenWrt with $(VERSION_DIST)
This makes the distribution name more configurable.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-02-05 10:15:53 +01:00
Matthias Schiffer
0c719bfcaf
ar71xx: /lib/ar71xx.sh: add model detection for TP-Link TL-WR810N
Properly report the revision in /tmp/sysinfo/model.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2018-02-03 14:13:26 +01:00
Jo-Philipp Wich
fd30187c87 imagebuilder: fix reference to removed VERSION_SED variable
Fixes: ff8e9a4ecb ("treewide: combine VERSION_SED and VERSION_SED_SCRIPT")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-02-02 14:41:35 +01:00
Matthias Schiffer
3f7908d697
ar71xx-generic: enable ATH79_MACH_TL_WR841N_V8 machine
This machfile also contains the code for the TL-WR842N/ND v2, which is in
ar71xx-generic and not in ar71xx-tiny.

Fixes: 0cd5e85e7a "ar71xx: create new ar71xx/tiny subtarget for 4MB flash
devices"
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2018-01-31 21:18:16 +01:00
Yousong Zhou
82ceb2ad2a build: add config option KERNEL_MIPS_FPU_EMULATOR
To make it more accessible for nodejs users to configure and run a build
on mips target lacking hardware fpu

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-01-29 15:06:53 +08:00
Catrinel Catrinescu
4ba2dd130a ar71xx: add ew-balin platform from Embedded Wireless
Add the Embedded Wireless "Balin" platform
 SoC: QCA AR9344 or AR9350
 RAM: DDR2-RAM 64MBytes
 Flash: SPI-NOR 16MBytes
 WLAN: 2 x 2 MIMO 2.4 & 5 GHz IEEE802.11 a/b/g/n
 Ethernet: 3 x 10/100 Mb/s
 USB: 1 x USB2.0 Host/Device bootstrap-pin at power-up
 PCI-Express: 1 x lane PCIe 1.2
 UART: 1 x Normal, 1 x High-Speed
 JTAG: 1 x EJTAG
 GPIO: 10 x Input/Output multiplexed

The module comes already with the current vanilla OpenWrt firmware.
To update, use "sysupgrade" image directly in vendor firmware.

Signed-off-by: Catrinel Catrinescu <cc@80211.de>
2018-01-25 16:50:08 +01:00
Matthias Schiffer
ad4232e3e9
ar71xx: add unaligned access hacks for VXLAN
Gives a ~5% performance gain.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2018-01-25 11:00:48 +01:00
Jackson Ming Hu
21d3643828 ramips: add support for Widora Neo 32MB flash revision
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>
2018-01-23 23:31:09 +01:00
Mathias Kresin
a411881a40 ramips: add flash size postfix to Widora neo
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>
2018-01-23 23:31:09 +01:00
Hans Dedecker
6f425a28a4 kernel: generic: add 4.9 config option
When CGROUPS is enabled the new option CONFIG_CGROUP_NET_CLASSID is
selectable and not handled.
Add this option to the 4.9 kernel configuration.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2018-01-24 17:05:15 +01:00
Rosen Penev
c25d9cbde8 ramips: Fix GB-PC1 cpuclock again
The intended frequency is 900 MHz, not 90.

Fixes: 7059ab48a6 ("ramips: fix cpuclock for the GB-PC1")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2018-01-24 07:33:42 +01:00
Daniel Golle
059b2f5481 ar71xx: fix MikroTik rb-nor-flash-16M-ac image
commit e15c63a375
ar71xx: add support for MikroTik RouterBOARD wAP G-5HacT2HnD (wAP AC)

changed the existing rb-nor-flash-16M-ac image in a way that it would
now only support the rb-wapg-5hact2hnd.
The board show however rather be added to the existing boards in the
rb-nor-flash-16M image template.

Reported-by: Mathias Kresin <dev@kresin.me>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2018-01-24 01:24:39 +01:00
Daniel Golle
9c4fe103cb ramips: add support for ZBT-WE1226
MT7628NN (580MHz), 8MB SPI NOR, 64MB DDR2 RAM

Everything except for the switch LEDs works great.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2018-01-23 02:56:57 +01:00
Hauke Mehrtens
b33c3e1b7c sunxi: Orange Pi R1: configure USB Ethernet controller.
Now the USB port is the WAN port.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-01-22 22:59:38 +01:00
Hauke Mehrtens
40db7a9dec sunxi: Orange Pi R1: Fix USB Ethernet and activate SPI
The USB Ethernet is not working with the patches proposed for upstream,
fix this and activate the SPI node as this board always has a SPI flash.

Both patches are also targeted for upstream kernel 4.16 and 4.17.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-01-22 22:59:38 +01:00
Hauke Mehrtens
75f7c1c9ac sunxi: use upstream patch for Orange Pi R1
Instead of using our own device tree definitions use the one provided in
the upstream kernel for 4.16.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-01-22 22:54:17 +01:00
Hauke Mehrtens
b1c82cbd51 sunxi: backport stmmac network patches
Ethernet support was initial added in kernel 4.13, but deactivated
before the final release. This is backports the changes which are
activating it again from kernel 4.15.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-01-22 22:54:17 +01:00
Hauke Mehrtens
ad2b3bf310 sunxi: Add support for kernel 4.14
This is based on the code for kernel 4.9, but a lot of 4.9 patches are
backports from more recent kernel version and can be removed now.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-01-22 22:51:02 +01:00
Hauke Mehrtens
dda475ca30 sunxi: refresh kernel configuration
Just refresh the sunxi kernel configuration.
This also moves the CONFIG_CRYPTO_DEV_SUN4I_SS_PRNG option to the
config-4.9 file.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-01-22 22:49:59 +01:00
Gabor Juhos
eb9e3651dd ar71xx: add support for the MikroTik RB911-2Hn/5Hn boards
The patch adds support for the MikroTik RB911-2Hn (911 Lite2)
and the RB911-5Hn (911 Lite5) boards:

  https://mikrotik.com/product/RB911-2Hn
  https://mikrotik.com/product/RB911-5Hn

The two boards are using the same hardware design, the only difference
between the two is the supported wireless band.

Specifications:
  * SoC: Atheros AR9344 (600MHz)
  * RAM: 64MiB
  * Storage: 16 MiB SPI NOR flash
  * Ethernet: 1x100M (Passive PoE in)
  * Wireless: AR9344 built-in wireless MAC, single chain
              802.11b/g/n (911-2Hn) or 802.11a/g/n (911-5Hn)

Notes:
  * Older versions of these boards might be equipped with a NAND
    flash chip instead of the SPI NOR device. Those boards are not
    supported (yet).
  * The MikroTik RB911-5HnD (911 Lite5 Dual) board also uses the
    same hardware. Support for that can be added later with little
    effort probably.

Installation:

1. Setup a DHCP/BOOTP Server with the following parameters:
   * DHCP-Option 66 (TFTP server name): pointing to a local TFTP
     server within the same subnet of the DHCP range
   * DHCP-Option 67 (Bootfile-Name): matching the initramfs filename
     of the to be booted image. The usable intramfs files are:
       - openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf
       - openwrt-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf
       - openwrt-ar71xx-mikrotik-rb-nor-flash-16M-initramfs-kernel.bin

2. Press the reset button on the board and keep that pressed.

3. Connect the board to your local network via its ethernet port.

4. Release the button after the LEDs on the board are turned off.
   Now the board should load and start the initramfs image from
   the TFTP server.

5. Upload the sysupgrade image to the board with scp:
     $ scp openwrt-ar71xx-mikrotik-rb-nor-flash-16M-squashfs-sysupgrade.bin root@192.168.1.1:/tmp/fw.bin

5. Log in to the running system listening on 192.168.1.1 via ssh
   as root (without password):
     $ ssh root@192.168.1.1

7. Flash the uploaded firmware file from the ssh session via the
   sysupgrade command:
     root@OpenWrt:~# sysupgrade /tmp/fw.bin

Signed-off-by: Gabor Juhos <juhosg@freemail.hu>
2018-01-22 10:53:45 +01:00