* [PATCH RESEND 0/2] Add a quirk in xhci-plat for parent nodes to specify no 64 bit support
@ 2023-11-01 10:16 Naveen Kumar
2023-11-01 10:16 ` [PATCH RESEND 1/2] usb: host: xhci-plat: Add quirk-no-64-bit-support Naveen Kumar
2023-11-01 10:16 ` [PATCH RESEND 2/2] dt-bindings: usb: add no-64-bit-support property Naveen Kumar
0 siblings, 2 replies; 6+ messages in thread
From: Naveen Kumar @ 2023-11-01 10:16 UTC (permalink / raw)
To: Mathias Nyman, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-usb, linux-kernel, royluo, devicetree, Naveen Kumar M
From: Naveen Kumar M <mnkumar@google.com>
This patch aims to expose the XHCI_NO_64BIT_SUPPORT flag to the parent
nodes of xhci for clients to specify if they can not support 64 bit DMA
memory pointers. This issue was observed with a Google SoC that uses
a DWC3 controller where the virtual address's higher order bits are
truncated.
Resending due to missing out some reviewers/maintainers in the original
patch.
Naveen Kumar M (2):
usb: host: xhci-plat: Add quirk-no-64-bit-support
dt-bindings: usb: add no-64-bit-support property
Documentation/devicetree/bindings/usb/usb-xhci.yaml | 4 ++++
drivers/usb/host/xhci-plat.c | 3 +++
2 files changed, 7 insertions(+)
--
2.42.0.820.g83a721a137-goog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH RESEND 1/2] usb: host: xhci-plat: Add quirk-no-64-bit-support
2023-11-01 10:16 [PATCH RESEND 0/2] Add a quirk in xhci-plat for parent nodes to specify no 64 bit support Naveen Kumar
@ 2023-11-01 10:16 ` Naveen Kumar
2023-11-01 10:16 ` [PATCH RESEND 2/2] dt-bindings: usb: add no-64-bit-support property Naveen Kumar
1 sibling, 0 replies; 6+ messages in thread
From: Naveen Kumar @ 2023-11-01 10:16 UTC (permalink / raw)
To: Mathias Nyman, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-usb, linux-kernel, royluo, devicetree, Naveen Kumar M
From: Naveen Kumar M <mnkumar@google.com>
This patch exposes the existing quirk XHCI_NO_64BIT_SUPPORT so that dwc3
clients can also use this flag. Despite HCCPARAMS1 being set to 1 some
clients may not support 64 bit addressing.
Signed-off-by: Naveen Kumar M <mnkumar@google.com>
---
drivers/usb/host/xhci-plat.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index b93161374293..d5f37decb7da 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -249,6 +249,9 @@ int xhci_plat_probe(struct platform_device *pdev, struct device *sysdev, const s
if (device_property_read_bool(tmpdev, "quirk-broken-port-ped"))
xhci->quirks |= XHCI_BROKEN_PORT_PED;
+ if (device_property_read_bool(tmpdev, "quirk-no-64-bit-support"))
+ xhci->quirks |= XHCI_NO_64BIT_SUPPORT;
+
device_property_read_u32(tmpdev, "imod-interval-ns",
&xhci->imod_interval);
}
--
2.42.0.820.g83a721a137-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH RESEND 2/2] dt-bindings: usb: add no-64-bit-support property
2023-11-01 10:16 [PATCH RESEND 0/2] Add a quirk in xhci-plat for parent nodes to specify no 64 bit support Naveen Kumar
2023-11-01 10:16 ` [PATCH RESEND 1/2] usb: host: xhci-plat: Add quirk-no-64-bit-support Naveen Kumar
@ 2023-11-01 10:16 ` Naveen Kumar
2023-11-01 10:38 ` Conor Dooley
2023-11-06 14:44 ` Rob Herring
1 sibling, 2 replies; 6+ messages in thread
From: Naveen Kumar @ 2023-11-01 10:16 UTC (permalink / raw)
To: Mathias Nyman, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-usb, linux-kernel, royluo, devicetree, Naveen Kumar M
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
+
imod-interval-ns:
description: Interrupt moderation interval
default: 5000
--
2.42.0.820.g83a721a137-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH RESEND 2/2] dt-bindings: usb: add no-64-bit-support property
2023-11-01 10:16 ` [PATCH RESEND 2/2] dt-bindings: usb: add no-64-bit-support property Naveen Kumar
@ 2023-11-01 10:38 ` Conor Dooley
2023-11-01 11:26 ` Krzysztof Kozlowski
2023-11-06 14:44 ` Rob Herring
1 sibling, 1 reply; 6+ messages in thread
From: Conor Dooley @ 2023-11-01 10:38 UTC (permalink / raw)
To: Naveen Kumar
Cc: Mathias Nyman, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-usb, linux-kernel,
royluo, devicetree
[-- Attachment #1: Type: text/plain, Size: 1426 bytes --]
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
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH RESEND 2/2] dt-bindings: usb: add no-64-bit-support property
2023-11-01 10:38 ` Conor Dooley
@ 2023-11-01 11:26 ` Krzysztof Kozlowski
0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-11-01 11:26 UTC (permalink / raw)
To: Conor Dooley, Naveen Kumar
Cc: Mathias Nyman, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-usb, linux-kernel,
royluo, devicetree
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH RESEND 2/2] dt-bindings: usb: add no-64-bit-support property
2023-11-01 10:16 ` [PATCH RESEND 2/2] dt-bindings: usb: add no-64-bit-support property Naveen Kumar
2023-11-01 10:38 ` Conor Dooley
@ 2023-11-06 14:44 ` Rob Herring
1 sibling, 0 replies; 6+ messages in thread
From: Rob Herring @ 2023-11-06 14:44 UTC (permalink / raw)
To: Naveen Kumar
Cc: Mathias Nyman, Greg Kroah-Hartman, Krzysztof Kozlowski,
Conor Dooley, linux-usb, linux-kernel, royluo, devicetree
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-11-06 14:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-01 10:16 [PATCH RESEND 0/2] Add a quirk in xhci-plat for parent nodes to specify no 64 bit support Naveen Kumar
2023-11-01 10:16 ` [PATCH RESEND 1/2] usb: host: xhci-plat: Add quirk-no-64-bit-support Naveen Kumar
2023-11-01 10:16 ` [PATCH RESEND 2/2] dt-bindings: usb: add no-64-bit-support property Naveen Kumar
2023-11-01 10:38 ` Conor Dooley
2023-11-01 11:26 ` Krzysztof Kozlowski
2023-11-06 14:44 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).