]> www.infradead.org Git - users/jedix/linux-maple.git/commit
phy: dp83td510: Utilize ALCD for cable length measurement when link is active
authorOleksij Rempel <o.rempel@pengutronix.de>
Thu, 22 Aug 2024 12:07:03 +0000 (14:07 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 26 Aug 2024 16:33:58 +0000 (09:33 -0700)
commit986a7fa4b454c9ee338a133868b8ed740cd45edd
tree7931919e3d2fb68d4e19b0d7639c14956d39418c
parent4715d87e11ac805ab95a75adfbf93d67dfbdbe81
phy: dp83td510: Utilize ALCD for cable length measurement when link is active

In industrial environments where 10BaseT1L PHYs are replacing existing
field bus systems like CAN, it's often essential to retain the existing
cable infrastructure. After installation, collecting metrics such as
cable length is crucial for assessing the quality of the infrastructure.
Traditionally, TDR (Time Domain Reflectometry) is used for this purpose.
However, TDR requires interrupting the link, and if the link partner
remains active, the TDR measurement will fail.

Unlike multi-pair systems, where TDR can be attempted during the MDI-X
switching window, 10BaseT1L systems face greater challenges. The TDR
sequence on 10BaseT1L is longer and coincides with uninterrupted
autonegotiation pulses, making TDR impossible when the link partner is
active.

The DP83TD510 PHY provides an alternative through ALCD (Active Link
Cable Diagnostics), which allows for cable length measurement without
disrupting an active link. Since a live link indicates no short or open
cable states, ALCD can be used effectively to gather cable length
information.

Enhance the dp83td510 driver by:
- Leveraging ALCD to measure cable length when the link is active.
- Bypassing TDR when a link is detected, as ALCD provides the required
  information without disruption.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20240822120703.1393130-4-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/dp83td510.c