mbox series

[v3,0/2] Skip phy initialization for DWC3 USB Controllers

Message ID 1649323888-12420-1-git-send-email-quic_c_sanm@quicinc.com (mailing list archive)
Headers show
Series Skip phy initialization for DWC3 USB Controllers | expand

Message

Sandeep Maheswaram April 7, 2022, 9:31 a.m. UTC
Runtime suspend of phy drivers was failing from DWC3 driver as
runtime usage value is 2 because the phy is initialized from
DWC3 core and HCD core.
Some controllers like DWC3 and CDNS3 manage phy in their core drivers.
This property can be set to avoid phy initialization in HCD core.

v3:
Coming back to this series based on discussion at below thread
https://patchwork.kernel.org/project/linux-arm-msm/patch/1648103831-12347-4-git-send-email-quic_c_sanm@quicinc.com/
Dropped the dt bindings PATCH 1/3 in v2
https://patchwork.kernel.org/project/linux-arm-msm/cover/1636353710-25582-1-git-send-email-quic_c_sanm@quicinc.com/ 

v2:
Updated the commit descriptions.
Changed subject prefix from dwc to dwc3.
Increased props array size.

Sandeep Maheswaram (2):
  usb: host: xhci-plat: Add device property to set XHCI_SKIP_PHY_INIT
    quirk
  usb: dwc3: host: Set the property usb-skip-phy-init

 drivers/usb/dwc3/host.c      | 4 +++-
 drivers/usb/host/xhci-plat.c | 3 +++
 2 files changed, 6 insertions(+), 1 deletion(-)

Comments

Sandeep Maheswaram April 19, 2022, 10:17 a.m. UTC | #1
Hi Mathias, Felipe,

> -----Original Message-----
> From: Sandeep Maheswaram (Temp) (QUIC) <quic_c_sanm@quicinc.com>
> Sent: Thursday, April 7, 2022 3:01 PM
> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Felipe Balbi
> <balbi@kernel.org>; Stephen Boyd <swboyd@chromium.org>; Doug
> Anderson <dianders@chromium.org>; Matthias Kaehlcke
> <mka@chromium.org>; Mathias Nyman <mathias.nyman@intel.com>
> Cc: linux-arm-msm@vger.kernel.org; linux-usb@vger.kernel.org; linux-
> kernel@vger.kernel.org; Pavan Kumar Kondeti (QUIC)
> <quic_pkondeti@quicinc.com>; Pratham Pratap (QUIC)
> <quic_ppratap@quicinc.com>; Krishna Kurapati PSSNV (QUIC)
> <quic_kriskura@quicinc.com>; Vidya Sagar Pulyala (Temp) (QUIC)
> <quic_vpulyala@quicinc.com>; Sandeep Maheswaram (Temp) (QUIC)
> <quic_c_sanm@quicinc.com>
> Subject: [PATCH v3 0/2] Skip phy initialization for DWC3 USB Controllers
> 
> Runtime suspend of phy drivers was failing from DWC3 driver as runtime
> usage value is 2 because the phy is initialized from
> DWC3 core and HCD core.
> Some controllers like DWC3 and CDNS3 manage phy in their core drivers.
> This property can be set to avoid phy initialization in HCD core.
> 
> v3:
> Coming back to this series based on discussion at below thread
> https://patchwork.kernel.org/project/linux-arm-msm/patch/1648103831-
> 12347-4-git-send-email-quic_c_sanm@quicinc.com/
> Dropped the dt bindings PATCH 1/3 in v2
> https://patchwork.kernel.org/project/linux-arm-msm/cover/1636353710-
> 25582-1-git-send-email-quic_c_sanm@quicinc.com/
> 
> v2:
> Updated the commit descriptions.
> Changed subject prefix from dwc to dwc3.
> Increased props array size.
> 
> Sandeep Maheswaram (2):
>   usb: host: xhci-plat: Add device property to set XHCI_SKIP_PHY_INIT
>     quirk
>   usb: dwc3: host: Set the property usb-skip-phy-init
> 
>  drivers/usb/dwc3/host.c      | 4 +++-
>  drivers/usb/host/xhci-plat.c | 3 +++
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> --
> 2.7.4

Please let me know your opinion about this series.

Regards
Sandeep
Mathias Nyman April 20, 2022, 1:20 p.m. UTC | #2
On 19.4.2022 13.17, Sandeep Maheswaram (Temp) (QUIC) wrote:
> Hi Mathias, Felipe,
> 
>> -----Original Message-----
>> From: Sandeep Maheswaram (Temp) (QUIC) <quic_c_sanm@quicinc.com>
>> Sent: Thursday, April 7, 2022 3:01 PM
>> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Felipe Balbi
>> <balbi@kernel.org>; Stephen Boyd <swboyd@chromium.org>; Doug
>> Anderson <dianders@chromium.org>; Matthias Kaehlcke
>> <mka@chromium.org>; Mathias Nyman <mathias.nyman@intel.com>
>> Cc: linux-arm-msm@vger.kernel.org; linux-usb@vger.kernel.org; linux-
>> kernel@vger.kernel.org; Pavan Kumar Kondeti (QUIC)
>> <quic_pkondeti@quicinc.com>; Pratham Pratap (QUIC)
>> <quic_ppratap@quicinc.com>; Krishna Kurapati PSSNV (QUIC)
>> <quic_kriskura@quicinc.com>; Vidya Sagar Pulyala (Temp) (QUIC)
>> <quic_vpulyala@quicinc.com>; Sandeep Maheswaram (Temp) (QUIC)
>> <quic_c_sanm@quicinc.com>
>> Subject: [PATCH v3 0/2] Skip phy initialization for DWC3 USB Controllers
>>
>> Runtime suspend of phy drivers was failing from DWC3 driver as runtime
>> usage value is 2 because the phy is initialized from
>> DWC3 core and HCD core.
>> Some controllers like DWC3 and CDNS3 manage phy in their core drivers.
>> This property can be set to avoid phy initialization in HCD core.
>>
>> v3:
>> Coming back to this series based on discussion at below thread
>> https://patchwork.kernel.org/project/linux-arm-msm/patch/1648103831-
>> 12347-4-git-send-email-quic_c_sanm@quicinc.com/
>> Dropped the dt bindings PATCH 1/3 in v2
>> https://patchwork.kernel.org/project/linux-arm-msm/cover/1636353710-
>> 25582-1-git-send-email-quic_c_sanm@quicinc.com/
>>
>> v2:
>> Updated the commit descriptions.
>> Changed subject prefix from dwc to dwc3.
>> Increased props array size.
>>
>> Sandeep Maheswaram (2):
>>   usb: host: xhci-plat: Add device property to set XHCI_SKIP_PHY_INIT
>>     quirk
>>   usb: dwc3: host: Set the property usb-skip-phy-init
>>
>>  drivers/usb/dwc3/host.c      | 4 +++-
>>  drivers/usb/host/xhci-plat.c | 3 +++
>>  2 files changed, 6 insertions(+), 1 deletion(-)
>>
>> --
>> 2.7.4
> 
> Please let me know your opinion about this series.

Otherwise looks good but wondering if we should document that new device
property somewhere. 

Couldn't find a standard way how those device properties excluded from
Documentation/devicetree/binding are documented

Thanks
-Mathias
Heikki Krogerus April 21, 2022, 7:46 a.m. UTC | #3
On Wed, Apr 20, 2022 at 04:20:52PM +0300, Mathias Nyman wrote:
> On 19.4.2022 13.17, Sandeep Maheswaram (Temp) (QUIC) wrote:
> > Hi Mathias, Felipe,
> > 
> >> -----Original Message-----
> >> From: Sandeep Maheswaram (Temp) (QUIC) <quic_c_sanm@quicinc.com>
> >> Sent: Thursday, April 7, 2022 3:01 PM
> >> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Felipe Balbi
> >> <balbi@kernel.org>; Stephen Boyd <swboyd@chromium.org>; Doug
> >> Anderson <dianders@chromium.org>; Matthias Kaehlcke
> >> <mka@chromium.org>; Mathias Nyman <mathias.nyman@intel.com>
> >> Cc: linux-arm-msm@vger.kernel.org; linux-usb@vger.kernel.org; linux-
> >> kernel@vger.kernel.org; Pavan Kumar Kondeti (QUIC)
> >> <quic_pkondeti@quicinc.com>; Pratham Pratap (QUIC)
> >> <quic_ppratap@quicinc.com>; Krishna Kurapati PSSNV (QUIC)
> >> <quic_kriskura@quicinc.com>; Vidya Sagar Pulyala (Temp) (QUIC)
> >> <quic_vpulyala@quicinc.com>; Sandeep Maheswaram (Temp) (QUIC)
> >> <quic_c_sanm@quicinc.com>
> >> Subject: [PATCH v3 0/2] Skip phy initialization for DWC3 USB Controllers
> >>
> >> Runtime suspend of phy drivers was failing from DWC3 driver as runtime
> >> usage value is 2 because the phy is initialized from
> >> DWC3 core and HCD core.
> >> Some controllers like DWC3 and CDNS3 manage phy in their core drivers.
> >> This property can be set to avoid phy initialization in HCD core.
> >>
> >> v3:
> >> Coming back to this series based on discussion at below thread
> >> https://patchwork.kernel.org/project/linux-arm-msm/patch/1648103831-
> >> 12347-4-git-send-email-quic_c_sanm@quicinc.com/
> >> Dropped the dt bindings PATCH 1/3 in v2
> >> https://patchwork.kernel.org/project/linux-arm-msm/cover/1636353710-
> >> 25582-1-git-send-email-quic_c_sanm@quicinc.com/
> >>
> >> v2:
> >> Updated the commit descriptions.
> >> Changed subject prefix from dwc to dwc3.
> >> Increased props array size.
> >>
> >> Sandeep Maheswaram (2):
> >>   usb: host: xhci-plat: Add device property to set XHCI_SKIP_PHY_INIT
> >>     quirk
> >>   usb: dwc3: host: Set the property usb-skip-phy-init
> >>
> >>  drivers/usb/dwc3/host.c      | 4 +++-
> >>  drivers/usb/host/xhci-plat.c | 3 +++
> >>  2 files changed, 6 insertions(+), 1 deletion(-)
> >>
> >> --
> >> 2.7.4
> > 
> > Please let me know your opinion about this series.
> 
> Otherwise looks good but wondering if we should document that new device
> property somewhere. 
> 
> Couldn't find a standard way how those device properties excluded from
> Documentation/devicetree/binding are documented

Couldn't it be just documented in drivers/usb/host/xhci-plat.c for now?

thanks,
Greg KH April 21, 2022, 8:36 a.m. UTC | #4
On Thu, Apr 21, 2022 at 10:46:37AM +0300, Heikki Krogerus wrote:
> On Wed, Apr 20, 2022 at 04:20:52PM +0300, Mathias Nyman wrote:
> > On 19.4.2022 13.17, Sandeep Maheswaram (Temp) (QUIC) wrote:
> > > Hi Mathias, Felipe,
> > > 
> > >> -----Original Message-----
> > >> From: Sandeep Maheswaram (Temp) (QUIC) <quic_c_sanm@quicinc.com>
> > >> Sent: Thursday, April 7, 2022 3:01 PM
> > >> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Felipe Balbi
> > >> <balbi@kernel.org>; Stephen Boyd <swboyd@chromium.org>; Doug
> > >> Anderson <dianders@chromium.org>; Matthias Kaehlcke
> > >> <mka@chromium.org>; Mathias Nyman <mathias.nyman@intel.com>
> > >> Cc: linux-arm-msm@vger.kernel.org; linux-usb@vger.kernel.org; linux-
> > >> kernel@vger.kernel.org; Pavan Kumar Kondeti (QUIC)
> > >> <quic_pkondeti@quicinc.com>; Pratham Pratap (QUIC)
> > >> <quic_ppratap@quicinc.com>; Krishna Kurapati PSSNV (QUIC)
> > >> <quic_kriskura@quicinc.com>; Vidya Sagar Pulyala (Temp) (QUIC)
> > >> <quic_vpulyala@quicinc.com>; Sandeep Maheswaram (Temp) (QUIC)
> > >> <quic_c_sanm@quicinc.com>
> > >> Subject: [PATCH v3 0/2] Skip phy initialization for DWC3 USB Controllers
> > >>
> > >> Runtime suspend of phy drivers was failing from DWC3 driver as runtime
> > >> usage value is 2 because the phy is initialized from
> > >> DWC3 core and HCD core.
> > >> Some controllers like DWC3 and CDNS3 manage phy in their core drivers.
> > >> This property can be set to avoid phy initialization in HCD core.
> > >>
> > >> v3:
> > >> Coming back to this series based on discussion at below thread
> > >> https://patchwork.kernel.org/project/linux-arm-msm/patch/1648103831-
> > >> 12347-4-git-send-email-quic_c_sanm@quicinc.com/
> > >> Dropped the dt bindings PATCH 1/3 in v2
> > >> https://patchwork.kernel.org/project/linux-arm-msm/cover/1636353710-
> > >> 25582-1-git-send-email-quic_c_sanm@quicinc.com/
> > >>
> > >> v2:
> > >> Updated the commit descriptions.
> > >> Changed subject prefix from dwc to dwc3.
> > >> Increased props array size.
> > >>
> > >> Sandeep Maheswaram (2):
> > >>   usb: host: xhci-plat: Add device property to set XHCI_SKIP_PHY_INIT
> > >>     quirk
> > >>   usb: dwc3: host: Set the property usb-skip-phy-init
> > >>
> > >>  drivers/usb/dwc3/host.c      | 4 +++-
> > >>  drivers/usb/host/xhci-plat.c | 3 +++
> > >>  2 files changed, 6 insertions(+), 1 deletion(-)
> > >>
> > >> --
> > >> 2.7.4
> > > 
> > > Please let me know your opinion about this series.
> > 
> > Otherwise looks good but wondering if we should document that new device
> > property somewhere. 
> > 
> > Couldn't find a standard way how those device properties excluded from
> > Documentation/devicetree/binding are documented
> 
> Couldn't it be just documented in drivers/usb/host/xhci-plat.c for now?

That's not where DT properties are documented.
Heikki Krogerus April 21, 2022, 8:41 a.m. UTC | #5
On Thu, Apr 21, 2022 at 10:36:57AM +0200, Greg Kroah-Hartman wrote:
> On Thu, Apr 21, 2022 at 10:46:37AM +0300, Heikki Krogerus wrote:
> > On Wed, Apr 20, 2022 at 04:20:52PM +0300, Mathias Nyman wrote:
> > > On 19.4.2022 13.17, Sandeep Maheswaram (Temp) (QUIC) wrote:
> > > > Hi Mathias, Felipe,
> > > > 
> > > >> -----Original Message-----
> > > >> From: Sandeep Maheswaram (Temp) (QUIC) <quic_c_sanm@quicinc.com>
> > > >> Sent: Thursday, April 7, 2022 3:01 PM
> > > >> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Felipe Balbi
> > > >> <balbi@kernel.org>; Stephen Boyd <swboyd@chromium.org>; Doug
> > > >> Anderson <dianders@chromium.org>; Matthias Kaehlcke
> > > >> <mka@chromium.org>; Mathias Nyman <mathias.nyman@intel.com>
> > > >> Cc: linux-arm-msm@vger.kernel.org; linux-usb@vger.kernel.org; linux-
> > > >> kernel@vger.kernel.org; Pavan Kumar Kondeti (QUIC)
> > > >> <quic_pkondeti@quicinc.com>; Pratham Pratap (QUIC)
> > > >> <quic_ppratap@quicinc.com>; Krishna Kurapati PSSNV (QUIC)
> > > >> <quic_kriskura@quicinc.com>; Vidya Sagar Pulyala (Temp) (QUIC)
> > > >> <quic_vpulyala@quicinc.com>; Sandeep Maheswaram (Temp) (QUIC)
> > > >> <quic_c_sanm@quicinc.com>
> > > >> Subject: [PATCH v3 0/2] Skip phy initialization for DWC3 USB Controllers
> > > >>
> > > >> Runtime suspend of phy drivers was failing from DWC3 driver as runtime
> > > >> usage value is 2 because the phy is initialized from
> > > >> DWC3 core and HCD core.
> > > >> Some controllers like DWC3 and CDNS3 manage phy in their core drivers.
> > > >> This property can be set to avoid phy initialization in HCD core.
> > > >>
> > > >> v3:
> > > >> Coming back to this series based on discussion at below thread
> > > >> https://patchwork.kernel.org/project/linux-arm-msm/patch/1648103831-
> > > >> 12347-4-git-send-email-quic_c_sanm@quicinc.com/
> > > >> Dropped the dt bindings PATCH 1/3 in v2
> > > >> https://patchwork.kernel.org/project/linux-arm-msm/cover/1636353710-
> > > >> 25582-1-git-send-email-quic_c_sanm@quicinc.com/
> > > >>
> > > >> v2:
> > > >> Updated the commit descriptions.
> > > >> Changed subject prefix from dwc to dwc3.
> > > >> Increased props array size.
> > > >>
> > > >> Sandeep Maheswaram (2):
> > > >>   usb: host: xhci-plat: Add device property to set XHCI_SKIP_PHY_INIT
> > > >>     quirk
> > > >>   usb: dwc3: host: Set the property usb-skip-phy-init
> > > >>
> > > >>  drivers/usb/dwc3/host.c      | 4 +++-
> > > >>  drivers/usb/host/xhci-plat.c | 3 +++
> > > >>  2 files changed, 6 insertions(+), 1 deletion(-)
> > > >>
> > > >> --
> > > >> 2.7.4
> > > > 
> > > > Please let me know your opinion about this series.
> > > 
> > > Otherwise looks good but wondering if we should document that new device
> > > property somewhere. 
> > > 
> > > Couldn't find a standard way how those device properties excluded from
> > > Documentation/devicetree/binding are documented
> > 
> > Couldn't it be just documented in drivers/usb/host/xhci-plat.c for now?
> 
> That's not where DT properties are documented.

It's not a DT property.
Greg KH April 21, 2022, 9:31 a.m. UTC | #6
On Thu, Apr 21, 2022 at 11:41:33AM +0300, Heikki Krogerus wrote:
> On Thu, Apr 21, 2022 at 10:36:57AM +0200, Greg Kroah-Hartman wrote:
> > On Thu, Apr 21, 2022 at 10:46:37AM +0300, Heikki Krogerus wrote:
> > > On Wed, Apr 20, 2022 at 04:20:52PM +0300, Mathias Nyman wrote:
> > > > On 19.4.2022 13.17, Sandeep Maheswaram (Temp) (QUIC) wrote:
> > > > > Hi Mathias, Felipe,
> > > > > 
> > > > >> -----Original Message-----
> > > > >> From: Sandeep Maheswaram (Temp) (QUIC) <quic_c_sanm@quicinc.com>
> > > > >> Sent: Thursday, April 7, 2022 3:01 PM
> > > > >> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Felipe Balbi
> > > > >> <balbi@kernel.org>; Stephen Boyd <swboyd@chromium.org>; Doug
> > > > >> Anderson <dianders@chromium.org>; Matthias Kaehlcke
> > > > >> <mka@chromium.org>; Mathias Nyman <mathias.nyman@intel.com>
> > > > >> Cc: linux-arm-msm@vger.kernel.org; linux-usb@vger.kernel.org; linux-
> > > > >> kernel@vger.kernel.org; Pavan Kumar Kondeti (QUIC)
> > > > >> <quic_pkondeti@quicinc.com>; Pratham Pratap (QUIC)
> > > > >> <quic_ppratap@quicinc.com>; Krishna Kurapati PSSNV (QUIC)
> > > > >> <quic_kriskura@quicinc.com>; Vidya Sagar Pulyala (Temp) (QUIC)
> > > > >> <quic_vpulyala@quicinc.com>; Sandeep Maheswaram (Temp) (QUIC)
> > > > >> <quic_c_sanm@quicinc.com>
> > > > >> Subject: [PATCH v3 0/2] Skip phy initialization for DWC3 USB Controllers
> > > > >>
> > > > >> Runtime suspend of phy drivers was failing from DWC3 driver as runtime
> > > > >> usage value is 2 because the phy is initialized from
> > > > >> DWC3 core and HCD core.
> > > > >> Some controllers like DWC3 and CDNS3 manage phy in their core drivers.
> > > > >> This property can be set to avoid phy initialization in HCD core.
> > > > >>
> > > > >> v3:
> > > > >> Coming back to this series based on discussion at below thread
> > > > >> https://patchwork.kernel.org/project/linux-arm-msm/patch/1648103831-
> > > > >> 12347-4-git-send-email-quic_c_sanm@quicinc.com/
> > > > >> Dropped the dt bindings PATCH 1/3 in v2
> > > > >> https://patchwork.kernel.org/project/linux-arm-msm/cover/1636353710-
> > > > >> 25582-1-git-send-email-quic_c_sanm@quicinc.com/
> > > > >>
> > > > >> v2:
> > > > >> Updated the commit descriptions.
> > > > >> Changed subject prefix from dwc to dwc3.
> > > > >> Increased props array size.
> > > > >>
> > > > >> Sandeep Maheswaram (2):
> > > > >>   usb: host: xhci-plat: Add device property to set XHCI_SKIP_PHY_INIT
> > > > >>     quirk
> > > > >>   usb: dwc3: host: Set the property usb-skip-phy-init
> > > > >>
> > > > >>  drivers/usb/dwc3/host.c      | 4 +++-
> > > > >>  drivers/usb/host/xhci-plat.c | 3 +++
> > > > >>  2 files changed, 6 insertions(+), 1 deletion(-)
> > > > >>
> > > > >> --
> > > > >> 2.7.4
> > > > > 
> > > > > Please let me know your opinion about this series.
> > > > 
> > > > Otherwise looks good but wondering if we should document that new device
> > > > property somewhere. 
> > > > 
> > > > Couldn't find a standard way how those device properties excluded from
> > > > Documentation/devicetree/binding are documented
> > > 
> > > Couldn't it be just documented in drivers/usb/host/xhci-plat.c for now?
> > 
> > That's not where DT properties are documented.
> 
> It's not a DT property.

Then what is it and why are the other properties documented?

Anyway, a new series has been submitted that does document this so I
don't think it's an argument anymore :)