Skip to content
Snippets Groups Projects
  1. Apr 12, 2017
  2. Apr 11, 2017
  3. Apr 08, 2017
  4. Apr 07, 2017
  5. Apr 04, 2017
  6. Apr 03, 2017
  7. Apr 02, 2017
  8. Mar 30, 2017
    • Christian Mehlis's avatar
      ar71xx: Compex WPJ563 support · dc4eae7a
      Christian Mehlis authored
      
      Specification:
      - SoC: Qualcomm Atheros QCA9563 (775 MHz, MIPS 74Kc)
      - RAM: 128 MiB
      - Storage: 16MB NOR flash
      - Wireless: Built into QCA9563 (Dragonfly), PHY modes b/g/n, 3x3 MIMO
      - Ethernet: 2x1G
      
      Tested and working:
      - ethernet / switch / lan / wan
      - 2.4GHz SoC wifi
      - PCIe
      - leds
      - buzzer
      
      Ramload:
      - tftpboot 0x84000000 lede-ar71xx-generic-wpj563-16M-initramfs-uImage.bin
      - bootm 0x84000000
      
      Install:
      - tftpboot 0x80500000 lede-ar71xx-generic-wpj563-16M-squashfs-sysupgrade.bin
      - erase 0x9f030000 +$filesize
      - erase 0x9f680000 +1
      - cp.b $fileaddr 0x9f030000 $filesize
      
      Erasing 0x9f680000 is required because uboot defines
      "bootcmd=bootm 0x9f680000 || bootm 0x9f030000", so it first tries to boot
      the higher address. I think the 16 mb flash are intended to be used as
      8+8mb for a fallback image. In my hardware only the lower address has a
      bootable image. But to make sure future hardware will boot lede too, I
      erase one block, so uboot will skip this address.
      
      Signed-off-by: default avatarChristian Mehlis <christian@m3hlis.de>
      dc4eae7a
    • Vittorio Gambaletta's avatar
      ar8327: Add workarounds for AR8337 switch. · 967b6be1
      Vittorio Gambaletta authored
      
      RGMII RX delay setting needs to be always specified for AR8337 to
      avoid port 5 RX hang on high traffic / flood conditions.
      
      Also, the HOL registers that set per-port and per-packet-priority
      buffer sizes are updated with the reduced values suggested by the
      QCA switch team.
      
      Finally, AR8327 reserved register fixups are disabled for the AR8337.
      
      This patch is adapted from the Code Aurora QSDK, but with magic
      values mapped to proper defines.
      
      Signed-off-by: default avatarVittorio Gambaletta <openwrt@vittgam.net>
      967b6be1
  9. Mar 29, 2017
  10. Mar 28, 2017
    • Thomas Reifferscheid's avatar
      ipq8064: fix dwc3-of-simple module unloading · 17f60b1c
      Thomas Reifferscheid authored
      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: default avatarThomas Reifferscheid <thomas@reifferscheid.org>
      17f60b1c
    • Thomas Reifferscheid's avatar
      ipq8064: Fix dwc3 module unloading · c75f059b
      Thomas Reifferscheid authored
      
      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: default avatarThomas Reifferscheid <thomas@reifferscheid.org>
      c75f059b
    • John Crispin's avatar
      0f4600c2
  11. Mar 27, 2017
  12. Mar 26, 2017
Loading