* [PATCH net-next 0/2] net: phy: microchip_t1s: Add support for LAN867x Rev.D0 PHY
@ 2025-10-30 10:22 Parthiban Veerasooran
2025-10-30 10:22 ` [PATCH net-next 1/2] net: phy: microchip_t1s: add support for Microchip LAN867X " Parthiban Veerasooran
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Parthiban Veerasooran @ 2025-10-30 10:22 UTC (permalink / raw)
To: Parthiban.Veerasooran, andrew, hkallweit1, linux, davem,
edumazet, kuba, pabeni
Cc: netdev, linux-kernel, Parthiban Veerasooran
This patch series adds support for the latest Microchip LAN8670/1/2 Rev.D0
10BASE-T1S PHYs to the microchip_t1s driver.
The new Rev.D0 silicon introduces updated initialization requirements and
link status handling behavior compared to earlier revisions (Rev.C2 and
below). These updates are necessary for full compliance with the OPEN
Alliance 10BASE-T1S specification and are documented in Microchip
Application Note AN1699 Revision G (DS60001699G – October 2025).
Summary of changes:
- Implements Rev.D0-specific configuration sequence as described in AN1699
Rev.G.
- Introduces link status control configuration for LAN867x Rev.D0.
Parthiban Veerasooran (2):
net: phy: microchip_t1s: add support for Microchip LAN867X Rev.D0 PHY
net: phy: microchip_t1s: configure link status control for LAN867x
Rev.D0
drivers/net/phy/Kconfig | 2 +-
drivers/net/phy/microchip_t1s.c | 96 ++++++++++++++++++++++++++++++++-
2 files changed, 96 insertions(+), 2 deletions(-)
base-commit: 1bae0fd90077875b6c9c853245189032cbf019f7
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net-next 1/2] net: phy: microchip_t1s: add support for Microchip LAN867X Rev.D0 PHY
2025-10-30 10:22 [PATCH net-next 0/2] net: phy: microchip_t1s: Add support for LAN867x Rev.D0 PHY Parthiban Veerasooran
@ 2025-10-30 10:22 ` Parthiban Veerasooran
2025-10-30 14:51 ` Andrew Lunn
2025-10-30 10:22 ` [PATCH net-next 2/2] net: phy: microchip_t1s: configure link status control for LAN867x Rev.D0 Parthiban Veerasooran
2025-11-01 0:30 ` [PATCH net-next 0/2] net: phy: microchip_t1s: Add support for LAN867x Rev.D0 PHY patchwork-bot+netdevbpf
2 siblings, 1 reply; 7+ messages in thread
From: Parthiban Veerasooran @ 2025-10-30 10:22 UTC (permalink / raw)
To: Parthiban.Veerasooran, andrew, hkallweit1, linux, davem,
edumazet, kuba, pabeni
Cc: netdev, linux-kernel, Parthiban Veerasooran
Add support for the LAN8670/1/2 Rev.D0 10BASE-T1S PHYs from Microchip.
The new Rev.D0 silicon requires a specific set of initialization
settings to be configured for optimal performance and compliance with
OPEN Alliance specifications, as described in Microchip Application Note
AN1699 (Revision G, DS60001699G – October 2025).
https://www.microchip.com/en-us/application-notes/an1699
Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
---
drivers/net/phy/Kconfig | 2 +-
drivers/net/phy/microchip_t1s.c | 47 ++++++++++++++++++++++++++++++++-
2 files changed, 47 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index 98700d069191..a7ade7b95a2e 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -308,7 +308,7 @@ config MICREL_PHY
config MICROCHIP_T1S_PHY
tristate "Microchip 10BASE-T1S Ethernet PHYs"
help
- Currently supports the LAN8670/1/2 Rev.B1/C1/C2 and
+ Currently supports the LAN8670/1/2 Rev.B1/C1/C2/D0 and
LAN8650/1 Rev.B0/B1 Internal PHYs.
config MICROCHIP_PHY
diff --git a/drivers/net/phy/microchip_t1s.c b/drivers/net/phy/microchip_t1s.c
index e50a0c102a86..03e3bacb02bd 100644
--- a/drivers/net/phy/microchip_t1s.c
+++ b/drivers/net/phy/microchip_t1s.c
@@ -3,7 +3,7 @@
* Driver for Microchip 10BASE-T1S PHYs
*
* Support: Microchip Phys:
- * lan8670/1/2 Rev.B1/C1/C2
+ * lan8670/1/2 Rev.B1/C1/C2/D0
* lan8650/1 Rev.B0/B1 Internal PHYs
*/
@@ -14,6 +14,7 @@
#define PHY_ID_LAN867X_REVB1 0x0007C162
#define PHY_ID_LAN867X_REVC1 0x0007C164
#define PHY_ID_LAN867X_REVC2 0x0007C165
+#define PHY_ID_LAN867X_REVD0 0x0007C166
/* Both Rev.B0 and B1 clause 22 PHYID's are same due to B1 chip limitation */
#define PHY_ID_LAN865X_REVB 0x0007C1B3
@@ -109,6 +110,21 @@ static const u16 lan865x_revb_sqi_fixup_cfg_regs[3] = {
0x00AD, 0x00AE, 0x00AF,
};
+/* LAN867x Rev.D0 configuration parameters from AN1699
+ * As per the Configuration Application Note AN1699 published in the below link,
+ * https://www.microchip.com/en-us/application-notes/an1699
+ * Revision G (DS60001699G - October 2025)
+ */
+static const u16 lan867x_revd0_fixup_regs[8] = {
+ 0x0037, 0x008A, 0x0118, 0x00D6,
+ 0x0082, 0x00FD, 0x00FD, 0x0091,
+};
+
+static const u16 lan867x_revd0_fixup_values[8] = {
+ 0x0800, 0xBFC0, 0x029C, 0x1001,
+ 0x001C, 0x0C0B, 0x8C07, 0x9660,
+};
+
/* Pulled from AN1760 describing 'indirect read'
*
* write_register(0x4, 0x00D8, addr)
@@ -407,6 +423,25 @@ static int lan86xx_plca_set_cfg(struct phy_device *phydev,
COL_DET_CTRL0_ENABLE_BIT_MASK, COL_DET_ENABLE);
}
+static int lan867x_revd0_config_init(struct phy_device *phydev)
+{
+ int ret;
+
+ ret = lan867x_check_reset_complete(phydev);
+ if (ret)
+ return ret;
+
+ for (int i = 0; i < ARRAY_SIZE(lan867x_revd0_fixup_regs); i++) {
+ ret = phy_write_mmd(phydev, MDIO_MMD_VEND2,
+ lan867x_revd0_fixup_regs[i],
+ lan867x_revd0_fixup_values[i]);
+ if (ret)
+ return ret;
+ }
+
+ return 0;
+}
+
static int lan86xx_read_status(struct phy_device *phydev)
{
/* The phy has some limitations, namely:
@@ -481,6 +516,15 @@ static struct phy_driver microchip_t1s_driver[] = {
.set_plca_cfg = lan86xx_plca_set_cfg,
.get_plca_status = genphy_c45_plca_get_status,
},
+ {
+ PHY_ID_MATCH_EXACT(PHY_ID_LAN867X_REVD0),
+ .name = "LAN867X Rev.D0",
+ .features = PHY_BASIC_T1S_P2MP_FEATURES,
+ .config_init = lan867x_revd0_config_init,
+ .get_plca_cfg = genphy_c45_plca_get_cfg,
+ .set_plca_cfg = lan86xx_plca_set_cfg,
+ .get_plca_status = genphy_c45_plca_get_status,
+ },
{
PHY_ID_MATCH_EXACT(PHY_ID_LAN865X_REVB),
.name = "LAN865X Rev.B0/B1 Internal Phy",
@@ -501,6 +545,7 @@ static const struct mdio_device_id __maybe_unused tbl[] = {
{ PHY_ID_MATCH_EXACT(PHY_ID_LAN867X_REVB1) },
{ PHY_ID_MATCH_EXACT(PHY_ID_LAN867X_REVC1) },
{ PHY_ID_MATCH_EXACT(PHY_ID_LAN867X_REVC2) },
+ { PHY_ID_MATCH_EXACT(PHY_ID_LAN867X_REVD0) },
{ PHY_ID_MATCH_EXACT(PHY_ID_LAN865X_REVB) },
{ }
};
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net-next 2/2] net: phy: microchip_t1s: configure link status control for LAN867x Rev.D0
2025-10-30 10:22 [PATCH net-next 0/2] net: phy: microchip_t1s: Add support for LAN867x Rev.D0 PHY Parthiban Veerasooran
2025-10-30 10:22 ` [PATCH net-next 1/2] net: phy: microchip_t1s: add support for Microchip LAN867X " Parthiban Veerasooran
@ 2025-10-30 10:22 ` Parthiban Veerasooran
2025-10-30 14:53 ` Andrew Lunn
2025-11-01 0:30 ` [PATCH net-next 0/2] net: phy: microchip_t1s: Add support for LAN867x Rev.D0 PHY patchwork-bot+netdevbpf
2 siblings, 1 reply; 7+ messages in thread
From: Parthiban Veerasooran @ 2025-10-30 10:22 UTC (permalink / raw)
To: Parthiban.Veerasooran, andrew, hkallweit1, linux, davem,
edumazet, kuba, pabeni
Cc: netdev, linux-kernel, Parthiban Veerasooran
Configure the link status in the Link Status Control register for
LAN8670/1/2 Rev.D0 PHYs, depending on whether PLCA or CSMA/CD mode
is enabled. When PLCA is enabled, the link status reflects the PLCA
status. When PLCA is disabled (CSMA/CD mode), the PHY does not support
autonegotiation, so the link status is forced active by setting
the LINK_STATUS_SEMAPHORE bit.
The link status control is configured:
- During PHY initialization, for default CSMA/CD mode.
- Whenever PLCA configuration is updated.
This ensures correct link reporting and consistent behavior for
LAN867x Rev.D0 devices.
Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
---
drivers/net/phy/microchip_t1s.c | 51 ++++++++++++++++++++++++++++++++-
1 file changed, 50 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/microchip_t1s.c b/drivers/net/phy/microchip_t1s.c
index 03e3bacb02bd..bce5cf087b19 100644
--- a/drivers/net/phy/microchip_t1s.c
+++ b/drivers/net/phy/microchip_t1s.c
@@ -33,6 +33,17 @@
#define COL_DET_ENABLE BIT(15)
#define COL_DET_DISABLE 0x0000
+/* LAN8670/1/2 Rev.D0 Link Status Selection Register */
+#define LAN867X_REG_LINK_STATUS_CTRL 0x0012
+#define LINK_STATUS_CONFIGURATION GENMASK(12, 11)
+#define LINK_STATUS_SEMAPHORE BIT(0)
+
+/* Link Status Configuration */
+#define LINK_STATUS_CONFIG_PLCA_STATUS 0x1
+#define LINK_STATUS_CONFIG_SEMAPHORE 0x2
+
+#define LINK_STATUS_SEMAPHORE_SET 0x1
+
#define LAN865X_CFGPARAM_READ_ENABLE BIT(1)
/* The arrays below are pulled from the following table from AN1699
@@ -393,6 +404,32 @@ static int lan867x_revb1_config_init(struct phy_device *phydev)
return 0;
}
+static int lan867x_revd0_link_active_selection(struct phy_device *phydev,
+ bool plca_enabled)
+{
+ u16 value;
+
+ if (plca_enabled) {
+ /* 0x1 - When PLCA is enabled: link status reflects plca_status.
+ */
+ value = FIELD_PREP(LINK_STATUS_CONFIGURATION,
+ LINK_STATUS_CONFIG_PLCA_STATUS);
+ } else {
+ /* 0x2 - Link status is controlled by the value written into the
+ * LINK_STATUS_SEMAPHORE bit written. Here the link semaphore
+ * bit is written with 0x1 to set the link always active in
+ * CSMA/CD mode as it doesn't support autoneg.
+ */
+ value = FIELD_PREP(LINK_STATUS_CONFIGURATION,
+ LINK_STATUS_CONFIG_SEMAPHORE) |
+ FIELD_PREP(LINK_STATUS_SEMAPHORE,
+ LINK_STATUS_SEMAPHORE_SET);
+ }
+
+ return phy_write_mmd(phydev, MDIO_MMD_VEND2,
+ LAN867X_REG_LINK_STATUS_CTRL, value);
+}
+
/* As per LAN8650/1 Rev.B0/B1 AN1760 (Revision F (DS60001760G - June 2024)) and
* LAN8670/1/2 Rev.C1/C2 AN1699 (Revision E (DS60001699F - June 2024)), under
* normal operation, the device should be operated in PLCA mode. Disabling
@@ -409,6 +446,14 @@ static int lan86xx_plca_set_cfg(struct phy_device *phydev,
{
int ret;
+ /* Link status selection must be configured for LAN8670/1/2 Rev.D0 */
+ if (phydev->phy_id == PHY_ID_LAN867X_REVD0) {
+ ret = lan867x_revd0_link_active_selection(phydev,
+ plca_cfg->enabled);
+ if (ret)
+ return ret;
+ }
+
ret = genphy_c45_plca_set_cfg(phydev, plca_cfg);
if (ret)
return ret;
@@ -439,7 +484,11 @@ static int lan867x_revd0_config_init(struct phy_device *phydev)
return ret;
}
- return 0;
+ /* Initially the PHY will be in CSMA/CD mode by default. So it is
+ * required to set the link always active as it doesn't support
+ * autoneg.
+ */
+ return lan867x_revd0_link_active_selection(phydev, false);
}
static int lan86xx_read_status(struct phy_device *phydev)
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 1/2] net: phy: microchip_t1s: add support for Microchip LAN867X Rev.D0 PHY
2025-10-30 10:22 ` [PATCH net-next 1/2] net: phy: microchip_t1s: add support for Microchip LAN867X " Parthiban Veerasooran
@ 2025-10-30 14:51 ` Andrew Lunn
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2025-10-30 14:51 UTC (permalink / raw)
To: Parthiban Veerasooran
Cc: hkallweit1, linux, davem, edumazet, kuba, pabeni, netdev, linux-kernel
On Thu, Oct 30, 2025 at 03:52:57PM +0530, Parthiban Veerasooran wrote:
> Add support for the LAN8670/1/2 Rev.D0 10BASE-T1S PHYs from Microchip.
> The new Rev.D0 silicon requires a specific set of initialization
> settings to be configured for optimal performance and compliance with
> OPEN Alliance specifications, as described in Microchip Application Note
> AN1699 (Revision G, DS60001699G – October 2025).
> https://www.microchip.com/en-us/application-notes/an1699
>
> Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 2/2] net: phy: microchip_t1s: configure link status control for LAN867x Rev.D0
2025-10-30 10:22 ` [PATCH net-next 2/2] net: phy: microchip_t1s: configure link status control for LAN867x Rev.D0 Parthiban Veerasooran
@ 2025-10-30 14:53 ` Andrew Lunn
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2025-10-30 14:53 UTC (permalink / raw)
To: Parthiban Veerasooran
Cc: hkallweit1, linux, davem, edumazet, kuba, pabeni, netdev, linux-kernel
On Thu, Oct 30, 2025 at 03:52:58PM +0530, Parthiban Veerasooran wrote:
> Configure the link status in the Link Status Control register for
> LAN8670/1/2 Rev.D0 PHYs, depending on whether PLCA or CSMA/CD mode
> is enabled. When PLCA is enabled, the link status reflects the PLCA
> status. When PLCA is disabled (CSMA/CD mode), the PHY does not support
> autonegotiation, so the link status is forced active by setting
> the LINK_STATUS_SEMAPHORE bit.
>
> The link status control is configured:
> - During PHY initialization, for default CSMA/CD mode.
> - Whenever PLCA configuration is updated.
>
> This ensures correct link reporting and consistent behavior for
> LAN867x Rev.D0 devices.
>
> Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 0/2] net: phy: microchip_t1s: Add support for LAN867x Rev.D0 PHY
2025-10-30 10:22 [PATCH net-next 0/2] net: phy: microchip_t1s: Add support for LAN867x Rev.D0 PHY Parthiban Veerasooran
2025-10-30 10:22 ` [PATCH net-next 1/2] net: phy: microchip_t1s: add support for Microchip LAN867X " Parthiban Veerasooran
2025-10-30 10:22 ` [PATCH net-next 2/2] net: phy: microchip_t1s: configure link status control for LAN867x Rev.D0 Parthiban Veerasooran
@ 2025-11-01 0:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-11-01 0:30 UTC (permalink / raw)
To: Parthiban Veerasooran
Cc: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni, netdev,
linux-kernel, parthiban.veerasooran
Hello:
This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 30 Oct 2025 15:52:56 +0530 you wrote:
> This patch series adds support for the latest Microchip LAN8670/1/2 Rev.D0
> 10BASE-T1S PHYs to the microchip_t1s driver.
>
> The new Rev.D0 silicon introduces updated initialization requirements and
> link status handling behavior compared to earlier revisions (Rev.C2 and
> below). These updates are necessary for full compliance with the OPEN
> Alliance 10BASE-T1S specification and are documented in Microchip
> Application Note AN1699 Revision G (DS60001699G – October 2025).
>
> [...]
Here is the summary with links:
- [net-next,1/2] net: phy: microchip_t1s: add support for Microchip LAN867X Rev.D0 PHY
https://git.kernel.org/netdev/net-next/c/e7e756779afa
- [net-next,2/2] net: phy: microchip_t1s: configure link status control for LAN867x Rev.D0
https://git.kernel.org/netdev/net-next/c/07f5765f26c3
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net-next 0/2] net: phy: microchip_t1s: Add support for LAN867x Rev.D0 PHY
@ 2025-11-04 10:20 Parthiban Veerasooran
0 siblings, 0 replies; 7+ messages in thread
From: Parthiban Veerasooran @ 2025-11-04 10:20 UTC (permalink / raw)
To: Parthiban.Veerasooran, piergiorgio.beruto, andrew, hkallweit1,
linux, davem, edumazet, kuba, pabeni
Cc: netdev, linux-kernel, Parthiban Veerasooran
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.
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 | 3 +
drivers/net/phy/phy-c45.c | 122 +++++++++++++++++++++++++++
include/linux/phy.h | 3 +
4 files changed, 164 insertions(+)
base-commit: 9e8a443401dfb15574f9cc962783500ca8c2eec2
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-11-04 10:20 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-30 10:22 [PATCH net-next 0/2] net: phy: microchip_t1s: Add support for LAN867x Rev.D0 PHY Parthiban Veerasooran
2025-10-30 10:22 ` [PATCH net-next 1/2] net: phy: microchip_t1s: add support for Microchip LAN867X " Parthiban Veerasooran
2025-10-30 14:51 ` Andrew Lunn
2025-10-30 10:22 ` [PATCH net-next 2/2] net: phy: microchip_t1s: configure link status control for LAN867x Rev.D0 Parthiban Veerasooran
2025-10-30 14:53 ` Andrew Lunn
2025-11-01 0:30 ` [PATCH net-next 0/2] net: phy: microchip_t1s: Add support for LAN867x Rev.D0 PHY patchwork-bot+netdevbpf
2025-11-04 10:20 Parthiban Veerasooran
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®