Lines Matching +full:t +full:- +full:phy

2 SPDX-License-Identifier: BSD-2-Clause
37 /* TN1010 PHY specific registers. */
42 /* IEEE auto-negotiation 10GBASE-T registers */
73 * Reset the PHY. May take up to 500ms to complete.
75 static int tn1010_reset(struct cphy *phy, int wait) in tn1010_reset() argument
77 int err = t3_phy_reset(phy, MDIO_DEV_PMA_PMD, wait); in tn1010_reset()
82 static int tn1010_power_down(struct cphy *phy, int enable) in tn1010_power_down() argument
84 return t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, MII_BMCR, in tn1010_power_down()
88 static int tn1010_autoneg_enable(struct cphy *phy) in tn1010_autoneg_enable() argument
92 err = tn1010_power_down(phy, 0); in tn1010_autoneg_enable()
94 err = t3_mdio_change_bits(phy, MDIO_DEV_ANEG, MII_BMCR, 0, in tn1010_autoneg_enable()
99 static int tn1010_autoneg_restart(struct cphy *phy) in tn1010_autoneg_restart() argument
103 err = tn1010_power_down(phy, 0); in tn1010_autoneg_restart()
105 err = t3_mdio_change_bits(phy, MDIO_DEV_ANEG, MII_BMCR, 0, in tn1010_autoneg_restart()
110 static int tn1010_advertise(struct cphy *phy, unsigned int advert) in tn1010_advertise() argument
115 return -EINVAL; /* PHY can't disable 1000BASE-T */ in tn1010_advertise()
122 err = mdio_write(phy, MDIO_DEV_ANEG, ANEG_ADVER, val); in tn1010_advertise()
127 return mdio_write(phy, MDIO_DEV_ANEG, ANEG_10G_CTRL, val | in tn1010_advertise()
131 static int tn1010_get_link_status(struct cphy *phy, int *link_state, in tn1010_get_link_status() argument
135 int err, sp = -1, pause = 0; in tn1010_get_link_status()
137 err = mdio_read(phy, MDIO_DEV_VEND1, TN1010_VEND1_STAT, &status); in tn1010_get_link_status()
149 err = mdio_read(phy, MDIO_DEV_ANEG, ANEG_LPA, &lpa); in tn1010_get_link_status()
151 err = mdio_read(phy, MDIO_DEV_ANEG, ANEG_ADVER, in tn1010_get_link_status()
176 static int tn1010_set_speed_duplex(struct cphy *phy, int speed, int duplex) in tn1010_set_speed_duplex() argument
178 return -EINVAL; /* require autoneg */ in tn1010_set_speed_duplex()
215 cphy_init(&pinfo->phy, pinfo->adapter, pinfo, phy_addr, &tn1010_ops, mdio_ops, in t3_tn1010_phy_prep()
218 "1000/10GBASE-T"); in t3_tn1010_phy_prep()
219 msleep(500); /* PHY needs up to 500ms to start responding to MDIO */ in t3_tn1010_phy_prep()