In current state there's huge regression on ipq806x target that causes the device to transmit broken/malformed frames that are not corrected/detected by error control mechanisms and other less severe issues.
https://bugs.lede-project.org/index.php?do=details&task_id=1197
This finally had been narrowed down to patch 0071-pcie-qcom-fixes.patch
Meanwhile QSDK contains a handful of commits that add support for ipq806x to upstream qcom pcie driver
https://source.codeaurora.org/quic/qsdk/oss/kernel/linux-msm/log/drivers/pci/host/pcie-qcom.c?h=eggplant
Unfortunately qca developers do not bother to push it upstream.
Using those commits instead of lede 0071 patch fixes mentioned issue and probably many others as it seems that corrupted data has been originating within pcie misconfiguration.
Fixes: FS#1197 and probably others
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
* QCA IPQ401x
* 256 MB of RAM
* 32 MB of SPI NOR flash (s25fl256s1)
- 2x 15 MB available; but one of the 15 MB regions is the recovery image
* 2T2R 2.4 GHz
- QCA4019 hw1.0 (SoC)
- requires special BDF in QCA4019/hw1.0/board-2.bin with
bus=ahb,bmi-chip-id=0,bmi-board-id=16,variant=OM-A42
* 2T2R 5 GHz
- QCA4019 hw1.0 (SoC)
- requires special BDF in QCA4019/hw1.0/board-2.bin with
bus=ahb,bmi-chip-id=0,bmi-board-id=17,variant=OM-A42
* multi-color LED (controlled via red/green/blue GPIOs)
* 1x button (reset; kmod-input-gpio-keys compatible)
* external watchdog
- triggered GPIO
* 1x USB (xHCI)
* TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX)
* 2x gigabit ethernet
* powered only via POE
- 802.3af POE on Ethernet 1
- 18-24v passive POE (mode B) on Ethernet 2
The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be
used to transfer the factory image to the u-boot when the device boots up.
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
There are only artifacts for these boards in our tree and not even
partial support.
Drop teh stale files.
Signed-off-by: Mathias Kresin <dev@kresin.me>
AP-DK01.1-C1 is QCA dev board with:
- ipq4018 quad core ARM @716.8MHz, 2x2 dual (11n+11ac) radio
- 256MB RAM
- 32MB SPI flash
- QCA8075 multiport ethernet phy (WAN port, 4x LAN ports)
First installation via u-boot:
sf probe
sf erase 0x180000 0x1a00000
tftpboot 0x84000000 lede-ipq806x-AP-DK01.1-C1-squashfs-sysupgrade.bin
sf write 0x84000000 0x180000 $filesize
Further upgrades via sysupgrade.
Changes:
- add partitions
- set memory size to 256MB
- add reserved memory mapping
- add correct compatible string
- add image generation
- extract pre-cal data from ART partition
Compile and run tested.
Wirespeed NAT can be achieved with spreading rx interrupts over different
cores. Wifi speed is ~550Mbps @5GHz in open air.
Note:
AP-DK01.1-C1 is fully compatible with AP-DK01.2-C1, which has
ipq4028 instead of ipq4018 on board.
Changes since v2:
- based on dts(i) rework/cleanup submitted:
http://lists.infradead.org/pipermail/lede-dev/2017-October/009596.html
- precise reserved memory mapping
- more precise description
- compatible string
Signed-off-by: Roman Yeryomin <roman@advem.lv>
Supported frequencies of all ipq40xx chips are 48, 200, 500 and 716.8 MHz.
Previous 666MHz setting was most likely related to instability of early
chips/boards made before mass production.
Signed-off-by: Roman Yeryomin <roman@advem.lv>
Refresh patches.
Compile-tested on ipq8065/nbg6817 and x86/64.
Runtime-tested on ipq8065/nbg6817 and x86/64.
Fixes CVE-2017-1000251.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
[adapt qcom_nandc.c patches to match upstream changes, test ipq8065/nbg6817]
Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Refresh patches.
Adapt 704-phy-no-genphy-soft-reset.patch.
Remove brcm2708/950-0005-mm-Remove-the-PFN-busy-warning.patch.
Compile-tested on brcm2708/bcm2708 and x86/64.
Runtime-tested on brcm2708/bcm2708 and x86/64.
Fixes the following vulnerabilities:
- CVE-2017-7533
- CVE-2017-1000111
- CVE-2017-1000112
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
- Refreshed all patches
- Removed upstreamed
- Adapted 4 patches:
473-fix-marvell-phy-initialization-issues.patch
-----------------------------------------------
Removed hunk 5 which got upstreamed
403-net-phy-avoid-setting-unsupported-EEE-advertisments.patch
404-net-phy-restart-phy-autonegotiation-after-EEE-advert.patch
--------------------------------------------------------------
Adapted these 2 RFC patches, merging the delta's from an upstream commit
(see below) which made it before these 2.
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-
stable.git/commit/?h=v4.9.36&id=97ace183074d306942b903a148aebd5d061758f0
180-usb-xhci-add-support-for-performing-fake-doorbell.patch
-----------------------------------------------------------
- Moved fake_doorbell bitmask due to new item
Compile tested on: cns3xxx, imx6
Run tested on: cns3xxx, imx6
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
- Refreshed all patches
- Adapted 1 (0031-mtd-add-SMEM-parser-for-QCOM-platforms.patch)
Compile tested on: brcm2708, cns3xxx, imx6
Run tested on: brcm2708, cns3xxx, imx6
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
[Compile and run tested on brcm2708]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Fixes the following security vulnerabilities:
CVE-2017-8890
The inet_csk_clone_lock function in net/ipv4/inet_connection_sock.c in the
Linux kernel through 4.10.15 allows attackers to cause a denial of service
(double free) or possibly have unspecified other impact by leveraging use
of the accept system call.
CVE-2017-9074
The IPv6 fragmentation implementation in the Linux kernel through 4.11.1
does not consider that the nexthdr field may be associated with an invalid
option, which allows local users to cause a denial of service (out-of-bounds
read and BUG) or possibly have unspecified other impact via crafted socket
and send system calls.
CVE-2017-9075
The sctp_v6_create_accept_sk function in net/sctp/ipv6.c in the Linux kernel
through 4.11.1 mishandles inheritance, which allows local users to cause a
denial of service or possibly have unspecified other impact via crafted
system calls, a related issue to CVE-2017-8890.
CVE-2017-9076
The dccp_v6_request_recv_sock function in net/dccp/ipv6.c in the Linux
kernel through 4.11.1 mishandles inheritance, which allows local users to
cause a denial of service or possibly have unspecified other impact via
crafted system calls, a related issue to CVE-2017-8890.
CVE-2017-9077
The tcp_v6_syn_recv_sock function in net/ipv6/tcp_ipv6.c in the Linux kernel
through 4.11.1 mishandles inheritance, which allows local users to cause a
denial of service or possibly have unspecified other impact via crafted
system calls, a related issue to CVE-2017-8890.
CVE-2017-9242
The __ip6_append_data function in net/ipv6/ip6_output.c in the Linux kernel
through 4.11.3 is too late in checking whether an overwrite of an skb data
structure may occur, which allows local users to cause a denial of service
(system crash) via crafted system calls.
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8890
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9074
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9075
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9076
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9077
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9242
Ref: https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.31
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This change adds QPIC BAM dma and NAND driver node's in IPQ4019
device tree, also enable this for AP-DK04.1 based boards.
Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
This change adds support for below:
- Bam transaction which will be used for any NAND request.
- Reset function for NAND BAM transaction
- Add support for additional CSRs.
Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
The existing qcom_nand driver supports ADM DMA which is mainly
required for ipq806x family based boards,
IPQ40xx based boards uses BAM DMA in NAND driver, so this patch
adds BAM DMA support with compatible string as qcom,ebi2-nandc-bam.
Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
GPIO_PULL bits configurations in TLMM_GPIO_CFG register
differs for IPQ40xx from rest of the other qcom SoC's.
This change add support to configure the msm_gpio_pull
bits for ipq40xx, It is required to fix the proper
configurations of gpio-pull bits for nand pins mux.
Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
The patch follows the qualcomm code comments setting
SSUSB_CTRL_TEST_POWERDOWN to 0x1 and is testing and clearing the
bit during USB superspeed PHY init. According to Andy Gross it
needs to be BIT(26).
Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
Acked-by: Andy Gross <andy.gross@linaro.org>
Use the stateless 4-byte op codes for this flash chip to fix reboot
hangs on SoCs expecting the flash chip in 3-byte mode.
Fixes: FS#179
Signed-off-by: Mathias Kresin <dev@kresin.me>
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>
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>
Add back support for the independent_clocks definition that has been
removed between kernel 4.4 and 4.9 by upstream commits
eb96924acddc709db58221c210ca05cd9effb1df and
e86eee6bc2aaa6b3637f6497b26beee09a91bde9
* extend the new cpufreq_dt_platform_data definition in cpufreq-dt.h
* revert the removal of its usage in cpufreq-dt.c
* use new cpufreq-dt.h in qcom-cpufreq.c
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
For IPQ806x targets, TZ protects the registers that are used to
configure the routing of interrupts to a target processor.
To resolve this, this patch uses scm call to route GPIO interrupts
to application processor. Also the scm call interface is changed.
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
At the moment as a workaround definition for scm firmware in DT is used as if it is
apq8064 board. This leads to incomplete scm firmware initialization and as a result
cpuidle driver fails to configure.
By design unlike other qcom boards ipq do not use clocks to connect to scm.
Considering this we're removing from DT and scm driver clocks for ipq boards.
As a result cpuidle does not produce errors about failed configuration anymore.
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
The available amount of coherent DMA memory is very limited. On Linux
4.4 this issue was worked around by increasing the pool size.
It turns out that using coherent memory here is completely unnecessary.
This change reworks the driver code to use kzalloc+dma_map_single
instead.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Do not patch upstream files, overwrite them entirely. The upstream files
are buggy for a number of devices and this significantly simplifies the
patch structure
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: John Crispin <john@phrozen.org>