Lines Matching +full:- +full:refclk

1 // SPDX-License-Identifier: GPL-2.0+
25 /* Vendor-specific PHY Definitions */
48 struct clk *refclk; member
53 struct smsc_phy_priv *priv = phydev->priv; in smsc_phy_config_intr()
57 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { in smsc_phy_config_intr()
59 if (priv->energy_enable) in smsc_phy_config_intr()
77 struct smsc_phy_priv *priv = phydev->priv; in smsc_phy_config_init()
80 if (!priv->energy_enable) in smsc_phy_config_init()
126 switch (phydev->mdix_ctrl) { in lan87xx_config_aneg()
151 phydev->mdix = phydev->mdix_ctrl; in lan87xx_config_aneg()
159 if (phydev->phy_id != 0x0007c0f0) /* not (LAN9500A or LAN9505A) */ in lan95xx_config_aneg_ext()
173 * The LAN87xx suffers from rare absence of the ENERGYON-bit when Ethernet cable
174 * plugs in while LAN87xx is in Energy Detect Power-Down mode. This leads to
176 * This workaround disables Energy Detect Power-Down mode and waiting for
178 * The Energy Detect Power-Down mode is enabled again in the end of procedure to
183 struct smsc_phy_priv *priv = phydev->priv; in lan87xx_read_status()
187 if (!phydev->link && priv->energy_enable) { in lan87xx_read_status()
208 /* Re-enable EDPD */ in lan87xx_read_status()
263 struct smsc_phy_priv *priv = phydev->priv; in smsc_phy_remove()
265 clk_disable_unprepare(priv->refclk); in smsc_phy_remove()
266 clk_put(priv->refclk); in smsc_phy_remove()
271 struct device *dev = &phydev->mdio.dev; in smsc_phy_probe()
272 struct device_node *of_node = dev->of_node; in smsc_phy_probe()
278 return -ENOMEM; in smsc_phy_probe()
280 priv->energy_enable = true; in smsc_phy_probe()
282 if (of_property_read_bool(of_node, "smsc,disable-energy-detect")) in smsc_phy_probe()
283 priv->energy_enable = false; in smsc_phy_probe()
285 phydev->priv = priv; in smsc_phy_probe()
288 priv->refclk = clk_get_optional(dev, NULL); in smsc_phy_probe()
289 if (IS_ERR(priv->refclk)) in smsc_phy_probe()
290 return dev_err_probe(dev, PTR_ERR(priv->refclk), in smsc_phy_probe()
293 ret = clk_prepare_enable(priv->refclk); in smsc_phy_probe()
297 ret = clk_set_rate(priv->refclk, 50 * 1000 * 1000); in smsc_phy_probe()
299 clk_disable_unprepare(priv->refclk); in smsc_phy_probe()