From: Felipe Balbi <balbi@kernel.org>
To: Roger Quadros <rogerq@ti.com>, Peter Chen <peter.chen@nxp.com>
Cc: Pawel Laszczak <pawell@cadence.com>,
Rahul Kumar <kurahul@cadence.com>,
"nsekhar@ti.com" <nsekhar@ti.com>,
"vigneshr@ti.com" <vigneshr@ti.com>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH 3/3] usb: cdns3: Enable workaround for USB2.0 PHY Rx compliance test PHY lockup
Date: Thu, 27 Aug 2020 16:02:39 +0300 [thread overview]
Message-ID: <87sgc8i6mo.fsf@kernel.org> (raw)
In-Reply-To: <b083883d-b8c3-ee16-6b02-8987cade17ed@ti.com>
[-- Attachment #1: Type: text/plain, Size: 3653 bytes --]
Hi,
Roger Quadros <rogerq@ti.com> writes:
>>>>>>>>> From: Pawel Laszczak <pawell@cadence.com>
>>>>>>>>>
>>>>>>>>> USB2.0 PHY hangs in Rx Compliance test when the incoming packet
>>>>>>>>> amplitude is varied below and above the Squelch Level of Receiver
>>>>>>>>> during the active packet multiple times.
>>>>>>>>>
>>>>>>>>> Version 1 of the controller allows PHY to be reset when RX fail
>>>>>>>>> condition is detected to work around the above issue. This feature
>>>>>>>>> is disabled by default and needs to be enabled using a bit from
>>>>>>>>> the newly added PHYRST_CFG register. This patch enables the workaround.
>>>>>>>>>
>>>>>>>>> As there is no way to distinguish between the controller version
>>>>>>>>> before the device controller is started we need to rely on a DT
>>>>>>>>> property to decide when to apply the workaround.
>>>>>>>>
>>>>>>>> Pawel, it could know the controller version at cdns3_gadget_start,
>>>>>>>> but the controller starts when it tries to bind gadget driver, at
>>>>>>>> that time, it has already known the controller version.
>>>>>>>>
>>>>>>>> For me, the device controller starts is using USB_CONF.DEVEN (Device
>>>>>>>> Enable) through usb_gadget_connect, I am not sure if it is the same
>>>>>>>> with yours.
>>>>>>>>
>>>>>>>
>>>>>>> Yes in device mode driver knows controller version but this
>>>>>>> workaround Must be enabled also in host mode. In host mode the
>>>>>>> controller doesn't have access to device registers. The controller
>>>>>>> version is placed in device register.
>>>>>>>
>>>>>>
>>>>>> You may suggest your design team adding CHIP_VER register at global
>>>>>> register region, it will easy the software engineer life.
>>>>>>
>>>>> >From what I read, this register is only enabling USB2 PHY reset
>>>>>> software control, it needs for all chips with rev 0x0002450D, and the
>>>>>> place you current change is only for 0x0002450D, right?
>>>>>
>>>>> Even I could say that this workaround should be enabled only for Specific USB2
>>>>> PHY (only 0x0002450D)
>>>>>
>>>>> This bit should not have any impact for Cadence PHY but it can has Impact for third
>>>>> party PHYs.
>>>>>
>>>>
>>>> So, it is related to specific PHY, but enable this specific PHY reset bit is at controller region, why don't
>>>> put this enable bit at PHY region?
>>>
>>> I think this is related to Controller + PHY combination.
>>> The fix for the issue is via a bit in the controller, so it needs to be managed by the
>>> controller driver.
>>>
>>>>
>>>> So, you use controller's device property to know this specific PHY, can controller know this specific
>>>> PHY dynamically?
>>>
>>> Still the PHY will have to tell the controller the enable that bit. How to do that?
>>>
>>> Adding a dt-property that vendors can used was the simplest option.
>>>
>>
>> Ok, does all controllers with ver 0x0002450D need this fix? I just think
>> if we introduce a flag stands for ver 0x0002450D in case this ver has
>> other issues in future or just using phy reset enable property?
>>
>> Pawel & Roger, what's your opinion?
>>
> I think it is best to keep the flags specific to the issue rather than
> a one flag for all issues with a specific version. This way you can
> re-use the flag irrespective of IP version.
I second that. Specially when some SoC-manufacturers may implement ECO
fixes and not change IP revision.
> But best case is that Cadence put a IP revision register in common area as you
> have previously suggested so driver can automatically apply quirks to specific
> versions.
little too late for that :-)
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 857 bytes --]
next prev parent reply other threads:[~2020-08-27 13:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-25 12:00 [PATCH 0/3] usb: cdns,usb3: Convert DT binding to YALM Roger Quadros
2020-08-25 12:00 ` [PATCH 1/3] dt-bindings: usb: Convert cdns-usb3.txt to YAML schema Roger Quadros
2020-08-25 12:00 ` [PATCH 2/3] dt-bindings: usb: cdns,usb3: Add cdns,phyrst-a-enable property Roger Quadros
2020-08-27 11:14 ` Peter Chen
2020-09-02 13:28 ` Roger Quadros
2020-09-02 22:48 ` Peter Chen
2020-08-25 12:00 ` [PATCH 3/3] usb: cdns3: Enable workaround for USB2.0 PHY Rx compliance test PHY lockup Roger Quadros
2020-08-26 3:21 ` Peter Chen
2020-08-26 4:04 ` Pawel Laszczak
2020-08-26 7:16 ` Peter Chen
2020-08-26 7:44 ` Pawel Laszczak
2020-08-26 8:07 ` Peter Chen
2020-08-26 12:49 ` Roger Quadros
2020-08-27 0:24 ` Peter Chen
2020-08-27 9:36 ` Roger Quadros
2020-08-27 13:02 ` Felipe Balbi [this message]
2020-08-27 11:09 ` Peter Chen
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=87sgc8i6mo.fsf@kernel.org \
--to=balbi@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kurahul@cadence.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=pawell@cadence.com \
--cc=peter.chen@nxp.com \
--cc=robh+dt@kernel.org \
--cc=rogerq@ti.com \
--cc=vigneshr@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.