mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krishna Kurapati PSSNV <quic_kriskura@quicinc.com>
To: Caleb Connolly <caleb.connolly@linaro.org>,
	Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Bjorn Andersson <andersson@kernel.org>,
	"Konrad Dybcio" <konrad.dybcio@linaro.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: <quic_wcheng@quicinc.com>, <linux-usb@vger.kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>,
	Andy Gross <agross@kernel.org>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	Rob Herring <robh+dt@kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	<devicetree@vger.kernel.org>, <quic_ppratap@quicinc.com>,
	<quic_jackp@quicinc.com>
Subject: Re: [RFC 1/8] dt-bindings: usb: qcom,dwc3: Add bindings to enable runtime
Date: Thu, 2 Nov 2023 22:32:14 +0530	[thread overview]
Message-ID: <960101cc-78c0-49cf-ab62-90614eeb9ee2@quicinc.com> (raw)
In-Reply-To: <272a9764-1cae-4d86-88b1-00175de83333@linaro.org>



On 11/2/2023 10:03 PM, Caleb Connolly wrote:
> 
> 
> On 17/10/2023 14:18, Krishna Kurapati wrote:
>> Add enable-rt binding to let the device register vendor hooks to
>> core and facilitate runtime suspend and resume.
> 
> Hi Krishna,
> 
>  From reading through these patches, it's not clear to me why this 
> behaviour should be conditional on a new devicetree property. Are there 
> some platforms where this behaviour would be undesirable? And if so then 
> would it be possible to determine this based on the QSCRATCH registers?
>>

Hi Caleb,

   There are two types of platforms, some use extcon and some use 
role-switch to deliver vbus/id notifications. Extcon targets already 
have this qscratch modifications present today in vbus and id handlers. 
But for role-switch based targets we don't have any way to get this 
notification to dwc3-qcom. In this implementation, I wanted to get those 
notications from core to glue and for this we implenented vendor hooks.

The property added has been used to do two things:

1. Register glue's vendor hooks to core driver
2. Do runtime_allow for glue (and by default for core as the dt is not 
flattened)

In case of extcon, we don't want to register vendor hooks as 
notifications are not necessary.

For xhci, we opted to enable runtime from userspace.

>> Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
>> ---
>>   Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 5 +++++
>>   1 file changed, 5 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml 
>> b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
>> index cb50261c6a36..788d9c510abc 100644
>> --- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
>> +++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
>> @@ -151,6 +151,11 @@ properties:
>>         HS/FS/LS modes are supported.
>>       type: boolean
>> +  qcom,enable-rt:
>> +    description:
>> +      If present, register vendor hooks to facilitate runtime 
>> suspend/resume
>> +    type: boolean
> 
> A Krzysztof pointed out, properties should define the hardware 
> behaviour, not tot the implementation details. For this case the 
> hardware isn't wired up to vbus, so maybe something like "qcom,no-vbus"?
>> +

On all targets, vbus is not routed to hardware. This vbus toggle 
indication is given to controller via qscratch only.

Regards,
Krishna,

  reply	other threads:[~2023-11-02 17:02 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-17 13:18 [RFC 0/8] Enable runtime suspend resume for QCOM devices Krishna Kurapati
2023-10-17 13:18 ` [RFC 1/8] dt-bindings: usb: qcom,dwc3: Add bindings to enable runtime Krishna Kurapati
2023-10-17 17:19   ` Krzysztof Kozlowski
2023-10-17 17:46     ` Krishna Kurapati PSSNV
2023-10-18  6:09       ` Krzysztof Kozlowski
2023-11-02 16:33   ` Caleb Connolly
2023-11-02 17:02     ` Krishna Kurapati PSSNV [this message]
2023-11-02 18:40       ` Caleb Connolly
2023-11-03  5:34         ` Krishna Kurapati PSSNV
2023-11-03 14:56           ` Caleb Connolly
2023-11-03 18:24             ` Krishna Kurapati PSSNV
2023-10-17 13:18 ` [RFC 2/8] usb: dwc3: core: Register vendor hooks for dwc3-qcom Krishna Kurapati
2023-11-03 15:14   ` Bryan O'Donoghue
2023-11-03 18:45     ` Krishna Kurapati PSSNV
2023-11-03 18:49       ` Krishna Kurapati PSSNV
2023-11-04 16:00         ` Bryan O'Donoghue
2023-11-04 17:02           ` Krishna Kurapati PSSNV
2023-11-07  8:33             ` Krishna Kurapati PSSNV
2023-11-07 10:41               ` Bryan O'Donoghue
2023-11-07 10:55                 ` Bryan O'Donoghue
2023-11-07 11:02                   ` Krishna Kurapati PSSNV
2023-10-17 13:18 ` [RFC 3/8] usb: dwc3: qcom: Enable autosuspend for host mode Krishna Kurapati
2023-10-17 13:18 ` [RFC 5/8] arm64: dts: qcom: Flatten sm8450 usb device node Krishna Kurapati
2023-10-17 13:18 ` [RFC 6/8] arm: dts: qcom: Add pmic glink support for sm8450-qrd Krishna Kurapati
2023-10-17 17:20   ` Krzysztof Kozlowski
2023-10-26 19:41   ` Konrad Dybcio
2023-10-27  3:30     ` Krishna Kurapati PSSNV
2023-10-17 13:18 ` [RFC 7/8] arm: dts: qcom: Enable runtime for SM8450 QRD Krishna Kurapati
2023-10-17 17:21   ` Krzysztof Kozlowski
2023-10-17 13:18 ` [RFC 8/8] usb: dwc3: core: Skip set_mode notification if cable is disconnected Krishna Kurapati

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=960101cc-78c0-49cf-ab62-90614eeb9ee2@quicinc.com \
    --to=quic_kriskura@quicinc.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=caleb.connolly@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=quic_jackp@quicinc.com \
    --cc=quic_ppratap@quicinc.com \
    --cc=quic_wcheng@quicinc.com \
    --cc=robh+dt@kernel.org \
    /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

all inboxes | Powered by JetHome®