|
|
@@ -61,6 +61,7 @@ static int rtl826xb_probe(struct phy_device *phydev)
|
|
|
|
|
|
priv->phytype = (phydev->drv->phy_id == REALTEK_PHY_ID_RTL8261N) ? (RTK_PHYLIB_RTL8261N) : (RTK_PHYLIB_RTL8264B);
|
|
|
priv->isBasePort = (phydev->drv->phy_id == REALTEK_PHY_ID_RTL8261N) ? (1) : (((phydev->mdio.addr % 4) == 0) ? (1) : (0));
|
|
|
+ priv->pnswap_rx = device_property_read_bool(dev, "realtek,pnswap-rx");
|
|
|
priv->pnswap_tx = device_property_read_bool(dev, "realtek,pnswap-tx");
|
|
|
phydev->priv = priv;
|
|
|
|
|
|
@@ -125,6 +126,11 @@ static int rtkphy_config_init(struct phy_device *phydev)
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
+ if (priv->pnswap_rx)
|
|
|
+ phy_set_bits_mmd(phydev, MDIO_MMD_VEND1,
|
|
|
+ REALTEK_SERDES_GLOBAL_CFG,
|
|
|
+ REALTEK_HSI_INV);
|
|
|
+
|
|
|
if (priv->pnswap_tx)
|
|
|
phy_set_bits_mmd(phydev, MDIO_MMD_VEND1,
|
|
|
REALTEK_SERDES_GLOBAL_CFG,
|