Re: ODROID-C1/-C2 USB Detection only triggered by some devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Martin,

On Fri, 2 Jul 2021 at 02:48, Martin Blumenstingl
<martin.blumenstingl@xxxxxxxxxxxxxx> wrote:
>
> Hi Anand,
>
> On Thu, Jul 1, 2021 at 12:04 PM Anand Moon <linux.amoon@xxxxxxxxx> wrote:
> [...]
> > I have been trying some reorder code changes with PHY some new DTS
> > changes both on C1+ and C2.
> > with my changes I got false positve results.
> >
> > So in my debug investigation, it seems that USB reset is not working.
> > I am attaching my latest code changes so that you could verify at your end.
> > If we drop the  phy_meson8b_usb2_reset(phy) all the USB PHY get initialized.
> > Note:  phy core does not call the .reset callback function on its own
> >
> > I have tried crazy ideas with reset API and new approaches, but it seems to fail
> > and also used the reset-name features, but with no luck at my end.
> > I wil try to followup on the suggestion shared in this email thread.
> with your patch USB is not working for me at all on my Odroid-C1+.
> kernel log extract:
> ...
> [    5.089251] phy phy-c1108800.phy.0: phy poweron failed --> -22
> [    5.096456] dwc2: probe of c9040000.usb failed with error -22
> [    5.102182] dwc2 c90c0000.usb: supply vusb_d not found, using dummy regulator
> [    5.108781] dwc2 c90c0000.usb: supply vusb_a not found, using dummy regulator
> [    5.117140] phy phy-c1108820.phy.1: Anand you are calling USB reset1
> [    5.121408] phy phy-c1108820.phy.1: Anand you are calling USB reset2
> [    5.131197] dwc2 c90c0000.usb: dwc2_core_reset: HANG! Soft Reset
> timeout GRSTCTL_CSFTRST
> [    5.137163] dwc2: probe of c90c0000.usb failed with error -16
>
> and then:
> # lsusb
> #

Ok Thanks for testing. my bad luck.

>
> With your patch applied (on top of v5.13) the dwc2 driver does not
> probe anymore.
> I suggest we move the discussion about your patch elsewhere so we can
> focus on getting USB devices detected (again) with the help of Minas
> and Alan.
>
> > I am attaching my usbmon output on Odroid C2.
> Can you please specifically state the testing steps you have used to
> obtain that output?

I followed the kernel documentation to get the output
[0] https://www.kernel.org/doc/html/v5.10/usb/usbmon.html

it's hard to interpret the logs.

> This is important so people who are involved in this discussion don't
> get confused about the results.
>

But I have learned that we could use Wireshark to capture USB handshake
[1] https://fedoraproject.org/wiki/Usbmon#Wireshark_CLI

So I have done some trace capture USB trace with the following command.

# ls /dev/usbmon0 /dev/usbmon1
/dev/usbmon0  /dev/usbmon1
# tshark -i usbmon0 -w /var/tmp/usbmon0.pcap
# tshark -i usbmon1 -w /var/tmp/usbmon1.pcap

Attach are the logs.

> > On some other note on USB HUB reset. I recollect following series (it
> > like *mmc_pwrseq*)
> > [0] https://lore.kernel.org/linux-devicetree/1474342607-27512-1-git-send-email-peter.chen@xxxxxxx/
> this is being replaced by "usb: misc: Add onboard_usb_hub driver"
> which is currently at version 13: [1]
>
>
> Best regards,
> Martin
>
>
> [1] https://marc.info/?l=linux-usb&m=162447367404217&w=2

Thanks for the inputs, cool this looks good.

Thanks
-Anand

Attachment: usbmon0.pcap
Description: Binary data

Attachment: usbmon1.pcap
Description: Binary data


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux