/* Following original QCA sourcecode set port to prefer master */
phy_set_bits(phydev, MII_CTRL1000, CTL1000_PREFER_MASTER);
return 0;
}
staticint qca8327_config_init(struct phy_device *phydev)
{ /* QCA8327 require DAC amplitude adjustment for 100m set to +6%. * Disable on init and enable only with 100m speed following * qca original source code.
*/
at803x_debug_reg_mask(phydev, AT803X_DEBUG_ANALOG_TEST_CTRL,
QCA8327_DEBUG_MANU_CTRL_EN, 0);
return qca83xx_config_init(phydev);
}
staticvoid qca83xx_link_change_notify(struct phy_device *phydev)
{ /* Set DAC Amplitude adjustment to +6% for 100m on link running */ if (phydev->state == PHY_RUNNING) { if (phydev->speed == SPEED_100)
at803x_debug_reg_mask(phydev, AT803X_DEBUG_ANALOG_TEST_CTRL,
QCA8327_DEBUG_MANU_CTRL_EN,
QCA8327_DEBUG_MANU_CTRL_EN);
} else { /* Reset DAC Amplitude adjustment */
at803x_debug_reg_mask(phydev, AT803X_DEBUG_ANALOG_TEST_CTRL,
QCA8327_DEBUG_MANU_CTRL_EN, 0);
}
}
staticint qca83xx_resume(struct phy_device *phydev)
{ int ret, val;
/* Skip reset if not suspended */ if (!phydev->suspended) return 0;
/* Reinit the port, reset values set by suspend */
qca83xx_config_init(phydev);
/* Reset the port on port resume */
phy_set_bits(phydev, MII_BMCR, BMCR_RESET | BMCR_ANENABLE);
/* On resume from suspend the switch execute a reset and * restart auto-negotiation. Wait for reset to complete.
*/
ret = phy_read_poll_timeout(phydev, MII_BMCR, val, !(val & BMCR_RESET),
50000, 600000, true); if (ret) return ret;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.