Repository navigation
FROMLIST: phy: qcom: qmp-combo, usb: dwc3: qcom: carry live SS-link state for autonomous mode - #2433
Conversation
…ract
dwc3 core only calls phy_set_mode()/phy_set_mode_ext() with the base
PHY_MODE_USB_HOST or PHY_MODE_USB_DEVICE. It never passes the
PHY_MODE_USB_{HOST,DEVICE}_SS/HS/FS/LS submode values to any PHY
driver. However, QMP PHY drivers need to know whether a SuperSpeed
link is present to select the correct autonomous-mode wake interrupt
mask, and phy_mode alone cannot carry that.
Add enum qcom_usb_ss_state (UNKNOWN/PRESENT/ABSENT) and carry it
through the existing submode argument of phy_set_mode_ext(), instead
of extending enum phy_mode further. UNKNOWN is the default so callers
that do not yet pass a real value keep current behavior.
Link: https://lore.kernel.org/all/20261106082716.128968-2-tapas.rana@oss.qualcomm.com/
Signed-off-by: Tapas Rana <tapas.rana@oss.qualcomm.com>
…is confirmed present qmp_combo_enable_autonomous_mode() selects the autonomous-mode wake interrupt mask by comparing qmp->phy_mode against PHY_MODE_USB_HOST_SS/PHY_MODE_USB_DEVICE_SS. However, this driver's set_mode() only ever stores PHY_MODE_USB_HOST or PHY_MODE_USB_DEVICE, since dwc3 core and dwc3-qcom never pass the _SS variants. As a result, the comparison is always false and the PHY always falls back to the ARCVR_DTCT_EN | ARCVR_DTCT_EVENT_SEL mask instead of also enabling ALFPS_DTCT_EN, regardless of whether a SuperSpeed device is attached. Store the qcom_usb_ss_state submode (added in the previous patch) alongside phy_mode in qmp_combo_usb_set_mode(), and switch qmp_combo_enable_autonomous_mode() on it instead of on phy_mode, so LFPS detection is selected only when a SuperSpeed link is confirmed present. Link: https://lore.kernel.org/all/20261106082716.128968-3-tapas.rana@oss.qualcomm.com/ Signed-off-by: Tapas Rana <tapas.rana@oss.qualcomm.com>
PR #2433 — validate-patchPR: #2433
Final Summary
|
PR #2433 — checker-log-analyzerPR: #2433
Detailed report: Full report
|
…d entry dwc3_qcom_suspend() puts each host port into autonomous/wake mode without ever telling the PHY whether a SuperSpeed device is currently attached. qmp_combo_enable_autonomous_mode(), made SS-aware in the previous patch, therefore has no live signal to act on and always sees QCOM_USB_SS_UNKNOWN, falling back to the legacy receiver-detect mask regardless of actual link state. Add dwc3_qcom_read_ss_state() to check each port's USB3 roothub for an attached child device running at SuperSpeed or above, and pass the result as the submode argument of phy_set_mode_ext() so the PHY can select LFPS detection when appropriate. Link: https://lore.kernel.org/all/20261106082716.128968-4-tapas.rana@oss.qualcomm.com/ Signed-off-by: Tapas Rana <tapas.rana@oss.qualcomm.com>
a9206ee to
aef9f27
Compare
Combines the PHY-side and DWC3-side changes for live SuperSpeed-link state propagation used by QMP combo PHY autonomous mode. Previously split across two topic branches (tech/bus/usb/phy and tech/bus/usb/dwc) in #2264 and #2265; now that both land on tech/bus/usb/all, this is a single PR carrying the shared contract once plus both consumers:
CRs-Fixed: 4730864
Link: https://lore.kernel.org/all/20261106082716.128968-1-tapas.rana@oss.qualcomm.com/
Re-raised from #2264 and #2265, which closed because their base branches (tech/bus/usb/phy, tech/bus/usb/dwc) were removed. Same changes, combined and rebased onto tech/bus/usb/all.