aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq806x/files-4.9/arch/arm/boot
Commit message (Collapse)AuthorAgeFilesLines
* ipq806x: drop linux 4.9 supportStefan Lippers-Hollmann2018-05-2214-6037/+0
| | | | Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* ipq806x: remove spi-nor from r7800 dtsPavel Kubelun2018-05-221-45/+0
| | | | | | | | There's no spi-nor in R7800, so disable unequipped interfaces. Signed-off-by: Pavel Kubelun <be.dissent@gmail.com> [slh: rebase for kernel v4.14 as well] Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* ipq806x: remove rpm pinctrl from board dtsPavel Kubelun2018-05-228-40/+0
| | | | | | | | | These pins seem to be used by hw exclusively, so claiming it in kernel causes an error in syslog in k4.14+. Signed-off-by: Pavel Kubelun <be.dissent@gmail.com> [slh: rebase for kernel v4.14 as well] Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* ipq806x: fix EA8500 switch controlPavel Kubelun2018-05-221-4/+18
| | | | | | | | | | | | | | | | | EA8500 has pcie2 slot unequipped. By EA8500 hw design default pcie2 reset gpio (gpio63) is used to reset the switch. That's why enabling pcie2 brings the switch into a working state. So let's just control the gpio63 without enabling the pcie2 slot. We have to remove the pcie2_pins node so the gpio63 is not defined twice. Because pcie2 node has a reference to pcie2_pins we have to remove it as well. Signed-off-by: Pavel Kubelun <be.dissent@gmail.com> [slh: rebase for kernel v4.14 as well] Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* ipq806x: move mmc specific nodes into v1.0 dtsiPavel Kubelun2018-05-222-75/+75
| | | | | | | | | These nodes are common for all revisions so put it into SoC v1.0 dtsi file. Signed-off-by: Pavel Kubelun <be.dissent@gmail.com> [slh: rebase for kernel v4.14 as well] Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* ipq806x: fix pcie tx termination offsetPavel Kubelun2018-05-221-0/+12
| | | | | | | | | | | | | | According to GPL tarballs and QSDK related branch tx termination offset for ipq8064 SoC version >= 2.0 should be equal to 0 and not 7. https://github.com/paul-chambers/netgear-r7800/blob/master/git_home/linux.git/sourcecode/arch/arm/mach-msm/board-ipq806x.c#L1682-L1685 Fix this. Signed-off-by: Pavel Kubelun <be.dissent@gmail.com> [slh: rebase for kernel v4.14 as well] Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* ipq806x: apply updated USB PHY settings to v2.0 SoCPavel Kubelun2018-05-222-11/+17
| | | | | | | | | | | | | | | | | | | USB PHY power settings introduced for ipq8065 SoC with commit 644a0d5 "ipq8065: adjust SS USB PHY power settings" According to that commit msg and in correspondence to GPL tarballs and related QSDK branch those settings are applied to ipq8064 SoCs of version >= 2.0. https://github.com/paul-chambers/netgear-r7800/blob/master/git_home/linux.git/sourcecode/arch/arm/mach-msm/board-ipq806x.c#L2507-L2514 Now as we have clarified that mass market boards are of SoC v2.0 move those USB PHY settings from ipq8065 (v3.0 SoC) dtsi to ipq8064 v2.0 dtsi. Signed-off-by: Pavel Kubelun <be.dissent@gmail.com> [slh: rebase for kernel v4.14 as well] Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* ipq806x: reference ipq8065 as ipq8064 v3.0Pavel Kubelun2018-05-224-4/+3
| | | | | | | | | | | ipq8065 is ipq8064 v3.0 > socinfo_init: v6, id=280, ver=3.0, raw_id=17, raw_ver=17, hw_plat=0, hw_plat_ver=65536 Include dtsi accordingly and remove the unneeded qcom-ipq8065-v1.0.dtsi Signed-off-by: Pavel Kubelun <be.dissent@gmail.com> [slh: rebase for kernel v4.14 as well] Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* ipq806x: move mass market ipq8064 to v2 dtsiPavel Kubelun2018-05-225-5/+5
| | | | | | | | | | | | | | | | | According to OEM bootlog entry mass market devices are ipq8064 SoC v2.0: > socinfo_init: v6, id=202, ver=2.0, raw_id=2064, raw_ver=2064, hw_plat=0, hw_plat_ver=65536 I've checked C2600, EA8500 and VR2600v but couldn't find other boards bootlog. I think it's safe to assume that other boards are also v2.0. R7500 may be an exception because it was the first device to hit the market. So switch to v2.0 dtsi. Signed-off-by: Pavel Kubelun <be.dissent@gmail.com> [slh: rebase for kernel v4.14 as well] Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* ipq806x: introduce ipq8064 SoC v2 dtsiPavel Kubelun2018-05-221-0/+1
| | | | | | | | | | | | | | | According to QCA internal numbering there are 3 versions of ipq8064/5 SoC: ipq8064 v1.0 - probably ipq8064 evaluation boards only ipq8064 v2.0 - probably ipq8064 mass market boards only ipq8064 v3.0 - aka ipq8065, boards based on ipq8065. Each next revision includes configuration differences from previous revision and adds something new. Signed-off-by: Pavel Kubelun <be.dissent@gmail.com> [slh: rebase for kernel v4.14 as well] Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* ipq806x: increase kernel partition size for the Netgear Nighthawk X4 R7500v2Stefan Lippers-Hollmann2018-05-221-3/+3
| | | | | | | | | | | | | | | | | | Starting with kernel 4.14 and gcc 7, the kernel doesn't fit into the 2 MB reserved for the kernel partition by the OEM firmware anymore. This patch increases the kernel partition from 2 MB to 4 MB, at the expense of the rootfs, for all supported kernels. WARNING: This breaks sysupgrade! Flashing a firmware containing this changed partitioning from an older image with 2 MB reserved for the kernel partion requires the tftp recovery procedure, thereby losing all settings. This change follows the functional example of the Netgear r7800, but has not been runtime tested on a Netgear Nighthawk X4 R7500v2. Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* ipq806x: increase kernel partition size for the Netgear Nighthawk X4 R7500Stefan Lippers-Hollmann2018-05-221-3/+3
| | | | | | | | | | | | | | | | | | | Starting with kernel 4.14 and gcc 7, the kernel doesn't fit into the 2 MB reserved for the kernel partition by the OEM firmware anymore. This patch increases the kernel partition from 2 MB to 4 MB, at the expense of the rootfs, for all supported kernels. WARNING: This breaks sysupgrade! Flashing a firmware containing this changed partitioning from an older image with 2 MB reserved for the kernel partion requires the tftp recovery procedure, thereby losing all settings. This change follows the functional example of the Netgear r7800, but has not been runtime tested on a Netgear Nighthawk X4 R7500 Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> Cc: Jonas Gorski <jonas.gorski@gmail.com>
* ipq806x: increase kernel partition size for the Netgear Nighthawk X4 D7800Stefan Lippers-Hollmann2018-05-221-3/+3
| | | | | | | | | | | | | | | | | | | Starting with kernel 4.14 and gcc 7, the kernel doesn't fit into the 2 MB reserved for the kernel partition by the OEM firmware anymore. This patch increases the kernel partition from 2 MB to 4 MB, at the expense of the rootfs, for all supported kernels. WARNING: This breaks sysupgrade! Flashing a firmware containing this changed partitioning from an older image with 2 MB reserved for the kernel partion requires the tftp recovery procedure, thereby losing all settings. This change follows the functional example of the Netgear r7800, but has not been runtime tested on a Netgear Nighthawk X4 D7800. Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> Cc: Tathagata Das <tathagata@alumnux.com>
* ipq806x: increase kernel partition size for the TP-Link Archer VR2600vStefan Lippers-Hollmann2018-05-221-3/+3
| | | | | | | | | | | | | | | | | | The default image does not fit 2 MB anymore, expand kernel partition to 3 MB. Upgrading should work transparently via sysupgrade in both directions. Another option would be to merge "kernel" and "rootfs" into a single "firmware" partition using MTD_SPLIT_TPLINK_FW, but just changing the sizes of the existing partitioning has been deemed safer in the absence of an actual runtime test on an affected device; the maximum for rootfs changes from 10.4 MB to 9.4 MB. This change follows the example for the TP-Link Archer C2600, but has not been runtime tested on a TP-Link Archer VR2600v. Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> Cc: Sebastian Quilitz <zeraphim@x-pantion.de>
* ipq806x: increase kernel partition size for the Netgear r7800Stefan Lippers-Hollmann2018-05-221-3/+3
| | | | | | | | | | | | | | | | | | | Starting with kernel 4.14 and gcc 7, the kernel doesn't fit into the 2 MB reserved for the kernel partition by the OEM firmware anymore. This patch increases the kernel partition from 2 MB to 4 MB, at the expense of the rootfs, for all supported kernels. WARNING: This breaks sysupgrade! Flashing a firmware containing this changed partitioning from an older image with 2 MB reserved for the kernel partion requires the tftp recovery procedure, thereby losing all settings. This patch is based on a corresponding change by Pavel Kubelun <be.dissent@gmail.com> and has been tested by Michael Yartys <michael.yartys@protonmail.com> Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* ipq806x: replace linux,part-probe with a proper partitions subnodeRafał Miłecki2018-04-093-4/+12
| | | | | | | | | | | This solution is more upstream compatible as it only requires specifying of_match_table in the parser code and doesn't depend on linux,part-probe which is solution made generic by a LEDE downstream patch that can't be upstreamed. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> Acked-by: John Crispin <john@phrozen.org>
* ipq806x: add support for Compex WPQ864Christian Mehlis2018-03-151-0/+570
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware highlights: - SoC: Qualcomm Atheros IPQ8064/5 ARM Dual Core CPU - RAM: (512MB or 1GB) DDR3 System Memory - Storage: 32MB NOR (Cypress S25FL256S1) 256MB NAND (Micron MT29F2G08ABBEAH4) - Ethernet: 5 x 1G via QCA8337N - USB: 1 x USB 2.0/3.0 + 1 x USB 2.0 on mini PCIe3 socket - PCIe: 3x mini PCIe (third mini PCIE3 is PCIe/USB shared) - SIM Card Slot: 2 x Slot - Buttons: Reset Button - LEDs: 18x, 8x GPIO controllable - Buzzer The correct amount of RAM will be passed by the bootloader. In contrast to the documentation provided by Compex, the third PCIe doesn't use GPIO16 for PERST. Instead, GPIO3 is shared and used as PERST for PCIe0 and PCIe2. So far, no one was able to get USB 3.0 working with the 1GB RAM version, while it works fine for my 512MB version. Since USB 3.0 doesn't work with the Compex firmware for the 1G variant either, it could be a hardware issue with these boards. OpenWrt will be installed to the NAND flash. Make sure to have a full working image on the NOR flash. It will be the backup in case anything goes wrong. It has been observed that an image loaded via tftpboot might have bitflips. Hence the extra step to create a crc32 checksum to allow to compare the checksum with the one from the source file prior to flashing. In all cases it is necessary to set the following u-boot parameter to an empty (whitespace) value, to ensure that the chosen bootargs of the dts isn't overwritten or set to bogus - not working - values: (IPQ) # set bootargs " " (IPQ) # set fsbootargs " " (IPQ) # saveenv The sysupgrade image can be installed directly on flash using u-boot (put jumper in JP13 (leave JP9 open) to boot from nand): (IPQ) # set serverip 192.168.1.20 (IPQ) # set ipaddr 192.168.1.1 (IPQ) # tftpboot 0x42000000 openwrt-ipq806x-compex_wpq864-squashfs-nand-factory.bin (IPQ) # crc32 0x42000000 $filesize (IPQ) # nand erase 0x1340000 0x4000000 (IPQ) # nand write 0x42000000 0x1340000 $filesize The initramfs image can be started using: (IPQ) # set fdt_high 0x48000000 (IPQ) # tftpboot 0x44000000 openwrt-ipq806x-compex_wpq864-initramfs-fit-uImage.itb (IPQ) # bootm 0x44000000 Signed-off-by: Christian Mehlis <christian@m3hlis.de> Signed-off-by: Mathias Kresin <dev@kresin.me>
* ipq806x: drop ipq40xx supportJohn Crispin2018-03-144-2024/+0
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* ipq806x: add support for GL.iNet GL-B1300Dongming Han2018-02-141-0/+316
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for GL.iNet GL-B1300 Specification: - SOC: IPQ4028 / QCA Dakota - RAM: 256 MiB - FLASH: 32 MiB - ETH: Qualcomm Atheros QCA8075 Gigabit Switch (2 x LAN, 1 x WAN) - USB: 1 x 3.0 (via Synopsys DesignWare DWC3 controller in the SoC) - WLAN1: Qualcomm Atheros QCA4028 2.4GHz 802.11bgn 2:2x2 - WLAN2: Qualcomm Atheros QCA4028 5GHz 802.11a/n/ac 2:2x2 - INPUT: one reset and one WPS button - LEDS: 3 leds: Power, WIFI(only for 2.4G currently), and one reserved - UART: 1 x UART on PCB (3.3V, TX, RX, GND) - 115200 8N1 Installation: Method 1: - use serial port to stop uboot - uboot command: run lf Method 2: - push down reset button and power on - wait until three leds constantly on then release - upgrade by uboot web at http://192.168.1.1 Note: - the sysupgrade image need to be renamed to lede-gl-b1300.bin in both method. - the sysupgrade image can be automatically downloaded if tftp server at 192.168.1.2 have that file. - the wifi led will be flashing when writing image. Signed-off-by: Dongming Han <handongming@gl-inet.com>
* ipq806x: overhaul AVM FRITZ!box 4040 device-tree fileChristian Lamparter2018-01-181-38/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch aligns the device-tree file with the latest guidelines. - No longer include qcom-ipq4019-ap.dk01.1.dtsi. This file is only partially upstream and therefore subjected to changes that might not be compatible with the board. As a result, the definitions from the file have been copied into this dts. - exclusively use decimal GPIO addresses. - reorganize the reserved-memory layout to waste less memory. There's no point in keeping the u-boot loader around. This should also make it possible to create an image that will boot with the original EVA/ADAM2 loader without needing to install the modified u-boot loader. And finally mark the "tz-apps" as reusable. There isn't a way to upload apps to the trust-zone in OpenWrt yet. But it might see some use in the future as a "secure" key-store/TPM. - sort the first-level nodes alphabetically. - sort nodes with an address by the address. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq8065: adjust SS USB PHY power settingsPavel Kubelun2018-01-171-0/+11
| | | | | | | | | | | According to QSDK ipq8065 has different SS USB PHY power settings. Adjust it according to QSDK settings. It also corresponds to oem Netgear R7800 tarball for soc ver >= 2. https://github.com/paul-chambers/netgear-r7800/blob/eeac2e10190f6f45e32e4c7012c4babc351898d8/git_home/linux.git/sourcecode/arch/arm/mach-msm/board-ipq806x.c#L2494 Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
* ipq806x: usb: add phy 1 master reset controlPavel Kubelun2018-01-171-1/+4
| | | | | | | In current state only phy 0 master reset is controlled. Add the phy 1 reset. Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
* ipq806x: usb: Control USB master resetPavel Kubelun2018-01-171-0/+3
| | | | | | | | | | | | | | Picking commit from QSDK https://source.codeaurora.org/quic/qsdk/oss/kernel/linux-msm/commit/?h=eggplant&id=a86bda9f8a7965f0cedd347a9c04800eb9f41ea3 Commit message: "During removal of the glue layer(dwc3-of-simple), USB master reset is set to active and during insertion it is de-activated." Change-Id: I537dc810f6cb2a46664ee674840145066432b957 Signed-off-by: Vasudevan Murugesan <vmuruges@codeaurora.org> (cherry picked from commit 4611e13580a216812f85f0801b95442d02eeb836)" Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
* ipq806x: force 2nd pci slot into gen1 modePavel Kubelun2018-01-1710-13/+17
| | | | | | | | | | | | | | According to QSDK and OEM tarballs (checked c2600, r7500v2, r7800) 2nd pci slot (pci1, 2,4 GHz card)) on ap148 based boards should operate in gen1 mode. EA8500 is an exception and according to GPL pcie0 should operate in gen1 mode. In previous commit we've added the support for this option, so enable it in DT for affected devices. QSDK ref: https://source.codeaurora.org/quic/qsdk/oss/kernel/linux-msm/commit/?h=release/endive_preview_cc&id=f3b07fe309027c52fc163149500cedddd707c506 While at it move the phy transmit termination offset value into dtsi file as it's platform specific. Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
* ipq806x: add support for OpenMesh A42Sven Eckelmann2018-01-131-0/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* ipq806x: drop partitial supported boardsMathias Kresin2018-01-132-332/+0
| | | | | | | | | 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>
* ip806x: nbg6817: don't hardcode the rootfs location by using ↵Stefan Lippers-Hollmann2017-10-291-1/+2
| | | | | | | | | | | | | | | | | | | append-rootblock instead This changes the cmdline from: Kernel command line: root=/dev/mmcblk0p5 rootfstype=squashfs,ext4 rootwait noinitrd Bootloader command line (ignored): board=NBG6817 root=/dev/mmcblk0p5 rootwait zld_ver=2.04 console=ttyHSL1,115200n8 mtdparts=m25p80:0xC0000(SBL)ro,0x40000(TZ)ro,0x40000(RPM)ro,0x80000(u-boot)ro,0x10000(env)ro,0x10000(ART)ro,0x10000(dualflag),0x210000(reserved) to Kernel command line: rootfstype=squashfs,ext4 rootwait noinitrd root=/dev/mmcblk0p5 Bootloader command line (ignored): board=NBG6817 root=/dev/mmcblk0p5 rootwait zld_ver=2.04 console=ttyHSL1,115200n8 mtdparts=m25p80:0xC0000(SBL)ro,0x40000(TZ)ro,0x40000(RPM)ro,0x80000(u-boot)ro,0x10000(env)ro,0x10000(ART)ro,0x10000(dualflag),0x210000(reserved) As a consequence booting from the alternative dual-boot partition set (root=/dev/mmcblk0p8) becomes possible. Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* ipq806x: ipq4019: dts: fix maximum cpu speedRoman Yeryomin2017-10-301-9/+0
| | | | | | | | 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>
* ipq806x: ipq4019: dts: remove spi chip node from ap-dk01 dtsiRoman Yeryomin2017-10-303-20/+0
| | | | | | All ap-dk01 boards have different spi chips, thus no point in keeping it in dtsi. Signed-off-by: Roman Yeryomin <roman@advem.lv>
* ipq806x: ipq4019: dts: move ap-dk01 networking entries to dtsiRoman Yeryomin2017-10-303-70/+0
| | | | | | That is mdio/ethernet and wifi are present on all ap-dk01 boards. Signed-off-by: Roman Yeryomin <roman@advem.lv>
* ipq806x: ipq4019: dts: remove counter entry from ap-dk01 boardsRoman Yeryomin2017-10-303-15/+0
| | | | | | There is no code implementing "qcom,qca-gcnt", so no point in keeping it. Signed-off-by: Roman Yeryomin <roman@advem.lv>
* ipq806x: ipq4019: dts: move ap-dk01 tcsr nodes to dtsiRoman Yeryomin2017-10-303-85/+0
| | | | | | tcsr configuration is the same for all ap-dk01 boards Signed-off-by: Roman Yeryomin <roman@advem.lv>
* ipq806x: ipq4019: dts: remove crypto nodes from board dtsRoman Yeryomin2017-10-303-24/+0
| | | | | | | | | crypto and cryptobam are already present in dtsi used by these boards: - fritz4040 - nbg6617 - rt-ac58u Signed-off-by: Roman Yeryomin <roman@advem.lv>
* ipq806x: ipq4019: dts: fix pinctrl node nameRoman Yeryomin2017-10-301-1/+1
| | | | Signed-off-by: Roman Yeryomin <roman@advem.lv>
* 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>
* 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-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: 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-271-77/+77
| | | | | | | | | | 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-271-59/+332
| | | | | | | | | | | | | | | | | 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>
* ipq806x: add ipq4019 fritz4040 supportChristian Lamparter2017-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ipq806x: add ipq4019 supportChristian Lamparter2017-03-224-0/+1914
| | | | | Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John Crispin <john@phrozen.org>
* ipq806x: remove scm firmware clocksPavel Kubelun2017-03-201-4/+1
| | | | | | | | | | | | | | 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>
* ipq806x: fix ethernet DMA parameters with linux 4.9Felix Fietkau2017-03-131-0/+22
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ipq806x: fix pcie with linux 4.9Felix Fietkau2017-03-131-3/+3
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ipq806x: re-enable the RAM clock for gcc on 4.9Felix Fietkau2017-03-131-2/+2
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ipq806x: fix NAND support for linux 4.9Felix Fietkau2017-03-137-343/+397
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ipq806x: clean up dts patching in 4.9Felix Fietkau2017-03-132-0/+1271
| | | | | | | | | 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>
* ipq806x: clean up dts patchFelix Fietkau2017-03-0811-0/+3864
Move dts files to files/, remove useless patch chunks Signed-off-by: Felix Fietkau <nbd@nbd.name>