devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Chen <peter.chen@nxp.com>
To: Roger Quadros <rogerq@ti.com>
Cc: Pawel Laszczak <pawell@cadence.com>,
	"balbi@kernel.org" <balbi@kernel.org>,
	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 00:24:55 +0000	[thread overview]
Message-ID: <20200827002339.GA17559@b29397-desktop> (raw)
In-Reply-To: <ab38721a-ef48-c6a7-aa33-3085ca7b8852@ti.com>

On 20-08-26 15:49:57, Roger Quadros wrote:
> Peter,
> 
> On 26/08/2020 11:07, Peter Chen wrote:
> > > 
> > > 
> > > > 
> > > > On 20-08-26 04:04:01, Pawel Laszczak wrote:
> > > > > > On 20-08-25 15:00:59, Roger Quadros wrote:
> > > > > > > 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?

-- 

Thanks,
Peter Chen

  reply	other threads:[~2020-08-27  0:25 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 [this message]
2020-08-27  9:36                 ` Roger Quadros
2020-08-27 13:02                   ` Felipe Balbi
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=20200827002339.GA17559@b29397-desktop \
    --to=peter.chen@nxp.com \
    --cc=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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).