Lines Matching +full:rx +full:- +full:equalizer
1 // SPDX-License-Identifier: GPL-2.0
266 #define SQI_INLIERS_START ((SQI_SAMPLES - SQI_INLIERS_NUM) / 2)
274 /* TEST_MODE_NORMAL: Non-hybrid results to calculate cable status(open/short/ok)
307 { "RX Good Count", MDIO_MMD_VEND1, LAN887X_MIS_PKT_STAT_REG1, 14},
308 { "RX ERR Count detected by PCS", MDIO_MMD_VEND1, LAN887X_MIS_PKT_STAT_REG3, 16},
310 { "RX CRC ERR Count", MDIO_MMD_VEND1, LAN887X_MIS_PKT_STAT_REG5, 8},
311 { "RX ERR Count for SGMII MII2GMII", MDIO_MMD_VEND1, LAN887X_MIS_PKT_STAT_REG6, 8},
330 mutex_lock(&phydev->lock); in lan937x_dsp_workaround()
350 mutex_unlock(&phydev->lock); in lan937x_dsp_workaround()
362 return -EINVAL; in access_ereg()
384 if (phydev->phy_id == PHY_ID_LAN937X) { in access_ereg()
406 return -EINVAL; in access_ereg_modify_changed()
439 switch (phydev->interface) { in lan87xx_config_rgmii_delay()
500 /* Equalizer Full Duplex Freeze - T1 Slave */ in lan87xx_phy_init()
524 /* Lock Stage 2-3 Multi Factor Config */ in lan87xx_phy_init()
633 /* Tx AMP - 0x06 */ in lan87xx_phy_init()
665 if (phydev->master_slave_state == MASTER_SLAVE_STATE_SLAVE) { in lan87xx_phy_init()
683 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { in lan87xx_phy_config_intr()
775 /* If auto-negotiation is enabled, but not complete, the cable in microchip_cable_test_start_common()
776 * test never completes. So disable auto-neg. in microchip_cable_test_start_common()
838 /* check if part is alive - if not, return diagnostic error */ in lan87xx_cable_test_start()
916 int detect = -1; in lan87xx_cable_test_report()
920 /* read non-hybrid results */ in lan87xx_cable_test_report()
931 /* calculate non-hybrid values */ in lan87xx_cable_test_report()
940 ((pos_peak_in_phases - neg_peak_in_phases) >= min_time_diff) && in lan87xx_cable_test_report()
941 ((pos_peak_in_phases - neg_peak_in_phases) < max_time_diff) && in lan87xx_cable_test_report()
945 ((neg_peak_in_phases - pos_peak_in_phases) >= min_time_diff) && in lan87xx_cable_test_report()
946 ((neg_peak_in_phases - pos_peak_in_phases) < max_time_diff) && in lan87xx_cable_test_report()
1008 phydev->link = 1; in lan87xx_read_status()
1010 phydev->link = 0; in lan87xx_read_status()
1012 phydev->speed = SPEED_UNKNOWN; in lan87xx_read_status()
1013 phydev->duplex = DUPLEX_UNKNOWN; in lan87xx_read_status()
1014 phydev->pause = 0; in lan87xx_read_status()
1015 phydev->asym_pause = 0; in lan87xx_read_status()
1033 switch (phydev->master_slave_set) { in lan87xx_config_aneg()
1044 return -EOPNOTSUPP; in lan87xx_config_aneg()
1104 /* LAN887x Errata: RGMII rx clock active in SGMII mode in lan887x_rgmii_init()
1106 * Re-enabling it for RGMII mode in lan887x_rgmii_init()
1131 /* LAN887x Errata: RGMII rx clock active in SGMII mode. in lan887x_sgmii_init()
1159 /* Control bit to enable/disable RX DLL delay line in signal path */ in lan887x_config_rgmii_en()
1164 /* Configures the phy to enable RX/TX delay in lan887x_config_rgmii_en()
1165 * RGMII - TX & RX delays are either added by MAC or not needed, in lan887x_config_rgmii_en()
1167 * RGMII_ID - Configures phy to enable TX & RX delays, MAC shouldn't add in lan887x_config_rgmii_en()
1168 * RGMII_RX_ID - Configures the PHY to enable the RX delay. in lan887x_config_rgmii_en()
1169 * The MAC shouldn't add the RX delay in lan887x_config_rgmii_en()
1170 * RGMII_TX_ID - Configures the PHY to enable the TX delay. in lan887x_config_rgmii_en()
1173 switch (phydev->interface) { in lan887x_config_rgmii_en()
1191 WARN_ONCE(1, "Invalid phydev interface %d\n", phydev->interface); in lan887x_config_rgmii_en()
1195 /* Configures the PHY to enable/disable RX delay in signal path */ in lan887x_config_rgmii_en()
1224 switch (phydev->interface) { in lan887x_config_phy_interface()
1230 ret = -EOPNOTSUPP; in lan887x_config_phy_interface()
1238 ret = -EOPNOTSUPP; in lan887x_config_phy_interface()
1245 ret = -EOPNOTSUPP; in lan887x_config_phy_interface()
1260 linkmode_set_bit(ETHTOOL_LINK_MODE_TP_BIT, phydev->supported); in lan887x_get_features()
1262 /* First patch only supports 100Mbps and 1000Mbps force-mode. in lan887x_get_features()
1263 * T1 Auto-Negotiation (Clause 98 of IEEE 802.3) will be added later. in lan887x_get_features()
1265 linkmode_clear_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, phydev->supported); in lan887x_get_features()
1350 if (phydev->master_slave_set == MASTER_SLAVE_CFG_MASTER_FORCE || in lan887x_100M_setup()
1351 phydev->master_slave_set == MASTER_SLAVE_CFG_MASTER_PREFERRED){ in lan887x_100M_setup()
1393 int ret = -EINVAL; in lan887x_link_setup()
1395 if (phydev->speed == SPEED_1000) in lan887x_link_setup()
1397 else if (phydev->speed == SPEED_100) in lan887x_link_setup()
1422 /* Chiptop soft-reset to allow the speed/mode change */ in lan887x_phy_reset()
1428 /* CL22 soft-reset to let the link re-train */ in lan887x_phy_reset()
1442 linkmode_zero(phydev->advertising); in lan887x_phy_reconfig()
1469 priv = devm_kzalloc(&phydev->mdio.dev, sizeof(*priv), GFP_KERNEL); in lan887x_probe()
1471 return -ENOMEM; in lan887x_probe()
1473 phydev->priv = priv; in lan887x_probe()
1481 struct lan887x_priv *priv = phydev->priv; in lan887x_get_stat()
1493 val = val & ((1 << stat.bits) - 1); in lan887x_get_stat()
1494 priv->stats[i] += val; in lan887x_get_stat()
1495 ret = priv->stats[i]; in lan887x_get_stat()
1523 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { in lan887x_config_intr()
1568 /* Chip hard-reset */ in lan887x_cd_reset()
1711 return -EAGAIN; in lan887x_cable_test_chk()
1751 /* Read non-hybrid results */ in lan887x_cable_test_report()
1787 /* Calculate non-hybrid values */ in lan887x_cable_test_report()
1797 ((pos_peak_in_phases - neg_peak_in_phases) >= in lan887x_cable_test_report()
1799 ((pos_peak_in_phases - neg_peak_in_phases) < in lan887x_cable_test_report()
1804 ((neg_peak_in_phases - pos_peak_in_phases) >= in lan887x_cable_test_report()
1806 ((neg_peak_in_phases - pos_peak_in_phases) < in lan887x_cable_test_report()
1822 /* Re-initialize PHY and start cable diag test */ in lan887x_cable_test_report()
1854 * distance = (peak_in_phases - peak_in_phases_hybrid) * in lan887x_cable_test_report()
1863 distance = (((pos_peak_in_phases - pos_peak_in_phases_hybrid) in lan887x_cable_test_report()
1866 distance = (((neg_peak_in_phases - pos_peak_in_phases_hybrid) in lan887x_cable_test_report()
1910 if (rc == -EAGAIN) in lan887x_cable_test_get_status()
1925 return *(u16 *)a - *(u16 *)b; in sqi_compare()
1949 return -EINVAL; in lan887x_get_sqi_100M()
1967 if (!phydev->link) in lan887x_get_sqi_100M()
1968 return -ENETDOWN; in lan887x_get_sqi_100M()
1991 if (!phydev->link) in lan887x_get_sqi_100M()
1992 return -ENETDOWN; in lan887x_get_sqi_100M()
2031 if (phydev->speed != SPEED_1000 && in lan887x_get_sqi()
2032 phydev->speed != SPEED_100) in lan887x_get_sqi()
2033 return -ENETDOWN; in lan887x_get_sqi()
2035 if (phydev->speed == SPEED_100) in lan887x_get_sqi()