• Michael Walle's avatar
    net: phy: broadcom: add cable test support · 11ecf8c5
    Michael Walle authored
    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: default avatarMichael Walle <michael@walle.cc>
    Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
    Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    11ecf8c5
bcm-phy-lib.c 18.5 KB