Lines Matching +full:phy +full:- +full:10 +full:base +full:- +full:t1l +full:- +full:2

1 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
3 * Driver for Analog Devices Industrial Ethernet T1L PHYs
14 #include <linux/phy.h>
31 #define ADIN_IS_CFG_SLV BIT(2)
59 * struct adin_priv - ADIN PHY driver private data
60 * @tx_level_2v4_able: set if the PHY supports 2.4V TX levels (10BASE-T1L)
61 * @tx_level_2v4: set if the PHY requests 2.4V TX levels (10BASE-T1L)
83 phydev->master_slave_state = MASTER_SLAVE_STATE_SLAVE; in adin_read_status()
86 phydev->master_slave_state = MASTER_SLAVE_STATE_MASTER; in adin_read_status()
93 struct adin_priv *priv = phydev->priv; in adin_config_aneg()
96 if (phydev->autoneg == AUTONEG_DISABLE) { in adin_config_aneg()
101 if (priv->tx_level_prop_present && priv->tx_level_2v4) in adin_config_aneg()
110 /* Force PHY to use above configurations */ in adin_config_aneg()
119 if (priv->tx_level_prop_present && priv->tx_level_2v4) { in adin_config_aneg()
128 if ((priv->tx_level_prop_present && !priv->tx_level_2v4) || !priv->tx_level_2v4_able) { in adin_config_aneg()
171 /* PCS loopback (according to 10BASE-T1L spec) */ in adin_set_loopback()
191 struct adin_priv *priv = phydev->priv; in adin_get_features()
192 struct device *dev = &phydev->mdio.dev; in adin_get_features()
201 priv->tx_level_2v4_able = !!(ret & MDIO_PMA_10T1L_STAT_2V4_ABLE); in adin_get_features()
203 phydev_dbg(phydev, "PHY supports 2.4V TX level: %s\n", in adin_get_features()
204 priv->tx_level_2v4_able ? "yes" : "no"); in adin_get_features()
206 priv->tx_level_prop_present = device_property_present(dev, "phy-10base-t1l-2.4vpp"); in adin_get_features()
207 if (priv->tx_level_prop_present) { in adin_get_features()
208 ret = device_property_read_u8(dev, "phy-10base-t1l-2.4vpp", &val); in adin_get_features()
212 priv->tx_level_2v4 = val; in adin_get_features()
213 if (!priv->tx_level_2v4 && priv->tx_level_2v4_able) in adin_get_features()
215 "PHY supports 2.4V TX level, but disabled via config\n"); in adin_get_features()
219 phydev->supported); in adin_get_features()
246 return -EINVAL; in adin_get_sqi()
256 struct device *dev = &phydev->mdio.dev; in adin_probe()
261 return -ENOMEM; in adin_probe()
263 phydev->priv = priv; in adin_probe()
296 MODULE_DESCRIPTION("Analog Devices Industrial Ethernet T1L PHY driver");