phy: rockchip: naneng-combphy: Force detect Rx for RK356X SoCs
Follow internal design requirement. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Change-Id: I1b304cfab4a65c88cfdab6f59922f297fa35e742
This commit is contained in:
@ -68,6 +68,7 @@ struct rockchip_combphy_cfg {
|
|||||||
const int num_clks;
|
const int num_clks;
|
||||||
const struct clk_bulk_data *clks;
|
const struct clk_bulk_data *clks;
|
||||||
const struct rockchip_combphy_grfcfg *grfcfg;
|
const struct rockchip_combphy_grfcfg *grfcfg;
|
||||||
|
bool force_det_out; /* Tx detect Rx errata */
|
||||||
int (*combphy_cfg)(struct rockchip_combphy_priv *priv);
|
int (*combphy_cfg)(struct rockchip_combphy_priv *priv);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -130,6 +131,7 @@ static u32 rockchip_combphy_is_ready(struct rockchip_combphy_priv *priv)
|
|||||||
static int rockchip_combphy_pcie_init(struct rockchip_combphy_priv *priv)
|
static int rockchip_combphy_pcie_init(struct rockchip_combphy_priv *priv)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
u32 val;
|
||||||
|
|
||||||
if (priv->cfg->combphy_cfg) {
|
if (priv->cfg->combphy_cfg) {
|
||||||
ret = priv->cfg->combphy_cfg(priv);
|
ret = priv->cfg->combphy_cfg(priv);
|
||||||
@ -139,6 +141,12 @@ static int rockchip_combphy_pcie_init(struct rockchip_combphy_priv *priv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (priv->cfg->force_det_out) {
|
||||||
|
val = readl(priv->mmio + (0xd << 2));
|
||||||
|
val |= BIT(5);
|
||||||
|
writel(val, priv->mmio + (0xd << 2));
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -622,6 +630,7 @@ static const struct rockchip_combphy_cfg rk3568_combphy_cfgs = {
|
|||||||
.clks = rk3568_clks,
|
.clks = rk3568_clks,
|
||||||
.grfcfg = &rk3568_combphy_grfcfgs,
|
.grfcfg = &rk3568_combphy_grfcfgs,
|
||||||
.combphy_cfg = rk3568_combphy_cfg,
|
.combphy_cfg = rk3568_combphy_cfg,
|
||||||
|
.force_det_out = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct of_device_id rockchip_combphy_of_match[] = {
|
static const struct of_device_id rockchip_combphy_of_match[] = {
|
||||||
|
|||||||
Reference in New Issue
Block a user