phy: rockchip-inno-usb2: tuning USB 2.0 squelch detection threshold

According to USB 2.0 Spec Table 7-7, the High-speed squelch
detection threshold Min 100mV and Max 150mV, and we set USB
2.0 PHY0 and PHY1 squelch detection threshold to 150mV by
default, so if the amplitude of differential voltage envelope
is < 150 mV, the USB 2.0 PHYs envelope detector will indicate
it as squelch.

On RK3399 box, if we connect usb device with a 4 meter cable,
we can see that the impedance of U2 cable is too big according
to the eye-diagram test report, and this cause serious signal
attenuation at the end of receiver, the amplitude of differential
voltage falls below 150mV.

This patch aims to reduce the PHY0 and PHY1 otg-ports squelch
detection threshold to 125mV (host-ports still use 150mV by
default), this is helpful to increase USB 2.0 PHY compatibility.

Change-Id: Iec8b4043a3440d6f2a5fb18ff59ac0f4988019e9
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
This commit is contained in:
Meng Dongyang
2017-04-17 14:11:58 +08:00
committed by Tao Huang
parent b386106951
commit bf64cf1222

View File

@@ -1471,6 +1471,12 @@ static int rk3399_usb2phy_tuning(struct rockchip_usb2phy *rphy)
GENMASK(17, 16) | 0x0);
ret |= regmap_write(rphy->grf, 0x44b4,
GENMASK(17, 16) | 0x0);
/*
* Set PHY0 A port squelch trigger point to 125mv
*/
ret |= regmap_write(rphy->grf, 0x4480,
GENMASK(30, 30) | 0x4000);
} else {
/*
* Set max ODT compensation voltage and
@@ -1493,6 +1499,12 @@ static int rk3399_usb2phy_tuning(struct rockchip_usb2phy *rphy)
GENMASK(17, 16) | 0x0);
ret |= regmap_write(rphy->grf, 0x4534,
GENMASK(17, 16) | 0x0);
/*
* Set PHY1 A port squelch trigger point to 125mv
*/
ret |= regmap_write(rphy->grf, 0x4500,
GENMASK(30, 30) | 0x4000);
}
return ret;