Skip to contentSkip to conversation

dt-bindings: usb-xhci: add usb3-resume-missing-cas property

PATCH In review Li Jun 2 participants 5 messages Dec 12, 2017 – Jan 6, 2018 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore

Li Jun

author
#0 lore raw

PATCH 1/2 dt-bindings: usb-xhci: add usb3-resume-missing-cas property

Adding 'usb3-resume-missing-cas' property to enable XHCI_MISSING_CAS quirk flag in case there is CAS missing if device plugged in S3.

---
 Documentation/devicetree/bindings/usb/usb-xhci.txt | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/usb/usb-xhci.txt +2 -0
index e2ea59b..c413e188 100644
@@ -32,6 +32,8 @@ Optional properties:
   - usb3-lpm-capable: determines if platform is USB3 LPM capable
   - quirk-broken-port-ped: set if the controller has broken port disable mechanism
   - imod-interval-ns: default interrupt moderation interval is 5000ns
+  - usb3-resume-missing-cas: set if the CAS(Cold Attach Status) may lose in case
+    usb3 device plugged in while system sleep.
 
 Example:
 	usb@f0931000 {
Signature · 6 lines
2.6.6

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author
#2 lore raw

PATCH 2/2 usb: host: xhci-plat: enable XHCI_MISSING_CAS if platform requested

In reply to a message not in the archive

In case there is CAS missing if device plugged in S3, we can use 'usb3-resume-missing-cas' device property to enable quirk flag XHCI_MISSING_CAS.

---
 drivers/usb/host/xhci-plat.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/usb/host/xhci-plat.c +3 -0
index 6f03830..4ec711c 100644
@@ -269,6 +269,9 @@ static int xhci_plat_probe(struct platform_device *pdev)
 	if (device_property_read_bool(&pdev->dev, "quirk-broken-port-ped"))
 		xhci->quirks |= XHCI_BROKEN_PORT_PED;
 
+	if (device_property_read_bool(sysdev, "usb3-resume-missing-cas"))
+		xhci->quirks |= XHCI_MISSING_CAS;
+
 	/* imod_interval is the interrupt moderation value in nanoseconds. */
 	xhci->imod_interval = 40000;
 	device_property_read_u32(sysdev, "imod-interval-ns",
Signature · 6 lines
2.6.6

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw
In reply to a message not in the archive
Quoted 13 lines · Li Jun

Adding 'usb3-resume-missing-cas' property to enable XHCI_MISSING_CAS quirk flag in case there is CAS missing if device plugged in S3.

---
 Documentation/devicetree/bindings/usb/usb-xhci.txt | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/usb/usb-xhci.txt +0 -0
index e2ea59b..c413e188 100644

Documentation/devicetree/bindings/usb/usb-xhci.txt Optional properties: · line 36

Quoted 5 lines
Documentation/devicetree/bindings/usb/usb-xhci.txt +2 -0
@@ -32,6 +32,8 @@ Optional properties:
   - usb3-lpm-capable: determines if platform is USB3 LPM capable
   - quirk-broken-port-ped: set if the controller has broken port disable mechanism
   - imod-interval-ns: default interrupt moderation interval is 5000ns
+  - usb3-resume-missing-cas: set if the CAS(Cold Attach Status) may lose in case
+    usb3 device plugged in while system sleep.

This should be implied by an SoC specific compatible string for the XHCI block.

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

author
#4 lore raw
Quoted 28 lines

-----Original Message-----
From: Rob Herring [mailto:[email protected]]
Sent: Saturday, December 16, 2017 6:26 AM
To: Jun Li <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/2] dt-bindings: usb-xhci: add usb3-resume-missing-cas
property

Quoted 14 lines · Li Jun

Adding 'usb3-resume-missing-cas' property to enable XHCI_MISSING_CAS quirk flag in case there is CAS missing if device plugged in S3.

---
 Documentation/devicetree/bindings/usb/usb-xhci.txt | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/usb/usb-xhci.txt +0 -0
index e2ea59b..c413e188 100644

Documentation/devicetree/bindings/usb/usb-xhci.txt Optional properties: · line 33

Quoted 2 lines
Documentation/devicetree/bindings/usb/usb-xhci.txt +0 -0
@@ -32,6 +32,8 @@ Optional properties:
   - usb3-lpm-capable: determines if platform is USB3 LPM capable
   - quirk-broken-port-ped: set if the controller has broken port disable

mechanism

Quoted 6 lines

Documentation/devicetree/bindings/usb/usb-xhci.txt Optional properties: · line 35

Quoted 2 lines
Documentation/devicetree/bindings/usb/usb-xhci.txt +1 -0
   - imod-interval-ns: default interrupt moderation interval is 5000ns
+  - usb3-resume-missing-cas: set if the CAS(Cold Attach Status) may lose in

case

Documentation/devicetree/bindings/usb/usb-xhci.txt Optional properties: · line 36

Quoted 1 line
Documentation/devicetree/bindings/usb/usb-xhci.txt +1 -0
+    usb3 device plugged in while system sleep.

This should be implied by an SoC specific compatible string for the XHCI block.

The quirk is already using on some PCI platforms(xhci-pci.c), so I think it will be possible used for other SoCs as well in future.

thanks
Jun Li

Quoted 2 lines

Rob

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

author
#6 lore raw
In reply to a message not in the archive

Hi Rob

Quoted 44 lines

-----Original Message-----
From: [email protected] [mailto:linux-usb- [email protected]] On Behalf Of Jun Li
Sent: Monday, December 18, 2017 4:36 PM
To: Rob Herring <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: RE: [PATCH 1/2] dt-bindings: usb-xhci: add usb3-resume-missing-cas
property

Quoted 33 lines

-----Original Message-----
From: Rob Herring [mailto:[email protected]]
Sent: Saturday, December 16, 2017 6:26 AM
To: Jun Li <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/2] dt-bindings: usb-xhci: add
usb3-resume-missing-cas property

Quoted 16 lines · Li Jun

Adding 'usb3-resume-missing-cas' property to enable XHCI_MISSING_CAS quirk flag in case there is CAS missing if device plugged in S3.

---
 Documentation/devicetree/bindings/usb/usb-xhci.txt | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/usb/usb-xhci.txt +0 -0
index e2ea59b..c413e188 100644
@@ -32,6 +32,8 @@ Optional properties:
   - usb3-lpm-capable: determines if platform is USB3 LPM capable
   - quirk-broken-port-ped: set if the controller has broken port
Quoted 1 line

disable

mechanism

Quoted 4 lines

- imod-interval-ns: default interrupt moderation interval is
5000ns
+ - usb3-resume-missing-cas: set if the CAS(Cold Attach Status) may
+ lose in

Quoted 7 lines
Quoted 4 lines

case

Quoted 1 line

+ usb3 device plugged in while system sleep.

This should be implied by an SoC specific compatible string for the XHCI block.

The quirk is already using on some PCI platforms(xhci-pci.c), so I think it will be possible used for other SoCs as well in future.

Do you still think I should add SoC specific compatible string for this?

Jun Li

Quoted 6 lines

thanks
Jun Li

Quoted 2 lines

Rob

Quoted 9 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at
https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvger.ke
rnel.org%2Fmajordomo- info.html&data=02%7C01%7Cjun.li%40nxp.com%7C4ab4c3f3e85e475b06f808d 545f2615a%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636491829 682216310&sdata=8YEh55OxgmvsQAi5mtZS%2B5wdcWTRiXuKsfyoxmCjILQ%3D &reserved=0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html