diff mbox series

[RESEND,2/2] dt-bindings: usb: add no-64-bit-support property

Message ID 20231101101625.4151442-3-mnkumar@google.com (mailing list archive)
State New, archived
Headers show
Series Add a quirk in xhci-plat for parent nodes to specify no 64 bit support | expand

Commit Message

Naveen Kumar Nov. 1, 2023, 10:16 a.m. UTC
From: Naveen Kumar M <mnkumar@google.com>

Add a new DT option to specify whether a host controller is able to
support 64-bit DMA memory pointers

Signed-off-by: Naveen Kumar M <mnkumar@google.com>
---
 Documentation/devicetree/bindings/usb/usb-xhci.yaml | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Conor Dooley Nov. 1, 2023, 10:38 a.m. UTC | #1
On Wed, Nov 01, 2023 at 10:16:25AM +0000, Naveen Kumar wrote:
> From: Naveen Kumar M <mnkumar@google.com>
> 
> Add a new DT option to specify whether a host controller is able to
> support 64-bit DMA memory pointers

What host controllers are broken?

> Signed-off-by: Naveen Kumar M <mnkumar@google.com>
> ---
>  Documentation/devicetree/bindings/usb/usb-xhci.yaml | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/usb/usb-xhci.yaml b/Documentation/devicetree/bindings/usb/usb-xhci.yaml
> index 180a261c3e8f..20dc134004f3 100644
> --- a/Documentation/devicetree/bindings/usb/usb-xhci.yaml
> +++ b/Documentation/devicetree/bindings/usb/usb-xhci.yaml
> @@ -25,6 +25,10 @@ properties:
>      description: Set if the controller has broken port disable mechanism
>      type: boolean
>  
> +  quirk-no-64-bit-support:
> +    description: Set if the xHC doesn't support 64-bit DMA memory pointers

To set this property, you need to know that the host controller is
broken, so why not just make the driver set the quirk once it sees that
the host controller is one of the broken ones?
Unless there are "sometimes broken" host controllers, a dedicated
property should not be needed, right?

> +    type: boolean
> +
>    imod-interval-ns:
>      description: Interrupt moderation interval
>      default: 5000
> -- 
> 2.42.0.820.g83a721a137-goog
>
Krzysztof Kozlowski Nov. 1, 2023, 11:26 a.m. UTC | #2
On 01/11/2023 11:38, Conor Dooley wrote:
> On Wed, Nov 01, 2023 at 10:16:25AM +0000, Naveen Kumar wrote:
>> From: Naveen Kumar M <mnkumar@google.com>
>>
>> Add a new DT option to specify whether a host controller is able to
>> support 64-bit DMA memory pointers
> 
> What host controllers are broken?
> 
>> Signed-off-by: Naveen Kumar M <mnkumar@google.com>
>> ---
>>  Documentation/devicetree/bindings/usb/usb-xhci.yaml | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/usb/usb-xhci.yaml b/Documentation/devicetree/bindings/usb/usb-xhci.yaml
>> index 180a261c3e8f..20dc134004f3 100644
>> --- a/Documentation/devicetree/bindings/usb/usb-xhci.yaml
>> +++ b/Documentation/devicetree/bindings/usb/usb-xhci.yaml
>> @@ -25,6 +25,10 @@ properties:
>>      description: Set if the controller has broken port disable mechanism
>>      type: boolean
>>  
>> +  quirk-no-64-bit-support:
>> +    description: Set if the xHC doesn't support 64-bit DMA memory pointers
> 
> To set this property, you need to know that the host controller is
> broken, so why not just make the driver set the quirk once it sees that
> the host controller is one of the broken ones?
> Unless there are "sometimes broken" host controllers, a dedicated
> property should not be needed, right?

Yep, this looks like property specific to given XHCI controller, thus
can be implied from compatible and there is no need for new DT property
at all.

Also, there is no single DTS user of this property. It looks like you
add it for some out-of-tree vendor or non-upstreamable code, which
personally I would not care about. Feel free to prove me wrong by adding
it to respective DTS in other patchset linked here.

Best regards,
Krzysztof
Rob Herring (Arm) Nov. 6, 2023, 2:44 p.m. UTC | #3
On Wed, Nov 01, 2023 at 10:16:25AM +0000, Naveen Kumar wrote:
> From: Naveen Kumar M <mnkumar@google.com>
> 
> Add a new DT option to specify whether a host controller is able to
> support 64-bit DMA memory pointers
> 
> Signed-off-by: Naveen Kumar M <mnkumar@google.com>
> ---
>  Documentation/devicetree/bindings/usb/usb-xhci.yaml | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/usb/usb-xhci.yaml b/Documentation/devicetree/bindings/usb/usb-xhci.yaml
> index 180a261c3e8f..20dc134004f3 100644
> --- a/Documentation/devicetree/bindings/usb/usb-xhci.yaml
> +++ b/Documentation/devicetree/bindings/usb/usb-xhci.yaml
> @@ -25,6 +25,10 @@ properties:
>      description: Set if the controller has broken port disable mechanism
>      type: boolean
>  
> +  quirk-no-64-bit-support:
> +    description: Set if the xHC doesn't support 64-bit DMA memory pointers
> +    type: boolean

To add on to this, you can handle this with dma-ranges if you need to 
limit DMA addresses to less than 32-bits.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/usb-xhci.yaml b/Documentation/devicetree/bindings/usb/usb-xhci.yaml
index 180a261c3e8f..20dc134004f3 100644
--- a/Documentation/devicetree/bindings/usb/usb-xhci.yaml
+++ b/Documentation/devicetree/bindings/usb/usb-xhci.yaml
@@ -25,6 +25,10 @@  properties:
     description: Set if the controller has broken port disable mechanism
     type: boolean
 
+  quirk-no-64-bit-support:
+    description: Set if the xHC doesn't support 64-bit DMA memory pointers
+    type: boolean
+
   imod-interval-ns:
     description: Interrupt moderation interval
     default: 5000