[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <44378e83-b8e0-4bfa-a127-aafb0a12d798@oss.qualcomm.com>
Date: Sun, 7 Sep 2025 23:47:01 +0530
From: Krishna Kurapati PSSNV <krishna.kurapati@....qualcomm.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>,
linux-arm-msm@...r.kernel.org,
Bjorn Andersson <bjorn.andersson@....qualcomm.com>,
Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
Mathias Nyman <mathias.nyman@...el.com>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org,
Konrad Dybcio <konrad.dybcio@....qualcomm.com>
Subject: Re: [PATCH v4 0/3] usb: dwc3: Modify role-switching QC drd usb
controllers
On 9/7/2025 1:41 PM, Greg Kroah-Hartman wrote:
> On Sun, Sep 07, 2025 at 01:18:51PM +0530, Krishna Kurapati PSSNV wrote:
>>
>>
>> On 8/12/2025 11:25 AM, Krishna Kurapati wrote:
>>> Currently on QC targets, the conndone/disconnect events in device mode are
>>> generated by controller when software writes to QSCRATCH registers in qcom
>>> glue layer rather than the vbus line being routed to dwc3 core IP for it
>>> to recognize and generate these events. We need to set UTMI_OTG_VBUS_VALID
>>> bit of QSCRATCH_HS_PHY_CTRL register to generate a connection done event
>>> and clear it to generate a disconnect event during cable removal or mode
>>> switch is done
>>>
>>> When the disconnect is not generated upon cable removal, the "connected"
>>> flag of dwc3 is left marked as "true" and it blocks suspend routines and
>>> for that to happen upon cable removal, the cable disconnect notification
>>> from usb_role_switch to DWC3 core driver needs to reach DWC3 Qualcomm glue
>>> driver for it generate the event.
>>>
>>> Currently, the way DWC3 core and Qualcomm glue driver is designed, there
>>> is no mechanism through which the DWC3 core can notify the Qualcomm glue
>>> layer of any role changes which it receives from usb_role_switch. To
>>> register these glue callbacks at probe time, for enabling core to notify
>>> glue layer, the legacy Qualcomm driver has no way to find out when the
>>> child driver probe was successful since it does not check for the same
>>> during of_platform_populate.
>>>
>>> For flattened implementation of the glue driver, register callbacks for
>>> core to invoke and notify glue layer of role switch notifications.
>>>
>>> Set-Role and Run_stop notifier callbacks have been added to inform glue
>>> of changes in role and any modifications UDC might be performing on the
>>> controller. These callbacks allow us to modify qscratch accordingly and
>>> generate disconnect/connect events to facilitate suspend entry and proper
>>> enumeration.
>>>
>>> The series only allows autosuspend to be used but still relies on user
>>> enabling it from userspace (echo auto > a600000.usb/power/control).
>>>
>>
>> [...]
>>
>> Hi Greg,
>>
>> The first two patches of this series are Acked and are independent of the
>> third patch. The first two patches include glue callbacks and suspend resume
>> for device mode for QC SoCs. The third patch is to enable auto-suspend for
>> xhci plat and hence independent of dwc3 patches.
>>
>> If it is fine, can you take in the first two patches and I will resend the
>> third one if necessary after receiving review comments from Mathias.
>
> Can you resend just the first two, as taking patches from a longer
> series is "hard" for my workflow, AND this series is not in my "to
> review" queue anymore due to the other comments on the patches that you
> don't want applied yet.
>
Hi Greg,
Thank you.
Sent v5 [1] with just the acked patches. Will send the last patch
later after it gets review comments.
[1]:
https://lore.kernel.org/all/20250907181412.2174616-1-krishna.kurapati@oss.qualcomm.com/
Regards,
Krishna,
Powered by blists - more mailing lists