From 40d5086cb9dc5ab9b73fa2c061919f91819cddb4 Mon Sep 17 00:00:00 2001 From: William Wu Date: Sun, 23 May 2021 15:56:53 +0800 Subject: [PATCH] phy: rockchip: inno-usb2: increase hs eye height for otg port Test on RK3568S EVB1, the otg device data eye test fail with far end template when use 1.2 meter long cable. So tuning the hs eye height from 400mv(default) to 437.5mv. And we test on RK3568 EVB1, it can also benefit from this patch. Change-Id: Ie2342aba5546990838fdd6faf27a007a8843fd0d Signed-off-by: William Wu Signed-off-by: Frank Wang --- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c index fbb2146d32d9..133cf47c59ac 100644 --- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c @@ -2247,6 +2247,12 @@ static int rk3568_usb2phy_tuning(struct rockchip_usb2phy *rphy) writel(reg, rphy->phy_base + 0x0400); if (rphy->phy_cfg->reg == 0xfe8a0000) { + /* Set otg port HS eye height to 437.5mv(default is 400mv) */ + reg = readl(rphy->phy_base + 0x30); + reg &= ~(0x07 << 4); + reg |= (0x06 << 4); + writel(reg, rphy->phy_base + 0x30); + /* * Set the bvalid filter time to 10ms * based on the usb2 phy grf pclk 100MHz.