aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/microchip
diff options
context:
space:
mode:
authorTristram Ha <[email protected]>2025-07-25 00:17:53 +0000
committerJakub Kicinski <[email protected]>2025-07-26 00:01:56 +0000
commit620e2392db235ba3b9e9619912aadb8cadee15e7 (patch)
tree171d1c4d43e9bae899f773a1e4a9a3cd2e6028a5 /drivers/net/dsa/microchip
parentnet: dsa: microchip: Setup fiber ports for KSZ8463 (diff)
downloadkernel-620e2392db235ba3b9e9619912aadb8cadee15e7.tar.gz
kernel-620e2392db235ba3b9e9619912aadb8cadee15e7.zip
net: dsa: microchip: Disable PTP function of KSZ8463
The PTP function of KSZ8463 is on by default. However, its proprietary way of storing timestamp directly in a reserved field inside the PTP message header is not suitable for use with the current Linux PTP stack implementation. It is necessary to disable the PTP function to not interfere the normal operation of the MAC. Note the PTP driver for KSZ switches does not work for KSZ8463 and is not activated for it. Signed-off-by: Tristram Ha <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/dsa/microchip')
-rw-r--r--drivers/net/dsa/microchip/ksz8.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/dsa/microchip/ksz8.c b/drivers/net/dsa/microchip/ksz8.c
index 62224426a9bd..c400e1c0369e 100644
--- a/drivers/net/dsa/microchip/ksz8.c
+++ b/drivers/net/dsa/microchip/ksz8.c
@@ -1760,6 +1760,17 @@ void ksz8_config_cpu_port(struct dsa_switch *ds)
KSZ8463_REG_DSP_CTRL_6,
COPPER_RECEIVE_ADJUSTMENT, 0);
}
+
+ /* Turn off PTP function as the switch's proprietary way of
+ * handling timestamp is not supported in current Linux PTP
+ * stack implementation.
+ */
+ regmap_update_bits(ksz_regmap_16(dev),
+ KSZ8463_PTP_MSG_CONF1,
+ PTP_ENABLE, 0);
+ regmap_update_bits(ksz_regmap_16(dev),
+ KSZ8463_PTP_CLK_CTRL,
+ PTP_CLK_ENABLE, 0);
}
}