diff options
author | Michael Walle <michael@walle.cc> | 2020-05-13 18:35:23 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-13 21:52:38 +0200 |
commit | 11ecf8c55b91806e4dc6a1b9fe7cbf68cdc9b006 (patch) | |
tree | 8dad14749b9bfdbf39a45ef1560beada87d66515 /drivers/net/phy/bcm-phy-lib.h | |
parent | net: phy: broadcom: add bcm_phy_modify_exp() (diff) | |
download | linux-11ecf8c55b91806e4dc6a1b9fe7cbf68cdc9b006.tar.xz linux-11ecf8c55b91806e4dc6a1b9fe7cbf68cdc9b006.zip |
net: phy: broadcom: add cable test support
Most modern broadcom PHYs support ECD (enhanced cable diagnostics). Add
support for it in the bcm-phy-lib so they can easily be used in the PHY
driver.
There are two access methods for ECD: legacy by expansion registers and
via the new RDB registers which are exclusive. Provide functions in two
variants where the PHY driver can choose from. To keep things simple for
now, we just switch the register access to expansion registers in the
RDB variant for now. On the flipside, we have to keep a bus lock to
prevent any other non-legacy access on the PHY.
The results of the intra-pair tests are inconclusive (at least for the
BCM54140). Most of the times half the length is reported but sometimes
the length is correct.
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/bcm-phy-lib.h')
-rw-r--r-- | drivers/net/phy/bcm-phy-lib.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/phy/bcm-phy-lib.h b/drivers/net/phy/bcm-phy-lib.h index b35d880220b9..237a8503c9b4 100644 --- a/drivers/net/phy/bcm-phy-lib.h +++ b/drivers/net/phy/bcm-phy-lib.h @@ -80,4 +80,10 @@ void bcm_phy_r_rc_cal_reset(struct phy_device *phydev); int bcm_phy_28nm_a0b0_afe_config_init(struct phy_device *phydev); int bcm_phy_enable_jumbo(struct phy_device *phydev); +int bcm_phy_cable_test_get_status_rdb(struct phy_device *phydev, + bool *finished); +int bcm_phy_cable_test_start_rdb(struct phy_device *phydev); +int bcm_phy_cable_test_start(struct phy_device *phydev); +int bcm_phy_cable_test_get_status(struct phy_device *phydev, bool *finished); + #endif /* _LINUX_BCM_PHY_LIB_H */ |