lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <960101cc-78c0-49cf-ab62-90614eeb9ee2@quicinc.com>
Date:   Thu, 2 Nov 2023 22:32:14 +0530
From:   Krishna Kurapati PSSNV <quic_kriskura@...cinc.com>
To:     Caleb Connolly <caleb.connolly@...aro.org>,
        Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
        Bjorn Andersson <andersson@...nel.org>,
        "Konrad Dybcio" <konrad.dybcio@...aro.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>
CC:     <quic_wcheng@...cinc.com>, <linux-usb@...r.kernel.org>,
        Conor Dooley <conor+dt@...nel.org>,
        <linux-kernel@...r.kernel.org>, <linux-arm-msm@...r.kernel.org>,
        Andy Gross <agross@...nel.org>,
        "Philipp Zabel" <p.zabel@...gutronix.de>,
        Rob Herring <robh+dt@...nel.org>,
        "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
        <devicetree@...r.kernel.org>, <quic_ppratap@...cinc.com>,
        <quic_jackp@...cinc.com>
Subject: Re: [RFC 1/8] dt-bindings: usb: qcom,dwc3: Add bindings to enable
 runtime



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@...cinc.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,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ