Lines Matching +full:10 +full:gbase +full:- +full:r

1 // SPDX-License-Identifier: GPL-2.0
2 // Broadcom BCM84881 NBASE-T PHY driver, as found on a SFP+ module.
5 // Like the Marvell 88x3310, the Broadcom 84881 changes its host-side
6 // interface according to the operating speed between 10GBASE-R,
7 // 2500BASE-X and SGMII (but unlike the 88x3310, without the control
34 switch (phydev->interface) { in bcm84881_config_init()
40 return -ENODEV; in bcm84881_config_init()
50 if (!phydev->is_c45 || in bcm84881_probe()
51 (phydev->c45_ids.devices_in_package & mmd_mask) != mmd_mask) in bcm84881_probe()
52 return -ENODEV; in bcm84881_probe()
65 /* Although the PHY sets bit 1.11.8, it does not support 10M modes */ in bcm84881_get_features()
67 phydev->supported); in bcm84881_get_features()
69 phydev->supported); in bcm84881_get_features()
88 phydev->mdix_ctrl = ETH_TP_MDI_AUTO; in bcm84881_config_aneg()
91 if (phydev->autoneg == AUTONEG_DISABLE) in bcm84881_config_aneg()
92 return -EINVAL; in bcm84881_config_aneg()
100 adv = linkmode_adv_to_mii_ctrl1000_t(phydev->advertising); in bcm84881_config_aneg()
139 phydev->link = 0; in bcm84881_read_status()
151 phydev->autoneg_complete = !!(val & MDIO_AN_STAT1_COMPLETE) && in bcm84881_read_status()
153 phydev->link = !!(val & MDIO_STAT1_LSTATUS) && in bcm84881_read_status()
155 if (phydev->autoneg == AUTONEG_ENABLE && !phydev->autoneg_complete) in bcm84881_read_status()
156 phydev->link = false; in bcm84881_read_status()
158 linkmode_zero(phydev->lp_advertising); in bcm84881_read_status()
159 phydev->speed = SPEED_UNKNOWN; in bcm84881_read_status()
160 phydev->duplex = DUPLEX_UNKNOWN; in bcm84881_read_status()
161 phydev->pause = 0; in bcm84881_read_status()
162 phydev->asym_pause = 0; in bcm84881_read_status()
163 phydev->mdix = 0; in bcm84881_read_status()
165 if (!phydev->link) in bcm84881_read_status()
168 if (phydev->autoneg_complete) { in bcm84881_read_status()
178 mii_stat1000_mod_linkmode_lpa_t(phydev->lp_advertising, val); in bcm84881_read_status()
180 if (phydev->autoneg == AUTONEG_ENABLE) in bcm84881_read_status()
184 if (phydev->autoneg == AUTONEG_DISABLE) { in bcm84881_read_status()
188 phydev->link = 0; in bcm84881_read_status()
192 /* Set the host link mode - we set the phy interface mode and in bcm84881_read_status()
200 phydev->interface = PHY_INTERFACE_MODE_SGMII; in bcm84881_read_status()
202 phydev->interface = PHY_INTERFACE_MODE_10GBASER; in bcm84881_read_status()
204 phydev->interface = PHY_INTERFACE_MODE_2500BASEX; in bcm84881_read_status()
207 phydev->speed = SPEED_100; in bcm84881_read_status()
210 phydev->speed = SPEED_1000; in bcm84881_read_status()
213 phydev->speed = SPEED_10000; in bcm84881_read_status()
216 phydev->speed = SPEED_2500; in bcm84881_read_status()
219 phydev->speed = SPEED_5000; in bcm84881_read_status()
242 /* FIXME: module auto-loading for Clause 45 PHYs seems non-functional */