+ John Stultz.

John submitted a patch recently to temporarily fix the issue by disabling the
power down feature in Hikey.

https://lkml.org/lkml/2018/5/21/730

John, I have listed some of my findings to this thread which will help
debugging the issue.

Thanks,
Mani

On Thu, May 17, 2018 at 04:04:01PM +0530, Manivannan Sadhasivam wrote:
> Hi Artur,
> 
> Thanks for the reply!
> 
> On Thu, May 17, 2018 at 09:10:06AM +0000, Artur Petrosyan wrote:
> > Hi Mani,
> > 
> > We need some detailed information to perform debugging.
> > 
> > 1. Could you please share the documentation of "96Boards HiKey" board, at 
> > least dwc core configuration parameters. Or dump of GHWCFG1-4.
> 
> You can find the HiKey documentation here:
> https://github.com/96boards/documentation/tree/master/consumer/hikey/hardware-docs
> 
> GHWCFG register dump:
> 
> GHWCFG1 = 0x00000000
> GHWCFG2 = 0x23affc70
> GHWCFG3 = 0x0780d4e8
> GHWCFG4 = 0xfff00060
> 
> > 2. Could you  please share with us full debug log of dwc2 loading and plug 
> > the USB device.
> 
> Here is the full kernel log from the boot till USB device gets plugged in:
> https://pastebin.ubuntu.com/p/3bZwWtk8wD/
> 
> > 3. From short debug log seen that Host exited from hibernation after USB 
> > device plugged to the port. Do you mean that enumeration process didn't 
> > start? If not, could you please dump registers after "dwc2 f72c0000.usb: 
> > Host hibernation restore complete"
> 
> Yeah, I guess the enumeration process didn't happen at all. Here is the
> register dump after plugging the device:
> 
> https://pastebin.ubuntu.com/p/3vxdkFGgp6/
> 
> > 4. In which mode had the dwc2 been built. In host only mode or DRD mode?
> 
> DWC2 in HiKey is built in Dual Role Device (DRD) mode.
> 
> > 5. And you mention that USB controller's DP/DM out is connected to a switch 
> > which switches between a USB type C port and a HUB (USB2513B). Is the 
> > device connected to USB type C port or to HUB (USB2513B) ? Switching 
> > connection done before dwc2 load or after?
> >
> 
> The USB device is connected to one of the ports from HUB and there is one
> gpio which is used for switching the USB ports between Type-C and HUB. By
> default, this gpio is unused and it pulled low, which means HUB will get
> selected before dwc2 gets loaded.
> 
> Hope this information will help debugging the issue.
> 
> Thanks,
> Mani
> 
> > Looking forward to your reply.
> > 
> > Regards,
> > Artur
> > 
> > 
> > -----Original Message-----
> > From: Manivannan Sadhasivam [mailto:manivannan.sadhasi...@linaro.org] 
> > Sent: Wednesday, May 16, 2018 17:23
> > To: linux-usb@vger.kernel.org
> > Cc: john.y...@synopsys.com; mvar...@synopsys.com; 
> > arthur.petros...@synopsys.com; grigor.tovmas...@synopsys.com; 
> > felipe.ba...@linux.intel.com
> > Subject: usb: dwc2: Regression on 96Boards Hikey due to enabling power down
> > 
> > Hello,
> > 
> > Commit 03ea6d6e9e1ff1b0222eb723eee5990d3511cc4d introduced the powerdown 
> > feature in USB DWC2 driver which stops USB from working on 96Boards HiKey 
> > board.
> > 
> > During bootup, USB host controller goes into hibernation state and when any 
> > USB device is plugged onto the port, the host finishes executing the GPWRDN 
> > interrupt handler but still it didn't wake up.
> > 
> > Below is the dmesg log after plugging a device onto USB port:
> > 
> > [   30.763414] dwc2 f72c0000.usb: dwc2_handle_gpwrdn_intr: 
> > dwc2_handle_gpwrdwn_intr called gpwrdn= 081411bb
> > [   30.763458] dwc2 f72c0000.usb: dwc2_handle_gpwrdn_intr: GPWRDN_LNSTSCHG
> > [   30.763492] dwc2 f72c0000.usb: dwc2_host_exit_hibernation: called with 
> > rem_wakeup = 1 reset = 0
> > [   30.763623] dwc2 f72c0000.usb: dwc2_restore_essential_regs: restoring 
> > essential regs
> > [   30.763671] dwc2 f72c0000.usb: restore done  generated here
> > [   30.976707] dwc2 f72c0000.usb: dwc2_restore_global_registers
> > [   30.976723] dwc2 f72c0000.usb: dwc2_restore_host_registers
> > [   30.976741] dwc2 f72c0000.usb: Host hibernation restore complete
> > 
> > I tried to manually reset the HUB and PHY after plugging in the device but 
> > that didn't help.
> > 
> > This issue has been detected in kernel 4.17-rc1.
> > 
> > Can anyone shed some light here? Any help would be greatly appreciated!
> > 
> > Note: On this board, the USB controller's DP/DM out is connected to a 
> > switch which switches between a USB type C port and a HUB (USB2513B).
> > 
> > Thanks,
> > Mani
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to