All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: Roger Quadros <rogerq@ti.com>, John Youn <John.Youn@synopsys.com>
Cc: "nsekhar\@ti.com" <nsekhar@ti.com>,
	"linux-usb\@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] usb: dwc3: core: Introduce dwc3_device_reinit()
Date: Thu, 31 Mar 2016 17:26:35 +0300	[thread overview]
Message-ID: <87r3eqg1us.fsf@intel.com> (raw)
In-Reply-To: <56FD2E13.2010903@ti.com>

[-- Attachment #1: Type: text/plain, Size: 4921 bytes --]


Hi,

Roger Quadros <rogerq@ti.com> writes:
>>>>>>>>>> We will need this function for a workaround.
>>>>>>>>>> The function issues a softreset only to the device
>>>>>>>>>> controller and performs minimal re-initialization
>>>>>>>>>> so that the device controller can be usable.
>>>>>>>>>>
>>>>>>>>>> As some code is similar to dwc3_core_init() take out
>>>>>>>>>> common code into dwc3_get_gctl_quirks().
>>>>>>>>>>
>>>>>>>>>> We add a new member (prtcap_mode) to struct dwc3 to
>>>>>>>>>> keep track of the current mode in the PRTCAPDIR register.
>>>>>>>>>>
>>>>>>>>>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>>>>>>>>>
>>>>>>>>> I must say, I don't like this at all :-p There's ONE known silicon which
>>>>>>>>> needs this because of a poor silicon integration which took an IP with a
>>>>>>>>> known erratum where it can't be made to work on lower speeds and STILL
>>>>>>>>> was integrated without a superspeed PHY.
>>>>>>>>>
>>>>>>>>> There's a reason why I never tried to push this upstream myself ;-)
>>>>>>>>>
>>>>>>>>> I'm really thinking we might be better off adding a quirk flag to skip
>>>>>>>>> the metastability workaround and allow this ONE silicon to set the
>>>>>>>>> controller to lower speed.
>>>>>>>>>
>>>>>>>>> John, can you check with your colleagues if we would ever fall into
>>>>>>>>> STAR#9000525659 if we set maximum speed to high speed during driver
>>>>>>>>> probe and never touch it again ? I would assume we don't really fall
>>>>>>>>> into the metastability workaround, right ? We're not doing any sort of
>>>>>>>>> PM for dwc3...
>>>>>>>>>
>>>>>>
>>>>>> Hi Felipe,
>>>>>>
>>>>>> Do you mean to keep DCFG.speed to SS and set dwc->maximum_speed to HS?
>>>>>> I don't see an issue with that as long as we always ignore
>>>>>> dwc->maximum_speed when programming DCFG.speed for all affected
>>>>>> versions of the core. As long as the DCFG.speed = SS, you should not
>>>>>> hit the STAR.
>>>>>
>>>>> I actually mean changing DCFG.speed during driver probe and never
>>>>> touching it again. Would that still cause problems ?
>>>>>
>>>>
>>>> In that case I'm not sure. The engineer who would know is off until
>>>> next week so I'll get back to you as soon as I can talk to him about
>>>> it.
>>>
>> 
>> So the engineers said that this issue can occur while set to HS and
>> the run/stop bit is changed so it seems that won't work.
>
> Thanks John.
>
> Felipe,
>
> any suggestion how we can fix this upstream?

no idea, I don't have a lot of memory about this problem. I really don't
remember the details about this, is there an openly available errata
document which I could read ? /me goes search for it.

I found [1] which tells me, the following:


| i819        | A Device Control Bit Meta-Stability for USB3.0 Controller in USB2.0 Mode   |
|-------------+----------------------------------------------------------------------------|
| Criticality | Medium                                                                     |
|             |                                                                            |
| Descritiion | When USB3.0 controller core is programmed to be a USB 2.0-only device      |
|             | hardware meta-stability on USB_DCTL[31]RUNSTOP bit causing the core to     |
|             | attempt high speed as well as SuperSpeed connection or completely miss     |
|             | the attach request.                                                        |
|             |                                                                            |
| Workaround  | If the requirement is to always function in USB 2.0 mode, there is no      |
|             | workaround.                                                                |
|             | Otherwise, you can always program the USB controller core to be SuperSpeed |
|             | 3.0 capable (USB_DCFG[2:0]DEVSPD = 0x4)                                    |
|             |                                                                            |
| Revisions   | SR 1.1, 2.0                                                                |
| Impacted    |                                                                            |
|-------------+----------------------------------------------------------------------------|

So, TI's own documentation says that there is _no_ workaround. My
question is, then: How are you sure that resetting the device actually
solves the issue ? Did you really hit the metastability problem and
noted that it works after a soft-reset ? How did you verify that
Run/Stop was in a metastable state, considering that Run/Stop signal is
not visible outside the die ?

It seems to me that resetting the IP is just as "dangerous" as setting
the IP to High-speed in the first place. No ?

[1] http://www.ti.com/lit/er/sprz429h/sprz429h.pdf

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

  reply	other threads:[~2016-03-31 14:30 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16 13:05 [PATCH 0/2] usb: dwc3: gadget: Fix erratic interrupts and delayed enumeration Roger Quadros
2016-03-16 13:05 ` [PATCH 1/2] usb: dwc3: core: Introduce dwc3_device_reinit() Roger Quadros
2016-03-16 13:12   ` Felipe Balbi
2016-03-16 13:55     ` Felipe Balbi
2016-03-18 19:17       ` John Youn
2016-03-21  7:14         ` Felipe Balbi
2016-03-21 18:39         ` John Youn
2016-03-22  6:39           ` Felipe Balbi
2016-03-24  0:40             ` John Youn
2016-03-24  6:51               ` Felipe Balbi
2016-03-30 18:44                 ` John Youn
2016-03-31 14:02                   ` Roger Quadros
2016-03-31 14:26                     ` Felipe Balbi [this message]
2016-04-04  7:50                       ` Roger Quadros
2016-04-04  8:10                         ` Felipe Balbi
2016-04-04 20:35                           ` Shankar, Abhishek
2016-04-11 12:37                           ` Roger Quadros
2016-04-11 12:51                             ` Felipe Balbi
2016-04-11 12:58                               ` Roger Quadros
2016-04-11 13:28                                 ` Felipe Balbi
2016-03-16 13:05 ` [PATCH 2/2] usb: dwc3: gadget: usb: dwc3: run/stop metastability workaround Roger Quadros
2016-03-16 13:14   ` Felipe Balbi
2016-03-16 13:27     ` Roger Quadros
2016-03-16 13:08 ` [PATCH 0/2] usb: dwc3: gadget: Fix erratic interrupts and delayed enumeration Felipe Balbi

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=87r3eqg1us.fsf@intel.com \
    --to=balbi@kernel.org \
    --cc=John.Youn@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=rogerq@ti.com \
    /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.