Skip to content

Commit c72dc06

Browse files
wuliangfengrkhuangtao
authored andcommitted
phy: rockchip: inno-usb2: pre-emphasize for rk1808 otg port
This patch open pre-emphasize in non-chirp state for rk1808 otg port to improve Tx eye diagram, and turn off differential receiver to save power. Change-Id: I289a3a65a4b1b5ca61ccffb7b38b429e626b19bd Signed-off-by: William Wu <william.wu@rock-chips.com>
1 parent 41451d3 commit c72dc06

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

drivers/phy/rockchip/phy-rockchip-inno-usb2.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,6 +1953,23 @@ rockchip_usb2phy_low_power_enable(struct rockchip_usb2phy *rphy,
19531953
return ret;
19541954
}
19551955

1956+
static int rk1808_usb2phy_tuning(struct rockchip_usb2phy *rphy)
1957+
{
1958+
int ret;
1959+
1960+
/* Open pre-emphasize in non-chirp state for otg port */
1961+
ret = regmap_write(rphy->grf, 0x0, 0x00070004);
1962+
if (ret)
1963+
return ret;
1964+
1965+
/* Turn off differential receiver in suspend mode */
1966+
ret = regmap_write(rphy->grf, 0x18, 0x00040000);
1967+
if (ret)
1968+
return ret;
1969+
1970+
return 0;
1971+
}
1972+
19561973
static int rk312x_usb2phy_tuning(struct rockchip_usb2phy *rphy)
19571974
{
19581975
int ret;
@@ -2248,6 +2265,7 @@ static const struct rockchip_usb2phy_cfg rk1808_phy_cfgs[] = {
22482265
{
22492266
.reg = 0x100,
22502267
.num_ports = 2,
2268+
.phy_tuning = rk1808_usb2phy_tuning,
22512269
.clkout_ctl = { 0x108, 4, 4, 1, 0 },
22522270
.port_cfgs = {
22532271
[USB2PHY_PORT_OTG] = {

0 commit comments

Comments
 (0)