Re: Setting LLUCTL force gen1 bit if max speed is SS for Gen2 controller

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

 



On Thu, May 11, 2023, Krishna Kurapati PSSNV wrote:
> 
> 
> On 5/11/2023 2:59 AM, Thinh Nguyen wrote:
> > Hi,
> > 
> > On Wed, May 10, 2023, Krishna Kurapati PSSNV wrote:
> > > Hi Team,
> > > 
> > >   If we set maximum speed to "super-speed" for a SSP capable controller, I
> > > see device mode working in SS but host mode still works in SSP. From the
> > > yaml documentation of max-speed, I see the following:
> > > 
> > >   maximum-speed:
> > >     description:
> > >       Tells USB controllers we want to work up to a certain speed. Incase
> > > this isn't passed via DT, USB controllers should default to their maximum HW
> > > capability.
> > > 
> > > Shouldn't this maximum speed get limited to gen1 even for host mode ?
> > 
> > The description is ambiguous here. However, we only ever use this
> > property to limit the speed for device mode (from what I see in the
> > other drivers of the kernel). Should we ever need to limit this for host
> > mode, IMHO, we should introduce a new property for that and clarify this
> > property.
> > 
> Hi Thinh,
> 
>   Sorry for not being clear. The following is the version and ID of SM8550
> controller: (usb31 controller)
> 
> VER_NUM: 0x3139302A
> VER_TYPE: 0x67612A2A
> USB3_PRI_USB31_IP_NAME (0xA60C120) = 0x33313130
> 
> We need to force this to gen-1 to fallback to SS even for host mode too as
> customers are facing compliance issues on SSP.
> 

I meant the documentation for maximum-speed property isn't clear for
cases such as DRD usb controller where the controller can operate in
different modes. Your description is pretty clear.

> > > 
> > > If so, can we set LLUCTL Force_Gen1 bit if (Controller is Gen2  && max_speed
> > > = SuperSpeed) somewhere after GCTL core soft reset is done in set_mode ?
> > 
> > BTW, that's for dwc_usb31. For dwc_usb32, we use a different register to
> > limit different eSS speeds and lanecount.
> > 
> > To limit to highspeed for xhci, we can disable usb3 ports (clear the
> > PORTSC.PP). I don't think we can force limit to full or low speed for
> > dwc3 host mode.
> > 
> 
> From your explanation, can I send a patch for with the following:
> 
> 1. Update description for max speed
> 2. Add force_gen1 property and if it is set, check the version (usb31) and
> set LLUCTL.Force_Gen1 bit.
> 
> Later if someone wants to add code for usb32 as well, they can reuse the
> same property and extend the code for the same.
> 
> Let me know if this would be acceptable.
> 

I'm thinking to introduce a generic "host-maximum-speed" property
instead of a "force_gen1" that's specific to dwc3 controller only.

So that we can update the documentation for "maximum-speed" as follow:

* The "maximum-speed" applies to both host and device modes. If
  "host-maximum-speed" is specified, then the host may have a different
  constraint.

Or

* The "maximum-speed" only applies for device mode. The
  "host-maximum-speed" is for host mode.

Thanks,
Thinh




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

  Powered by Linux