net: phy: Add Open Alliance TC14 10Base-T1S PHY cable diagnostic support
Subsystems (4)
v3 cover net: phy: Add Open Alliance TC14 10Base-T1S PHY cable diagnostic support
This patch series adds Open Alliance TC14 (OATC14) 10BASE-T1S cable diagnostic feature support to the Linux kernel PHY subsystem and enable this feature for Microchip LAN867x Rev.D0 PHYs. These patches provide standardized cable test functionality for 10BASE-T1S Ethernet PHYs, allowing users to perform cable diagnostics via ethtool.
Patch Summary:
1. add OATC14 10BASE-T1S PHY cable diagnostic support
- Implements support for the OATC14 cable diagnostic feature in Clause 45 PHYs.
- Adds functions to start a cable test and retrieve its status, mapping hardware results to ethtool codes.
- Exports these functions for use by PHY drivers.
- Open Alliance TC14 10BASE-T1S Advanced Diagnostic PHY Features.
https://opensig.org/wp-content/uploads/2025/06/OPEN_Alliance_10BASE-T1S_Advanced_PHY_features_for-automotive_Ethernet_V2.1b.pdf
2. add cable diagnostic support for LAN867x Rev.D0
- Integrates the generic OATC14 cable test functions into the Microchip LAN867x Rev.D0 PHY driver.
- Enables ethtool cable diagnostics for this PHY, improving troubleshooting and maintenance.
v2:
- Updated the cover letter subject line for clarity.
v3:
- Explicitly initialized the first enumeration value OATC14_HDD_STATUS_CABLE_OK to 0, ensuring that the enumeration starts from 0.
- Code style update — aligned .cable_test_get_status assignment to a single line for improved readability.
Parthiban Veerasooran (2):
net: phy: phy-c45: add OATC14 10BASE-T1S PHY cable diagnostic support
net: phy: microchip_t1s:: add cable diagnostic support for LAN867x
Rev.D0
drivers/net/phy/mdio-open-alliance.h | 36 ++++++++ drivers/net/phy/microchip_t1s.c | 2 + drivers/net/phy/phy-c45.c | 122 +++++++++++++++++++++++++++ include/linux/phy.h | 3 + 4 files changed, 163 insertions(+)
base-commit: 89aec171d9d1ab168e43fcf9754b82e4c0aef9b9
Signature · 1 line
2.34.1
PATCH v3 1/2 net: phy: phy-c45: add OATC14 10BASE-T1S PHY cable diagnostic support
Add support for Open Alliance TC14 (OATC14) 10BASE-T1S PHYs cable diagnostic feature.
This patch implements:
- genphy_c45_oatc14_cable_test_start() to initiate a cable test
- genphy_c45_oatc14_cable_test_get_status() to retrieve test results
- Helper function to map PHY cable test status to ethtool result codes
- Function declarations and exports for use by PHY drivers
This enables ethtool to report ok, open, short, and undetectable cable conditions on OATC14 10Base-T1S PHYs.
Open Alliance TC14 10BASE-T1S Advanced Diagnostic PHY Features Specification ref:
https://opensig.org/wp-content/uploads/2025/06/OPEN_Alliance_10BASE-T1S_Advanced_PHY_features_for-automotive_Ethernet_V2.1b.pdf
--- drivers/net/phy/mdio-open-alliance.h | 36 ++++++++ drivers/net/phy/phy-c45.c | 122 +++++++++++++++++++++++++++ include/linux/phy.h | 3 + 3 files changed, 161 insertions(+)
drivers/net/phy/mdio-open-alliance.h +36 -0
@@ -43,4 +43,40 @@/* Version Identifiers */ #define OATC14_IDM 0x0a00 +/* +* Open Alliance TC14 (10BASE-T1S) - Advanced Diagnostic Features Registers +* +* Refer to the OPEN Alliance documentation: +* https://opensig.org/automotive-ethernet-specifications/ +* +* Specification: +* "10BASE-T1S Advanced Diagnostic PHY Features" +* https://opensig.org/wp-content/uploads/2025/06/OPEN_Alliance_10BASE-T1S_Advanced_PHY_features_for-automotive_Ethernet_V2.1b.pdf +*/ +/* Advanced Diagnostic Features Capability Register*/ +#define MDIO_OATC14_ADFCAP 0xcc00 +#define OATC14_ADFCAP_HDD_CAPABILITY GENMASK(10, 8) + +/* Harness Defect Detection Register */ +#define MDIO_OATC14_HDD 0xcc01 +#define OATC14_HDD_CONTROL BIT(15) +#define OATC14_HDD_READY BIT(14) +#define OATC14_HDD_START_CONTROL BIT(13) +#define OATC14_HDD_VALID BIT(2) +#define OATC14_HDD_SHORT_OPEN_STATUS GENMASK(1, 0) + +/* Bus Short/Open Status: +* 0 0 - no fault; everything is ok. (Default) +* 0 1 - detected as an open or missing termination(s) +* 1 0 - detected as a short or extra termination(s) +* 1 1 - fault but fault type not detectable. More details can be available by +* vender specific register if supported. +*/ +enum oatc14_hdd_status { +OATC14_HDD_STATUS_CABLE_OK =0 , +OATC14_HDD_STATUS_OPEN , +OATC14_HDD_STATUS_SHORT , +OATC14_HDD_STATUS_NOT_DETECTABLE , +}; +#endif /* __MDIO_OPEN_ALLIANCE__ */
drivers/net/phy/phy-c45.c +122 -0
131 lines not on this page · raw message
include/linux/phy.h +3 -0
@@ -2251,6 +2251,9 @@ int genphy_c45_ethtool_get_eee(struct phy_device *phydev,int genphy_c45_ethtool_set_eee (struct phy_device *phydev,struct ethtool_keee *data);int genphy_c45_an_config_eee_aneg (struct phy_device *phydev); +int genphy_c45_oatc14_cable_test_start (struct phy_device *phydev); +int genphy_c45_oatc14_cable_test_get_status (struct phy_device *phydev, +bool *finished);/* The gen10g_* functions are the old Clause 45 stub */ int gen10g_config_aneg (struct phy_device *phydev);
Signature · 1 line
2.34.1
PATCH v3 2/2 net: phy: microchip_t1s:: add cable diagnostic support for LAN867x Rev.D0
In reply to Parthiban VeerasooranEnable Open Alliance TC14 (OATC14) 10Base-T1S cable diagnostic feature for Microchip LAN867x Rev.D0 PHY by implementing cable_test_start and cable_test_get_status using the generic C45 functions. This allows the ethtool utility to perform cable diagnostic tests directly on the PHY, improving network troubleshooting and maintenance.
--- drivers/net/phy/microchip_t1s.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/phy/microchip_t1s.c +2 -0
@@ -573,6 +573,8 @@ static struct phy_driver microchip_t1s_driver[] = { .get_plca_cfg = genphy_c45_plca_get_cfg, .set_plca_cfg = lan86xx_plca_set_cfg, .get_plca_status = genphy_c45_plca_get_status, + .cable_test_start = genphy_c45_oatc14_cable_test_start, + .cable_test_get_status = genphy_c45_oatc14_cable_test_get_status, }, { PHY_ID_MATCH_EXACT(PHY_ID_LAN865X_REVB),
Signature · 1 line
2.34.1
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 16 lines · On Wed, 5 Nov 2025 10:42:11 +0530 you wrote:
This patch series adds Open Alliance TC14 (OATC14) 10BASE-T1S cable diagnostic feature support to the Linux kernel PHY subsystem and enable this feature for Microchip LAN867x Rev.D0 PHYs. These patches provide standardized cable test functionality for 10BASE-T1S Ethernet PHYs, allowing users to perform cable diagnostics via ethtool.
Patch Summary:
1. add OATC14 10BASE-T1S PHY cable diagnostic support
- Implements support for the OATC14 cable diagnostic feature in Clause 45 PHYs.
- Adds functions to start a cable test and retrieve its status, mapping hardware results to ethtool codes.
- Exports these functions for use by PHY drivers.
- Open Alliance TC14 10BASE-T1S Advanced Diagnostic PHY Features.
https://opensig.org/wp-content/uploads/2025/06/OPEN_Alliance_10BASE-T1S_Advanced_PHY_features_for-automotive_Ethernet_V2.1b.pdf
Quoted 1 line
[...]
Here is the summary with links:
- [net-next,v3,1/2] net: phy: phy-c45: add OATC14 10BASE-T1S PHY cable diagnostic support
https://git.kernel.org/netdev/net-next/c/b87ee13e3493 - [net-next,v3,2/2] net: phy: microchip_t1s:: add cable diagnostic support for LAN867x Rev.D0 https://git.kernel.org/netdev/net-next/c/f424409483d2
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html