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()
170 * The LAN87xx suffers from rare absence of the ENERGYON-bit when Ethernet cable
171 * plugs in while LAN87xx is in Energy Detect Power-Down mode. This leads to
173 * This workaround disables Energy Detect Power-Down mode and waiting for
175 * The Energy Detect Power-Down mode is enabled again in the end of procedure to
180 struct smsc_phy_priv *priv = phydev->priv; in lan87xx_read_status()
184 if (!phydev->link && priv->energy_enable) { in lan87xx_read_status()
205 /* Re-enable EDPD */ in lan87xx_read_status()
260 struct smsc_phy_priv *priv = phydev->priv; in smsc_phy_remove()
262 clk_disable_unprepare(priv->refclk); in smsc_phy_remove()
263 clk_put(priv->refclk); in smsc_phy_remove()
268 struct device *dev = &phydev->mdio.dev; in smsc_phy_probe()
269 struct device_node *of_node = dev->of_node; in smsc_phy_probe()
275 return -ENOMEM; in smsc_phy_probe()
277 priv->energy_enable = true; in smsc_phy_probe()
279 if (of_property_read_bool(of_node, "smsc,disable-energy-detect")) in smsc_phy_probe()
280 priv->energy_enable = false; in smsc_phy_probe()
282 phydev->priv = priv; in smsc_phy_probe()
285 priv->refclk = clk_get_optional(dev, NULL); in smsc_phy_probe()
286 if (IS_ERR(priv->refclk)) in smsc_phy_probe()
287 dev_err_probe(dev, PTR_ERR(priv->refclk), "Failed to request clock\n"); in smsc_phy_probe()
289 ret = clk_prepare_enable(priv->refclk); in smsc_phy_probe()
293 ret = clk_set_rate(priv->refclk, 50 * 1000 * 1000); in smsc_phy_probe()
295 clk_disable_unprepare(priv->refclk); in smsc_phy_probe()