Lines Matching refs:phy
276 static int vsc8211_set_automdi(struct cphy *phy, int enable)
280 if ((err = mdio_write(phy, 0, VSC8211_EXT_PAGE_AXS, 0x52b5)) != 0 ||
281 (err = mdio_write(phy, 0, 18, 0x12)) != 0 ||
282 (err = mdio_write(phy, 0, 17, enable ? 0x2803 : 0x3003)) != 0 ||
283 (err = mdio_write(phy, 0, 16, 0x87fa)) != 0 ||
284 (err = mdio_write(phy, 0, VSC8211_EXT_PAGE_AXS, 0)) != 0)
289 static int vsc8211_set_speed_duplex(struct cphy *phy, int speed, int duplex)
293 err = t3_set_phy_speed_duplex(phy, speed, duplex);
295 err = vsc8211_set_automdi(phy, 1);
405 /* What phy is this */
406 struct cphy *phy = &portinfo->phy;
409 err = mdio_read(phy, 0, VSC8211_PHY_CTRL, ¤tregval);
427 return mdio_write(phy, 0, VSC8211_PHY_CTRL, regval);
433 struct cphy *phy = &pinfo->phy;
437 cphy_init(&pinfo->phy, pinfo->adapter, pinfo, phy_addr, &vsc8211_ops, mdio_ops,
443 err = mdio_read(phy, 0, VSC8211_EXT_CTRL, &val);
448 return mdio_write(phy, 0, VSC8211_LED_CTRL, 0x100);
451 phy->caps = SUPPORTED_1000baseT_Full | SUPPORTED_Autoneg |
453 phy->desc = "1000BASE-X";
454 phy->ops = &vsc8211_fiber_ops;
456 if ((err = mdio_write(phy, 0, VSC8211_EXT_PAGE_AXS, 1)) != 0 ||
457 (err = mdio_write(phy, 0, VSC8211_SIGDET_CTRL, 1)) != 0 ||
458 (err = mdio_write(phy, 0, VSC8211_EXT_PAGE_AXS, 0)) != 0 ||
459 (err = mdio_write(phy, 0, VSC8211_EXT_CTRL,
461 (err = vsc8211_reset(phy, 0)) != 0)