lede.git
7 years agoar71xx: move Compex WPJ344 to generic build target
Christian Mehlis [Tue, 28 Mar 2017 19:14:49 +0000 (21:14 +0200)]
ar71xx: move Compex WPJ344 to generic build target

Signed-off-by: Christian Mehlis <christian@m3hlis.de>
7 years agoar71xx: move Compex WPJ531 to generic build target
Christian Mehlis [Tue, 28 Mar 2017 19:12:48 +0000 (21:12 +0200)]
ar71xx: move Compex WPJ531 to generic build target

Signed-off-by: Christian Mehlis <christian@m3hlis.de>
7 years agoar71xx: move Compex WPJ558 to generic build target
Christian Mehlis [Tue, 28 Mar 2017 19:09:37 +0000 (21:09 +0200)]
ar71xx: move Compex WPJ558 to generic build target

Signed-off-by: Christian Mehlis <christian@m3hlis.de>
7 years agokernel: add w83627hf-wdt watchdog timer module
Philip Prindeville [Tue, 10 Jan 2017 00:18:21 +0000 (17:18 -0700)]
kernel: add w83627hf-wdt watchdog timer module

This is a 3rd party chipset which is not present on all Intel
reference designs, so make it a module rather than baked in (this
will also alleviate conflicts with drivers which also detect some
of the same chipsets).

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
7 years agokernel: kmod packaging for Intel 10G ethernet ixgbe driver
Philip Prindeville [Tue, 20 Dec 2016 20:26:48 +0000 (13:26 -0700)]
kernel: kmod packaging for Intel 10G ethernet ixgbe driver

A lot of Ivybridge and Haswell servers have the 82598/82599 Ethernet
controllers.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
7 years agofirewall: document rules for IPSec ESP/ISAKMP with 'name' option
Yousong Zhou [Tue, 28 Mar 2017 09:41:14 +0000 (17:41 +0800)]
firewall: document rules for IPSec ESP/ISAKMP with 'name' option

These are recommended practices by REC-22 and REC-24 of RFC6092:
"Recommended Simple Security Capabilities in Customer Premises Equipment
(CPE) for Providing Residential IPv6 Internet Service"

Fixes FS#640

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
7 years agoipq8064: fix dwc3-of-simple module unloading
Thomas Reifferscheid [Mon, 27 Mar 2017 22:01:59 +0000 (00:01 +0200)]
ipq8064: fix dwc3-of-simple module unloading

Without patch unloading the dwc3-of-simple module went stuck after
successfully removing hcd.1 during the hcd.0 removal:

root@LEDE:/# rmmod dwc3-of-simple
[   21.391846] xhci-hcd xhci-hcd.1.auto: remove, state 1
[   21.391931] usb usb4: USB disconnect, device number 1
[   21.397038] xhci-hcd xhci-hcd.1.auto: USB bus 4 deregistered
[   21.401111] xhci-hcd xhci-hcd.1.auto: remove, state 1
[   21.406685] usb usb3: USB disconnect, device number 1
[   21.412848] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered
[   21.417248] xhci-hcd xhci-hcd.0.auto: remove, state 1
[   21.422521] usb usb2: USB disconnect, device number 1
followed by nothing.

Sometimes a stall CPU was detected, or a kernel panic,
or a reboot occurred after a couple of minutes.

At the same time unloading the dwc3 module followed by dwc3-of-simple
module was working repeatedly.

root@LEDE:/# rmmod dwc3
[   53.827328] xhci-hcd xhci-hcd.1.auto: remove, state 1
[   53.827412] usb usb4: USB disconnect, device number 1
[   53.832630] xhci-hcd xhci-hcd.1.auto: USB bus 4 deregistered
[   53.836452] xhci-hcd xhci-hcd.1.auto: remove, state 1
[   53.842314] usb usb3: USB disconnect, device number 1
[   53.848412] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered
[   53.852542] xhci-hcd xhci-hcd.0.auto: remove, state 1
[   53.857882] usb usb2: USB disconnect, device number 1
[   53.863956] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
[   53.867875] xhci-hcd xhci-hcd.0.auto: remove, state 1
[   53.873696] usb usb1: USB disconnect, device number 1
[   53.879742] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered
root@LEDE:/# rmmod dwc3-of-simple
root@LEDE:/#

For the non-working case, the code was stuck in a readl() in
http://lxr.free-electrons.com/source/drivers/usb/host/xhci.c#L91
because
http://lxr.free-electrons.com/source/drivers/usb/dwc3/dwc3-of-simple.c#L126
was disabling the wrong clocks when removing hcd.1 (it was disabling
the clock of hcd.0). That's why the readl() went stuck when removing
hcd.0

The patch however addresses the clock assignment from the .dtsi
file. Most probably it went into openwrt here:
https://dev.openwrt.org/browser/trunk/target/linux/ipq806x/patches-3.18/101-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch?rev=45261
copied from Qualcomms attempt here: https://lkml.org/lkml/2015/11/20/116

Now unloading and repeated module loading is working just fine,
no matter if you'd remove dwc3-of-simple or dwc3.

root@LEDE:/# rmmod dwc3-of-simple
[   24.089679] xhci-hcd xhci-hcd.1.auto: remove, state 1
[   24.089765] usb usb4: USB disconnect, device number 1
[   24.094856] xhci-hcd xhci-hcd.1.auto: USB bus 4 deregistered
[   24.098963] xhci-hcd xhci-hcd.1.auto: remove, state 1
[   24.104522] usb usb3: USB disconnect, device number 1
[   24.111194] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered
[   24.115086] xhci-hcd xhci-hcd.0.auto: remove, state 1
[   24.120396] usb usb2: USB disconnect, device number 1
[   24.126503] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
[   24.130347] xhci-hcd xhci-hcd.0.auto: remove, state 1
[   24.135948] usb usb1: USB disconnect, device number 1
[   24.142085] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered
root@LEDE:/#

Fixes: dwc3-of-simple module unloading
Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
7 years agoipq8064: Fix dwc3 module unloading
Thomas Reifferscheid [Mon, 27 Mar 2017 21:52:06 +0000 (23:52 +0200)]
ipq8064: Fix dwc3 module unloading

Allow module unloading by fixing a mistake.
qcom_dwc3_phy_write_readback() is expecting (phy, offset, mask, value)
while the mistake was calling it with       (phy, offset, value, mask)

The patch is swapping value and mask.

Without the patch unloading the dwc3 module was showing a
write to QSCRATCH failed and repeated module loading was
failing:

root@LEDE:/# rmmod dwc3
[   19.167998] xhci-hcd xhci-hcd.1.auto: remove, state 1
[   19.168084] usb usb4: USB disconnect, device number 1
[   19.173371] xhci-hcd xhci-hcd.1.auto: USB bus 4 deregistered
[   19.177134] xhci-hcd xhci-hcd.1.auto: remove, state 1
[   19.182960] usb usb3: USB disconnect, device number 1
[   19.189023] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered
[   19.192989] qcom-dwc3-usb-phy 110f8830.phy: write: 8000000 to QSCRATCH: 0 FAILED
[   19.199064] xhci-hcd xhci-hcd.0.auto: remove, state 1
[   19.205912] usb usb2: USB disconnect, device number 1
[   19.211611] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
[   19.215905] xhci-hcd xhci-hcd.0.auto: remove, state 1
[   19.221751] usb usb1: USB disconnect, device number 1
[   19.227307] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered
[   19.231795] qcom-dwc3-usb-phy 100f8830.phy: write: 8000000 to QSCRATCH: 0 FAILED
root@LEDE:/# modprobe dwc3
[   29.583343] phy phy-100f8830.phy.4: phy init failed --> -110
[   29.583399] dwc3 10000000.dwc3: failed to initialize core
[   29.588169] dwc3: probe of 10000000.dwc3 failed with error -110
[   29.652943] phy phy-110f8830.phy.2: phy init failed --> -110
[   29.652988] dwc3 11000000.dwc3: failed to initialize core
[   29.657735] dwc3: probe of 11000000.dwc3 failed with error -110
root@LEDE:/#

With patch repeated module unloading and loading is working good:
root@LEDE:/# rmmod dwc3
[   22.622214] xhci-hcd xhci-hcd.1.auto: remove, state 1
[   22.622298] usb usb4: USB disconnect, device number 1
[   22.627401] xhci-hcd xhci-hcd.1.auto: USB bus 4 deregistered
[   22.631492] xhci-hcd xhci-hcd.1.auto: remove, state 1
[   22.637054] usb usb3: USB disconnect, device number 1
[   22.643721] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered
[   22.647421] xhci-hcd xhci-hcd.0.auto: remove, state 1
[   22.652910] usb usb2: USB disconnect, device number 1
[   22.659219] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
[   22.662768] xhci-hcd xhci-hcd.0.auto: remove, state 1
[   22.668604] usb usb1: USB disconnect, device number 1
[   22.674803] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered
root@LEDE:/# modprobe dwc3
[   25.404592] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[   25.404694] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[   25.409444] xhci-hcd xhci-hcd.0.auto: hcc params 0x0228f065 hci version 0x100 quirks 0x00010010
[   25.416589] xhci-hcd xhci-hcd.0.auto: irq 168, io mem 0x10000000
[   25.426509] hub 1-0:1.0: USB hub found
[   25.431626] hub 1-0:1.0: 1 port detected
[   25.435472] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[   25.439206] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[   25.444573] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[   25.452926] hub 2-0:1.0: USB hub found
[   25.460420] hub 2-0:1.0: 1 port detected
[   25.525037] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[   25.525099] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3
[   25.529750] xhci-hcd xhci-hcd.1.auto: hcc params 0x0228f065 hci version 0x100 quirks 0x00010010
[   25.537002] xhci-hcd xhci-hcd.1.auto: irq 169, io mem 0x11000000
[   25.546583] hub 3-0:1.0: USB hub found
[   25.551997] hub 3-0:1.0: 1 port detected
[   25.555734] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[   25.559621] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 4
[   25.564942] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[   25.573063] hub 4-0:1.0: USB hub found
[   25.580842] hub 4-0:1.0: 1 port detected
root@LEDE:/#

Fixes: dwc3 module unloading
Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
7 years agomac80211: ath10k: allow failure getting board id via otp
Hannu Nyman [Thu, 23 Mar 2017 14:53:17 +0000 (16:53 +0200)]
mac80211: ath10k: allow failure getting board id via otp

ath10k tries to fetch board id via otp, but that fails for many chips
like QCA988x, QCA9984 etc. Recent commit cc189c0b7f removed the earlier
hack that had allowed QCA radios to work, as that hack was incompatible
with the new wifi chips being introduced to the source tree.

Restore functionality for the existing wifi chips by modifying the
return value of the 'board id via otp' function to a value that is recognised
as a harmless error, so that name evaluation continues by using the board file.

Patch originally suggested by Christian Lamparter in forum discussion.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
7 years agoramips: fix pcie irq mapping for mt7621 on v4.9
John Crispin [Fri, 24 Mar 2017 07:31:17 +0000 (08:31 +0100)]
ramips: fix pcie irq mapping for mt7621 on v4.9

Signed-off-by: John Crispin <john@phrozen.org>
7 years agobcm53xx: put kernel into TRX when building initramfs images
Rafał Miłecki [Fri, 24 Mar 2017 17:25:23 +0000 (18:25 +0100)]
bcm53xx: put kernel into TRX when building initramfs images

Many (most?) devices can't boot raw kernel using tftp and probably none
allows flashing it. It's way more usable to have TRX with kernel
containing initrams as such an image can be actually flashed.

An exception are Buffalo devices which have recovery mode with support
for booting kernels over TFTP. For them keep building default images.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agoar71xx: wpj531: fix GPIOs for LED
Leon M. George [Fri, 24 Mar 2017 11:18:57 +0000 (12:18 +0100)]
ar71xx: wpj531: fix GPIOs for LED

/sys/devices/platform/leds-gpio/leds/ was not initialised with working LEDs.

Signed-off-by: Leon M. George <leon@georgemail.eu>
7 years agoipq8064: enable 2nd USB port on R7500
Thomas Reifferscheid [Fri, 24 Mar 2017 23:11:43 +0000 (00:11 +0100)]
ipq8064: enable 2nd USB port on R7500

Makes use of the syscon tcsr and enables both USB ports. Cleans up
qcom-ipq8064.dtsi from previous attempts.

Fixes FS#497

Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
7 years agokernel: Fix F2FS module dependencies
Shane Peelar [Fri, 24 Mar 2017 15:49:45 +0000 (11:49 -0400)]
kernel: Fix F2FS module dependencies

F2FS depends on the crc32_generic module (NOT crc32c_generic)

Signed-off-by: Shane Peelar <lookatyouhacker@gmail.com>
7 years agokernel: Add kmod-crypto-crc32 (crc32_generic.ko)
Shane Peelar [Fri, 24 Mar 2017 14:44:24 +0000 (10:44 -0400)]
kernel: Add kmod-crypto-crc32 (crc32_generic.ko)

This is needed for F2FS support (it depends on crc32_generic,
not crc32c_generic).

Signed-off-by: Shane Peelar <lookatyouhacker@gmail.com>
7 years agopackage/boot/uboot-kirkwood: fix build errors for nsa310 and nsa325
Paul Wassi [Sat, 25 Mar 2017 10:46:10 +0000 (11:46 +0100)]
package/boot/uboot-kirkwood: fix build errors for nsa310 and nsa325

With upstream changes, the last update to U-Boot 2017.03
broke the nsa310 and nsa325 targets. Also fix some redefines.

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
7 years agolantiq: align falcon code with ar9-vr9 code
Stefan Koch [Fri, 24 Mar 2017 16:18:06 +0000 (17:18 +0100)]
lantiq: align falcon code with ar9-vr9 code

Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
7 years agolantiq: cleanup code ar9-vr9 parts
Stefan Koch [Fri, 24 Mar 2017 16:08:59 +0000 (17:08 +0100)]
lantiq: cleanup code ar9-vr9 parts

- remove unused code within 500-ar9_vr9.patch
- fixed return of IFX_ERROR (solves SIGSEGV in asterisk at failure)
- align it a bit with 400-falcon.patch
- remove 600-kernel-4.9.patch since changed parts
  are removed during cleanup

Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
7 years agoipq806x: tsens: convert degrees to millicelsius
Pavel Kubelun [Fri, 24 Mar 2017 13:12:40 +0000 (16:12 +0300)]
ipq806x: tsens: convert degrees to millicelsius

Current driver shows temp in full degrees while other apps await it
to be in millidegrees.

Initially the driver represents termal data in millidegrees but then
it gets divided by TSENS_FACTOR. So lets just set it to '1'.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
7 years agoipq806x: add ipq806x specific tsens driver
Pavel Kubelun [Thu, 23 Mar 2017 14:59:30 +0000 (17:59 +0300)]
ipq806x: add ipq806x specific tsens driver

Current upstream driver doesnt fully support ipq806x devices
ipq806x has 11 sensors, the upstream one doesn't allow to check
sensors 0-4, only 5-10.

A specific driver for ipq806x has been found in Qualcomm SDK repo.

https://source.codeaurora.org/quic/qsdk/oss/kernel/linux-msm/commit/?h=release/endive_preview_cc&id=c089e464cd7ce652419a0dc44d7959ce4d24b8a5
https://source.codeaurora.org/quic/qsdk/oss/kernel/linux-msm/commit/?h=release/endive_preview_cc&id=c23d94b702c4182862e7f5051a2b7d00bb922a29
https://source.codeaurora.org/quic/qsdk/oss/kernel/linux-msm/commit/?h=release/endive_preview_cc&id=742f3684b62a6b9f082cb49404b1a92dc0b16bf5
https://source.codeaurora.org/quic/qsdk/oss/kernel/linux-msm/commit/?h=release/endive_preview_cc&id=c0a9b2e2a382c152fa128f5b864c800dd6dfb311

Merging it into LEDE with this commit.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
7 years agokernel: add arm64 erratums into config
Hauke Mehrtens [Sun, 26 Mar 2017 17:20:33 +0000 (19:20 +0200)]
kernel: add arm64 erratums into config

Deactivate all the ARM64 erratums by default. The target code should
activate them if needed. This fixes a problem with a new erratum added
in kernel 4.9.17 breaking brcm2708.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years agolantiq: update spi driver to upstream version
Hauke Mehrtens [Sun, 12 Feb 2017 22:48:11 +0000 (23:48 +0100)]
lantiq: update spi driver to upstream version

These patches are backported from upstream Linux kernel.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years agokernel: update kernel 4.9 to 4.9.17
Hauke Mehrtens [Sun, 26 Mar 2017 10:22:27 +0000 (12:22 +0200)]
kernel: update kernel 4.9 to 4.9.17

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years agokernel: update kernel 4.4 to 4.4.56
Hauke Mehrtens [Sun, 26 Mar 2017 10:01:22 +0000 (12:01 +0200)]
kernel: update kernel 4.4 to 4.4.56

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years agoiw: enable MESH ID in scan output
Matthias Schiffer [Sat, 25 Mar 2017 12:43:29 +0000 (13:43 +0100)]
iw: enable MESH ID in scan output

Make scan output useful for 802.11s meshes. The common print_ssid function
is used, so this doesn't add any additional code.

Based-on-patch-by: Jan-Tarek Butt <tarek@ring0.de>
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agobusybox: vi: backporting patches to fix ZZ and :x command
Yousong Zhou [Sat, 25 Mar 2017 04:16:36 +0000 (12:16 +0800)]
busybox: vi: backporting patches to fix ZZ and :x command

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
7 years agobrcm2708: backport upstream ARM dts commits
Rafał Miłecki [Wed, 22 Mar 2017 22:35:39 +0000 (23:35 +0100)]
brcm2708: backport upstream ARM dts commits

This gets us in sync with dts from kernel 4.11. Two patches were already
backported earlier.
I decided to use 03x prefix as it's kind of similar to the 3xx prefix:
3xx - architecture specific patches
It isn't any documented or strict rule though. We don't need to stick to
it if we hit any problems.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agolantiq: vr9 fxs support: remove unused wdog declarations and initializers
Stefan Koch [Wed, 22 Mar 2017 11:05:54 +0000 (12:05 +0100)]
lantiq: vr9 fxs support: remove unused wdog declarations and initializers

modify 0152-lantiq-VPE.patch from
commit e0229a16b000 ("lantiq: added support for VPE1")

- remove wdog function declarations from header (asm/vpe.h)
- remove wdog command line init functions (vpe.c)

Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
7 years agolantiq: vr9 fxs support: remove soft-watchdog functionality
Stefan Koch [Tue, 21 Mar 2017 16:21:58 +0000 (17:21 +0100)]
lantiq: vr9 fxs support: remove soft-watchdog functionality

- remove patched header (vpe.h) because kernel
  already provides one (asm/vpe.h)
- remove module softdog_vpe since watchdog functionality is unused
- remove module softdog_vpe from Makefile

Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
7 years agolantiq: remove residual watchdog parts from ltq-vmmc
Stefan Koch [Tue, 21 Mar 2017 16:21:17 +0000 (17:21 +0100)]
lantiq: remove residual watchdog parts from ltq-vmmc

modify 500-ar9_vr9.patch from
commit 29367aac42d6 ("lantiq: ltq-vmmc add support for ar9-vr9")

- remove unused dependencies to external watchdog functions
  (wdog setup is already disabled)
- using header file from kernel (asm/vpe.h) instead patched file (vpe.h)
- cleanup whitspace warning

Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
7 years agoramips: fix Xiaomi MiWiFi Nano firmware partition size
Mathias Kresin [Thu, 23 Mar 2017 19:30:25 +0000 (20:30 +0100)]
ramips: fix Xiaomi MiWiFi Nano firmware partition size

Even the commit message of the patch adding support for the MiWiFi Nano
says that a 16 MB flash chip is used. Extend the firmware partition to
make use of all available flash space.

Fixes: FS#622
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoath10k-firmware: do not select the qca988x by default
Mathias Kresin [Fri, 17 Mar 2017 18:54:55 +0000 (19:54 +0100)]
ath10k-firmware: do not select the qca988x by default

Do not select the qca988x by default as soon as kmod-ath10k is
selected. We do support more ath10k chips than the qca988x in the
meantime, so this dependency doesn't make sense any longer.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agotreewide: select ath10k firmware explicit
Mathias Kresin [Fri, 17 Mar 2017 18:36:06 +0000 (19:36 +0100)]
treewide: select ath10k firmware explicit

Do not rely on the default firmware selected by ath10k.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoipq806x: fix Netgear X4 R7500 ath10k firmware selection
Thomas Reifferscheid [Fri, 17 Mar 2017 13:01:34 +0000 (14:01 +0100)]
ipq806x: fix Netgear X4 R7500 ath10k firmware selection

Netgear X4 R7500 comes with a QCA988X. Select a firmware that matches
the ath10k chipset

Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
7 years agolantiq: fix pci with kernel 4.9
Mathias Kresin [Fri, 10 Mar 2017 21:46:30 +0000 (22:46 +0100)]
lantiq: fix pci with kernel 4.9

Commit 23dac14d058f ("MIPS: PCI: Use struct list_head lists") changed
the controller list from reverse to straight order. Use the last entry
in the controller list to get the fist conroller of the system.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agokernel: add MIPS pci fix send upstream
Mathias Kresin [Fri, 17 Mar 2017 06:29:16 +0000 (07:29 +0100)]
kernel: add MIPS pci fix send upstream

Upstream commit 23dac14d058f ("MIPS: PCI: Use struct list_head lists")
changed the controller list from reverse to straight order without
taking care of the changed order for the scan of the recorded PCI
controllers.

Traverse the list in reverse order to restore the former behaviour.

This patches fixes the following PCI error on lantiq:

  pci 0000:01:00.0: BAR 0: error updating (0x1c000004 != 0x000000)

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agobrcm2708: rename all patches from raspberrypi git tree to use 950 prefix
Rafał Miłecki [Wed, 22 Mar 2017 20:09:00 +0000 (21:09 +0100)]
brcm2708: rename all patches from raspberrypi git tree to use 950 prefix

Right now all brcm2708 patches are extracted from the non-mainline
raspberrypi/linux git tree. Many of them are hacks and/or are unneeded
in LEDE. Raspberry Pi is getting better and better mainline support so
it would be nice to finally start maintaining patches in a cleaner way:
1) Backport patches accepted in upstream tree
2) Start using upstream drivers
3) Pick only these patches that are needed for more complete support

Handling above tasks requires grouping patches - ideally using the same
prefixes as generic ones. It means we should rename existing patches to
use some high prefix. This will allow e.g. use 0xx for backported code.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years agogdb: fix invalid sigprocmask call
Yousong Zhou [Fri, 24 Mar 2017 02:37:08 +0000 (10:37 +0800)]
gdb: fix invalid sigprocmask call

Fixes FS#637

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
7 years agoar71xx: image: fix indentation
Piotr Dymacz [Wed, 22 Mar 2017 19:36:22 +0000 (20:36 +0100)]
ar71xx: image: fix indentation

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years agoar71xx: add support for P&W R602N and CPE505N
Piotr Dymacz [Wed, 15 Mar 2017 23:54:08 +0000 (00:54 +0100)]
ar71xx: add support for P&W R602N and CPE505N

P&W (full name: Shenzhen Progress&Win Technologies) R602N (could be also
labeled as R602F, R602, etc.) is a simple N300 router with 5-port
10/100 Mbps switch, non-detachable antennas and USB.

CPE505 is an outdoor CPE with PoE support and detachable antennas.

Both devices are based on Qualcomm/Atheros QCA9531 v2.

Common specification:

- 650/597/216 MHz (CPU/DDR/AHB)
- 64 MB of RAM (DDR2)
- 16 MB of FLASH
- UART (J2) header on PCB

R602N specification:

- 5x 10/100 Mbps Ethernet
- 1x USB 2.0
- 2T2R 2.4 GHz with external LNA and PA (SE2576L), up to 28 dBm
- 2x external, non-detachable antennas
- 7x LED, 1x button

CPE505N specification:

- 2x 10/100 Mbps Ethernet (both ports support passive PoE 12-24 V)
- 2T2R 2.4 GHz with external LNA and PA (SKY65174-21), up to 30 dBm
- 2x external, detachable antennas (RP-SMA connectors)
- 1x RGB LED, 2x LEDs (in RJ45 sockets), 1x button

Flash instructions:

It seems that there are many different versions of the firmware which
these devices are shipped with. The generic/standard one is based on
some modified OpenWrt and LEDE firmware can be flashed directly from
vendor's webgui or with sysupgrade (root password is "admin123").

Before flashing, make sure (use "fw_printenv") that the kernel load
address in your device is set to "0x9f050000" (bootcmd variable is
"bootm 0x9f050000"). If your device uses different load address, you
should first change it, under vendor's firmware, with command:

fw_setenv bootcmd "bootm 0x9f050000 || bootm OLD_ADDRESS"

Where OLD_ADDRESS is previous kernel load address (in CPE505 version
I got access to, it was "0x9fe80000"). This will allow you to use
both the vendor's and LEDE firmware.

If version of your device contains empty U-Boot environment (you will
get information about this after issuing "fw_printenv"), you should
use U-Boot, serial line access and TFTP to perform firmware upgrade:

1. tftp 0x80060000 lede-ar71xx-generic-...-squashfs-sysupgrade.bin
2. erase 0x9f050000 +$filesize
3. cp.b $fileaddr 0x9f050000 $filesize
4. setenv bootcmd "bootm 0x9f050000 || bootm OLD_ADDRESS"
5. saveenv && reset

These devices contain also web recovery mode inside U-Boot. It can be
started with pressing the reset button for around 3 seconds just after
the device powerup. Web recovery panel is available on "192.168.10.9"
and to be able to use it, IP on your PC must be set to "192.168.10.10".

Make sure to change kernel load address before using recovery mode or
the U-Boot will not be able to load LEDE firmware.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years agoar71xx: add support for TP-LINK TL-WR840N v2 and v3
Vaclav Svoboda [Thu, 16 Mar 2017 00:43:43 +0000 (01:43 +0100)]
ar71xx: add support for TP-LINK TL-WR840N v2 and v3

This patch adds support for the TP-LINK TL-WR840N v2 and v3.

- SoC: Qualcomm QCA9533-BL3A (650 MHz)
- RAM: 32 MiB (Zentel A3S56D40GTP)
- Flash: 4 MiB
   (v2: Macronix MX 25L323F)
   (v3: Winbond 25Q32FVSIG)
- LAN: 4x 100M
- WAN: 1x 100M

Signed-off-by: Vaclav Svoboda <svoboda@neng.cz>
7 years agoar71xx: add support for MikroTik hAP ac
Ryan Mounce [Fri, 17 Mar 2017 04:00:33 +0000 (14:30 +1030)]
ar71xx: add support for MikroTik hAP ac

This patch adds initial support for the MikroTik RouterBOARD hAP ac
(RB962UiGS-5HacT2HnT).

All functions are supported except:
-SFP cage (eth1) is not working
-WLAN LEDs are not working

Signed-off-by: Ryan Mounce <ryan@mounce.com.au>
7 years agoar71xx: add support for MikroTik hAP ac lite
Ryan Mounce [Wed, 8 Mar 2017 09:07:00 +0000 (19:37 +1030)]
ar71xx: add support for MikroTik hAP ac lite

This patch adds support for the MikroTik RouterBOARD hAP ac lite
(RB952Ui-5ac2nD).

The hAP ac lite is nearly identical to the hAP, with an added QCA9887
5GHz radio. The 2.4GHz radio ID is also changed in the hAP ac lite.

Signed-off-by: Ryan Mounce <ryan@mounce.com.au>
7 years agoramips: fix mt7621 boot on v4.9
John Crispin [Thu, 23 Mar 2017 08:18:42 +0000 (09:18 +0100)]
ramips: fix mt7621 boot on v4.9

v4.9 CM code has a few bugs on this HW. Disable the GCR register access
during boot. This caused a cpu stall.

Signed-off-by: John Crispin <john@phrozen.org>
7 years agoRevert "ipq806x: make the dwc3 driver and required phy drivers built-in"
John Crispin [Thu, 23 Mar 2017 07:29:21 +0000 (08:29 +0100)]
Revert "ipq806x: make the dwc3 driver and required phy drivers built-in"

This reverts commit d5b10bb560c2c3c615babfcfb64519bfc65818d9.

This caused boot errors on some ipq8 boards

Signed-off-by: John Crispin <john@phrozen.org>
7 years agoodhcp6c: update to git HEAD version
Hans Dedecker [Wed, 22 Mar 2017 20:56:05 +0000 (21:56 +0100)]
odhcp6c: update to git HEAD version

0463b05 dhcpv6: rebind capability support in reconfigure message (rfc6644)
53767fc dhcpv6: respect renew end point when handling reconfigure message
dd892e2 dhcpv6: calculate T1, T2 and T3 in a more sane manner
8a6ca6e md5: use libubox md5 library as local implementation
89822de dhcpv6: don't return renew msg in case of invalid msg type in reconfigure msg
4160c0e treewide: align coding style

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agoath9k: fix power limits on init
Felix Fietkau [Wed, 22 Mar 2017 19:46:14 +0000 (20:46 +0100)]
ath9k: fix power limits on init

The tx power applied by set_txpower is limited by the CTL (conformance
test limit) entries in the EEPROM. These can change based on the user
configured regulatory domain.
Depending on the EEPROM data this can cause the tx power to become too
limited, if the original regdomain CTLs impose lowr limits than the CTLs
of the user configured regdomain.

To fix this issue, set the initial channel limits without any CTL
restrictions and only apply the CTL at run time when setting the channel
and the real tx power.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoath: do not apply broken power limits with ATH_USER_REGD
Felix Fietkau [Wed, 22 Mar 2017 19:24:32 +0000 (20:24 +0100)]
ath: do not apply broken power limits with ATH_USER_REGD

If a device uses the default EEPROM code, typically only the main CTLs
are valid, and they do not apply properly when switching to a different
regulatory domain. If the regdomain deviates from the EEPROM one, force
the world roaming regdomain to ensure that power limits are sane

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agobuild: fix STAMP_PREPARED with quilt
Felix Fietkau [Wed, 22 Mar 2017 19:16:15 +0000 (20:16 +0100)]
build: fix STAMP_PREPARED with quilt

quilt.mk needs to be included first, to ensure that STAMP_PREPARED does
not include the hash if quilt is used.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoutil-linux: re-enable parallel builds
Felix Fietkau [Wed, 22 Mar 2017 12:22:57 +0000 (13:22 +0100)]
util-linux: re-enable parallel builds

The original build error in 'more' seems to be gone

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoutil-linux: unconditionally enable ncursesw support
Felix Fietkau [Wed, 22 Mar 2017 12:49:05 +0000 (13:49 +0100)]
util-linux: unconditionally enable ncursesw support

The build dependency is unconditional, and some components might fail if
ncurses is not available

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoutils/util-linux: Update to 2.29.2
Daniel Engberg [Mon, 20 Mar 2017 08:51:26 +0000 (09:51 +0100)]
utils/util-linux: Update to 2.29.2

Update util-linux to 2.29.2
Remote 0001-fix-uClibc-ng-scanf-check.patch as it's been merged upstream.
Refresh patches
Change ncurses to ncursesw to fix compilation and avoid confusion

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [remove faulty dependency changes]
7 years agokernel: disable DRM_HISI_KIRIN and USB_DWC3_OF_SIMPLE
Rafał Miłecki [Wed, 22 Mar 2017 13:22:07 +0000 (14:22 +0100)]
kernel: disable DRM_HISI_KIRIN and USB_DWC3_OF_SIMPLE

They were triggering config prompts on brcm2710.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agokernel: fix builds with kmod-drm-vc4 and CONFIG_SPI enabled
Rafał Miłecki [Wed, 22 Mar 2017 11:22:33 +0000 (12:22 +0100)]
kernel: fix builds with kmod-drm-vc4 and CONFIG_SPI enabled

This fixes:
Samsung LD9040 RGB/SPI panel (DRM_PANEL_SAMSUNG_LD9040) [N/m] (NEW) aborted!

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agoRevert "utils/util-linux: Update to 2.29.2"
John Crispin [Wed, 22 Mar 2017 11:13:12 +0000 (12:13 +0100)]
Revert "utils/util-linux: Update to 2.29.2"

This reverts commit eac1a548573a0262e9f36aeee95ed071f6040703.

This patch caused the builders to blow up.

Signed-off-by: John Crispin <john@phrozen.org>
7 years agoutils/f2fs-tools: Update to 1.8.0
Daniel Engberg [Wed, 15 Mar 2017 16:14:55 +0000 (17:14 +0100)]
utils/f2fs-tools: Update to 1.8.0

Update f2fs-tools to 1.8.0
Refresh patches
Remove selinux patch, use configure argument instead.
Switch to xz tarball
Adjust url to avoid redirects

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agox86: enable ACPI support for the Geode subtarget
Felix Fietkau [Mon, 6 Mar 2017 09:12:50 +0000 (10:12 +0100)]
x86: enable ACPI support for the Geode subtarget

Most or all newer Geode device have ACPI hardware support
Should fix FS#577

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agopistachio: remove custom board detection override
Felix Fietkau [Fri, 17 Mar 2017 16:02:55 +0000 (17:02 +0100)]
pistachio: remove custom board detection override

Use device tree based model string

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agopistachio: fix indentation in image makefile
Felix Fietkau [Fri, 17 Mar 2017 16:00:39 +0000 (17:00 +0100)]
pistachio: fix indentation in image makefile

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agopistachio: remove pistachio_board_name, use the generic function
Felix Fietkau [Fri, 17 Mar 2017 15:56:40 +0000 (16:56 +0100)]
pistachio: remove pistachio_board_name, use the generic function

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agotarget: add pistachio
Ian Pozella [Thu, 2 Feb 2017 09:42:04 +0000 (09:42 +0000)]
target: add pistachio

The Pistachio target is a MIPS interaptiv based SoC developed by
Imagination Technologies. It includes blocks for i2c, spi, audio,
usb and WiFi.

This also adds the base support for the 'Creator Ci40 (marduk)'
device which uses the Pistachio SoC to create an IoT hub by
including Bluetooth, WiFi and 6lowpan on one board. Additionally 2x
Mikrobus ports are available to expand with further RF technologies
or add sensors. You can find out more here http://creatordev.io.

Note, this commit is just the initial board support hence the
following are not expected to work yet:
 * WiFi
 * Bluetooth
 * 6lowpan
 * Audio
 * Mikrobus uarts, user leds (clock dependency of 6lowpan chip)

The aim of this commit is to essentially have the same level of
support that currently exists in the mainline kernel.

Signed-off-by: Abhijit Mahajani <Abhijit.Mahajani@imgtec.com>
Signed-off-by: Francois Berder <francois.berder@imgtec.com>
Signed-off-by: Ian Pozella <Ian.Pozella@imgtec.com>
Signed-off-by: Mayank Sirotiya <Mayank.Sirotiya@imgtec.com>
Signed-off-by: Sean Kelly <Sean.Kelly@imgtec.com>
7 years agopistachio: add 4.9 kernel support
Ian Pozella [Wed, 15 Feb 2017 09:05:24 +0000 (09:05 +0000)]
pistachio: add 4.9 kernel support

This adds kernel support for the Pistachio SoC and the Marduk (Ci40)
board which uses it.

Much of the code for Pistachio has been upstreamed however some
patches are still required to boot from the Marduk board:
 * spi bug fixes
 * dma bug fixes
 * pistachio internal clock tree bug fixes
 * spi-nand implementation
 * dts based mtd device naming scheme
 * dts backports and bug fixes

Signed-off-by: Abhijit Mahajani <Abhijit.Mahajani@imgtec.com>
Signed-off-by: Francois Berder <francois.berder@imgtec.com>
Signed-off-by: Ian Pozella <Ian.Pozella@imgtec.com>
7 years agokernel: do not try to copy vmlinux out of arch/$(ARCH)/boot
Felix Fietkau [Fri, 17 Mar 2017 19:37:52 +0000 (20:37 +0100)]
kernel: do not try to copy vmlinux out of arch/$(ARCH)/boot

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agolantiq: remove lantiq_board_model, it is unused
Felix Fietkau [Fri, 17 Mar 2017 15:21:49 +0000 (16:21 +0100)]
lantiq: remove lantiq_board_model, it is unused

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agolantiq: remove lantiq_board_name, use the generic function instead
Felix Fietkau [Fri, 17 Mar 2017 15:21:30 +0000 (16:21 +0100)]
lantiq: remove lantiq_board_name, use the generic function instead

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agolantiq: move lantiq_board_detect() to 03_preinit_board.sh
Felix Fietkau [Fri, 17 Mar 2017 15:17:42 +0000 (16:17 +0100)]
lantiq: move lantiq_board_detect() to 03_preinit_board.sh

It is only used there

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agobase-files: add generic board_name function to functions.sh
Felix Fietkau [Fri, 17 Mar 2017 15:12:27 +0000 (16:12 +0100)]
base-files: add generic board_name function to functions.sh

This will be used to replace all those nasty board specific scripts
that do basically the same thing

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agobusybox: enable the "ip neigh" command (FS#618)
Felix Fietkau [Thu, 16 Mar 2017 15:54:16 +0000 (16:54 +0100)]
busybox: enable the "ip neigh" command (FS#618)

It is useful for creating static ARP entries.
Adds about 1.9 KiB after gzip on MIPS.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agomac80211: Fix race condition leading to wifi interfaces not coming up at boot sometimes.
Vittorio Gambaletta [Tue, 14 Mar 2017 13:45:15 +0000 (14:45 +0100)]
mac80211: Fix race condition leading to wifi interfaces not coming up at boot sometimes.

In the drv_mac80211_setup function, mac80211_interface_cleanup
is called to ask the kernel to delete all existing interfaces
for the phy that is being configured via netlink.

Later in the first function, mac80211_prepare_vif is called to
set up the new interfaces as required.

But sometimes, when mac80211_prepare_vif (and so the relevant
`iw phy x interface add y` command) runs, the kernel might still
be cleaning up the old interface with the same ifname. It usually
takes very few time to do that; possibly a few milliseconds of
sleep in the script after detecting this error condition could be
enough, but the busybox sh does not support sub-second sleep
intervals.

When this happens, iw obviously fails to create the new interface;
and the following message is printed in the system log, followed by
subsequent failure messages from hostapd in case this would have been
an AP interface.

Tue Mar 14 04:21:57 2017 daemon.notice netifd: radio1 (2767): command failed: Too many open files in system (-23)

This was a long-standing issue existing since at least OpenWrt Backfire,
and today I finally managed to debug and (hopefully) solve it.
It was happening very few times on most devices; but it was happening
a lot more frequently on fast platforms with multiple radios, such as
the powerpc-based dual-ath9k-radio tl-wdr4900-v1.

Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
7 years agoipq806x: remove v4.4 support
John Crispin [Wed, 22 Mar 2017 08:43:01 +0000 (09:43 +0100)]
ipq806x: remove v4.4 support

Signed-off-by: John Crispin <john@phrozen.org>
7 years agoipq806x: set v4.9 as default
John Crispin [Wed, 15 Mar 2017 10:49:43 +0000 (11:49 +0100)]
ipq806x: set v4.9 as default

Signed-off-by: John Crispin <john@phrozen.org>
7 years agofirmware: add custom IPQ wifi board definitions
Christian Lamparter [Wed, 15 Mar 2017 10:49:14 +0000 (11:49 +0100)]
firmware: add custom IPQ wifi board definitions

On the ath10k-devel ML Michael Kazior stated:

"board-2 is a key-value store of actual board files.
Some devices, notably qca61x4 hw3+ and qca4019 need
distinct board files to be uploaded. Otherwise they
fail in various ways." [0].

Later on Rajkumar Manoharan explained:

"In QCA4019 platform, only radio specific calibration
(pre-cal-data) is stored in flash. Board specific contents
are read from board-2.bin. For each radio appropriate board
data should be loaded. To fetch correct board data from
board-2.bin bundle, pre-cal/radio specific caldata should
be loaded first to get proper board id.

|My understanding until now was that:
|
| * pre-cal data + board-2.bin info == actual calibration data

Correct." [1].
The standard board-2.bin from the ath10k-firmware-qca4019
barely works on the RT-AC58U. Especially 5GHz clients fail
to connect at all and if they do, they have very low
throughput even right next to the router.

Currently, the solution for this problem is to supply a
custom board-2.bin for every device.

To implement this feature, this method makes use of:
Rafał Miłecki's "base-files: add support for overlaying
rootfs content". This comes with a few limitations:
1. Since there can only be one board-2.bin at the right
   location, there can only one board overwrite installed
   at any time. (All packages CONFLICT with each other.
   It's also not possible to "builtin" multiple package.)

2. updating ath10k-firmware-qca4019 will also replace
   the board-2.bin. For this cases the user needs to
   manually reinstall the wifi-board package once the
   ath10k-firmware-qca4019 is updated.

To create the individual board-2.bin: Use the ath10k-bdencoder
utility from the qca-swiss-army-knife repository:
<https://github.com/qca/qca-swiss-army-knife>
The raw board.bin files have to be extracted from the
vendor's source GPL.tar archieves.

Signed-off-by: Alexis Green <agreen@cococorp.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
7 years agofirmware: add IPQ fritz-tools FW extraction tool
Christian Lamparter [Wed, 15 Mar 2017 10:48:56 +0000 (11:48 +0100)]
firmware: add IPQ fritz-tools FW extraction tool

Adds tools to access tffs3 and pre-calibration data required for ipq4019
based FritBoxes.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
7 years agoipq806x: make the dwc3 driver and required phy drivers built-in
John Crispin [Wed, 22 Mar 2017 08:36:00 +0000 (09:36 +0100)]
ipq806x: make the dwc3 driver and required phy drivers built-in

Signed-off-by: John Crispin <john@phrozen.org>
7 years agoipq806x: enable QCE hardware crypto inside the kernel
John Crispin [Wed, 22 Mar 2017 08:29:11 +0000 (09:29 +0100)]
ipq806x: enable QCE hardware crypto inside the kernel

Signed-off-by: John Crispin <john@phrozen.org>
7 years agoipq806x: add ipq4019 fritz4040 support
Christian Lamparter [Tue, 14 Mar 2017 16:04:28 +0000 (17:04 +0100)]
ipq806x: add ipq4019 fritz4040 support

This patch adds support for AVM FRITZ!Box 4040.

hardware highlights:

SOC: IPQ4018 / QCA Dakota
CPU: Quad-Core ARMv7 Processor rev 5 (v7l) Cortex-A7
DRAM: 256 MiB Nanya NT5CC128M16IP
FLASH: 32 MiB MXIC MX25L25635FMI
ETH: Qualcomm Atheros QCA8075 Gigabit Switch (4 x LAN, 1 x WAN)
USB: 1 x 3.0 (via Synopsys DesignWare DWC3 controller in the SoC)
1 x 2.0 (via Synopsys DesignWare DWC3 controller in the SoC)
WLAN1: Qualcomm Atheros QCA4018 2.4GHz 802.11bgn 2:2x2
WLAN2: Qualcomm Atheros QCA4018 5GHz 802.11a/n/ac 2:2x2
INPUT: one WLAN and one WPS button
LEDS: Power, WAN/Internet, WIFI, INFO (red and amber) and LAN.
Serial:
WARNING: The serial port needs a TTL/RS-232 v3.3 level converter!
        The Serial setting is 115200-8-N-1. The SoC's serial port is right
next to the MXIC FLASH chip. The board has a unpopulated 1x4 0.1"
header for it. Use a multimeter to figure out the pinout!

This board currently needs an additional u-boot image in order to boot
properly. Booting with EVA isn't possible ATM.

Install Procedure:
 0. It's highly recommended to connect to the serial port.
    The serial settings are listed above.
 1. install a u-boot image for AVM Fritz!Box 4040
    (see <https://github.com/chunkeey/FritzBox-4040-UBOOT/releases> and
    <https://github.com/chunkeey/FritzBox-4040-UBOOT/blob/master/upload-to-f4040.sh>)
 2. upload the initramfs.itb image via tftp (u-boot listens to
    192.168.1.1 - use binary transfer mode!)
 3. connect to the FB4040 and use sysupgrade sysupgrade.bin
    to install the image.

Works:
- Switch and Ethernet (99%)
        - Buttons (WLAN, WPS)
        - FLASH (1 x 32MiB NOR Chip)
        - WLAN2G and WLAN5G
        - CPUFREQ scaling
        - PRNG
        - serial
        - Crypto Accelerator
        - sysupgrade (Read the flash instructions to avoid bricking)
        - full LEDE Install (Read the flash instructions to avoid bricking)
- LEDs (Power, WAN, Info (red and amber), LAN)
          The LEDs are connected to the QCA8075 LED ports.
  The AR40xx driver contains a gpio-controller to
  handle these special "GPIOs".
        - USB Both 3.0 and 2.0 ports
        - many packages from other ARMv7 boards
          (This does include the RaspberryPi Model 2!)
        - ...

Not planned:
- WAN<->LAN short-cut
- Qualcomm Secure Execution Environment
        - ...

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John Crispin <john@phrozen.org>
7 years agoipq806x: add ipq4019 support
Christian Lamparter [Tue, 14 Mar 2017 16:02:20 +0000 (17:02 +0100)]
ipq806x: add ipq4019 support

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John Crispin <john@phrozen.org>
7 years agouboot-fritz4040: add an ipq806x u-boot for FritzBox 4040
Felix Fietkau [Tue, 14 Mar 2017 09:19:17 +0000 (10:19 +0100)]
uboot-fritz4040: add an ipq806x u-boot for FritzBox 4040

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoprocd: nand: make it possible to configure kernel and ubi partition
Christian Lamparter [Sun, 20 Nov 2016 02:33:03 +0000 (03:33 +0100)]
procd: nand: make it possible to configure kernel and ubi partition

With this patch, the nand.sh script no longer overwrites
CI_KERNELPART and CI_UBIPART if they have been set before.

This allows platforms specify alternative values for these
variables.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years agomac80211: enable ath10k AHB support for QCA4019
Christian Lamparter [Mon, 14 Nov 2016 03:57:38 +0000 (04:57 +0100)]
mac80211: enable ath10k AHB support for QCA4019

This patch enables the ATH10K_AHB support for the QCA4019
devices on the AHB bus.

This patch also removes 936-ath10k_skip_otp_check.patch
because it breaks the AHB device identification.
"Patch is wrong. I find it frustrating OpenWRT/LEDE doesn't
try to work with upstream on ixing these things right."

[1] <https://www.mail-archive.com/ath10k@lists.infradead.org/msg05896.html>

It also limits ath10k memory hunger (This is a problem with 128MiB RAM)

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years agoath10k-firmware: firmware package for QCA4019 devices
Christian Lamparter [Wed, 9 Nov 2016 16:05:42 +0000 (17:05 +0100)]
ath10k-firmware: firmware package for QCA4019 devices

This patch adds a new firmware package to ath10k-firmware
called ath10k-firmware-qca4019.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years agoath10k-firmware: bump to latest version
Christian Lamparter [Wed, 9 Nov 2016 16:05:42 +0000 (17:05 +0100)]
ath10k-firmware: bump to latest version

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years agoinclude: add KERNEL_LOAD_ADDR to TARGET_VARS
John Crispin [Wed, 15 Mar 2017 06:40:08 +0000 (07:40 +0100)]
include: add KERNEL_LOAD_ADDR to TARGET_VARS

This will allow us to override the variable from within a Device template.

Signed-off-by: John Crispin <john@phrozen.org>
7 years agoopenvpn: add extra respawn parameters
Martin Schiller [Thu, 16 Mar 2017 10:25:53 +0000 (11:25 +0100)]
openvpn: add extra respawn parameters

This change protects the openvpn instances to be marked as "in a crash
loop" and thereby the connection retries will run infinitely.

When the remote site of an openvpn connection goes down for some time
(network failure etc.) the openvpn instance in an openwrt/lede device
should not stop retrying to establish the connection.

With the current limit of 5 retries, there is a user interaction
required, which isn't really what you want when the device should
simply do everything to keep the vpn connection up.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
7 years agoutils/tcpdump: Rework URLs
Daniel Engberg [Wed, 22 Mar 2017 07:01:04 +0000 (08:01 +0100)]
utils/tcpdump: Rework URLs

Add actual mirror and use main site as last resport
Source: http://www.tcpdump.org/mirrors.html

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agolibs/libpcap: Rework URLs
Daniel Engberg [Wed, 22 Mar 2017 07:00:40 +0000 (08:00 +0100)]
libs/libpcap: Rework URLs

Add mirror and use main site as last resort.
Source: http://www.tcpdump.org/mirrors.html

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agoutils/util-linux: Update to 2.29.2
Daniel Engberg [Mon, 20 Mar 2017 08:51:26 +0000 (09:51 +0100)]
utils/util-linux: Update to 2.29.2

Update util-linux to 2.29.2
Remote 0001-fix-uClibc-ng-scanf-check.patch as it's been merged upstream.
Refresh patches
Change ncurses to ncursesw to fix compilation and avoid confusion

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agolibs/openssl: Refresh mirror list
Daniel Engberg [Wed, 22 Mar 2017 06:31:20 +0000 (07:31 +0100)]
libs/openssl: Refresh mirror list

Refresh mirror list, some doesn't offer OpenSSL and add main site as last resort.
Source: https://www.openssl.org/source/mirror.html

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agokernel: fix builds with kmod-drm-vc4 and kmod-backlight enabled
Rafał Miłecki [Wed, 22 Mar 2017 07:47:43 +0000 (08:47 +0100)]
kernel: fix builds with kmod-drm-vc4 and kmod-backlight enabled

This fixes:
JDI LT070ME05000 WUXGA DSI panel (DRM_PANEL_JDI_LT070ME05000) [N/m/?] (NEW) aborted!

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agobrcm2708: add kmod-drm-vc4 package
Rafał Miłecki [Tue, 21 Mar 2017 07:49:15 +0000 (08:49 +0100)]
brcm2708: add kmod-drm-vc4 package

It includes vc4 driver for Broadcom VideoCore IV GPU.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agoumdns: update to the version 2017-03-21
Rafał Miłecki [Tue, 21 Mar 2017 21:57:56 +0000 (22:57 +0100)]
umdns: update to the version 2017-03-21

This includes following changes:
480d7bc Fix sending unicast questions on cache expire
a0403cd Keep source sockaddr for every cached DNS record
1478293 Fix code freeing cached non-A(AAA) records too early
9f1cc22 Fix replying to "QU" questions received on unicast interface
943bedb Fix reading port of incoming packets
c725494 Use MCAST_PORT define for port 5353
ce7e9e9 Use one define for DNS-Based Service Discovery service name
e1bacef Drop entries cached for interface we're going to delete
496aeba Fix comment typo in cache_gc_timer
f89986b Fix refreshing cached A(AAA) records that expire

Previous updates made umdns work as expected on startup but there were
still many bugs. They were mostly related to runtime - cache management
and requests + responses. E.g. umdns was never able to send question on
DNS record expire. It was also ignoring all incoming unicast questions.

Since these issues are quite serious it makes sense to backport this
update to the stable branch.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agonetifd: update to git HEAD version
Hans Dedecker [Tue, 21 Mar 2017 21:54:47 +0000 (22:54 +0100)]
netifd: update to git HEAD version

a032166 interface-ip: set prefix indicator flag when IPv6 prefix lifetime changes
b4f8984 system-linux: parse vti specific settings as nested json data object
7e3b89a system-linux: parse gre specific settings as nested json data object

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agovti: add vti specific settings as nested json object
Hans Dedecker [Tue, 14 Mar 2017 21:39:43 +0000 (22:39 +0100)]
vti: add vti specific settings as nested json object

Add vti specific settings ikey and okey as a nested data json object

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agogre: add gre specific settings as nested json object
Hans Dedecker [Tue, 14 Mar 2017 21:34:18 +0000 (22:34 +0100)]
gre: add gre specific settings as nested json object

Add gre specific settings ikey, okey, iseqno, oseqno, icsum
and ocsum as a nested data json object

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agomac80211: brcmfmac: backport patches pushed on 2017-03-20
Rafał Miłecki [Tue, 21 Mar 2017 09:45:30 +0000 (10:45 +0100)]
mac80211: brcmfmac: backport patches pushed on 2017-03-20

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agokernel: update bcma including recent changes for 4.12
Rafał Miłecki [Tue, 21 Mar 2017 08:26:02 +0000 (09:26 +0100)]
kernel: update bcma including recent changes for 4.12

This adds support for describing GPIO chips placed on PCIe cards. Thanks
to this we get working 2.4 GHz LED on Tenda AC9.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agokernel: move disabling DRM symbols to the config file
Rafał Miłecki [Tue, 21 Mar 2017 07:21:34 +0000 (08:21 +0100)]
kernel: move disabling DRM symbols to the config file

This is the standard way we handle this. Please note (it seems) I could
drop few symbols as they are hidden under (disabled) DRM_LEGACY now.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agokernel: video: add kmod-i2c-core dependency to kmod-drm
Rafał Miłecki [Sun, 19 Mar 2017 19:26:34 +0000 (20:26 +0100)]
kernel: video: add kmod-i2c-core dependency to kmod-drm

For targets with i2c not built-in this fixes following error:
Package kmod-drm is missing dependencies for the following libraries:
i2c-core.ko

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agokernel: disable CONFIG_BCM_IPROC_ADC by default
Rafał Miłecki [Tue, 21 Mar 2017 06:12:56 +0000 (07:12 +0100)]
kernel: disable CONFIG_BCM_IPROC_ADC by default

This fixes compiling issue on bcm53xx target with kmod-iio-core:
Broadcom IPROC ADC driver (BCM_IPROC_ADC) [N/m/?] (NEW)

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agoinclude: Add nomips16 CPU_SUBTYPE
Hauke Mehrtens [Tue, 14 Mar 2017 17:55:03 +0000 (18:55 +0100)]
include: Add nomips16 CPU_SUBTYPE

This can be used to indicate that a target does not support the optional mips16
extension even when it is a mips32r2 or later CPU.

This will generate a separate toolchain and a separate package folder,
e.g. mips_24kc_nomips16

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>