Skip to content

Commit 98cd83a

Browse files
Chunfeng Yunkishon
authored andcommitted
phy: phy-mt65xx-usb3: increase LFPS filter threshold
Increase LFPS filter threshold to avoid some fake remote wakeup signal which cause U3 link fail and link to U2 only at about 0.01% probability. Signed-off-by: Chunfeng Yun <[email protected]> Signed-off-by: Kishon Vijay Abraham I <[email protected]>
1 parent 1969f69 commit 98cd83a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/phy/phy-mt65xx-usb3.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@
106106
#define P3A_RG_XTAL_EXT_EN_U3 GENMASK(11, 10)
107107
#define P3A_RG_XTAL_EXT_EN_U3_VAL(x) ((0x3 & (x)) << 10)
108108

109+
#define U3P_U3_PHYD_LFPS1 (SSUSB_SIFSLV_U3PHYD_BASE + 0x000c)
110+
#define P3D_RG_FWAKE_TH GENMASK(21, 16)
111+
#define P3D_RG_FWAKE_TH_VAL(x) ((0x3f & (x)) << 16)
112+
109113
#define U3P_PHYD_CDR1 (SSUSB_SIFSLV_U3PHYD_BASE + 0x005c)
110114
#define P3D_RG_CDR_BIR_LTD1 GENMASK(28, 24)
111115
#define P3D_RG_CDR_BIR_LTD1_VAL(x) ((0x1f & (x)) << 24)
@@ -303,6 +307,11 @@ static void phy_instance_init(struct mt65xx_u3phy *u3phy,
303307
tmp |= P3D_RG_CDR_BIR_LTD0_VAL(0xc) | P3D_RG_CDR_BIR_LTD1_VAL(0x3);
304308
writel(tmp, port_base + U3P_PHYD_CDR1);
305309

310+
tmp = readl(port_base + U3P_U3_PHYD_LFPS1);
311+
tmp &= ~P3D_RG_FWAKE_TH;
312+
tmp |= P3D_RG_FWAKE_TH_VAL(0x34);
313+
writel(tmp, port_base + U3P_U3_PHYD_LFPS1);
314+
306315
tmp = readl(port_base + U3P_U3_PHYD_RXDET1);
307316
tmp &= ~P3D_RG_RXDET_STB2_SET;
308317
tmp |= P3D_RG_RXDET_STB2_SET_VAL(0x10);

0 commit comments

Comments
 (0)