Lines Matching +full:link +full:- +full:signal +full:- +full:sources
1 // SPDX-License-Identifier: GPL-2.0
126 struct net_device *ndev = phydev->attached_dev; in dp83822_set_wol()
130 if (wol->wolopts & (WAKE_MAGIC | WAKE_MAGICSECURE)) { in dp83822_set_wol()
131 mac = (const u8 *)ndev->dev_addr; in dp83822_set_wol()
134 return -EINVAL; in dp83822_set_wol()
148 if (wol->wolopts & WAKE_MAGIC) in dp83822_set_wol()
153 if (wol->wolopts & WAKE_MAGICSECURE) { in dp83822_set_wol()
156 (wol->sopass[1] << 8) | wol->sopass[0]); in dp83822_set_wol()
159 (wol->sopass[3] << 8) | wol->sopass[2]); in dp83822_set_wol()
162 (wol->sopass[5] << 8) | wol->sopass[4]); in dp83822_set_wol()
188 wol->supported = (WAKE_MAGIC | WAKE_MAGICSECURE); in dp83822_get_wol()
189 wol->wolopts = 0; in dp83822_get_wol()
194 wol->wolopts |= WAKE_MAGIC; in dp83822_get_wol()
199 wol->sopass[0] = (sopass_val & 0xff); in dp83822_get_wol()
200 wol->sopass[1] = (sopass_val >> 8); in dp83822_get_wol()
204 wol->sopass[2] = (sopass_val & 0xff); in dp83822_get_wol()
205 wol->sopass[3] = (sopass_val >> 8); in dp83822_get_wol()
209 wol->sopass[4] = (sopass_val & 0xff); in dp83822_get_wol()
210 wol->sopass[5] = (sopass_val >> 8); in dp83822_get_wol()
212 wol->wolopts |= WAKE_MAGICSECURE; in dp83822_get_wol()
217 wol->wolopts = 0; in dp83822_get_wol()
222 struct dp83822_private *dp83822 = phydev->priv; in dp83822_config_intr()
227 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { in dp83822_config_intr()
236 if (!dp83822->fx_enabled) in dp83822_config_intr()
256 if (!dp83822->fx_enabled) in dp83822_config_intr()
297 * sources. To determine the possible interrupt sources, just read the in dp83822_handle_interrupt()
334 struct dp83822_private *dp83822 = phydev->priv; in dp83822_read_status()
339 if (dp83822->fx_enabled) { in dp83822_read_status()
341 phydev->speed = SPEED_UNKNOWN; in dp83822_read_status()
342 phydev->duplex = DUPLEX_UNKNOWN; in dp83822_read_status()
365 phydev->duplex = DUPLEX_FULL; in dp83822_read_status()
367 phydev->duplex = DUPLEX_HALF; in dp83822_read_status()
370 phydev->speed = SPEED_10; in dp83822_read_status()
372 phydev->speed = SPEED_100; in dp83822_read_status()
379 struct dp83822_private *dp83822 = phydev->priv; in dp83822_config_init()
380 struct device *dev = &phydev->mdio.dev; in dp83822_config_init()
417 if (dp83822->fx_enabled) { in dp83822_config_init()
424 linkmode_and(phydev->advertising, phydev->advertising, in dp83822_config_init()
425 phydev->supported); in dp83822_config_init()
428 phydev->supported); in dp83822_config_init()
430 phydev->advertising); in dp83822_config_init()
432 phydev->supported); in dp83822_config_init()
434 phydev->supported); in dp83822_config_init()
436 phydev->advertising); in dp83822_config_init()
438 phydev->advertising); in dp83822_config_init()
450 phydev->autoneg = AUTONEG_DISABLE; in dp83822_config_init()
452 phydev->supported); in dp83822_config_init()
454 phydev->advertising); in dp83822_config_init()
464 if (dp83822->fx_signal_det_low) { in dp83822_config_init()
488 return phydev->drv->config_init(phydev); in dp83822_phy_reset()
494 struct dp83822_private *dp83822 = phydev->priv; in dp83822_of_init()
495 struct device *dev = &phydev->mdio.dev; in dp83822_of_init()
497 /* Signal detection for the PHY is only enabled if the FX_EN and the in dp83822_of_init()
498 * SD_EN pins are strapped. Signal detection can only enabled if FX_EN in dp83822_of_init()
499 * is strapped otherwise signal detection is disabled for the PHY. in dp83822_of_init()
501 if (dp83822->fx_enabled && dp83822->fx_sd_enable) in dp83822_of_init()
502 dp83822->fx_signal_det_low = device_property_present(dev, in dp83822_of_init()
503 "ti,link-loss-low"); in dp83822_of_init()
504 if (!dp83822->fx_enabled) in dp83822_of_init()
505 dp83822->fx_enabled = device_property_present(dev, in dp83822_of_init()
506 "ti,fiber-mode"); in dp83822_of_init()
519 struct dp83822_private *dp83822 = phydev->priv; in dp83822_read_straps()
530 dp83822->fx_enabled = 1; in dp83822_read_straps()
532 if (dp83822->fx_enabled) { in dp83822_read_straps()
536 dp83822->fx_sd_enable = 1; in dp83822_read_straps()
547 dp83822 = devm_kzalloc(&phydev->mdio.dev, sizeof(*dp83822), in dp83822_probe()
550 return -ENOMEM; in dp83822_probe()
552 phydev->priv = dp83822; in dp83822_probe()
560 if (dp83822->fx_enabled) in dp83822_probe()
561 phydev->port = PORT_FIBRE; in dp83822_probe()