• Home
  • Raw
  • Download

Lines Matching +full:force +full:- +full:internal +full:- +full:phy

2  *	drivers/net/phy/broadcom.c
17 #include "bcm-phy-lib.h"
19 #include <linux/phy.h>
24 ((phydev)->drv->phy_id & (phydev)->drv->phy_id_mask)
27 ((phydev)->drv->phy_id & ~((phydev)->drv->phy_id_mask))
29 MODULE_DESCRIPTION("Broadcom PHY driver");
46 if (phydev->dev_flags & PHY_BRCM_EN_MASTER_MODE) { in bcm54210e_config_init()
59 /* Clear TX internal delay unless requested. */ in bcm54612e_config_init()
60 if ((phydev->interface != PHY_INTERFACE_MODE_RGMII_ID) && in bcm54612e_config_init()
61 (phydev->interface != PHY_INTERFACE_MODE_RGMII_TXID)) { in bcm54612e_config_init()
67 /* Clear RX internal delay unless requested. */ in bcm54612e_config_init()
68 if ((phydev->interface != PHY_INTERFACE_MODE_RGMII_ID) && in bcm54612e_config_init()
69 (phydev->interface != PHY_INTERFACE_MODE_RGMII_RXID)) { in bcm54612e_config_init()
81 if (!(phydev->dev_flags & PHY_BRCM_RX_REFCLK_UNUSED)) { in bcm54612e_config_init()
99 /* handling PHY's internal RX clock delay */ in bcm5481x_config()
102 if (phydev->interface == PHY_INTERFACE_MODE_RGMII || in bcm5481x_config()
103 phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID) { in bcm5481x_config()
104 /* Disable RGMII RXC-RXD skew */ in bcm5481x_config()
107 if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID || in bcm5481x_config()
108 phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID) { in bcm5481x_config()
109 /* Enable RGMII RXC-RXD skew */ in bcm5481x_config()
117 /* handling PHY's internal TX clock delay */ in bcm5481x_config()
119 if (phydev->interface == PHY_INTERFACE_MODE_RGMII || in bcm5481x_config()
120 phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID) { in bcm5481x_config()
121 /* Disable internal TX clock delay */ in bcm5481x_config()
124 if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID || in bcm5481x_config()
125 phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID) { in bcm5481x_config()
126 /* Enable internal TX clock delay */ in bcm5481x_config()
182 /* Clear bit 9 to fix a phy interop issue. */ in bcm54xx_phydsp_config()
188 if (phydev->drv->phy_id == PHY_ID_BCM50610) { in bcm54xx_phydsp_config()
222 /* Abort if we are using an untested phy. */ in bcm54xx_adjust_rxrefclk()
243 if (phydev->dev_flags & PHY_BRCM_RX_REFCLK_UNUSED) { in bcm54xx_adjust_rxrefclk()
250 if (!clk125en || (phydev->dev_flags & PHY_BRCM_AUTO_PWRDWN_ENABLE)) in bcm54xx_adjust_rxrefclk()
255 if (phydev->dev_flags & PHY_BRCM_DIS_TXCRXC_NOENRGY) in bcm54xx_adjust_rxrefclk()
267 if (!clk125en || (phydev->dev_flags & PHY_BRCM_AUTO_PWRDWN_ENABLE)) in bcm54xx_adjust_rxrefclk()
300 (phydev->dev_flags & PHY_BRCM_CLEAR_RGMII_MODE)) in bcm54xx_config_init()
303 if ((phydev->dev_flags & PHY_BRCM_RX_REFCLK_UNUSED) || in bcm54xx_config_init()
304 (phydev->dev_flags & PHY_BRCM_DIS_TXCRXC_NOENRGY) || in bcm54xx_config_init()
305 (phydev->dev_flags & PHY_BRCM_AUTO_PWRDWN_ENABLE)) in bcm54xx_config_init()
317 /* For BCM54810, we need to disable BroadR-Reach function */ in bcm54xx_config_init()
339 if (phydev->dev_flags & PHY_BCM_FLAGS_MODE_1000BX) { in bcm5482_config_init()
350 * Enable SGMII slave mode and auto-detection in bcm5482_config_init()
375 * Select 1000BASE-X register set (primary SerDes) in bcm5482_config_init()
390 * Auto-negotiation doesn't seem to work quite right in bcm5482_config_init()
391 * in this mode, so we disable it and force it to the in bcm5482_config_init()
395 phydev->autoneg = AUTONEG_DISABLE; in bcm5482_config_init()
396 phydev->speed = SPEED_1000; in bcm5482_config_init()
397 phydev->duplex = DUPLEX_FULL; in bcm5482_config_init()
409 if (phydev->dev_flags & PHY_BCM_FLAGS_MODE_1000BX) { in bcm5482_read_status()
411 * Only link status matters for 1000Base-X mode, so force in bcm5482_read_status()
412 * 1000 Mbit/s full-duplex status in bcm5482_read_status()
414 if (phydev->link) { in bcm5482_read_status()
415 phydev->speed = SPEED_1000; in bcm5482_read_status()
416 phydev->duplex = DUPLEX_FULL; in bcm5482_read_status()
425 struct device_node *np = phydev->mdio.dev.of_node; in bcm5481_config_aneg()
434 if (of_property_read_bool(np, "enet-phy-lane-swap")) { in bcm5481_config_aneg()
435 /* Lane Swap - Undocumented register...magic! */ in bcm5481_config_aneg()
460 /* Reset the PHY to bring it to a known state. */ in brcm_fet_config_init()
511 if (phydev->dev_flags & PHY_BRCM_AUTO_PWRDWN_ENABLE) { in brcm_fet_config_init()
546 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) in brcm_fet_config_intr()
563 priv = devm_kzalloc(&phydev->mdio.dev, sizeof(*priv), GFP_KERNEL); in bcm53xx_phy_probe()
565 return -ENOMEM; in bcm53xx_phy_probe()
567 phydev->priv = priv; in bcm53xx_phy_probe()
569 priv->stats = devm_kcalloc(&phydev->mdio.dev, in bcm53xx_phy_probe()
572 if (!priv->stats) in bcm53xx_phy_probe()
573 return -ENOMEM; in bcm53xx_phy_probe()
581 struct bcm53xx_phy_priv *priv = phydev->priv; in bcm53xx_phy_get_stats()
583 bcm_phy_get_stats(phydev, priv->stats, stats, data); in bcm53xx_phy_get_stats()