aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq806x
Commit message (Collapse)AuthorAgeFilesLines
...
* ipq806x: nbg6817: add kmod-fs-ext4 to device packagesStefan Lippers-Hollmann2017-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The ZyXEL NBG6817 uses an eMMC flash for the rootfs, which is split into the readonly squashfs and ext4 for the overlay. This adds the required package to the device packages to allow mounting the overlay by default. /dev/root on /rom type squashfs (ro,relatime) proc on /proc type proc (rw,nosuid,nodev,noexec,noatime) sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime) tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime) /dev/loop0 on /overlay type ext4 (rw,noatime,data=ordered) overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work) tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000) debugfs on /sys/kernel/debug type debugfs (rw,noatime) mountd(pid1040) on /tmp/run/blockd type autofs (rw,relatime,fd=7,pgrp=1,timeout=30,minproto=5,maxproto=5,indirect) Before this commit, the ext4 based overlayfs could not be mounted, which left only the tmpfs based/ volatile emergency overlay in place. Fixes: https://forum.lede-project.org/t/zyxel-nbg6817-flashing-from-oem/768 Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* treewide: do not use IMG_PREFIX in Image/PrepareJonas Gorski2017-10-261-2/+2
| | | | | | | | | | | | | | IMG_PREFIX can be modified in ImageBuilder by passing EXTRA_IMAGE_NAME on command line, but Image/Prepare is not run in ImageBuilder. This causes missing files when IMG_PREFIX is used for target file names in Image/Prepare, then as source file names in Image/BuildKernel or Image/Build. Fix this by using a fixed output file name in Image/Prepare, and copy to the expected file name in Image/BuildKernel instead, which is run by ImageBuilder. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
* ipq806x: fix Zyxel NBG6817 WiFi buttonTolga Cakir2017-10-251-2/+3
| | | | | | | | Zyxel NBG6817 features a WiFi button, which becomes functional by setting correct GPIO. It is a switch-type button, so it emits KEY_RFKILL on each ON and OFF state. This is achieved by setting input-type to EV_SW. Signed-off-by: Tolga Cakir <tolga@cevel.net>
* kernel: bump 4.9 to 4.9.58Stijn Tintel2017-10-231-2/+2
| | | | | | | | Refresh patches. Compile-tested: ar71xx, octeon, x86/64. Runtime-tested: octeon, x86/64. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* kernel: update 4.9 to 4.9.50Stijn Tintel2017-09-182-72/+64
| | | | | | | | | | | | 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>
* ipq806x: Archer C2600: fix switch ports numberingBaptiste Jonglez2017-08-241-1/+4
| | | | | | | The order of LAN ports shown in Luci is reversed compared to what is written on the case of the device. Fix the order so that they match. Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
* kernel: update 4.9 to 4.9.44Stijn Tintel2017-08-173-3/+3
| | | | | | | | | | | | | | | 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>
* treewide: use only board_name function to get nameMathias Kresin2017-07-151-1/+1
| | | | | | | | | | | | Do not parse /tmp/sysinfo/board_name, /proc/cpuinfo or the device tree compatible string directly. Always use the board_name function to get the board name. The admswconfig package still reads /proc/cpuinfo directly. The code looks somehow broken and the whole adm5120 which uses this package looks unmaintained. Leave it as it is for now. Signed-off-by: Mathias Kresin <dev@kresin.me>
* treewide: drop target board_name functionsMathias Kresin2017-07-151-9/+0
| | | | | | They are not used any longer. Signed-off-by: Mathias Kresin <dev@kresin.me>
* treewide: use the generic board_name functionMathias Kresin2017-07-156-18/+8
| | | | | | Use the generic function instead ot the target specific ones. Signed-off-by: Mathias Kresin <dev@kresin.me>
* treewide: populate boardname and model earlierMathias Kresin2017-07-151-0/+0
| | | | | | | | | | | | | For targets using the generic board detection and board specific settings in diag.sh, the board name is still unset at the time the set_state() provided by diag.sh is called by 10_indicate_preinit. Change the execution order to ensure the boardname is populated before required the first time. Do the target specific board detection as early as possible, directly followed by the generic one to allow a seamless switch to the generic function for populating /tmp/sysinfo/. Signed-off-by: Mathias Kresin <dev@kresin.me>
* kernel: update kernel 4.9 to 4.9.37Koen Vandeputte2017-07-151-51/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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>
* base-files: automatically handle paths and symlinks for RAMFS_COPY_BINMatthias Schiffer2017-07-111-1/+1
| | | | | | | | | | | | Depending on busybox applet selection, paths of basic utiilties may differ, and may not work as symlinks to busybox. Simply using whatever binary is found in PATH and detecting symlinks automatically is more robust and easier to maintain. The list of binaries is also slightly cleaned up and duplicates are removed. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* ipq806x: upgrade: fix RAMFS_COPY_*Matthias Schiffer2017-07-112-21/+5
| | | | | | | | | RAMFS_COPY_* are moved to platform.sh toplevel. The unneeded linksys_preupgrade function is removed, and the nand_do_upgrade call is moved to platform_do_upgrade. Fixes: 30f61a34b4cf "base-files: always use staged sysupgrade" Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* ipq806x: Enable AP148 fit image(.itb) generationRam Chandra Jangir2017-07-061-0/+1
| | | | | | | This change enables .itb image generation for AP148, It will help us to boot and test AP148 with NOR flash. Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
* build: rename TPLINK_BOARD_NAME to TPLINK_BOARD_IDPiotr Dymacz2017-06-291-3/+3
| | | | Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* kernel: cleanup CONFIG_SCHED_HRTICKStijn Tintel2017-06-291-1/+0
| | | | | | | Remove CONFIG_SCHED_HRTICK from target configs, as it was added to the generic config in b47fd7656336162360ebf66147326763ddae3f8d. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* kernel: update kernel 4.9 to 4.9.34Koen Vandeputte2017-06-272-3/+3
| | | | | | | | | | | | - 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>
* ipq806x: qca99xx: fix wifi calibrationPavel Kubelun2017-06-171-2/+2
| | | | | | | | | | As of now OTP is being correctly parsed and the driver requires to parse pre-caldata to follow corresponding routine. Rename cal file into pre-calfile so the board initialized correctly with API 2 board data (board-2.bin). Also remove the now unneeded for qca9984 board.bin symlink to 5GHz calfile. Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
* kernel: update kernel 4.9 to 4.9.31Jo-Philipp Wich2017-06-086-707/+655
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* kernel: disable CONFIG_SG_POOL by defaultSergey Ryazanov2017-06-071-1/+0
| | | | | | | | CONFIG_SG_POOL symbol is selected only by CONFIG_SCSI, since the last one is disabled by default then disable CONFIG_SG_POOL by default too. And explicitly enable it only for platforms that use CONFIG_SCSI. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
* ipq806x: Enable ubi image for ipq40xx AP-DK04.1-C1 boardRam Chandra Jangir2017-06-072-1/+15
| | | | | | | | | | | | | | This change add IPQ40xx AP-DK04.1-C1 board image support, enables ubi image for IPQ40xx AP-DK04.1-C1 board and also add sysupgrage support for AP-DK04.1-C1 and generates a sysupgrade.tar image. Testing: *Tested on IPQ40xx AP-DK04.1-C1: a. NAND boot b. ubi sysupgrade Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
* ipq806x: Updated various ipq40xx pin definitionsRam Chandra Jangir2017-06-071-0/+1332
| | | | | | | This change populates default values for various GPIO functions in ipq40xx pinctrl driver. Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
* ipq806x: add qpic nand and bam dma node's in ipq4019 dts treeRam Chandra Jangir2017-05-291-0/+172
| | | | | | | 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>
* ipq806x: Add support for custom data mapping in bam_dma dmaengineRam Chandra Jangir2017-05-291-0/+217
| | | | | | | This change adds a new function to support for preparing DMA descriptor for custom data. Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
* ipq806x: Added bam transaction and support additional CSRsRam Chandra Jangir2017-05-291-0/+1273
| | | | | | | | | 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>
* ipq806x: Add bam_dma support in qcom_nand driverRam Chandra Jangir2017-05-291-0/+382
| | | | | | | | | 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>
* ipq806x: Add support to configure ipq40xx GPIO_PULL bitsRam Chandra Jangir2017-05-291-0/+260
| | | | | | | | | | 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>
* kernel: update kernel 4.9 to 4.9.30Hauke Mehrtens2017-05-271-1/+1
| | | | Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* treewide: fix device tree path in scriptsMathias Kresin2017-05-261-1/+1
| | | | | | | | The device tree is at /proc/device-tree/ without a base subdir. Fixes: da472e5b30f6 ("treewide: access device tree from userspace via /proc/") Signed-off-by: Mathias Kresin <dev@kresin.me>
* treewide: access device tree from userspace via /proc/Mathias Kresin2017-05-261-1/+1
| | | | | | | Access the device tree via /proc/device-tree/ is the documented way to access the properties. Everything else might not work in future. Signed-off-by: Mathias Kresin <dev@kresin.me>
* kernel: update kernel 4.9 to 4.9.29Koen Vandeputte2017-05-212-2/+2
| | | | | | | | | | | | | - Refresh all patches - Removed upstreamed - Adapted 1 Compile tested on: bcm53xx, cns3xxx, imx6, lantiq Run tested on: cns3xxx & imx6 Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com> [update from 4.9.28 to 4.9.29] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* ipq806x: fix EA8500 switch configurationJo-Philipp Wich2017-05-031-1/+1
| | | | | | | | | Do not assign the CPU port twice, this confuses LuCI and possible other programs relying on topology information in board.json. Ref: https://github.com/openwrt/luci/issues/1086 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* ipq8064: fix dwc3-of-simple module unloading for Netgear R7500Thomas Reifferscheid2017-04-242-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Netgear R7500 dts file and backs off the previous attempt. Now unloading and repeated module loading is working just fine. 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 for Netgear R7500 Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
* ipq8064: Fix dwc3 module unloadingThomas Reifferscheid2017-04-241-3/+11
| | | | | | | | | | 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>
* generic: mtd: backport mx25u25635f stateless 4b supportMathias Kresin2017-04-191-1/+1
| | | | | | | | | 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>
* firmware: rework fritz-tools packageMathias Kresin2017-04-081-1/+1
| | | | | | | | | | | | | | | | Split the fritz-tools into subpackages. fritz_tffs_read is usefull for all Fritz boards where fritz-cal_extract is only required for the Fritz 4040 at the moment. Rename the tffs related binary to the more catchy name fritz_tffs and move the whole package to utilities since the package doesn't really provide a firmware file. Make the fritz-tools available for all targets and build them shared. The tffs is used by avm on lantiq and ar71xx as well. Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Mathias Kresin <dev@kresin.me>
* kernel: update kernel 4.9 to 4.9.20Hauke Mehrtens2017-04-023-49/+26
| | | | Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* ipq8064: fix dwc3-of-simple module unloadingThomas Reifferscheid2017-03-281-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ipq8064: Fix dwc3 module unloadingThomas Reifferscheid2017-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ipq8064: enable 2nd USB port on R7500Thomas Reifferscheid2017-03-272-4/+6
| | | | | | | | | 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>
* ipq806x: tsens: convert degrees to millicelsiusPavel Kubelun2017-03-272-79/+79
| | | | | | | | | | 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>
* ipq806x: add ipq806x specific tsens driverPavel Kubelun2017-03-275-106/+1445
| | | | | | | | | | | | | | | | | 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>
* kernel: update kernel 4.9 to 4.9.17Hauke Mehrtens2017-03-263-4/+3
| | | | Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* treewide: select ath10k firmware explicitMathias Kresin2017-03-241-1/+1
| | | | | | Do not rely on the default firmware selected by ath10k. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ipq806x: fix Netgear X4 R7500 ath10k firmware selectionThomas Reifferscheid2017-03-241-1/+1
| | | | | | | Netgear X4 R7500 comes with a QCA988X. Select a firmware that matches the ath10k chipset Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
* Revert "ipq806x: make the dwc3 driver and required phy drivers built-in"John Crispin2017-03-232-6/+32
| | | | | | | | This reverts commit d5b10bb560c2c3c615babfcfb64519bfc65818d9. This caused boot errors on some ipq8 boards Signed-off-by: John Crispin <john@phrozen.org>
* ipq806x: remove v4.4 supportJohn Crispin2017-03-22128-22377/+0
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* ipq806x: set v4.9 as defaultJohn Crispin2017-03-221-1/+1
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* ipq806x: make the dwc3 driver and required phy drivers built-inJohn Crispin2017-03-222-32/+6
| | | | Signed-off-by: John Crispin <john@phrozen.org>