mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
phy: rockchip-inno-usb2: add rk3328 tuning support
Due to usb-phy tuning framework is not added in UPSTREAM codes, so rk3328 tuning is striped in mainline, this commit make a supplement. Change-Id: Id8103d65951515b9b21baab14f7125420cea78eb Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
This commit is contained in:
@@ -1873,6 +1873,31 @@ static int rk312x_usb2phy_tuning(struct rockchip_usb2phy *rphy)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rk3328_usb2phy_tuning(struct rockchip_usb2phy *rphy)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Open debug mode for tuning */
|
||||
ret = regmap_write(rphy->grf, 0x2c, 0xffff0400);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* Open HS pre-emphasize function to increase
|
||||
* HS slew rate for host port
|
||||
*/
|
||||
ret = regmap_write(rphy->grf, 0x30, 0xffff851d);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Turn off differential receiver in suspend mode */
|
||||
ret = regmap_write(rphy->grf, 0x18, 0x00040000);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rk3366_usb2phy_tuning(struct rockchip_usb2phy *rphy)
|
||||
{
|
||||
unsigned int open_pre_emphasize = 0xffff851f;
|
||||
@@ -2186,6 +2211,7 @@ static const struct rockchip_usb2phy_cfg rk3328_phy_cfgs[] = {
|
||||
{
|
||||
.reg = 0x100,
|
||||
.num_ports = 2,
|
||||
.phy_tuning = rk3328_usb2phy_tuning,
|
||||
.clkout_ctl = { 0x108, 4, 4, 1, 0 },
|
||||
.port_cfgs = {
|
||||
[USB2PHY_PORT_OTG] = {
|
||||
|
||||
Reference in New Issue
Block a user