The issue is, if core soft reset is issued while Intel Apollo Lake
USB mux is in Host role mode, it takes close to 7 minutes before we
are able to switch USB mux from Host mode to Device mode. This is
due to RTL bug.
The workaround is to let BIOS issue the core soft reset via _DSM
method. It will ensure that USB mux is in Device role mode before
issuing core soft reset, and will inform the driver whether the
reset is success within the timeout value, or the timeout is exceeded.
Addressed following merge conflicts
[cvadrevu: fix trivial conflict with 047161686b813
("usb: dwc3: Add remote wakeup handling")]
[cvadrevu: fix trivial conflict with 4e8ef34e36f28
("usb: dwc3: fix gadget mode suspend interrupt handler issue")]
[cvadrevu: fix conflict with 8bea147dfdf82
("usb: dwc3: Soft reset phy on probe for host")]
[cvadrevu: fix conflict with 917dc99b65911
("usb: dwc3: pci: Change PCI device macros")]
Testing
[x] Built kernel with these changes
[x] Verified that bug occurs on cRIO-9049 without these changes.
[x] Verified that bug doesn't occur on cRIO-9049 with these changes.
Summary
This is a cherry-pick of e65d593a18e7d2699f6e9ca40334db1f7e65ba41.
WI: AB#2582800
Bug description (from commit message)
The issue is, if core soft reset is issued while Intel Apollo Lake USB mux is in Host role mode, it takes close to 7 minutes before we are able to switch USB mux from Host mode to Device mode. This is due to RTL bug.
The workaround is to let BIOS issue the core soft reset via _DSM method. It will ensure that USB mux is in Device role mode before issuing core soft reset, and will inform the driver whether the reset is success within the timeout value, or the timeout is exceeded.
Addressed following merge conflicts
[cvadrevu: fix trivial conflict with 047161686b813 ("usb: dwc3: Add remote wakeup handling")] [cvadrevu: fix trivial conflict with 4e8ef34e36f28 ("usb: dwc3: fix gadget mode suspend interrupt handler issue")] [cvadrevu: fix conflict with 8bea147dfdf82 ("usb: dwc3: Soft reset phy on probe for host")] [cvadrevu: fix conflict with 917dc99b65911 ("usb: dwc3: pci: Change PCI device macros")]
Testing