All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [usb dwc3] xHCI driver -- a hint needed.
Date: Mon, 9 Sep 2019 18:03:45 +0200	[thread overview]
Message-ID: <59bfc37b-8870-3413-269b-c874b81666f3@baylibre.com> (raw)
In-Reply-To: <CAEUhbmVu3VBEyiGv=KGg0ZfRL2+OC6_tU7Qb1ufdeTjdXoTfhw@mail.gmail.com>

Hi Bin,


On 08/09/2019 14:35, Bin Meng wrote:
> Hi Neil,
> 
> On Sun, Sep 8, 2019 at 8:33 PM Neil Armstrong <narmstrong@baylibre.com> wrote:
>>
>> Hi Bin,
>>
>> Le 07/09/2019 à 05:44, Bin Meng a écrit :
>>> Hi Neil,
>>>
>>> On Thu, Sep 5, 2019 at 11:48 PM Neil Armstrong <narmstrong@baylibre.com> wrote:
>>>>
>>>> Hi Bin,
>>>>
>>>> I've been having the same behavior on the Amlogic S905X SoC with a DWC3 XHCI controller
>>>> connected to 2 HS-only PHYs and no SS PHY.
>>>>
>>>> When a device is connected on the second PHY, I have the same BUG(),
>>>> but no more when a device is also connected on the first PHY, and no issues
>>>> at all on the first PHY.
>>>>
>>>> XHCI timeout on event type 33... cannot recover.
>>>>
>>>> What kind of debug output would you need to debug this ?
>>>>
>>>> => When Port 1 is disconnected, but Port 2 is populated:
>>>> usb_control_msg: request: 0x1, requesttype: 0x23, value 0x10 index 0x2 length 0x0
>>>> clear port connect change, actual port 2 status  = 0x6e1
>>>> ...
>>>> usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x2 length 0x0
>>>> ...
>>>> usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x2 length 0x4
>>>> SPEED = FULLSPEED
>>>> ...
>>>> usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x2 length 0x0
>>>> ...
>>>> usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x2 length 0x4
>>>> SPEED = FULLSPEED
>>>> ...
>>>> usb_control_msg: request: 0x1, requesttype: 0x23, value 0x14 index 0x2 length 0x0
>>>> clear port reset change, actual port 2 status  = 0x603
>>>>
>>>>
>>>> => When Port 1 is populated:
>>>> usb_control_msg: request: 0x1, requesttype: 0x23, value 0x10 index 0x2 length 0x0
>>>> clear port connect change, actual port 2 status  = 0x6e1
>>>> ...
>>>> usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x2 length 0x0
>>>> ...
>>>> usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x2 length 0x4
>>>> SPEED = FULLSPEED
>>>> ...
>>>> usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x2 length 0x0
>>>> ...
>>>> usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x2 length 0x4
>>>> SPEED = HIGHSPEED
>>>> ...
>>>> usb_control_msg: request: 0x1, requesttype: 0x23, value 0x14 index 0x2 length 0x0
>>>> clear port reset change, actual port 2 status  = 0xe03
>>>>
>>>> When Port 1 is populated, Port 2 status correctly switches to HIGHSPEED,
>>>> but why ?
>>>>
>>>
>>> This looks really strange. Sounds like a hardware internal state
>>> depends on the first USB port. Do you know if Linux works?
>>
>> Yes, Linux works fine, is it worth tracing the Linux XHCI driver aswell ?
> 
> Yes, that will definitely help.

I did a extensive debug and print session today agains the amlogic u-boot release and Linux,

and only :
clrbits_le32(&dwc3_reg->g_usb2phycfg, DWC3_GUSB2PHYCFG_SUSPHY);

was missing in drivers/usb/host/xhci-dwc3.c

because xhci-dwc3 is not using the dwc3 core init.

it should use the dwc3 core init instead of a copy, that correctly handles
the quirks.

Neil

> 
> Regards,
> Bin
> 

  reply	other threads:[~2019-09-09 16:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-09 13:11 [U-Boot] [usb dwc3] xHCI driver -- a hint needed Yuri Frolov
2019-09-05 15:48 ` Neil Armstrong
2019-09-07  3:44   ` Bin Meng
2019-09-08 12:33     ` Neil Armstrong
2019-09-08 12:35       ` Bin Meng
2019-09-09 16:03         ` Neil Armstrong [this message]
2019-09-11 13:19           ` Jean-Jacques Hiblot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59bfc37b-8870-3413-269b-c874b81666f3@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.