Re: [PATCH] phy: qcom: m31-eusb2: Add register XCFGI_199_192 for HS disconnect mask

From: Manivannan Sadhasivam

Date: Fri Nov 27 2026 - 05:52:54 EST


On 2026-11-18 20:04 +0530, Tapas Rana wrote:
> In USB 2.0 High-Speed, a device disconnect is detected by the host PHY's
> analog HS disconnect envelope detector: it watches the differential line
> amplitude and flags a disconnect when the amplitude exceeds a threshold
> during the bus idle/EOP window (a disconnected cable reflects the host's
> own drive back, roughly doubling the observed amplitude).
>
> While the host itself is transmitting, the line is already driven hard,
> and trace reflections / signal-integrity overshoot can momentarily push
> the measured amplitude above that threshold even though the device is
> still attached. With the detector honoured during TX, the M31 PHY latches
> a spurious HS disconnect mid-transfer, showing up as false
> disconnect/reconnect events, re-enumeration and transfer stalls under
> host-TX-heavy load (e.g. bulk OUT to mass storage). The failure is
> signal-integrity dependent, so it is intermittent and board/cable
> specific.
>
> Program the XCFGI_199_192 register to set XCFG_HS_DISCONNECT_EN_TX
> (bit 196), which makes the PHY ignore the host disconnect status while in
> TX mode; disconnect detection continues to work normally when the host is
> not transmitting, which is when a real disconnect must be observed. This
> register was not programmed previously, leaving the envelope detector
> active during TX. Add this bit to the reset sequence to suppress the
> spurious TX-time disconnects.
>
> Fixes: 9c8504861cc4 ("phy: qcom: Add M31 based eUSB2 PHY driver")
> Signed-off-by: Tapas Rana <tapas.rana@xxxxxxxxxxxxxxxx>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxxxxxxxx>

- Mani